From 70e243d1c48f9554bd4e28e80f7ff766db6fe857 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 10 Jun 2016 07:36:43 +0200 Subject: HONEYCOMB-7: Remove VBD form HC VBD is now subproject of ODL: https://git.opendaylight.org/gerrit/#/admin/projects/honeycomb/vbd Change-Id: I1bf01a01cca50fe5e3f4f82a53c6b15ec5c7091d Signed-off-by: Marek Gradzki --- pom.xml | 1 - vbd/api/pom.xml | 76 --- .../VxlanTunnelIdAllocator.java | 25 - vbd/api/src/main/yang/odl-external-reference.yang | 41 -- vbd/api/src/main/yang/vbridge-topology.yang | 165 ------- vbd/artifacts/pom.xml | 63 --- vbd/features/pom.xml | 140 ------ vbd/features/src/main/features/features.xml | 55 --- vbd/gui/bundle/pom.xml | 92 ---- .../resources/OSGI-INF/blueprint/blueprint.xml | 20 - vbd/gui/module/pom.xml | 56 --- vbd/gui/module/src/main/resources/vpp/.gitignore | 2 - .../src/main/resources/vpp/assets/css/next.css | 93 ---- .../src/main/resources/vpp/assets/css/vpp.css | 258 ---------- .../resources/vpp/assets/data/locale-en_US.json | 3 - .../vpp/assets/fonts/CiscoSansExtraLight.otf | Bin 53944 -> 0 bytes .../vpp/assets/fonts/CiscoSansRegular.otf | Bin 52108 -> 0 bytes .../assets/fonts/ciscosansextralight-webfont.eot | Bin 44036 -> 0 bytes .../assets/fonts/ciscosansextralight-webfont.svg | 232 --------- .../assets/fonts/ciscosansextralight-webfont.ttf | Bin 43832 -> 0 bytes .../assets/fonts/ciscosansextralight-webfont.woff | Bin 23556 -> 0 bytes .../vpp/assets/fonts/ciscosansregular-webfont.eot | Bin 44332 -> 0 bytes .../vpp/assets/fonts/ciscosansregular-webfont.svg | 232 --------- .../vpp/assets/fonts/ciscosansregular-webfont.ttf | Bin 44140 -> 0 bytes .../vpp/assets/fonts/ciscosansregular-webfont.woff | Bin 24084 -> 0 bytes .../main/resources/vpp/assets/fonts/next-font.eot | Bin 26072 -> 0 bytes .../main/resources/vpp/assets/fonts/next-font.svg | 90 ---- .../main/resources/vpp/assets/fonts/next-font.ttf | Bin 25900 -> 0 bytes .../main/resources/vpp/assets/fonts/next-font.woff | Bin 25976 -> 0 bytes .../src/main/resources/vpp/assets/images/bd1.svg | 1 - .../src/main/resources/vpp/assets/images/bd2.svg | 8 - .../main/resources/vpp/assets/images/interf.svg | 1 - .../src/main/resources/vpp/assets/images/vpp.gif | Bin 1944 -> 0 bytes .../src/main/resources/vpp/assets/js/lodash.min.js | 98 ---- .../src/main/resources/vpp/assets/js/next.js | 101 ---- vbd/gui/module/src/main/resources/vpp/bower.json | 36 -- .../vpp/controllers/bdm.bridgedomain.controller.js | 18 - .../resources/vpp/controllers/bdm.controller.js | 541 --------------------- .../vpp/controllers/bdm.interface.controller.js | 17 - .../vpp/controllers/bdm.vpp.controller.js | 14 - .../vpp/controllers/inventory.controller.js | 253 ---------- .../resources/vpp/controllers/vpp.controller.js | 64 --- vbd/gui/module/src/main/resources/vpp/main.js | 30 -- vbd/gui/module/src/main/resources/vpp/node/node | Bin 20113697 -> 0 bytes vbd/gui/module/src/main/resources/vpp/package.json | 18 - .../vpp/services/bdm.bridgedomain.service.js | 89 ---- .../vpp/services/bdm.interface.service.js | 74 --- .../src/main/resources/vpp/services/bdm.service.js | 14 - .../resources/vpp/services/bdm.tunnel.service.js | 25 - .../main/resources/vpp/services/bdm.vpp.service.js | 106 ---- .../resources/vpp/services/inventory.service.js | 154 ------ .../main/resources/vpp/services/vpp.services.js | 48 -- .../resources/vpp/views/bridge-domains.tpl.html | 56 --- .../vpp/views/config-interface-dialog.html | 38 -- .../resources/vpp/views/config-vpp-dialog.html | 67 --- .../src/main/resources/vpp/views/index.tpl.html | 15 - .../resources/vpp/views/inventory-detail.tpl.html | 99 ---- .../inventory-table-interfaces-subgrid.tpl.html | 1 - .../resources/vpp/views/inventory-table.tpl.html | 41 -- .../main/resources/vpp/views/inventory.tpl.html | 7 - .../main/resources/vpp/views/new-bd-dialog.html | 39 -- .../main/resources/vpp/views/new-vpp-dialog.html | 69 --- .../src/main/resources/vpp/views/root.tpl.html | 1 - .../src/main/resources/vpp/views/vpp-topo.html | 18 - .../module/src/main/resources/vpp/vpp.module.js | 114 ----- vbd/gui/pom.xml | 29 -- vbd/impl/pom.xml | 103 ---- .../io/fd/honeycomb/vbd/impl/BridgeDomain.java | 399 --------------- .../io/fd/honeycomb/vbd/impl/TopologyMonitor.java | 189 ------- .../java/io/fd/honeycomb/vbd/impl/VbdUtil.java | 44 -- .../vbd/impl/VirtualBridgeDomainManager.java | 66 --- .../java/io/fd/honeycomb/vbd/impl/VppModifier.java | 255 ---------- .../xml/ns/yang/vbd/impl/rev160202/VbdModule.java | 32 -- .../yang/vbd/impl/rev160202/VbdModuleFactory.java | 13 - .../ns/yang/vbd/impl/rev160202/VbdProvider.java | 22 - vbd/impl/src/main/resources/config/vbd.xml | 37 -- vbd/impl/src/main/yang/vbd-impl.yang | 35 -- vbd/impl/vbridge-workflow.txt | 104 ---- vbd/karaf/pom.xml | 74 --- vbd/pom.xml | 65 --- 80 files changed, 5386 deletions(-) delete mode 100644 vbd/api/pom.xml delete mode 100644 vbd/api/src/main/java/io.fd.honeycomb.vbd.api/VxlanTunnelIdAllocator.java delete mode 100644 vbd/api/src/main/yang/odl-external-reference.yang delete mode 100644 vbd/api/src/main/yang/vbridge-topology.yang delete mode 100644 vbd/artifacts/pom.xml delete mode 100644 vbd/features/pom.xml delete mode 100644 vbd/features/src/main/features/features.xml delete mode 100644 vbd/gui/bundle/pom.xml delete mode 100644 vbd/gui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 vbd/gui/module/pom.xml delete mode 100644 vbd/gui/module/src/main/resources/vpp/.gitignore delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/css/next.css delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/css/vpp.css delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/data/locale-en_US.json delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansExtraLight.otf delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansRegular.otf delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.eot delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.svg delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.ttf delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.woff delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.eot delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.svg delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.ttf delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.woff delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.eot delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.svg delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.ttf delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.woff delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/images/bd1.svg delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/images/bd2.svg delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/images/interf.svg delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/images/vpp.gif delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/js/lodash.min.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/assets/js/next.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/bower.json delete mode 100644 vbd/gui/module/src/main/resources/vpp/controllers/bdm.bridgedomain.controller.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/controllers/bdm.interface.controller.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/controllers/bdm.vpp.controller.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/main.js delete mode 100755 vbd/gui/module/src/main/resources/vpp/node/node delete mode 100644 vbd/gui/module/src/main/resources/vpp/package.json delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/bdm.bridgedomain.service.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/bdm.interface.service.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/bdm.service.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/bdm.tunnel.service.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/inventory.service.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/services/vpp.services.js delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/bridge-domains.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/config-interface-dialog.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/config-vpp-dialog.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/index.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/inventory-detail.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/inventory-table-interfaces-subgrid.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/inventory-table.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/inventory.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/new-bd-dialog.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/new-vpp-dialog.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/root.tpl.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/views/vpp-topo.html delete mode 100644 vbd/gui/module/src/main/resources/vpp/vpp.module.js delete mode 100644 vbd/gui/pom.xml delete mode 100644 vbd/impl/pom.xml delete mode 100644 vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java delete mode 100644 vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/TopologyMonitor.java delete mode 100644 vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VbdUtil.java delete mode 100644 vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VirtualBridgeDomainManager.java delete mode 100644 vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java delete mode 100644 vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModule.java delete mode 100644 vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModuleFactory.java delete mode 100644 vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdProvider.java delete mode 100644 vbd/impl/src/main/resources/config/vbd.xml delete mode 100644 vbd/impl/src/main/yang/vbd-impl.yang delete mode 100644 vbd/impl/vbridge-workflow.txt delete mode 100644 vbd/karaf/pom.xml delete mode 100644 vbd/pom.xml diff --git a/pom.xml b/pom.xml index 90548778f..9b7d1b891 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,6 @@ common v3po - vbd diff --git a/vbd/api/pom.xml b/vbd/api/pom.xml deleted file mode 100644 index d3b448d05..000000000 --- a/vbd/api/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - io.fd.honeycomb.common - api-parent - 1.0.0-SNAPSHOT - ../../common/api-parent - - - io.fd.honeycomb.vbd - 4.0.0 - vbd-api - 1.0.0-SNAPSHOT - bundle - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - 0.8.2-Beryllium-SR2 - pom - import - - - io.fd.honeycomb.v3po - v3po-artifacts - 1.0.0-SNAPSHOT - pom - import - - - - - - - org.opendaylight.mdsal.model - iana-if-type-2014-05-08 - - - - - org.opendaylight.mdsal.model - ietf-inet-types-2013-07-15 - - - org.opendaylight.mdsal.model - ietf-topology - - - - io.fd.honeycomb.v3po - v3po-api - - - diff --git a/vbd/api/src/main/java/io.fd.honeycomb.vbd.api/VxlanTunnelIdAllocator.java b/vbd/api/src/main/java/io.fd.honeycomb.vbd.api/VxlanTunnelIdAllocator.java deleted file mode 100644 index c458e5754..000000000 --- a/vbd/api/src/main/java/io.fd.honeycomb.vbd.api/VxlanTunnelIdAllocator.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - *

- * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package io.fd.honeycomb.vbd.api; - - -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; -import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; - - -public interface VxlanTunnelIdAllocator { - - /** - * Allocate next available vxlan tunnel ID - * - * @param vpp specify contret vpp for which is next available vxlan id looked for - * @return next available (in order) vxlan id. - */ - Integer nextIdFor(final KeyedInstanceIdentifier vpp); -} diff --git a/vbd/api/src/main/yang/odl-external-reference.yang b/vbd/api/src/main/yang/odl-external-reference.yang deleted file mode 100644 index e82bfe2b7..000000000 --- a/vbd/api/src/main/yang/odl-external-reference.yang +++ /dev/null @@ -1,41 +0,0 @@ -module odl-external-reference { - // vi: set et smarttab sw=4 tabstop=4: - - yang-version 1; - // FIXME: this mode should go to OpenDaylight/mdsal - namespace "urn:opendaylight:params:xml:ns:yang:external:reference"; - prefix "extref"; - - organization "Cisco Systems, Inc."; - - contact "Robert Varga "; - - description - "Model defining the base type for external references for use instead - of an instance-identifier, which does not allow referencing entities - unknown in the model (due to imports, etc.). - - Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v1.0 which accompanies this distribution, - and is available at http://www.eclipse.org/legal/epl-v10.html"; - - revision "2016-01-29" { - description "Initial model"; - } - - typedef external-reference { - description "Reference to a YANG-modeled node which resides outside - of this system. The format must use module names as namespace - prefixes -- in a similar fashion RESTCONF does. The reference - is evaluated from the root of the external system. - - This data type does not hold the coordinates of the external - system, nor does it specify which data store on the external - system should be used to satisfy the reference. This information - should be described in the model which instantiates a leaf of - this type."; - type string; - } -} diff --git a/vbd/api/src/main/yang/vbridge-topology.yang b/vbd/api/src/main/yang/vbridge-topology.yang deleted file mode 100644 index 954982f24..000000000 --- a/vbd/api/src/main/yang/vbridge-topology.yang +++ /dev/null @@ -1,165 +0,0 @@ -module vbridge-topology { - // vi: set et smarttab sw=4 tabstop=4: - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:vbridge:topology"; - prefix "vbridge"; - - organization "Cisco Systems, Inc."; - - contact "Robert Varga "; - - description - "Base model describing a virtual bridge domain mapped expressed - as a network topology. Implementations of this model are expected - to map this topology onto an underlay transport/managent topology, - such as a NETCONF topology talking to forwarding boxes - - Copyright (c) 2015 Cisco and/or its affiliates. - - Licensed under the Apache License, Version 2.0 (the \"License\"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at: - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an \"AS IS\" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License."; - - revision "2016-01-29" { - description "Initial cut"; - } - - import ietf-inet-types { prefix "inet"; } - import network-topology { prefix nt; revision-date 2013-10-21; } - import odl-external-reference { prefix extref; } - import v3po { prefix "v3po"; } - import yang-ext { prefix ext; revision-date "2013-07-09"; } - - identity tunnel-type { - description "Type of tunneling technology"; - } - - typedef tunnel-type-ref { - description "Reference to a tunneling technology"; - type identityref { - base tunnel-type; - } - } - - identity tunnel-type-vxlan { - // FIXME: should be in a vxlan-specific model - description "VXLAN tunneling"; - base tunnel-type; - } - - augment "/nt:network-topology/nt:topology/nt:topology-types" { - ext:augment-identifier "topology-types-vbridge-augment"; - container vbridge-topology { - presence "Indicates a virtual bridge domain topology"; - } - } - - augment "/nt:network-topology/nt:topology" { - ext:augment-identifier "topology-vbridge-augment"; - when "./nt:topology-types/vbridge-topology"; - - // Pointer to the NETCONF topology which supports this bridge domain - // FIXME: must "../../nt:underlay-topology"; - - leaf tunnel-type { - description "Tunnel technology to use for encapsulation"; - type tunnel-type-ref; - } - - choice tunnel-parameters { - container vxlan { - // FIXME: should be in a vxlan-specific model - when "../type = tunnel-type-vxlan"; - leaf vni { - description "VNI to use for encap"; - type v3po:vxlan-vni; - mandatory true; - } - } - } - - uses v3po:bridge-domain-attributes; - } - - augment "/nt:network-topology/nt:topology/nt:node" { - ext:augment-identifier "node-vbridge-augment"; - when "../nt:topology-types/vbridge-topology"; - - - container bridge-member { - presence "Indicates this node is part of the bridge domain"; - - // Pointer to the NETCONF node which supports this bridge member - must "../../nt:supporting-node"; - - // FIXME: this is implementation specific, depends on whether - // the underlay has an a concept of a bridge domain. - leaf supporting-bridge-domain { - description - "Reference to the network element bridge domain, which has - been configured to support this virtual bridge domain on - this bridge member. - - This reference needs to be resolved against the supporting - node's configuration data store."; - config false; - type extref:external-reference; - } - } - } - - augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" { - ext:augment-identifier "termination-point-vbridge-augment"; - when "../bridge-member"; - - choice interface-type { - leaf user-interface { - description - "Reference to the network element interface, which is - configured to be a member of this virtual bridge domain. - - This reference needs to be resolved against the supporting - node's configuration data store."; - type extref:external-reference; - mandatory true; - } - leaf tunnel-interface { - description - "Reference to the network element interface, which is - configured to on the member to support exchange of packet - passing through this virtual bridge domain towards other - domain members. - - This reference needs to be resolved against the supporting - node's configuration data store."; - config false; - type extref:external-reference; - mandatory true; - } - } - } - - augment "/nt:network-topology/nt:topology/nt:link" { - when "../nt:topology-types/vbridge-topology"; - ext:augment-identifier "link-vbridge-augment"; - leaf tunnel { - description - "Reference to the network element tunnel interface supporting - cross-connect between two bridge members. - - This reference needs to be resolved against the supporting - node's operational data store."; - config false; - type extref:external-reference; - } - } -} diff --git a/vbd/artifacts/pom.xml b/vbd/artifacts/pom.xml deleted file mode 100644 index be55469c7..000000000 --- a/vbd/artifacts/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - 4.0.0 - io.fd.honeycomb.vbd - vbd-artifacts - 1.0.0-SNAPSHOT - pom - - - - - ${project.groupId} - vbd-api - 1.0.0-SNAPSHOT - - - ${project.groupId} - vbd-impl - 1.0.0-SNAPSHOT - - - ${project.groupId} - vbd-impl - xml - config - 1.0.0-SNAPSHOT - - - ${project.groupId} - vbd-ui-bundle - 1.0.0-SNAPSHOT - - - ${project.groupId} - vbd-ui-module - 1.0.0-SNAPSHOT - - - ${project.groupId} - vbd-features - 1.0.0-SNAPSHOT - features - xml - - - - diff --git a/vbd/features/pom.xml b/vbd/features/pom.xml deleted file mode 100644 index 25ff4aebf..000000000 --- a/vbd/features/pom.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - io.fd.honeycomb.common - features-parent - 1.0.0-SNAPSHOT - ../../common/features-parent - - - io.fd.honeycomb.vbd - vbd-features - 1.0.0-SNAPSHOT - ${project.artifactId} - 4.0.0 - - - 3.1.1 - - - 2.0.2-Beryllium-SR2 - 0.8.2-Beryllium-SR2 - 1.3.2-Beryllium-SR2 - 1.3.2-Beryllium-SR2 - 1.0.2-Beryllium-SR2 - 0.8.2-Beryllium-SR2 - 0.3.2-Beryllium-SR2 - 1.0.0-SNAPSHOT - etc/opendaylight/karaf - - - - - - org.opendaylight.mdsal - mdsal-artifacts - 2.0.2-Beryllium-SR2 - pom - import - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - 0.8.2-Beryllium-SR2 - pom - import - - - org.opendaylight.yangtools - yangtools-artifacts - 0.8.2-Beryllium-SR2 - pom - import - - - - io.fd.honeycomb.v3po - v3po-artifacts - 1.0.0-SNAPSHOT - pom - import - - - - io.fd.honeycomb.vbd - vbd-artifacts - 1.0.0-SNAPSHOT - pom - import - - - - - - - org.opendaylight.yangtools - features-yangtools - features - xml - runtime - - - org.opendaylight.mdsal - features-mdsal - features - xml - runtime - - - org.opendaylight.mdsal.model - features-mdsal-model - features - xml - runtime - - - - io.fd.honeycomb.v3po - v3po-features - features - xml - runtime - - - - ${project.groupId} - vbd-impl - - - - ${project.groupId} - vbd-impl - xml - config - - - - ${project.groupId} - vbd-api - - - - ${project.groupId} - vbd-ui-bundle - - - diff --git a/vbd/features/src/main/features/features.xml b/vbd/features/src/main/features/features.xml deleted file mode 100644 index bf09b6243..000000000 --- a/vbd/features/src/main/features/features.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features - mvn:org.opendaylight.mdsal/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features - mvn:io.fd.honeycomb.v3po/v3po-features/{{VERSION}}/xml/features - mvn:org.opendaylight.netconf/features-netconf-connector/{{VERSION}}/xml/features - - - odl-mdsal-models - odl-v3po-api - mvn:io.fd.honeycomb.vbd/vbd-api/{{VERSION}} - - - - odl-mdsal-binding - odl-vbd-api - odl-netconf-connector-ssh - odl-netconf-mdsal - odl-netconf-topology - mvn:io.fd.honeycomb.vbd/vbd-impl/{{VERSION}} - mvn:io.fd.honeycomb.vbd/vbd-impl/{{VERSION}}/xml/config - - - - odl-vbd - odl-restconf - - - - odl-vbd-rest - odl-mdsal-apidocs - odl-mdsal-xsql - odl-dlux-yangui - mvn:io.fd.honeycomb.vbd/vbd-ui-bundle/{{VERSION}} - - - diff --git a/vbd/gui/bundle/pom.xml b/vbd/gui/bundle/pom.xml deleted file mode 100644 index 3fc8301d8..000000000 --- a/vbd/gui/bundle/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - 4.0.0 - - io.fd.honeycomb.common - api-parent - 1.0.0-SNAPSHOT - ../../../common/api-parent - - - io.fd.honeycomb.vbd - vbd-ui-bundle - vbd-ui-bundle - 1.0.0-SNAPSHOT - bundle - - - - org.osgi - org.osgi.compendium - - - org.apache.felix - org.osgi.compendium - 1.4.0 - - - org.slf4j - jcl-over-slf4j - - - org.opendaylight.dlux - loader - 0.3.2-Beryllium-SR2 - - - io.fd.honeycomb.vbd - vbd-ui-module - 1.0.0-SNAPSHOT - - - - - - - target/generated-resources - - - src/main/resources - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - unpack-loader-resources - - unpack-dependencies - - generate-resources - - ${project.build.directory}/generated-resources - org.openvpp.vbd - vbd-ui-module - META-INF\/** - true - false - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.osgi.service.http, - org.osgi.framework;version="1.0.0", - org.opendaylight.dlux.loader, - org.slf4j - - - - - - - - diff --git a/vbd/gui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/vbd/gui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 265cd7538..000000000 --- a/vbd/gui/bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - src/app/vpp/assets/css/next.css - src/app/vpp/bower_components/angular-material/angular-material.min.css - src/app/vpp/assets/css/vpp.css - - - - diff --git a/vbd/gui/module/pom.xml b/vbd/gui/module/pom.xml deleted file mode 100644 index cdade2893..000000000 --- a/vbd/gui/module/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - io.fd.honeycomb.common - api-parent - 1.0.0-SNAPSHOT - ../../../common/api-parent - - - io.fd.honeycomb.vbd - vbd-ui-module - 1.0.0-SNAPSHOT - ${project.artifactId} - VPP UI Module Resources - jar - - - - - com.github.eirslett - frontend-maven-plugin - 0.0.27 - - v0.12.9 - 3.1.3 - src/main/resources/vpp/ - - - - npm - - install-node-and-npm - npm - - generate-resources - - - bower - - bower - - - - - - - - diff --git a/vbd/gui/module/src/main/resources/vpp/.gitignore b/vbd/gui/module/src/main/resources/vpp/.gitignore deleted file mode 100644 index 4a688ff05..000000000 --- a/vbd/gui/module/src/main/resources/vpp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -bower_components/ \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/css/next.css b/vbd/gui/module/src/main/resources/vpp/assets/css/next.css deleted file mode 100644 index 584bb5a3e..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/css/next.css +++ /dev/null @@ -1,93 +0,0 @@ -/*Copyright (c) 2015 Cisco and/or its affiliates. - -The NeXt SDK is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives (CC BY-NC-ND) 4.0 International License . A copy of the license can be found in the license.txt file accompanying this distribution and at http://creativecommons.org/licenses/by-nc-nd/4.0/ - -The code, technical concepts, all information contained herein, and related documentation are the property of and are vested in Cisco Technology, Inc. and/or its affiliated entities, under various laws including copyright, international treaties, patent, trade secret and/or contract. All use of the material herein must be in strict accordance with the terms of the license noted above. Any rights not expressly licensed are reserved.*/ -/*Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. - -Section 1 – Definitions. - -Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -Licensor means the individual(s) or entity(ies) granting rights under this Public License. -NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. -Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. -Section 2 – Scope. - -License grant. -Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: -reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and -produce and reproduce, but not Share, Adapted Material for NonCommercial purposes only. -Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. -Term. The term of this Public License is specified in Section 6(a). -Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. -Downstream recipients. -Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). -Other rights. - -Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -Patent and trademark rights are not licensed under this Public License. -To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following conditions. - -Attribution. - -If You Share the Licensed Material, You must: - -retain the following if it is supplied by the Licensor with the Licensed Material: -identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); -a copyright notice; -a notice that refers to this Public License; -a notice that refers to the disclaimer of warranties; -a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material. -You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: - -for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only and provided You do not Share Adapted Material; -if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and -You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. -For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. -Section 5 – Disclaimer of Warranties and Limitation of Liability. - -Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. -Section 6 – Term and Termination. - -This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: - -automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or -upon express reinstatement by the Licensor. -For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. -For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. -Sections 1, 5, 6, 7, and 8 survive termination of this Public License. -Section 7 – Other Terms and Conditions. - -The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. -Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. -Section 8 – Interpretation. - -For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. -To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. -No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. -Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.*/ -@font-face{font-family:next-font;src:url(../fonts/next-font.eot?-9scffx);src:url(../fonts/next-font.eot?#iefix-9scffx) format('embedded-opentype'),url(../fonts/next-font.woff?-9scffx) format('woff'),url(../fonts/next-font.ttf?-9scffx) format('truetype'),url(../fonts/next-font.svg?-9scffx#next-font) format('svg');font-weight:400;font-style:normal}[class*=" n-icon-"],[class^=n-icon-]{font-family:next-font;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-icon-hostgroupbg:before{content:"\e64c"}.n-icon-hostgroup:before{content:"\e64d"}.n-icon-wirelesshost:before{content:"\e64e"}.n-icon-wirelesshostwithborder-30:before{content:"\e64f"}.n-icon-firewallwithboder:before{content:"\e649"}.n-icon-unknowndevicewithborder:before{content:"\e64a"}.n-icon-unlinkwithborder:before{content:"\e64b"}.n-icon-unlinked:before{content:"\e646"}.n-icon-firewall:before{content:"\e647"}.n-icon-firewallbg:before{content:"\e648"}.n-icon-accesspointwithborder:before{content:"\e637"}.n-icon-camerawithborder:before{content:"\e638"}.n-icon-cloudwithborder:before{content:"\e639"}.n-icon-grouplwithborder:before{content:"\e63a"}.n-icon-groupmwithborder:before{content:"\e63b"}.n-icon-groupswithborder:before{content:"\e63c"}.n-icon-hostwithborder:before{content:"\e63d"}.n-icon-ipphonewithborder:before{content:"\e63e"}.n-icon-nexus5000withborder:before{content:"\e63f"}.n-icon-phonewithborder:before{content:"\e640"}.n-icon-routerwithborder:before{content:"\e641"}.n-icon-serverwithborder:before{content:"\e642"}.n-icon-switchwithborder:before{content:"\e643"}.n-icon-unknowndeviceswithborder:before{content:"\e644"}.n-icon-wlcwithborder:before{content:"\e645"}.n-icon-co-worker:before{content:"\e634"}.n-icon-layer:before{content:"\e635"}.n-icon-layout:before{content:"\e636"}.n-icon-cloud:before{content:"\e633"}.n-icon-de-aggregation:before{content:"\e632"}.n-icon-expand:before{content:"\e62d"}.n-icon-collapse:before{content:"\e62e"}.n-icon-groupsbg:before{content:"\e62f"}.n-icon-groupmbg:before{content:"\e630"}.n-icon-grouplbg:before{content:"\e631"}.n-icon-fullscreen:before{content:"\e62c"}.n-icon-movemode:before{content:"\e62b"}.n-icon-RCV:before{content:"\e62a"}.n-icon-PGN:before{content:"\e60b"}.n-icon-co-edit:before{content:"\e60c"}.n-icon-wlc:before{content:"\e60f"}.n-icon-wlcbg:before{content:"\e610"}.n-icon-unknownbg:before{content:"\e611"}.n-icon-unknown:before{content:"\e612"}.n-icon-switch:before{content:"\e618"}.n-icon-switchbg:before{content:"\e619"}.n-icon-serverbg:before{content:"\e61a"}.n-icon-server:before{content:"\e61b"}.n-icon-router:before{content:"\e61c"}.n-icon-routerbg:before{content:"\e61d"}.n-icon-phone:before{content:"\e61e"}.n-icon-phonebg:before{content:"\e61f"}.n-icon-nexus5000:before{content:"\e620"}.n-icon-nexus5000bg:before{content:"\e621"}.n-icon-ipphone:before{content:"\e622"}.n-icon-ipphonebg:before{content:"\e623"}.n-icon-host:before{content:"\e624"}.n-icon-hostbg:before{content:"\e625"}.n-icon-camera:before{content:"\e626"}.n-icon-camerabg:before{content:"\e627"}.n-icon-accesspoint:before{content:"\e628"}.n-icon-accesspointbg:before{content:"\e629"}.n-icon-groups:before{content:"\e615"}.n-icon-groupm2:before{content:"\e616"}.n-icon-groupl:before{content:"\e617"}.n-icon-zoomout-minus:before{content:"\e613"}.n-icon-zoomin-plus:before{content:"\e614"}.n-icon-zoomout:before{content:"\e606"}.n-icon-zoomin:before{content:"\e607"}.n-icon-zoombyselection:before{content:"\e608"}.n-icon-viewsetting:before{content:"\e609"}.n-icon-selectnode:before{content:"\e60a"}.n-icon-fitstage:before{content:"\e60d"}.n-icon-aggregation:before{content:"\e60e"}.n-icon-interface:before{content:"\e600"}.n-icon-router2:before{content:"\e601"}.n-icon-openflow:before{content:"\e602"}.n-icon-BMP:before{content:"\e603"}.n-icon-BGP:before{content:"\e604"}.n-icon-acl:before{content:"\e605"}.n-topology.n-topology-blue{position:relative;overflow:hidden;background:#fff;-webkit-transition:background .6s;transition:background .6s;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-blue:focus{outline:0 none}.n-topology.n-topology-blue .n-topology-fit{-webkit-transition:all .6s linear!important;transition:all .6s linear!important}.n-topology.n-topology-blue .n-topology-fit .link,.n-topology.n-topology-blue .n-topology-fit .linkSet,.n-topology.n-topology-blue .n-topology-fit .node,.n-topology.n-topology-blue .n-topology-fit .nodeSet{-webkit-transition:all .9s linear!important;transition:all .9s linear!important}.n-topology.n-topology-blue.n-topology-loading .n-topology-nav,.n-topology.n-topology-blue.n-topology-loading svg{-webkit-filter:blur(5px);-moz-filter:blur(5px)}.n-topology.n-topology-blue svg{box-sizing:content-box;position:absolute;top:0;left:0;right:0;bottom:0}.n-topology.n-topology-blue text:empty{display:none}.n-topology.n-topology-blue g{pointer-events:all}.n-topology.n-topology-blue defs .bg{fill:#0386d2}.n-topology.n-topology-blue defs .stroke{stroke:#0386d2}.n-topology.n-topology-blue defs [fill*='#FFFFFF']{fill:#fff}.n-topology.n-topology-blue .n-svg{border:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-blue .fontIcon{font-family:next-font;fill:#0386d2;alignment-baseline:central;text-anchor:middle;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-blue text{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-blue .n-topology-icon .fontIcon{cursor:pointer}.n-topology.n-topology-blue .iconBG{fill:#fff}.n-topology.n-topology-blue .iconBGActive{fill:#0386d2}.n-topology.n-topology-blue .node:not(.node-selected) .selectedBG{display:none}.n-topology.n-topology-blue .node .selectedBG{fill:transparent;opacity:.8;stroke:#f2ad4e;stroke-width:3;pointer-events:none}.n-topology.n-topology-blue .node .dot{fill:#0386d2}.n-topology.n-topology-blue .node text.node-label{font-family:"Cisco Sans Reg";fill:#0386d2;pointer-events:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:11px}.n-topology.n-topology-blue .node.disable .node-label{fill:#ccc!important}.n-topology.n-topology-blue .node.disable .iconBG.iconBGActive,.n-topology.n-topology-blue .node.disable .showIcon .iconShape{fill:#ccc}.n-topology.n-topology-blue .link line,.n-topology.n-topology-blue .link path{stroke:#5bc1df;stroke-width:1px;fill:none;cursor:pointer}.n-topology.n-topology-blue .link line.link:hover,.n-topology.n-topology-blue .link path.link:hover{stroke:#26a1c5}.n-topology.n-topology-blue .link line.link_bg:hover~line{stroke:#26a1c5!important}.n-topology.n-topology-blue .link .link-label{font-family:"Cisco Sans Reg";fill:#0386d2;font-size:12px}.n-topology.n-topology-blue .link .source-abel,.n-topology.n-topology-blue .link .target-label{font-family:"Cisco Sans Reg";fill:#0386d2;opacity:.8;font-size:12px}.n-topology.n-topology-blue .link .disable-label{fill:#fff}.n-topology.n-topology-blue .link .disable-bg{fill:#ccc}.n-topology.n-topology-blue .link .link_bg{stroke:transparent}.n-topology.n-topology-blue .link.disable line,.n-topology.n-topology-blue .link.disable path{stroke:#ccc!important;stroke-width:1px}.n-topology.n-topology-blue .link.disable .link_bg{stroke:transparent!important}.n-topology.n-topology-blue .link.link-selected line,.n-topology.n-topology-blue .link.link-selected path{stroke:#ccc;stroke-width:2px}.n-topology.n-topology-blue .nodeset .selectedBG{fill:transparent;opacity:.8;stroke:#f2ad4e;stroke-width:3;pointer-events:none}.n-topology.n-topology-blue .nodeset .dot{fill:#fff;stroke:#0386d2;stroke-width:1}.n-topology.n-topology-blue .nodeset .icon{cursor:pointer}.n-topology.n-topology-blue .nodeset .bg{fill:#0386d2;pointer-events:none}.n-topology.n-topology-blue .nodeset text.node-label{font-family:"Cisco Sans Reg";fill:#0386d2;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.n-topology.n-topology-blue .nodeset.disable{opacity:.3;stroke:#ccc}.n-topology.n-topology-blue .nodeset .iconBG,.n-topology.n-topology-blue .nodeset .iconBGActive{fill:#fff}.n-topology.n-topology-blue .nodeset .iconBGActive~.iconShape{display:block!important}.n-topology.n-topology-blue .nodeset .indicator .iconBG{fill:#fff}.n-topology.n-topology-blue .nodeset .indicator .iconBG:hover{fill:#0386d2}.n-topology.n-topology-blue .nodeset .indicator .iconShape{fill:#0266a0}.n-topology.n-topology-blue .group .bg{opacity:.6;stroke-width:10px;stroke-linejoin:round}.n-topology.n-topology-blue .group .groupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";text-anchor:middle;alignment-baseline:inherit}.n-topology.n-topology-blue .group .fontIcon.iconShape{fill:#9BB150}.n-topology.n-topology-blue .group .nodeSetGroupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";alignment-baseline:inherit;fill:#9BB150}.n-topology.n-topology-blue .group .groupLabel:hover~.bg{opacity:.7}.n-topology.n-topology-blue .group.aggregationGroup .bg{stroke-width:10px;stroke-linejoin:round;fill:#9BB150;stroke:#9BB150;pointer-events:none;opacity:0;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.n-topology.n-topology-blue .group.aggregationGroup.fade-active-item{opacity:1}.n-topology.n-topology-blue .group.aggregationGroup.fade-active-item .bg{opacity:.5}.n-topology.n-topology-blue .link-set-bg{stroke:#5bc1df;stroke-width:2px}.n-topology.n-topology-blue .link-set-circle{fill:#0386d2;stroke:#0386d2;stroke-width:16px;stroke-linejoin:round}.n-topology.n-topology-blue .link-set-text{font-family:"Cisco Sans Reg";fill:#fff;text-anchor:middle;dominant-baseline:central;font-size:12px;pointer-events:none}.n-topology.n-topology-blue .link-set.disable .link-set-bg{stroke:#ccc}.n-topology.n-topology-blue .link-set.disable .link-set-circle{fill:#ccc;stroke:#ccc}@media screen and (-webkit-min-device-pixel-ratio:0){.n-topology.n-topology-blue .link-set-circle,.n-topology.n-topology-blue ::i-block-chrome{stroke-width:8px!important}}.n-topology.n-topology-blue .mapPath{fill:#d6effe;stroke:#ade0fe;stroke-width:1;opacity:.5;pointer-events:none}.n-topology.n-topology-blue .mapBoundary{fill:none;stroke:#ade0fe;stroke-width:1;pointer-events:none}.n-topology.n-topology-blue .selectionRect{stroke:#0386d2;fill:#0386d2;fill-opacity:.1;pointer-events:none}.n-topology.n-topology-blue-setting{max-width:none!important}.n-topology.n-topology-blue .aggregationGroup .aggregationText{fill:#0386d2;font-size:12px}.n-topology.n-topology-blue .aggregationGroup .aggregationRect{fill:#0386d2;opacity:.2;stroke:#0386d2;stroke-width:3;stroke-linejoin:round;pointer-events:none}.n-topology.n-topology-blue .layer>*{transition:opacity .6s}.n-topology.n-topology-blue .layer.fade-layer>:not(.fade-highlight-item):not(.fade-active-item),.n-topology.n-topology-blue.fade-active-priority.fade-active-occur .layer.fade-layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-blue.fade-active-priority.fade-active-occur.fade-all .layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-blue.fade-all .layer>:not(.fade-highlight-item):not(.fade-active-item){opacity:.2}.n-topology.n-topology-blue .n-topology-nav{position:absolute;top:0;left:8px;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-blue .n-topology-nav li{list-style:none;padding:0}.n-topology.n-topology-blue .n-topology-nav ul{padding:0;margin:0}.n-topology.n-topology-blue .n-topology-nav span{-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-blue .n-topology-nav>ul{padding:0;margin-top:30px;width:32px}.n-topology.n-topology-blue .n-topology-nav>ul>li{display:inline-block;list-style:none;width:25px;margin-top:5px;-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-blue .n-topology-nav-mode{padding:0;position:relative;width:25px}.n-topology.n-topology-blue .n-topology-nav-mode li{width:25px;height:25px;line-height:30px;display:inline-block;text-align:center;cursor:pointer;-webkit-transition:all .6s;transition:all .6s;background:#eaeaea;margin-top:-2px}.n-topology.n-topology-blue .n-topology-nav-mode li:hover span{color:#0386d2}.n-topology.n-topology-blue .n-topology-nav-mode span{color:#999;display:inline-block;font-size:18px}.n-topology.n-topology-blue .n-topology-nav-mode-selected{background:#0386d2!important}.n-topology.n-topology-blue .n-topology-nav-mode-selected span{color:#fff}.n-topology.n-topology-blue .n-topology-nav-mode-selected:hover{background:#0386d2!important}.n-topology.n-topology-blue .n-topology-nav-mode-selected:hover span{color:#fff!important}.n-topology.n-topology-blue .n-topology-nav-zoom{position:relative;height:51px;margin-top:10px!important}.n-topology.n-topology-blue .n-topology-nav-zoom>span{display:inline-block;position:absolute;text-align:center;font-size:25px;color:#999;background:#eaeaea}.n-topology.n-topology-blue .n-topology-nav-zoom-in{top:0;left:0;cursor:pointer}.n-topology.n-topology-blue .n-topology-nav-zoom-in:hover{color:gray;background:#d8d8d8}.n-topology.n-topology-blue .n-topology-nav-zoom-out{top:25px;left:0;cursor:pointer}.n-topology.n-topology-blue .n-topology-nav-zoom-out:hover{color:gray;background:#d8d8d8}.n-topology.n-topology-blue .n-topology-nav-zoom-selection{cursor:pointer;text-align:center;font-size:22px;color:#999}.n-topology.n-topology-blue .n-topology-nav-zoom-selection:hover{color:#4d4d4d}.n-topology.n-topology-blue .n-topology-nav-zoom-selection-selected{color:#3fb7fc}.n-topology.n-topology-blue .n-topology-nav-fit{cursor:pointer;text-align:center;font-size:22px;color:#999}.n-topology.n-topology-blue .n-topology-nav-fit:hover{color:#4d4d4d}.n-topology.n-topology-blue .n-topology-nav-agr{cursor:pointer;line-height:24px;text-align:center;font-size:20px;height:24px;color:#999;display:none}.n-topology.n-topology-blue .n-topology-nav-agr:hover{color:#4d4d4d}@-webkit-keyframes agr-icon-ani{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}.n-topology.n-topology-blue .n-topology-nav .agr-icon{-webkit-animation-duration:3s;-webkit-animation-name:agr-icon-ani;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-webkit-animation-timing-function:linear;-webkit-transition:0 none;color:#0396eb}.n-topology.n-topology-blue .n-topology-nav .agr-text{font-size:10px;color:#eaeaea;position:absolute;left:10px;margin-top:-1px;height:12px}.n-topology.n-topology-blue .n-topology-nav-full{cursor:pointer;text-align:center;font-size:18px;color:#999}.n-topology.n-topology-blue .n-topology-nav-full:hover{color:#4d4d4d}.n-topology.n-topology-blue .n-topology-nav-setting{cursor:pointer;text-align:center;color:#999;line-height:1;-webkit-transition:none 0!important;transition:none 0!important}.n-topology.n-topology-blue .n-topology-nav-setting:hover{opacity:1;color:#0396eb}.n-topology.n-topology-blue .n-topology-nav-setting-icon{font-size:20px}.n-topology.n-topology-blue .n-topology-nav-setting-icon-selected{color:#0396eb}.n-topology.n-topology-blue .n-topology-loading{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;display:none}.n-topology.n-topology-blue .n-topology-loading ul{position:absolute;left:calc(49.3%);top:calc(45.8%);display:inline-block;text-indent:2.8em}.n-topology.n-topology-blue .n-topology-loading ul li:after,.n-topology.n-topology-blue .n-topology-loading ul:after{width:1.4em;height:1.4em;border-radius:100%;content:"";display:block}.n-topology.n-topology-blue .n-topology-loading ul:after{position:absolute;top:2.8em}.n-topology.n-topology-blue .n-topology-loading li{position:absolute;padding-bottom:5.6em;top:0;left:0;list-style:none}.n-topology.n-topology-blue .n-topology-loading li:after{background:#0386d2}.n-topology.n-topology-blue .n-topology-loading li:nth-child(1){-webkit-transform:rotate(0deg);-webkit-animation-delay:.125s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(1):after{-webkit-animation-delay:.125s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(2){-webkit-transform:rotate(36deg);-webkit-animation-delay:.25s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(2):after{-webkit-animation-delay:.25s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(3){-webkit-transform:rotate(72deg);-webkit-animation-delay:.375s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(3):after{-webkit-animation-delay:.375s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(4){-webkit-transform:rotate(108deg);-webkit-animation-delay:.5s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(4):after{-webkit-animation-delay:.5s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(5){-webkit-transform:rotate(144deg);-webkit-animation-delay:.625s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(5):after{-webkit-animation-delay:.625s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(6){-webkit-transform:rotate(180deg);-webkit-animation-delay:.75s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(6):after{-webkit-animation-delay:.75s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(7){-webkit-transform:rotate(216deg);-webkit-animation-delay:.875s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(7):after{-webkit-animation-delay:.875s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(8){-webkit-transform:rotate(252deg);-webkit-animation-delay:1s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(8):after{-webkit-animation-delay:1s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(9){-webkit-transform:rotate(288deg);-webkit-animation-delay:1.125s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(9):after{-webkit-animation-delay:1.125s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(10){-webkit-transform:rotate(324deg);-webkit-animation-delay:1.25s}.n-topology.n-topology-blue .n-topology-loading li:nth-child(10):after{-webkit-animation-delay:1.25s}.n-topology.n-topology-blue .n-topology-loading li{-webkit-animation:dotAnimation 2.5s infinite}@-webkit-keyframes dotAnimation{0%,100%,55%{padding:0 0 5.6em}5%,50%{padding:2.8em 0}}.n-topology.n-topology-blue .n-topology-loading li:after{-webkit-animation:dotAnimationTwo 2.5s infinite}@-webkit-keyframes dotAnimationTwo{0%,100%,55%{opacity:1;-webkit-transform:scale(1)}5%,50%{opacity:.5;-webkit-transform:scale(0.5)}}.n-topology.n-topology-dark{position:relative;overflow:hidden;background:#000;-webkit-transition:background .6s;transition:background .6s;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-dark:focus{outline:0 none}.n-topology.n-topology-dark .n-topology-fit{-webkit-transition:all .6s linear!important;transition:all .6s linear!important}.n-topology.n-topology-dark .n-topology-fit .link,.n-topology.n-topology-dark .n-topology-fit .linkSet,.n-topology.n-topology-dark .n-topology-fit .node,.n-topology.n-topology-dark .n-topology-fit .nodeSet{-webkit-transition:all .9s linear!important;transition:all .9s linear!important}.n-topology.n-topology-dark.n-topology-loading .n-topology-nav,.n-topology.n-topology-dark.n-topology-loading svg{-webkit-filter:blur(5px);-moz-filter:blur(5px)}.n-topology.n-topology-dark svg{box-sizing:content-box;position:absolute;top:0;left:0;right:0;bottom:0}.n-topology.n-topology-dark text:empty{display:none}.n-topology.n-topology-dark g{pointer-events:all}.n-topology.n-topology-dark defs .bg{fill:#00a9ff}.n-topology.n-topology-dark defs .stroke{stroke:#00a9ff}.n-topology.n-topology-dark defs [fill*='#FFFFFF']{fill:#000}.n-topology.n-topology-dark .n-svg{border:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-dark .fontIcon{font-family:next-font;fill:#00a9ff;alignment-baseline:central;text-anchor:middle;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-dark text{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-dark .n-topology-icon .fontIcon{cursor:pointer}.n-topology.n-topology-dark .iconBG{fill:#000}.n-topology.n-topology-dark .iconBGActive{fill:#00a9ff}.n-topology.n-topology-dark .node:not(.node-selected) .selectedBG{display:none}.n-topology.n-topology-dark .node .selectedBG{fill:transparent;opacity:.8;stroke:#f7931e;stroke-width:3;pointer-events:none}.n-topology.n-topology-dark .node .dot{fill:#00a9ff}.n-topology.n-topology-dark .node text.node-label{font-family:"Cisco Sans Reg";fill:#00a9ff;pointer-events:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:11px}.n-topology.n-topology-dark .node.disable .node-label{fill:#ccc!important}.n-topology.n-topology-dark .node.disable .iconBG.iconBGActive,.n-topology.n-topology-dark .node.disable .showIcon .iconShape{fill:#ccc}.n-topology.n-topology-dark .link line,.n-topology.n-topology-dark .link path{stroke:#09cadd;stroke-width:1px;fill:none;cursor:pointer}.n-topology.n-topology-dark .link line.link:hover,.n-topology.n-topology-dark .link path.link:hover{stroke:#068591}.n-topology.n-topology-dark .link line.link_bg:hover~line{stroke:#068591!important}.n-topology.n-topology-dark .link .link-label{font-family:"Cisco Sans Reg";fill:#00a9ff;font-size:12px}.n-topology.n-topology-dark .link .source-abel,.n-topology.n-topology-dark .link .target-label{font-family:"Cisco Sans Reg";fill:#00a9ff;opacity:.8;font-size:12px}.n-topology.n-topology-dark .link .disable-label{fill:#fff}.n-topology.n-topology-dark .link .disable-bg{fill:#ccc}.n-topology.n-topology-dark .link .link_bg{stroke:transparent}.n-topology.n-topology-dark .link.disable line,.n-topology.n-topology-dark .link.disable path{stroke:#ccc!important;stroke-width:1px}.n-topology.n-topology-dark .link.disable .link_bg{stroke:transparent!important}.n-topology.n-topology-dark .link.link-selected line,.n-topology.n-topology-dark .link.link-selected path{stroke:#ccc;stroke-width:2px}.n-topology.n-topology-dark .nodeset .selectedBG{fill:transparent;opacity:.8;stroke:#f7931e;stroke-width:3;pointer-events:none}.n-topology.n-topology-dark .nodeset .dot{fill:#000;stroke:#00a9ff;stroke-width:1}.n-topology.n-topology-dark .nodeset .icon{cursor:pointer}.n-topology.n-topology-dark .nodeset .bg{fill:#00a9ff;pointer-events:none}.n-topology.n-topology-dark .nodeset text.node-label{font-family:"Cisco Sans Reg";fill:#00a9ff;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.n-topology.n-topology-dark .nodeset.disable{opacity:.3;stroke:#ccc}.n-topology.n-topology-dark .nodeset .iconBG,.n-topology.n-topology-dark .nodeset .iconBGActive{fill:#000}.n-topology.n-topology-dark .nodeset .iconBGActive~.iconShape{display:block!important}.n-topology.n-topology-dark .nodeset .indicator .iconBG{fill:#000}.n-topology.n-topology-dark .nodeset .indicator .iconBG:hover{fill:#00a9ff}.n-topology.n-topology-dark .nodeset .indicator .iconShape{fill:#0087cc}.n-topology.n-topology-dark .group .bg{opacity:.6;stroke-width:10px;stroke-linejoin:round}.n-topology.n-topology-dark .group .groupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";text-anchor:middle;alignment-baseline:inherit}.n-topology.n-topology-dark .group .fontIcon.iconShape{fill:#9BB150}.n-topology.n-topology-dark .group .nodeSetGroupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";alignment-baseline:inherit;fill:#9BB150}.n-topology.n-topology-dark .group .groupLabel:hover~.bg{opacity:.7}.n-topology.n-topology-dark .group.aggregationGroup .bg{stroke-width:10px;stroke-linejoin:round;fill:#9BB150;stroke:#9BB150;pointer-events:none;opacity:0;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.n-topology.n-topology-dark .group.aggregationGroup.fade-active-item{opacity:1}.n-topology.n-topology-dark .group.aggregationGroup.fade-active-item .bg{opacity:.5}.n-topology.n-topology-dark .link-set-bg{stroke:#09cadd;stroke-width:2px}.n-topology.n-topology-dark .link-set-circle{fill:#00a9ff;stroke:#00a9ff;stroke-width:16px;stroke-linejoin:round}.n-topology.n-topology-dark .link-set-text{font-family:"Cisco Sans Reg";fill:#000;text-anchor:middle;dominant-baseline:central;font-size:12px;pointer-events:none}.n-topology.n-topology-dark .link-set.disable .link-set-bg{stroke:#ccc}.n-topology.n-topology-dark .link-set.disable .link-set-circle{fill:#ccc;stroke:#ccc}@media screen and (-webkit-min-device-pixel-ratio:0){.n-topology.n-topology-dark .link-set-circle,.n-topology.n-topology-dark ::i-block-chrome{stroke-width:8px!important}}.n-topology.n-topology-dark .mapPath{fill:#fff;stroke:#d6f1ff;stroke-width:1;opacity:.5;pointer-events:none}.n-topology.n-topology-dark .mapBoundary{fill:none;stroke:#d6f1ff;stroke-width:1;pointer-events:none}.n-topology.n-topology-dark .selectionRect{stroke:#00a9ff;fill:#00a9ff;fill-opacity:.1;pointer-events:none}.n-topology.n-topology-dark-setting{max-width:none!important}.n-topology.n-topology-dark .aggregationGroup .aggregationText{fill:#00a9ff;font-size:12px}.n-topology.n-topology-dark .aggregationGroup .aggregationRect{fill:#00a9ff;opacity:.2;stroke:#00a9ff;stroke-width:3;stroke-linejoin:round;pointer-events:none}.n-topology.n-topology-dark .layer>*{transition:opacity .6s}.n-topology.n-topology-dark .layer.fade-layer>:not(.fade-highlight-item):not(.fade-active-item),.n-topology.n-topology-dark.fade-active-priority.fade-active-occur .layer.fade-layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-dark.fade-active-priority.fade-active-occur.fade-all .layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-dark.fade-all .layer>:not(.fade-highlight-item):not(.fade-active-item){opacity:.2}.n-topology.n-topology-dark .n-topology-nav{position:absolute;top:0;left:8px;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-dark .n-topology-nav li{list-style:none;padding:0}.n-topology.n-topology-dark .n-topology-nav ul{padding:0;margin:0}.n-topology.n-topology-dark .n-topology-nav span{-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-dark .n-topology-nav>ul{padding:0;margin-top:30px;width:32px}.n-topology.n-topology-dark .n-topology-nav>ul>li{display:inline-block;list-style:none;width:25px;margin-top:5px;-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-dark .n-topology-nav-mode{padding:0;position:relative;width:25px}.n-topology.n-topology-dark .n-topology-nav-mode li{width:25px;height:25px;line-height:30px;display:inline-block;text-align:center;cursor:pointer;-webkit-transition:all .6s;transition:all .6s;background:#333;margin-top:-2px}.n-topology.n-topology-dark .n-topology-nav-mode li:hover span{color:#00a9ff}.n-topology.n-topology-dark .n-topology-nav-mode span{color:#666;display:inline-block;font-size:18px}.n-topology.n-topology-dark .n-topology-nav-mode-selected{background:#00a9ff!important}.n-topology.n-topology-dark .n-topology-nav-mode-selected span{color:#000}.n-topology.n-topology-dark .n-topology-nav-mode-selected:hover{background:#00a9ff!important}.n-topology.n-topology-dark .n-topology-nav-mode-selected:hover span{color:#000!important}.n-topology.n-topology-dark .n-topology-nav-zoom{position:relative;height:51px;margin-top:10px!important}.n-topology.n-topology-dark .n-topology-nav-zoom>span{display:inline-block;position:absolute;text-align:center;font-size:25px;color:#666;background:#333}.n-topology.n-topology-dark .n-topology-nav-zoom-in{top:0;left:0;cursor:pointer}.n-topology.n-topology-dark .n-topology-nav-zoom-in:hover{color:#b3b3b3;background:#4d4d4d}.n-topology.n-topology-dark .n-topology-nav-zoom-out{top:25px;left:0;cursor:pointer}.n-topology.n-topology-dark .n-topology-nav-zoom-out:hover{color:#b3b3b3;background:#4d4d4d}.n-topology.n-topology-dark .n-topology-nav-zoom-selection{cursor:pointer;text-align:center;font-size:22px;color:#666}.n-topology.n-topology-dark .n-topology-nav-zoom-selection:hover{color:#b3b3b3}.n-topology.n-topology-dark .n-topology-nav-zoom-selection-selected{color:#66cbff}.n-topology.n-topology-dark .n-topology-nav-fit{cursor:pointer;text-align:center;font-size:22px;color:#666}.n-topology.n-topology-dark .n-topology-nav-fit:hover{color:#b3b3b3}.n-topology.n-topology-dark .n-topology-nav-agr{cursor:pointer;line-height:24px;text-align:center;font-size:20px;height:24px;color:#666;display:none}.n-topology.n-topology-dark .n-topology-nav-agr:hover{color:#b3b3b3}@-webkit-keyframes agr-icon-ani{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}.n-topology.n-topology-dark .n-topology-nav .agr-icon{-webkit-animation-duration:3s;-webkit-animation-name:agr-icon-ani;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-webkit-animation-timing-function:linear;-webkit-transition:0 none;color:#1ab2ff}.n-topology.n-topology-dark .n-topology-nav .agr-text{font-size:10px;color:#333;position:absolute;left:10px;margin-top:-1px;height:12px}.n-topology.n-topology-dark .n-topology-nav-full{cursor:pointer;text-align:center;font-size:18px;color:#666}.n-topology.n-topology-dark .n-topology-nav-full:hover{color:#b3b3b3}.n-topology.n-topology-dark .n-topology-nav-setting{cursor:pointer;text-align:center;color:#666;line-height:1;-webkit-transition:none 0!important;transition:none 0!important}.n-topology.n-topology-dark .n-topology-nav-setting:hover{opacity:1;color:#1ab2ff}.n-topology.n-topology-dark .n-topology-nav-setting-icon{font-size:20px}.n-topology.n-topology-dark .n-topology-nav-setting-icon-selected{color:#1ab2ff}.n-topology.n-topology-dark .n-topology-loading{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;display:none}.n-topology.n-topology-dark .n-topology-loading ul{position:absolute;left:calc(49.3%);top:calc(45.8%);display:inline-block;text-indent:2.8em}.n-topology.n-topology-dark .n-topology-loading ul li:after,.n-topology.n-topology-dark .n-topology-loading ul:after{width:1.4em;height:1.4em;border-radius:100%;content:"";display:block}.n-topology.n-topology-dark .n-topology-loading ul:after{position:absolute;top:2.8em}.n-topology.n-topology-dark .n-topology-loading li{position:absolute;padding-bottom:5.6em;top:0;left:0;list-style:none}.n-topology.n-topology-dark .n-topology-loading li:after{background:#00a9ff}.n-topology.n-topology-dark .n-topology-loading li:nth-child(1){-webkit-transform:rotate(0deg);-webkit-animation-delay:.125s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(1):after{-webkit-animation-delay:.125s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(2){-webkit-transform:rotate(36deg);-webkit-animation-delay:.25s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(2):after{-webkit-animation-delay:.25s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(3){-webkit-transform:rotate(72deg);-webkit-animation-delay:.375s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(3):after{-webkit-animation-delay:.375s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(4){-webkit-transform:rotate(108deg);-webkit-animation-delay:.5s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(4):after{-webkit-animation-delay:.5s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(5){-webkit-transform:rotate(144deg);-webkit-animation-delay:.625s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(5):after{-webkit-animation-delay:.625s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(6){-webkit-transform:rotate(180deg);-webkit-animation-delay:.75s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(6):after{-webkit-animation-delay:.75s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(7){-webkit-transform:rotate(216deg);-webkit-animation-delay:.875s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(7):after{-webkit-animation-delay:.875s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(8){-webkit-transform:rotate(252deg);-webkit-animation-delay:1s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(8):after{-webkit-animation-delay:1s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(9){-webkit-transform:rotate(288deg);-webkit-animation-delay:1.125s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(9):after{-webkit-animation-delay:1.125s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(10){-webkit-transform:rotate(324deg);-webkit-animation-delay:1.25s}.n-topology.n-topology-dark .n-topology-loading li:nth-child(10):after{-webkit-animation-delay:1.25s}.n-topology.n-topology-dark .n-topology-loading li{-webkit-animation:dotAnimation 2.5s infinite}@-webkit-keyframes dotAnimation{0%,100%,55%{padding:0 0 5.6em}5%,50%{padding:2.8em 0}}.n-topology.n-topology-dark .n-topology-loading li:after{-webkit-animation:dotAnimationTwo 2.5s infinite}@-webkit-keyframes dotAnimationTwo{0%,100%,55%{opacity:1;-webkit-transform:scale(1)}5%,50%{opacity:.5;-webkit-transform:scale(0.5)}}.n-topology.n-topology-green{position:relative;overflow:hidden;background:#fff;-webkit-transition:background .6s;transition:background .6s;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-green:focus{outline:0 none}.n-topology.n-topology-green .n-topology-fit{-webkit-transition:all .6s linear!important;transition:all .6s linear!important}.n-topology.n-topology-green .n-topology-fit .link,.n-topology.n-topology-green .n-topology-fit .linkSet,.n-topology.n-topology-green .n-topology-fit .node,.n-topology.n-topology-green .n-topology-fit .nodeSet{-webkit-transition:all .9s linear!important;transition:all .9s linear!important}.n-topology.n-topology-green.n-topology-loading .n-topology-nav,.n-topology.n-topology-green.n-topology-loading svg{-webkit-filter:blur(5px);-moz-filter:blur(5px)}.n-topology.n-topology-green svg{box-sizing:content-box;position:absolute;top:0;left:0;right:0;bottom:0}.n-topology.n-topology-green text:empty{display:none}.n-topology.n-topology-green g{pointer-events:all}.n-topology.n-topology-green defs .bg{fill:#26999e}.n-topology.n-topology-green defs .stroke{stroke:#26999e}.n-topology.n-topology-green defs [fill*='#FFFFFF']{fill:#fff}.n-topology.n-topology-green .n-svg{border:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-green .fontIcon{font-family:next-font;fill:#26999e;alignment-baseline:central;text-anchor:middle;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-green text{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-green .n-topology-icon .fontIcon{cursor:pointer}.n-topology.n-topology-green .iconBG{fill:#fff}.n-topology.n-topology-green .iconBGActive{fill:#26999e}.n-topology.n-topology-green .node:not(.node-selected) .selectedBG{display:none}.n-topology.n-topology-green .node .selectedBG{fill:transparent;opacity:.8;stroke:#f2ad4e;stroke-width:3;pointer-events:none}.n-topology.n-topology-green .node .dot{fill:#26999e}.n-topology.n-topology-green .node text.node-label{font-family:"Cisco Sans Reg";fill:#26999e;pointer-events:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:11px}.n-topology.n-topology-green .node.disable .node-label{fill:#ccc!important}.n-topology.n-topology-green .node.disable .iconBG.iconBGActive,.n-topology.n-topology-green .node.disable .showIcon .iconShape{fill:#ccc}.n-topology.n-topology-green .link line,.n-topology.n-topology-green .link path{stroke:#5edadd;stroke-width:1px;fill:none;cursor:pointer}.n-topology.n-topology-green .link line.link:hover,.n-topology.n-topology-green .link path.link:hover{stroke:#29bfc3}.n-topology.n-topology-green .link line.link_bg:hover~line{stroke:#29bfc3!important}.n-topology.n-topology-green .link .link-label{font-family:"Cisco Sans Reg";fill:#26999e;font-size:12px}.n-topology.n-topology-green .link .source-abel,.n-topology.n-topology-green .link .target-label{font-family:"Cisco Sans Reg";fill:#26999e;opacity:.8;font-size:12px}.n-topology.n-topology-green .link .disable-label{fill:#fff}.n-topology.n-topology-green .link .disable-bg{fill:#ccc}.n-topology.n-topology-green .link .link_bg{stroke:transparent}.n-topology.n-topology-green .link.disable line,.n-topology.n-topology-green .link.disable path{stroke:#ccc!important;stroke-width:1px}.n-topology.n-topology-green .link.disable .link_bg{stroke:transparent!important}.n-topology.n-topology-green .link.link-selected line,.n-topology.n-topology-green .link.link-selected path{stroke:#ccc;stroke-width:2px}.n-topology.n-topology-green .nodeset .selectedBG{fill:transparent;opacity:.8;stroke:#f2ad4e;stroke-width:3;pointer-events:none}.n-topology.n-topology-green .nodeset .dot{fill:#fff;stroke:#26999e;stroke-width:1}.n-topology.n-topology-green .nodeset .icon{cursor:pointer}.n-topology.n-topology-green .nodeset .bg{fill:#26999e;pointer-events:none}.n-topology.n-topology-green .nodeset text.node-label{font-family:"Cisco Sans Reg";fill:#26999e;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.n-topology.n-topology-green .nodeset.disable{opacity:.3;stroke:#ccc}.n-topology.n-topology-green .nodeset .iconBG,.n-topology.n-topology-green .nodeset .iconBGActive{fill:#fff}.n-topology.n-topology-green .nodeset .iconBGActive~.iconShape{display:block!important}.n-topology.n-topology-green .nodeset .indicator .iconBG{fill:#fff}.n-topology.n-topology-green .nodeset .indicator .iconBG:hover{fill:#26999e}.n-topology.n-topology-green .nodeset .indicator .iconShape{fill:#1c7175}.n-topology.n-topology-green .group .bg{opacity:.6;stroke-width:10px;stroke-linejoin:round}.n-topology.n-topology-green .group .groupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";text-anchor:middle;alignment-baseline:inherit}.n-topology.n-topology-green .group .fontIcon.iconShape{fill:#9BB150}.n-topology.n-topology-green .group .nodeSetGroupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";alignment-baseline:inherit;fill:#9BB150}.n-topology.n-topology-green .group .groupLabel:hover~.bg{opacity:.7}.n-topology.n-topology-green .group.aggregationGroup .bg{stroke-width:10px;stroke-linejoin:round;fill:#9BB150;stroke:#9BB150;pointer-events:none;opacity:0;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.n-topology.n-topology-green .group.aggregationGroup.fade-active-item{opacity:1}.n-topology.n-topology-green .group.aggregationGroup.fade-active-item .bg{opacity:.5}.n-topology.n-topology-green .link-set-bg{stroke:#5edadd;stroke-width:2px}.n-topology.n-topology-green .link-set-circle{fill:#26999e;stroke:#26999e;stroke-width:16px;stroke-linejoin:round}.n-topology.n-topology-green .link-set-text{font-family:"Cisco Sans Reg";fill:#fff;text-anchor:middle;dominant-baseline:central;font-size:12px;pointer-events:none}.n-topology.n-topology-green .link-set.disable .link-set-bg{stroke:#ccc}.n-topology.n-topology-green .link-set.disable .link-set-circle{fill:#ccc;stroke:#ccc}@media screen and (-webkit-min-device-pixel-ratio:0){.n-topology.n-topology-green .link-set-circle,.n-topology.n-topology-green ::i-block-chrome{stroke-width:8px!important}}.n-topology.n-topology-green .mapPath{fill:#cff2f4;stroke:#afe9ec;stroke-width:1;opacity:.5;pointer-events:none}.n-topology.n-topology-green .mapBoundary{fill:none;stroke:#afe9ec;stroke-width:1;pointer-events:none}.n-topology.n-topology-green .selectionRect{stroke:#26999e;fill:#26999e;fill-opacity:.1;pointer-events:none}.n-topology.n-topology-green-setting{max-width:none!important}.n-topology.n-topology-green .aggregationGroup .aggregationText{fill:#26999e;font-size:12px}.n-topology.n-topology-green .aggregationGroup .aggregationRect{fill:#26999e;opacity:.2;stroke:#26999e;stroke-width:3;stroke-linejoin:round;pointer-events:none}.n-topology.n-topology-green .layer>*{transition:opacity .6s}.n-topology.n-topology-green .layer.fade-layer>:not(.fade-highlight-item):not(.fade-active-item),.n-topology.n-topology-green.fade-active-priority.fade-active-occur .layer.fade-layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-green.fade-active-priority.fade-active-occur.fade-all .layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-green.fade-all .layer>:not(.fade-highlight-item):not(.fade-active-item){opacity:.2}.n-topology.n-topology-green .n-topology-nav{position:absolute;top:0;left:8px;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-green .n-topology-nav li{list-style:none;padding:0}.n-topology.n-topology-green .n-topology-nav ul{padding:0;margin:0}.n-topology.n-topology-green .n-topology-nav span{-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-green .n-topology-nav>ul{padding:0;margin-top:30px;width:32px}.n-topology.n-topology-green .n-topology-nav>ul>li{display:inline-block;list-style:none;width:25px;margin-top:5px;-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-green .n-topology-nav-mode{padding:0;position:relative;width:25px}.n-topology.n-topology-green .n-topology-nav-mode li{width:25px;height:25px;line-height:30px;display:inline-block;text-align:center;cursor:pointer;-webkit-transition:all .6s;transition:all .6s;background:#eaeaea;margin-top:-2px}.n-topology.n-topology-green .n-topology-nav-mode li:hover span{color:#26999e}.n-topology.n-topology-green .n-topology-nav-mode span{color:#999;display:inline-block;font-size:18px}.n-topology.n-topology-green .n-topology-nav-mode-selected{background:#26999e!important}.n-topology.n-topology-green .n-topology-nav-mode-selected span{color:#fff}.n-topology.n-topology-green .n-topology-nav-mode-selected:hover{background:#26999e!important}.n-topology.n-topology-green .n-topology-nav-mode-selected:hover span{color:#fff!important}.n-topology.n-topology-green .n-topology-nav-zoom{position:relative;height:51px;margin-top:10px!important}.n-topology.n-topology-green .n-topology-nav-zoom>span{display:inline-block;position:absolute;text-align:center;font-size:25px;color:#999;background:#eaeaea}.n-topology.n-topology-green .n-topology-nav-zoom-in{top:0;left:0;cursor:pointer}.n-topology.n-topology-green .n-topology-nav-zoom-in:hover{color:gray;background:#d8d8d8}.n-topology.n-topology-green .n-topology-nav-zoom-out{top:25px;left:0;cursor:pointer}.n-topology.n-topology-green .n-topology-nav-zoom-out:hover{color:gray;background:#d8d8d8}.n-topology.n-topology-green .n-topology-nav-zoom-selection{cursor:pointer;text-align:center;font-size:22px;color:#999}.n-topology.n-topology-green .n-topology-nav-zoom-selection:hover{color:#4d4d4d}.n-topology.n-topology-green .n-topology-nav-zoom-selection-selected{color:#54d0d6}.n-topology.n-topology-green .n-topology-nav-fit{cursor:pointer;text-align:center;font-size:22px;color:#999}.n-topology.n-topology-green .n-topology-nav-fit:hover{color:#4d4d4d}.n-topology.n-topology-green .n-topology-nav-agr{cursor:pointer;line-height:24px;text-align:center;font-size:20px;height:24px;color:#999;display:none}.n-topology.n-topology-green .n-topology-nav-agr:hover{color:#4d4d4d}@-webkit-keyframes agr-icon-ani{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}.n-topology.n-topology-green .n-topology-nav .agr-icon{-webkit-animation-duration:3s;-webkit-animation-name:agr-icon-ani;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-webkit-animation-timing-function:linear;-webkit-transition:0 none;color:#2badb3}.n-topology.n-topology-green .n-topology-nav .agr-text{font-size:10px;color:#eaeaea;position:absolute;left:10px;margin-top:-1px;height:12px}.n-topology.n-topology-green .n-topology-nav-full{cursor:pointer;text-align:center;font-size:18px;color:#999}.n-topology.n-topology-green .n-topology-nav-full:hover{color:#4d4d4d}.n-topology.n-topology-green .n-topology-nav-setting{cursor:pointer;text-align:center;color:#999;line-height:1;-webkit-transition:none 0!important;transition:none 0!important}.n-topology.n-topology-green .n-topology-nav-setting:hover{opacity:1;color:#2badb3}.n-topology.n-topology-green .n-topology-nav-setting-icon{font-size:20px}.n-topology.n-topology-green .n-topology-nav-setting-icon-selected{color:#2badb3}.n-topology.n-topology-green .n-topology-loading{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;display:none}.n-topology.n-topology-green .n-topology-loading ul{position:absolute;left:calc(49.3%);top:calc(45.8%);display:inline-block;text-indent:2.8em}.n-topology.n-topology-green .n-topology-loading ul li:after,.n-topology.n-topology-green .n-topology-loading ul:after{width:1.4em;height:1.4em;border-radius:100%;content:"";display:block}.n-topology.n-topology-green .n-topology-loading ul:after{position:absolute;top:2.8em}.n-topology.n-topology-green .n-topology-loading li{position:absolute;padding-bottom:5.6em;top:0;left:0;list-style:none}.n-topology.n-topology-green .n-topology-loading li:after{background:#26999e}.n-topology.n-topology-green .n-topology-loading li:nth-child(1){-webkit-transform:rotate(0deg);-webkit-animation-delay:.125s}.n-topology.n-topology-green .n-topology-loading li:nth-child(1):after{-webkit-animation-delay:.125s}.n-topology.n-topology-green .n-topology-loading li:nth-child(2){-webkit-transform:rotate(36deg);-webkit-animation-delay:.25s}.n-topology.n-topology-green .n-topology-loading li:nth-child(2):after{-webkit-animation-delay:.25s}.n-topology.n-topology-green .n-topology-loading li:nth-child(3){-webkit-transform:rotate(72deg);-webkit-animation-delay:.375s}.n-topology.n-topology-green .n-topology-loading li:nth-child(3):after{-webkit-animation-delay:.375s}.n-topology.n-topology-green .n-topology-loading li:nth-child(4){-webkit-transform:rotate(108deg);-webkit-animation-delay:.5s}.n-topology.n-topology-green .n-topology-loading li:nth-child(4):after{-webkit-animation-delay:.5s}.n-topology.n-topology-green .n-topology-loading li:nth-child(5){-webkit-transform:rotate(144deg);-webkit-animation-delay:.625s}.n-topology.n-topology-green .n-topology-loading li:nth-child(5):after{-webkit-animation-delay:.625s}.n-topology.n-topology-green .n-topology-loading li:nth-child(6){-webkit-transform:rotate(180deg);-webkit-animation-delay:.75s}.n-topology.n-topology-green .n-topology-loading li:nth-child(6):after{-webkit-animation-delay:.75s}.n-topology.n-topology-green .n-topology-loading li:nth-child(7){-webkit-transform:rotate(216deg);-webkit-animation-delay:.875s}.n-topology.n-topology-green .n-topology-loading li:nth-child(7):after{-webkit-animation-delay:.875s}.n-topology.n-topology-green .n-topology-loading li:nth-child(8){-webkit-transform:rotate(252deg);-webkit-animation-delay:1s}.n-topology.n-topology-green .n-topology-loading li:nth-child(8):after{-webkit-animation-delay:1s}.n-topology.n-topology-green .n-topology-loading li:nth-child(9){-webkit-transform:rotate(288deg);-webkit-animation-delay:1.125s}.n-topology.n-topology-green .n-topology-loading li:nth-child(9):after{-webkit-animation-delay:1.125s}.n-topology.n-topology-green .n-topology-loading li:nth-child(10){-webkit-transform:rotate(324deg);-webkit-animation-delay:1.25s}.n-topology.n-topology-green .n-topology-loading li:nth-child(10):after{-webkit-animation-delay:1.25s}.n-topology.n-topology-green .n-topology-loading li{-webkit-animation:dotAnimation 2.5s infinite}@-webkit-keyframes dotAnimation{0%,100%,55%{padding:0 0 5.6em}5%,50%{padding:2.8em 0}}.n-topology.n-topology-green .n-topology-loading li:after{-webkit-animation:dotAnimationTwo 2.5s infinite}@-webkit-keyframes dotAnimationTwo{0%,100%,55%{opacity:1;-webkit-transform:scale(1)}5%,50%{opacity:.5;-webkit-transform:scale(0.5)}}.n-topology.n-topology-slate{position:relative;overflow:hidden;background:#223343;-webkit-transition:background .6s;transition:background .6s;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-slate:focus{outline:0 none}.n-topology.n-topology-slate .n-topology-fit{-webkit-transition:all .6s linear!important;transition:all .6s linear!important}.n-topology.n-topology-slate .n-topology-fit .link,.n-topology.n-topology-slate .n-topology-fit .linkSet,.n-topology.n-topology-slate .n-topology-fit .node,.n-topology.n-topology-slate .n-topology-fit .nodeSet{-webkit-transition:all .9s linear!important;transition:all .9s linear!important}.n-topology.n-topology-slate.n-topology-loading .n-topology-nav,.n-topology.n-topology-slate.n-topology-loading svg{-webkit-filter:blur(5px);-moz-filter:blur(5px)}.n-topology.n-topology-slate svg{box-sizing:content-box;position:absolute;top:0;left:0;right:0;bottom:0}.n-topology.n-topology-slate text:empty{display:none}.n-topology.n-topology-slate g{pointer-events:all}.n-topology.n-topology-slate defs .bg{fill:#fff}.n-topology.n-topology-slate defs .stroke{stroke:#fff}.n-topology.n-topology-slate defs [fill*='#FFFFFF']{fill:#223343}.n-topology.n-topology-slate .n-svg{border:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-slate .fontIcon{font-family:next-font;fill:#fff;alignment-baseline:central;text-anchor:middle;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-slate text{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-slate .n-topology-icon .fontIcon{cursor:pointer}.n-topology.n-topology-slate .iconBG{fill:#223343}.n-topology.n-topology-slate .iconBGActive{fill:#fff}.n-topology.n-topology-slate .node:not(.node-selected) .selectedBG{display:none}.n-topology.n-topology-slate .node .selectedBG{fill:transparent;opacity:.8;stroke:#f7931e;stroke-width:3;pointer-events:none}.n-topology.n-topology-slate .node .dot{fill:#fff}.n-topology.n-topology-slate .node text.node-label{font-family:"Cisco Sans Reg";fill:#fff;pointer-events:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:11px}.n-topology.n-topology-slate .node.disable .node-label{fill:#ccc!important}.n-topology.n-topology-slate .node.disable .iconBG.iconBGActive,.n-topology.n-topology-slate .node.disable .showIcon .iconShape{fill:#ccc}.n-topology.n-topology-slate .link line,.n-topology.n-topology-slate .link path{stroke:#49a9bf;stroke-width:1px;fill:none;cursor:pointer}.n-topology.n-topology-slate .link line.link:hover,.n-topology.n-topology-slate .link path.link:hover{stroke:#307889}.n-topology.n-topology-slate .link line.link_bg:hover~line{stroke:#307889!important}.n-topology.n-topology-slate .link .link-label{font-family:"Cisco Sans Reg";fill:#fff;font-size:12px}.n-topology.n-topology-slate .link .source-abel,.n-topology.n-topology-slate .link .target-label{font-family:"Cisco Sans Reg";fill:#fff;opacity:.8;font-size:12px}.n-topology.n-topology-slate .link .disable-label{fill:#fff}.n-topology.n-topology-slate .link .disable-bg{fill:#ccc}.n-topology.n-topology-slate .link .link_bg{stroke:transparent}.n-topology.n-topology-slate .link.disable line,.n-topology.n-topology-slate .link.disable path{stroke:#ccc!important;stroke-width:1px}.n-topology.n-topology-slate .link.disable .link_bg{stroke:transparent!important}.n-topology.n-topology-slate .link.link-selected line,.n-topology.n-topology-slate .link.link-selected path{stroke:#ccc;stroke-width:2px}.n-topology.n-topology-slate .nodeset .selectedBG{fill:transparent;opacity:.8;stroke:#f7931e;stroke-width:3;pointer-events:none}.n-topology.n-topology-slate .nodeset .dot{fill:#223343;stroke:#fff;stroke-width:1}.n-topology.n-topology-slate .nodeset .icon{cursor:pointer}.n-topology.n-topology-slate .nodeset .bg{fill:#fff;pointer-events:none}.n-topology.n-topology-slate .nodeset text.node-label{font-family:"Cisco Sans Reg";fill:#fff;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.n-topology.n-topology-slate .nodeset.disable{opacity:.3;stroke:#ccc}.n-topology.n-topology-slate .nodeset .iconBG,.n-topology.n-topology-slate .nodeset .iconBGActive{fill:#223343}.n-topology.n-topology-slate .nodeset .iconBGActive~.iconShape{display:block!important}.n-topology.n-topology-slate .nodeset .indicator .iconBG{fill:#223343}.n-topology.n-topology-slate .nodeset .indicator .iconBG:hover{fill:#fff}.n-topology.n-topology-slate .nodeset .indicator .iconShape{fill:#e6e6e6}.n-topology.n-topology-slate .group .bg{opacity:.6;stroke-width:10px;stroke-linejoin:round}.n-topology.n-topology-slate .group .groupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";text-anchor:middle;alignment-baseline:inherit}.n-topology.n-topology-slate .group .fontIcon.iconShape{fill:#9BB150}.n-topology.n-topology-slate .group .nodeSetGroupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";alignment-baseline:inherit;fill:#9BB150}.n-topology.n-topology-slate .group .groupLabel:hover~.bg{opacity:.7}.n-topology.n-topology-slate .group.aggregationGroup .bg{stroke-width:10px;stroke-linejoin:round;fill:#9BB150;stroke:#9BB150;pointer-events:none;opacity:0;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.n-topology.n-topology-slate .group.aggregationGroup.fade-active-item{opacity:1}.n-topology.n-topology-slate .group.aggregationGroup.fade-active-item .bg{opacity:.5}.n-topology.n-topology-slate .link-set-bg{stroke:#49a9bf;stroke-width:2px}.n-topology.n-topology-slate .link-set-circle{fill:#fff;stroke:#fff;stroke-width:16px;stroke-linejoin:round}.n-topology.n-topology-slate .link-set-text{font-family:"Cisco Sans Reg";fill:#223343;text-anchor:middle;dominant-baseline:central;font-size:12px;pointer-events:none}.n-topology.n-topology-slate .link-set.disable .link-set-bg{stroke:#ccc}.n-topology.n-topology-slate .link-set.disable .link-set-circle{fill:#ccc;stroke:#ccc}@media screen and (-webkit-min-device-pixel-ratio:0){.n-topology.n-topology-slate .link-set-circle,.n-topology.n-topology-slate ::i-block-chrome{stroke-width:8px!important}}.n-topology.n-topology-slate .mapPath{fill:#fff;stroke:#eee;stroke-width:1;opacity:.5;pointer-events:none}.n-topology.n-topology-slate .mapBoundary{fill:none;stroke:#eee;stroke-width:1;pointer-events:none}.n-topology.n-topology-slate .selectionRect{stroke:#fff;fill:#fff;fill-opacity:.1;pointer-events:none}.n-topology.n-topology-slate-setting{max-width:none!important}.n-topology.n-topology-slate .aggregationGroup .aggregationText{fill:#fff;font-size:12px}.n-topology.n-topology-slate .aggregationGroup .aggregationRect{fill:#fff;opacity:.2;stroke:#fff;stroke-width:3;stroke-linejoin:round;pointer-events:none}.n-topology.n-topology-slate .layer>*{transition:opacity .6s}.n-topology.n-topology-slate .layer.fade-layer>:not(.fade-highlight-item):not(.fade-active-item),.n-topology.n-topology-slate.fade-active-priority.fade-active-occur .layer.fade-layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-slate.fade-active-priority.fade-active-occur.fade-all .layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-slate.fade-all .layer>:not(.fade-highlight-item):not(.fade-active-item){opacity:.2}.n-topology.n-topology-slate .n-topology-nav{position:absolute;top:0;left:8px;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-slate .n-topology-nav li{list-style:none;padding:0}.n-topology.n-topology-slate .n-topology-nav ul{padding:0;margin:0}.n-topology.n-topology-slate .n-topology-nav span{-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-slate .n-topology-nav>ul{padding:0;margin-top:30px;width:32px}.n-topology.n-topology-slate .n-topology-nav>ul>li{display:inline-block;list-style:none;width:25px;margin-top:5px;-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-slate .n-topology-nav-mode{padding:0;position:relative;width:25px}.n-topology.n-topology-slate .n-topology-nav-mode li{width:25px;height:25px;line-height:30px;display:inline-block;text-align:center;cursor:pointer;-webkit-transition:all .6s;transition:all .6s;background:#446787;margin-top:-2px}.n-topology.n-topology-slate .n-topology-nav-mode li:hover span{color:#fff}.n-topology.n-topology-slate .n-topology-nav-mode span{color:#888;display:inline-block;font-size:18px}.n-topology.n-topology-slate .n-topology-nav-mode-selected{background:#fff!important}.n-topology.n-topology-slate .n-topology-nav-mode-selected span{color:#223343}.n-topology.n-topology-slate .n-topology-nav-mode-selected:hover{background:#fff!important}.n-topology.n-topology-slate .n-topology-nav-mode-selected:hover span{color:#223343!important}.n-topology.n-topology-slate .n-topology-nav-zoom{position:relative;height:51px;margin-top:10px!important}.n-topology.n-topology-slate .n-topology-nav-zoom>span{display:inline-block;position:absolute;text-align:center;font-size:25px;color:#888;background:#446787}.n-topology.n-topology-slate .n-topology-nav-zoom-in{top:0;left:0;cursor:pointer}.n-topology.n-topology-slate .n-topology-nav-zoom-in:hover{color:#d5d5d5;background:#5680a8}.n-topology.n-topology-slate .n-topology-nav-zoom-out{top:25px;left:0;cursor:pointer}.n-topology.n-topology-slate .n-topology-nav-zoom-out:hover{color:#d5d5d5;background:#5680a8}.n-topology.n-topology-slate .n-topology-nav-zoom-selection{cursor:pointer;text-align:center;font-size:22px;color:#888}.n-topology.n-topology-slate .n-topology-nav-zoom-selection:hover{color:#d5d5d5}.n-topology.n-topology-slate .n-topology-nav-zoom-selection-selected{color:#fff}.n-topology.n-topology-slate .n-topology-nav-fit{cursor:pointer;text-align:center;font-size:22px;color:#888}.n-topology.n-topology-slate .n-topology-nav-fit:hover{color:#d5d5d5}.n-topology.n-topology-slate .n-topology-nav-agr{cursor:pointer;line-height:24px;text-align:center;font-size:20px;height:24px;color:#888;display:none}.n-topology.n-topology-slate .n-topology-nav-agr:hover{color:#d5d5d5}@-webkit-keyframes agr-icon-ani{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}.n-topology.n-topology-slate .n-topology-nav .agr-icon{-webkit-animation-duration:3s;-webkit-animation-name:agr-icon-ani;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-webkit-animation-timing-function:linear;-webkit-transition:0 none;color:#fff}.n-topology.n-topology-slate .n-topology-nav .agr-text{font-size:10px;color:#446787;position:absolute;left:10px;margin-top:-1px;height:12px}.n-topology.n-topology-slate .n-topology-nav-full{cursor:pointer;text-align:center;font-size:18px;color:#888}.n-topology.n-topology-slate .n-topology-nav-full:hover{color:#d5d5d5}.n-topology.n-topology-slate .n-topology-nav-setting{cursor:pointer;text-align:center;color:#888;line-height:1;-webkit-transition:none 0!important;transition:none 0!important}.n-topology.n-topology-slate .n-topology-nav-setting:hover{opacity:1;color:#fff}.n-topology.n-topology-slate .n-topology-nav-setting-icon{font-size:20px}.n-topology.n-topology-slate .n-topology-nav-setting-icon-selected{color:#fff}.n-topology.n-topology-slate .n-topology-loading{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;display:none}.n-topology.n-topology-slate .n-topology-loading ul{position:absolute;left:calc(49.3%);top:calc(45.8%);display:inline-block;text-indent:2.8em}.n-topology.n-topology-slate .n-topology-loading ul li:after,.n-topology.n-topology-slate .n-topology-loading ul:after{width:1.4em;height:1.4em;border-radius:100%;content:"";display:block}.n-topology.n-topology-slate .n-topology-loading ul:after{position:absolute;top:2.8em}.n-topology.n-topology-slate .n-topology-loading li{position:absolute;padding-bottom:5.6em;top:0;left:0;list-style:none}.n-topology.n-topology-slate .n-topology-loading li:after{background:#fff}.n-topology.n-topology-slate .n-topology-loading li:nth-child(1){-webkit-transform:rotate(0deg);-webkit-animation-delay:.125s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(1):after{-webkit-animation-delay:.125s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(2){-webkit-transform:rotate(36deg);-webkit-animation-delay:.25s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(2):after{-webkit-animation-delay:.25s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(3){-webkit-transform:rotate(72deg);-webkit-animation-delay:.375s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(3):after{-webkit-animation-delay:.375s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(4){-webkit-transform:rotate(108deg);-webkit-animation-delay:.5s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(4):after{-webkit-animation-delay:.5s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(5){-webkit-transform:rotate(144deg);-webkit-animation-delay:.625s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(5):after{-webkit-animation-delay:.625s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(6){-webkit-transform:rotate(180deg);-webkit-animation-delay:.75s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(6):after{-webkit-animation-delay:.75s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(7){-webkit-transform:rotate(216deg);-webkit-animation-delay:.875s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(7):after{-webkit-animation-delay:.875s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(8){-webkit-transform:rotate(252deg);-webkit-animation-delay:1s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(8):after{-webkit-animation-delay:1s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(9){-webkit-transform:rotate(288deg);-webkit-animation-delay:1.125s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(9):after{-webkit-animation-delay:1.125s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(10){-webkit-transform:rotate(324deg);-webkit-animation-delay:1.25s}.n-topology.n-topology-slate .n-topology-loading li:nth-child(10):after{-webkit-animation-delay:1.25s}.n-topology.n-topology-slate .n-topology-loading li{-webkit-animation:dotAnimation 2.5s infinite}@-webkit-keyframes dotAnimation{0%,100%,55%{padding:0 0 5.6em}5%,50%{padding:2.8em 0}}.n-topology.n-topology-slate .n-topology-loading li:after{-webkit-animation:dotAnimationTwo 2.5s infinite}@-webkit-keyframes dotAnimationTwo{0%,100%,55%{opacity:1;-webkit-transform:scale(1)}5%,50%{opacity:.5;-webkit-transform:scale(0.5)}}.n-topology.n-topology-yellow{position:relative;overflow:hidden;background:#000;-webkit-transition:background .6s;transition:background .6s;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-yellow:focus{outline:0 none}.n-topology.n-topology-yellow .n-topology-fit{-webkit-transition:all .6s linear!important;transition:all .6s linear!important}.n-topology.n-topology-yellow .n-topology-fit .link,.n-topology.n-topology-yellow .n-topology-fit .linkSet,.n-topology.n-topology-yellow .n-topology-fit .node,.n-topology.n-topology-yellow .n-topology-fit .nodeSet{-webkit-transition:all .9s linear!important;transition:all .9s linear!important}.n-topology.n-topology-yellow.n-topology-loading .n-topology-nav,.n-topology.n-topology-yellow.n-topology-loading svg{-webkit-filter:blur(5px);-moz-filter:blur(5px)}.n-topology.n-topology-yellow svg{box-sizing:content-box;position:absolute;top:0;left:0;right:0;bottom:0}.n-topology.n-topology-yellow text:empty{display:none}.n-topology.n-topology-yellow g{pointer-events:all}.n-topology.n-topology-yellow defs .bg{fill:#ffc200}.n-topology.n-topology-yellow defs .stroke{stroke:#ffc200}.n-topology.n-topology-yellow defs [fill*='#FFFFFF']{fill:#000}.n-topology.n-topology-yellow .n-svg{border:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-yellow .fontIcon{font-family:next-font;fill:#ffc200;alignment-baseline:central;text-anchor:middle;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-yellow text{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n-topology.n-topology-yellow .n-topology-icon .fontIcon{cursor:pointer}.n-topology.n-topology-yellow .iconBG{fill:#000}.n-topology.n-topology-yellow .iconBGActive{fill:#ffc200}.n-topology.n-topology-yellow .node:not(.node-selected) .selectedBG{display:none}.n-topology.n-topology-yellow .node .selectedBG{fill:transparent;opacity:.8;stroke:#ff7900;stroke-width:3;pointer-events:none}.n-topology.n-topology-yellow .node .dot{fill:#ffc200}.n-topology.n-topology-yellow .node text.node-label{font-family:"Cisco Sans Reg";fill:#ffc200;pointer-events:none;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:11px}.n-topology.n-topology-yellow .node.disable .node-label{fill:#ccc!important}.n-topology.n-topology-yellow .node.disable .iconBG.iconBGActive,.n-topology.n-topology-yellow .node.disable .showIcon .iconShape{fill:#ccc}.n-topology.n-topology-yellow .link line,.n-topology.n-topology-yellow .link path{stroke:#997b19;stroke-width:1px;fill:none;cursor:pointer}.n-topology.n-topology-yellow .link line.link:hover,.n-topology.n-topology-yellow .link path.link:hover{stroke:#55440e}.n-topology.n-topology-yellow .link line.link_bg:hover~line{stroke:#55440e!important}.n-topology.n-topology-yellow .link .link-label{font-family:"Cisco Sans Reg";fill:#ffc200;font-size:12px}.n-topology.n-topology-yellow .link .source-abel,.n-topology.n-topology-yellow .link .target-label{font-family:"Cisco Sans Reg";fill:#ffc200;opacity:.8;font-size:12px}.n-topology.n-topology-yellow .link .disable-label{fill:#fff}.n-topology.n-topology-yellow .link .disable-bg{fill:#ccc}.n-topology.n-topology-yellow .link .link_bg{stroke:transparent}.n-topology.n-topology-yellow .link.disable line,.n-topology.n-topology-yellow .link.disable path{stroke:#ccc!important;stroke-width:1px}.n-topology.n-topology-yellow .link.disable .link_bg{stroke:transparent!important}.n-topology.n-topology-yellow .link.link-selected line,.n-topology.n-topology-yellow .link.link-selected path{stroke:#ccc;stroke-width:2px}.n-topology.n-topology-yellow .nodeset .selectedBG{fill:transparent;opacity:.8;stroke:#ff7900;stroke-width:3;pointer-events:none}.n-topology.n-topology-yellow .nodeset .dot{fill:#000;stroke:#ffc200;stroke-width:1}.n-topology.n-topology-yellow .nodeset .icon{cursor:pointer}.n-topology.n-topology-yellow .nodeset .bg{fill:#ffc200;pointer-events:none}.n-topology.n-topology-yellow .nodeset text.node-label{font-family:"Cisco Sans Reg";fill:#ffc200;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.n-topology.n-topology-yellow .nodeset.disable{opacity:.3;stroke:#ccc}.n-topology.n-topology-yellow .nodeset .iconBG,.n-topology.n-topology-yellow .nodeset .iconBGActive{fill:#000}.n-topology.n-topology-yellow .nodeset .iconBGActive~.iconShape{display:block!important}.n-topology.n-topology-yellow .nodeset .indicator .iconBG{fill:#000}.n-topology.n-topology-yellow .nodeset .indicator .iconBG:hover{fill:#ffc200}.n-topology.n-topology-yellow .nodeset .indicator .iconShape{fill:#cc9b00}.n-topology.n-topology-yellow .group .bg{opacity:.6;stroke-width:10px;stroke-linejoin:round}.n-topology.n-topology-yellow .group .groupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";text-anchor:middle;alignment-baseline:inherit}.n-topology.n-topology-yellow .group .fontIcon.iconShape{fill:#9BB150}.n-topology.n-topology-yellow .group .nodeSetGroupLabel{cursor:pointer;font-size:18px;font-family:"Cisco Sans Reg";alignment-baseline:inherit;fill:#9BB150}.n-topology.n-topology-yellow .group .groupLabel:hover~.bg{opacity:.7}.n-topology.n-topology-yellow .group.aggregationGroup .bg{stroke-width:10px;stroke-linejoin:round;fill:#9BB150;stroke:#9BB150;pointer-events:none;opacity:0;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.n-topology.n-topology-yellow .group.aggregationGroup.fade-active-item{opacity:1}.n-topology.n-topology-yellow .group.aggregationGroup.fade-active-item .bg{opacity:.5}.n-topology.n-topology-yellow .link-set-bg{stroke:#997b19;stroke-width:2px}.n-topology.n-topology-yellow .link-set-circle{fill:#ffc200;stroke:#ffc200;stroke-width:16px;stroke-linejoin:round}.n-topology.n-topology-yellow .link-set-text{font-family:"Cisco Sans Reg";fill:#000;text-anchor:middle;dominant-baseline:central;font-size:12px;pointer-events:none}.n-topology.n-topology-yellow .link-set.disable .link-set-bg{stroke:#ccc}.n-topology.n-topology-yellow .link-set.disable .link-set-circle{fill:#ccc;stroke:#ccc}@media screen and (-webkit-min-device-pixel-ratio:0){.n-topology.n-topology-yellow .link-set-circle,.n-topology.n-topology-yellow ::i-block-chrome{stroke-width:8px!important}}.n-topology.n-topology-yellow .mapPath{fill:#333;stroke:#555;stroke-width:1;opacity:.5;pointer-events:none}.n-topology.n-topology-yellow .mapBoundary{fill:none;stroke:#555;stroke-width:1;pointer-events:none}.n-topology.n-topology-yellow .selectionRect{stroke:#ffc200;fill:#ffc200;fill-opacity:.1;pointer-events:none}.n-topology.n-topology-yellow-setting{max-width:none!important}.n-topology.n-topology-yellow .aggregationGroup .aggregationText{fill:#ffc200;font-size:12px}.n-topology.n-topology-yellow .aggregationGroup .aggregationRect{fill:#ffc200;opacity:.2;stroke:#ffc200;stroke-width:3;stroke-linejoin:round;pointer-events:none}.n-topology.n-topology-yellow .layer>*{transition:opacity .6s}.n-topology.n-topology-yellow .layer.fade-layer>:not(.fade-highlight-item):not(.fade-active-item),.n-topology.n-topology-yellow.fade-active-priority.fade-active-occur .layer.fade-layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-yellow.fade-active-priority.fade-active-occur.fade-all .layer>.fade-highlight-item:not(.fade-active-item),.n-topology.n-topology-yellow.fade-all .layer>:not(.fade-highlight-item):not(.fade-active-item){opacity:.2}.n-topology.n-topology-yellow .n-topology-nav{position:absolute;top:0;left:8px;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-topology.n-topology-yellow .n-topology-nav li{list-style:none;padding:0}.n-topology.n-topology-yellow .n-topology-nav ul{padding:0;margin:0}.n-topology.n-topology-yellow .n-topology-nav span{-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-yellow .n-topology-nav>ul{padding:0;margin-top:30px;width:32px}.n-topology.n-topology-yellow .n-topology-nav>ul>li{display:inline-block;list-style:none;width:25px;margin-top:5px;-webkit-transition:all .6s;transition:all .6s}.n-topology.n-topology-yellow .n-topology-nav-mode{padding:0;position:relative;width:25px}.n-topology.n-topology-yellow .n-topology-nav-mode li{width:25px;height:25px;line-height:30px;display:inline-block;text-align:center;cursor:pointer;-webkit-transition:all .6s;transition:all .6s;background:#333;margin-top:-2px}.n-topology.n-topology-yellow .n-topology-nav-mode li:hover span{color:#ffc200}.n-topology.n-topology-yellow .n-topology-nav-mode span{color:#666;display:inline-block;font-size:18px}.n-topology.n-topology-yellow .n-topology-nav-mode-selected{background:#ffc200!important}.n-topology.n-topology-yellow .n-topology-nav-mode-selected span{color:#000}.n-topology.n-topology-yellow .n-topology-nav-mode-selected:hover{background:#ffc200!important}.n-topology.n-topology-yellow .n-topology-nav-mode-selected:hover span{color:#000!important}.n-topology.n-topology-yellow .n-topology-nav-zoom{position:relative;height:51px;margin-top:10px!important}.n-topology.n-topology-yellow .n-topology-nav-zoom>span{display:inline-block;position:absolute;text-align:center;font-size:25px;color:#666;background:#333}.n-topology.n-topology-yellow .n-topology-nav-zoom-in{top:0;left:0;cursor:pointer}.n-topology.n-topology-yellow .n-topology-nav-zoom-in:hover{color:#b3b3b3;background:#4d4d4d}.n-topology.n-topology-yellow .n-topology-nav-zoom-out{top:25px;left:0;cursor:pointer}.n-topology.n-topology-yellow .n-topology-nav-zoom-out:hover{color:#b3b3b3;background:#4d4d4d}.n-topology.n-topology-yellow .n-topology-nav-zoom-selection{cursor:pointer;text-align:center;font-size:22px;color:#666}.n-topology.n-topology-yellow .n-topology-nav-zoom-selection:hover{color:#b3b3b3}.n-topology.n-topology-yellow .n-topology-nav-zoom-selection-selected{color:#ffda66}.n-topology.n-topology-yellow .n-topology-nav-fit{cursor:pointer;text-align:center;font-size:22px;color:#666}.n-topology.n-topology-yellow .n-topology-nav-fit:hover{color:#b3b3b3}.n-topology.n-topology-yellow .n-topology-nav-agr{cursor:pointer;line-height:24px;text-align:center;font-size:20px;height:24px;color:#666;display:none}.n-topology.n-topology-yellow .n-topology-nav-agr:hover{color:#b3b3b3}@-webkit-keyframes agr-icon-ani{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}.n-topology.n-topology-yellow .n-topology-nav .agr-icon{-webkit-animation-duration:3s;-webkit-animation-name:agr-icon-ani;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:normal;-webkit-animation-timing-function:linear;-webkit-transition:0 none;color:#ffc81a}.n-topology.n-topology-yellow .n-topology-nav .agr-text{font-size:10px;color:#333;position:absolute;left:10px;margin-top:-1px;height:12px}.n-topology.n-topology-yellow .n-topology-nav-full{cursor:pointer;text-align:center;font-size:18px;color:#666}.n-topology.n-topology-yellow .n-topology-nav-full:hover{color:#b3b3b3}.n-topology.n-topology-yellow .n-topology-nav-setting{cursor:pointer;text-align:center;color:#666;line-height:1;-webkit-transition:none 0!important;transition:none 0!important}.n-topology.n-topology-yellow .n-topology-nav-setting:hover{opacity:1;color:#ffc81a}.n-topology.n-topology-yellow .n-topology-nav-setting-icon{font-size:20px}.n-topology.n-topology-yellow .n-topology-nav-setting-icon-selected{color:#ffc81a}.n-topology.n-topology-yellow .n-topology-loading{overflow:hidden;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;display:none}.n-topology.n-topology-yellow .n-topology-loading ul{position:absolute;left:calc(49.3%);top:calc(45.8%);display:inline-block;text-indent:2.8em}.n-topology.n-topology-yellow .n-topology-loading ul li:after,.n-topology.n-topology-yellow .n-topology-loading ul:after{width:1.4em;height:1.4em;border-radius:100%;content:"";display:block}.n-topology.n-topology-yellow .n-topology-loading ul:after{position:absolute;top:2.8em}.n-topology.n-topology-yellow .n-topology-loading li{position:absolute;padding-bottom:5.6em;top:0;left:0;list-style:none}.n-topology.n-topology-yellow .n-topology-loading li:after{background:#ffc200}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(1){-webkit-transform:rotate(0deg);-webkit-animation-delay:.125s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(1):after{-webkit-animation-delay:.125s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(2){-webkit-transform:rotate(36deg);-webkit-animation-delay:.25s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(2):after{-webkit-animation-delay:.25s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(3){-webkit-transform:rotate(72deg);-webkit-animation-delay:.375s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(3):after{-webkit-animation-delay:.375s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(4){-webkit-transform:rotate(108deg);-webkit-animation-delay:.5s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(4):after{-webkit-animation-delay:.5s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(5){-webkit-transform:rotate(144deg);-webkit-animation-delay:.625s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(5):after{-webkit-animation-delay:.625s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(6){-webkit-transform:rotate(180deg);-webkit-animation-delay:.75s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(6):after{-webkit-animation-delay:.75s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(7){-webkit-transform:rotate(216deg);-webkit-animation-delay:.875s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(7):after{-webkit-animation-delay:.875s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(8){-webkit-transform:rotate(252deg);-webkit-animation-delay:1s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(8):after{-webkit-animation-delay:1s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(9){-webkit-transform:rotate(288deg);-webkit-animation-delay:1.125s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(9):after{-webkit-animation-delay:1.125s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(10){-webkit-transform:rotate(324deg);-webkit-animation-delay:1.25s}.n-topology.n-topology-yellow .n-topology-loading li:nth-child(10):after{-webkit-animation-delay:1.25s}.n-topology.n-topology-yellow .n-topology-loading li{-webkit-animation:dotAnimation 2.5s infinite}@-webkit-keyframes dotAnimation{0%,100%,55%{padding:0 0 5.6em}5%,50%{padding:2.8em 0}}.n-topology.n-topology-yellow .n-topology-loading li:after{-webkit-animation:dotAnimationTwo 2.5s infinite}@-webkit-keyframes dotAnimationTwo{0%,100%,55%{opacity:1;-webkit-transform:scale(1)}5%,50%{opacity:.5;-webkit-transform:scale(0.5)}}.n-topology-tooltip{padding:0;opacity:.8!important;max-height:450px}.n-topology-tooltip-header{min-width:160px;line-height:24px;position:relative;border-bottom:dotted 1px #ccc}.n-topology-tooltip-header-actions{float:right}.n-topology-tooltip-header-actions i{cursor:pointer}.n-topology-tooltip-header-text{line-height:24px;color:#333;font-size:14px;font-weight:700}.n-topology-tooltip-content{margin-bottom:6px;padding:3px;min-height:30px}.n-topology-tooltip-content label{display:inline-block;margin-right:8px;font-weight:700}.n-topology-tooltip-content ul{margin:0;padding:0}.n-topology-tooltip-content li{list-style:none}.n-topology-tooltip:after{display:none}.n-topology-tooltip .popover-content{padding:5px 10px}.n-topology-setting-panel{max-width:342px!important;font-family:Arial}.n-topology-setting-panel .popover-content{width:330px;line-height:24px;height:auto}.n-topology-setting-panel .popover-content h3{margin:4px 0 6px}.n-topology-setting-panel .popover-content h5{margin:5px 0}.n-topology-setting-panel .popover-content label{font-size:12px;margin-right:12px}.n-topology-setting-panel .popover-content .btn-group button{margin:0;margin-right:-1px}.n-topology-setting-panel .popover-content .n-radio{margin-right:12px;font-weight:400}.n-topology-setting-panel .popover-content .n-radio span{margin-left:3px}.n-topology-setting-panel .popover-content-label{display:inline-block;margin-right:20px}.n-topology-setting-panel .popover-content .toggleLabelCheckBox{float:right;margin-right:12px}.n-topology-thumbnail{position:absolute;border:solid 1px #ccc;box-shadow:0 0 10px #ccc;margin-top:-10px;margin-left:-10px;z-index:100;background:#fff}.n-topology-thumbnail-container{position:relative}.n-topology-thumbnail-win{position:absolute;border:solid 1px red}.n-topology-thumbnail-svg{border:solid 1px #c4c4c4;background:#fff}.n-topology-thumbnail .handler{position:absolute;bottom:0;right:0;cursor:pointer}@font-face{font-family:"Cisco Sans Extra Light";src:url(../fonts/ciscosansextralight-webfont.eot);src:url(../fonts/ciscosansextralight-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/ciscosansextralight-webfont.woff) format('woff'),url(../fonts/ciscosansextralight-webfont.ttf) format('truetype'),url(../fonts/ciscosansextralight-webfont.svg#CiscoSansExtraLight) format('svg');font-weight:400;font-style:normal}@font-face{font-family:"Cisco Sans Reg";src:url(../fonts/ciscosansregular-webfont.eot);src:url(../fonts/ciscosansregular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/ciscosansregular-webfont.woff) format('woff'),url(../fonts/ciscosansregular-webfont.ttf) format('truetype'),url(../fonts/ciscosansregular-webfont.svg#CiscoSansReg) format('svg');font-weight:400;font-style:normal}.n-userselect,.n-userselect *{-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.n-transition{-webkit-transition:all .4!important;transition:all .4s!important}.n-moveCursor{cursor:move!important}.n-dragCursor{cursor:pointer}.n-crosshairCursor,.n-crosshairCursor *{cursor:crosshair!important}.n-zoomInCursor{cursor:-webkit-zoom-in;cursor:zoom-in}.n-waitCursor{cursor:wait}.n-blockEvent,.n-blockEvent *{pointer-events:none}.n-hidden{display:none!important}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-o-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default.active,.btn-default:active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-primary{color:#fff;background-color:#0386d2;border-color:#0376b9}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#026caa;border-color:#024f7d}.btn-primary.active,.btn-primary:active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#0386d2;border-color:#0376b9}.btn-warning{color:#fff;background-color:#f2ad4e;border-color:#f0a236}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ef9b28;border-color:#d98510}.btn-warning.active,.btn-warning:active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f2ad4e;border-color:#f0a236}.btn-danger{color:#fff;background-color:#da534f;border-color:#d63e3a}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d3322d;border-color:#ae2825}.btn-danger.active,.btn-danger:active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#da534f;border-color:#d63e3a}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success.active,.btn-success:active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-info{color:#fff;background-color:#5bc1df;border-color:#46b9db}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b4d8;border-color:#259bbe}.btn-info.active,.btn-info:active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc1df;border-color:#46b9db}.btn-link{color:#0386d2;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#025687;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#999;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.btn-default .caret{border-top-color:#333}.btn-danger .caret,.btn-info .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff}.dropup .btn-default .caret{border-bottom-color:#333}.dropup .btn-danger .caret,.dropup .btn-info .caret,.dropup .btn-primary .caret,.dropup .btn-success .caret,.dropup .btn-warning .caret{border-bottom-color:#fff}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:after,.btn-toolbar:before{content:" ";display:table}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{font-size:12px;line-height:1.5;border-radius:3px;padding:1px 5px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before{content:" ";display:table}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified .btn{float:none;display:table-cell;width:1%}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{display:none}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top .arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right .arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom .arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left .arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px} \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/css/vpp.css b/vbd/gui/module/src/main/resources/vpp/assets/css/vpp.css deleted file mode 100644 index 2aa42ff79..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/css/vpp.css +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -html,body { - width: 100%; - background-color: #414040; -} - -#next-app { - overflow: hidden; -} - -svg { - border: none; - border-radius: 0; - background-image: none; - background-color: rgb(66,66,66); -} - -text.node-label { fill: #FFFFFF !important; } - -md-sidenav.md-locked-open { - width: 550px; - min-width: 550px; - max-width: 550px; -} - -.truckDialog { - width: 16px; - height: 16px; -} -.marker { - height: 25px; - width: 35px; -} - -.ui-grid-header-cell-label { - color: black !important; -} - -span.center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.n-topology.n-topology-blue { - background-color: white; -} - -.n-topology-nav { - display: none; -} - -.node-label { - fill: #414040 !important; -} - -.n-topology-nav-setting-icon { - display:none; -} - -.st-sort-ascent:before{ - content: '\25B2'; -} - -.st-sort-descent:before{ - content: '\25BC'; -} - -.gridStyle { - border: 1px solid rgb(212,212,212); - width: 400px; - height: 300px -} - -.white { - color: white !important; -} - -.scene3 { - position: fixed; - z-index: 10; - font-size: 14px; - right: 10px; - width: 200px; - text-align: center -} - -.md-dialog-container.ng-scope { - z-index: 10000000; -} - -.n-topology.n-topology-blue .n-topology-nav-mode-selected:hover { - background: #414040 !important; -} - -.n-topology.n-topology-blue .n-topology-nav-mode-selected { - background: #414040 !important; -} - -.n-topology.n-topology-blue .node .selectedBG { - stroke: #FFA500 !important; -} - -.st-sort-ascent:after{ - content: '\25B2'; -} - -.st-sort-descent:after{ - content: '\25BC'; -} - -.st-sort-ascent:before{ - content: none; -} - -.st-sort-descent:before{ - content: none; -} - -/*button overrides*/ -button span { - color: orange; - font-weight: bold; -} - -button.md-button[disabled] span { - color: #ffc966; -} - -button.md-raised.md-button { - background-color: orange !important; -} - -button.md-raised.md-button span{ - color: black; -} - -a.md-button.md-default-theme.md-raised, -a.md-button.md-raised, -.md-button.md-default-theme.md-raised, -.md-button.md-raised { - background-color: #424242; -} - -a.md-button.md-default-theme[disabled], a.md-button[disabled], a.md-button.md-default-theme.md-raised[disabled], -a.md-button.md-raised[disabled], a.md-button.md-default-theme.md-fab[disabled], a.md-button.md-fab[disabled], -a.md-button.md-default-theme.md-accent[disabled], a.md-button.md-accent[disabled], a.md-button.md-default-theme.md-warn[disabled], -a.md-button.md-warn[disabled], .md-button.md-default-theme[disabled], .md-button[disabled], .md-button.md-default-theme.md-raised[disabled], -.md-button.md-raised[disabled], .md-button.md-default-theme.md-fab[disabled], .md-button.md-fab[disabled], .md-button.md-default-theme.md-accent[disabled], -.md-button.md-accent[disabled], .md-button.md-default-theme.md-warn[disabled], .md-button.md-warn[disabled] { - color: #FFA500; -} - -/*table overrides*/ -.table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th { - background-color: transparent; -} - -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - vertical-align: middle; - border-top: 1px solid rgba(221, 221, 221, 0.6); -} - -.table > thead > tr > th.interactive { - color: orange; -} - -/*input overrides*/ -md-input-container.md-default-theme, -md-input-container label, -md-input-container.md-default-theme, -md-input-container .md-placeholder { - text-shadow: none; - color: white; -} - -md-input-container.md-default-theme:not(.md-input-invalid).md-input-focused, -md-input-container:not(.md-input-invalid).md-input-focused label { - color: orange; -} -md-input-container.md-default-theme:not(.md-input-invalid).md-input-has-value, -md-input-container:not(.md-input-invalid).md-input-has-value label { - color: white; -} - -md-input-container.md-default-theme, -md-input-container .md-input { - text-shadow: none; -} - -md-input-container.md-default-theme:not(.md-input-invalid).md-input-focused, -md-input-container:not(.md-input-invalid).md-input-focused .md-input { - border-color: orange; -} - -input:-webkit-autofill, -textarea:-webkit-autofill, -select:-webkit-autofill { - background-color: transparent !important; - text-shadow: none; - color: white !important; -} - -md-select-menu.md-default-theme, -md-select-menu md-option[selected] div.md-text { - color: orange; -} - -md-select.md-default-theme, -md-select .md-select-value { - border-bottom-color: orange; -} - -md-select .md-select-value span { - color: orange; -} - -md-input-container label { - color: white !important; -} - -md-input-container.md-input-focused label { - color: orange !important; -} - -md-option[selected] div.md-text { - color: orange; -} - -md-option div.md-text:hover { - color: orange; -} - -md-select.md-default-theme:not([disabled]):focus, -md-select:not([disabled]):focus .md-select-value { - color: orange; -} - -md-ripple-container { - -} - -/*tab overrides*/ -md-tab-item.md-active { - color: orange; -} diff --git a/vbd/gui/module/src/main/resources/vpp/assets/data/locale-en_US.json b/vbd/gui/module/src/main/resources/vpp/assets/data/locale-en_US.json deleted file mode 100644 index 77292a0b6..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/data/locale-en_US.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "WORKING": "It's Working" -} diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansExtraLight.otf b/vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansExtraLight.otf deleted file mode 100644 index 259574ae0..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansExtraLight.otf and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansRegular.otf b/vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansRegular.otf deleted file mode 100644 index 30c3be898..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/CiscoSansRegular.otf and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.eot b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.eot deleted file mode 100644 index 376bcf4d4..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.eot and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.svg b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.svg deleted file mode 100644 index 47624eb70..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.svg +++ /dev/null @@ -1,232 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2010 by Ralph du Carrois Erik Spiekermann Botio Nikoltchev All rights reserved -Designer : Ralph du Carrois Erik Spiekermann Botio Nikoltchev -Foundry : Ralph du Carrois Erik Spiekermann Botio Nikoltchev -Foundry URL : httpedenspiekermanncom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.ttf b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.ttf deleted file mode 100644 index 382713f2d..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.ttf and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.woff b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.woff deleted file mode 100644 index 8e6ac0b0f..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansextralight-webfont.woff and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.eot b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.eot deleted file mode 100644 index f1664ad24..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.eot and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.svg b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.svg deleted file mode 100644 index 2ac7c0b05..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.svg +++ /dev/null @@ -1,232 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2010 by Ralph du Carrois Erik Spiekermann Botio Nikoltchev All rights reserved -Designer : Ralph du Carrois Erik Spiekermann Botio Nikoltchev -Foundry : Ralph du Carrois Erik Spiekermann Botio Nikoltchev -Foundry URL : httpedenspiekermanncom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.ttf b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.ttf deleted file mode 100644 index 9ef31b1a9..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.ttf and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.woff b/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.woff deleted file mode 100644 index 50ebdd8f4..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/ciscosansregular-webfont.woff and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.eot b/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.eot deleted file mode 100644 index 7d9047f5b..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.eot and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.svg b/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.svg deleted file mode 100644 index 30f8d11a1..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.ttf b/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.ttf deleted file mode 100644 index 555148235..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.ttf and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.woff b/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.woff deleted file mode 100644 index a52429933..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/fonts/next-font.woff and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/images/bd1.svg b/vbd/gui/module/src/main/resources/vpp/assets/images/bd1.svg deleted file mode 100644 index bfd05671a..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/images/bd1.svg +++ /dev/null @@ -1 +0,0 @@ -Device Nodes_140507 \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/images/bd2.svg b/vbd/gui/module/src/main/resources/vpp/assets/images/bd2.svg deleted file mode 100644 index 91131ce34..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/images/bd2.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/vbd/gui/module/src/main/resources/vpp/assets/images/interf.svg b/vbd/gui/module/src/main/resources/vpp/assets/images/interf.svg deleted file mode 100644 index 4ddef8038..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/images/interf.svg +++ /dev/null @@ -1 +0,0 @@ -Device Nodes_140507 \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/images/vpp.gif b/vbd/gui/module/src/main/resources/vpp/assets/images/vpp.gif deleted file mode 100644 index 648ff6109..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/assets/images/vpp.gif and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/assets/js/lodash.min.js b/vbd/gui/module/src/main/resources/vpp/assets/js/lodash.min.js deleted file mode 100644 index e6c9820b2..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/js/lodash.min.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @license - * lodash 3.10.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash modern -o ./lodash.js` - */ -;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n); -}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r=F&&gu&&lu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++oi(t,a,0)&&u.push(a);return u}function at(n,t){var r=true;return Su(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ct(n,t,r,e){var u=e,o=u;return Su(n,function(n,i,f){i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i, -o=n)}),o}function lt(n,t){var r=[];return Su(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function st(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function pt(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++ut&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Be(u);++e=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function $t(n,t){ -var r=0;return Su(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function St(n,t){var e=-1,u=xr(),o=n.length,i=u===r,f=i&&o>=F,a=f&&gu&&lu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++eu(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Ft(n,t){for(var r=-1,e=t.length,u=Be(e);++r>>1,i=n[o];(r?i<=t:iu?w:o,u=1);++e=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++uarguments.length;return typeof e=="function"&&o===w&&Oo(r)?n(r,e,u,i):Ot(r,wr(e,o,4),u,i,t)}}function sr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,b=m,j=Be(m);b--;)j[b]=arguments[b];if(e&&(j=Mt(j,e,u)),o&&(j=qt(j,o,i)),_||y){var b=l.placeholder,k=v(j,b),m=m-k.length;if(mt?0:t)):[]}function Pr(n,t,r){var e=n?n.length:0;return e?((r?Ur(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0,0>t?0:t)):[]}function Kr(n){return n?n[0]:w}function Vr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?bu(u+e,0):e;else if(e)return e=Lt(n,t), -er?bu(u+r,0):r||0,typeof n=="string"||!Oo(n)&&be(n)?r<=u&&-1t?0:+t||0,e);++r=n&&(t=w),r}}function ae(n,t,r){function e(t,r){r&&iu(r),a=p=h=w,t&&(_=ho(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(ho()-l);0>=n||n>t?e(h,a):p=su(u,n)}function o(){e(g,p); -}function i(){if(f=arguments,l=ho(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=iu(a)),_=l,c=n.apply(s,f)):a||(a=su(o,e))}return i&&p?p=iu(p):p||t===v||(p=su(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Ge(L);if(t=0>t?0:+t||0,true===r)var y=true,g=false;else ge(r)&&(y=!!r.leading,v="maxWait"in r&&bu(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&iu(p),a&&iu(a), -_=0,a=p=h=w},i}function ce(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Ge(L);return r.cache=new ce.Cache,r}function le(n,t){if(typeof n!="function")throw new Ge(L);return t=bu(t===w?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=bu(r.length-t,0),o=Be(u);++et}function pe(n){return h(n)&&Er(n)&&nu.call(n,"callee")&&!cu.call(n,"callee")}function he(n,t,r,e){return e=(r=typeof r=="function"?Bt(r,e,3):w)?r(n,t):w,e===w?dt(n,t,r):!!e}function _e(n){return h(n)&&typeof n.message=="string"&&ru.call(n)==P}function ve(n){return ge(n)&&ru.call(n)==K}function ge(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ye(n){ -return null==n?false:ve(n)?uu.test(Qe.call(n)):h(n)&&Rn.test(n)}function de(n){return typeof n=="number"||h(n)&&ru.call(n)==V}function me(n){var t;if(!h(n)||ru.call(n)!=Z||pe(n)||!(nu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return ht(n,function(n,t){r=t}),r===w||nu.call(n,r)}function we(n){return ge(n)&&ru.call(n)==Y}function be(n){return typeof n=="string"||h(n)&&ru.call(n)==G}function xe(n){return h(n)&&Sr(n.length)&&!!Sn[ru.call(n)]}function Ae(n,t){ -return nt||!n||!mu(t))return r;do t%2&&(r+=n),t=yu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?Ur(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function $e(n,t,r){return r&&Ur(n,t,r)&&(t=w),n=u(n),n.match(t||Wn)||[]}function Se(n,t,r){return r&&Ur(n,t,r)&&(t=w),h(n)?Ne(n):ut(n,t)}function Fe(n){ -return n}function Ne(n){return bt(ot(n,true))}function Te(n,t,r){if(null==r){var e=ge(t),u=e?zo(t):w;((u=u&&u.length?gt(t,u):w)?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=gt(t,zo(t)));var o=true,e=-1,i=ve(n),f=u.length;false===r?o=false:ge(r)&&"chain"in r&&(o=r.chain);for(;++e=$)return r}else n=0;return Lu(r,e)}}(),Mu=le(function(n,t){ -return h(n)&&Er(n)?ft(n,pt(t,false,true)):[]}),qu=tr(),Pu=tr(true),Ku=le(function(n){for(var t=n.length,e=t,u=Be(l),o=xr(),i=o===r,f=[];e--;){var a=n[e]=Er(a=n[e])?a:[];u[e]=i&&120<=a.length&&gu&&lu?new Dn(e&&a):null}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Vu=le(function(t,r){r=pt(r);var e=rt(t,r);return It(t,r.sort(n)),e}),Zu=vr(),Yu=vr(true),Gu=le(function(n){return St(pt(n,false,true)); -}),Ju=le(function(n,t){return Er(n)?ft(n,t):[]}),Xu=le(Jr),Hu=le(function(n){var t=n.length,r=2--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&Ur(n,t,r)&&(t=w),t=n&&null==t?n.length:bu(+t||0,0),gr(n,E,w,w,w,w,t)},Nn.assign=Co,Nn.at=no,Nn.before=fe,Nn.bind=_o,Nn.bindAll=vo,Nn.bindKey=go,Nn.callback=Se,Nn.chain=Qr,Nn.chunk=function(n,t,r){t=(r?Ur(n,t,r):null==t)?1:bu(yu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=Be(vu(e/t));rr&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;rt?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?Ur(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){ -return n&&n.length?Nt(n,wr(t,r,3),false,true):[]},Nn.takeWhile=function(n,t,r){return n&&n.length?Nt(n,wr(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Ge(L);return false===r?e=false:ge(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ae(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=ne,Nn.times=function(n,t,r){if(n=yu(n),1>n||!mu(n))return[];var e=-1,u=Be(xu(n,4294967295));for(t=Bt(t,r,1);++ee?u[e]=t(e):t(e); -return u},Nn.toArray=je,Nn.toPlainObject=ke,Nn.transform=function(n,t,r,e){var u=Oo(n)||xe(n);return t=wr(t,e,4),null==r&&(u||ge(n)?(e=n.constructor,r=u?Oo(n)?new e:[]:$u(ve(e)?e.prototype:w)):r={}),(u?Pn:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=Gu,Nn.uniq=Gr,Nn.unzip=Jr,Nn.unzipWith=Xr,Nn.values=Ee,Nn.valuesIn=function(n){return Ft(n,Re(n))},Nn.where=function(n,t){return re(n,bt(t))},Nn.without=Ju,Nn.wrap=function(n,t){return t=null==t?Fe:t,gr(t,R,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++nr?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&bn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=te,Nn.find=ro,Nn.findIndex=qu,Nn.findKey=$o,Nn.findLast=eo, -Nn.findLastIndex=Pu,Nn.findLastKey=So,Nn.findWhere=function(n,t){return ro(n,bt(t))},Nn.first=Kr,Nn.floor=ni,Nn.get=function(n,t,r){return n=null==n?w:yt(n,Dr(t),t+""),n===w?r:n},Nn.gt=se,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=nu.call(n,t);if(!r&&!Wr(t)){if(t=Dr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),null==n)return false;t=Zr(t),r=nu.call(n,t)}return r||Sr(n.length)&&Cr(t,n.length)&&(Oo(n)||pe(n))},Nn.identity=Fe,Nn.includes=ee,Nn.indexOf=Vr,Nn.inRange=function(n,t,r){ -return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=xu(t,r)&&nr?bu(e+r,0):xu(r||0,e-1))+1;else if(r)return u=Lt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1; -if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=Ae,Nn.lte=function(n,t){return n<=t},Nn.max=ti,Nn.min=ri,Nn.noConflict=function(){return Zn._=eu,this},Nn.noop=Le,Nn.now=ho,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return er?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&Ur(n,t,r)&&(t=w),t=wr(t,r,3),1==t.length){n=Oo(n)?n:zr(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=$t(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&Ur(n,t,r)&&(t=r=w),n=u(n),t=nt(tt({},r||t),e,Qn),r=nt(tt({},t.imports),e.imports,Qn); -var o,i,f=zo(r),a=Ft(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ze((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Un,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"), -l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=Jo(function(){return qe(f,p+"return "+l).apply(w,a)}),t.source=l,_e(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?Ur(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?Ur(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n; -},Nn.trunc=function(n,t,r){r&&Ur(n,t,r)&&(t=w);var e=U;if(r=W,null!=t)if(ge(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(we(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ze(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o), --1u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,t){ -var r=t+1,e=r!=T;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:wr(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Pn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Pn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Pn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?bt:ze;zn.prototype[n]=function(n){ -return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Fe)},zn.prototype.reject=function(n,t){return n=wr(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Ru); -},_t(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){function t(n){return e&&i?u(n,1)[0]:u.apply(w,Jn([n],o))}var o=e?[1]:arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof zn,l=o[0],s=c||Oo(f);return s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false),l={func:ne,args:[t],thisArg:w},a=c&&!a,e&&!i?a?(f=f.clone(),f.__actions__.push(l),n.call(f)):u.call(w,this.value())[0]:!e&&s?(f=a?f:new zn(this), -f=n.apply(f,o),f.__actions__.push(l),new Ln(f,i)):this.thru(t)})}),Pn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?He:Je)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Nn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),_t(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Wu[e]||(Wu[e]=[])).push({ -name:t,func:r})}}),Wu[sr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){ -var n,t=this.__wrapped__.value(),r=this.__dir__,e=Oo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,a=-1,c=i.length;++a"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,bn=RegExp(wn.source),xn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,In=/^0[xX]/,Rn=/^\[object .+?Constructor\]$/,On=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Un=/['\n\r\u2028\u2029\\]/g,Wn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Sn={}; -Sn[X]=Sn[H]=Sn[Q]=Sn[nn]=Sn[tn]=Sn[rn]=Sn[en]=Sn[un]=Sn[on]=true,Sn[B]=Sn[D]=Sn[J]=Sn[M]=Sn[q]=Sn[P]=Sn[K]=Sn["[object Map]"]=Sn[V]=Sn[Z]=Sn[Y]=Sn["[object Set]"]=Sn[G]=Sn["[object WeakMap]"]=false;var Fn={};Fn[B]=Fn[D]=Fn[J]=Fn[M]=Fn[q]=Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[V]=Fn[Z]=Fn[Y]=Fn[G]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[P]=Fn[K]=Fn["[object Map]"]=Fn["[object Set]"]=Fn["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a", -"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y", -"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ln={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\", -"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Pn=zn[typeof self]&&self&&self.Object&&self,Kn=zn[typeof window]&&window&&window.Object&&window,Vn=qn&&qn.exports===Mn&&Mn,Zn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Kn!==(this&&this.window)&&Kn||Pn||this,Yn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=Yn, define(function(){ -return Yn})):Mn&&qn?Vn?(qn.exports=Yn)._=Yn:Mn._=Yn:Zn._=Yn}).call(this); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/assets/js/next.js b/vbd/gui/module/src/main/resources/vpp/assets/js/next.js deleted file mode 100644 index b9af39949..000000000 --- a/vbd/gui/module/src/main/resources/vpp/assets/js/next.js +++ /dev/null @@ -1,101 +0,0 @@ -/*Copyright (c) 2015 Cisco and/or its affiliates. - -The NeXt SDK is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives (CC BY-NC-ND) 4.0 International License . A copy of the license can be found in the license.txt file accompanying this distribution and at http://creativecommons.org/licenses/by-nc-nd/4.0/ - -The code, technical concepts, all information contained herein, and related documentation are the property of and are vested in Cisco Technology, Inc. and/or its affiliated entities, under various laws including copyright, international treaties, patent, trade secret and/or contract. All use of the material herein must be in strict accordance with the terms of the license noted above. Any rights not expressly licensed are reserved.*/ -/*Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. - -Section 1 – Definitions. - -Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -Licensor means the individual(s) or entity(ies) granting rights under this Public License. -NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. -Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. -Section 2 – Scope. - -License grant. -Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: -reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and -produce and reproduce, but not Share, Adapted Material for NonCommercial purposes only. -Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. -Term. The term of this Public License is specified in Section 6(a). -Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. -Downstream recipients. -Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). -Other rights. - -Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -Patent and trademark rights are not licensed under this Public License. -To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following conditions. - -Attribution. - -If You Share the Licensed Material, You must: - -retain the following if it is supplied by the Licensor with the Licensed Material: -identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); -a copyright notice; -a notice that refers to this Public License; -a notice that refers to the disclaimer of warranties; -a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material. -You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: - -for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only and provided You do not Share Adapted Material; -if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and -You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. -For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. -Section 5 – Disclaimer of Warranties and Limitation of Liability. - -Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. -Section 6 – Term and Termination. - -This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: - -automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or -upon express reinstatement by the Licensor. -For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. -For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. -Sections 1, 5, 6, 7, and 8 survive termination of this Public License. -Section 7 – Other Terms and Conditions. - -The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. -Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. -Section 8 – Interpretation. - -For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. -To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. -No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. -Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.*/ -var nx={VERSION:"0.8",DEBUG:!1,global:function(){return this}.call(null)};!function(){Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;return function(){return b.apply(a,arguments)}})}(),function(a){var b=Array.isArray||function(a){return a&&a.constructor===Array},c=function(a){var b=Object.prototype.hasOwnProperty;if(!a||"[object Object]"!==Object.prototype.toString(a)||a.nodeType||a===window)return!1;try{if(a.constructor&&!b.call(a,"constructor")&&!b.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return void 0===d||b.call(a,d)};a.extend=function(a){for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])}return a},a.each=function(c,d,e){if(c&&d)if(c.__each__)c.__each__(d,e);else if(b(c)||"[object Arguments]"===Object.prototype.toString.call(c)||a.global.NodeList&&c instanceof NodeList||a.global.HTMLCollection&&c instanceof HTMLCollection)for(var f=0,g=c.length;g>f&&d.call(e,c[f],f)!==!1;f++);else for(var h in c)if(c.hasOwnProperty(h)&&d.call(e,c[h],h)===!1)break},a.clone=function(){var d=function(){var a,d,e,f,g;return a=function(a,b){for(var c=0;c=0)return g;if(!b(g)&&!c(g))return g;var h,i,j,k=[],l=[],m=g,n=b(g)?[]:{};for(d(k,m,n),l.push({origin:m,dest:n,keys:f(m),idx:0});;){if(h=e(l),!h)break;if(m=h.origin,n=h.dest,h.keys.length<=h.idx)l.pop();else{if(i=h.keys[h.idx++],b(m[i]))n[i]=[];else{if(!c(m[i])){n[i]=m[i];continue}n[i]={}}j=a(k,m[i]),j?n[i]=j:(d(k,m[i],n[i]),l.push({origin:m[i],dest:n[i],keys:f(m[i]),idx:0}))}}return n}}();return function(b,c){if(b){if(b.__clone__)return b.__clone__(c);if(c)return d(b);if(a.is(b,"Array"))return b.slice(0);var e={};for(var f in b)b.hasOwnProperty(f)&&(e[f]=b[f]);return e}return b}}(),a.is=function(a,d){if(a&&a.__is__)return a.__is__(d);switch(d){case"Undefined":return void 0===a;case"Null":return null===a;case"Object":return a&&"object"==typeof a;case"String":case"Boolean":case"Number":case"Function":return typeof a===d.toLowerCase();case"Array":return b(a);case"POJO":return c(a);default:return a instanceof d}},a.get=function(a,b){return a?a.__get__?a.__get__(b):a[b]:void 0},a.set=function(a,b,c){a&&(a.__set__?a.__set__(b):a[b]=c)},a.gets=function(a){if(a){if(a.__gets__)return a.__gets__();var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}},a.sets=function(a,b){if(a&&b)if(a.__sets__)a.__sets__(b);else for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},a.has=function(a,b){return a?a.__has__?a.__has__(b):b in a:!1},a.compare=function(a,b){return a&&a.__compare__?a.__compare__(b):a===b?0:a>b?1:b>a?-1:1},a.path=function(a,c,d){var e=a;if(c){var f,g,h,i=0;if("string"==typeof c)f=c.split(".");else{if(!b(c))return a;f=c}if(h=f.length,void 0===d)for(;e&&h>i;i++)g=f[i],e=e.__get__?e.__get__(g):e[g];else{for(h-=1;e&&h>i;i++)g=f[i],e=e.__get__?e.__get__(g):e[g]=e[g]||{};g=f[i],e&&(e.__set__?e.__set__(g,d):e[g]=d,e=d)}}return e},a.idle=function(){},a.identity=function(a){return a},a.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"==a?b:3&b|8;return c.toString(16)}).toUpperCase()}}(nx),function(a){function b(){}function c(a,b){var c=j+b,d=a[c]&&"event"==a[c].__type__,e=a[c]=function(a,c){var d=this.__listeners__,e=d[b]=d[b]||[{owner:null,handler:null,context:null}];e[0]={owner:this,handler:a,context:c}};return e.__name__=b,e.__type__="event",d||a.__events__.push(b),e}function d(b,c,d){(a.is(d,a.keyword.internal.Keyword)||!a.is(d,"Object"))&&(d={value:d});var e,f=b[c]&&"property"==b[c].__type__;d.dependencies?(a.is(d.dependencies,"String")&&(d.dependencies=d.dependencies.replace(/\s/g,"").split(",")),e=a.keyword.binding({source:d.dependencies,async:!0,callback:function(){var b=this.owner;d.update&&d.update.apply(b,arguments),a.is(d.value,"Function")?b.set(c,d.value.apply(b,arguments)):d.update||d.value||b.set(c,arguments[0])}})):e=d.value,b[c]&&d.inherits&&(d=a.extend({},b[c].__meta__,d));var g=function(a,b){return void 0===a&&0===arguments.length?g.__getter__.call(this,b):g.__setter__.call(this,a,b)};return g.__name__=c,g.__type__="property",g.__meta__=d,g.__getter__=d.get||function(){return this["_"+c]},g.__setter__=d.set||function(a){this["_"+c]=a},g.getMeta=function(a){return a?g.__meta__[a]:g.__meta__},a.is(b,"Function")&&b.__properties__&&!b.__static__?b.prototype[c]=g:b[c]=g,void 0!==e&&(b.__defaults__[c]=e),f||(a.is(b,"Function")||b.__properties__!==b.constructor.__properties||(b.__properties__=b.__properties__.slice()),b.__properties__.push(c)),g}function e(a,b,c){var d=a[b]&&"method"==a[b].__type__;a[b]&&a[b]!==c&&(c.__super__=a[b]),c.__name__=b,c.__type__="method",c.__meta__={},a[b]=c,d||a.__methods__.push(b)}function f(f,j,m){m||(a.is(j,"Object")?(m=j,j=null,a.is(f,"Function")&&(j=f,f=null)):j||(a.is(f,"Object")?(m=f,f=null):a.is(f,"Function")&&(j=f,f=null))),m=m||{};var n,o,p,q,r,s,t=j||b,u=m.mixins||[],v=m.events||[],w=m.properties||{},x=m.methods||{},y=m.static||!1,z=m.statics||{};if(a.is(u,"Function")&&(u=[u]),t.__static__)throw new Error("Static class cannot be inherited.");if(y){for(r=function(){throw new Error("Cannot instantiate static class.")},r.__classId__=g++,r.__className__=f?f:"Anonymous",r.__static__=!0,r.__events__=[],r.__properties__=[],r.__methods__=[],r.__defaults__={},p=0,q=v.length;q>p;p++)c(r,v[p]);for(o in w)w.hasOwnProperty(o)&&d(r,o,w[o]);for(o in x)x.hasOwnProperty(o)&&e(r,o,x[o]);for(o in z)z.hasOwnProperty(o)&&(r[o]=z[o]);a.each(r.__defaults__,function(b,c){if(a.is(b,"Function"))this["_"+c]=b.call(this);else if(a.is(b,a.keyword.internal.Keyword))switch(b.type){case"binding":b.apply(this,c)}else this["_"+c]=b},r),x.init&&x.init.call(r)}else{r=function(){var b=arguments[0];"[object Arguments]"!==Object.prototype.toString.call(b)&&(b=arguments);var c=this.__mixins__;this.__id__=h++,this.__listeners__={},this.__bindings__=this.__bindings__||{},this.__watchers__=this.__watchers__||{},this.__keyword_bindings__=this.__keyword_bindings__||[],this.__keyword_watchers__=this.__keyword_watchers__||{},this.__keyword_init__=this.__keyword_init__||[],this.__initializing__=!0;for(var d=0,e=c.length;e>d;d++){var f=c[d].__ctor__;f&&f.call(this)}a.each(r.__defaults__,function(b,c){a.is(b,"Function")?this["_"+c]=b.call(this):a.is(b,a.keyword.internal.Keyword)?this.__keyword_bindings__.push({name:c,definition:b}):this["_"+c]=b},this),a.each(r.__properties__,function(b){var c=this[b];if(c&&"property"===c.__type__){var d=c.__meta__,e=d.watcher,f=d.init;e&&this.watch&&(a.is(e,"String")&&(e=this[e]),this.watch(b,e.bind(this)),this.__keyword_watchers__[b]=e),f&&this.__keyword_init__.push(f)}},this),a.each(this.__keyword_bindings__,function(a){a.instance=a.definition.apply(this,a.name)},this),a.each(this.__keyword_init__,function(a){a.apply(this,b)},this),this.__ctor__&&this.__ctor__.apply(this,b),a.each(this.__keyword_watchers__,function(a,b){a.call(this,b,this[b].call(this))},this),a.each(this.__keyword_bindings__,function(a){a.instance.notify()},this),this.__initializing__=!1},s=function(){},s.prototype=t.prototype,n=new s,n.constructor=r,n.__events__=t.__events__.slice(0),n.__properties__=t.__properties__.slice(0),n.__methods__=t.__methods__.slice(0),n.__defaults__=a.clone(t.__defaults__),n.__mixins__=t.__mixins__.concat(u),r.__classId__=g++,r.__className__=n.__className__=f?f:"Anonymous",r.__super__=n.__super__=t,r.prototype=n,x.init&&(n.__ctor__=x.init);for(o in m)m.hasOwnProperty(o)&&(n[i+o]=r[i+o]=m[o]);for(a.each(u,function(b){var f=b.prototype;a.each(b.__events__,function(a){c(n,a)}),a.each(b.__properties__,function(a){d(n,a,f[a].__meta__)}),a.each(b.__methods__,function(a){"init"!==a&&"dispose"!==a&&e(n,a,f[a])})}),p=0,q=v.length;q>p;p++)c(n,v[p]);for(o in w)w.hasOwnProperty(o)&&d(n,o,w[o]);for(o in x)x.hasOwnProperty(o)&&e(n,o,x[o]);for(o in z)z.hasOwnProperty(o)&&(r[o]=z[o]);r.__ctor__=n.__ctor__,r.__events__=n.__events__,r.__properties__=n.__properties__,r.__methods__=n.__methods__,r.__defaults__=n.__defaults__,r.__mixins__=n.__mixins__}return f&&a.path(l,f,r),k[r.__classId__]=r,r}var g=1,h=1,i="@",j="on",k={},l=a.global,m=b.prototype={constructor:b,dispose:function(){this.__listeners__={}},destroy:function(){this.dispose()},inherited:function(){var a=this.inherited.caller.__super__;return a?a.apply(this,arguments):void 0},is:function(b){if("string"==typeof b&&(b=a.path(l,b)),b){if(this instanceof b)return!0;for(var c=this.__mixins__,d=0,e=c.length;e>d;d++){var f=c[d];if(b===f)return!0}}return!1},has:function(a){var b=this[a];return b&&"property"==b.__type__},get:function(a){var b=this[a];return void 0!==b?"property"==b.__type__?b.call(this):b:void 0},set:function(a,b){var c=this[a];if(void 0!==c){if("property"==c.__type__)return c.call(this,b);this[a]=b}else this[a]=b},gets:function(){var b={};return a.each(this.__properties__,function(a){b[a]=this.get(a)},this),b},sets:function(a){if(a)for(var b in a)a.hasOwnProperty(b)&&this.set(b,a[b])},can:function(a){var b=this[j+a];return b&&"event"==b.__type__},on:function(a,b,c){var d=this.__listeners__,e=d[a]=d[a]||[{owner:null,handler:null,context:null}],f={owner:this,handler:b,context:c||this};return e.push(f),{release:function(){var a=e.indexOf(f);a>=0&&e.splice(a,1)}}},off:function(a,b,c){var d,e=this.__listeners__[a];if(e)if(b){c=c||this;for(var f=0,g=e.length;g>f;f++)if(d=e[f],d.handler==b&&d.context==c){e.splice(f,1);break}}else e.length=1},upon:function(a,b,c){var d=this.__listeners__,e=d[a]=d[a]||[{owner:null,handler:null,context:null}];e[0]={owner:this,handler:b,context:c}},fire:function(a,b){var c,d,e,f,g,h=this.__listeners__[a];for(g=h?h.slice():[],c=0,d=g.length;d>c;c++)if(e=g[c],e&&e.handler&&(h[c]===e||h.indexOf(e)>=0)&&(f=e.handler.call(e.context,e.owner,b),f===!1))return!1},__is__:function(a){return this.is(a)},__has__:function(a){return this.has(a)},__get__:function(a){return this.get(a)},__set__:function(a,b){return this.set(a,b)},__gets__:function(){return this.gets()},__sets__:function(a){return this.sets(a)}};b.__classId__=m.__classId__=0,b.__className__=m.__className__="nx.Object",b.__events__=m.__events__=[],b.__properties__=m.__properties__=[],b.__methods__=m.__methods__=[],b.__defaults__=m.__defaults__={},b.__mixins__=m.__mixins__=[],b.extendEvent=c,b.extendProperty=d,b.extendMethod=e,a.Object=b,a.define=f,a.classes=k}(nx),function(a){var b=a.keyword=a.keyword||{binding:function(b,c,d){var e=!1;return"string"!=typeof b&&(e=!!b.context,c=b.callback,d=b.async,b=b.source),new a.keyword.internal.Keyword({type:"binding",context:e,source:b,async:d,callback:c})},internal:{idle:function(){},watch:function(){var c=function(c,d,e,f){function g(i,j){if(i&&jj;j++){var l=h[j].split("=");g[l[0]]=l[1]}g.target=this,g.targetPath=b,g.sourcePath=i,g.source=e,g.converter&&(g.converter=c.converters[g.converter]||a.path(window,g.converter))}else g=a.clone(d),g.target=this,g.targetPath=b,g.source=g.source||this;f&&f.destroy(),this.__bindings__[b]=new c(g)},clearBinding:function(a){var b=this.__bindings__[a];b&&(b.destroy(),this.__bindings__[a]=null)},_watch:function(b,c,d){var e=this.__watchers__,f=e[b]=e[b]||[],g=this[b],h={owner:this,handler:c,context:d};if(f.push(h),g&&"property"==g.__type__&&!g._watched){var i=g.__setter__,j=g.getMeta("dependencies"),k=g.getMeta("equalityCheck");a.each(j,function(a){this.watch(a,function(){this.notify(b)},this)},this),g.__setter__=function(a,c){var d=this.get(b);return(d!==a||c&&c.force||k===!1)&&i.call(this,a,c)!==!1?this.notify(b,d):!1},g._watched=!0}return{affect:function(){var a=h.owner.get(b);h&&h.handler&&h.handler.call(h.context||h.owner,b,a,a,h.owner)},release:function(){var a=f.indexOf(h);a>=0&&f.splice(a,1)}}},_unwatch:function(a,b,c){var d,e=this.__watchers__,f=e[a];if(f)if(b){for(var g=0,h=f.length;h>g;g++)if(d=f[g],d.handler==b&&d.context==c){f.splice(g,1);break}}else f.length=0},_notify:function(a,b){var c,d,e,f=this.__watchers__[a];for(e=f?f.slice():[],c=0;c=0)&&d.handler.call(d.context||d.owner,a,this.get(a),b,d.owner)}}}),c=a.define("nx.Binding",b,{statics:{converters:{"boolean":{convert:function(a){return!!a},convertBack:function(a){return!!a}},inverted:{convert:function(a){return!a},convertBack:function(a){return!a}},number:{convert:function(a){return Number(a)},convertBack:function(a){return a}}},format:function(a,b){return a?a.replace("{0}",b):""}},properties:{target:{value:null},targetPath:{value:""},sourcePath:{value:""},source:{get:function(){return this._source},set:function(a){this._initialized&&this._source!==a&&(this._rebind(0,a),"<"==this._direction[0]&&this._updateTarget(),this._source=a)}},bindingType:{value:"auto"},direction:{value:"auto"},trigger:{value:"auto"},format:{value:"auto"},converter:{value:"auto"}},methods:{init:function(b){if(this.sets(b),b.target){var d,e=this.target(),f=this.targetPath(),g=this.sourcePath(),h=this.bindingType(),i=this.direction(),j=this.format(),k=this.converter(),l=e[f],m=this._watchers=[],n=this._keys=g.split("."),o=0,p=n.length,q=this;if(l){var r=l.__meta__.binding;"auto"==h&&(h=l.__type__),"auto"==i&&(i=this._direction=r&&r.direction||"<-"),"auto"==j&&(j=r&&r.format),"auto"==k&&(k=r&&r.converter)}else"auto"==h&&(h=e.can(f)?"event":"property"),"auto"==i&&(i=this._direction="<-"),"auto"==j&&(j=null),"auto"==k&&(k=null);if(k&&a.is(k,"Function")&&(k={convert:k,convertBack:function(a){return a}}),"<"==i[0])for(;p>o;o++)m.push({key:n[o],handler:function(a){return function(b,c){q._rebind(a,c),q._updateTarget()}}(o+1)});"event"==h?(d=m[p-1].key,m.length--,this._updateTarget=function(){var a=this._actualValue;a&&e.upon(f,a[d],a)}):this._updateTarget=function(){var b=this._actualValue;k&&(b=k.convert.call(this,b)),j&&(b=c.format(j,b)),a.path(e,f,b)},">"==i[1]&&e.watch&&"method"===e.watch.__type__&&e.watch(f,this._onTargetChanged=function(b,c){var d=c;k&&(d=k.convertBack.call(this,d)),a.path(this.source(),g,d)},this),this._initialized=!0,this.source(b.source)}},dispose:function(){this._target;this._rebind(0,null)},_rebind:function(a,b){for(var c,d=this._watchers,e=b,f=a,g=d.length;g>f;f++){var h=d[f],i=h.key,j=h.handler;c=h.source,c&&c.unwatch&&"method"===c.unwatch.__type__&&c.unwatch(i,j,this),h.source=e,e&&(e.watch&&"method"===e.watch.__type__&&e.watch(i,j,this),e=e.get?e.get(i):e[i])}this._actualValue=e}}})}(nx),function(a){var b=a.define("nx.data.Counter",{events:["change","increase","decrease"],methods:{init:function(){this._nummap={},this._strmap={},this._objmap=[],this._nxomap={},this._null=0,this._true=0,this._false=0,this._undefined=0},getCount:function(a){if("[object Null]"!==Object.prototype.toString.call(null)){if(null===a)return this._null;if(void 0===a)return this._undefined}switch(Object.prototype.toString.call(a)){case"[object Null]":return this._null;case"[object Boolean]":return a?this._true:this._false;case"[object Undefined]":return this._undefined;case"[object Number]":return this._nummap[a]||0;case"[object String]":return this._strmap[a]||0;default:return a.__id__?this._nxomap[a.__id__]||0:b.getArrayMapValue(this._objmap,a)||0}},setCount:function(a,c){"[object Null]"!==Object.prototype.toString.call(null)&&(null===a?this._null=c:void 0===a&&(this._undefined=c));var d=this.getCount(a);if(d===c)return c;switch(Object.prototype.toString.call(a)){case"[object Null]":this._null=c;break;case"[object Boolean]":a?this._true=c:this._false=c;break;case"[object Undefined]":this._undefined=c;break;case"[object Number]":this._nummap[a]=c;break;case"[object String]":this._strmap[a]=c;break;default:a.__id__?this._nxomap[a.__id__]=c:b.setArrayMapValue(this._objmap,a,c)}var e={item:a,previousCount:d,count:c};return d>c?this.fire("decrease",e):this.fire("increase",e),this.fire("change",e),c},increase:function(a,b){return b=arguments.length>1?Math.floor(1*b||0):1,this.setCount(a,this.getCount(a)+b)},decrease:function(a,b){return b=arguments.length>1?Math.floor(1*b||0):1,this.setCount(a,this.getCount(a)-b)},__addArrayItem:function(a){this._arrcache.push(a)},__removeArrayItem:function(a){var b=this._arrcache.indexOf(a);this._arrcache.splice(b,1)},__getArrayCounter:function(b){var c=0;return a.each(this._arrcache,function(a){b===a&&c++}),c}},statics:{_getArrayMapItem:function(a,b){return a.filter(function(a){return a.key===b})[0]},getArrayMapValue:function(a,c){return(b._getArrayMapItem(a,c)||{}).value},setArrayMapValue:function(a,c,d){var e=b._getArrayMapItem(a,c);return e?e.value=d:a.push({key:c,value:d}),d}}})}(nx),function(a){var b=a.Iterable,c=a.define("nx.data.Collection",b,{properties:{count:{get:function(){return this._data.length},set:function(){throw new Error("Unable to set count of Collection")}},length:{get:function(){return this._data.length},set:function(){throw new Error("Unable to set length of Collection")}},unique:{set:function(a){if(!!this._unique!=!!a&&(this._unique=!!a,a)){var b,c=this._data,d=c.length;for(b=d-1;b>0;b--)this.indexOf(c[b])=0;c--)(this.indexOf(e[c])>=0||e.indexOf(e[c])=0?(b._data.splice(c,1),c):-1};if(arguments.length>1){var d,e=[];for(d=arguments.length-1;d>=0;d--)e.unshift(c(arguments[d]));return e}return c(a)},removeAt:function(a){return this._data.splice(a,1)[0]},insert:function(a,b){return this._unique&&-1!=this.indexOf(a)?null:(this._data.splice(b,0,a),a)},insertRange:function(a,c){var d,e=this._data,f=b.toArray(a).slice();if(this._unique)for(d=f.length-1;d>=0;d--)(this.indexOf(f[d])>=0||f.indexOf(f[d])d;d++)if(0===a.compare(c[d],b))return d;return-1},lastIndexOf:function(b){var c=this._data;if(c.lastIndexOf)return c.lastIndexOf(b);for(var d=c.length-1;d>=0;d--)if(0===a.compare(c[d],b))return d;return-1},contains:function(a){return this.indexOf(a)>=0},toggle:function(a,b){arguments.length<=1?this.contains(a)?this.remove(a):this.add(a):b?this.add(a):this.remove(a)},sort:function(a){return this._data.sort(a)},each:function(b,c){a.each(this._data,b,c)},toArray:function(){return this._data.slice(0)}}})}(nx),function(a){{var b=a.Iterable,c=a.define({properties:{key:{},value:{set:function(a){this._dict?this._dict.setItem(this._key,a):this._value=a}}},methods:{init:function(a,b){this._dict=a,this._key=b}}}),d=a.define(b,{methods:{init:function(a){this._dict=a},each:function(a,b){this._dict.each(function(c){a.call(b,c.key())})}}}),e=a.define(b,{methods:{init:function(a){this._dict=a},each:function(a,b){this._dict.each(function(c){a.call(b,c.value())})}}});a.define("nx.data.Dictionary",b,{properties:{count:{get:function(){return this._items.length}},keys:{get:function(){return this._keys}},values:{get:function(){return this._values}}},methods:{init:function(a){this._map={},this._items=[];this.setItems(a),this._keys=new d(this),this._values=new e(this)},contains:function(a){return a in this._map},getItem:function(a){var b=this._map[a];return b&&b._value},setItem:function(a,b){var d=this._map[a];return d||(d=this._map[a]=new c(this,""+a),this._items.push(d)),d._value=b,d},setItems:function(b){b&&a.each(b,function(a,b){this.setItem(b,a)},this)},removeItem:function(a){var b=this._map;if(a in b){var c=b[a],d=this._items.indexOf(c);return delete b[a],d>=0&&this._items.splice(d,1),c._dict=null,c}},clear:function(){var b=this._items.slice();return this._map={},this._items=[],a.each(b,function(a){a._dict=null}),b},each:function(b,c){c=c||this,a.each(this._map,function(a,d){b.call(c,a,d)})},toArray:function(){return this._items.slice()},toObject:function(){var a={};return this.each(function(b){a[b.key()]=b.value()}),a}}})}}(nx),function(a){a.define("nx.data.ObservableObject",a.Observable,{methods:{init:function(a){this.inherited(),this._data=a||{}},dispose:function(){this.inherited(),this._data=null},has:function(a){var b=this[a];return b&&"property"==b.__type__||a in this._data},get:function(a){var b=this[a];return void 0===b?this._data[a]:"property"==b.__type__?b.call(this):void 0},set:function(a,b){var c=this[a];if(void 0===c){if(this._data[a]!==b)return this._data[a]=b,this.notify(a),!0}else if("property"==c.__type__)return c.call(this,b)},gets:function(){var b=a.clone(this._data);return a.each(this.__properties__,function(a){b[a]=this.get(a)},this),b}}})}(nx),function(a){var b=/^(&&|\|\||&|\||\^|-|\(|\)|[a-zA-Z\_][a-zA-Z\d\_]*|\s)*$/,c=/&&|\|\||&|\||\^|-|\(|\)|[a-zA-Z\_][a-zA-Z\d\_]*/g,d=/[a-zA-Z\_][a-zA-Z\d\_]*/,e=/&&|\|\||&|\||\^|-|\(|\)/,f={"-":"complement","&":"cross","^":"delta","|":"union","&&":"and","||":"or"},g=a.define("nx.data.ObservableCollection",a.data.Collection,{mixins:a.Observable,events:["change"],methods:{add:function(a){return a=this.inherited(a),this._unique&&null===a||(this.notify("count"),this.notify("length"),this.fire("change",{action:"add",items:[a]})),a},addRange:function(a){var b=this.inherited(a);return b.length&&(this.notify("count"),this.notify("length"),this.fire("change",{action:"add",items:b})),b},insert:function(a,b){return a=this.inherited(a,b),this._unique&&null===a||(this.notify("count"),this.notify("length"),this.fire("change",{action:"add",items:[a],index:b})),a},insertRange:function(a,b){var c=this.inherited(a,b);return c.length&&(this.notify("count"),this.notify("length"),this.fire("change",{action:"add",items:c,index:b})),c},remove:function(a){var b;return arguments.length>1?(a=Array.prototype.slice.call(arguments),b=this.inherited.apply(this,a),b.length&&(this.notify("count"),this.notify("length"),this.fire("change",{action:"remove",items:a,indices:b})),b):(b=this.inherited(a),b>=0&&(this.notify("count"),this.notify("length"),this.fire("change",{action:"remove",items:[a],index:b,indices:[b]})),b)},removeAt:function(a){var b=this.inherited(a);return void 0!==b&&(this.notify("count"),this.notify("length"),this.fire("change",{action:"remove",items:[b],index:a})),b},clear:function(){var a=this.inherited();this.notify("count"),this.notify("length"),this.fire("change",{action:"clear",items:a})},sort:function(a){var b=this.inherited(a);return this.notify("count"),this.notify("length"),this.fire("change",{action:"sort",comparator:a||function(a,b){return a>b?1:b>a?-1:0}}),b},monitor:function(b){var c=this,d={objcache:[],idcache:{},findPair:function(a){var b;for(b=0;b=0&&(n.count+=1*!n.map[a]+1*!!b-1,n.map[a]=b,n.sync())}};return h=j.monitor(n.monitor),{release:function(){f&&f.release(),h.release()}}},_calculate:function(b,c){var d,e,h=this,i=c[0];switch(i){case"&&":e=function(d){var f,g,i,j;return"string"==typeof c[d]?f=h.map().getItem(c[d]):(f=new a.data.ObservableCollection,g=h._calculate(f,c[d])),d>=c.length-1?i=f.monitor(function(a){return b.add(a),function(){b.remove(a)}}):(i=f.watch("length",function(a,b){b?j=e(d+1):j&&(j.release(),j=null)}),i.affect()),{release:function(){j&&j.release(),i&&i.release(),g&&g.release()}}},d=e(1);break;case"||":e=function(d){var f,i,j,k;return"string"==typeof c[d]?f=h.map().getItem(c[d]):(f=new a.data.ObservableCollection,i=h._calculate(f,c[d])),d>=c.length-1?j=f.monitor(g.getCollectionSyncMonitor(b)):(j=f.watch("length",function(a,c){k&&k.release(),k=c?f.monitor(g.getCollectionSyncMonitor(b)):e(d+1)}),j.affect()),{release:function(){k&&k.release(),j&&j.release(),i&&i.release()}}},d=e(1);break;default:e=function(){var d,e,j,k=[],l=[];for(d=1;dd&&e>=f&&b.add(c.item),d>=f&&f>e&&b.remove(c.item)}),h=c[0].monitor(function(a){return d.increase(a,f),function(){d.decrease(a,f)}});return e.push(h),a.each(c,function(a,b){if(b>0){var c=a.monitor(function(a){return d.decrease(a),function(){d.increase(a)}});e.push(c)}}),{release:function(){g.release(),a.each(e,function(a){a.release()})}}},delta:function(b,c){b.clear();var d=!0,e=[];return a.each(c,function(a){var c=a.monitor(function(a){return b.toggle(a),function(){d&&b.toggle(a)}});e.push(c)}),{release:function(){d=!1,a.each(e,function(a){a.release()})}}},or:function(a,b){a.clear();var c,d=!0,e=function(c){var f,g,h=b[c];return f=h.watch("length",function(f,i){g&&g.release(),g=c=0)return c},f=function(a,b,c){return"[object Array]"===Object.prototype.toString.call(b)&&b[0]===a?(b.push(c),b):[a,b,c]};return function(a){"string"==typeof a&&(a=a.match(c)),a=a.concat([")"]);for(var g,h,i,j=[],k=[],l=[];a.length;)if(g=a.shift(),")"===g)for(;(h=j.pop())&&"("!==h;)i=k.pop(),k.push(f(h,k.pop(),i));else if("("===g)j.push(g);else if(g.match(d))k.push(g),-1==l.indexOf(g)&&l.push(g);else if(g.match(e)){for(;j.length;){if(h=j.pop(),"("===h||b(h)>b(g)){j.push(h);break}i=k.pop(),k.push(f(h,k.pop(),i))}j.push(g)}return k[0]&&(k[0].operands=l),k[0]}}()}})}(nx),function(a){var b=a.Observable,c=a.data.Dictionary,d=a.define(b,{properties:{key:{},value:{set:function(a){this._dict?this._dict.setItem(this._key,a):this._value=a}}},methods:{init:function(a,b){this._dict=a,this._key=b}}});a.define("nx.data.ObservableDictionary",c,{mixins:b,events:["change"],methods:{setItem:function(a,b){var c,e=this._map,f=this._items,g=e[a];g?(c=g.value,g._value=b,g.notify("value"),this.fire("change",{action:"replace",items:[g],oldValue:c,newValue:b,oldItem:g,newItem:g})):(g=e[a]=new d(this,a),f.push(g),g._dict=this,g._value=b,this.notify("count"),this.fire("change",{action:"add",index:f.length-1,items:[g]}))},removeItem:function(a){var b=this._map;if(a in b){var c=b[a],d=this._items.indexOf(c);return delete b[a],d>=0&&this._items.splice(d,1),c._dict=null,this.notify("count"),this.fire("change",{action:"remove",items:[c]}),c}},clear:function(){var a=this.inherited();this.notify("count"),this.fire("change",{action:"clear",items:a})},monitor:function(a,b){if("string"==typeof a&&a.indexOf(",")>=0||"[object Array]"===Object.prototype.toString.call(a))return"string"==typeof a&&(a=a.replace(/\s/g,"").split(",")),this._monitor(a,b);"function"==typeof a&&(b=a,a=null);var c=this,d={map:{},get:function(a){return d.map[a]},set:function(b,c){if(!a||a===b){var e=d.get(b);e&&e(),c?d.map[b]=c:delete d.map[b]}},release:function(){var a,b=d.map;for(a in b)b[a]()},callback:function(c,d){return a?a===c?b(d):void 0:b(c,d)}},e=c.on("change",function(a,b){var c,e,f,g;switch(b.action){case"replace":case"add":for(c=0;c=0&&(d.values[e]=item.value(),f=!0);f&&d.affect()});return{affect:d.affect,release:e.release}}}})}(nx),function(a){{var b=a.Iterable,c=Array.prototype,d=c.every,e=c.some,f=c.filter,g=c.map,h=c.reduce;a.define("nx.data.Query",a.Iterable,{methods:{init:function(a){this._iter=a,this.reset()},reset:function(){this._where=null,this._orderBy=null,this._unions=[],this._joins=[],this._begin=0,this._end=null},where:function(a){return this._where=a,this},orderBy:function(b,c){return this._orderBy=a.is(b,"Function")?c?function(a,c){return b(c,a)}:b:c?function(c,d){return a.compare(a.path(d,b),a.path(c,b))}:function(c,d){return a.compare(a.path(c,b),a.path(d,b))},this},groupBy:function(){throw new Error("Not Implemented")},distinct:function(){throw new Error("Not Implemented")},skip:function(a){return this._begin=a,this._end&&(this._end+=a),this},take:function(a){return this._end=this._begin+a,this},join:function(){throw this._join=function(){},new Error("Not Implemented")},select:function(b){var c=this.toArray();return a.is(b,"Function")?g.call(c,b):a.is(b,"String")?g.call(c,function(c){return a.path(c,b)}):a.is(b,"Array")?g.call(c,function(c){var d={};return a.each(b,function(b){a.path(d,b,a.path(c,b))}),d}):c},first:function(a){var b=this.toArray();if(!a)return b[0];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(a(e))return e}},last:function(a){var b=this.toArray();if(!a)return b[b.length-1];for(var c=b.length-1;c>=0;c--){var d=b[c];if(a(d))return d}},all:function(a){return d.call(this.toArray(),a)},any:function(a){return e.call(this.toArray(),a)},max:function(){return h.call(this.toArray(),function(a,b){return a>b?a:b})},min:function(){return h.call(this.toArray(),function(a,b){return b>a?a:b})},sum:function(){return h.call(this.toArray(),function(a,b){return a+b})},average:function(){var a=this.toArray();return h.call(a,function(a,b){return a+b})/a.length},toArray:function(){var c=b.toArray(this._iter);return a.each(this._unions,function(a){c.concat(b.toArray(a))}),this._where&&(c=f.call(c,this._where)),this._orderBy&&(c=c.sort(this._orderBy)),c=this._end>0?c.slice(this._begin,this._end):c.slice(this._begin),this.reset(),c}},statics:{query:function(){var b,c={publics:{select:function(b,c){var d=[];if(a.is(b,"Array")&&a.is(c,"Function")){var e,f;for(e=0;e1?d:d[0]):(f=d.map,g=d.aggregate),"string"==typeof f&&(f=f.replace(/\s/g,"").split(",")),a.is(f,"Array")&&f[0]&&"string"==typeof f[0]&&(f=function(a){return function(b){var c,d={};for(c=0;cc[e])return f?-1:1;if(c[e]>b[e])return f?1:-1}return 0}}(c)),c&&"function"==typeof c&&b.sort(c),b}},query:function(a,b){return 1==arguments.length&&(b=a,a=b.array),a?(b.select&&(a=c.publics.select(a,b.select)),b.aggregate&&(a=c.privates.aggregate(a,b.aggregate)),b.mapping&&(a=c.privates.mapping(a,b.mapping)),b.orderby&&(a=c.privates.orderby(a,b.orderby)),a):a}};for(b in c.publics)c.query[b]=c.publics[b];return c.query}()}})}}(nx),function(a){a.define("nx.data.SortedMap",{mixins:a.Observable,events:["change"],properties:{length:{get:function(){return this._data.length}}},methods:{init:function(b){b=b||[];var c=this.__validateData(b);if(!c)throw Error("init data are invalid!");this._data=b,this._map={};var d=this;a.each(b,function(a){var b=d._map;b[a.key]=a})},__validateData:function(b){var c=!0;return a.is(b,"Array")?a.each(b,function(a){return void 0===a.key||void 0===a.value?(c=!1,!1):void 0}):c=!1,c},add:function(a,b,c){var d={key:a,value:b};return this._map[a]=d,void 0===c&&(c=this._data.length),this._data.splice(c,0,d),this.notify("length"),this.fire("change",{action:"add",index:c,key:a,value:b}),b},remove:function(a){var b,c;if(c=this._map[a],void 0!==c){var d=this._data.indexOf(c);if(!(d>-1))throw'key:"'+a+'" has been found in the _map but not exists in the _data!';b=c.value,this._data.splice(d,1),delete this._map[a],this.notify("length"),this.fire("change",{action:"remove",index:d,key:a,value:b})}return b},removeAt:function(a){var b,c=this.__getItemAt(a);return void 0!==c&&(b=c.value,this._data.splice(a,1),delete this._map[c.key],this.notify("length"),this.fire("change",{action:"remove",index:a,key:c.key,value:b})),b},__getItemAt:function(a){var b=this._data[a>-1?a:this._data.length+a];return b},getKeyAt:function(a){var b,c=this.__getItemAt(a);return c&&(b=c.key),b},indexOf:function(a){var b=this._map[a],c=-1;return void 0!==b&&(c=this._data.indexOf(b)),c},getValue:function(a){var b,c=this._map[a];return void 0!==c&&(b=c.value),b},setValue:function(a,b){var c=this._map[a];if(void 0===c)throw Error('the key:"'+a+'" dos not exists!');var d=c.value,e=this._data.indexOf(c);return c.value=b,this.fire("change",{action:"set",index:e,key:a,value:b,oldValue:d}),b},getValueAt:function(a){var b,c=this.__getItemAt(a);return void 0!==c&&(b=c.value),b},setValueAt:function(a,b){var c=this.__getItemAt(a);if(void 0!==c){var d=c.value;c.value=b,this.fire("change",{action:"set",index:a,key:c.key,value:b,oldValue:d})}return b},setIndex:function(a,b){var c=this.indexOf(a),d=!0;if(-1!=c&&b!==c){var e=this._data.splice(c,1);this._data.splice(b,0,e[0]),this.fire("change",{action:"reorder",index:b,oldIndex:c,key:a})}else d=!1;return d},sort:function(a){this._data.sort(function(b,c){return a.call(null,b.key,b.value,c.key,c.value)})},toArray:function(){for(var b=this._data.slice(0),c=0,d=b.length;d>c;c++)b[c]=a.clone(b[c]);return b},each:function(a){for(var b=this.toArray(),c=0,d=b.length;d>c;c++){var e=b[c];a.call(this,e.key,e.value,c)}},__each__:function(a){for(var b=this.toArray(),c=0,d=b.length;d>c;c++){var e=b[c];a.call(this,e.key,e.value)}}}})}(nx),function(a){function b(a){var b,c=new RegExp(a+"(\\d+\\.\\d+)");return(b=c.exec(j))?parseFloat(b[1]):0}var c,d=a.global,e=d.document,f=e.documentMode||0,g=e.compatMode,h=d.navigator,i=d.location,j=h.userAgent.toLowerCase(),k=i.protocol.toLowerCase(),l=e.createElement("div"),m=l.style,n=(c=j.match(/msie (\d+)\./))&&c[1];m.cssText="opacity:.55";var o={webkit:["webkit","-webkit-"],gecko:["Moz","-moz-"],presto:["O","-o-"],trident:["ms","-ms-"]},p={windows:/windows|win32/,macintosh:/macintosh|mac_powerpc/,linux:/linux/},q={addEventListener:!!e.addEventListener,dispatchEvent:!!e.dispatchEvent,getBoundingClientRect:!!e.documentElement.getBoundingClientRect,onmousewheel:"onmousewheel"in e,XDomainRequest:!!d.XDomainRequest,crossDomain:!(!d.XDomainRequest&&!d.XMLHttpRequest),getComputedStyle:"getComputedStyle"in d,iePropertyChange:!!(n&&9>n),w3cChange:!n||n>8,w3cFocus:!n||n>8,w3cInput:!n||n>9,innerText:"innerText"in l,firstElementChild:"firstElementChild"in l,cssFloat:"cssFloat"in m,opacity:/^0.55$/.test(m.opacity),filter:"filter"in m,classList:!!l.classList,removeProperty:"removeProperty"in m,touch:"ontouchstart"in e.documentElement},r={firefox:function(){return{name:"gecko",version:b("rv:")}},opera:function(){var a=b("presto\\/"),c="presto";return a||(c="webkit",a=b("webkit\\/")),{name:c,version:a}},ie:function(){return{name:"trident",version:b("trident\\/")||4}},"default":function(){return{name:"webkit",version:b("webkit\\/")}}},s=function(){var a;for(a in p)if(p[a].test(j))break;return{name:a}}(),t=function(){var a,c,d,e,f=0;for(a in u)if(c=u[a],d=new RegExp(c.is).test(j),e=new RegExp(c.exclude).test(j),d&&!e){j.indexOf("opr/")>-1&&(a="opera",c.version="\\bopr/"),f=b(c.version);break}return{name:a,version:f}}(),u={ie:{is:"msie",exclude:"opera",version:"msie "},firefox:{is:"gecko",exclude:"webkit",version:"\\bfirefox/"},chrome:{is:"\\bchrome\\b",exclude:null,version:"\\bchrome/"},safari:{is:"safari",exclude:"\\bchrome\\b",version:"version/"},opera:{is:"opera",exclude:null,version:"version/"}},v={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:"chrome"===t.name||"webkit"===t.name||"safari"===t.name?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145},w=(r[t]||r["default"])();a.define("nx.Env",{"static":!0,properties:{documentMode:{value:f},compatMode:{value:g},userAgent:{value:j},strict:{value:"CSS1Compat"===g},secure:{value:0===k.indexOf("https")},os:{value:s},prefix:{value:o[w.name]},engine:{value:w},browser:{value:t},keyMap:{value:v}},methods:{support:function(a){return q[a]},getSupportMap:function(){return q},registerSupport:function(a,b){a in q||(q[a]=b)}}})}(nx),function(a){var b=a.global,c=b.document,d=a.Env,e=c.createElement("div"),f=e.style,g=/width|height|top|right|bottom|left|size|margin|padding/i,h=/[c-x%]/,i="px",j=/(?:^|-)([a-z])/g,k=/([A-Z])/g,l={lineHeight:!0,zIndex:!0,zoom:!0},m={"float":"cssFloat"},n={},o={};a.ready=function(c){var d;if("string"==typeof c&&(c=a.path(b,c)),"function"==typeof c){if(c.__classId__){var e=a.define(a.ui.Application,{properties:{comp:{value:function(){return new c}}},methods:{start:function(){this.comp().attach(this)},stop:function(){this.comp().detach(this)}}});d=function(){var a=new e;a.start()}}else d=c;window.addEventListener("load",d)}};a.define("nx.Util",{"static":!0,methods:{getCssText:function(b){var c=[""];return a.each(b,function(a,b){c.push(this.getStyleProperty(b,!0)+":"+this.getStyleValue(b,a))},this),c.join(";")},getStyleValue:function(a,b){var c=this.getStyleProperty(a),d=b;return g.test(c)&&(h.test(b)||l[c]||(d+=i)),d},getStyleProperty:function(a,b){if(b){if(a in o)return o[a]}else if(a in n)return n[a];var c=m[a]||this.lowerCamelCase(a);return c in f?b&&(c=this.deCamelCase(a),o[a]=c):b?(c=d.prefix()[1]+a,o[a]=c):(c=d.prefix()[0]+this.upperCamelCase(a),n[a]=c),c},lowerCamelCase:function(a){var b=this.upperCamelCase(a);return b.charAt(0).toLowerCase()+b.substring(1)},upperCamelCase:function(a){return a.replace(j,function(a,b){return b.toUpperCase()})},deCamelCase:function(a){return a.replace(k,function(a,b){return"-"+b.toLowerCase()})},capitalize:function(a){return a.charAt(0).toUpperCase()+a.slice(1)}}})}(nx),function(a){{var b=a.data.Collection;a.define("nx.dom.Node",{methods:{init:function(a){this.$dom=a},compare:function(a){return a&&this.$dom===a.$dom?0:-1},isElement:function(){return 1===this.$dom.nodeType},index:function(){var a,b=0;if(null!==this.parentNode())for(;null!==(a=this.previousSibling());)++b;else b=-1;return b},childAt:function(a){var b=null;if(a>=0)for(b=this.firstChild();b&&--a>=0;){b=b.nextSibling();break}return b},contains:function(a){return this.$dom&&this.$dom.contains(a.$dom)},firstChild:function(){return new this.constructor(this.$dom.firstElementChild)},lastChild:function(){return new this.constructor(this.$dom.lastElementChild)},previousSibling:function(){return new this.constructor(this.$dom.previousElementSibling)},nextSibling:function(){return new this.constructor(this.$dom.nextElementSibling)},parentNode:function(){return new this.constructor(this.$dom.parentNode)},children:function(){var c=new b;return a.each(this.$dom.children,function(a){c.add(new this.constructor(a))},this),c},cloneNode:function(a){return new this.constructor(this.$dom.cloneNode(a))},hasChild:function(a){return a.$dom.parentNode==this.$dom},appendChild:function(a){this.$dom.appendChild(a.$dom)},insertBefore:function(a,b){this.$dom.insertBefore(a.$dom,b.$dom)},removeChild:function(a){this.hasChild(a)&&this.$dom.removeChild(a.$dom)},empty:function(){this.children().each(function(a){this.removeChild(a)},this)}}})}}(nx),function(a){a.define("nx.dom.Text",a.dom.Node)}(nx),function(a){function b(a,b){return(" "+a.className+" ").indexOf(" "+b+" ")}var c=a.global,d=c.document,e=a.Env,f=a.Util,g=/^t(?:able|d|h)$/i,h=/\s+/,i={thin:"2px",medium:"4px",thick:"6px"},j="gecko"===e.engine().name,k="margin",l="padding",m="border",n="position",o="fixed",p=a.data.Collection,q={value:{set:function(a,b){var c=a.type;switch(c){case"checkbox":case"radio":a.checked=!!b;break;default:a.value=b}},get:function(a){var b=a.type,c=a.value;switch(b){case"checkbox":case"radio":c=!!a.checked;break;default:c=a.value}return c}}},r={"class":"className","for":"htmlFor"},s={disabled:"disabled",readonly:"readonly",checked:"checked"};!function(){a.each(r,function(a,b){q[b]={set:function(b,c){b[a]=c},get:function(b){return b[a]}}}),a.each(s,function(a,b){q[b]={set:function(c,d){d?c.setAttribute(b,b):c.removeAttribute(b),c[a]=!!d},get:function(b){return!!b[a]}}})}();var t=a.define("nx.dom.Element",a.dom.Node,{methods:{get:function(a){return"text"===a?this.getText():"html"==a?this.getHtml():this.getAttribute(a)},set:function(a,b){"text"===a?this.setText(b):"html"==a?this.setHtml(b):this.setAttribute(a,b)},select:function(a){var b=this.$dom.querySelector(a);return new t(b)},selectAll:function(a){for(var b=this.$dom.querySelectorAll(a),c=0,d=b[c],e=new p;d;c++)d=b[c],e.add(new t(d));return e},focus:function(){this.$dom.focus()},blur:function(){this.$dom.blur()},show:function(){this.setAttribute("nx-status","")},hide:function(){this.setAttribute("nx-status","hidden")},hasClass:function(c){var d=this.$dom;return a.Env.support("classList")?this.$dom.classList.contains(c):b(d,c)>-1},setClass:function(a,b){b?this.addClass(a):this.removeClass(a)},addClass:function(){var b=this.$dom,c=arguments,d=b.classList;if(d){if(a.Env.support("classList"))return 1===c.length&&c[0].search(h)>-1&&(c=c[0].split(h)),d.add.apply(d,c);if(!this.hasClass(c[0])){var e=b.className;return b.className=e?e+" "+c[0]:c[0]}}},removeClass:function(){var c=this.$dom;if(c)if(a.Env.support("classList")){var d=this.$dom.classList;if(d)return d.remove.apply(d,arguments)}else{var e=c.className,f=b(c,arguments[0]),g=arguments[0];f>-1&&(0===f?e!==g&&(g+=" "):g=" "+g,c.className=e.replace(g,""))}},toggleClass:function(b){this.$dom;return a.Env.support("classList")?this.$dom.classList.toggle(b):void(this.hasClass(b)?this.removeClass(b):this.addClass(b))},getDocument:function(){var a=this.$dom,b=d;return a&&(b=9===a.nodeType?a:a.ownerDocument||a.document),b},getWindow:function(){var a=this.getDocument();return a.defaultView||a.parentWindow||c},getRoot:function(){return e.strict()?d.documentElement:d.body},getBound:function(){var a=this.$dom.getBoundingClientRect(),b=this.getRoot(),c=b.clientTop||0,d=b.clientLeft||0;return{top:a.top-c,right:a.right,bottom:a.bottom,left:a.left-d,width:a.width,height:a.height}},margin:function(a){return this._getBoxWidth(k,a)},padding:function(a){return this._getBoxWidth(l,a)},border:function(a){return this._getBoxWidth(m,a)},getOffset:function(){var a=this.$dom.getBoundingClientRect(),b=this.getRoot(),d=b.clientTop||0,e=b.clientLeft||0;return{top:a.top+(c.pageYOffset||b.scrollTop)-d,left:a.left+(c.pageXOffset||b.scrollLeft)-e}},setOffset:function(a){var b=this.getStyle(n),d=a,e={left:Math.max(c.pageXOffset||0,root.scrollLeft),top:Math.max(c.pageYOffset||0,root.scrollTop)};b===o&&(d={left:parseFloat(d)+e.scrollX,top:parseFloat(d)+e.scrollY}),this.setStyles(d)},hasStyle:function(a){var b=this.$dom.style.cssText;return b.indexOf(a+":")>-1},getStyle:function(a,b){var c=f.getStyleProperty(a);if(b)return this.$dom.style[c];var d=getComputedStyle(this.$dom,null);return d[c]||""},setStyle:function(a,b){var c=f.getStyleProperty(a);this.$dom.style[c]=f.getStyleValue(a,b)},removeStyle:function(a){var b=f.getStyleProperty(a,!0);this.$dom.style.removeProperty(b)},setStyles:function(a){this.$dom.style.cssText+=f.getCssText(a)},getAttribute:function(a){var b=q[a];return b?b.get?b.get(this.$dom):this.$dom.getAttribute(b):this.$dom.getAttribute(a)},setAttribute:function(a,b){if(null!==b&&void 0!==b){var c=q[a];return c?c.set?c.set(this.$dom,b):this.$dom.setAttribute(c,b):this.$dom.setAttribute(a,b)}},removeAttribute:function(a){this.$dom.removeAttribute(r[a]||a)},getAttributes:function(){var b={};return a.each(this.$dom.attributes,function(a){b[a.name]=a.value}),b},setAttributes:function(b){a.each(b,function(a,b){this.setAttribute(b,a)},this)},getText:function(){return this.$dom.textContent},setText:function(a){this.$dom.textContent=a},getHtml:function(){return this.$dom.innerHTML},setHtml:function(a){this.$dom.innerHTML=a},addEventListener:function(a,b,c){this.$dom.addEventListener(a,b,c||!1)},removeEventListener:function(a,b,c){this.$dom.removeEventListener(a,b,c||!1)},_getBoxWidth:function(a,b){var c,d,e=this.$dom;switch(a){case l:case k:d=this.getStyle(a+"-"+b),c=parseFloat(d);break;default:d=this.getStyle("border-"+b+"-width"),j&&g.test(e.tagName)&&(d=0),c=parseFloat(d)||i[d]}return c||0}}})}(nx),function(a){var b=a.data.Collection;a.define("nx.dom.Fragment",a.dom.Node,{methods:{children:function(){var c=new b;return a.each(this.$dom.childNodes,function(a){c.add(new this.constructor(a))},this),c}}})}(nx),function(a){var b=a.dom.Element,c=a.dom.Fragment,d=a.dom.Text,e=a.global,f=e.document,g=a.Util,h={topFrame:null,hasReady:!1,queue:[]},i={setHasReady:function(a){h.hasReady=a},getHasReady:function(){return h.hasReady},addQueue:function(a){h.queue.push(a)},clearQueue:function(){h.queue.length=0},execQueue:function(){for(var a=0,b=h.queue.length;b>a;a++)h.queue[a]()},setTopFrame:function(a){h.topFrame=a},getTopFrame:function(){return h.topFrame}},j={initReady:function(a){return i.addQueue(a),j.isReady()},fireReady:function(){i.execQueue(),i.clearQueue()},setTopFrame:function(){try{i.setTopFrame(null===e.frameElement&&f.documentElement)}catch(a){}},doScrollCheck:function(){var a=i.getTopFrame();if(a&&a.doScroll){try{a.doScroll("left")}catch(b){return setTimeout(j.doScrollCheck,50)}j.fireReady()}},isOnLoad:function(a){return"load"===(a||e.event).type},isReady:function(){return i.getHasReady()||"complete"===f.readyState},detach:function(){f.addEventListener?(f.removeEventListener("DOMContentLoaded",j.completed,!1),e.removeEventListener("load",j.completed,!1)):(f.detachEvent("onreadystatechange",j.completed),e.detachEvent("onload",j.completed))},w3cReady:function(){f.addEventListener("DOMContentLoaded",j.completed,!1),e.addEventListener("load",j.completed,!1)},ieReady:function(){f.attachEvent("onreadystatechange",j.completed),e.attachEvent("onload",j.completed),j.setTopFrame(),j.doScrollCheck()},readyMain:function(){return"complete"===f.readyState?setTimeout(j.readyMain):void(f.addEventListener?j.w3cReady():j.ieReady())},completed:function(a){(j.isReady()||j.isOnLoad(a))&&(i.setHasReady(!0),j.detach(),j.fireReady())}},k={svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},l=a.define("nx.dom.Document",{"static":!0,properties:{cssStyleSheet:{get:function(){var a=this._cssStyleSheet;if(!a){var b=f.getElementById("nx-style")||this._createStyleNode();a=this._cssStyleSheet=this._getCSSStyleSheetInstance(b)}return a}},root:{get:function(){return f.documentElement}},body:{get:function(){return new b(f.body)}},html:{get:function(){return new b(f.getElementsByTagName("html")[0])}}},methods:{init:function(){this.__listeners__={},this._documentListeners={}},on:function(a,b,c){var d=this.__listeners__,e=d[a]=d[a]||[{owner:null,handler:null,context:null}];e.push({owner:this,handler:b,context:c||this}),this._attachDocumentListeners(a);var f;return{release:function(){f.off(a,b,c)}}},off:function(a,b,c){var d,e=this.__listeners__[a];if(e)if(b){c=c||this;for(var f=0,g=e.length;g>f;f++)if(d=e[f],d.handler==b&&d.context==c){e.splice(f,1);break}}else e.length=1},upon:function(a,b,c){var d=this.__listeners__,e=d[a]=d[a]||[{owner:null,handler:null,context:null}];e[0]={owner:this,handler:b,context:c},this._attachDocumentListeners(a)},fire:function(a,b){var c,d,e=this.__listeners__[a];if(e){e=e.slice();for(var f=0,g=e.length;g>f;f++)if(c=e[f],c&&c.handler&&(d=c.handler.call(c.context,c.owner,b),d===!1))return!1}},registerNS:function(a,b){k[a]=b},resolveNS:function(a){return k[a]},createFragment:function(){return new c(f.createDocumentFragment())},createElement:function(a){return new b(f.createElement(a))},createText:function(a){return new d(f.createTextNode(a))},createElementNS:function(a,c){var d=l.resolveNS(a);if(d)return new b(f.createElementNS(d,c));throw new Error("The namespace "+a+" is not registered.")},wrap:function(b){return a.is(b,Node)?b:void 0},docRect:function(){var a=this.root(),b=e.innerHeight||0,c=e.innerWidth||0,d=a.scrollWidth,f=a.scrollHeight,g={left:Math.max(e.pageXOffset||0,a.scrollLeft),top:Math.max(e.pageYOffset||0,a.scrollTop)};return d=Math.max(d,c),f=Math.max(f,b),{width:c,height:b,scrollWidth:d,scrollHeight:f,scrollX:g.left,scrollY:g.top}},ready:function(a){j.initReady(a)?setTimeout(j.fireReady,1):j.readyMain()},addRule:function(a,b,c){return this._ruleAction("add",[a,b,c])},insertRule:function(a,b){return this._ruleAction("insert",[a,b])},deleteRule:function(a){return this._ruleAction("delete",[a])},removeRule:function(a,b){return this._ruleAction("remove",[a,b])},addRules:function(b){a.each(b,function(a,b){this.addRule(b,g.getCssText(a),null)},this)},deleteRules:function(){for(var a=this.cssStyleSheet().rules.length;a--;)this.deleteRule(0)},_ruleAction:function(a,b){var c=this.cssStyleSheet(),d=b.length-1;return b[d]=this._defRuleIndex(c,b[d]),c[a+"Rule"].apply(c,b),this._defRuleIndex(c,null)},_defRuleIndex:function(a,b){return null===b?a.rules.length:b},_createStyleNode:function(){var a=f.createElement("style");return a.type="text/css",a.id="nx-style",(f.head||f.getElementsByTagName("head")[0]||f.documentElement).appendChild(a),a},_getCSSStyleSheetInstance:function(a){var b,c=f.styleSheets,d=null;for(b in c)if(d=c[b],d.ownerNode===a)break;return d},_attachDocumentListeners:function(a){var b=this._documentListeners;if(!(a in b)){var c=this,d=b[a]=function(b){c.fire(a,b)};f.addEventListener(a,d)}}}})}(nx),function(a){function b(b){if(a.is(b,"String")){var c=b.indexOf("{"),d=b.indexOf("}");if(c>=0&&d>c)return b.slice(c+1,d)}return null}function c(c,d,e,f,h){if(a.is(e,g))c.setBinding(d,a.extend(e.gets(),{bindingType:"property"}));else{var i=b(e);null!==i?"#"===i[0]?c.setBinding(d,i.slice(1)+",bindingType=property",h||c):c.setBinding(d,(i?"model."+i:"model")+",bindingType=property",f||c):c.set(d,e)}}function d(c,d,e,f,h){if(a.is(e,g))c.setBinding(d,e.gets());else{var i=b(e);null!==i?"#"===i[0]?c.setBinding(d,i.slice(1)+",bindingType=event",h||c):c.setBinding(d,(i?"model."+i:"model")+",bindingType=event",f||c):c.on(d,e,h||c)}}function e(b,g){if(b||0===b){var h;if(a.is(b,"Array"))h=new m("fragment"),a.each(b,function(a){e(a,g).attach(h)});else if(a.is(b,"Object")){var i=b.type;if(i){var j=a.is(i,"String")?a.path(f,i):i;if(!a.is(j,"Function"))throw new Error('Component "'+i+'" is not defined.');h=new j}else h=new m(b.tag||"div");var k=b.name,l=b.props,n=b.events,o=b.content;k&&h.register("@name",k),g&&h.owner(g),a.each(n,function(a,b){d(h,b,a,h,g)}),a.each(l,function(b,d){a.is(b,"Array")&&a.each(b,function(b){a.is(b,"Object")&&(b.__owner__=g)}),a.is(b,"Object")&&(b.__owner__=g),c(h,d,b,h,g)}),void 0!==o&&c(h,"content",o,h,g)}else h=new m("text",b);return h}return null}var f=a.global,g=a.Binding,h=a.data.Collection,i=a.dom.Document,j=a.define("nx.ui.AbstractComponent",a.Observable,{"abstract":!0,statics:{createComponent:e},events:["enter","leave","contententer","contentleave"],properties:{content:{get:function(){return this._content},set:function(b){a.each(this._content.toArray(),function(a){a.destroy()}),a.is(b,j)?b.attach(this):a.is(b,"Array")?a.each(b,function(a){e(a,this.owner()).attach(this)},this):(b||0===b)&&e(b,this.owner()).attach(this)}},model:{get:function(){return this._model_was_set?this._model:this._inheritedModel},set:function(b,c){return c&&this._model_was_set?!1:(c?this._inheritedModel=b:(this._model=b,this._model_was_set=!0),void this._content.each(function(c){a.is(c,"String")||c.model(b,!0)}))}},owner:{value:null},parent:{value:null}},methods:{init:function(){this.inherited(),this._resources={},this._content=new h},attach:function(b,c){if(this.detach(),a.is(b,j)){var d=this.resolve("@name"),e=this.owner()||b;d&&e.register(d,this),this.onAttach(b,c),b.onChildAttach(this,c),c>=0?b.content().insert(this,c):b.content().add(this),this.parent(b),this.owner(e),b.fire("contententer",{content:this,owner:e}),this.fire("enter",{parent:b,owner:e}),this._attached=!0}},detach:function(){if(this._attached){var a=this.resolve("@name"),b=this.owner(),c=this.parent();a&&b.unregister(a),this.onDetach(c),c.onChildDetach(this),c.content().remove(this),this.parent(null),this.owner(null),c.fire("contentleave",{content:this,owner:b}),this.fire("leave",{parent:c,owner:b}),this._attached=!1}},register:function(a,b,c){var d=this._resources;(d&&!(a in d)||c)&&(d[a]=b)},unregister:function(a){var b=this._resources;b&&a in b&&delete b[a]},resolve:function(a){var b=this._resources;return b&&a in b?b[a]:void 0},getContainer:function(a){if("fragment"===this.resolve("@tag")){var b=this.parent();if(b)return b.getContainer(a)}return this.resolve("@root")},dispose:function(){this.inherited(),this._content&&this._content.each(function(a){a.dispose()}),this._resources=null,this._content=null,this._model=null,this._inheritedModel=null,this.dispose=function(){}},destroy:function(){this.detach(),this.inherited()},onAttach:function(){},onDetach:function(){},onChildAttach:function(){},onChildDetach:function(){}}}),k=a.define(a.Observable,{methods:{init:function(a){this.inherited(),this._comp=a,this._classList=[]},has:function(a){return a in this._classList},get:function(a){return this._classList[a]},set:function(a,b){this._classList[a]=b,this._comp.resolve("@root").set("class",this._classList.join(" "))},hasClass:function(a){return this._classList.indexOf(a)>=0},addClass:function(a){this.hasClass(a)||(this._classList.push(a),this._comp.resolve("@root").set("class",this._classList.join(" ")))},removeClass:function(a){var b=this._classList.indexOf(a);b>=0&&(this._classList.splice(b,1),this._comp.resolve("@root").set("class",this._classList.join(" ")))},toggleClass:function(a){var b=this._classList.indexOf(a);b>=0?this._classList.splice(b,1):this._classList.push(a),this._comp.resolve("@root").set("class",this._classList.join(" "))},dispose:function(){this.inherited(),this._comp=null,this._classList=null}}}),l=a.define(a.Observable,{methods:{init:function(a){this.inherited(),this._comp=a},get:function(a){return this._comp.resolve("@root").getStyle(a)},set:function(a,b){this._comp.resolve("@root").setStyle(a,b)},dispose:function(){this.inherited(),this._comp=null}}}),m=a.define(j,{"final":!0,events:["generated"],properties:{"class":{get:function(){return this._class},set:function(b){var d=this._class;a.is(b,"Array")?a.each(b,function(a,e){c(d,""+e,a,this,b.__owner__||this.owner())},this):a.is(b,"Object")?(b.add&&this._class.addClass(b.add),b.remove&&this._class.addClass(b.remove),b.toggle&&this._class.addClass(b.toggle)):this.resolve("@root").set("class",b) -}},style:{get:function(){return this._style},set:function(b){if(a.is(b,"Object")){var d=this._style;a.each(b,function(a,e){c(d,e,a,this,b.__owner__||this.owner())},this)}else this.resolve("@root").set("style",b)}},template:{get:function(){return this._template},set:function(a){this._template=a,this._generateContent()}},items:{get:function(){return this._items},set:function(a){var b=this._items;b&&b.off&&b.off("change",this._onItemsChange,this),b=this._items=a,b&&b.on&&b.on("change",this._onItemsChange,this),this._generateContent()}},value:{get:function(){return this.resolve("@root").get("value")},set:function(a){return this.resolve("@root").set("value",a)},binding:{direction:"<>"}},states:{value:null},dom:{get:function(){return this.resolve("@root")}}},methods:{init:function(a,b){if(this.inherited(),this._domListeners={},this._resources={},this._content=new h,this._class=new k(this),this._style=new l(this),a){var c=a.split(":");if(2===c.length){var d=c[0];a=c[1],this.register("@ns",d),this.register("@root",i.createElementNS(d,a))}else"text"===a?this.register("@root",i.createText(b)):"fragment"===a?this.register("@root",i.createFragment()):this.register("@root",i.createElement(a));this.register("@tag",a)}switch(a){case"input":case"textarea":this.on("change",function(a,b){switch(b.target.type){case"checkbox":case"radio":this.notify("checked");break;default:this.notify("value")}},this),this.on("input",function(){this.notify("value")},this);break;case"select":this.on("change",function(){this.notify("selectedIndex"),this.notify("value")},this)}},get:function(a){return this.has(a)||a.indexOf(":")>=0?this.inherited(a):this.resolve("@root").get(a)},set:function(a,b){this.has(a)||a.indexOf(":")>=0?this.inherited(a,b):(this.resolve("@root").set(a,b),this.notify(a))},on:function(a,b,c){return this._attachDomListener(a),this.inherited(a,b,c)},upon:function(a,b,c){return this._attachDomListener(a),this.inherited(a,b,c)},dispose:function(){var b=this.resolve("@root");b&&a.each(this._domListeners,function(a,c){":"===c.charAt(0)?b.removeEventListener(c.slice(1),a,!0):b.removeEventListener(c,a)}),this.items(null),this._class.dispose(),this._style.dispose(),this.inherited(),this._domListeners=null},onAttach:function(b,c){var d=this.resolve("@root");if(d){var e=b.getContainer(this);if(c>=0){var f=b.content().getItem(c);f&&"fragment"===f.resolve("@tag")&&(f=f.content().getItem(0)),f?e.insertBefore(d,f.resolve("@root")):e.appendChild(d)}else e.appendChild(d);var g=this.states(),h=null;if(g&&(h=g.enter),h){var i=d.$dom.style.cssText,j="all "+(h.duration||500)+"ms";d.setStyles(a.extend({transition:j},h)),this.upon("transitionend",function(){d.removeStyle("transition")}),setTimeout(function(){d.$dom.style.cssText=i+";transition: "+j},10)}}},onDetach:function(b){var c=this.resolve("@root");if(c){var d=this.resolve("@tag"),e=this;if("fragment"===d)a.each(e.content(),function(a){c.appendChild(a.resolve("@root"))});else{var f=this.states(),g=null;if(f&&(g=f.leave),g){var h=c.$dom.style.cssText,i="all "+(g.duration||500)+"ms";c.setStyle("transition",i),setTimeout(function(){c.setStyles(g)},10),this.upon("transitionend",function(){c.$dom.style.cssText=h,b.getContainer(this).removeChild(c)})}else b.getContainer(this).removeChild(c)}}},_attachDomListener:function(a){var b=this._domListeners;if(!(a in b)){var c=this,d=this.resolve("@root"),e=b[a]=function(b){c.fire(a,b)};":"===a.charAt(0)?d.addEventListener(a.slice(1),e,!0):d.addEventListener(a,e)}},_generateContent:function(){var b=this._template,c=this._items;a.each(this._content.toArray(),function(a){a.detach(),setTimeout(function(){a.dispose()},600)}),b&&c&&(a.each(c,function(a){var c=e(b,this.owner());c.model(a),c.attach(this)},this),this.fire("generated"))},_onItemsChange:function(b,c){var d=this._template,f=c.action,g=c.index;if(g=g>=0?g:-1,"add"===f)a.each(c.items,function(a,b){var c=e(d,this.owner());c.model(a),c.attach(this,g+b)},this);else if("remove"===f)a.each(c.items,function(b){a.each(this.content().toArray(),function(a){a.model()===b&&a.detach()},this)},this);else if("replace"===f);else if("sort"===f){var h=c.comparator,i=this.content().toArray().sort(function(a,b){return h(a.model(),b.model())});a.each(i,function(a){a.attach(this)},this)}else this._generateContent()}}})}(nx),function(a){var b=a.ui.AbstractComponent;a.define("nx.ui.Component",b,{properties:{model:{get:function(){return void 0===this._model?this._inheritedModel:this._model},set:function(b,c){c?this._inheritedModel=b:this._model=b;var d=this.view();d&&d.model(b,!0);var e=this._content;e&&e.each(function(c){a.is(c,"String")||c.model(b,!0)})}},"class":{get:function(){return this.view().get("class")},set:function(a){this.view().set("class",a)}},style:{get:function(){return this.view().style()},set:function(a){this.view().style(a)}},dom:{get:function(){return this.resolve("@root")}}},methods:{init:function(){this.inherited();var c=this["@view"];if(a.is(c,"Function")){for(var d,e=this.constructor;e&&(e=e.__super__,!(d=e["@view"])););c=c.call(this,a.clone(d,!0))}if(c){var f=b.createComponent(c,this);this.register("@root",f.resolve("@root")),this.register("@tag",f.resolve("@tag")),this.register("@comp",f)}},view:function(a){return this.resolve(a||"@comp")},get:function(a){return this.has(a)?this.inherited(a):this.view().get(a)},set:function(a,b){this.has(a)?this.inherited(a,b):(this.view().set(a,b),this.notify(a))},onAttach:function(a,b){this.view().onAttach(a,b)},onDetach:function(){this.view().onDetach(this.parent())},on:function(a,b,c){return this.can(a)?this.inherited(a,b,c):this.view().on(a,b,c)},upon:function(a,b,c){this.can(a)?this.inherited(a,b,c):this.view().upon(a,b,c)},off:function(a,b,c){this.can(a)?this.inherited(a,b,c):this.view().off(a,b,c)},dispose:function(){var a=this.view();a&&a.dispose(),this.inherited()}}})}(nx),function(a){var b=(a.global,a.dom.Document);a.define("nx.ui.Application",a.ui.AbstractComponent,{properties:{container:{}},methods:{init:function(){this.inherited();var c=this.start,d=this.stop,e=this;this.start=function(d){return b.ready(function(){a.app=e,c.call(e,d)}),this},this.stop=function(){a.app=null,d.call(e)},this._globalListeners={}},start:function(){throw new Error('Method "start" is not implemented')},stop:function(){throw new Error('Method "stop" is not implemented')},getContainer:function(){return this.container()?new a.dom.Element(this.container()):b.body()},on:function(a,b,c){return this.can(a)||this._attachGlobalListeners(a),this.inherited(a,b,c)},upon:function(a,b,c){this.can(a)||this._attachGlobalListeners(a),this.inherited(a,b,c)},_attachGlobalListeners:function(a){var b=this._globalListeners;if(!(a in b)){var c=this,d=b[a]=function(b){c.fire(a,b)};window.addEventListener(a,d)}}}})}(nx),function(a){a.define("nx.util",{"static":!0,methods:{uuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"==a?b:3&b|8;return c.toString(16)}).toUpperCase()},without:function(a,b){for(var c;-1!=(c=a.indexOf(b));)a.splice(c,1);return a},find:function(a,b,c){var d;return a.some(function(a,e,f){return b.call(c||this,a,e,f)?(d=a,!0):void 0}),d},uniq:function(b,c,d){var e=c?b.map(c.bind(d||this)):b,f=[];return a.each(e,function(a,c){-1==f.indexOf(a)&&f.push(b[c])}),f},indexOf:function(a,b){return a.indexOf(b)},setProperty:function(b,c,d,e){void 0!==d&&(a.is(d,"String")?"model"==d.substr(0,5)?b.setBinding(c,d+",direction=<>",b):"{#"==d.substr(0,2)?b.setBinding(c,"owner."+d.substring(2,d.length-1)+",direction=<>",e):"{"==d.substr(0,1)?b.setBinding(c,"owner.model."+d.substring(1,d.length-1),e):b.set(c,d):b.set(c,d))},loadScript:function(a,b){var c=document.createElement("script");c.type="text/javascript",c.readyState?c.onreadystatechange=function(){("loaded"==c.readyState||"complete"==c.readyState)&&(c.onreadystatechange=null,b())}:c.onload=function(){b()},c.src=a,document.getElementsByTagName("head")[0].appendChild(c)},parseURL:function(a){var b=document.createElement("a");return b.href=a,{source:a,protocol:b.protocol.replace(":",""),host:b.hostname,port:b.port,query:b.search,params:function(){for(var a,c={},d=b.search.replace(/^\?/,"").split("&"),e=d.length,f=0;e>f;f++)d[f]&&(a=d[f].split("="),c[a[0]]=a[1]);return c}(),file:(b.pathname.match(/\/([^\/?#]+)$/i)||[,""])[1],hash:b.hash.replace("#",""),path:b.pathname.replace(/^([^\/])/,"/$1"),relative:(b.href.match(/tps?:\/\/[^\/]+(.+)/)||[,""])[1],segments:b.pathname.replace(/^\//,"").split("/")}},keys:function(a){return Object.keys(a)},values:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},boundHitTest:function(a,b){var c=b.top>=a.top&&b.top<=a.top+a.height,d=b.left>=a.left&&b.left<=a.left+a.width,e=a.top+a.height>=b.top+b.height&&b.top+b.height>=a.top,f=a.left+a.width>=b.left+b.width&&b.left+b.width>=a.left,g=a.top>=b.top&&a.top+a.height<=b.top+b.height,h=a.left>=b.left&&a.left+a.width<=b.left+b.width;return c&&d||e&&f||c&&f||e&&d||c&&h||e&&h||d&&g||f&&g},isFirefox:function(){return navigator.userAgent.indexOf("Firefox")>0}}})}(nx,nx.global),function(a){a.util.query=function(){var a,b={publics:{select:function(a,b){var c=[];if($.isArray(a)&&$.isFunction(b)){var d,e;for(d=0;d1?c:c[0]):(e=c.map,f=c.aggregate),"string"==typeof e&&(e=e.replace(/\s/g,"").split(",")),$.isArray(e)&&e[0]&&"string"==typeof e[0]&&(e=function(a){return function(b){var c,d={};for(c=0;cc[e])return f?-1:1;if(c[e]>b[e])return f?1:-1}return 0}}(b)),b&&"function"==typeof b&&a.sort(b),a}},query:function(a,c){return 1==arguments.length&&(c=a,a=c.array),a?(c.select&&(a=b.publics.select(a,c.select)),c.aggregate&&(a=b.privates.aggregate(a,c.aggregate)),c.mapping&&(a=b.privates.mapping(a,c.mapping)),c.orderby&&(a=b.privates.orderby(a,c.orderby)),a):a}};for(a in b.publics)b.query[a]=b.publics[a];return b.query}()}(nx,nx.global),function(a){var b=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),c=function(){return window.cancelAnimationFrame||window.cancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.clearTimeout}();a.define("nx.graphic.Animation",{statics:{requestAnimationFrame:b,cancelAnimationFrame:c},events:["complete"],properties:{callback:{set:function(a){this._callback=a,this.createAnimation(),this.autoStart()&&this.start()},get:function(){return this._callback||function(){}}},duration:{value:1e3},interval:{value:1e3/60},autoStart:{value:!1},complete:{value:function(){return function(){}}},context:{value:this}},methods:{init:function(a){this.inherited(arguments),this.sets(a)},createAnimation:function(){var a,c,d,e=this,f=this.callback(),g=this.duration(),h=this.interval(),i=0;this.fn=function(){d=+new Date,a?c=g?(d-a)/g:0:(a=+new Date,c=0),(c>=1||d-i>=h)&&(i=d,c>1&&(c=1),f.call(e.context(),c)===!1&&(g=1,e._completeFN())),1>c?e.ani_id=b(e.fn):1==c&&e._completeFN()}},start:function(){this.ani_id=b(this.fn)},stop:function(){c(this.ani_id)},_completeFN:function(){this.complete().call(this.context()),this.stop(),this.fire("complete")}}})}(nx,nx.util),function(a){var b=1e3;a.define("nx.widget.ZIndexManager",null,{"static":!0,methods:{getIndex:function(){return b++}}})}(nx,nx.global),function(a){var b;!function(){a&&a.ui&&!b&&(b=a.define(a.ui.Component,{view:{props:{"class":"nx n-popupContainer",style:{position:"absolute",top:"0px",left:"0px"}}}}),a.define("nx.ui.PopupContainer",{"static":!0,properties:{container:{value:function(){return new b}}},methods:{addPopup:function(a){this.container().view().dom().appendChild(a.view().dom())}}})),document.body&&a&&a.ui?document.body.firstChild?document.body.insertBefore(a.ui.PopupContainer.container().view().dom().$dom,document.body.firstChild):document.body.appendChild(a.ui.PopupContainer.container().view().dom().$dom):setTimeout(arguments.callee,10)}()}(nx,nx.global),function(a){var b=a.ui.PopupContainer;a.define("nx.ui.Popup",a.ui.Component,{events:["open","close"],view:{props:{style:"position:absolute",tabindex:-1},events:{blur:function(){}}},properties:{target:{value:document},direction:{value:"auto"},width:{value:null},height:{value:null},offset:{value:0},offsetX:{value:0},offsetY:{value:0},align:{value:!1},position:{value:"absolute"},location:{value:"outer"},listenResize:{value:!1},lazyClose:{value:!1},pin:{value:!1},registeredPositionMap:{value:function(){return{}}},scrollClose:{value:!1}},methods:{init:function(a){this.inherited(a),this.sets(a),this._defaultConfig=this.gets()},attach:function(a){this.inherited(a),this.appendToPopupContainer()},appendToPopupContainer:function(){this._appended||(b.addPopup(this),this._delayCloseEvent(),this._listenResizeEvent(),this._appended=!0,this._closed=!1)},open:function(b){this._clearTimeout();var c=0,d=0,e=this.view().dom();this.sets(b||{}),this._resetOffset(b);var f=e.get("data-nx-popup-direction");f&&e.removeClass(f),this.appendToPopupContainer();var g=this.target(),h={width:0,height:0};if(g.resolve&&g.view&&(g=g.view()),void 0!==g.x&&void 0!==g.y)c=g.x,d=g.y;else if(g!=document){var i=g.getOffset();c=i.left,d=i.top,h=g.getBound()}else c=0,d=0;var j=this.width(),k=this.height();this.align()&&(j=h.width||0),j&&(e.setStyle("width",j),e.setStyle("max-width",j),this.width(j)),k&&e.setStyle("height",k),e.setStyle("display","block"),c+=this.offsetX(),d+=this.offsetY();var l=this._popupSize=e.getBound(),m=this.offset(),n={outer:{bottom:{left:c,top:d+h.height+m},top:{left:c,top:d-l.height-m},right:{left:c+h.width+m,top:d},left:{left:c-l.width-m,top:d}},inner:{bottom:{left:c+h.width/2-l.width/2+m,top:d},top:{left:c+h.width/2-l.width/2,top:d+h.height-l.height-m},left:{left:c+h.width-l.width-m,top:d+h.height/2-l.height/2},right:{left:c+m,top:d+h.height/2-l.height/2}},tooltip:{bottom:{left:c+h.width/2-l.width/2,top:d+h.height+m+2},"bottom-left":{left:c-22,top:d+h.height+m+2},"bottom-right":{left:c+h.width-l.width+22,top:d+h.height+m+2},top:{left:c+h.width/2-l.width/2,top:d-l.height-m-2},"top-left":{left:c-22,top:d-l.height-m-2},"top-right":{left:c+h.width/2-l.width/2+22,top:d-l.height-m-2},right:{left:c+h.width+m+2,top:d+h.height/2-l.height/2},"right-top":{left:c+h.width+m+2,top:0>=d?0:d-22},"right-bottom":{left:c+h.width+m+2,top:d+h.height-l.height},left:{left:c-l.width-m-2,top:d+h.height/2-l.height/2},"left-top":{left:c-l.width-m-2,top:0>=d?0:d-22},"left-bottom":{left:c-l.width-m-2,top:d+h.height-l.height}}},o=this.location();this._directionMap=n[o];var p=this.direction();(null==p||"auto"==p)&&(p=this._hitTest()),p||(p="bottom");var q=this._directionMap[p];e.setStyles({top:q.top,left:q.left,position:"position","z-index":a.widget.ZIndexManager.getIndex(),display:"block"}),e.set("data-nx-popup-direction",p),e.addClass("popup"),e.addClass(p),e.addClass("in"),this.fire("open"),this.dom().$dom.focus()},close:function(a){this._clearTimeout();var b=this.view().dom();this.pin()||(a||!this.lazyClose()?(this._closed=!0,b.removeClass("in"),b.setStyle("display","none"),this.fire("close")):this._delayClose())},_clearTimeout:function(){this.timer&&clearTimeout(this.timer)},_delayClose:function(){var a=this;this._clearTimeout(),this.timer=setTimeout(function(){a.close(!0)},500)},_delayCloseEvent:function(){this.lazyClose()&&(this.on("mouseenter",function(){this.timer&&clearTimeout(this.timer)},this),this.on("mouseleave",function(){clearTimeout(this.timer),this.close(!0)},this))},_listenResizeEvent:function(){this.listenResize(),this.scrollClose()},_hitTest:function(){var b=a.dom.Document.docRect(),c=Object.keys(this._directionMap),d=c[0];return c.some(function(a){var c={left:this._directionMap[a].left,top:this._directionMap[a].top,width:this._popupSize.width,height:this._popupSize.height},e=c.left>=b.scrollX&&c.top>=b.scrollY&&c.left+c.width<=b.width+b.scrollX&&c.top+c.height<=b.height+b.scrollY;return e?(d=a,!0):void 0},this),d},_resetOffset:function(a){}}})}(nx,nx.global),function(a){a.define("nx.ui.Popover",a.ui.Popup,{properties:{title:{get:function(){return this._title},set:function(a){return a?this.view("title").dom().setStyle("display","block"):this.view("title").dom().setStyle("display","none"),this._title!=a?(this._title=a,!0):!1}},location:{value:"tooltip"}},view:{props:{"class":"popover fade",style:{outline:"none"},tabindex:-1},events:{blur:function(){}},content:[{props:{"class":"arrow"}},{tag:"h3",name:"title",props:{"class":"popover-title",style:{display:"none"}},content:"{#title}"},{name:"body",props:{"class":"popover-content"}}]},methods:{getContainer:function(){return this.view("body").dom()}}})}(nx,nx.global),function(a){a.define("nx.graphic.DragManager",a.Observable,{"static":!0,properties:{node:{},referrer:{},track:{},dragging:{value:!1}},methods:{init:function(){window.addEventListener("mousedown",this._capture_mousedown.bind(this),!0),window.addEventListener("mousemove",this._capture_mousemove.bind(this),!0),window.addEventListener("mouseup",this._capture_mouseup.bind(this),!0),window.addEventListener("touchstart",this._capture_mousedown.bind(this),!0),window.addEventListener("touchmove",this._capture_mousemove.bind(this),!0),window.addEventListener("touchend",this._capture_mouseup.bind(this),!0)},start:function(a){return function(b,c){if(b&&!this.node()){c=c===window||c===document||c===document.body?document.body:c||b,c="function"==typeof c.dom?c.dom().$dom:c,this.node(b),this.referrer(c);var d,e=[];d=c.getBoundingClientRect(),this.track(e);var f=a.touches&&a.touches.length?a.touches[0].pageX:a.pageX,g=a.touches&&a.touches.length?a.touches[0].pageY:a.pageY,h=[f-document.body.scrollLeft-d.left,g-document.body.scrollTop-d.top];return e.push(h),e[0].time=a.timeStamp,a.dragCapture=function(){},!0}}.bind(this)},move:function(a){var b=this.node();b&&(a.drag=this._makeDragData(a),this.dragging()||(this.dragging(!0),b.fire("dragstart",a)),b.fire("dragmove",a))},end:function(a){var b=this.node();b&&(a.drag=this._makeDragData(a),this.dragging()&&b.fire("dragend",a),this.node(null),this.track(null),this.dragging(!1))},_makeDragData:function(a){var b=this.track(),c=this.referrer().getBoundingClientRect(),d=a.touches&&a.touches.length?a.touches[0].pageX:a.pageX,e=a.touches&&a.touches.length?a.touches[0].pageY:a.pageY,f=[d-document.body.scrollLeft-c.left,e-document.body.scrollTop-c.top],g=b[0],h=b[b.length-1];return f.time=a.timeStamp,b.push(f),b.length>20&&b.splice(1,b.length-20),{target:this.node(),accord:this.referrer(),origin:g,current:f,offset:[f[0]-g[0],f[1]-g[1]],delta:[f[0]-h[0],f[1]-h[1]],track:b}},_capture_mousedown:function(a){a.captureDrag&&(this._lastDragCapture=a.captureDrag),a.captureDrag="mousedown"===a.type||"touchstart"===a.type?this.start(a):function(){}},_capture_mousemove:function(a){this.move(a);var b=this.node();return b?(a.stopPropagation(),a.preventDefault(),!1):void 0},_capture_mouseup:function(a){this.end(a)}}})}(nx,nx.global),function(a){a.Object.delegateEvent=function(b,c,d,e){d.can(e)||(b.on(c,function(a,b){d.fire(e,b)}),a.Object.extendEvent(d,e))};var b={transform:"webkitTransform"};a.define("nx.graphic.Component",a.ui.Component,{events:["dragstart","dragmove","dragend"],properties:{translateX:{set:function(a){this.setTransform(a)}},translateY:{set:function(a){this.setTransform(null,a)}},scale:{set:function(a){this.setTransform(null,null,a)}},translate:{get:function(){return{x:this._translateX||0,y:this._translateY||0}},set:function(a){this.setTransform(a.x,a.y)}},visible:{get:function(){return void 0!==this._visible?this._visible:!0},set:function(a){this.view()&&(a?this.view().dom().removeClass("n-hidden"):this.view().dom().addClass("n-hidden")),this._visible=a}},"class":{get:function(){return void 0!==this._class?this._class:""},set:function(a){return this._class!==a?(this._class=a,this.dom().addClass(a),!0):!1}}},view:{},methods:{init:function(a){this.inherited(a),this.sets(a)},setTransform:function(a,b,c,d){var e=parseFloat(null!=a?a:this._translateX||0),f=parseFloat(null!=b?b:this._translateY||0),g=parseFloat(null!=c?c:this._scale||1);this.setStyle("transform"," matrix("+g+",0,0,"+g+","+e+", "+f+")",d),this.dom().$dom.setAttribute("transform"," translate("+e+", "+f+") scale("+g+")"),this._translateX=e,this._translateY=f,this._scale=g},setStyle:function(a,c,d,e,f){d?this.setTransition(e,f,d):e&&setTimeout(function(){e.call(f||this)},0);var g=this.dom().$dom;g.style[a]=c,b[a]&&(g.style[b[a]]=c)},setTransition:function(a,b,c){var d=this.dom();c?(d.setStyle("transition","all "+c+"s ease"),this.on("transitionend",function e(){a&&a.call(b||this),d.setStyle("transition",""),this.off("transitionend",e,this)},this)):(d.setStyle("transition",""),a&&setTimeout(function(){a.call(b||this)},0))},append:function(a){var b;b=this._parentElement=a?a.view().dom():this._parentElement||this.view().dom().parentNode(),b&&b.$dom&&this._resources&&this.view()&&!b.contains(this.view().dom())&&b.appendChild(this.view().dom())},remove:function(){var a=this._parentElement=this._parentElement||this.view().dom().parentNode();a&&this._resources&&this.view()&&a.removeChild(this.view().dom())},getBound:function(){return this.dom().$dom.getBoundingClientRect()},hide:function(){this.visible(!1)},show:function(){this.visible(!0)},animate:function(b){var c=this,d=[],e=this.view();a.each(b.to,function(a,b){var c=this.has(b)?this.get(b):e.getStyle(b);d.push({key:b,oldValue:c,newValue:a})},this),this._ani&&(this._ani.stop(),this._ani.dispose(),delete this._ani);var f=this._ani=new a.graphic.Animation({duration:b.duration||1e3,context:b.context||this});f.callback(function(b){a.each(d,function(a){var d=a.oldValue+(a.newValue-a.oldValue)*b;c.set(a.key,d)})}),b.complete&&f.complete(b.complete),f.on("complete",function(){this.fire("animationCompleted"),f.dispose(),delete this._ani},this),f.start()},_processPropertyValue:function(b){var c=b;return a.is(b,"Function")&&(c=b.call(this,this.model(),this)),c},dispose:function(){this._resources&&this._resources["@root"]&&this.view().dom().$dom.remove(),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Group",a.graphic.Component,{properties:{"data-id":{set:function(b){a.each(this.content(),function(a){a.set("data-id",b)}),this.view().set("data-id",b),this["_data-id"]=b}}},view:{tag:"svg:g"},methods:{move:function(a,b){var c=this.translate();this.setTransform(a+c.x,b+c.y)}}})}(nx,nx.global),function(a){var b="http://www.w3.org/1999/xlink";a.define("nx.graphic.Icon",a.graphic.Component,{view:{tag:"svg:g",content:[{name:"bgtext",tag:"svg:text"},{name:"text",tag:"svg:text"},{tag:"svg:g",name:"image",content:{name:"use",tag:"svg:use"}}]},properties:{imageType:{value:"font"},iconType:{get:function(){return this._iconType},set:function(c){var d=a.graphic.Icons.get(c.toLowerCase()),e=d.size,f=this.view("image").dom(),g=this.view("text").dom(),h=this.view("bgtext").dom(),i=this.view("use").dom();d.font?(g.setStyle("display","block"),i.setStyle("display","none"),g.$dom.firstChild&&g.$dom.removeChild(g.$dom.firstChild),g.$dom.appendChild(document.createTextNode(d.font[0])),g.addClass("fontIcon iconShape"),h.$dom.firstChild&&h.$dom.removeChild(h.$dom.firstChild),h.$dom.appendChild(document.createTextNode(d.font[1])),h.addClass("fontIcon iconBG"),this.imageType("font")):(g.setStyle("display","none"),i.setStyle("display","block"),h.$dom.firstChild&&h.$dom.removeChild(h.$dom.firstChild),h.$dom.appendChild(document.createTextNode("\ue61d")),h.addClass("fontIcon iconBG"),i.$dom.setAttributeNS(b,"xlink:href","#"+c),f.setStyle("transform","translate("+e.width/-2+"px, "+e.height/-2+"px)"),this.imageType("image")),this.view().set("iconType",c),this.view().dom().addClass("n-topology-icon"),this.size(e),this._iconType=d.name}},size:{value:function(){return{width:36,height:36}}},color:{set:function(a){"font"==this.imageType()&&this.view("text").dom().setStyle("fill",a),this.view("bgtext").dom().setStyle("fill",this.showIcon()?"":a),this.view("image").dom().set("color",a),this._color=a}},scale:{set:function(b){var c=this.view("text").dom(),d=this.view("bgtext").dom(),e=this.view("image").dom(),f=this.size(),g=Math.max(f.width,f.height),h=this.showIcon()?g*b:4+8*b;c.setStyle("font-size",h),d.setStyle("font-size",h),"image"==this.imageType()&&b&&e.setStyle("transform","translate("+f.width/-2+"px, "+f.height/-2+"px) scale("+b+")"),a.util.isFirefox()&&(c.$dom.setAttribute("transform"," translate(0, "+h/2+")"),d.$dom.setAttribute("transform"," translate(0, "+h/2+")")),this._scale=b}},showIcon:{get:function(){return void 0!==this._showIcon?this._showIcon:!0},set:function(a){var b=this.view("text").dom(),c=this.view("bgtext").dom(),d=this.view("image").dom();a?("font"==this.imageType()?(b.setStyle("display","block"),c.setStyle("display","block")):(d.setStyle("display","block"),c.setStyle("display","none")),c.removeClass("iconBGActive"),this.view().dom().addClass("showIcon")):("font"==this.imageType()?b.setStyle("display","none"):d.setStyle("display","none"),c.setStyle("display","block"),c.addClass("iconBGActive"),this.view().dom().removeClass("showIcon")),this._showIcon=a,this._color&&this.color(this._color,{force:!0}),this._scale&&this.scale(this._scale,{force:!0})}}}})}(nx,nx.global),function(a){var b=a.define("nx.graphic.Icons",{"static":!0,statics:{icons:{}},methods:{get:function(a){return b.icons[a]||b.icons.switch},getSVGString:function(a){return e[a].icon},getTypeList:function(){return Object.keys(e)},registerIcon:function(a,e,f,g){var h=document.createElementNS(d,"image");h.setAttributeNS(c,"href",e),b.icons[a]={size:{width:f,height:g},icon:h.cloneNode(!0),name:a}},__each__:function(b,c){var d=b||function(){};a.each(e,function(a,b){var f=a.icon;d.call(c||this,f,b,e)})}}}),c="http://www.w3.org/1999/xlink",d="http://www.w3.org/2000/svg",e={"switch":{width:32,height:32,name:"Switch",font:["\ue618","\ue619"]},router:{width:32,height:32,name:"Router",font:["\ue61c","\ue61d"]},wlc:{width:32,height:32,font:["\ue60f","\ue610"]},unknown:{width:32,height:32,font:["\ue612","\ue611"]},server:{width:32,height:32,font:["\ue61b","\ue61a"]},phone:{width:32,height:32,font:["\ue61e","\ue61f"]},nexus5000:{width:32,height:32,font:["\ue620","\ue621"]},ipphone:{width:32,height:32,font:["\ue622","\ue623"]},host:{width:32,height:32,font:["\ue624","\ue625"]},camera:{width:32,height:32,font:["\ue626","\ue627"]},accesspoint:{width:32,height:32,font:["\ue628","\ue629"]},groups:{width:32,height:32,font:["\ue615","\ue62f"]},groupm:{width:32,height:32,font:["\ue616","\ue630"]},groupl:{width:32,height:32,font:["\ue617","\ue631"]},collapse:{width:16,height:16,font:["\ue62e","\ue61d"]},expand:{width:14,height:14,font:["\ue62d","\ue61d"]},cloud:{width:48,height:48,font:["\ue633","\ue633"]},unlinked:{width:32,height:32,font:["\ue646","\ue61d"]},firewall:{width:32,height:32,font:["\ue647","\ue648"]},hostgroup:{width:32,height:32,font:["\ue64d","\ue64c"]},wirelesshost:{width:32,height:32,font:["\ue64e","\ue64c"]}};a.each(e,function(a,c){var d=b.icons[c]={size:{width:a.width,height:a.height},name:c};a.font?d.font=a.font:a.icon&&(d.icon=(new DOMParser).parseFromString(a.icon,"text/xml").documentElement.cloneNode(!0))})}(nx,nx.global),function(a){a.define("nx.graphic.Circle",a.graphic.Component,{view:{tag:"svg:circle"}})}(nx,nx.global),function(a){var b="http://www.w3.org/1999/xlink";a.define("nx.graphic.Image",a.graphic.Component,{properties:{src:{get:function(){return void 0!==this._src?this._src:0},set:function(a){if(this._src!==a){if(this._src=a,this.view()&&void 0!==a){var c=this.view().dom().$dom;c.setAttributeNS(b,"href",a)}return!0}return!1}}},view:{tag:"svg:image"}})}(nx,nx.global),function(a){a.define("nx.graphic.Line",a.graphic.Component,{view:{tag:"svg:line"}})}(nx,nx.global),function(a){a.define("nx.graphic.Path",a.graphic.Component,{view:{tag:"svg:path"}})}(nx,nx.global),function(a){a.define("nx.graphic.Polygon",a.graphic.Path,{properties:{nodes:{get:function(){return this._nodes||[]},set:function(b){this._nodes=b;var c=b;if(0!==c.length){if(1==c.length){var d=c[0];c.push({x:d.x-1,y:d.y-1}),c.push({x:d.x+1,y:d.y-1})}else 2==c.length&&(c.push([c[0].x+1,c[0].y+1]),c.push(c[1]));var e=a.data.Convex.process(c),f=[];f.push("M ",e[0].x," ",e[0].y);for(var g=1;gg&&d.applyScale(g*f/d.scale(),c),d.scale()/f0?Math.acos(b[0][0]/c):-Math.acos(b[0][0]/c)),{x:b[2][0],y:b[2][1],scale:c,rotate:d}}return{x:0,y:0,scale:1,rotate:0}}},x:{get:function(){return void 0!==this._x?this._x:this.transform_internal_().x},set:function(a){return this._applyTransform("x",a),isNaN(this.transform_internal_().x)||this._x===this.transform_internal_().x?!1:(this._x=this.transform_internal_().x,!0)}},y:{get:function(){return void 0!==this._y?this._y:this.transform_internal_().y},set:function(a){return this._applyTransform("y",a),isNaN(this.transform_internal_().y)||this._y===this.transform_internal_().y?!1:(this._y=this.transform_internal_().y,!0)}},scale:{get:function(){return void 0!==this._scale?this._scale:this.transform_internal_().scale},set:function(a){return this._applyTransform("scale",a),isNaN(this.transform_internal_().scale)||this._scale===this.transform_internal_().scale?!1:(this._scale=this.transform_internal_().scale,!0)}},rotate:{get:function(){return void 0!==this._rotate?this._rotate:this.transform_internal_().rotate},set:function(a){return this._applyTransform("rotate",a),isNaN(this.transform_internal_().rotate)||this._rotate===this.transform_internal_().rotate?!1:(this._rotate=this.transform_internal_().rotate,!0)}}},methods:{applyTranslate:function(b,c){this.matrix(a.geometry.Matrix.multiply(this.matrix(),[[1,0,0],[0,1,0],[b,c,1]]))},applyScale:function(b,c){this.matrix(c?a.geometry.Matrix.multiply(this.matrix(),[[1,0,0],[0,1,0],[-c[0],-c[1],1]],[[b,0,0],[0,b,0],[0,0,1]],[[1,0,0],[0,1,0],[c[0],c[1],1]]):a.geometry.Matrix.multiply(this.matrix(),[[b,0,0],[0,b,0],[0,0,1]]))},applyRotate:function(b,c){this.x(),this.y(),sin(b),cos(b);this.matrix(c?a.geometry.Matrix.multiply(this.matrix(),[[1,0,0],[0,1,0],[-c[0],-c[1],1]],[[cos,sin,0],[-sin,cos,0],[0,0,1]],[[1,0,0],[0,1,0],[c[0],c[1],1]]):a.geometry.Matrix.multiply(this.matrix(),[[cos,sin,0],[-sin,cos,0],[0,0,1]]))},applyMatrix:function(){var b=Array.prototype.slice.call(arguments);b=a.util.query({array:b,mapping:function(b){return a.is(b,a.geometry.Matrix)?b.matrix():b}}),b.unshift(this.matrix()),this.matrix(a.geometry.Matrix.multiply.apply(this,b))},_applyTransform:function(a,b){if(this["_"+a]!==b&&!isNaN(b))if(b===this.transform_internal_()[a])this["_"+a]=b,this.notify(a);else switch(a){case"x":this.applyTranslate(b-this.transform_internal_().x,0);break;case"y":this.applyTranslate(0,b-this.transform_internal_().y);break;case"scale":this.applyScale(b/this.transform_internal_().scale,[this.transform_internal_().x,this.transform_internal_().y]);break;case"rotate":this.applyRotate(b-this.transform_internal_().rotate,[this.transform_internal_().x,this.transform_internal_().y])}},toString:function(){return a.geometry.Matrix.stringify(this.matrix())}}})}(nx,nx.ui,window),function(a){var b=a.define("nx.geometry.Matrix",a.Observable,{mixins:[a.geometry.MatrixSupport],methods:{init:function(a){this.inherited(),this.matrix(a)},equal:function(c){return b.equal(this.matrix(),a.is(c,b)?c.matrix():c)}},statics:{I:[[1,0,0],[0,1,0],[0,0,1]],isometric:function(a){return a&&(a[0][0]||a[0][1])&&a[0][0]===a[1][1]&&a[0][1]===-a[1][0]},approximate:function(b,c){if(!b||!c||b.length!=c.length)return!1;var d;for(d=0;d1;){if(a=l[0],b=l[1],a[0].length!=b.length)return null;for(i=a.length,j=b[0].length,k=b.length,c=[],f=0;i>f;f++){for(d=[],g=0;j>g;g++){for(e=0,h=0;k>h;h++)e+=a[f][h]*b[h][g];d.push(e)}c.push(d)}l.splice(0,2,c)}return l[0]},transpose:function(a){var b,c,d=[],e=a.length,f=a[0].length;for(c=0;f>c;c++)for(d[c]=[],b=0;e>b;b++)d[c].push(a[b][c]);return d},inverse:function(a){var b=a[0][0],c=a[0][1],d=a[1][0],e=a[1][1],f=a[2][0],g=a[2][1],h=b*e-c*d;return 0===h?null:[[e/h,-c/h,0],[-d/h,b/h,0],[(d*g-e*f)/h,(c*f-b*g)/h,1]]},stringify:function(a){return[a[0][0],a[0][1],a[1][0],a[1][1],a[2][0],a[2][1]].join(",").replace(/-?\d+e[+-]?\d+/g,"0")}}})}(nx,nx.ui,window),function(a){var b=a.define("nx.geometry.Math",a.Observable,{statics:function(){function a(a){return function(c){var d=a(c);return b.approximate(d,0)?0:d}}return{approximate:function(a,b){var c=a-b;return 1e-10>c&&c>-1e-10},sin:a(Math.sin),cos:a(Math.cos),tan:a(Math.tan),cot:function(a){var b=Math.tan(a);return b>1e10||-1e10>b?0:1/b}}}()})}(nx,nx.ui,window),function(a){var b=a.define("nx.geometry.BezierCurve",a.Observable,{statics:function(){function a(a){var b,c=[];for(b=0;b1)throw"Invalid bread point list: "+a.join(",");d.push((a[b]-c)/(1-c)),c=a[b]}return d}function e(a,b,c,d,e){return b*(1-a)*(1-a)*(1-a)+3*c*(1-a)*(1-a)*a+3*d*(1-a)*a*a+e*a*a*a}return{slice:function(a,c,d){return 0===c?0===d?null:b.breakdown(a,d).beziers[0]:d?b.breakdown(a,c,d).beziers[1]:b.breakdown(a,c).beziers[1]},breakdown:function(e){var f=Array.prototype.slice.call(arguments,1);if(!f.length)throw"Invalid argument length: "+arguments.length;f=d(f);var g,h,i,j=[e[0]],k=[];for(h=a(e);f.length;)g=f.shift(),i=b.separate(h,g),j.push(i.point),k.push(c(i.left)),h=i.right;return j.push(e[e.length-1]),k.push(c(h)),{points:j,beziers:k}},separate:function(a,b){for(var c,d,e=1-b,f=function(a){return[a[0][0]*e+a[1][0]*b,a[0][1]*e+a[1][1]*b]},g=function(a,b){return[f([a[0],b[0]]),f([a[1],b[1]])]},h=function(a){var b,c=[];for(b=0;bb)return null;var c=[];if(2===b){var d=a[0],e=a[2],f=a[1],g=[(d[0]+e[0])/2,(d[1]+e[1])/2],h=[2*f[0]-g[0],2*f[1]-g[1]];c.push(d,h,e)}return c},locationAlongCurve:function(a,b){var c,d=1e3,f=0,g=[],h=a[0];if(!b)return 0;for(var i=0;d>=i;i++){c=i/d;var j=e(c,h[0],a[1][0],a[2][0],a[3][0]),k=e(c,h[1],a[1][1],a[2][1],a[3][1]);if(i>0){var l=j-g[0],m=k-g[1],n=Math.sqrt(l*l+m*m);if(b>f&&f+n>b)return i/d;f+=n}g=[j,k]}return 0/0},getLength:function(a){for(var b,c=1e3,d=0,f=[],g=a[0],h=0;c>=h;h++){b=h/c;var i=e(b,g[0],a[1][0],a[2][0],a[3][0]),j=e(b,g[1],a[1][1],a[2][1],a[3][1]);if(h>0){var k=i-f[0],l=j-f[1];d+=Math.sqrt(k*k+l*l)}f=[i,j]}return d}}}()})}(nx,nx.ui,window),function(a){var b=a.define("nx.geometry.Vector",a.Observable,{statics:{approximate:function(b,c){if(!b||!c||b.length!=c.length)return!1;var d;for(d=0;d0?b:-b},circumferentialAngle:function(){var a=this.angle();return 0>a&&(a+=360),a},slope:function(){return this.y/this.x},add:function(a){return new b(this.x+a.x,this.y+a.y)},subtract:function(a){return new b(this.x-a.x,this.y-a.y)},multiply:function(a){return new b(this.x*a,this.y*a)},divide:function(a){return new b(this.x/a,this.y/a)},rotate:function(a){var c=this.x,d=this.y,e=Math.sin(a/180*Math.PI),f=Math.cos(a/180*Math.PI);return new b(c*f-d*e,c*e+d*f)},negate:function(){return new b(-this.x,-this.y)},normal:function(){var a=this.length()||1;return new b(-this.y/a,this.x/a)},normalize:function(){var a=this.length()||1;return new b(this.x/a,this.y/a)},clone:function(){return new b(this.x,this.y)}}})}(nx,window),function(a){var b=a.geometry.Vector,c=a.define("nx.geometry.Line",a.Observable,{methods:{init:function(a,c){this.start=a||new b,this.end=c||new b,this.dir=this.end.subtract(this.start)},length:function(){return this.dir.length()},squaredLength:function(){return this.dir.squaredLength()},angle:function(){return this.dir.angle()},circumferentialAngle:function(){var a=this.angle();return 0>a&&(a+=360),a},center:function(){return this.start.add(this.end).divide(2)},slope:function(){return this.dir.slope()},general:function(){var a=this.slope(),b=this.start;return isFinite(a)?[a,-1,b.y-a*b.x]:[1,0,-b.x]},intersection:function(a){var c=this.general(),d=a.general();return new b((c[1]*d[2]-d[1]*c[2])/(c[0]*d[1]-d[0]*c[1]),(c[0]*d[2]-d[0]*c[2])/(d[0]*c[1]-c[0]*d[1]))},pedal:function(a){var c=this.dir,d=this.general(),e=[c.x,c.y,-a.x*c.x-a.y*c.y];return new b((d[1]*e[2]-e[1]*d[2])/(d[0]*e[1]-e[0]*d[1]),(d[0]*e[2]-e[0]*d[2])/(e[0]*d[1]-d[0]*e[1]))},translate:function(a){return a=a.rotate(this.angle()),new c(this.start.add(a),this.end.add(a))},rotate:function(a){return new c(this.start.rotate(a),this.end.rotate(a))},negate:function(){return new c(this.end,this.start)},normal:function(){var a=this.dir,c=this.dir.length();return new b(-a.y/c,a.x/c)},pad:function(a,b){var d=this.dir.normalize();return new c(this.start.add(d.multiply(a)),this.end.add(d.multiply(-b)))},clone:function(){return new c(this.start,this.end)}}})}(nx),function(a){a.data.QuadTree=function(a,c,d,e){var f=c||800,g=d||600,h=a,i=0,j=0,k=0,l=0;if(this.root=null,this.alpha=0,h){for(var m,n,o,p=0,q=h.length;q>p;p++)m=h[p],m.dx=0,m.dy=0,n=m.x,o=m.y,isNaN(n)&&(n=m.x=Math.random()*f),isNaN(o)&&(o=m.y=Math.random()*g),i>n?i=n:n>k&&(k=n),j>o?j=o:o>l&&(l=o);var r=k-i,s=l-j;r>s?l=j+r:k=i+s;var t=this.root=new b(this,i,j,k,l);for(p=0;q>p;p++)t.insert(h[p])}};var b=function(a,c,d,e,f){var g=this.x1=c,h=this.y1=d,i=this.x2=e,j=this.y2=f,k=.5*(g+i),l=.5*(h+j),m=.5*(e-c),n=.5*(f-d);this.point=null,this.nodes=null,this.insert=function(a){var b=this.point,c=this.nodes;return b||c?void(b?Math.abs(b.x-a.x)+Math.abs(b.y-a.y)<.01?this._insert(a):(this.point=null,this._insert(b),this._insert(a)):this._insert(a)):void(this.point=a)},this._insert=function(c){var d=c.x>=k,e=c.y>=l,f=(e<<1)+d,i=g+m*d,j=h+n*e,o=this.nodes||(this.nodes=[]),p=o[f]||(o[f]=new b(a,i,j,i+m,j+n));p.insert(c)}}}(nx,nx.global),function(a){a.data.NextForce=function(b,c){var d=b||800,e=c||800,f=4,g=100,h=.1;this.charge=1200,this.alpha=1,this.totalEnergy=1/0,this.maxEnergy=1/0;var i=2,j=.8;this.nodes=null,this.links=null,this.quadTree=null,this.setTopoData=function(a){for(var b,c,d,e,f=this.nodes=a.nodes,g=this.links=a.links,h=this.nodeMap={},i=this.weightMap={},j=this.maxWeight=1,k=0,l=f.length; l>k; k++)b=f[k],d=b.id,h[d]=b,i[d]=0;if(g)for(l=g.length,k=0; l>k; ++k)c=g[k],d=c.source,e=++i[d],e>j&&(this.maxWeight=e),d=c.target,e=++i[d],e>j&&(this.maxWeight=e)},this.start=function(){for(var a=i*this.nodes.length;;)if(this.tick(),this.maxEnergy<5*i&&this.totalEnergyg;g++)h=b[g],this._calculateChargeEffect(f,h);this._changePosition()},this._changePosition=function(){var a,b,c,d,e,f,g,h=0,i=0,j=this.nodes,k=j.length,l=0,m=0,n=0,o=0,p=!0;for(a=0;k>a;a++)b=j[a],f=.5*b.dx,g=.5*b.dy,e=Math.abs(f)+Math.abs(g),b.fixed||(h+=e,e>i&&(i=e)),b.fixed?(c=b.x,d=b.y):(c=b.x+=f,d=b.y+=g,p=!1),l>c?l=c:c>n&&(n=c),m>d?m=d:d>o&&(o=d);this.totalEnergy=p?0:h,this.maxEnergy=p?0:i,this.x1=l,this.y1=m,this.x2=n,this.y2=o},this._calculateCenterGravitation=function(){var a,b,c,f=this.nodes,g=f.length,i=.5*h;b=d/2,c=e/2;for(var j=0;g>j;j++)a=f[j],a.dx+=(b-a.x)*i,a.dy+=(c-a.y)*i},this._calculateLinkEffect=function(){var a,b,c,d,e,h,i,j,k,l,m,n,o,p,q=this.links,r=this.nodeMap,s=this.weightMap;if(q)for(b=q.length,a=0;b>a;++a)if(c=q[a],d=r[c.source],e=r[c.target],h=e.x-d.x,i=e.y-d.y,0===h&&0===i&&(e.x+=5*Math.random(),e.y+=5*Math.random(),h=e.x-d.x,i=e.y-d.y),j=h*h+i*i,k=Math.sqrt(j),j){var t=this.maxWeight;l=f*(k-g)/k,h*=l,i*=l,n=s[d.id],o=s[e.id],p=n+o,m=n/p,e.dx-=h*m/t,e.dy-=i*m/t,m=1-m,d.dx+=h*m/t,d.dy+=i*m/t}},this._calculateQuadTreeCharge=function(a){if(!a.fixed){var b=a.nodes,c=a.point,d=0,e=0,f=0;if(!b)return a.charge=a.pointCharge=this.charge,a.chargeX=c.x,void(a.chargeY=c.y);if(b)for(var g,h,i=0,j=b.length;j>i;i++)g=b[i],g&&(this._calculateQuadTreeCharge(g),h=g.charge,f+=h,d+=h*g.chargeX,e+=h*g.chargeY);if(c){var k=this.charge;f+=k,d+=k*c.x,e+=k*c.y}a.charge=f,a.chargeX=d/f,a.chargeY=e/f}},this._calculateChargeEffect=function(a,b){if(this.__calculateChargeEffect(a,b)){var c=a.nodes;if(c)for(var d,e=0,f=c.length;f>e;e++)d=c[e],d&&this._calculateChargeEffect(d,b)}},this.__calculateChargeEffect=function(a,b){if(a.point!=b){var c,d=a.chargeX-b.x,e=a.chargeY-b.y,f=d*d+e*e,g=Math.sqrt(f),h=1/g;if((a.x2-a.x1)*h(e-c)*i)return f=b.charge*i*i,a.px-=g*f,a.py-=h*f,!0;b.point&&isFinite(i)&&(f=b.pointCharge*i*i,a.px-=g*f,a.py-=h*f)}return!b.charge}}var d,e,f,g={},h=[100,100],i=0,j=.9,k=function(){return 100},l=function(){return 1},m=-1200,n=.1,o=.8,p=[],q=[];return g.tick=function(){if((i*=.99)<.005)return i=0,!0;var g,k,l,o,r,s,t,u,v,w=p.length,x=q.length;for(k=0;x>k;++k)l=q[k],o=l.source,r=l.target,u=r.x-o.x,v=r.y-o.y,(s=u*u+v*v)&&(s=i*e[k]*((s=Math.sqrt(s))-d[k])/s,u*=s,v*=s,r.x-=u*(t=o.weight/(r.weight+o.weight)),r.y-=v*t,o.x+=u*(t=1-t),o.y+=v*t);if((t=i*n)&&(u=h[0]/2,v=h[1]/2,k=-1,t))for(;++k0?a:0:a>0&&(i=a,g.tick()),g):i},g.start=function(){function a(a,d){for(var e,f=b(c),g=-1,h=f.length;++gi;++i)j[i]=[];for(i=0;r>i;++i){var a=q[i];j[a.source.index].push(a.target),j[a.target.index].push(a.source)}}return j[c]}var c,i,j,n,o=p.length,r=q.length,s=h[0],t=h[1];for(c=0;o>c;++c)(n=p[c]).index=c,n.weight=0;for(d=[],e=[],c=0;r>c;++c)n=q[c],"number"==typeof n.source&&(n.source=p[n.source]),"number"==typeof n.target&&(n.target=p[n.target]),d[c]=k.call(this,n,c),e[c]=l.call(this,n,c),++n.source.weight,++n.target.weight;for(c=0;o>c;++c)n=p[c],isNaN(n.x)&&(n.x=a("x",s)),isNaN(n.y)&&(n.y=a("y",t)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(f=[],"function"==typeof m)for(c=0;o>c;++c)f[c]=+m.call(this,p[c],c);else for(c=0;o>c;++c)f[c]=m;return g.resume()},g.resume=function(){return g.alpha(.1)},g.stop=function(){return g.alpha(0)},g};var b=function(a,c,d){var e=0,f=0;if(a.charge=0,!a.leaf)for(var g,h=a.nodes,i=h.length,j=-1;++j=i,l=b.y>=j,m=(l<<1)+k;a.leaf=!1,a=a.nodes[m]||(a.nodes[m]=d()),k?c=i:f=i,l?e=j:g=j,h(a,b,c,e,f,g)}var j,k=-1,l=a.length;if(arguments.length<5)if(3===arguments.length)g=c,f=b,c=b=0;else for(b=c=1/0,f=g=-1/0;++kf&&(f=j.x),j.y>g&&(g=j.y);var m=f-b,n=g-c;m>n?g=c+m:f=b+n;var o=d();return o.add=function(a){h(o,a,b,c,f,g)},o.visit=function(a){e(a,o,b,c,f,g)},a.forEach(o.add),o},d=function(){return{leaf:!0,nodes:[],point:null}},e=function(a,b,c,d,f,g){if(!a(b,c,d,f,g)){var h=.5*(c+f),i=.5*(d+g),j=b.nodes;j[0]&&e(a,j[0],c,d,h,i),j[1]&&e(a,j[1],h,d,f,i),j[2]&&e(a,j[2],c,i,h,g),j[3]&&e(a,j[3],h,i,f,g)}}}(nx,nx.global),function(a){a.define("nx.data.Convex",{"static":!0,methods:{multiply:function(a,b,c){return(a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y)},dis:function(a,b){return Math.sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))},process:function(a){var b,c,d,e=[],f=a.length,g=0,h=2;for(b=1;f>b;b++)(a[b].yb;b++){for(g=b,c=b+1;f>c;c++)(this.multiply(a[c],a[g],a[0])>0||0===this.multiply(a[c],a[g],a[0])&&this.dis(a[0],a[c])b;b++){for(;h>0&&this.multiply(a[b],e[h],e[h-1])>=0;)h--,e.pop();e[++h]=a[b]}return e}}})}(nx,nx.global),function(a){var b=a.geometry.Vector;a.define("nx.data.Vertex",a.data.ObservableObject,{events:["updateCoordinate"],properties:{id:{},positionGetter:{value:function(){return function(){return{x:a.path(this._data,"x")||0,y:a.path(this._data,"y")||0}}}},positionSetter:{value:function(){return function(b){if(this._data){var c=a.path(this._data,"x"),d=a.path(this._data,"y");return b.x!==c||b.y!==d?(a.path(this._data,"x",b.x),a.path(this._data,"y",b.y),!0):!1}}}},position:{get:function(){return{x:this._x||0,y:this._y||0}},set:function(a){var b=!1,c={x:this._x,y:this._y};void 0!==a.x&&this._x!==a.x&&(this._x=a.x,b=!0),void 0!==a.y&&this._y!==a.y&&(this._y=a.y,b=!0),b&&(this.positionSetter().call(this,{x:this._x,y:this._y}),this.fire("updateCoordinate",{oldPosition:c,newPosition:{x:this._x,y:this._y}}),this.notify("vector"))}},x:{get:function(){return this._x||0},set:function(a){this.position({x:parseFloat(a)})}},y:{get:function(){return this._y||0},set:function(a){this.position({y:parseFloat(a)})}},vector:{get:function(){var a=this.position();return new b(a.x,a.y)}},restricted:{value:!1},visible:{get:function(){return void 0!==this._visible?this._visible:!0},set:function(b){this._visible=b;var c=this.graph();b===!1?this.generated()&&(a.each(this.edgeSetCollections(),function(a,b){c.deleteEdgeSetCollection(b)},this),c.removeVertex(this.id())):this.restricted()||this.generated()||(c.generateVertex(this),a.each(this.edgeSets(),function(a){c._generateConnection(a)}));var d=this.parentVertexSet();d&&c.updateVertexSet(d)}},generated:{value:!1},updated:{value:!1},type:{value:"vertex"},edgeSets:{value:function(){return{}}},edgeSetCollections:{value:function(){return{}}},edges:{get:function(){var b={};return a.each(this.edgeSets(),function(c){a.extend(b,c.edges())}),b}},connectedVertices:{get:function(){var a={};return this.eachConnectedVertex(function(b,c){a[c]=b},this),a}},graph:{},parentVertexSet:{},rootVertexSet:{get:function(){for(var a=this.parentVertexSet();a&&a.parentVertexSet();)a=a.parentVertexSet();return a}},generatedRootVertexSet:{get:function(){for(var a,b=this.parentVertexSet();b;)b.generated()&&b.activated()&&(a=b),b=b.parentVertexSet();return a}},selected:{value:!1}},methods:{set:function(b,c){this.has(b)?this[b].call(this,c):(a.path(this._data,b,c),this.notify(b))},get:function(b){return this.has(b)?this[b].call(this):a.path(this._data,b)},has:function(a){var b=this[a];return b&&"property"==b.__type__},getData:function(){return this._data},addEdgeSet:function(a,b){var c=this.edgeSets();c[b]=a},removeEdgeSet:function(a){var b=this.edgeSets();delete b[a]},addEdgeSetCollection:function(a,b){var c=this.edgeSetCollections();c[b]=a},removeEdgeSetCollection:function(a){var b=this.edgeSetCollections();delete b[a]},eachConnectedVertex:function(b,c){var d=this.id();a.each(this.edgeSets(),function(a){var e=a.sourceID()==d?a.target():a.source();e.visible()&&!e.restricted()&&b.call(c||this,e,e.id())},this),a.each(this.edgeSetCollections(),function(a){var e=a.sourceID()==d?a.target():a.source();e.visible()&&!e.restricted()&&b.call(c||this,e,e.id())},this)},translate:function(a,b){var c=this.position();null!=a&&(c.x+=a),null!=b&&(c.y+=b),this.position(c)}}})}(nx,nx.global),function(a){var b=a.geometry.Line;a.define("nx.data.Edge",a.data.ObservableObject,{events:["updateCoordinate"],properties:{source:{value:null},target:{value:null},sourceID:{value:null},targetID:{value:null},linkKey:{},reverseLinkKey:{},generated:{value:!1},updated:{value:!1},type:{value:"edge"},id:{},parentEdgeSet:{},line:{get:function(){return new b(this.source().vector(),this.target().vector())}},position:{get:function(){return{x1:this.source().get("x"),y1:this.source().get("y"),x2:this.target().get("x"),y2:this.target().get("y")}}},reverse:{value:!1},graph:{}},methods:{getData:function(){return this._data},attachEvent:function(){this.source().on("updateCoordinate",this._updateCoordinate,this),this.target().on("updateCoordinate",this._updateCoordinate,this)},_updateCoordinate:function(){this.fire("updateCoordinate")},dispose:function(){this.source().off("updateCoordinate",this._updateCoordinate,this),this.target().off("updateCoordinate",this._updateCoordinate,this),this.inherited()}}})}(nx,nx.global),function(a){a.util;a.define("nx.data.VertexSet",a.data.Vertex,{properties:{position:{get:function(){return{x:this._x||0,y:this._y||0}},set:function(b){var c=!1,d={x:this._x,y:this._y};if(void 0!==b.x&&this._x!==b.x&&(this._x=b.x,c=!0),void 0!==b.y&&this._y!==b.y&&(this._y=b.y,c=!0),c){this.positionSetter().call(this,{x:this._x,y:this._y});var e=this._x-d.x,f=this._y-d.y;a.each(this.vertices(),function(a){a.translate(e,f)}),a.each(this.vertexSet(),function(a){a.translate(e,f)}),this.fire("updateCoordinate",{oldPosition:d,newPosition:{x:this._x,y:this._y}}),this.notify("vector")}}},vertices:{value:function(){return{}}},vertexSet:{value:function(){return{}}},subVertices:{get:function(){var a={};return this.eachSubVertex(function(b,c){a[c]=b}),a}},subVertexSet:{get:function(){var a={};return this.eachSubVertexSet(function(b,c){a[c]=b}),a}},visible:{value:!0},inheritedVisible:{get:function(){var b=!0;return a.each(this.vertices(),function(a){a.visible()&&(b=!1)}),a.each(this.vertexSet(),function(a){a.visible()&&(b=!1)},this),!b}},type:{value:"vertexSet"},activated:{get:function(){return void 0!==this._activated?this._activated:!0},set:function(a){return this._activated!==a?(a?this._collapse():this._expand(),!0):!1}}},methods:{initNodes:function(){var b=this.graph(),c=this.get("nodes");a.each(c,function(a){var c=b.vertices().getItem(a)||b.vertexSets().getItem(a);if(c&&!c.restricted()){var d="vertex"==c.type()?this.vertices():this.vertexSet();d[a]=c,c.restricted(!0),c.parentVertexSet(this)}else console&&console.warn("NodeSet data error",this.id(),a)},this)},addVertex:function(a){var b=this.get("nodes");if(a){var c=a.id(),d="vertex"==a.type()?this.vertices():this.vertexSet();d[c]=a,a.restricted(!0);var e=a.parentVertexSet();e&&(e.removeVertex(c),e.updated(!0)),a.parentVertexSet(this),b.push(a.id()),this.updated(!0)}},removeVertex:function(a){var b=this.get("nodes"),c=this.vertices()[a]||this.vertexSet()[a];c&&(c.parentVertexSet(null),delete this.vertices()[a],delete this.vertexSet()[a],b.splice(b.indexOf(a),1),this.updated(!0))},eachSubVertex:function(b,c){a.each(this.vertices(),b,c||this),a.each(this.vertexSet(),function(a){a.eachSubVertex(b,c)},this)},eachSubVertexSet:function(b,c){a.each(this.vertexSet(),b,c||this),a.each(this.vertexSet(),function(a){a.eachSubVertexSet(b,c)},this)},getSubEdgeSets:function(){var b={};return this.eachSubVertex(function(c){a.each(c.edgeSets(),function(a,c){b[c]=a})},this),b},_expand:function(){var b=this.graph(),c=this.parentVertexSet();c&&c.activated(!1),this._activated=!1,a.each(this.edgeSetCollections(),function(a,c){b.deleteEdgeSetCollection(c)},this),a.each(this.vertices(),function(a){a.restricted(!1),a.visible()&&b.generateVertex(a)},this),a.each(this.vertexSet(),function(a){a.restricted(!1),a.visible()&&b.generateVertexSet(a)},this),this.visible(!1),this._generateConnection()},_collapse:function(){var b=this.graph();this._activated=!0,this.eachSubVertex(function(c){c.restricted(!0),c.generated()&&a.each(c.edgeSetCollections(),function(a,c){b.deleteEdgeSetCollection(c)})},this),a.each(this.vertexSet(),function(a,c){a.restricted(!0),a.generated()&&b.removeVertexSet(c,!1)},this),a.each(this.vertices(),function(a,c){a.restricted(!0),a.generated()&&b.removeVertex(c)},this),this.visible(!0),this._generateConnection()},_generateConnection:function(){var b=this.graph();a.each(this.getSubEdgeSets(),function(a){b._generateConnection(a)},this)}}})}(nx,nx.global),function(a){a.define("nx.data.EdgeSet",a.data.Edge,{properties:{edges:{value:function(){return{}}},type:{value:"edgeSet"},activated:{get:function(){return void 0!==this._activated?this._activated:!0 -},set:function(b){var c=this.graph();a.each(this.edges(),function(a,d){b?c.removeEdge(d,!1):c.generateEdge(a)},this),this._activated=b}}},methods:{addEdge:function(a){var b=this.edges();b[a.id()]=a},removeEdge:function(a){var b=this.edges();delete b[a]}}})}(nx,nx.global),function(a){a.define("nx.data.EdgeSetCollection",a.data.Edge,{properties:{edgeSets:{value:function(){return{}}},edges:{get:function(){var b={};return a.each(this.edgeSets(),function(c){a.extend(b,c.edges())}),b}},type:{value:"edgeSetCollection"},activated:{get:function(){return void 0!==this._activated?this._activated:!0},set:function(b){this.graph();a.each(this.edgeSets(),function(a){a.activated(b,{force:!0})}),this._activated=b}}},methods:{addEdgeSet:function(a){var b=this.edgeSets();b[a.linkKey()]=a},removeEdgeSet:function(a){var b=this.edgeSets();delete b[a]}}})}(nx,nx.global),function(a){a.util;a.define("nx.data.ObservableGraph.Vertices",a.data.ObservableObject,{events:["addVertex","removeVertex","deleteVertex","updateVertex","updateVertexCoordinate"],properties:{nodes:{get:function(){return this._nodes||[]},set:function(b){this._nodes&&a.is(this._nodes,a.data.ObservableCollection)&&this._nodes.off("change",this._nodesCollectionProcessor,this),this.vertices().clear(),a.is(b,a.data.ObservableCollection)?(b.on("change",this._nodesCollectionProcessor,this),b.each(function(a){this._addVertex(a)},this),this._nodes=b):b&&(a.each(b,this._addVertex,this),this._nodes=b.slice())}},vertexFilter:{},vertices:{value:function(){var b=new a.data.ObservableDictionary;return b.on("change",function(b,c){var d=c.action,e=c.items;"clear"==d&&a.each(e,function(a){this.deleteVertex(a.key())},this)},this),b}},visibleVertices:{get:function(){var a={};return this.eachVertex(function(b,c){b.visible()&&(a[c]=b)}),a}},vertexPositionGetter:{},vertexPositionSetter:{}},methods:{addVertex:function(b,c){{var d,e=this.nodes(),f=this.vertices();this.identityKey()}return a.is(e,a.data.ObservableCollection)?(e.add(b),d=f.getItem(f.count()-1)):(d=this._addVertex(b,c),d&&e.push(b)),d?(c&&d.sets(c),this.generateVertex(d),d):null},_addVertex:function(b){var c=this.vertices(),d=this.identityKey();("string"==typeof b||"number"==typeof b)&&(b={data:b});var e=a.path(b,d);if(e=void 0!==e?e:this.vertexSets().count()+this.vertices().count(),c.getItem(e))return null;var f=new a.data.Vertex(b),g=this.vertexPositionGetter(),h=this.vertexPositionSetter();if(g&&h&&(f.positionGetter(g),f.positionSetter(h)),f.sets({graph:this,id:e}),a.is(b,a.data.ObservableObject)){var i=b.set;b.set=function(a,c){i.call(b,a,c),-1==f.__properties__.indexOf(a)&&(f.has(a)?f[a].call(f,c):f.notify(a))}}f.position(f.positionGetter().call(f)),c.setItem(e,f);var j=this.vertexFilter();if(j&&a.is(j,Function)){var k=j.call(this,b,f);f.visible(k===!1)}return f},generateVertex:function(a){!a.visible()||a.generated()||a.restricted()||(a.on("updateCoordinate",this._updateVertexCoordinateFN,this),this.fire("addVertex",a),a.generated(!0))},_updateVertexCoordinateFN:function(a){this.fire("updateVertexCoordinate",a)},removeVertex:function(b){var c=this.vertices().getItem(b);return c?(a.each(c.edgeSets(),function(a,b){this.removeEdgeSet(b)},this),a.each(c.edgeSetCollections(),function(a,b){this.deleteEdgeSetCollection(b)},this),c.off("updateCoordinate",this._updateVertexCoordinateFN,this),c.generated(!1),this.fire("removeVertex",c),c):!1},deleteVertex:function(b){var c=this.nodes(),d=this.getVertex(b);if(d)if(a.is(c,a.data.ObservableCollection)){var e=d.getData();c.remove(e)}else{var f=this.nodes().indexOf(d.getData());-1!=f&&this.nodes().splice(f,1),this._deleteVertex(b)}},_deleteVertex:function(b){var c=this.vertices().getItem(b);if(!c)return!1;a.each(c.edgeSets(),function(a){this.deleteEdgeSet(a.linkKey())},this),a.each(c.edgeSetCollections(),function(a){this.deleteEdgeSetCollection(a.linkKey())},this);var d=c.parentVertexSet();d&&d.removeVertex(b),c.off("updateCoordinate",this._updateVertexCoordinateFN,this),c.generated(!1),this.fire("deleteVertex",c),this.vertices().removeItem(b),c.dispose()},eachVertex:function(a,b){this.vertices().each(function(c,d){a.call(b||this,c.value(),d)})},getVertex:function(a){return this.vertices().getItem(a)},_nodesCollectionProcessor:function(b,c){var d=c.items,e=c.action,f=this.identityKey();"add"==e?a.each(d,function(a){var b=this._addVertex(a);this.generateVertex(b)},this):"remove"==e?a.each(d,function(b){var c=a.path(b,f);this._deleteVertex(c)},this):"clear"==e&&this.vertices().clear()}}})}(nx,nx.global),function(a){a.define("nx.data.ObservableGraph.VertexSets",a.data.ObservableObject,{events:["addVertexSet","removeVertexSet","updateVertexSet","updateVertexSetCoordinate"],properties:{nodeSet:{get:function(){return this._nodeSet||[]},set:function(b){this._nodeSet&&a.is(this._nodeSet,a.data.ObservableCollection)&&this._nodeSet.off("change",this._nodeSetCollectionProcessor,this),this.vertexSets().clear(),a.is(b,a.data.ObservableCollection)?(b.on("change",this._nodeSetCollectionProcessor,this),b.each(function(a){this._addVertexSet(a)},this),this._nodeSet=b):b&&(a.each(b,this._addVertexSet,this),this._nodeSet=b.slice()),this.eachVertexSet(this.initVertexSet,this)}},vertexSets:{value:function(){var b=new a.data.ObservableDictionary;return b.on("change",function(b,c){var d=c.action,e=c.items;"clear"==d&&a.each(e,function(a){this.removeVertexSet(a.key())},this)},this),b}},visibleVertexSets:{get:function(){var a={};return this.eachVertexSet(function(b,c){b.visible()&&(a[c]=b)}),a}}},methods:{addVertexSet:function(b,c){var d,e=this.nodeSet(),f=this.vertexSets();if(a.is(e,a.data.ObservableCollection)?(e.add(b),d=f.getItem(f.count()-1)):(e.push(b),d=this._addVertexSet(b)),!d)return null;if(c&&d.sets(c),null!=c.parentVertexSetID){var g=this.getVertexSet(c.parentVertexSetID);g&&g.addVertex(d)}return this.initVertexSet(d),this.generateVertexSet(d),d.activated(!0,{force:!0}),this.updateVertexSet(d),d},_addVertexSet:function(b){var c=this.identityKey(),d=this.vertexSets();("string"==typeof b||"number"==typeof b)&&(b={data:b});var e=a.path(b,c);if(e=void 0!==e?e:this.vertexSets().count()+this.vertices().count(),d.getItem(e))return null;var f=new a.data.VertexSet(b),g=this.vertexPositionGetter(),h=this.vertexPositionSetter();if(g&&h&&(f.positionGetter(g),f.positionSetter(h)),f.sets({graph:this,type:"vertexSet",id:e}),a.is(b,a.data.ObservableObject)){var i=b.set;b.set=function(a,c){i.call(b,a,c),-1==f.__properties__.indexOf(a)&&(f.has(a)?f[a].call(f,c):f.notify(a))}}return f.position(f.positionGetter().call(f)),this.vertexSets().setItem(e,f),f},initVertexSet:function(a){a.initNodes()},generateVertexSet:function(a){a.visible()&&!a.generated()&&(a.generated(!0),a.on("updateCoordinate",this._updateVertexSetCoordinateFN,this),this.fire("addVertexSet",a))},_updateVertexSetCoordinateFN:function(a){this.fire("updateVertexSetCoordinate",a)},updateVertexSet:function(a){a.generated()&&(a.updated(!1),this.fire("updateVertexSet",a))},removeVertexSet:function(b){var c=this.vertexSets().getItem(b);return c?(c.activated(!0),a.each(c.edgeSets(),function(a,b){this.removeEdgeSet(b)},this),a.each(c.edgeSetCollections(),function(a,b){this.deleteEdgeSetCollection(b)},this),c.generated(!1),c.off("updateCoordinate",this._updateVertexSetCoordinateFN,this),void this.fire("removeVertexSet",c)):!1},deleteVertexSet:function(b){var c=this.nodeSet(),d=this.getVertexSet(b);if(d)if(a.is(c,a.data.ObservableCollection)){var e=d.getData();c.remove(e)}else{var f=this.nodeSet().indexOf(d.getData());-1!=f&&this.nodeSet().splice(f,1),this._deleteVertexSet(b)}},_deleteVertexSet:function(b){var c=this.vertexSets().getItem(b);if(!c)return!1;c.generated()&&c.activated(!1);var d=c.parentVertexSet();d&&d.removeVertex(b),a.each(c.vertices(),function(a){d?d.addVertex(a):a.parentVertexSet(null)}),a.each(c.vertexSet(),function(a){d?d.addVertex(a):a.parentVertexSet(null)}),c.off("updateCoordinate",this._updateVertexCoordinateFN,this),c.generated(!1),this.vertexSets().removeItem(b),this.fire("deleteVertexSet",c),c.dispose()},eachVertexSet:function(a,b){this.vertexSets().each(function(c,d){a.call(b||this,c.value(),d)})},getVertexSet:function(a){return this.vertexSets().getItem(a)},_nodeSetCollectionProcessor:function(b,c){var d=c.items,e=c.action,f=this.identityKey();"add"==e?a.each(d,function(a){var b=this._addVertexSet(a);this.generateVertexSet(b)},this):"remove"==e?a.each(d,function(b){var c=a.path(b,f);this._deleteVertexSet(c)},this):"clear"==e&&this.vertexSets().clear()}}})}(nx,nx.global),function(a){a.define("nx.data.ObservableGraph.Edges",a.data.ObservableObject,{events:["addEdge","removeEdge","deleteEdge","updateEdge","updateEdgeCoordinate"],properties:{links:{get:function(){return this._links||[]},set:function(b){this._links&&a.is(this._links,a.data.ObservableCollection)&&this._links.off("change",this._linksCollectionProcessor,this),this.edgeSetCollections().clear(),this.edgeSets().clear(),this.edges().clear(),a.is(b,a.data.ObservableCollection)?(b.on("change",this._linksCollectionProcessor,this),b.each(function(a){this._addEdge(a)},this),this._links=b):b&&(a.each(b,this._addEdge,this),this._links=b.slice())}},edgeFilter:{},edges:{value:function(){var b=new a.data.ObservableDictionary;return b.on("change",function(b,c){var d=c.action,e=c.items;"clear"==d&&a.each(e,function(a){this.deleteEdge(a.key())},this)},this),b}}},methods:{addEdge:function(b,c){var d,e=this.links(),f=this.edges();if(null==b.source||null==b.target)return void 0;if(a.is(e,a.data.ObservableCollection)?(e.add(b),d=f.getItem(f.count()-1)):(d=this._addEdge(b),d&&e.push(b)),!d)return null;c&&d.sets(c);var g=d.parentEdgeSet();return g.generated()?this.updateEdgeSet(g):this.generateEdgeSet(g),d},_addEdge:function(b){{var c,d,e,f,g=this.edges();this.identityKey()}if(null==b.source||null==b.target)return void 0;if(e=null!=a.path(b,"source")?a.path(b,"source"):b.source,c=this.vertices().getItem(e),f=null!=a.path(b,"target")?a.path(b,"target"):b.source,d=this.vertices().getItem(f),c&&d){var h=new a.data.Edge(b),i=null!=a.path(b,"id")?a.path(b,"id"):h.__id__;if(g.getItem(i))return null;h.sets({id:i,source:c,target:d,sourceID:e,targetID:f,graph:this}),h.attachEvent(),g.setItem(i,h);var j=this.getEdgeSetBySourceAndTarget(e,f);j?j.updated(!0):j=this._addEdgeSet({source:c,target:d,sourceID:e,targetID:f}),h.sets({linkKey:j.linkKey(),reverseLinkKey:j.reverseLinkKey()}),j.addEdge(h),h.parentEdgeSet(j),h.reverse(e!==j.sourceID());var k=this.edgeFilter();if(k&&a.is(k,Function)){var l=k.call(this,b,h);h.visible(l===!1)}return h}return void(console&&console.warn("source node or target node is not defined, or linkMappingKey value error",b,c,d))},generateEdge:function(a){a.generated()||(a.on("updateCoordinate",this._updateEdgeCoordinate,this),this.fire("addEdge",a),a.generated(!0))},removeEdge:function(a,b){var c=this.edges().getItem(a);if(!c)return!1;if(c.generated(!1),c.off("updateCoordinate",this._updateEdgeCoordinate,this),this.fire("removeEdge",c),b!==!1){var d=c.parentEdgeSet();this.updateEdgeSet(d)}},deleteEdge:function(b,c){var d=this.getEdge(b);if(!d)return!1;var e=this.links();if(a.is(e,a.data.ObservableCollection))e.removeAt(d.getData());else{var f=e.indexOf(d.getData());-1!=f&&e.splice(f,1),this._deleteEdge(b,c)}},_deleteEdge:function(a,b){var c=this.getEdge(a);if(!c)return!1;if(c.off("updateCoordinate",this._updateEdgeCoordinate,this),b!==!1){var d=c.parentEdgeSet();d.removeEdge(a),this.updateEdgeSet(d)}this.fire("deleteEdge",c),this.edges().removeItem(a),c.dispose()},_updateEdgeCoordinate:function(a){this.fire("updateEdgeCoordinate",a)},getEdge:function(a){return this.edges().getItem(a)},getEdgesBySourceAndTarget:function(a,b){var c=this.getEdgeSetBySourceAndTarget(a,b);return c&&c.getEdges()},getEdgesByVertices:function(){},getInternalEdgesByVertices:function(){},getExternalEdgesByVertices:function(){},_linksCollectionProcessor:function(b,c){var d=c.items,e=c.action;if("add"==e)a.each(d,function(a){var b=this._addEdge(a),c=b.parentEdgeSet();c.generated()?this.updateEdgeSet(c):this.generateEdgeSet(c)},this);else if("remove"==e){var f=[];this.edges().each(function(a){var b=a.value();-1!=d.indexOf(b.getData())&&f.push(b.id())},this),a.each(f,function(a){this._deleteEdge(a)},this)}else"clear"==e&&this.edges().clear()}}})}(nx,nx.global),function(a){a.define("nx.data.ObservableGraph.EdgeSets",a.data.ObservableObject,{events:["addEdgeSet","updateEdgeSet","removeEdgeSet","deleteEdgeSet","updateEdgeSetCoordinate"],properties:{edgeSets:{value:function(){var b=new a.data.ObservableDictionary;return b.on("change",function(b,c){var d=c.action,e=c.items;"clear"==d&&a.each(e,function(a){this.deleteEdgeSet(a.key())},this)},this),b}}},methods:{_addEdgeSet:function(b){var c=new a.data.EdgeSet,d=c.__id__,e=b.sourceID+"_"+b.targetID,f=b.targetID+"_"+b.sourceID;return c.sets(b),c.sets({graph:this,linkKey:e,reverseLinkKey:f,id:d}),c.source().addEdgeSet(c,e),c.target().addEdgeSet(c,e),c.attachEvent(),this.edgeSets().setItem(e,c),c},generateEdgeSet:function(a){!a.generated()&&a.source().generated()&&a.target().generated()&&(a.generated(!0),a.on("updateCoordinate",this._updateEdgeSetCoordinate,this),this.fire("addEdgeSet",a))},updateEdgeSet:function(a){a.generated()&&a.source().generated()&&a.target().generated()&&(a.updated(!1),this.fire("updateEdgeSet",a))},removeEdgeSet:function(b){var c=this.edgeSets().getItem(b);return c?(c.off("updateCoordinate",this._updateEdgeSetCoordinate,this),a.each(c.edges(),function(a,b){this.removeEdge(b,!1)},this),c.generated(!1),c._activated=!0,void this.fire("removeEdgeSet",c)):!1},deleteEdgeSet:function(b){var c=this.edgeSets().getItem(b);return c?(c.off("updateCoordinate",this._updateEdgeSetCoordinate,this),a.each(c.edges(),function(a,b){this.deleteEdge(b,!1)},this),c.source().removeEdgeSet(b),c.target().removeEdgeSet(b),this.fire("deleteEdgeSet",c),this.edgeSets().removeItem(b),void c.dispose()):!1},_updateEdgeSetCoordinate:function(a){this.fire("updateEdgeSetCoordinate",a)},getEdgeSetBySourceAndTarget:function(b,c){var d=this.edgeSets(),e=a.is(b,a.data.Vertex)?b.id():b,f=a.is(c,a.data.Vertex)?c.id():c,g=e+"_"+f,h=f+"_"+e;return d.getItem(g)||d.getItem(h)},eachEdgeSet:function(a,b){this.edgeSets().each(function(c,d){a.call(b||this,c.value(),d)})}}})}(nx,nx.global),function(a){a.define("nx.data.ObservableGraph.EdgeSetCollections",a.data.ObservableObject,{events:["addEdgeSetCollection","removeEdgeSetCollection","deleteEdgeSetCollection","updateEdgeSetCollection","updateEdgeSetCollectionCoordinate"],properties:{edgeSetCollections:{value:function(){var b=new a.data.ObservableDictionary;return b.on("change",function(b,c){var d=c.action,e=c.items;"clear"==d&&a.each(e,function(a){a.value()&&this.deleteEdgeSetCollection(a.value().linkKey())},this)},this),b}}},methods:{_addEdgeSetCollection:function(b){var c=new a.data.EdgeSetCollection,d=c.__id__,e=b.sourceID+"_"+b.targetID,f=b.targetID+"_"+b.sourceID;return c.sets(b),c.sets({graph:this,linkKey:e,reverseLinkKey:f,id:d}),c.source().addEdgeSetCollection(c,e),c.target().addEdgeSetCollection(c,e),c.attachEvent(),this.edgeSetCollections().setItem(e,c),c},generateEdgeSetCollection:function(a){a.generated(!0),a.on("updateCoordinate",this._updateEdgeSetCollectionCoordinate,this),this.fire("addEdgeSetCollection",a)},updateEdgeSetCollection:function(a){a.updated(!0),this.fire("updateEdgeSetCollection",a)},removeEdgeSetCollection:function(a){var b=this.edgeSetCollections().getItem(a);return b?(b.generated(!1),b.off("updateCoordinate",this._updateEdgeSetCollectionCoordinate,this),void this.fire("removeEdgeSetCollection",b)):!1},deleteEdgeSetCollection:function(a){var b=this.edgeSetCollections().getItem(a);return b?(b.off("updateCoordinate",this._updateEdgeSetCollectionCoordinate,this),b.source().removeEdgeSetCollection(a),b.target().removeEdgeSetCollection(a),this.fire("deleteEdgeSetCollection",b),this.edgeSetCollections().removeItem(a),void b.dispose()):!1},getEdgeSetCollectionBySourceAndTarget:function(b,c){var d=this.edgeSetCollections(),e=a.is(b,a.data.Vertex)?b.id():b,f=a.is(c,a.data.Vertex)?c.id():c,g=e+"_"+f,h=f+"_"+e;return d.getItem(g)||d.getItem(h)},_updateEdgeSetCollectionCoordinate:function(a){this.fire("updateEdgeSetCollectionCoordinate",a)},eachEdgeCollections:function(a,b){this.edgeSetCollections().each(function(c,d){a.call(b||this,c.value(),d)})},_generateConnection:function(a){if(a.source().visible()&&a.target().visible()){var b=this._getGeneratedRootVertexSetOfEdgeSet(a);if(b.source&&b.target&&b.source!=b.target&&b.source.visible()&&b.target.visible())if(b.source.id()==a.sourceID()&&b.target.id()==a.targetID())this.generateEdgeSet(a);else{var c=this.getEdgeSetCollectionBySourceAndTarget(b.source.id(),b.target.id());c||(c=this._addEdgeSetCollection({source:b.source,target:b.target,sourceID:b.source.id(),targetID:b.target.id()}),this.generateEdgeSetCollection(c)),c.addEdgeSet(a),this.updateEdgeSetCollection(c)}}},_getGeneratedRootVertexSetOfEdgeSet:function(a){var b=a.source();b.generated()||(b=b.generatedRootVertexSet());var c=a.target();return c.generated()||(c=c.generatedRootVertexSet()),{source:b,target:c}}}})}(nx,nx.global),function(a){a.define("nx.data.ObservableGraph.NeXtForceProcessor",{methods:{process:function(b,c){var d=(new Date,{nodes:b.nodes,links:[]}),e={};a.each(b.nodes,function(a,b){e[a[c]]=b}),d.links=[],a.each(b.links,function(b){a.is(b.source,"Object")||void 0===e[b.source]||a.is(b.target,"Object")||void 0===e[b.target]||d.links.push({source:e[b.source],target:e[b.target]})});var f=new a.data.NextForce;if(f.setTopoData(b),console.log(d.nodes.length),d.nodes.length<50){for(;;)if(f.tick(),f.maxEnergy<.1*d.nodes.length)break}else for(var g=0; ++g<900;)f.tick();return console.log(f.maxEnergy),b}}})}(nx,nx.global,nx.logger),function(a){a.define("nx.data.ObservableGraph.ForceProcessor",{methods:{process:function(b, c){{var d;new Date}d={nodes:b.nodes,links:[]};var e={};a.each(b.nodes,function(a, b){e[a[c]]=b}),a.each(b.links,function(b){a.is(b.source,"Object")||void 0===e[b.source]||a.is(b.target,"Object")||void 0===e[b.target]||d.links.push("ixd"==c?{source:b.source,target:b.target}:{source:e[b.source],target:e[b.target]})});var f=new a.data.Force;for(f.nodes(d.nodes),f.links(d.links),f.start();f.alpha();)f.tick();return f.stop(),b}}})}(nx,nx.global,nx.logger),function(a){a.define("nx.data.ObservableGraph.QuickProcessor",{methods:{process:function(b,c,d){return a.each(b.nodes,function(a){a.x=Math.floor(Math.random()*d.width()),a.y=Math.floor(Math.random()*d.height())}),b}}})}(nx,nx.global),function(a){var b=a.define("nx.data.ObservableGraph.DataProcessor",{statics:{dataProcessor:{nextforce:new a.data.ObservableGraph.NeXtForceProcessor,force:new a.data.ObservableGraph.ForceProcessor,quick:new a.data.ObservableGraph.QuickProcessor},registerDataProcessor:function(a,b){GRAPH.dataProcessor[a]=b}},properties:{dataProcessor:{},width:{value:100},height:{value:100}},methods:{processData:function(a){var c=this._identityKey,d=this._dataProcessor;if(d){var e=b.dataProcessor[d];return e?e.process(a,c,this):a}return a}}})}(nx,nx.global),function(a){a.define("nx.data.ObservableGraph",a.data.ObservableObject,{mixins:[a.data.ObservableGraph.DataProcessor,a.data.ObservableGraph.Vertices,a.data.ObservableGraph.VertexSets,a.data.ObservableGraph.Edges,a.data.ObservableGraph.EdgeSets,a.data.ObservableGraph.EdgeSetCollections],event:["setTopoData","insertData","clear","startGenerate","endGenerate"],properties:{identityKey:{value:"index"},filter:{},groupBy:{}},methods:{init:function(a){this.inherited(a),this.nodeSet([]),this.nodes([]),this.links([]),this.sets(a),a&&a.data&&this.setTopoData(a.data)},setTopoData:function(a){this.processData(this.getJSON(a));this.clear(),this._generate(a),this.fire("setTopoData",a)},subordinates:function(b, c){"function"==typeof b&&(c=b,b=null);var d;return b?d=a.util.values(b.vertices()).concat(a.util.values(b.vertexSet())):(d=[],a.each(this.vertices(),function(a){var b=a.value();b.parentVertexSet()||d.push(b)}.bind(this)),a.each(this.vertexSets(),function(a){var b=a.value();b.parentVertexSet()||d.push(b)}.bind(this))),c&&a.each(d,c),d},insertData:function(b){var c=b;a.each(b.nodes,function(a){this.addVertex(a)},this),a.each(b.links,function(a){this.addEdge(a)},this),a.each(b.nodeSet,function(a){this.addVertexSet(a)},this),this.fire("insertData",c)},_generate:function(a){this.nodes(a.nodes),this.links(a.links),this.nodeSet(a.nodeSet);var b=this.filter();b&&b.call(this,this),this.fire("startGenerate"),this.eachVertex(this.generateVertex,this),this.eachVertexSet(this.generateVertexSet,this),this.eachEdgeSet(this.generateEdgeSet,this),this.eachVertexSet(function(a){a.activated(!0,{force:!0}),this.updateVertexSet(a)},this),this.fire("endGenerate")},getData:function(){return{nodes:this.nodes(),links:this.links(),nodeSet:this.nodeSet()}},getJSON:function(b){var c=b||this.getData(),d={nodes:[],links:[]};return a.is(c.nodes,a.data.ObservableCollection)?a.each(c.nodes,function(b){d.nodes.push(a.is(b,a.data.ObservableObject)?b.gets():b)}):d.nodes=c.nodes,a.is(c.links,a.data.ObservableCollection)?a.each(c.links,function(b){d.links.push(a.is(b,a.data.ObservableObject)?b.gets():b)}):d.links=c.links,c.nodeSet&&(a.is(c.nodeSet,a.data.ObservableCollection)?(d.nodeSet=[],a.each(c.nodeSet,function(b){d.nodeSet.push(a.is(b,a.data.ObservableObject)?b.gets():b)})):d.nodeSet=c.nodeSet),d},getBound:function(b){var c,d,e,f,g,h,i=b||a.util.values(this.visibleVertices()).concat(a.util.values(this.visibleVertexSets())),j=i[0];return j?(g=j.get?j.get("x"):j.x,h=j.get?j.get("y"):j.y,c=d=g||0,e=f=h||0):(c=d=0,e=f=0),a.each(i,function(a){g=a.get?a.get("x"):a.x,h=a.get?a.get("y"):a.y,c=Math.min(c,g||0),d=Math.max(d,g||0),e=Math.min(e,h||0),f=Math.max(f,h||0)}),{x:c,y:e,left:c,top:e,width:d-c,height:f-e,maxX:d,maxY:f}},getHierarchicalStructure:function(){var b=this.getJSON(),c={},d=[],e=this.identityKey();return a.each(b.nodes,function(b){var f=a.path(b,e),g={id:f,children:[]};d.push(g),c[f]=g}),a.each(b.nodeSet,function(b,f){var g=a.path(b,e),h={id:g,children:[]};b.nodes.forEach(function(a){c[a]?(~(f=d.indexOf(c[a]))&&d.splice(f,1),h.children.push(c[a])):h.children.push({id:a,children:[]})}),d.push(h),c[g]=h}),d},clear:function(){this.nodeSet([]),this.links([]),this.nodes([]),this.fire("clear")},dispose:function(){this.clear(),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.data.UniqObservableCollection",a.data.ObservableCollection,{methods:{add:function(a){return null==a||this.contains(a)?!1:this.inherited(a)},addRange:function(b){if(a.is(b,Array)){for(var c=a.util.uniq(b.slice()),d=0;d"}},theme:{get:function(){return this._theme||"blue"},set:function(a){this._theme=a,this.notify("themeClass")}},themeClass:{get:function(){return"n-topology-"+this.theme()}},showNavigation:{value:!0},showThumbnail:{value:!1},viewSettingPanel:{get:function(){return this.view("nav").view("customize")}},viewSettingPopover:{get:function(){return this.view("nav").view("settingPopover")}}},methods:{}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Graph",{events:["beforeSetData","afterSetData","insertData","topologyGenerated"],properties:{identityKey:{get:function(){return this._identiyKey||"index"},set:function(a){this._identiyKey=a,this.graph().set("identityKey",a)}},data:{get:function(){return this.graph().getData()},set:function(b){if(null!=b&&a.is(b,Object)&&null!=b.nodes){var c=function(a){this.fire("beforeSetData",a),this.clear(),this.graph().sets({width:this.width(),height:this.height()}),this.graph().setTopoData(a),this.fire("afterSetData",a)};"appended"===this.status()||"generated"==this.status()?c.call(this,b):this.on("ready",function(){c.call(this,b)},this)}}},autoLayout:{get:function(){return this._autoLayout||!1},set:function(a){this._autoLayout=a,this.graph().dataProcessor(a?"force":"")}},vertexPositionGetter:{get:function(){return this._vertexPositionGetter},set:function(a){this._vertexPositionGetter=a,this.graph().set("vertexPositionGetter",a)}},vertexPositionSetter:{get:function(){return this._vertexPositionSetter},set:function(a){this._vertexPositionSetter=a,this.graph().set("vertexPositionSetter",a)}},dataProcessor:{get:function(){return this._dataProcessor},set:function(a){this._dataProcessor=a,this.graph().set("dataProcessor",a)}},graph:{value:function(){return new a.data.ObservableGraph}}},methods:{initGraph:function(){var a=this.graph();a.sets({vertexPositionGetter:this.vertexPositionGetter(),vertexPositionSetter:this.vertexPositionSetter(),identityKey:this.identityKey(),dataProcessor:this.dataProcessor()}),this.autoLayout()&&a.dataProcessor("force");var b=this.getLayer("nodes"),c=this.getLayer("links"),d=this.getLayer("nodeSet"),e=this.getLayer("linkSet");a.on("addVertex",function(a,c){b.addNode(c)},this),a.on("removeVertex",function(a,c){b.removeNode(c.id())},this),a.on("deleteVertex",function(a,c){b.removeNode(c.id())},this),a.on("updateVertex",function(a,c){b.updateNode(c.id())},this),a.on("updateVertexCoordinate",function(){},this),a.on("addEdge",function(a,b){c.addLink(b)},this),a.on("removeEdge",function(a,b){c.removeLink(b.id())},this),a.on("deleteEdge",function(a,b){c.removeLink(b.id())},this),a.on("updateEdge",function(a,b){c.updateLink(b.id())},this),a.on("updateEdgeCoordinate",function(a,b){c.updateLink(b.id())},this),a.on("addEdgeSet",function(a,b){this.supportMultipleLink()?e.addLinkSet(b):b.activated(!1)},this),a.on("removeEdgeSet",function(a,b){e.removeLinkSet(b.linkKey())},this),a.on("deleteEdgeSet",function(a,b){e.removeLinkSet(b.linkKey())},this),a.on("updateEdgeSet",function(a,b){e.updateLinkSet(b.linkKey())},this),a.on("updateEdgeSetCoordinate",function(a,b){this.supportMultipleLink()&&e.updateLinkSet(b.linkKey())},this),a.on("addVertexSet",function(a,b){d.addNodeSet(b)},this),a.on("removeVertexSet",function(a,b){d.removeNodeSet(b.id())},this),a.on("deleteVertexSet",function(a,b){d.removeNodeSet(b.id())},this),a.on("updateVertexSet",function(a, b){d.updateNodeSet(b.id())},this),a.on("updateVertexSetCoordinate",function(){},this),a.on("addEdgeSetCollection",function(a, b){e.addLinkSet(b)},this),a.on("removeEdgeSetCollection",function(a, b){e.removeLinkSet(b.linkKey())},this),a.on("deleteEdgeSetCollection",function(a, b){e.removeLinkSet(b.linkKey())},this),a.on("updateEdgeSetCollection",function(a, b){e.updateLinkSet(b.linkKey())},this),a.on("updateEdgeSetCollectionCoordinate",function(a, b){e.updateLinkSet(b.linkKey())},this),a.on("setTopoData",function(){},this),a.on("insertData",function(){},this),a.on("clear",function(){},this),a.on("startGenerate",function(){this.showLoading(),this.stage().hide()},this),a.on("endGenerate",function(){this._endGenerate()},this)},setTopoData:function(b, c, d){c&&this.on("topologyGenerated",function e(){c.call(d||this,this),this.off("topologyGenerated",e,this)},this),null!=b&&a.is(b,Object)&&null!=b.nodes&&this.data(b)},insertData:function(b){null!=b&&a.is(b,Object)&&(this.graph().insertData(b),this.fire("insertData",b))},getData:function(){return this.data()},_saveData:function(){var a=this.graph().getData();"[object Storage]"===Object.prototype.toString.call(window.localStorage)&&localStorage.setItem("topologyData",JSON.stringify(a))},_loadLastData:function(){if("[object Storage]"===Object.prototype.toString.call(window.localStorage)){var a=JSON.parse(localStorage.getItem("topologyData"));this.setTopoData(a)}},start:function(){},_endGenerate:function(){this.stage().resetFitMatrix();var a=this.layoutType();a?this.activateLayout(a,null,function(){this.__fit(),this.status("generated"),this.fire("topologyGenerated")}):(this.__fit(),this.status("generated"),this.fire("topologyGenerated"))},__fit:function(){this.stage().show(),this.autoFit()&&(this.stage().fit(null,null,!1),this.stage().resetFitMatrix(),this.stage().fit(null,null,!1),this.stage().resetFitMatrix(),this.stage().fit(null,null,!1)),this.hideLoading()}}})}(nx,nx.global),function(a){function b(a){return a.wheelDelta?a.wheelDelta:a.detail?-40*a.detail:void 0}a.define("nx.graphic.Topology.Event",{events:["clickStage","pressStage","dragStageStart","dragStage","dragStageEnd","stageTransitionEnd","zoomstart","zooming","zoomend","resetzooming","fitStage","up","down","left","right","esc","space","enter","pressA","pressS","pressF","pressM","pressR"],properties:{enableGradualScaling:{value:!0}},methods:{_mousewheel:function(a,c){if(this.scalable()){var d=8e3,e=b(c),f=this.stage(),g=e/d;null==this._zoomWheelDelta&&(this._zoomWheelDelta=0,this.fire("zoomstart")),this._zoomWheelDelta+=e/d,this._enableGradualScaling?Math.abs(this._zoomWheelDelta)<.3?f.disableUpdateStageScale(!0):(this._zoomWheelDelta=0,f.disableUpdateStageScale(!1)):f.disableUpdateStageScale(!0),f.applyStageScale(1+g,[void 0===c.offsetX?c.layerX:c.offsetX,void 0===c.offsetY?c.layerY:c.offsetY]),this._zooomEventTimer&&clearTimeout(this._zooomEventTimer),this._zooomEventTimer=setTimeout(function(){f.resetStageMatrix(),delete this._zoomWheelDelta,this.fire("zoomend")}.bind(this),200),this.fire("zooming")}return c.preventDefault(),!1},_contextmenu:function(a,b){b.preventDefault()},_clickStage:function(a,b){this.fire("clickStage",b)},_pressStage:function(a,b){this.fire("pressStage",b)},_dragStageStart:function(a,b){this.fire("dragStageStart",b)},_dragStage:function(a,b){this.fire("dragStage",b)},_dragStageEnd:function(a,b){this.fire("dragStageEnd",b)},_stageTransitionEnd:function(a,b){window.event=b,this.fire("stageTransitionEnd",b)},_key:function(a,b){var c=b.keyCode;switch(c){case 38:this.fire("up",b),b.preventDefault();break;case 40:this.fire("down",b),b.preventDefault();break;case 37:this.fire("left",b),b.preventDefault();break;case 39:this.fire("right",b),b.preventDefault();break;case 13:this.fire("enter",b),b.preventDefault();break;case 27:this.fire("esc",b),b.preventDefault();break;case 65:this.fire("pressA",b);break;case 70:this.fire("pressF",b);break;case 77:this.fire("pressM",b);break;case 82:this.fire("pressR",b);break;case 83:this.fire("pressS",b);break;case 32:this.fire("space",b),b.preventDefault()}return!1},blockEvent:function(b){b?a.dom.Document.body().addClass("n-userselect n-blockEvent"):(a.dom.Document.body().removeClass("n-userselect"),a.dom.Document.body().removeClass("n-blockEvent"))}}})}(nx,nx.global),function(a){var b=a.util;a.define("nx.graphic.Topology.NodeMixin",{events:["addNode","deleteNode","addNodeSet","deleteNodeSet","expandAll"],properties:{nodeInstanceClass:{value:"nx.graphic.Topology.Node"},nodeSetInstanceClass:{value:"nx.graphic.Topology.NodeSet"},nodeDraggable:{value:!0},enableSmartLabel:{value:!0},showIcon:{get:function(){return void 0!==this._showIcon?this._showIcon:!1},set:function(a){return this._showIcon!==a?(this._showIcon=a,"initializing"!==this.status()&&this.eachNode(function(b){b.showIcon(a)}),!0):!1}},nodeConfig:{},nodeSetConfig:{},selectedNodes:{value:function(){return new a.data.UniqObservableCollection}},activeNodes:{set:function(b){var c=this.getLayer("nodes"),d=this.getLayer("nodeSet"),e=this._activeNodesWatcher;e||(e=this._activeNodesWatcher=new a.graphic.Topology.NodeWatcher,e.topology(this),e.updater(function(){var b=e.getNodes();a.each(b,function(a){"vertex"==a.model().type()?c.activeElements().add(a):d.activeElements().add(a)},this)}.bind(this))),c.activeElements().clear(),d.activeElements().clear(),e.nodes(b),this._activeNodes=b}},highlightedNodes:{set:function(b){var c=this.getLayer("nodes"),d=this.getLayer("nodeSet"),e=this._highlightedNodesWatcher;e||(e=this._highlightedNodesWatcher=new a.graphic.Topology.NodeWatcher,e.topology(this),e.updater(function(){a.each(e.getNodes(),function(a){"vertex"==a.model().type()?c.highlightedElements().add(a):d.highlightedElements().add(a) -},this)}.bind(this))),c.highlightedElements().clear(),d.highlightedElements().clear(),e.nodes(b),this._highlightedNodes=b}},enableNodeSetAnimation:{value:!0},aggregationRule:{}},methods:{initNode:function(){var b=this.selectedNodes();b.on("change",function(c,d){"add"==d.action?a.each(d.items,function(a){a.selected(!0),a.on("remove",this._removeSelectedNode=function(){b.remove(a)},this)},this):"remove"==d.action?a.each(d.items,function(a){a.selected(!1),a.off("remove",this._removeSelectedNode,this)},this):"clear"==d.action&&a.each(d.items,function(a){a.selected(!1),a.off("remove",this._removeSelectedNode,this)},this)})},addNode:function(a,b){var c=this.graph().addVertex(a,b);if(c){var d=this.getNode(c.id());return this.fire("addNode",d),d}return null},removeNode:function(a){this.deleteNode(a)},deleteNode:function(b,c,d){var e=b;a.is(b,a.graphic.Topology.AbstractNode)&&(e=b.id());var f=this.graph().getVertex(e);if(f){var g=this.getNode(e);this.fire("deleteNode",g),this.graph().deleteVertex(e),c&&c.call(d||this)}},_getAggregationTargets:function(b){var c,d,e,f,g,h,i,j=this.graph(),k={},l=a.util.uuid(),m=b.slice();do for(i=!1,e=m.length-1;e>=0;e--){if(f=m[e],g=f.parentVertexSet(),h=g?g.id():l,k.hasOwnProperty(h)||(k[h]={vertex:g||j,finding:j.subordinates(g),found:[]}),c=k[h],c===!1||c.found.indexOf(f)>=0)throw"wrong input";c.found.push(f),m.splice(e,1),i=!0,c.finding.length===c.found.length&&c.vertex!==j&&(m.push(c.vertex),k[h]=!1)}while(i);for(c in k)k[c]||delete k[c];if(d=a.util.values(k),1!==d.length)throw a.graphic.Topology.i18n.cantAggregateNodesInDifferentNodeSet;return c=d[0],c.found},aggregationNodes:function(b,c){var d=[],e=[];a.each(b,function(b){if(a.is(b,a.graphic.Topology.AbstractNode)||(b=this.getNode(b)),!a.is(b,a.graphic.Topology.AbstractNode))throw"wrong input";d.push(b),e.push(b.model())}.bind(this));var f,g;if(f=this._getAggregationTargets(e),f.length<2)throw"wrong input. unable to aggregate.";g=[],a.each(f,function(a){g.push(a.id())});var h=this.aggregationRule();if(h&&a.is(h,"Function")){var i=h.call(this,d,c);if(i===!1)return}var j,k,l=null,m={};j={nodes:g,x:c&&"number"==typeof c.x?c.x:f[0].x(),y:c&&"number"==typeof c.y?c.y:f[0].y(),label:c&&c.label||[d[0].label(),d[d.length-1].label()].sort().join("-")},k=f[0].parentVertexSet(),k&&(m.parentVertexSetID=k.id(),l=this.getNode(k.id()));var n=this.addNodeSet(j,m,l);return this.stage().resetFitMatrix(),n},addNodeSet:function(a,b,c){var d=this.graph().addVertexSet(a,b);if(d){var e=this.getNode(d.id());return c&&e.parentNodeSet(c),this.fire("addNodeSet",e),e}return null},removeNodeSet:function(a){this.deleteNodeSet(a)},deleteNodeSet:function(b,c,d){if(b){var e=b;a.is(b,a.graphic.Topology.AbstractNode)&&(e=b.id());var f=this.getLayer("nodeSet").getNodeSet(e);f?f.collapsed()?(f.activated(!1),f.expandNodes(function(){this.fire("deleteNodeSet",f),this.graph().deleteVertexSet(e),c&&c.call(d||this)},this)):(this.fire("deleteNodeSet",f),this.graph().deleteVertexSet(e),c&&c.call(d||this)):(this.graph().deleteVertexSet(e),c&&c.call(d||this))}},eachNode:function(a,b){this.getLayer("nodes").eachNode(a,b||this),this.getLayer("nodeSet").eachNodeSet(a,b||this)},getNode:function(a){return this.getLayer("nodes").getNode(a)||this.getLayer("nodeSet").getNodeSet(a)},getNodes:function(){var a=this.getLayer("nodes").nodes(),b=this.getLayer("nodeSet").nodeSets();return b&&0!==b.length?a.concat(b):a},registerIcon:function(b,c,d,e){var f="http://www.w3.org/1999/xlink",g="http://www.w3.org/2000/svg",h=document.createElementNS(g,"image");h.setAttributeNS(f,"href",c),a.graphic.Icons.icons[b]={size:{width:d,height:e},icon:h.cloneNode(!0),name:b};var i=h.cloneNode(!0);i.setAttribute("height",e),i.setAttribute("width",d),i.setAttribute("data-device-type",b),i.setAttribute("id",b),i.setAttribute("class","deviceIcon"),this.stage().addDef(i)},highlightRelatedNode:function(c){var d;if(null!=c&&(d=a.is(c,a.graphic.Topology.AbstractNode)?c:this.getNode(c))){var e=this.getLayer("nodeSet"),f=this.getLayer("nodes");a.is(d,"nx.graphic.Topology.NodeSet")?e.highlightedElements().add(d):f.highlightedElements().add(d),d.eachConnectedNode(function(b){a.is(b,"nx.graphic.Topology.NodeSet")?e.highlightedElements().add(b):f.highlightedElements().add(b)},this),this.getLayer("linkSet").highlightLinkSets(b.values(d.linkSets())),this.getLayer("links").highlightLinks(b.values(d.links())),this.fadeOut(!0)}},activeRelatedNode:function(c){var d;if(c&&(d=a.is(c,a.graphic.Topology.AbstractNode)?c:this.getNode(c))){var e=this.getLayer("nodeSet"),f=this.getLayer("nodes");a.is(d,"nx.graphic.Topology.NodeSet")?e.activeElements().add(d):f.activeElements().add(d),d.eachConnectedNode(function(b){a.is(b,"nx.graphic.Topology.NodeSet")?e.activeElements().add(b):f.activeElements().add(b)},this),this.getLayer("linkSet").activeLinkSets(b.values(d.linkSets())),this.getLayer("links").activeLinks(b.values(d.links())),this.fadeOut()}},zoomByNodes:function(b,c,d,e){a.is(b,Array)||(b=[b]);var f,g,h,i,j=this.stage(),k=this.getModelBoundByNodes(b),l=j.maxZoomLevel()*j.fitMatrixObject().scale();k&&(k.width*l<1&&k.height*l<1?(h=a.geometry.Vector.transform(k.center,j.matrix()),i=[j.width()/2-h[0],j.height()/2-h[1]],j.scalingLayer().setTransition(function(){this.adjustLayout(),c&&c.call(d||this),this.fire("zoomend")},this,.6),j.applyTranslate(i[0],i[1]),j.applyStageScale(j.maxZoomLevel()/j.zoomLevel()*e)):(f=a.geometry.Vector.transform([k.left,k.top],j.matrix()),g=a.geometry.Vector.transform([k.right,k.bottom],j.matrix()),k={left:f[0],top:f[1],width:Math.max(1,g[0]-f[0]),height:Math.max(1,g[1]-f[1])},e=1/(e||1),k.left+=k.width*(1-e)/2,k.top+=k.height*(1-e)/2,k.height*=e,k.width*=e,this.zoomByBound(k,function(){this.adjustLayout(),c&&c.call(d||this),this.fire("zoomend")},this)))},getModelBoundByNodes:function(b,c){var d,e,f,g;return a.each(b,function(b){var h;if(a.is(b,a.graphic.Topology.AbstractNode))h=b.model();else if(c)h=this.graph().getVertex(b)||this.graph().getVertexSet(b);else{var i=this.getNode(b);h=i&&i.model()}if(h){var j=h.x(),k=h.y();d=j>d?d:j,f=k>f?f:k,e=e>j?e:j,g=g>k?g:k}},this),void 0===d||void 0===f?void 0:{left:d,top:f,right:e,bottom:g,center:[(e+d)/2,(g+f)/2],width:e-d,height:g-f}},getBoundByNodes:function(b,c){(null==b||0===b.length)&&(b=this.getNodes());var d={left:0,top:0,x:0,y:0,width:0,height:0,maxX:0,maxY:0},e=[];a.each(b,function(b){var d;d=a.is(b,a.graphic.Topology.AbstractNode)?b:this.getNode(b),d&&d.visible()&&e.push(c?this.getInsideBound(d.getBound(!0)):this.getInsideBound(d.getBound()))},this);var f=e.length-1;return e.sort(function(a,b){return a.left-b.left}),d.x=d.left=e[0].left,d.maxX=e[f].left,e.sort(function(a,b){return a.left+a.width-(b.left+b.width)}),d.width=e[f].left+e[f].width-d.x,e.sort(function(a,b){return a.top-b.top}),d.y=d.top=e[0].top,d.maxY=e[f].top,e.sort(function(a,b){return a.top+a.height-(b.top+b.height)}),d.height=e[f].top+e[f].height-d.y,d},_moveSelectionNodes:function(b,c){if(this.nodeDraggable()){var d=this.selectedNodes().toArray(),e=this.stageScale();-1===d.indexOf(c)?c.move(b.drag.delta[0]*e,b.drag.delta[1]*e):a.each(d,function(a){a.move(b.drag.delta[0]*e,b.drag.delta[1]*e)})}},expandNodes:function(b,c,d,e,f){var g=a.is(b,Array)?b.length:a.util.keys(b).length;if(d=d||function(){},g>150||0===g||f===!1)d.call(e||this,this);else{var h=[];a.each(b,function(a){h.push({id:a.id(),position:a.position(),node:a}),a.position(c)},this),this._nodesAnimation&&this._nodesAnimation.stop();var i=this._nodesAnimation=new a.graphic.Animation({duration:600});i.callback(function(b){a.each(h,function(a){var d=a.position,e=a.node;e&&e.model()&&e.position({x:c.x+(d.x-c.x)*b,y:c.y+(d.y-c.y)*b})})}.bind(this)),i.complete(function(){d.call(e||this,this)}.bind(this)),i.start()}},collapseNodes:function(b,c,d,e,f){var g=a.is(b,Array)?b.length:a.util.keys(b).length;if(d=d||function(){},g>150||0===g||f===!1)d.call(e||this,this);else{var h=[];a.each(b,function(a){h.push({id:a.id(),position:a.position(),node:a,vertex:a.model(),vertexPosition:a.model().position()})},this),this._nodesAnimation&&this._nodesAnimation.stop();var i=this._nodesAnimation=new a.graphic.Animation({duration:600});i.callback(function(b){a.each(h,function(a){var d=a.position,e=a.node;e&&e.model()&&e.position({x:d.x-(d.x-c.x)*b,y:d.y-(d.y-c.y)*b})})}.bind(this)),i.complete(function(){a.each(h,function(a){a.vertex.position(a.vertexPosition)}),d.call(e||this,this)}.bind(this)),i.start()}},expandAll:function(){var a=this.getLayer("nodeSet"),b=function(c){var d=!0;a.eachNodeSet(function(a){a.visible()&&(a.animation(!1),a.collapsed(!1),d=!1)}),d?c():b(c)};this.showLoading(),setTimeout(function(){b(function(){a.eachNodeSet(function(a){a.animation(!0)}),this.stage().resetFitMatrix(),this.hideLoading(),this.fit(function(){this.blockEvent(!1),this.fire("expandAll")},this)}.bind(this))}.bind(this),100)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.LinkMixin",{events:["addLink","deleteLink"],properties:{linkInstanceClass:{value:"nx.graphic.Topology.Link"},linkSetInstanceClass:{value:"nx.graphic.Topology.LinkSet"},supportMultipleLink:{value:!0},linkConfig:{},linkSetConfig:{}},methods:{addLink:function(a,b){if(null==a.source||null==a.target)return void 0;var c=this.graph().addEdge(a,b);if(c){var d=this.getLink(c.id());return this.fire("addLink",d),d}return null},removeLink:function(a){this.deleteLink(a)},deleteLink:function(b){var c=b;a.is(b,a.graphic.Topology.AbstractLink)&&(c=b.id()),this.fire("deleteLink",this.getLink(c)),this.graph().deleteEdge(c)},eachLink:function(a,b){this.getLayer("links").eachLink(a,b||this)},getLink:function(a){return this.getLayer("links").getLink(a)},getLinkSet:function(a,b){return this.getLayer("linkSet").getLinkSet(a,b)},getLinkSetByLinkKey:function(a){return this.getLayer("linkSet").getLinkSetByLinkKey(a)},getLinksByNode:function(a,b){var c=this.getLinkSet(a,b);return c?c.links():void 0}}})}(nx,nx.global),function(a,b){a.define("nx.graphic.Topology.LayerMixin",{events:[],properties:{layersMap:{value:function(){return{}}},layers:{value:function(){return[]}},fade:{dependencies:"forceFade",value:function(a){return a===!0||a===!1?a:this._fade}},fadeActivePriority:{value:!1,set:function(a){this.dom().addClass(a?"fade-active-priority":"fade-active-priority"),this._fadeActivePriority=!!a}},fadeUpdater_internal_:{dependencies:"fade",update:function(a){a?this.dom().addClass("fade-all"):this.dom().removeClass("fade-all")}},forceFade:{},layerResource_internal_:{value:function(){return{}}}},methods:{initLayer:function(){this.layersMap({}),this.layers([]),this.attachLayer("links","nx.graphic.Topology.LinksLayer"),this.attachLayer("linkSet","nx.graphic.Topology.LinkSetLayer"),this.attachLayer("groups","nx.graphic.Topology.GroupsLayer"),this.attachLayer("nodes","nx.graphic.Topology.NodesLayer"),this.attachLayer("nodeSet","nx.graphic.Topology.NodeSetLayer"),this.attachLayer("paths","nx.graphic.Topology.PathLayer")},_generateLayer:function(c,d){var e;if(c&&d){if(a.is(d,"String")){var f=a.path(b,d);f&&(e=new f)}else e=d;e.topology(this),e.draw(),a.each(e.__events__,function(b){a.Object.delegateEvent(e,b,this,b)},this)}return e},getLayer:function(a){var b=this.layersMap();return b[a]},appendLayer:function(a,b){return this.attachLayer(a,b)},attachLayer:function(b,c,d){var e,f=this.layersMap(),g=this.layers(),h=this._generateLayer(b,c),i={};return h&&(d>=0?(h.attach(this.stage(),d),g.splice(d,0,h)):(h.attach(this.stage()),g.push(h)),f[b]=h,e=this.layerResource_internal_(),e[b]=i,i.activeElementsChangeListener=function(){i.activeCount=h.activeElements().count();var b=0;a.each(e,function(a){b+=a.activeCount}),this.dom().setClass("fade-active-occur",b>0)},h.activeElements().on("change",i.activeElementsChangeListener,this)),h},prependLayer:function(a,b){return this.attachLayer(a,b,0)},insertLayerAfter:function(a,b,c){var d=this.layersMap()[c];if(d){var e=this.layers().indexOf(d);if(e>=0)return this.attachLayer(a,b,e+1)}},eachLayer:function(b,c){a.each(this.layersMap(),b,c)},fadeOut:function(a){a?this.forceFade(!0):this.forceFade()||this.fade(!0)},fadeIn:function(a){this.forceFade()===!0?a&&(this.forceFade(null),this.fade(!1)):this.fade(!1)},recoverActive:function(){a.each(this.layers(),function(a){a.activeElements&&a.activeElements().clear()},this),this.activeNodes([]),this.fadeIn()},recoverHighlight:function(){a.each(this.layers(),function(a){a.highlightedElements&&a.highlightedElements().clear()},this),this.highlightedNodes([]),this.fadeIn(!0)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.StageMixin",{events:["fitStage","ready","resizeStage","afterFitStage"],properties:{width:{get:function(){return this._width||300+2*this.padding()},set:function(a){return this.resize(a)}},height:{get:function(){return this._height||300+2*this.padding()},set:function(a){this.resize(null,a)}},padding:{value:100},scalable:{value:!0},stageScale:{value:1},revisionScale:{value:1},matrix:{value:function(){return new a.geometry.Matrix(a.geometry.Matrix.I)}},adaptive:{value:!1},stage:{get:function(){return this.view("stage")}},enableSmartNode:{value:!0},autoFit:{value:!0}},methods:{initStage:function(){a.each(a.graphic.Icons.icons,function(a,b){if(a.icon){var c=a.icon.cloneNode(!0);c.setAttribute("height",a.size.height),c.setAttribute("width",a.size.width),c.setAttribute("data-device-type",b),c.setAttribute("id",b),c.setAttribute("class","deviceIcon"),this.stage().addDef(c)}},this)},_adaptiveTimer:function(){var b=this;if(this.adaptive()||0===this.width()||0===this.height())var c=setInterval(function(){a.dom.Document.body().contains(b.view().dom())&&(clearInterval(c),this._adaptToContainer(),this.status("appended"),this.fire("ready"))}.bind(this),10);else this.status("appended"),setTimeout(function(){this.fire("ready")}.bind(this),0)},_adaptToContainer:function(){var a=this.view().dom().parentNode().getBound();return 0===a.width||0===a.height?void(console&&console.warn("Please set height*width to topology's parent container")):void((this._width!==a.width||this._height!==a.height)&&this.resize(a.width,a.height))},adaptToContainer:function(){this.adaptive()&&(this._adaptToContainer(),this.fit())},getInsideBound:function(a){var b=a||this.stage().view("stage").getBound(),c=this.view().dom().getBound();return{left:b.left-c.left,top:b.top-c.top,width:b.width,height:b.height}},getAbsolutePosition:function(a){var b=this.matrix(),c=b.scale(),d=this.view().dom().getOffset();return{x:a.x*c+b.x()+d.left,y:a.y*c+b.y()+d.top}},fit:function(a,b,c){this.stage().fit(function(){this.adjustLayout(),a&&a.call(b||this),this.fire("afterFitStage")},this,null==c?!0:c),this.fire("fitStage")},zoom:function(){},zoomByBound:function(a,b,c,d){this.stage().zoomByBound(a,function(){this.adjustLayout(),b&&b.call(c||this),this.fire("zoomend")},this,void 0!==d?d:.9)},move:function(a,b,c){var d=this.stage();d.applyTranslate(a||0,b||0,c)},resize:function(a,b){var c=!1;if(null!=a&&a!=this._width){var d=Math.max(a,300+2*this.padding());d!=this._width&&(this._width=d,c=!0)}if(null!=b){var e=Math.max(b,300+2*this.padding());e!=this._height&&(this._height=e)}return c&&(this.notify("width"),this.notify("height"),this.stage().resetFitMatrix(),this.fire("resizeStage")),c},adjustLayout:function(){this.enableSmartNode()&&(this._adjustLayoutTimer&&clearTimeout(this._adjustLayoutTimer),this._adjustLayoutTimer=setTimeout(function(){var a=this.graph();if(a){var b=(new Date,this.matrix()),c=b.scale(),d=[];this.eachNode(function(a){if(!a.activated||a.activated()){var e=a.position();d[d.length]={x:e.x*c+b.x(),y:e.y*c+b.y()}}});var e=function(a){for(var b=a.length,c=1296,d=1024,e=function(a,b){var e=Math.pow(Math.abs(a.x-b.x),2)+Math.pow(Math.abs(a.y-b.y),2);return{iconOverlap:c>e,dotOverlap:d>e}},f=0,g=0,h=0;b>h;h++){for(var i=a[h],j=!1,k=!1,l=0;b>l;l++){var m=a[l];if(h!==l){var n=e(i,m);n.iconOverlap&&(j=!0),n.dotOverlap&&(k=!0)}}j&&f++,k&&g++}var o=1;return f/b>.2&&(o=.8,g/b>.8?o=.2:g/b>.5?o=.4:g/b>.15&&(o=.6)),o};if(window.Blob&&window.Worker){var f="onmessage = function(e) { self.postMessage(calc(e.data)); };";if(f+="var calc = "+e.toString(),!this.adjustWorker){var g=new Blob([f]),h=window.URL.createObjectURL(g),i=this.adjustWorker=new Worker(h);i.onmessage=function(a){var b=a.data;this.revisionScale(b)}.bind(this)}this.adjustWorker.postMessage(d)}}}.bind(this),200))}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.TooltipMixin",{events:[],properties:{tooltipManagerConfig:{get:function(){return this._tooltipManagerConfig||{}},set:function(a){var b=this.tooltipManager();b&&b.sets(a),this._tooltipManagerConfig=a}},tooltipManager:{value:function(){var b=this.tooltipManagerConfig();return new a.graphic.Topology.TooltipManager(a.extend({},{topology:this},b))}}},methods:{}})}(nx,nx.global),function(a,b){a.define("nx.graphic.Topology.SceneMixin",{events:[],properties:{scenesMap:{value:function(){return{}}},scenes:{value:function(){return[]}},currentScene:{},currentSceneName:{},sceneEnabled:{value:!0}},methods:{initScene:function(){this.registerScene("default","nx.graphic.Topology.DefaultScene"),this.registerScene("selection","nx.graphic.Topology.SelectionNodeScene"),this.registerScene("zoomBySelection","nx.graphic.Topology.ZoomBySelection"),this.activateScene("default"),this._registerEvents()},registerScene:function(c,d){var e;if(c&&d){var f,g=this.scenesMap(),h=this.scenes();a.is(d,"String")?(e=a.path(b,d),e&&(f=new e)):f=d,f&&(f.topology(this),g[c]=f,h.push(f))}},activateScene:function(a){var b=this.scenesMap(),c=a||"default",d=b[c]||b["default"];return this.deactivateScene(),this.currentScene(d),this.currentSceneName(c),d.activate(),this.fire("switchScene",{name:a,scene:d}),d},deactivateScene:function(){this.currentScene()&&this.currentScene().deactivate&&this.currentScene().deactivate(),this.currentScene(null)},disableCurrentScene:function(a){this.sceneEnabled(!a)},_registerEvents:function(){a.each(this.__events__,this._aop=function(a){this.upon(a,function(b,c){this.dispatchEvent(a,b,c)},this)},this)},dispatchEvent:function(a,b,c){if(this.sceneEnabled()){var d=this.currentScene();d.dispatch&&d.dispatch(a,b,c),d[a]&&d[a].call(d,b,c)}}}})}(nx,nx.global),function(a,b){{var c={USMap:"nx.graphic.Topology.USMapLayout",hierarchicalLayout:"nx.graphic.Topology.HierarchicalLayout"};a.define("nx.graphic.Topology.LayoutMixin",{events:[],properties:{layoutMap:{value:function(){return{}}},layoutType:{value:null},layoutConfig:{value:null}},methods:{initLayout:function(){var d=a.extend({},c,a.graphic.Topology.layouts);a.each(d,function(c,d){var e;if(a.is(c,"Function"))e=new c;else{var f=a.path(b,c);if(!f)throw"Error on instance node class";e=new f}this.registerLayout(d,e)},this)},registerLayout:function(a,b){var c=this.layoutMap();c[a]=b,b.topology&&b.topology(this)},getLayout:function(a){var b=this.layoutMap();return b[a]},activateLayout:function(a,b,c){var d=this.layoutMap(),e=a||this.layoutType(),f=b||this.layoutConfig();d[e]&&d[e].process&&(d[e].process(this.graph(),f,c),this.layoutType(e))},deactivateLayout:function(){}}})}}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Categories",{events:[],properties:{},methods:{showLoading:function(){a.dom.Document.html().addClass("n-waitCursor"),this.view().dom().addClass("n-topology-loading"),this.view("loading").dom().setStyle("display","block")},hideLoading:function(){a.dom.Document.html().removeClass("n-waitCursor"),this.view().dom().removeClass("n-topology-loading"),this.view("loading").dom().setStyle("display","none")},exportPNG:function(){this.fit();var b=new XMLSerializer,c=this.stageScale(),d=topo.matrix().x(),e=topo.matrix().y(),f=this.stage().view().dom().$dom.querySelector(".stage").cloneNode(!0);a.each(f.querySelectorAll(".fontIcon"),function(a){a.remove()}),a.each(f.querySelectorAll(".link"),function(a){a.style.stroke="#26A1C5",a.style.fill="none",a.style.background="transparent"}),a.each(f.querySelectorAll("line.link-set-bg"),function(a){a.style.stroke="#26A1C5"}),a.each(f.querySelectorAll("text.node-label"),function(a){a.style.fontSize="12px",a.style.fontFamily="Tahoma"}),a.each(f.querySelectorAll(".n-hidden"),function(a){a.remove()}),a.each(f.querySelectorAll(".selectedBG"),function(a){a.remove()}),a.each(f.querySelectorAll('[data-nx-type="nx.graphic.Topology.GroupsLayer"]'),function(a){a.remove()});var g=b.serializeToString(f),h=''+g+"",i=window.btoa(h),j=this.view("img").dom().$dom;j.setAttribute("width",this.width()),j.setAttribute("height",this.height()),j.setAttribute("src","data:image/svg+xml;base64,"+i);var k=this.view("canvas").dom().$dom,l=k.getContext("2d"),m=this.revisionScale(),n=32*m;l.fillStyle="#fff",l.fillRect(0,0,this.width(),this.height()),l.drawImage(j,0,0),l.font=n+"px next-font",this.eachNode(function(b){var f=b.iconType(),g=a.graphic.Icons.get(f);l.fillStyle="#fff",l.fillText(g.font[1],b.x()/c+d-16*m,b.y()/c+e+16*m),l.fillStyle=b.color()||"#26A1C5",l.fillText(g.font[0],b.x()/c+d-16*m,b.y()/c+e+16*m)});var o=document.createElement("a");o.setAttribute("href",k.toDataURL()),o.setAttribute("download",(new Date).getTime()+".png");var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(p)},__drawBG:function(a){var b=a||this.stage().getContentBound(),c=this.stage().view("bg");c.sets({x:b.left,y:b.top,width:b.width,height:b.height,visible:!0}),c.set("visible",!0)}}})}(nx,nx.global),function(a){var b=a.Object.extendEvent,c=a.Object.extendProperty,d=a.Object.extendMethod,e=a.define("nx.graphic.Topology",a.ui.Component,{statics:{i18n:{cantAggregateExtraNode:"Can't aggregate extra node",cantAggregateNodesInDifferentNodeSet:"Can't aggregate nodes in different nodeSet"},extensions:[],registerExtension:function(f){var g=e.prototype,h=f.prototype;e.extensions.push(f),a.each(f.__events__,function(a){b(g,a)}),a.each(f.__properties__,function(a){c(g,a,h[a].__meta__)}),a.each(f.__methods__,function(a){"init"!==a&&d(g,a,h[a])})},layouts:{}},mixins:[a.graphic.Topology.Config,a.graphic.Topology.Graph,a.graphic.Topology.Event,a.graphic.Topology.StageMixin,a.graphic.Topology.NodeMixin,a.graphic.Topology.LinkMixin,a.graphic.Topology.LayerMixin,a.graphic.Topology.LayoutMixin,a.graphic.Topology.TooltipMixin,a.graphic.Topology.SceneMixin,a.graphic.Topology.Categories],events:["clear"],view:{props:{"class":["n-topology","{#themeClass}"],tabindex:"0",style:{width:"{#width}",height:"{#height}"}},content:[{name:"stage",type:"nx.graphic.Stage",props:{width:"{#width}",height:"{#height}",padding:"{#padding}",matrixObject:"{#matrix,direction=<>}",stageScale:"{#stageScale,direction=<>}"},events:{":mousedown":"{#_pressStage}",":touchstart":"{#_pressStage}",click:"{#_clickStage}",touchend:"{#_clickStage}",mousewheel:"{#_mousewheel}",DOMMouseScroll:"{#_mousewheel}",dragStageStart:"{#_dragStageStart}",dragStage:"{#_dragStage}",dragStageEnd:"{#_dragStageEnd}",stageTransitionEnd:"{#_stageTransitionEnd}"}},{name:"nav",type:"nx.graphic.Topology.Nav",props:{visible:"{#showNavigation}",showIcon:"{#showIcon,direction=<>}"}},{name:"loading",props:{"class":"n-topology-loading"},content:{tag:"ul",props:{items:new Array(10),template:{tag:"li"}}}},{name:"img",tag:"img",props:{style:{display:"none"}}},{name:"canvas",tag:"canvas",props:{width:"{#width}",height:"{#height}",style:{display:"none"}}}],events:{contextmenu:"{#_contextmenu}",keydown:"{#_key}"}},properties:{},methods:{init:function(b){this.inherited(b),this.sets(b),this.initStage(),this.initLayer(),this.initGraph(),this.initNode(),this.initScene(),this.initLayout(),a.each(e.extensions,function(a){var b=a.__ctor__;b&&b.call(this)},this)},attach:function(a){this.inherited(a),this._adaptiveTimer()},clear:function(){this.status("cleared"),this._nodesAnimation&&this._nodesAnimation.stop(),this.graph().clear(),this.tooltipManager().closeAll(),a.each(this.layers(),function(a){a.clear()}),this.blockEvent(!1),this.fire("clear"),this.width()&&this.height()&&this.status("appended")},dispose:function(){this.status("disposed"),this.tooltipManager().dispose(),this.graph().dispose(),a.each(this.layers(),function(a){a.dispose()}),this.blockEvent(!1),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Layer",a.graphic.Group,{view:{type:"nx.graphic.Group",props:{"class":"layer"}},properties:{topology:{value:null},highlightedElements:{value:function(){return new a.data.UniqObservableCollection}},activeElements:{value:function(){return new a.data.UniqObservableCollection}},fade:{dependencies:"forceFade",value:function(a){return a===!0||a===!1?a:this._fade}},fadeUpdater_internal_:{dependencies:"fade",update:function(a){a?this.dom().addClass("fade-layer"):this.dom().removeClass("fade-layer")}},forceFade:{}},methods:{init:function(b){this.inherited(b),this.view().set("data-nx-type",this.__className__);var c=this.highlightedElements(),d=this.activeElements();c.on("change",function(b,e){"add"==e.action?a.each(e.items,function(a){a.dom().addClass("fade-highlight-item")}):("remove"==e.action||"clear"==e.action)&&a.each(e.items,function(a){a.dom()&&a.dom().removeClass("fade-highlight-item")}),0===c.count()&&0===d.count()?this.fadeIn():this.fadeOut()},this),d.on("change",function(b,e){"add"==e.action?a.each(e.items,function(a){a.dom().addClass("fade-active-item")}):("remove"==e.action||"clear"==e.action)&&a.each(e.items,function(a){a.dom()&&a.dom().removeClass("fade-active-item")}),0===c.count()&&0===d.count()?this.fadeIn():this.fadeOut()},this)},draw:function(){},show:function(){this.visible(!0)},hide:function(){this.visible(!1)},fadeOut:function(a){a?this.forceFade(!0):this.forceFade()||this.fade(!0)},fadeIn:function(a){this.forceFade()===!0?a&&(this.forceFade(null),this.fade(!1)):this.fade(!1)},recover:function(a,b,c){this.fadeIn(a,b,c)},clear:function(){this.highlightedElements().clear(),this.activeElements().clear(),this.view().dom().empty()},dispose:function(){this.clear(),this.highlightedElements().clear(),this.activeElements().clear(),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.NodeWatcher",a.Observable,{properties:{nodes:{get:function(){return this._nodes||[]},set:function(b){var c=this.updater(),d=this.vertices();if(0!==d.length&&(a.each(d,function(a){a.unwatch("generated",c,this)},this),d.length=0),b){var e=b;a.is(e,Array)||a.is(e,a.data.ObservableCollection)||(e=[e]),a.each(e,function(a){var b=this._getVertex(a);b&&-1==d.indexOf(b)&&d.push(b)},this),a.is(e,a.data.ObservableCollection)&&e.on("change",function(a,b){b.action,b.items});var f=this.observePosition();a.each(d,function(a){a.watch("generated",c,this),f&&a.on("updateCoordinate",c,this)},this),c(),this._nodes=e}}},updater:{value:function(){return function(){}}},topology:{set:function(a){if(a&&a.graph()){var b=a.graph();b.on("addVertexSet",this.update,this),b.on("removeVertexSet",this.update,this),b.on("deleteVertexSet",this.update,this),b.on("updateVertexSet",this.update,this)}this._topology=a}},vertices:{value:function(){return[]}},observePosition:{value:!1}},methods:{_getVertex:function(b){var c,d=this.topology();if(d&&d.graph()){var e=d.graph();a.is(b,a.graphic.Topology.AbstractNode)?c=b.model():e.getVertex(b)&&(c=e.getVertex(b))}return c},getNodes:function(b){var c=[],d=this.topology(),e=this.vertices();return a.each(e,function(a){var e=a.id(),f=d.getNode(e);if(b!==!1&&(!f||a.generated()===!1)){var g=a.generatedRootVertexSet();g&&(f=d.getNode(g.id()))}f&&c.indexOf(f)&&c.push(f)}),c},update:function(){var a=this.updater(),b=this.vertices();0!==b.length&&a()},dispose:function(){var a=this.topology();if(a&&a.graph()){var b=a.graph();b.off("addVertexSet",this.update,this),b.off("removeVertexSet",this.update,this),b.off("deleteVertexSet",this.update,this),b.off("updateVertexSet",this.update,this)}this.inherited()}}})}(nx,nx.global),function(a){var b=a.geometry.Vector;a.define("nx.graphic.Topology.AbstractNode",a.graphic.Group,{events:["updateNodeCoordinate","selectNode","remove"],properties:{position:{get:function(){return{x:this._x||0,y:this._y||0}},set:function(a){var b=!1;if(null==a.x||a.x===this._x||this._lockXAxle||(this._x=a.x,this.notify("x"),b=!0),null==a.y||a.y===this._y||this._lockYAxle||(this._y=a.y,this.notify("y"),b=!0),b){var c=this.model();c.position({x:this._x,y:this._y}),this.view().setTransform(this._x,this._y)}}},absolutePosition:{get:function(){var a=this.position(),b=this.topology().matrix(),c=b.scale();return{x:a.x*c+b.x(),y:a.y*c+b.y()}},set:function(a){if(null==a||null==a.x||null==a.y)return!1;var b=this.topology().matrix(),c=b.scale();this.position({x:(a.x-b.x())/c,y:(a.y-b.y())/c})}},matrix:{get:function(){var a=this.position(),b=this.stageScale();return[[b,0,0],[0,b,0],[a.x,a.y,1]]}},vector:{get:function(){return new b(this.x(),this.y())}},x:{get:function(){return this._x||0},set:function(a){return this.position({x:parseFloat(a)})}},y:{get:function(){return this._y||0},set:function(a){return this.position({y:parseFloat(a)})}},lockXAxle:{value:!1},lockYAxle:{value:!1},stageScale:{set:function(a){this.view().setTransform(null,null,a)}},topology:{},id:{get:function(){return this.model().id()}},selected:{value:!1},enable:{value:!0},node:{get:function(){return this}},showIcon:{value:!0},links:{get:function(){var a={};return this.eachLink(function(b,c){a[c]=b}),a}},linkSets:{get:function(){var a={};return this.eachLinkSet(function(b,c){a[c]=b}),a}},connectedNodes:{get:function(){var a={};return this.eachConnectedNode(function(b,c){a[c]=b}),a}}},view:{type:"nx.graphic.Group"},methods:{init:function(a){this.inherited(a),this.watch("selected",function(a,b){this.fire("selectNode",b)},this)},setModel:function(a){this.model(a),a.upon("updateCoordinate",function(a,b){this.position({x:b.newPosition.x,y:b.newPosition.y}),this.fire("updateNodeCoordinate")},this),this.setBinding("visible","model.visible,direction=<>",this),this.setBinding("selected","model.selected,direction=<>",this),this.position(a.position())},update:function(){},move:function(a,b){var c=this.position();this.position({x:c.x+a||0,y:c.y+b||0})},moveTo:function(a,b,c,d,e){if(d!==!1){var f={to:{},duration:e||400};f.to.x=a,f.to.y=b,c&&(f.complete=c),this.animate(f)}else this.position({x:a,y:b})},translateTo:function(){},eachLink:function(a,b){this.model(),this.topology();this.eachLinkSet(function(c){c.eachLink(a,b||this)})},eachLinkSet:function(b,c){var d=this.model(),e=this.topology();a.each(d.edgeSets(),function(a,d){var f=e.getLinkSetByLinkKey(d);f&&b.call(c||this,f,d)},this),a.each(d.edgeSetCollections(),function(a,d){var f=e.getLinkSetByLinkKey(d);f&&b.call(c||this,f,d)},this)},eachConnectedNode:function(a,b){var c=this.topology();this.model().eachConnectedVertex(function(d,e){var f=c.getNode(e);f&&a.call(b||this,f,e)})},dispose:function(){var a=this.model();a&&a.upon("updateCoordinate",null),this.fire("remove"),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Node",a.graphic.Topology.AbstractNode,{events:["pressNode","clickNode","enterNode","leaveNode","dragNodeStart","dragNode","dragNodeEnd","selectNode"],properties:{label:{set:function(a){var b=this._processPropertyValue(a),c=this.view("label");c.set("text",b),null!=b&&this.calcLabelPosition(),this._label=b}},iconType:{get:function(){return this.view("icon").get("iconType")},set:function(a){var b=this._processPropertyValue(a);return b&&this._iconType!==b?(this._iconType=b,this.view("icon").set("iconType",b),!0):!1}},showIcon:{set:function(a){var b=this._processPropertyValue(a);this._showIcon=b,this.view("icon").set("showIcon",b),null!=this._label&&this.calcLabelPosition(),this._selected&&this.view("selectedBG").set("r",this.selectedRingRadius())}},enableSmartLabel:{value:!0},labelAngle:{value:90},labelVisibility:{value:!0,set:function(a){var b=this._processPropertyValue(a),c=this.view("label");c.visible(b),this._labelVisibility=b}},revisionScale:{set:function(a){var b=this.topology(),c=this.view("icon"); -c.set("scale",a),c.showIcon(b.showIcon()?a>.2:!1),a>.4?this.view("label").set("visible",null==this._labelVisibility?!0:this._labelVisibility):this.view("label").set("visible",!1),null!=this._label&&this.calcLabelPosition(),this._selected&&this.view("selectedBG").set("r",this.selectedRingRadius())}},color:{set:function(a){var b=this._processPropertyValue(a);this.view("label").dom().setStyle("fill",b),this.view("icon").set("color",b),this._color=b}},scale:{get:function(){return this.view("graphic").scale()},set:function(a){var b=this._processPropertyValue(a);this.view("graphic").setTransform(null,null,b),this.calcLabelPosition(!0)}},selectedRingRadius:{get:function(){var a=this.getBound(!0),b=Math.max(a.height,a.width)/2;return b+(this.selected()?10:-4)}},selected:{get:function(){return this._selected||!1},set:function(a){var b=this._processPropertyValue(a);return this._selected==b?!1:(this._selected=b,this.dom().setClass("node-selected",!!b),b&&this.view("selectedBG").set("r",this.selectedRingRadius()),!0)}},enable:{get:function(){return null!=this._enable?this._enable:!0},set:function(a){var b=this._processPropertyValue(a);this._enable=b,b?this.dom().removeClass("disable"):this.dom().addClass("disable")}},parentNodeSet:{get:function(){var a=this.model().parentVertexSet();return a?this.topology().getNode(a.id()):null}},rootNodeSet:{get:function(){var a=this.model();return a.rootVertexSet()?this.topology().getNode(a.rootVertexSet().id()):null}}},view:{type:"nx.graphic.Group",props:{"class":"node"},content:[{name:"label",type:"nx.graphic.Text",props:{"class":"node-label","alignment-baseline":"central",y:12}},{name:"selectedBG",type:"nx.graphic.Circle",props:{"class":"selectedBG",r:26}},{type:"nx.graphic.Group",name:"graphic",content:[{name:"icon",type:"nx.graphic.Icon",props:{"class":"icon",iconType:"unknown",showIcon:!1,scale:1}}],events:{mousedown:"{#_mousedown}",touchstart:"{#_mousedown}",mouseup:"{#_mouseup}",mouseenter:"{#_mouseenter}",mouseleave:"{#_mouseleave}",dragstart:"{#_dragstart}",dragmove:"{#_drag}",dragend:"{#_dragend}"}}]},methods:{translateTo:function(a,b,c,d){var e=this.view(),f=this.position();e.setTransition(function(){this.position({x:a,y:b}),this.calcLabelPosition(!0),c&&c.call(d||this)},this,.5),f.x==a&&f.y==b&&c?c.call(d||this):e.setTransform(a,b,null,.9)},getBound:function(a){return a?this.view("graphic").getBound():this.view().getBound()},_mousedown:function(a,b){this.enable()&&(this._prevPosition=this.position(),b.captureDrag(this.view("graphic"),this.topology().stage()),this.fire("pressNode",b))},_mouseup:function(a,b){if(this.enable()){var c=this.position();this._prevPosition&&c.x===this._prevPosition.x&&c.y===this._prevPosition.y&&this.fire("clickNode",b)}},_mouseenter:function(a,b){this.enable()&&(this.__enter||this._nodeDragging||(this.fire("enterNode",b),this.__enter=!0))},_mouseleave:function(a,b){this.enable()&&this.__enter&&!this._nodeDragging&&(this.fire("leaveNode",b),this.__enter=!1)},_dragstart:function(a,b){window.event=b,this._nodeDragging=!0,this.enable()&&this.fire("dragNodeStart",b)},_drag:function(a,b){window.event=b,this.enable()&&this.fire("dragNode",b)},_dragend:function(a,b){window.event=b,this._nodeDragging=!1,this.enable()&&(this.fire("dragNodeEnd",b),this.updateConnectedNodeLabelPosition())},updateConnectedNodeLabelPosition:function(){this.calcLabelPosition(!0),this.eachConnectedNode(function(a){a.calcLabelPosition()},this)},calcLabelPosition:function(a){this.enableSmartLabel()?(a,this._centralizedText()):this.updateByMaxObtuseAngle(this.labelAngle())},_centralizedText:function(){var b=this.model();if(void 0!==b){var c=b.id(),d=[];a.each(b.edgeSets(),function(a){d.push(a.sourceID()!==c?a.line().dir.negate():a.line().dir)},this),a.each(b.edgeSetCollections(),function(a){d.push(a.sourceID()!==c?a.line().dir.negate():a.line().dir)},this),d=d.sort(function(a,b){return a.circumferentialAngle()-b.circumferentialAngle()});var e,f=new a.geometry.Vector(1,0),g=0;if(0===d.length)e=90;else{d.push(d[0].rotate(359.9));for(var h=0;hi&&(i+=360),i>g&&(g=i,f=d[h])}e=g/2+f.circumferentialAngle(),e%=360}this.updateByMaxObtuseAngle(e)}},updateByMaxObtuseAngle:function(b){var c=this.view("label"),d=Math.floor(b/60),e="middle";5===d||0===d?e="start":(2===d||3===d)&&(e="end");var f=this.getBound(!0),g=Math.max(f.width/2,f.height/2)+(this.showIcon()?12:8),h=new a.geometry.Vector(g,0).rotate(b);c.set("x",h.x),c.set("y",h.y),c.set("text-anchor",e),this._labelAngle=b},dispose:function(){clearTimeout(this._centralizedTextTimer),this.inherited()}}})}(nx,nx.global),function(a,b){var c=a.util,d=a.define("nx.graphic.Topology.NodesLayer",a.graphic.Topology.Layer,{statics:{defaultConfig:{}},events:["clickNode","enterNode","leaveNode","dragNodeStart","dragNode","dragNodeEnd","hideNode","pressNode","selectNode","updateNodeCoordinate"],properties:{nodes:{get:function(){return this.nodeDictionary().values().toArray()}},nodesMap:{get:function(){return this.nodeDictionary().toObject()}},nodeDictionary:{value:function(){return new a.data.ObservableDictionary}}},methods:{attach:function(a){this.inherited(a);var b=this.topology();b.watch("stageScale",this.__watchStageScaleFN=function(a,b){this.nodeDictionary().each(function(a){a.value().stageScale(b)})},this),b.watch("revisionScale",this.__watchRevisionScale=function(a,b){this.nodeDictionary().each(function(a){a.value().revisionScale(b)},this)},this)},addNode:function(a){var b=a.id(),c=this._generateNode(a);return this.nodeDictionary().setItem(b,c),c},removeNode:function(a){var b=this.nodeDictionary(),c=b.getItem(a);c&&(c.dispose(),b.removeItem(a))},updateNode:function(a){var b=this.nodeDictionary(),c=b.getItem(a);c&&c.update()},_getNodeInstanceClass:function(c){var d,e=this.topology(),f=e.nodeInstanceClass();if(a.is(f,"Function")?(d=f.call(this,c),a.is(d,"String")&&(d=a.path(b,d))):d=a.path(b,f),!d)throw"Error on instance node class";return d},_generateNode:function(a){var b=a.id(),c=this.topology(),d=c.stageScale(),e=this._getNodeInstanceClass(a),f=new e({topology:c});return f.setModel(a),f.attach(this.view()),f.sets({"class":"node","data-id":b,stageScale:d}),this.updateDefaultSetting(f),f},updateDefaultSetting:function(b){var e=this.topology(),f=a.graphic.Component.__events__;a.each(b.__events__,function(a){-1==f.indexOf(a)&&b.on(a,function(c,d){d instanceof MouseEvent&&(window.event=d),this.fire(a,b)},this)},this);var g=this.nodeConfig=a.extend({enableSmartLabel:e.enableSmartLabel()},d.defaultConfig,e.nodeConfig());delete g.__owner__,a.each(g,function(a,d){c.setProperty(b,d,a,e)},this),c.setProperty(b,"showIcon",e.showIcon()),1!==e.revisionScale()&&b.revisionScale(e.revisionScale())},eachNode:function(a,b){this.nodeDictionary().each(function(c,d){a.call(b||this,c.value(),d)})},getNode:function(a){return this.nodeDictionary().getItem(a)},clear:function(){this.eachNode(function(a){a.dispose()}),this.nodeDictionary().clear(),this.inherited()},dispose:function(){this.clear();var a=this.topology();a&&(this.topology().unwatch("stageScale",this.__watchStageScaleFN,this),this.topology().unwatch("revisionScale",this.__watchRevisionScale,this),a._activeNodesWatcher&&a._activeNodesWatcher.dispose(),a._highlightedNodesWatcher&&a._highlightedNodesWatcher.dispose()),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.NodeSet",a.graphic.Topology.Node,{events:["expandNode","collapseNode","beforeExpandNode","beforeCollapseNode"],properties:{nodes:{get:function(){var b={},c=this.topology(),d=this.model();return this.model().activated()?void 0:(a.each(d.vertices(),function(a,d){var e=c.getNode(d);e&&(b[d]=e)}),a.each(d.vertexSet(),function(d,e){var f=c.getNode(e);f&&(f.activated()?b[e]=f:a.extend(b,f.nodes()))}),b)}},nodeSets:{get:function(){var a={},b=this.topology(),c=this.model();return c.eachSubVertexSet(function(c,d){var e=b.getNode(d);e&&(a[d]=e)},this),a}},collapsed:{get:function(){return void 0!==this._collapsed?this._collapsed:!0},set:function(a){var b=this._processPropertyValue(a);return this._collapsed!==b?(this._collapsed=b,b?this.collapse(this._animation):this.expand(this._animation),!0):!1}},activated:{value:!0},showIcon:{set:function(a){var b=this._processPropertyValue(a);this._showIcon=b,this.view("icon").set("showIcon",b),this.view("icon").set("visible",b),null!=this._label&&this.calcLabelPosition(),this._selected&&this.view("selectedBG").set("r",this.selectedRingRadius()),this._updateMinusIcon()}},revisionScale:{set:function(a){var b=this.topology(),c=this.view("icon");c.set("scale",a),b.showIcon()?(c.showIcon(a>.2),c.set("visible",a>.2)):(c.showIcon(!1),c.set("visible",!1)),this._updateMinusIcon(a),this._labelVisibility&&this.view("label").set("visible",a>.4)}},animation:{value:!0},expandable:{value:!0},collapsible:{value:!0}},view:{type:"nx.graphic.Group",props:{"class":"node"},content:[{name:"label",type:"nx.graphic.Text",props:{"class":"node-label","alignment-baseline":"central",y:12}},{name:"selectedBG",type:"nx.graphic.Circle",props:{"class":"selectedBG",r:26}},{type:"nx.graphic.Group",name:"graphic",content:[{name:"icon",type:"nx.graphic.Icon",props:{"class":"icon",iconType:"unknown",showIcon:!1,scale:1}},{name:"minus",type:"nx.graphic.Icon",props:{"class":"indicator",iconType:"expand",scale:1}}],events:{mousedown:"{#_mousedown}",touchstart:"{#_mousedown}",mouseup:"{#_mouseup}",mouseenter:"{#_mouseenter}",mouseleave:"{#_mouseleave}",dragstart:"{#_dragstart}",dragmove:"{#_drag}",dragend:"{#_dragend}"}}]},methods:{setModel:function(a){this.inherited(a),this.setBinding("activated","model.activated,direction=<>",this)},update:function(){},expand:function(a,b,c){if(this.fire("beforeExpandNode",this),this.expandable()){var d=this.animation();this.animation("boolean"==typeof a?a:d),this._collapsed=!1,this.selected(!1),this.model().activated(!1),this.topology().expandNodes(this.nodes(),this.position(),function(){this.fire("expandNode",this),b&&b.call(c,this,this)},this,this.animation()),this.animation(d)}},collapse:function(a,b,c){if(this.fire("beforeCollapseNode"),this.collapsible()){var d=this.animation();this.animation("boolean"==typeof a?a:d),this._collapsed=!0,this.selected(!1),this.model().activated(!1),this.topology().collapseNodes(this.nodes(),this.position(),function(){this.model().activated(!0),this.fire("collapseNode",this),b&&b.call(c,this,this)},this,this.animation()),this.animation(d)}},expandNodes:function(a,b){this.model().activated()||this.topology().expandNodes(this.nodes(),this.position(),a,b)},collapseNodes:function(a,b){this.topology().collapseNodes(this.nodes(),this.position(),a,b)},_updateMinusIcon:function(a){var b=this.view("icon"),c=this.view("minus");if(b.showIcon()){c.scale(.4==a?.8:1);var d=b.size(),e=b.scale();c.setTransform(d.width*e/2,d.height*e/2)}else c.setTransform(0,0)}}})}(nx,nx.global),function(a,b){var c=a.util,d=a.define("nx.graphic.Topology.NodeSetLayer",a.graphic.Topology.Layer,{statics:{defaultConfig:{iconType:"nodeSet",label:"model.label"}},events:["clickNodeSet","enterNodeSet","leaveNodeSet","dragNodeSetStart","dragNodeSet","dragNodeSetEnd","hideNodeSet","pressNodeSet","selectNodeSet","updateNodeSetCoordinate","expandNodeSet","collapseNodeSet","beforeExpandNodeSet","beforeCollapseNodeSet","updateNodeSet","removeNodeSet"],properties:{nodeSets:{get:function(){return this.nodeSetDictionary().values().toArray()}},nodeSetMap:{get:function(){return this.nodeSetDictionary().toObject()}},nodeSetDictionary:{value:function(){return new a.data.ObservableDictionary}}},methods:{attach:function(a,b){this.inherited(a,b);var c=this.topology();c.watch("stageScale",this.__watchStageScaleFN=function(a,b){this.eachNodeSet(function(a){a.stageScale(b)})},this),c.watch("revisionScale",this.__watchRevisionScale=function(a,b){this.eachNodeSet(function(a){a.revisionScale(b)},this)},this)},addNodeSet:function(a){var b=a.id(),c=this._generateNodeSet(a);return this.nodeSetDictionary().setItem(b,c),c},removeNodeSet:function(a){var b=this.nodeSetDictionary(),c=b.getItem(a);c&&(this.fire("removeNodeSet",c),c.dispose(),b.removeItem(a))},updateNodeSet:function(a){var b=this.nodeSetDictionary(),c=b.getItem(a);c&&(c.update(),this.fire("updateNodeSet",c))},_getNodeSetInstanceClass:function(c){var d,e=this.topology(),f=e.nodeSetInstanceClass();if(a.is(f,"Function")?(d=f.call(this,c),a.is(d,"String")&&(d=a.path(b,d))):d=a.path(b,f),!d)throw"Error on instance node set class";return d},_generateNodeSet:function(a){var b=a.id(),c=this.topology(),d=c.stageScale(),e=this._getNodeSetInstanceClass(a),f=new e({topology:c});return f.setModel(a),f.attach(this.view()),f.sets({"data-id":b,"class":"node nodeset",stageScale:d},c),this.updateDefaultSetting(f),f},updateDefaultSetting:function(b){var e=this.topology(),f=a.graphic.Component.__events__;a.each(b.__events__,function(a){-1==f.indexOf(a)&&b.on(a,function(c,d){d instanceof MouseEvent&&(window.event=d),this.fire(a.replace("Node","NodeSet"),b)},this)},this);var g=a.extend({enableSmartLabel:e.enableSmartLabel()},d.defaultConfig,e.nodeSetConfig());delete g.__owner__,a.each(g,function(a,d){c.setProperty(b,d,a,e)},this),c.setProperty(b,"showIcon",e.showIcon()),1!==e.revisionScale()&&b.revisionScale(e.revisionScale())},getNodeSet:function(a){return this.nodeSetDictionary().getItem(a)},eachNodeSet:function(a,b){this.nodeSetDictionary().each(function(c,d){var e=c.value();a.call(b||this,e,d)},this)},clear:function(){this.eachNodeSet(function(a){a.dispose()}),this.nodeSetDictionary().clear(),this.inherited()},dispose:function(){this.clear(),this.topology().unwatch("stageScale",this.__watchStageScaleFN,this),this.topology().unwatch("revisionScale",this.__watchRevisionScale,this),this.inherited()}}})}(nx,nx.global),function(a){var b=(a.geometry.Vector,a.geometry.Line);a.define("nx.graphic.Topology.AbstractLink",a.graphic.Group,{events:["hide","show","remove"],properties:{sourceNode:{get:function(){var a=this.topology(),b=this.model().source().id();return a.getNode(b)}},targetNode:{get:function(){var a=this.topology(),b=this.model().target().id();return a.getNode(b)}},sourcePosition:{get:function(){return this.sourceNode().position()}},targetPosition:{get:function(){return this.targetNode().position()}},sourceNodeID:{get:function(){return this.model().source().id()}},targetNodeID:{get:function(){return this.model().target().id()}},sourceX:{get:function(){return this.sourceNode().x()}},sourceY:{get:function(){return this.sourceNode().y()}},targetX:{get:function(){return this.targetNode().x()}},targetY:{get:function(){return this.targetNode().y()}},sourceVector:{get:function(){return this.sourceNode().vector()}},targetVector:{get:function(){return this.targetNode()?this.targetNode().vector():void 0}},position:{get:function(){var a=this.sourceNode().position(),b=this.targetNode().position();return{x1:a.x||0,x2:a.y||0,y1:b.x||0,y2:b.y||0}}},line:{get:function(){return new b(this.sourceVector(),this.targetVector())}},topology:{value:null},id:{get:function(){return this.model().id()}},linkKey:{get:function(){return this.model().linkKey()}},reverse:{get:function(){return this.model().reverse()}},centerPoint:{get:function(){return this.line().center()}},enable:{value:!0}},methods:{setModel:function(a,b){this.model(a),this.setBinding("visible","model.visible,direction=<>",this),b!==!1&&this.update()},update:function(){},dispose:function(){this.fire("remove"),this.inherited()}}})}(nx,nx.global),function(a){var b=a.geometry.Vector,c=(a.geometry.Line,5);a.define("nx.graphic.Topology.Link",a.graphic.Topology.AbstractLink,{events:["pressLink","clickLink","enterLink","leaveLink"],properties:{linkType:{get:function(){return void 0!==this._linkType?this._linkType:"parallel"},set:function(a){var b=this._processPropertyValue(a);return this._linkType!==b?(this._linkType=b,!0):!1}},offsetPercentage:{value:0},offsetRadix:{value:5},label:{set:function(a){var b=this._processPropertyValue(a),c=this.view("label");null!=b?c.append():c.remove(),this._label=b}},color:{set:function(a){var b=this._processPropertyValue(a);this.view("line").dom().setStyle("stroke",b),this.view("path").dom().setStyle("stroke",b),this._color=b}},width:{set:function(a){var b=this._processPropertyValue(a),c=(this._stageScale||1)*b;this.view("line").dom().setStyle("stroke-width",c),this.view("path").dom().setStyle("stroke-width",c),this._width=b}},stageScale:{set:function(a){var b=(this._width||1)*a;this.view("line").dom().setStyle("stroke-width",b),this.view("path").dom().setStyle("stroke-width",b),this._stageScale=a,this.update()}},dotted:{set:function(a){var b=this._processPropertyValue(a);b?this.view("path").dom().setStyle("stroke-dasharray","2, 5"):this.view("path").dom().setStyle("stroke-dasharray",""),this._dotted=b}},style:{set:function(a){var b=this._processPropertyValue(a);this.view("line").dom().setStyles(b),this.view("path").dom().setStyles(b)}},parentLinkSet:{},enable:{get:function(){return null!=this._enable?this._enable:!0},set:function(a){var b=this._processPropertyValue(a);this._enable=b,this.dom().setClass("disable",!b),this.update()}},drawMethod:{},revisionScale:{}},view:{type:"nx.graphic.Group",props:{"class":"link"},content:[{type:"nx.graphic.Group",content:[{name:"path",type:"nx.graphic.Path",props:{"class":"link"}},{name:"line_bg",type:"nx.graphic.Line",props:{"class":"link_bg"}},{name:"line",type:"nx.graphic.Line",props:{"class":"link"}}],events:{mouseenter:"{#_mouseenter}",mouseleave:"{#_mouseleave}",mousedown:"{#_mousedown}",touchstart:"{#_mousedown}",mouseup:"{#_mouseup}",touchend:"{#_mouseup}"}},{name:"label",type:"nx.graphic.Group",content:{name:"labelText",type:"nx.graphic.Text",props:{"alignment-baseline":"text-before-edge","text-anchor":"middle","class":"link-label"}}}]},methods:{update:function(){this.inherited();var a,c=this.getOffset(),d=new b(0,c),e=(this._width||1)*(this._stageScale||1),f=this.reverse()?this.line().negate():this.line(),g=this.view("path"),h=this.view("line"),i=this.view("line_bg");if(this.drawMethod())a=this.drawMethod().call(this,this.model(),this),g.setStyle("display","block"),g.set("d",a),g.dom().setStyle("stroke-width",e),h.setStyle("display","none"),i.setStyle("display","none");else if("curve"==this.linkType()){var j,k,l=[];j=f.normal().multiply(3*c),k=f.center().add(j),l.push("M",f.start.x,f.start.y),l.push("Q",k.x,k.y,f.end.x,f.end.y),a=l.join(" "),g.setStyle("display","block"),g.set("d",a),g.dom().setStyle("stroke-width",e),h.setStyle("display","none"),i.setStyle("display","none")}else{var m=f.translate(d);h.sets({x1:m.start.x,y1:m.start.y,x2:m.end.x,y2:m.end.y}),i.sets({x1:m.start.x,y1:m.start.y,x2:m.end.x,y2:m.end.y}),g.setStyle("display","none"),h.setStyle("display","block"),i.setStyle("display","block"),h.setStyle("stroke-width",e),i.setStyle("stroke-width",4*e)}this._updateLabel()},getPaddingLine:function(){var a=this.offset()*c,b=this.sourceNode().getBound(!0),d=Math.max(b.width,b.height)/1.3,e=this.targetNode().getBound(!0),f=Math.max(e.width,e.height)/1.3,g=this.line().pad(d,f),h=g.normal().multiply(a);return g.translate(h)},getOffset:function(){return"parallel"==this.linkType()?this.offsetPercentage()*this.offsetRadix()*this._stageScale:this.offsetPercentage()*this.offsetRadix()},_updateLabel:function(){var a,b,c=this.getOffset(),d=this.line(),e=d.normal().multiply(c);null!=this._label&&(a=this.view("label"),b=d.center().add(e),a.setTransform(b.x,b.y,this.stageScale()),this.view("labelText").set("text",this._label))},_mousedown:function(){this.enable()&&this.fire("pressLink")},_mouseup:function(){this.enable()&&this.fire("clickLink")},_mouseleave:function(){this.enable()&&this.fire("leaveLink")},_mouseenter:function(){this.enable()&&this.fire("enterLink")}}})}(nx,nx.global),function(a,b){var c=a.util,d=a.define("nx.graphic.Topology.LinksLayer",a.graphic.Topology.Layer,{statics:{defaultConfig:{linkType:"parallel",label:null,color:null,width:null,enable:!0}},events:["pressLink","clickLink","enterLink","leaveLink"],properties:{links:{get:function(){return this.linkDictionary().values().toArray()}},linkMap:{get:function(){return this.linkDictionary().toObject()}},linkDictionary:{value:function(){return new a.data.ObservableDictionary}}},methods:{attach:function(a){this.inherited(a);var b=this.topology();b.watch("stageScale",this.__watchStageScaleFN=function(a,b){this.eachLink(function(a){a.stageScale(b)})},this),b.watch("revisionScale",this.__watchRevisionScale=function(a,b){this.eachLink(function(a){a.revisionScale(b)})},this)},addLink:function(a){var b=a.id(),c=this._generateLink(a);return this.linkDictionary().setItem(b,c),c},removeLink:function(a){var b=this.linkDictionary(),c=b.getItem(a);c&&(c.dispose(),b.removeItem(a))},updateLink:function(a){this.linkDictionary().getItem(a).update()},_getLinkInstanceClass:function(c){var d,e=this.topology(),f=e.linkInstanceClass();if(a.is(f,"Function")?(d=f.call(this,c),a.is(d,"String")&&(d=a.path(b,d))):d=a.path(b,f),!d)throw"Error on instance link class";return d},_generateLink:function(a){var b=a.id(),c=this.topology(),d=this._getLinkInstanceClass(a),e=new d({topology:c});return e.setModel(a,!1),e.attach(this.view()),e.view().sets({"class":"link","data-id":b}),this.updateDefaultSetting(e),e},updateDefaultSetting:function(b){var e=this.topology(),f=a.graphic.Component.__events__;a.each(b.__events__,function(a){-1==f.indexOf(a)&&b.on(a,function(){this.fire(a,b)},this)},this);var g=a.extend({},d.defaultConfig,e.linkConfig());if(delete g.__owner__,a.each(g,function(a,d){c.setProperty(b,d,a,e)},this),a.DEBUG){var h=b.model();b.view().sets({"data-linkKey":h.linkKey(),"data-source-node-id":h.source().id(),"data-target-node-id":h.target().id()})}b.stageScale(e.stageScale()),b.update()},eachLink:function(a,b){this.linkDictionary().each(function(c,d){a.call(b||this,c.value(),d)})},getLink:function(a){return this.linkDictionary().getItem(a)},highlightLinks:function(a){this.highlightedElements().addRange(a)},activeLinks:function(a){this.activeElements().addRange(a)},clear:function(){this.eachLink(function(a){a.dispose()}),this.linkDictionary().clear(),this.inherited()},dispose:function(){this.clear(),this.topology().unwatch("stageScale",this.__watchStageScaleFN,this),this.inherited()}}})}(nx,nx.global),function(a){a.geometry.Vector,a.geometry.Line;a.define("nx.graphic.Topology.LinkSet",a.graphic.Topology.AbstractLink,{events:["pressLinkSetNumber","clickLinkSetNumber","enterLinkSetNumber","leaveLinkSetNumber","collapseLinkSet","expandLinkSet"],properties:{linkType:{get:function(){return this._linkType||"parallel"},set:function(a){var b=this._processPropertyValue(a);return this._linkType!==b?(this._linkType=b,!0):!1}},links:{get:function(){var a={};return this.eachLink(function(b,c){a[c]=b},this),a}},color:{set:function(a){var b=this._processPropertyValue(a);this.view("numBg").dom().setStyle("fill",b),this.view("path").dom().setStyle("stroke",b),this._color=b}},stageScale:{set:function(a){this.view("path").dom().setStyle("stroke-width",a),this.view("number").setTransform(null,null,a),this.model()&&this._updateLinksOffset(),this._stageScale=a}},enable:{get:function(){return void 0===this._enable?!0:this._enable},set:function(a){var b=this._processPropertyValue(a);this.dom().setClass("disable",!b),this._enable=b,this.eachLink(function(a){a.enable(b)})}},collapsedRule:{value:!1},activated:{value:!0},revisionScale:{set:function(a){var b=.6>a?8:12;this.view("numBg").dom().setStyle("stroke-width",b);var c=.6>a?8:10;this.view("num").dom().setStyle("font-size",c),this.view("number").visible(.2!==a)}}},view:{type:"nx.graphic.Group",props:{"data-type":"links-sum","class":"link-set"},content:[{name:"path",type:"nx.graphic.Line",props:{"class":"link-set-bg"}},{name:"number",type:"nx.graphic.Group",content:[{name:"numBg",type:"nx.graphic.Rect",props:{"class":"link-set-circle",height:1},events:{mousedown:"{#_number_mouseup}",touchstart:"{#_number_mouseup}",mouseenter:"{#_number_mouseenter}",mouseleave:"{#_number_mouseleave}"}},{name:"num",type:"nx.graphic.Text",props:{"class":"link-set-text",y:1}}]}]},methods:{setModel:function(a,b){this.inherited(a,b),this.setBinding("activated","model.activated,direction=<>",this)},update:function(){if(this._activated){var a=this.line();this.view("path").sets({x1:a.start.x,y1:a.start.y,x2:a.end.x,y2:a.end.y});var b=this.centerPoint();this.view("number").setTransform(b.x,b.y)}},updateLinkSet:function(){var a=this._processPropertyValue(this.collapsedRule());this.model().activated(a,{force:!0}),a?(this.append(),this.update(),this._updateLinkNumber(),this.fire("collapseLinkSet")):(this.parent()&&this.remove(),this._updateLinksOffset(),this.fire("expandLinkSet"))},eachLink:function(b,c){var d=this.topology(),e=this.model();a.each(e.edges(),function(a,e){var f=d.getLink(e);f&&b.call(c||this,f,e)})},_updateLinkNumber:function(){var a=Object.keys(this.model().edges()),b=this.view("num"),c=this.view("numBg");if(1==a.length)b.visible(!1),c.visible(!1);else{b.sets({text:a.length,visible:!0});var d=b.getBound(),e=Math.max(d.width-6,1);c.sets({width:e,visible:!0}),c.setTransform(e/-2)}},_updateLinksOffset:function(){if(!this._activated){var b=this.links(),c=(Object.keys(b).length-1)/2,d=0;a.each(b,function(a){a.offsetPercentage(-1*d++ +c),a.update()},this)}},_number_mousedown:function(a,b){this.enable()&&this.fire("pressLinkSetNumber",b)},_number_mouseup:function(a,b){this.enable()&&this.fire("clickLinkSetNumber",b)},_number_mouseleave:function(a,b){this.enable()&&this.fire("numberleave",b)},_number_mouseenter:function(a,b){this.enable()&&this.fire("numberenter",b)}}})}(nx,nx.global),function(a,b){var c=a.util,d=a.define("nx.graphic.Topology.LinkSetLayer",a.graphic.Topology.Layer,{statics:{defaultConfig:{label:null,sourceLabel:null,targetLabel:null,color:null,width:null,dotted:!1,style:null,enable:!0,collapsedRule:function(a){if("edgeSetCollection"==a.type())return!0;var b=this.linkType(),c=Object.keys(a.edges()),d="curve"===b?9:5;return c.length>d}}},events:["pressLinkSetNumber","clickLinkSetNumber","enterLinkSetNumber","leaveLinkSetNumber","collapseLinkSet","expandLinkSet"],properties:{linkSets:{get:function(){return this.linkSetDictionary().values().toArray()}},linkSetMap:{get:function(){return this.linkSetDictionary().toObject()}},linkSetDictionary:{value:function(){return new a.data.ObservableDictionary}}},methods:{attach:function(a){this.inherited(a);var b=this.topology();b.watch("stageScale",this.__watchStageScaleFN=function(a,b){this.eachLinkSet(function(a){a.stageScale(b)})},this),b.watch("revisionScale",this.__watchRevisionScale=function(a,b){this.eachLinkSet(function(a){a.revisionScale(b)})},this)},addLinkSet:function(a){var b=this.linkSetDictionary(),c=this._generateLinkSet(a);return b.setItem(a.linkKey(),c),c},updateLinkSet:function(a){this.linkSetDictionary().getItem(a).updateLinkSet()},removeLinkSet:function(a){var b=this.linkSetDictionary(),c=b.getItem(a);return c?(c.dispose(),b.removeItem(a),!0):!1},_getLinkSetInstanceClass:function(c){var d,e=this.topology(),f=e.linkSetInstanceClass();if(a.is(f,"Function")?(d=f.call(this,c),a.is(d,"String")&&(d=a.path(b,d))):d=a.path(b,f),!d)throw"Error on instance linkSet class";return d},_generateLinkSet:function(a){var b=this.topology(),c=this._getLinkSetInstanceClass(a),d=new c({topology:b});return d.setModel(a,!1),d.attach(this.view()),this.updateDefaultSetting(d),d},updateDefaultSetting:function(b){var e=this.topology(),f=a.graphic.Component.__events__;a.each(b.__events__,function(a){-1==f.indexOf(a)&&b.on(a,function(){this.fire(a,b)},this)},this);var g=a.extend({},d.defaultConfig,e.linkSetConfig());if(delete g.__owner__,g.linkType=e.linkConfig()&&e.linkConfig().linkType||a.graphic.Topology.LinksLayer.defaultConfig.linkType,a.each(g,function(a,d){c.setProperty(b,d,a,e)},this),b.stageScale(e.stageScale()),a.DEBUG){var h=b.model();b.view().sets({"data-nx-type":"nx.graphic.Topology.LinkSet","data-linkKey":h.linkKey(),"data-source-node-id":h.source().id(),"data-target-node-id":h.target().id()})}return b.updateLinkSet(),b},eachLinkSet:function(a,b){this.linkSetDictionary().each(function(c,d){a.call(b||this,c.value(),d)})},getLinkSet:function(a,b){var c=this.topology(),d=c.graph(),e=d.getEdgeSetBySourceAndTarget(a,b)||d.getEdgeSetCollectionBySourceAndTarget(a,b);return e?this.getLinkSetByLinkKey(e.linkKey()):null},getLinkSetByLinkKey:function(a){return this.linkSetDictionary().getItem(a)},highlightLinkSets:function(a){this.highlightedElements().addRange(a)},activeLinkSets:function(a){this.activeElements().addRange(a)},clear:function(){this.eachLinkSet(function(a){a.dispose()}),this.linkSetDictionary().clear(),this.inherited()},dispose:function(){this.clear(),this.topology().unwatch("stageScale",this.__watchStageScaleFN,this),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.HierarchicalLayout",{properties:{topology:{},levelBy:{value:function(){return function(a){return a.model().get("role")}}},sortOrder:{value:function(){return[]}},direction:{value:"vertical"},order:{},nodesPositionObject:{},groups:{}},methods:{process:function(a,b,c){var d=this._group(a,b||{}),e=this._calc(d,b||{});this._layout(e,c)},_group:function(b,c){var d={__other__:[]},e=this.topology(),f=c.levelBy||this.levelBy();return e.eachNode(function(b){var c;if(c=a.is(f,"String")&&"model"==f.substr(5)?b.model().get(f.substring(6)):f.call(e,b,b.model())){var g=d[c]=d[c]||[];g.push(b)}else d.__other__.push(b)}),d},_calc:function(b,c){var d={},e=Object.keys(b),f=this.topology(),g=c.sortOrder||this.sortOrder()||[],h=[];a.each(g,function(a){var b=e.indexOf(a);-1!==b&&(h.push(a),e.splice(b,1))}),e.splice(e.indexOf("__other__"),1),h=h.concat(e,["__other__"]),b=this._sort(b,h);var i=f.padding(),j=f.width()-2*i,k=f.height()-2*i,l=this.direction(),m=k/(h.length+1),n=j/(h.length+1),o=n,p=m;return a.each(h,function(c){b[c]&&("vertical"==l?(n=j/(b[c].length+1),a.each(b[c],function(a,b){d[a.id()]={x:n*(b+1),y:p}}),p+=m):(m=k/(b[c].length+1),a.each(b[c],function(a,b){d[a.id()]={x:o,y:m*(b+1)}}),o+=n),delete b[c])}),this.order(h),d},_sort:function(b,c){var d=this.topology(),e=d.graph();b[c[0]].sort(function(a,b){return Object.keys(b.model().edgeSets()).length-Object.keys(a.model().edgeSets()).length});for(var f=0;f'+b+"","text/xml");a.view().dom().$dom.appendChild(document.importNode(d.documentElement.firstChild,!0))},updateMap:function(){}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.TooltipPolicy",{events:[],properties:{topology:{},tooltipManager:{}},methods:{init:function(a){this.inherited(a),this.sets(a),this._tm=this.tooltipManager()},pressStage:function(){this._tm.closeAll()},zoomstart:function(){this._tm.closeAll()},clickNode:function(a){this._tm.openNodeTooltip(a)},clickLinkSetNumber:function(a){this._tm.openLinkSetTooltip(a)},dragStageStart:function(){this._tm.closeAll()},clickLink:function(a){this._tm.openLinkTooltip(a)},resizeStage:function(){this._tm.closeAll()},fitStage:function(){this._tm.closeAll()},deleteNode:function(){this._tm.closeAll()},deleteNodeSet:function(){this._tm.closeAll()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Tooltip",a.ui.Popover,{properties:{lazyClose:{value:!1},pin:{value:!1},listenWindow:{value:!0}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.NodeTooltipContent",a.ui.Component,{properties:{node:{set:function(b){var c=b.model();this.view("list").set("items",new a.data.Dictionary(c.getData())),this.title(b.label())}},topology:{},title:{}},view:{content:[{name:"header",props:{"class":"n-topology-tooltip-header"},content:[{tag:"span",props:{"class":"n-topology-tooltip-header-text"},name:"title",content:"{#title}"}]},{name:"content",props:{"class":"n-topology-tooltip-content n-list"},content:[{name:"list",tag:"ul",props:{"class":"n-list-wrap",template:{tag:"li",props:{"class":"n-list-item-i",role:"listitem"},content:[{tag:"label",content:"{key}: "},{tag:"span",content:"{value}"}]}}}]}]},methods:{init:function(a){this.inherited(a),this.sets(a)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.LinkTooltipContent",a.ui.Component,{properties:{link:{set:function(b){var c=b.model();this.view("list").set("items",new a.data.Dictionary(c.getData()))}},topology:{},tooltipmanager:{}},view:{content:{props:{"class":"n-topology-tooltip-content n-list"},content:[{name:"list",tag:"ul",props:{"class":"n-list-wrap",template:{tag:"li",props:{"class":"n-list-item-i",role:"listitem"},content:[{tag:"label",content:"{key}: "},{tag:"span",content:"{value}"}]}}}]}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.LinkSetTooltipContent",a.ui.Component,{properties:{linkSet:{set:function(b){var c=[];a.each(b.model().edges(),function(a){c.push({item:"Source:"+a.sourceID()+" Target :"+a.targetID(),edge:a})}),this.view("list").items(c)}},topology:{}},view:[{props:{style:{maxHeight:"247px",overflow:"auto","overflow-x":"hidden"}},content:{name:"list",props:{"class":"list-group",style:"width:200px",template:{tag:"a",props:{"class":"list-group-item"},content:"{item}",events:{click:"{#_click}"}}}}}],methods:{_click:function(a){a.model().edge}}})}(nx,nx.global),function(a,b){a.define("nx.graphic.Topology.TooltipManager",{events:["openNodeToolTip","closeNodeToolTip","openLinkToolTip","closeLinkToolTip","openLinkSetTooltip","closeLinkSetToolTip"],properties:{topology:{value:null},tooltips:{value:function(){return new a.data.ObservableDictionary}},nodeTooltip:{},linkTooltip:{},linkSetTooltip:{},nodeSetTooltip:{},nodeTooltipClass:{value:"nx.graphic.Topology.Tooltip"},linkTooltipClass:{value:"nx.graphic.Topology.Tooltip"},linkSetTooltipClass:{value:"nx.graphic.Topology.Tooltip"},nodeSetTooltipClass:{value:"nx.graphic.Topology.Tooltip"},nodeTooltipContentClass:{value:"nx.graphic.Topology.NodeTooltipContent"},linkTooltipContentClass:{value:"nx.graphic.Topology.LinkTooltipContent"},linkSetTooltipContentClass:{value:"nx.graphic.Topology.LinkSetTooltipContent"},nodeSetTooltipContentClass:{value:"nx.graphic.Topology.NodeSetTooltipContent"},showNodeTooltip:{value:!0},showLinkTooltip:{value:!0},showLinkSetTooltip:{value:!0},showNodeSetTooltip:{value:!0},tooltipPolicyClass:{get:function(){return void 0!==this._tooltipPolicyClass?this._tooltipPolicyClass:"nx.graphic.Topology.TooltipPolicy"},set:function(c){if(this._tooltipPolicyClass!==c){this._tooltipPolicyClass=c;var d=this.topology(),e=a.path(b,this.tooltipPolicyClass());if(e){var f=new e({topology:d,tooltipManager:this});this.tooltipPolicy(f)}return!0}return!1}},tooltipPolicy:{value:function(){var b=this.topology();return new a.graphic.Topology.TooltipPolicy({topology:b,tooltipManager:this})}},activated:{get:function(){return void 0!==this._activated?this._activated:!0},set:function(a){return this._activated!==a?(this._activated=a,!0):!1}}},methods:{init:function(c){this.inherited(c),this.sets(c),this.registerTooltip("nodeTooltip",this.nodeTooltipClass()),this.registerTooltip("linkTooltip",this.linkTooltipClass()),this.registerTooltip("linkSetTooltip",this.linkSetTooltipClass()),this.registerTooltip("nodeSetTooltip",this.nodeSetTooltipClass());var d=this.getTooltip("nodeTooltip");d.on("close",function(){this.fire("closeNodeToolTip")},this),d.view().dom().addClass("n-topology-tooltip"),this.nodeTooltip(d);var e=this.getTooltip("linkTooltip");e.on("close",function(){this.fire("closeLinkToolTip",e)},this),e.view().dom().addClass("n-topology-tooltip"),this.linkTooltip(e);var f=this.getTooltip("linkSetTooltip");f.on("close",function(){this.fire("closeLinkSetToolTip",f)},this),f.view().dom().addClass("n-topology-tooltip"),this.linkSetTooltip(f);var g=this.getTooltip("nodeSetTooltip");g.on("close",function(){this.fire("closeNodeSetToolTip")},this),g.view().dom().addClass("n-topology-tooltip"),this.nodeSetTooltip(g);var h=this.topology(),i=a.path(b,this.tooltipPolicyClass());if(i){var j=new i({topology:h,tooltipManager:this});this.tooltipPolicy(j)}},registerTooltip:function(c,d){var e=this.tooltips(),f=this.topology(),g=d;a.is(g,"String")&&(g=a.path(b,d));var h=new g;h.sets({topology:f,tooltipManager:this,model:f.graph(),"data-tooltip-type":c}),e.setItem(c,h)},getTooltip:function(a){var b=this.tooltips();return b.getItem(a)},executeAction:function(a,b){if(this.activated()){var c=this.tooltipPolicy();c&&c[a]&&c[a].call(c,b)}},openNodeTooltip:function(c,d){var e,f=this.topology(),g=this.nodeTooltip();if(g.close(!0),this.showNodeTooltip()!==!1){var h=d||f.getAbsolutePosition(c.position()),i=a.path(b,this.nodeTooltipContentClass());i&&(e=new i,e.sets({topology:f,node:c,model:f.model()})),e&&(g.content(null),e.attach(g));var j=c.getBound(!0);g.open({target:h,offset:Math.max(j.height,j.width)/2}),this.fire("openNodeToolTip",c)}},openNodeSetTooltip:function(c,d){var e,f=this.topology(),g=this.nodeSetTooltip();if(g.close(!0),this.showNodeSetTooltip()!==!1){var h=d||f.getAbsolutePosition(c.position()),i=a.path(b,this.nodeSetTooltipContentClass());i&&(e=new i,e.sets({topology:f,nodeSet:c,model:f.model()})),e&&(g.content(null),e.attach(g));var j=c.getBound(!0);g.open({target:h,offset:Math.max(j.height,j.width)/2}),this.fire("openNodeSetToolTip",c)}},openLinkTooltip:function(c,d){var e,f=this.topology(),g=this.linkTooltip();if(g.close(!0),this.showLinkTooltip()!==!1){var h=d||f.getAbsolutePosition(c.centerPoint()),i=a.path(b,this.linkTooltipContentClass());i&&(e=new i,e.sets({topology:f,link:c,model:f.model()})),e&&(g.content(null),e.attach(g)),g.open({target:h,offset:4}),this.fire("openLinkToolTip",c)}},openLinkSetTooltip:function(c,d){var e,f=this.topology(),g=this.linkSetTooltip();if(g.close(!0),this.showLinkSetTooltip()!==!1){var h=d||f.getAbsolutePosition(c.centerPoint()),i=a.path(b,this.linkSetTooltipContentClass());i&&(e=new i,e.sets({topology:f,linkSet:c,model:f.model()})),e&&(g.content(null),e.attach(g)),g.open({target:h,offsetX:0,offsetY:8}),this.fire("openLinkSetToolTip",c)}},closeAll:function(){this.tooltips().each(function(a){a.value().close(!0)},this)},dispose:function(){this.tooltips().each(function(a){a.value().close(!0),a.value().dispose()},this),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Scene",a.data.ObservableObject,{properties:{topology:{value:null}},methods:{init:function(a){this.sets(a)},activate:function(){},deactivate:function(){}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.DefaultScene",a.graphic.Topology.Scene,{events:[],methods:{activate:function(){this._topo=this.topology(),this._nodesLayer=this._topo.getLayer("nodes"),this._nodeSetLayer=this._topo.getLayer("nodeSet"),this._linksLayer=this._topo.getLayer("links"),this._linkSetLayer=this._topo.getLayer("linkSet"),this._groupsLayer=this._topo.getLayer("groups"),this._tooltipManager=this._topo.tooltipManager(),this._nodeDragging=!1,this._sceneTimer=null,this._interval=600},deactivate:function(){this._tooltipManager.closeAll()},dispatch:function(a,b,c){this._tooltipManager.executeAction(a,c)},pressStage:function(){},clickStage:function(a,b){b.target!=this._topo.stage().view().dom().$dom||b.shiftKey||this._topo.selectedNodes().clear()},dragStageStart:function(){var b=this._nodesLayer.nodes().length;b>300&&this._linksLayer.hide(),this._recover(),this._blockEvent(!0),a.dom.Document.html().addClass("n-moveCursor")},dragStage:function(a,b){var c=this._topo.stage();c.applyTranslate(b.drag.delta[0],b.drag.delta[1])},dragStageEnd:function(){this._linksLayer.show(),this._blockEvent(!1),a.dom.Document.html().removeClass("n-moveCursor")},projectionChange:function(){},zoomstart:function(){var a=this._nodesLayer.nodes().length;a>300&&this._linksLayer.setStyle("display","none"),this._recover()},zooming:function(){},zoomend:function(){this._linksLayer.setStyle("display","block"),this._topo.adjustLayout()},beforeSetData:function(){},afterSetData:function(){},insertData:function(){},ready:function(){},enterNode:function(b,c){clearTimeout(this._sceneTimer),this._nodeDragging||(this._sceneTimer=setTimeout(function(){this._nodeDragging||this._topo.activeRelatedNode(c)}.bind(this),this._interval),this._recover()),a.dom.Document.body().addClass("n-dragCursor")},leaveNode:function(){clearTimeout(this._sceneTimer),this._nodeDragging||this._recover(),a.dom.Document.body().removeClass("n-dragCursor")},hideNode:function(){},dragNodeStart:function(){this._nodeDragging=!0,this._blockEvent(!0),a.dom.Document.html().addClass("n-dragCursor"),setTimeout(this._recover.bind(this),0)},dragNode:function(a,b){this._topo._moveSelectionNodes(event,b)},dragNodeEnd:function(){this._nodeDragging=!1,this._blockEvent(!1),this._topo.stage().resetFitMatrix(),a.dom.Document.html().removeClass("n-dragCursor")},pressNode:function(){},clickNode:function(a,b){this._nodeDragging||(event.shiftKey||this._topo.selectedNodes().clear(),b.selected(!b.selected()))},selectNode:function(a,b){var c=this._topo.selectedNodes();b.selected()?-1==c.indexOf(b)&&this._topo.selectedNodes().add(b):-1!==c.indexOf(b)&&this._topo.selectedNodes().remove(b)},updateNodeCoordinate:function(){},enterLink:function(){},pressNodeSet:function(){},clickNodeSet:function(a,b){clearTimeout(this._sceneTimer),this._recover(),event.shiftKey?b.selected(!b.selected()):b.collapsed(!1)},enterNodeSet:function(a,b){clearTimeout(this._sceneTimer),this._nodeDragging||(this._sceneTimer=setTimeout(function(){this._topo.activeRelatedNode(b)}.bind(this),this._interval))},leaveNodeSet:function(){clearTimeout(this._sceneTimer),this._nodeDragging||this._recover()},beforeExpandNodeSet:function(b,c){this._blockEvent(!0);for(var d=c.parentNodeSet();d&&d.group;){var e=d.group;e.clear(),e.nodes(a.util.values(d.nodes())),e.draw(),d=d.parentNodeSet()}this._recover()},expandNodeSet:function(b,c){clearTimeout(this._sceneTimer),this._recover(),this._topo.stage().resetFitMatrix(),this._topo.fit(function(){c.group=this._groupsLayer.addGroup({shapeType:"nodeSetPolygon",nodeSet:c,nodes:a.util.values(c.nodes()),label:c.label(),color:"#9BB150",id:c.id()});for(var b=c.parentNodeSet();b&&b.group;)b.group.draw(),b=b.parentNodeSet();this._blockEvent(!1),this._topo.adjustLayout()},this,c.animation()?1.5:!1)},beforeCollapseNodeSet:function(b,c){this._blockEvent(!0),c.group&&(this._groupsLayer.removeGroup(c.id()),delete c.group),a.each(c.nodeSets(),function(a){a.group&&(this._groupsLayer.removeGroup(a.id()),delete a.group)},this),this._topo.fadeIn(),this._recover()},collapseNodeSet:function(b,c){for(var d=c.parentNodeSet();d&&d.group;){var e=d.group;e.clear(),e.nodes(a.util.values(d.nodes())),d=d.parentNodeSet()}this._topo.stage().resetFitMatrix(),this._topo.fit(function(){this._blockEvent(!1)},this,c.animation()?1.5:!1)},removeNodeSet:function(a,b){b.group&&(this._groupsLayer.removeGroup(b.id()),delete b.group),this._topo.stage().resetFitMatrix()},updateNodeSet:function(b,c){c.group&&(c.group.clear(),c.group.nodes(a.util.values(c.nodes())))},dragNodeSetStart:function(){this._nodeDragging=!0,this._recover(),this._blockEvent(!0),a.dom.Document.html().addClass("n-dragCursor")},dragNodeSet:function(a,b){this._topo._moveSelectionNodes(event,b)},dragNodeSetEnd:function(){this._nodeDragging=!1,this._blockEvent(!1),a.dom.Document.html().removeClass("n-dragCursor"),this._topo.stage().resetFitMatrix()},selectNodeSet:function(a,b){var c=this._topo.selectedNodes();b.selected()?-1==c.indexOf(b)&&this._topo.selectedNodes().add(b):-1!==c.indexOf(b)&&this._topo.selectedNodes().remove(b)},addNode:function(){this._topo.stage().resetFitMatrix(),this._topo.adjustLayout()},addNodeSet:function(){this._topo.stage().resetFitMatrix(),this._topo.adjustLayout()},removeNode:function(){this._topo.adjustLayout()},dragGroupStart:function(){},dragGroup:function(a,b){if(event){var c=this._topo.stageScale();b.updateNodesPosition(event.drag.delta[0],event.drag.delta[1]),b.move(event.drag.delta[0]*c,event.drag.delta[1]*c)}},dragGroupEnd:function(){},clickGroupLabel:function(){},collapseNodeSetGroup:function(a,b){var c=b.nodeSet();c&&c.collapsed(!0)},enterGroup:function(b,c){if(a.is(c,"nx.graphic.Topology.NodeSetPolygonGroup")){var d=c.nodeSet();this._topo.activeNodes(a.util.values(d.nodes())),this._topo.fadeOut(),this._groupsLayer.fadeOut(),c.view().dom().addClass("fade-active-item")}},leaveGroup:function(a,b){b.view().dom().removeClass("fade-active-item"),this._topo.fadeIn(),this._topo.recoverActive()},right:function(){this._topo.move(30,null,.5)},left:function(){this._topo.move(-30,null,.5)},up:function(){this._topo.move(null,-30,.5)},down:function(){this._topo.move(null,30,.5)},pressR:function(){a.DEBUG&&this._topo.activateLayout("force")},pressA:function(){if(a.DEBUG){var b=this._topo.selectedNodes().toArray();this._topo.selectedNodes().clear(),this._topo.aggregationNodes(b)}},pressS:function(){a.DEBUG&&this._topo.activateScene("selection")},pressM:function(){a.DEBUG&&this._topo.activateScene("default")},pressF:function(){a.DEBUG&&this._topo.fit()},topologyGenerated:function(){this._topo.adjustLayout()},_recover:function(){this._topo.fadeIn(),this._topo.recoverActive()},_blockEvent:function(a){this._topo.blockEvent(a)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.SelectionScene",a.graphic.Topology.DefaultScene,{methods:{activate:function(a){this.appendRect(),this.inherited(a),this.topology().dom().addClass("n-crosshairCursor")},deactivate:function(){this.inherited(),this.rect.dispose(),delete this.rect,this.topology().dom().removeClass("n-crosshairCursor"),a.dom.Document.html().removeClass("n-crosshairCursor")},_dispatch:function(a,b,c){this[a]&&this[a].call(this,b,c)},appendRect:function(){var b=this.topology();this.rect||(this.rect=new a.graphic.Rect({"class":"selectionRect"}),this.rect.attach(b.stage().staticLayer())),this.rect.sets({x:0,y:0,width:0,height:0})},dragStageStart:function(){this.rect.set("visible",!0),this._blockEvent(!0),a.dom.Document.html().addClass("n-crosshairCursor")},dragStage:function(a,b){var c=this.rect,d=b.drag.origin,e=b.drag.offset;e[0]<0?(c.set("x",d[0]+e[0]),c.set("width",-e[0])):(c.set("x",d[0]),c.set("width",e[0])),e[1]<0?(c.set("y",d[1]+e[1]),c.set("height",-e[1])):(c.set("y",d[1]),c.set("height",e[1]))},dragStageEnd:function(){this._stageTranslate=null,this.rect.set("visible",!1),this._blockEvent(!1),a.dom.Document.html().removeClass("n-crosshairCursor")},_getRectBound:function(){var a=this.rect.getBoundingClientRect(),b=this.topology().getBound();return{top:a.top-b.top,left:a.left-b.left,width:a.width,height:a.height,bottom:a.bottom-b.top,right:a.right-b.left}},esc:{},clickNodeSet:function(){},dragNode:function(){},dragNodeSet:function(){},_blockEvent:function(b){b?(this.topology().scalable(!1),a.dom.Document.body().addClass("n-userselect n-blockEvent")):(this.topology().scalable(!0),a.dom.Document.body().removeClass("n-userselect"),a.dom.Document.body().removeClass("n-blockEvent"))}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.SelectionNodeScene",a.graphic.Topology.SelectionScene,{properties:{selectedNodes:{get:function(){return this.topology().selectedNodes()}}},methods:{activate:function(){this.inherited();var a=this._tooltipManager;a.activated(!1)},deactivate:function(){this.inherited();var a=this._tooltipManager;a.activated(!0)},pressStage:function(a,b){var c=this.selectedNodes(),d=this._multi=b.metaKey||b.ctrlKey||b.shiftKey;d||c.clear(),b.captureDrag(a.stage().view(),this.topology().stage())},enterNode:function(){},clickNode:function(){},dragStageStart:function(a,b){this.inherited(a,b);var c=this.selectedNodes(),d=this._multi=b.metaKey||b.ctrlKey||b.shiftKey;d||c.clear(),this._prevSelectedNodes=this.selectedNodes().toArray().slice()},dragStage:function(a,b){this.inherited(a,b),this.selectNodeByRect(this.rect.getBound())},selectNode:function(a,b){b.selected()?this._topo.selectedNodes().add(b):this._topo.selectedNodes().remove(b)},selectNodeSet:function(a,b){b.selected()?this._topo.selectedNodes().add(b):this._topo.selectedNodes().remove(b)},pressNode:function(a,b){if(b.enable()){var c=this.selectedNodes();this._multi=event.metaKey||event.ctrlKey||event.shiftKey,this._multi||c.clear(),b.selected(!b.selected())}},pressNodeSet:function(a,b){if(b.enable()){var c=this.selectedNodes();this._multi=event.metaKey||event.ctrlKey||event.shiftKey,this._multi||c.clear(),b.selected(!b.selected())}},selectNodeByRect:function(b){this.topology().eachNode(function(c){if("vertexSet"!=c.model().type()||c.collapsed()){var d=c.getBound();if(a.util.isFirefox()){var e=[c.x(),c.y()],f=this.topology().stage().dom().getBound(),g=this.topology().stage().matrix();e=a.geometry.Vector.transform(e,g),d.x=d.left=e[0]+f.left-d.width/2,d.right=d.left+d.width,d.y=d.top=e[1]+f.top-d.height/2,d.bottom=d.top+d.height}var h=c.selected();this._hittest(b,d)?h||c.selected(!0):this._multi?-1==this._prevSelectedNodes.indexOf(c)&&h&&c.selected(!1):h&&c.selected(!1)}},this)},collapseNodeSetGroup:function(){},enterGroup:function(){},_hittest:function(a,b){var c=b.top>=a.top&&b.top<=a.top+a.height,d=b.left>=a.left&&b.left<=a.left+a.width,e=a.top+a.height>=b.top+b.height&&b.top+b.height>=a.top,f=a.left+a.width>=b.left+b.width&&b.left+b.width>=a.left,g=a.top>=b.top&&a.top+a.height<=b.top+b.height,h=a.left>=b.left&&a.left+a.width<=b.left+b.width;return c&&d||e&&f||c&&f||e&&d||c&&h||e&&h||d&&g||f&&g}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.ZoomBySelection",a.graphic.Topology.SelectionScene,{events:["finish"],properties:{},methods:{activate:function(b){this.inherited(b),a.dom.Document.html().addClass("n-zoomInCursor")},deactivate:function(){this.inherited(),a.dom.Document.html().removeClass("n-zoomInCursor")},dragStageEnd:function(a,b){var c=this.rect.getBound();this.inherited(a,b),this.fire("finish",c)},esc:function(){this.fire("finish")}}})}(nx,nx.global),function(a,b){var c={rect:"nx.graphic.Topology.RectGroup",circle:"nx.graphic.Topology.CircleGroup",polygon:"nx.graphic.Topology.PolygonGroup",nodeSetPolygon:"nx.graphic.Topology.NodeSetPolygonGroup"},d=["#C3A5E4","#75C6EF","#CBDA5C","#ACAEB1 ","#2CC86F"];a.define("nx.graphic.Topology.GroupsLayer",a.graphic.Topology.Layer,{statics:{colorTable:d},events:["dragGroupStart","dragGroup","dragGroupEnd","clickGroupLabel","enterGroup","leaveGroup","collapseNodeSetGroup"],properties:{shapeType:"polygon",groupItems:{value:function(){var b=new a.data.ObservableDictionary;return b.on("change",function(b,c){var d=c.action,e=c.items;"clear"==d&&a.each(e,function(a){var b=a.value();b&&b.dispose()})},this),b}},groups:{get:function(){return this._groups||[]},set:function(b){a.is(b,Array)&&(a.each(b,function(a){this.addGroup(a)},this),this._groups=b)}}},methods:{registerGroupItem:function(a,b){c[a]=b},attach:function(a){this.inherited(a);var b=this.topology();b.on("afterFitStage",this._redraw.bind(this),this),b.on("zoomend",this._redraw.bind(this),this),b.on("collapseNode",this._redraw.bind(this),this),b.on("expandNode",this._redraw.bind(this),this),b.watch("revisionScale",this._redraw.bind(this),this),b.watch("showIcon",this._redraw.bind(this),this)},addGroup:function(e){var f=this.groupItems(),g=e.shapeType||this.shapeType(),h=e.nodes,i=a.path(b,c[g]),j=new i({topology:this.topology()}),k=a.clone(e);k.color||(k.color=d[f.count()%5]),delete k.nodes,delete k.shapeType,j.sets(k),j.attach(this),j.nodes(h);var l=k.id||j.__id__;f.setItem(l,j);var m=["dragGroupStart","dragGroup","dragGroupEnd","clickGroupLabel","enterGroup","leaveGroup","collapseNodeSetGroup"];return a.each(m,function(a){j.on(a,function(b,c){c instanceof MouseEvent&&(window.event=c),this.fire(a,j)},this)},this),j},_redraw:function(){this.groupItems().each(function(a){a.value()._draw()},this)},removeGroup:function(a){var b=this.groupItems(),c=b.getItem(a);c&&(c.dispose(),b.removeItem(a))},getGroup:function(a){return this.groupItems().getItem(a)},eachGroupItem:function(a,b){this.groupItems().each(function(c){a.call(b||this,c.value(),c.key())},this)},clear:function(){this.groupItems().clear(),this.inherited()},dispose:function(){this.clear();var a=this.topology();a.off("collapseNode",this._redraw.bind(this),this),a.off("expandNode",this._redraw.bind(this),this),a.off("zoomend",this._redraw.bind(this),this),a.off("fitStage",this._redraw.bind(this),this),a.unwatch("revisionScale",this._redraw.bind(this),this),a.unwatch("showIcon",this._redraw.bind(this),this),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.GroupItem",a.graphic.Group,{events:[],properties:{topology:{},nodes:{get:function(){return this._nodes||[]},set:function(b){var c=this.topology(),d=c.graph(),e=this.vertices();(a.is(b,Array)||a.is(b,a.data.ObservableCollection))&&(a.each(b,function(b){var c;a.is(b,a.graphic.Topology.AbstractNode)?c=b.model():d.getVertex(b)&&(c=d.getVertex(b)),c&&-1==e.indexOf(c)&&e.push(c)},this),a.each(e,function(a){this.attachEvent(a)},this),this.draw()),this._nodes=b}},vertices:{value:function(){return[]}},color:{},label:{},blockDrawing:{value:!1}},view:{},methods:{attachEvent:function(a){a.watch("generated",this._draw,this),a.on("updateCoordinate",this._draw,this)},detachEvent:function(a){a.unwatch("generated",this._draw,this),a.off("updateCoordinate",this._draw,this)},getNodes:function(){var b=[],c=this.topology();return a.each(this.vertices(),function(a){if(a.generated()){var d=c.getNode(a.id());d&&b.push(d)}}),b},addNode:function(b){var c,d=this.topology(),e=d.graph(),f=this.vertices();a.is(b,a.graphic.Topology.AbstractNode)?c=b.model():e.getVertex(b)&&(c=e.getVertex(b)),c&&-1==f.indexOf(c)&&(f.push(c),this.attachEvent(c),this.draw())},removeNode:function(b){var c,d=this.topology(),e=d.graph(),f=this.vertices(),g=this.nodes();if(a.is(b,a.graphic.Topology.AbstractNode)?c=b.model():e.getVertex(b)&&(c=e.getVertex(b)),c&&-1!=f.indexOf(c)){if(f.splice(f.indexOf(c),1),this.detachEvent(c),a.is(g,Array)){var h=c.id(),i=d.getNode(h);-1!==g.indexOf(h)?g.splice(g.indexOf(h),1):i&&-1!==g.indexOf(i)&&g.splice(g.indexOf(i),1)}this.draw()}},_draw:function(){this.blockDrawing()||this.draw()},draw:function(){0===this.getNodes().length?this.hide():this.show()},updateNodesPosition:function(b,c){var d=this.topology().stageScale();a.each(this.getNodes(),function(a){a.move(b*d,c*d)})},clear:function(){a.each(this.vertices(),function(a){this.detachEvent(a)},this),this.vertices([]),this.nodes([])},dispose:function(){this.clear(),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.RectGroup",a.graphic.Topology.GroupItem,{events:["dragGroupStart","dragGroup","dragGroupEnd","clickGroupLabel","enterGroup","leaveGroup"],view:{type:"nx.graphic.Group",props:{"class":"group"},content:[{name:"shape",type:"nx.graphic.Rect",props:{"class":"bg"},events:{mousedown:"{#_mousedown}",dragstart:"{#_dragstart}",dragmove:"{#_drag}",dragend:"{#_dragend}"}},{name:"text",type:"nx.graphic.Group",content:{name:"label",type:"nx.graphic.Text",props:{"class":"groupLabel",text:"{#label}"},events:{click:"{#_clickLabel}"}}}]},properties:{},methods:{draw:function(){this.inherited(),this.setTransform(0,0);var a=this.topology(),b=a.stageScale(),c=(a.revisionScale(),{x:a.matrix().x(),y:a.matrix().y()}),d=a.getBoundByNodes(this.getNodes());if(null!=d){d.left-=c.x,d.top-=c.y;var e=this.view("shape");e.sets({x:d.left,y:d.top,width:d.width,height:d.height,fill:this.color(),stroke:this.color(),scale:a.stageScale()});var f=this.view("text");f.setTransform((d.left+d.width/2)*b,(d.top-12)*b,b),f.view().dom().setStyle("fill",this.color()),this.view("label").view().dom().setStyle("font-size",11)}},_clickLabel:function(){this.fire("clickGroupLabel")},_mousedown:function(a,b){b.captureDrag(this.view("shape"),this.topology().stage())},_dragstart:function(a,b){this.blockDrawing(!0),this.fire("dragGroupStart",b)},_drag:function(a,b){this.fire("dragGroup",b)},_dragend:function(a,b){this.blockDrawing(!1),this.fire("dragGroupEnd",b)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.CircleGroup",a.graphic.Topology.GroupItem,{events:["dragGroupStart","dragGroup","dragGroupEnd","clickGroupLabel","enterGroup","leaveGroup"],view:{type:"nx.graphic.Group",props:{"class":"group"},content:[{name:"shape",type:"nx.graphic.Circle",props:{"class":"bg"},events:{mousedown:"{#_mousedown}",touchstart:"{#_mousedown}",dragstart:"{#_dragstart}",dragmove:"{#_drag}",dragend:"{#_dragend}"}},{name:"text",type:"nx.graphic.Group",content:{name:"label",type:"nx.graphic.Text",props:{"class":"groupLabel",text:"{#label}"},events:{click:"{#_clickLabel}"}}}]},methods:{draw:function(){this.inherited(),this.setTransform(0,0);var a=this.topology(),b=(a.revisionScale(),{x:a.matrix().x(),y:a.matrix().y()}),c=a.getBoundByNodes(this.getNodes());if(null!=c){var d=Math.sqrt(Math.pow(c.width/2,2)+Math.pow(c.height/2,2)),e=this.view("shape");e.sets({cx:c.left-b.x+c.width/2,cy:c.top-b.y+c.height/2,r:d,fill:this.color(),stroke:this.color(),scale:a.stageScale()});var f=this.view("text"),g=a.stageScale();c.left-=b.x,c.top-=b.y,f.setTransform((c.left+c.width/2)*g,(c.top+c.height/2-d-12)*g,g),f.view().dom().setStyle("fill",this.color()),this.view("label").view().dom().setStyle("font-size",11),this.setTransform(0,0)}},_clickLabel:function(){this.fire("clickGroupLabel")},_mousedown:function(a,b){b.captureDrag(this.view("shape"),this.topology().stage())},_dragstart:function(a,b){this.blockDrawing(!0),this.fire("dragGroupStart",b)},_drag:function(a,b){this.fire("dragGroup",b)},_dragend:function(a,b){this.blockDrawing(!1),this.fire("dragGroupEnd",b)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.PolygonGroup",a.graphic.Topology.GroupItem,{events:["dragGroupStart","dragGroup","dragGroupEnd","clickGroupLabel","enterGroup","leaveGroup"],view:{type:"nx.graphic.Group",props:{"class":"group"},content:[{name:"shape",type:"nx.graphic.Polygon",props:{"class":"bg"},events:{mousedown:"{#_mousedown}",dragstart:"{#_dragstart}",dragmove:"{#_drag}",dragend:"{#_dragend}"}},{name:"text",type:"nx.graphic.Group",content:{name:"label",type:"nx.graphic.Text",props:{"class":"nodeSetGroupLabel",text:"{#label}",style:{"alignment-baseline":"central","text-anchor":"middle","font-size":12}},events:{click:"{#_clickLabel}"}}}],events:{mouseenter:"{#_mouseenter}",mouseleave:"{#_mouseleave}"}},properties:{shape:{get:function(){return this.view("shape")}}},methods:{draw:function(){this.inherited(),this.setTransform(0,0);var b=this.topology(),c=b.stageScale(),d=b.revisionScale(),e={x:b.matrix().x(),y:b.matrix().y()},f=[];a.each(this.getNodes(),function(a){a.visible()&&f.push({x:a.model().x(),y:a.model().y()})});var g=this.view("shape");g.sets({fill:this.color()}),g.dom().setStyle("stroke",this.color()),g.dom().setStyle("stroke-width",60*c*d),g.nodes(f);var h=b.getInsideBound(g.getBound());h.left-=e.x,h.top-=e.y,h.left*=c,h.top*=c,h.width*=c,h.height*=c;var i=this.view("text");i.setTransform(h.left+h.width/2,h.top-40*c*d,c),this.view("label").view().dom().setStyle("font-size",11),i.view().dom().setStyle("fill",this.color())},_clickLabel:function(){this.fire("clickGroupLabel")},_mousedown:function(a,b){b.captureDrag(this.view("shape"),this.topology().stage())},_dragstart:function(a,b){this.blockDrawing(!0),this.fire("dragGroupStart",b)},_drag:function(a,b){this.fire("dragGroup",b)},_dragend:function(a,b){this.blockDrawing(!1),this.fire("dragGroupEnd",b)}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.NodeSetPolygonGroup",a.graphic.Topology.GroupItem,{events:["dragGroupStart","dragGroup","dragGroupEnd","clickGroupLabel","enterGroup","leaveGroup","collapseNodeSetGroup"],view:{type:"nx.graphic.Group",props:{"class":"group aggregationGroup"},content:[{name:"shape",type:"nx.graphic.Polygon",props:{"class":"bg"}},{name:"icons",type:"nx.graphic.Group",content:[{name:"minus",type:"nx.graphic.Group",content:{name:"minusIcon",type:"nx.graphic.Icon",props:{iconType:"collapse"}},events:{click:"{#_collapse}"}},{name:"nodeIcon",type:"nx.graphic.Group",content:{name:"nodeIconImg",type:"nx.graphic.Icon",props:{iconType:"nodeSet",scale:1}}},{name:"labelContainer",type:"nx.graphic.Group",content:{name:"label",type:"nx.graphic.Text",props:{"class":"nodeSetGroupLabel",text:"{#label}",style:{"alignment-baseline":"central","text-anchor":"start","font-size":12},visible:!1},events:{click:"{#_clickLabel}"}},events:{}}],events:{mouseenter:"{#_mouseenter}",mouseleave:"{#_mouseleave}",mousedown:"{#_mousedown}",touchstart:"{#_mousedown}",dragstart:"{#_dragstart}",dragmove:"{#_drag}",dragend:"{#_dragend}"}}]},properties:{nodeSet:{},topology:{},opacity:{set:function(a){Math.max(a,.1);this._opacity=a}},shape:{get:function(){return this.view("shape")}}},methods:{getNodes:function(){return a.util.values(this.nodeSet().nodes())},draw:function(){this.inherited(),this.setTransform(0,0);var b=this.topology(),c=b.stageScale(),d={x:b.matrix().x(),y:b.matrix().y()},e=[];a.each(this.getNodes(),function(a){a.visible()&&e.push({x:a.model().x(),y:a.model().y()})});var f=this.view("shape");f.nodes(e);var g=b.getInsideBound(f.getBound());g.left-=d.x,g.top-=d.y,g.left*=c,g.top*=c,g.width*=c,g.height*=c;{var h=this.view("minus"),i=this.view("label"),j=this.view("nodeIcon"),k=this.view("nodeIconImg"); -this.view("labelContainer")}if(b.showIcon()&&b.revisionScale()>.6){f.dom().setStyle("stroke-width",60*c),k.set("iconType",this.nodeSet().iconType());var l=k.size();j.visible(!0),a.util.isFirefox()?(h.setTransform(g.left+g.width/2,g.top-l.height*c/2+8*c,1*c),j.setTransform(g.left+g.width/2+3*c+l.width*c/2,g.top-l.height*c/2-0*c,.5*c)):(h.setTransform(g.left+g.width/2,g.top-l.height*c/2-22*c,1*c),j.setTransform(g.left+g.width/2+3*c+l.width*c/2,g.top-l.height*c/2-22*c,.5*c)),i.sets({x:g.left+g.width/2-3*c+l.width*c,y:g.top-l.height*c/2-22*c}),i.view().dom().setStyle("font-size",16*c)}else f.dom().setStyle("stroke-width",30*c),a.util.isFirefox()?h.setTransform(g.left+g.width/2,g.top-29*c/2,c):h.setTransform(g.left+g.width/2,g.top-45*c/2,c),j.visible(!1),i.sets({x:g.left+g.width/2+12*c,y:g.top-45*c/2}),i.view().dom().setStyle("font-size",16*c)},_clickLabel:function(){this.fire("clickGroupLabel")},_mousedown:function(a,b){b.captureDrag(this.view("icons"),this.topology().stage())},_dragstart:function(a,b){this.blockDrawing(!0),this.fire("dragGroupStart",b)},_drag:function(a,b){this.fire("dragGroup",b),this.view("minus").dom().$dom.contains(b.srcElement)||(this._dragMinusIcon=!0)},_dragend:function(a,b){this.blockDrawing(!1),this.fire("dragGroupEnd",b)},_collapse:function(){this._dragMinusIcon||this.fire("collapseNodeSetGroup",event),this._dragMinusIcon=!1},_mouseenter:function(){this.fire("enterGroup")},_mouseleave:function(){this.fire("leaveGroup")}}})}(nx,nx.global),function(a){var b=a.geometry.Vector,c=a.geometry.Line,d=0,e=["#b2e47f","#e4e47f","#bec2f9","#b6def7","#89f0de"];a.define("nx.graphic.Topology.Path",a.graphic.Component,{view:{type:"nx.graphic.Group",content:{name:"path",type:"nx.graphic.Path"}},properties:{pathStyle:{value:{stroke:"#666","stroke-width":"0px"}},pathWidth:{value:"auto"},pathGutter:{value:13},pathPadding:{value:"auto"},arrow:{value:"none"},links:{value:[],set:function(b){this._links=b,this.edgeIdCollection().clear();var c=[];(a.is(b,"Array")||a.is(b,a.data.Collection))&&(a.each(b,function(a){c.push(a.model().id())}.bind(this)),this.edgeIdCollection().addRange(c)),this.draw()}},edgeIdCollection:{value:function(){var b,c=new a.data.ObservableCollection,d=function(){this.draw()}.bind(this);return c.on("change",function(e,f){var g=function(e,h){if(h){this.unwatch("topology",g),b=b||a.path(this,"topology.graph.edges"),verticesIdCollection=this.verticesIdCollection();var i=[];"add"===f.action?(a.each(f.items,function(a){var c=b.getItem(a);c.watch("generated",d),i.push(c.sourceID()),i.push(c.targetID())}.bind(this)),a.each(i,function(a){verticesIdCollection.contains(a)||verticesIdCollection.add(a)})):(a.each(f.items,function(a){var c=b.getItem(a);c.unwatch("generated",d)}.bind(this)),verticesIdCollection.clear(),a.each(c,function(a){var c=b.getItem(a);verticesIdCollection.contains(c.sourceID())&&verticesIdCollection.add(c.sourceID()),verticesIdCollection.contains(c.targetID())&&verticesIdCollection.add(c.targetID())}.bind(this)))}}.bind(this);this.topology()?g("topology",this.topology()):this.watch("topology",g)}.bind(this)),c}},verticesIdCollection:{value:function(){var b,c=new a.data.ObservableCollection,d=function(){this.draw()}.bind(this);return c.on("change",function(c,e){b=b||a.path(this,"topology.graph.vertices"),"add"===e.action?a.each(e.items,function(a){var c=b.getItem(a);c.watch("position",d)}.bind(this)):a.each(e.items,function(a){var c=b.getItem(a);c.unwatch("position",d)}.bind(this))}.bind(this)),c}},reverse:{value:!1},owner:{},topology:{}},methods:{init:function(a){this.inherited(a);var b=this.pathStyle();this.view("path").sets(b),b.fill||this.view("path").setStyle("fill",e[d++%5])},draw:function(){if(this.topology()){var c=!0,d=this.topology(),e=a.path(this,"topology.graph.edges"),f=a.path(this,"topology.graph.vertices");if(a.each(this.verticesIdCollection(),function(a){var b=f.getItem(a);return b.generated()?void 0:(c=!1,!1)}.bind(this)),a.each(this.edgeIdCollection(),function(a){var b=e.getItem(a);return b.generated()?void 0:(c=!1,!1)}.bind(this)),!c)return void this.view("path").set("d","M0 0");var g,h,i,j,k,l,m,n,o=[],p=[],q=this.topology().stageScale(),r=this.pathWidth(),s=this.pathPadding(),t=this.arrow(),u=this.edgeIdCollection(),v=[];a.each(u,function(a){v.push(d.getLink(a))});var w=this._serializeLinks(v),x=v.length,y=v[0],z=y.getOffset();if(y.reverse()&&(z*=-1),z=new b(0,this.reverse()?-1*z:z),h=w[0].translate(z),"auto"===s?(k=Math.min(y.sourceNode().showIcon()?24:4,h.length()/4/q),l=Math.min(y.targetNode().showIcon()?24:4,h.length()/4/q)):a.is(s,"Array")?(k=s[0],l=s[1]):k=l=s,"string"==typeof k&&k.indexOf("%")>0&&(k=h.length()*q*parseInt(k,10)/100/q),"auto"===r&&(r=Math.min(10,Math.max(3,Math.round(3/q)))),m=new b(0,r/2*q),n=new b(0,-r/2*q),k*=q,j=h.translate(m).pad(k,0).start,o.push("M",j.x,j.y),j=h.translate(n).pad(k,0).start,p.unshift("L",j.x,j.y,"Z"),v.length>1)for(var A=1;x>A;A++)g=v[A],i=w[A].translate(new b(0,g.getOffset())),j=h.translate(m).intersection(i.translate(m)),isFinite(j.x)&&isFinite(j.y)&&o.push("L",j.x,j.y),j=h.translate(n).intersection(i.translate(n)),isFinite(j.x)&&isFinite(j.y)&&p.unshift("L",j.x,j.y),h=i;else i=h;"string"==typeof l&&l.indexOf("%")>0&&(l=i.length()*parseInt(l,10)/100/q),l*=q,"cap"==t?(j=i.translate(m).pad(0,2.5*r+l).end,o.push("L",j.x,j.y),j=j.add(i.normal().multiply(r/2)),o.push("L",j.x,j.y),j=i.translate(n).pad(0,2.5*r+l).end,p.unshift("L",j.x,j.y),j=j.add(i.normal().multiply(-r/2)),p.unshift("L",j.x,j.y),j=i.pad(0,l).end,o.push("L",j.x,j.y)):"end"==t?(j=i.translate(m).pad(0,2*r+l).end,o.push("L",j.x,j.y),j=i.translate(n).pad(0,2*r+l).end,p.unshift("L",j.x,j.y),j=i.pad(0,l).end,o.push("L",j.x,j.y)):"full"==t?(j=i.pad(0,l).end,o.push("L",j.x,j.y)):(j=i.translate(m).pad(0,l).end,o.push("L",j.x,j.y),j=i.translate(n).pad(0,l).end,p.unshift("L",j.x,j.y)),this.view("path").set("d",o.concat(p).join(" "))}},_serializeLinks:function(a){var b=[],d=a.length;b.push(this.reverse()?new c(a[0].targetVector(),a[0].sourceVector()):new c(a[0].sourceVector(),a[0].targetVector()));for(var e=1;d>e;e++){var f=a[e-1],g=a[e],h=f.sourceVector(),i=f.targetVector(),j=g.sourceVector(),k=g.targetVector();f.targetNodeID()==g.sourceNodeID()?b.push(new c(j,k)):f.targetNodeID()==g.targetNodeID()?b.push(new c(k,j)):f.sourceNodeID()==g.sourceNodeID()?(b.pop(),b.push(new c(i,h)),b.push(new c(j,k))):(b.pop(),b.push(new c(i,h)),b.push(new c(k,j)))}return this.reverse()&&b.reverse(),b},isEqual:function(a,b){return a.x==b.x&&a.y==b.y},dispose:function(){a.each(this.nodes,function(a){a.off("updateNodeCoordinate",this.draw,this)},this),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.BasePath",a.graphic.Component,{events:[],properties:{nodes:{},pathGenerator:{value:function(){return function(){}}},pathStyle:{value:function(){return{stroke:"#666","stroke-width":2,fill:"none"}}},topology:{}},view:{type:"nx.graphic.Group",content:{name:"path",type:"nx.graphic.Path",props:{}}},methods:{attach:function(b){this.inherited(b);var c=this._nodesWatcher=new a.graphic.Topology.NodeWatcher;c.observePosition(!0),c.topology(this.topology()),c.updater(this._draw.bind(this)),c.nodes(this.nodes()),this.view("path").dom().setStyles(this.pathStyle())},_draw:function(){var a=this.view("path"),b=this._nodesWatcher.getNodes();if(b.length==this.nodes().length){var c=this.topology(),d=this.pathStyle(),e=this.pathGenerator().call(this);if(e){a.set("d",e),a.visible(!0);var f=parseInt(d["stroke-width"],10)||1;a.dom().setStyle("stroke-width",f*c.stageScale())}}else a.visible(!1)},draw:function(){this._draw()}}})}(nx,nx.global),function(a){a.util;a.define("nx.graphic.Topology.PathLayer",a.graphic.Topology.Layer,{properties:{paths:{value:function(){return[]}}},methods:{attach:function(){this.attach.__super__.apply(this,arguments);var a=this.topology();a.on("zoomend",this._draw,this),a.watch("revisionScale",this._draw,this)},_draw:function(){a.each(this.paths(),function(a){a.draw()})},addPath:function(a){this.paths().push(a),a.topology(this.topology()),a.attach(this),a.draw()},removePath:function(a){this.paths().splice(this.paths().indexOf(a),1),a.dispose()},clear:function(){a.each(this.paths(),function(a){a.dispose()}),this.paths([]),this.inherited()},dispose:function(){this.clear();var a=this.topology();a.off("zoomend",this._draw,this),a.unwatch("revisionScale",this._draw,this),this.inherited()}}})}(nx,nx.global),function(a){a.define("nx.graphic.Topology.Nav",a.ui.Component,{properties:{topology:{get:function(){return this.owner()}},scale:{},showIcon:{value:!1},visible:{get:function(){return void 0!==this._visible?this._visible:!0},set:function(a){this.view().dom().setStyle("display",a?"":"none"),this.view().dom().setStyle("pointer-events",a?"all":"none"),this._visible=a}}},view:{props:{"class":"n-topology-nav"},content:[{name:"icons",tag:"ul",content:[{tag:"li",content:{name:"mode",tag:"ul",props:{"class":"n-topology-nav-mode"},content:[{name:"selectionMode",tag:"li",content:{props:{"class":"n-icon-selectnode",title:"Select node mode"},tag:"span"},events:{mousedown:"{#_switchSelectionMode}",touchstart:"{#_switchSelectionMode}"}},{name:"moveMode",tag:"li",props:{"class":"n-topology-nav-mode-selected"},content:{props:{"class":"n-icon-movemode",title:"Move mode"},tag:"span"},events:{mousedown:"{#_switchMoveMode}",touchstart:"{#_switchMoveMode}"}}]}},{tag:"li",props:{"class":"n-topology-nav-zoom"},content:[{name:"zoomin",tag:"span",props:{"class":"n-topology-nav-zoom-in n-icon-zoomin-plus",title:"Zoom out"},events:{touchend:"{#_in}"}},{name:"zoomout",tag:"span",props:{"class":"n-topology-nav-zoom-out n-icon-zoomout-minus",title:"Zoom in"},events:{touchend:"{#_out}"}}]},{tag:"li",name:"zoomselection",props:{"class":"n-topology-nav-zoom-selection n-icon-zoombyselection",title:"Zoom by selection"},events:{click:"{#_zoombyselection}",touchend:"{#_zoombyselection}"}},{tag:"li",name:"fit",props:{"class":"n-topology-nav-fit n-icon-fitstage",title:"Fit stage"},events:{click:"{#_fit}",touchend:"{#_fit}"}},{tag:"li",name:"agr",props:{"class":"n-topology-nav-agr n-icon-aggregation",title:"Aggregation"},events:{click:"{#_agr}",touchend:"{#_agr}"}},{tag:"li",name:"fullscreen",props:{"class":"n-topology-nav-full n-icon-fullscreen",title:"Enter full screen mode"},events:{click:"{#_full}",touchend:"{#_full}"}},{tag:"li",name:"setting",content:[{name:"icon",tag:"span",props:{"class":"n-topology-nav-setting-icon n-icon-viewsetting"},events:{mouseenter:"{#_openPopover}",mouseleave:"{#_closePopover}"}},{name:"settingPopover",type:"nx.ui.Popover",props:{title:"Topology Setting",direction:"right",lazyClose:!0},content:[{tag:"h5",content:"Display icons as dots :"},{tag:"label",content:[{tag:"input",props:{type:"radio",checked:"{#showIcon,converter=inverted,direction=<>}"}},{tag:"span",content:"Always"}],props:{"class":"radio-inline"}},{tag:"label",content:[{tag:"input",props:{type:"radio",checked:"{#showIcon,direction=<>}"}},{tag:"span",content:"Auto-resize"}],props:{"class":"radio-inline"}},{name:"displayLabelSetting",tag:"h5",content:[{tag:"span",content:"Display Label : "},{tag:"input",props:{"class":"toggleLabelCheckBox",type:"checkbox",checked:!0},events:{click:"{#_toggleNodeLabel}",touchend:"{#_toggleNodeLabel}"}}]},{tag:"h5",content:"Theme :"},{props:{"class":"btn-group"},content:[{tag:"button",props:{"class":"btn btn-default",value:"blue"},content:"Blue"},{tag:"button",props:{"class":"btn btn-default",value:"green"},content:"Green"},{tag:"button",props:{"class":"btn btn-default",value:"dark"},content:"Dark"},{tag:"button",props:{"class":"btn btn-default",value:"slate"},content:"Slate"},{tag:"button",props:{"class":"btn btn-default",value:"yellow"},content:"Yellow"}],events:{click:"{#_switchTheme}",touchend:"{#_switchTheme}"}},{name:"customize"}],events:{open:"{#_openSettingPanel}",close:"{#_closeSettingPanel}"}}],props:{"class":"n-topology-nav-setting"}}]}]},methods:{init:function(a){this.inherited(a),this.view("settingPopover").view().dom().addClass("n-topology-setting-panel"),window.top.frames.length&&this.view("fullscreen").style().set("display","none")},attach:function(a){this.inherited(a);var b=this.topology();b.watch("scale",function(a,c){var d=b.maxScale(),e=b.minScale(),f=this.view("zoomball").view(),g=65/(d-e);f.setStyles({top:72-(c-e)*g+14})},this),b.selectedNodes().watch("count",function(a,b){this.view("agr").dom().setStyle("display",b>1?"block":"none")},this),b.watch("currentSceneName",function(a,b){"selection"==b?(this.view("selectionMode").dom().addClass("n-topology-nav-mode-selected"),this.view("moveMode").dom().removeClass("n-topology-nav-mode-selected")):(this.view("selectionMode").dom().removeClass("n-topology-nav-mode-selected"),this.view("moveMode").dom().addClass("n-topology-nav-mode-selected"))},this),this.view("agr").dom().setStyle("display","none")},_switchSelectionMode:function(){var a=this.topology(),b=a.currentSceneName();"selection"!=b&&(a.activateScene("selection"),this._prevSceneName=b)},_switchMoveMode:function(){var a=this.topology(),b=a.currentSceneName();"selection"==b&&(a.activateScene(this._prevSceneName||"default"),this._prevSceneName=null)},_fit:function(a){this._fitTimer||(this.topology().fit(),a.dom().setStyle("opacity","0.1"),this._fitTimer=!0,setTimeout(function(){a.dom().setStyle("opacity","1"),this._fitTimer=!1}.bind(this),1200))},_zoombyselection:function(a){var b=a,c=this.topology(),d=c.currentSceneName();if("zoomBySelection"==d)b.dom().removeClass("n-topology-nav-zoom-selection-selected"),c.activateScene("default");else{var e=c.activateScene("zoomBySelection");e.upon("finish",function f(a,g){g&&c.zoomByBound(c.getInsideBound(g)),c.activateScene(d),b.dom().removeClass("n-topology-nav-zoom-selection-selected"),e.off("finish",f,this)},this),b.dom().addClass("n-topology-nav-zoom-selection-selected")}},_in:function(a,b){var c=this.topology();c.stage().zoom(1.2,c.adjustLayout,c),b.preventDefault()},_out:function(a,b){var c=this.topology();c.stage().zoom(.8,c.adjustLayout,c),b.preventDefault()},_full:function(a,b){this.toggleFull(b.target)},_enterSetting:function(){this.view("setting").addClass("n-topology-nav-setting-open")},_leaveSetting:function(){this.view("setting").removeClass("n-topology-nav-setting-open")},cancelFullScreen:function(a){var b=a.cancelFullScreen||a.webkitCancelFullScreen||a.mozCancelFullScreen||a.exitFullscreen;if(b)b.call(a);else if("undefined"!=typeof window.ActiveXObject){var c=new ActiveXObject("WScript.Shell");null!==c&&c.SendKeys("{F11}")}},requestFullScreen:function(){return document.body.webkitRequestFullscreen.call(document.body),!1},toggleFull:function(){var a=document.body,b=document.fullScreenElement&&null!==document.fullScreenElement||document.mozFullScreen||document.webkitIsFullScreen;return b?(this.cancelFullScreen(document),this.fire("leaveFullScreen")):(this.requestFullScreen(a),this.fire("enterFullScreen")),!1},_openPopover:function(a){this.view("settingPopover").open({target:a.dom(),offsetY:3}),this.view("icon").dom().addClass("n-topology-nav-setting-icon-selected")},_closePopover:function(){this.view("settingPopover").close()},_closeSettingPanel:function(){this.view("icon").dom().removeClass("n-topology-nav-setting-icon-selected")},_togglePopover:function(){var a=this.view("settingPopover");a._closed?a.open():a.close()},_switchTheme:function(a,b){this.topology().theme(b.target.value)},_toggleNodeLabel:function(b){var c=b.get("checked");this.topology().eachNode(function(a){a.labelVisibility(c)}),a.graphic.Topology.NodesLayer.defaultConfig.labelVisibility=c,a.graphic.Topology.NodeSetLayer.defaultConfig.labelVisibility=c},_agr:function(){var a=this.topology(),b=a.selectedNodes().toArray();a.selectedNodes().clear(),a.aggregationNodes(b)}}})}(nx,nx.global); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/bower.json b/vbd/gui/module/src/main/resources/vpp/bower.json deleted file mode 100644 index f317fb1ae..000000000 --- a/vbd/gui/module/src/main/resources/vpp/bower.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "odl-vpp-ui", - "description": "Opendaylight VPP UI", - "main": "main.js", - "authors": [ - "Varun Seereeram", - "Chris Metz", - "Dave Wallace", - "Daniel Malachovsky" - ], - "license": "ISC", - "keywords": [ - "open-vpp" - ], - "moduleType": [ - "node" - ], - "homepage": "", - "private": true, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "angular-animate": "^1.3.0 || >1.4.0-beta.0", - "angular-aria": "^1.3.15 || >1.4.0-beta.0", - "angular-material": "~0.11.4", - "angular-smart-table": "~2.1.7" - }, - "resolutions": { - "angular": "1.4.9" - } -} diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.bridgedomain.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/bdm.bridgedomain.controller.js deleted file mode 100644 index ea65afbc9..000000000 --- a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.bridgedomain.controller.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - - -define(['app/vpp/vpp.module'], function(vpp) { - - vpp.register.controller('bdmBridgeDomainCtrl', ['$scope', '$rootScope', '$timeout' ,'dataService', 'toastService', '$mdSidenav', '$mdDialog', - function ($scope, $rootScope, $timeout ,dataService, toastService, $mdSidenav, $mdDialog) { - - }]); - - -}); diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js deleted file mode 100644 index f88162ef6..000000000 --- a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.controller.js +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.controller('bdmCtrl', ['$scope', '$rootScope','$filter', 'dataService', 'toastService', function ($scope, $rootScope, filter, dataService, toastService) { - - }]); - - vpp.register.controller('TableController', ['$scope', '$rootScope','$filter', 'dataService', 'toastService', 'bdmInterfaceService', - function ($scope, $rootScope, filter, dataService, toastService, bdmInterfaceService) { - $scope.interfaceList = []; - $scope.unassignedInterfaceList = []; - $scope.assignedInterfaces = []; - - var vm = this; - - vm.updateAssignment = function(receivedInterface) { - if (receivedInterface.assigned){ - receivedInterface.vbdName = $scope.selectedBd['topology-id']; - vm.assignInterface($scope.selectedBd, receivedInterface); - - } else { - vm.unassignInterface(receivedInterface); - } - }; - - vm.assignInterface = function(bridgeDomain, interface) { - var interfaceObject = bdmInterfaceService.createObj(interface['tp-id'], interface['tp-id']); - - var successCallback = function() { - toastService.showToast('Interface assigned'); - $scope.assignedInterfaces.push(interface); - - $scope.$emit('INTERFACE_CHANGED', interface); - }; - - var errorCallback = function() { - toastService.showToast('Unable to assign interface'); - }; - - bdmInterfaceService.add(interfaceObject, bridgeDomain['topology-id'], interface.vppName, successCallback, errorCallback); - }; - - vm.unassignInterface = function(interface) { - var interfaceObject = bdmInterfaceService.createObj(interface['tp-id'], interface['tp-id']); - - var successCallback = function() { - toastService.showToast('Interface unassigned'); - $scope.assignedInterfaces.splice($scope.assignedInterfaces.indexOf(interface), 1); - interface.vbdName = ''; - - $scope.$emit('INTERFACE_CHANGED', interface); - }; - - var errorCallback = function() { - toastService.showToast('Unable to unassign interface'); - }; - - bdmInterfaceService.delete(interfaceObject, interface.vbdName, interface.vppName, successCallback, errorCallback); - - }; - - $scope.$on('BUILD_INTERFACES_TABLE', function(event) { - $scope.interfaceList = []; - $scope.unassignedInterfaceList = []; - $scope.assignedInterfaces = $scope.getAssignedInterfaces(); - - $scope.assignedInterfacesFlat = []; - - var getAssignedInterfacesFlat = function() { - var keys = Object.keys($scope.assignedInterfaces); - - if(keys.length) { - keys.forEach(function (k) { - if($scope.assignedInterfaces[k]) { - $scope.assignedInterfaces[k].forEach(function(ai) { - checkAndPushIntoArray($scope.assignedInterfacesFlat, ai); - }); - } - }); - } - }; - - var checkAndPushIntoArray = function(array, item) { - var check = array.some(function(i) { - return i['tp-id'] === item['tp-id'] && i.vppName === item.vppName; - }); - - if(!check) { - array.push(item); - } - }; - - getAssignedInterfacesFlat(); - - dataService.vpps.forEach(function(vpp){ - vpp.interfaces.forEach(function(interface){ - var interfaceObject = bdmInterfaceService.createObj(interface.name, interface.name); - - var check = $scope.assignedInterfacesFlat.some(function (ai) { - return interfaceObject['tp-id'] === ai['tp-id'] && vpp.name === ai.vppName; - }); - - if(!check) { - interfaceObject.vppName = vpp.name; - checkAndPushIntoArray($scope.unassignedInterfaceList, interfaceObject); - } - }); - }); - - if($scope.selectedBd) { - $scope.interfaceList = $scope.assignedInterfaces[$scope.selectedBd['topology-id']] ? $scope.assignedInterfaces[$scope.selectedBd['topology-id']].concat($scope.unassignedInterfaceList) : $scope.unassignedInterfaceList; - } - - $scope.interfaceDisplayList = [].concat($scope.interfaceList); - }); - - $scope.$on('INIT_INTERFACES_TABLE', function(event) { - $scope.interfaceList = []; - $scope.unassignedInterfaceList = []; - $scope.assignedInterfaces = []; - $scope.assignedInterfacesFlat = []; - }); - - - - }]); - - vpp.register.controller('BridgeDomainsController', ['$scope', '$rootScope','$filter', 'dataService', 'bdmBridgeDomainService', 'toastService', '$mdDialog', 'bdmTunnelService', - function($scope, $rootScope, $filter, dataService, bdmBridgeDomainService, toastService, $mdDialog, bdmTunnelService) { - $scope.bridgeDomainList = []; - $scope.showOverlay = true; - - $scope.loadBridgeDomains = function(bridgeDomain, successCallback) { - bdmBridgeDomainService.get(function(data) { - $scope.bridgeDomainList = data; - - if(bridgeDomain) { - $scope.selectedBd = $scope.bridgeDomainList.filter(function(bd) { - return bd['topology-id'] === bridgeDomain['topology-id']; - })[0]; - - $scope.showTopology($scope.selectedBd); - } - - successCallback(); - - }, function(data,status) { - //error callback - console.log(status); - }); - }; - - $scope.getInterfacesForBridgeDomain = function(bridgeDomain) { - var interfaceList = []; - - if(bridgeDomain.node) { - bridgeDomain.node.forEach(function (n) { - if (n['termination-point']) { - n['termination-point'].forEach(function (tp) { - tp.vppName = n['node-id']; - tp.vbdName = bridgeDomain['topology-id']; - tp.assigned = true; - - interfaceList.push(tp); - }); - } - }); - } - - return interfaceList; - }; - - $scope.getAssignedInterfaces = function() { - var interfaces = []; - - $scope.bridgeDomainList.forEach(function(bd) { - var bdCopy = {}; - angular.copy(bd, bdCopy); - - interfaces[bdCopy['topology-id']] = $scope.getInterfacesForBridgeDomain(bdCopy); - }); - - return interfaces; - }; - - $scope.addBd = function() { - //show dialog - $mdDialog.show({ - controller: function() { - var vm = this; - vm.bd = {}; - vm.waiting = false; - - //function called when the cancel button ( 'x' in the top right) is clicked - vm.close = function() { - $mdDialog.cancel(); - }; - - vm.isDone = function(status, bridgeDomain) { - vm.waiting = false; - if (status === 'success') { - $scope.reload(bridgeDomain); - vm.close(); - } - }; - - //function called when the update button is clicked - vm.updateConfig = function() { - vm.waiting = true; - //send a POST with the entered content in the form field - - var obj = bdmBridgeDomainService.createObj(vm.bd.name); - - bdmBridgeDomainService.add(obj, - function(data) { - vm.isDone('success', obj); - }, - function() { - vm.isDone('failed'); - }); - - }; - }, - controllerAs: 'NewBdDialogCtrl', - templateUrl: $scope.view_path + 'new-bd-dialog.html', - parent: angular.element(document.body), - clickOutsideToClose:false - }) - }; - - $scope.removeBd = function() { - if($scope.selectedBd['topology-id']) { - var successCallback = function(success) { - $scope.selectedBd = null; - $scope.loadBridgeDomains(null, function() { - $scope.$broadcast('INIT_INTERFACES_TABLE'); - $scope.clearTopologies(); - }); - - }; - bdmBridgeDomainService.remove($scope.selectedBd['topology-id'], function(){successCallback(true)}, function(){successCallback(false)}); - } - }; - - $scope.bdChanged = function() { - $scope.loadBridgeDomains($scope.selectedBd, function() { - $scope.$broadcast('BUILD_INTERFACES_TABLE'); - - $scope.showTopology($scope.selectedBd); - }); - - }; - - nx.graphic.Icons.registerIcon("bd", "src/app/vpp/assets/images/bd1.svg", 45, 45); - nx.graphic.Icons.registerIcon("interf", "src/app/vpp/assets/images/interf.svg", 45, 45); - - $scope.showOverlayTopology = function(bridgeDomain) { - var bdCopy = {}; - angular.copy(bridgeDomain, bdCopy); - - $scope.bridgeDomainsTopo = new nx.graphic.Topology({ - adaptive: true, - scalable: true, - theme: 'blue', - enableGradualScaling: true, - nodeConfig: { - color: '#414040', - label: 'model.label', - scale: 'model.scale', - iconType: function (vertex) { - var type = vertex.get().type; - if (type === 'bd') { - return 'bd' - } else { - return 'interf'; - } - } - }, - linkConfig: { - label: 'model.label', - linkType: 'parallel', - color: function (link) { - if (link.getData().type === 'tunnel') { - return '#00FF00'; - } else { - return '#ffffff'; - } - }, - width: function (link) { - if (link.getData().type === 'tunnel') { - return 5; - } - } - }, - showIcon: true, - dataProcessor: 'force', - autoLayout: true, - enableSmartNode: false, - tooltipManagerConfig: { - nodeTooltipContentClass: 'TooltipNode', - linkTooltipContentClass: 'TooltipLink' - } - }); - - $scope.overlayNextApp = new nx.ui.Application; - - var bdNode = { - "data": bdCopy, - "type": "bd", - "label": bdCopy['topology-id'] - }; - - var nodes = [].concat(bdNode); - var links = []; - - _.forEach($scope.getInterfacesForBridgeDomain(bdCopy), function(tp, index){ - var ifNode = { - "data": tp, - "type": "interf", - "label": tp['tp-id'] - }; - nodes.push(ifNode); - links.push({source: 0, target: nodes.length-1}); - }); - - - $scope.bridgeDomainsTopo.data({ - nodes: nodes, - links: links - }); - - $scope.overlayNextApp.container(document.getElementById('overlay-next-app')); - $scope.bridgeDomainsTopo.attach($scope.overlayNextApp); - }; - - $scope.fillOverlayTopology = function(bridgeDomain) { - var bdCopy = {}; - angular.copy(bridgeDomain, bdCopy); - - var bdNode = { - "data": bdCopy, - "type": "bd", - "label": bdCopy['topology-id'] - }; - - var nodes = [].concat(bdNode); - var links = []; - - _.forEach($scope.getInterfacesForBridgeDomain(bdCopy), function(tp, index){ - var ifNode = { - "data": tp, - "type": "interf", - "label": tp['tp-id'] - }; - nodes.push(ifNode); - links.push({source: 0, target: nodes.length-1}); - }); - - - $scope.bridgeDomainsTopo.data({ - nodes: nodes, - links: links - }); - - }; - - $scope.showUnderTopology = function(bridgeDomain) { - //var bdCopy = {}; - //angular.copy(bridgeDomain, bdCopy); - - $scope.underlayTopo = new nx.graphic.Topology({ - adaptive: true, - scalable: true, - theme:'blue', - enableGradualScaling:true, - nodeConfig: { - color: '#414040', - label: 'model.label', - scale: 'model.scale', - iconType: function(vertex) { - var type = vertex.get().type; - if (type === 'bd') { - return 'bd'; - } else if (type==='vpp') { - return 'switch'; - } else { - return 'interf'; - } - } - }, - linkConfig: { - label: 'model.label', - linkType: 'parallel', - color: function(link) { - if (link.getData().type === 'tunnel') { - return '#00FF00'; - } else { - return '#ffffff'; - } - }, - width: function(link) { - if (link.getData().type === 'tunnel') { - return 5; - } - } - }, - showIcon: true, - enableSmartNode: false - }); - - $scope.underlayNextApp = new nx.ui.Application; - - $scope.fillUnderlayTopology(bridgeDomain); - - $scope.underlayNextApp.container(document.getElementById('underlay-next-app')); - $scope.underlayTopo.attach($scope.underlayNextApp); - }; - - $scope.fillUnderlayTopology = function(bridgeDomain) { - var bdCopy = {}; - angular.copy(bridgeDomain, bdCopy); - - var nodes = []; - var links = []; - - _.forEach(bdCopy.node, function(node, index){ - var i = index + 1; - - nodes.push({ - label: node['node-id'], - x: (-1+(2*(i%2)))*((i+1)/2 * 500), - y: 700, - scale: 1.25, - type: 'vpp' - }); - - - bdmTunnelService.get( - bdCopy['topology-id'], - function(data) { - //success - console.log(data); - - var link = data; - var sourceNode = link[0].source['source-node']; - var targetNode = link[0].destination['dest-node']; - - links.push({ - source: _.findIndex(nodes, {label: sourceNode, type: 'vpp'}), - target: _.findIndex(nodes, {label: targetNode, type: 'vpp'}), - type: 'tunnel' - }); - - $scope.underlayTopo.data({ - nodes: nodes, - links: links - }); - - }, function(res) { - $scope.underlayTopo.data({ - nodes: nodes, - links: links - }); - }); - }); - - - $scope.underlayTopo.data({ - nodes: nodes, - links: links - }); - }; - - $scope.reload = function(bridgeDomain) { - $scope.loadBridgeDomains(bridgeDomain, function() { - $scope.$broadcast('BUILD_INTERFACES_TABLE'); - - $scope.showTopology($scope.selectedBd); - }); - - }; - - $scope.toggleUnderlay = function() { - $scope.showOverlay = !$scope.showOverlay; - - $scope.reload($scope.selectedBd); - }; - - $scope.showTopology = function(bridgeDomain) { - if($scope.showOverlay) { - if(!$scope.bridgeDomainsTopo) { - $scope.showOverlayTopology(bridgeDomain); - } - else { - $scope.fillOverlayTopology(bridgeDomain); - } - } else { - if(!$scope.underlayTopo) { - $scope.showUnderTopology(bridgeDomain); - } - else { - $scope.fillUnderlayTopology(bridgeDomain); - } - } - }; - - $scope.clearTopologies = function() { - if($scope.bridgeDomainsTopo) { - $scope.bridgeDomainsTopo.data({ - nodes: [], - links: [] - }); - } - - if($scope.bridgeDomainsTopo) { - $scope.underlayTopo.data({ - nodes: [], - links: [] - }); - } - }; - - $scope.$on('INTERFACE_CHANGED', function(event, data) { - bdmBridgeDomainService.getOne($scope.selectedBd['topology-id'], - function(bdData) { - $scope.fillOverlayTopology(bdData); - }, - function() { - console.log('error getting vbd'); - }); - }); - - $scope.loadBridgeDomains(null, function() {}); - }]); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.interface.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/bdm.interface.controller.js deleted file mode 100644 index 5aa68a9dc..000000000 --- a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.interface.controller.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -define(['app/vpp/vpp.module'], function(vpp) { - - vpp.register.controller('bdmInterfaceCtrl', ['$scope', '$rootScope', '$timeout' ,'dataService', 'toastService', '$mdSidenav', '$mdDialog', - function ($scope, $rootScope, $timeout ,dataService, toastService, $mdSidenav, $mdDialog) { - - }]); - - -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.vpp.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/bdm.vpp.controller.js deleted file mode 100644 index 44a4b0cf2..000000000 --- a/vbd/gui/module/src/main/resources/vpp/controllers/bdm.vpp.controller.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.controller('bdmCtrl', ['$scope', '$rootScope','$filter', 'dataService', 'toastService', function ($scope, $rootScope, filter, dataService, toastService) { - - }]); - -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js deleted file mode 100644 index 6d994c152..000000000 --- a/vbd/gui/module/src/main/resources/vpp/controllers/inventory.controller.js +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -define(['app/vpp/vpp.module'], function(vpp) { - - vpp.register.controller('InventoryTableController', ['$scope', '$rootScope','$filter', 'toastService', 'VppService', '$mdDialog', 'dataService', - function($scope, $rootScope, filter, toastService, VppService, $mdDialog, dataService) { - - $scope.getVppList = function() { - $scope.initVppList(); - - VppService.getVppList( - // success callback - function(data) { - $scope.vppList = data; - $scope.displayVppList = [].concat($scope.vppList); - dataService.vpps = $scope.vppList; - - $scope.$broadcast('RELOAD_VPP_TABLE'); - - //for vppList access in BDM - dataService.vpps = $scope.vppList; - }, - // error callback - function(res) { - console.warn("Can't load VPPs from controller. Nothing is mounted, or other error", res); - } - ); - }; - - $scope.initVppList = function() { - $scope.vppList = []; - $scope.displayVppList = []; - }; - - $scope.addVppShowForm = function() { - $mdDialog.show({ - controller: function() { - var vm = this; - vm.vpp = {}; - //function called when the cancel button ( 'x' in the top right) is clicked - vm.close = function() { - $mdDialog.cancel(); - }; - - vm.finished = function(successful) { - if (successful) { - vm.close(); - vm.waiting = false; - toastService.showToast('New VPP added!'); - $scope.getVppList(); - } else { - vm.waiting = false; - toastService.showToast('Error adding new VPP'); - } - }; - - //function called when the update button is clicked - vm.updateConfig = function() { - vm.waiting = true; - VppService.mountVpp(vm.vpp.name, vm.vpp.ip, vm.vpp.port, vm.vpp.un, vm.vpp.pw, vm.finished); - }; - }, - controllerAs: 'NewVppDialogCtrl', - templateUrl: $scope.view_path + 'new-vpp-dialog.html', - parent: angular.element(document.body), - clickOutsideToClose:false - }) - }; - - $scope.editVppShowForm = function(vppObject) { - - $mdDialog.show({ - controller: function() { - var vm = this; - - vm.vpp = { - name: vppObject.name, - status: vppObject.status, - ip: vppObject.ipAddress, - port: vppObject.port - }; - - //function called when the cancel button ( 'x' in the top right) is clicked - vm.close = function() { - $mdDialog.cancel(); - }; - - vm.finishedUpdating = function(successful) { - if (successful) { - vm.close(); - vm.waiting = false; - toastService.showToast('VPP configuration updated!'); - $scope.getVppList(); - } else { - vm.waiting = false; - toastService.showToast('Error configuring VPP'); - } - }; - - vm.finishedDeleting = function(successful) { - if (successful) { - VppService.mountVpp(vm.vpp.name, vm.vpp.ip, vm.vpp.port, vm.vpp.un, vm.vpp.pw, vm.finishedUpdating); - $scope.getVppList(); - } else { - vm.waiting = false; - toastService.showToast('Error configuring VPP'); - } - }; - - //function called when the update button is clicked - vm.updateConfig = function() { - //VppService.editVpp(vm.vpp.name, vm.vpp.ip, vm.vpp.port, vm.vpp.un, vm.vpp.pw, vm.finishedUpdating); - VppService.deleteVpp(vm.vpp, vm.finishedDeleting); - }; - }, - controllerAs: 'ConfigVppDialogCtrl', - templateUrl: $scope.view_path + 'config-vpp-dialog.html', - parent: angular.element(document.body), - clickOutsideToClose:true - }); - }; - - $scope.deleteVpp = function(vppObject) { - - var finished = function(successful) { - if (successful) { - toastService.showToast('Removed VPP!'); - $scope.getVppList(); - } else { - toastService.showToast('Error removing VPP'); - } - }; - - VppService.deleteVpp(vppObject, finished); - }; - - $scope.getVppList(); - }]); - - vpp.register.controller('InventoryDetailController', ['$scope', '$rootScope','$filter', 'toastService', 'dataService', - function($scope, $rootScope, filter, toastService, dataService) { - $scope.displayInterfaceList = [].concat($scope.selectedVpp.interfaces); - $scope.vppList = dataService.vpps; - - $scope.viewTopology = function(vpp) { - - var vm = this; - - $scope.topo = new nx.graphic.Topology({ - height: 400, - width: 800, - scalable: true, - theme:'blue', - enableGradualScaling:true, - nodeConfig: { - color: '#ffffff', - label: 'model.label', - scale: 'model.scale', - iconType: function(vertex) { - var type = vertex.get().type; - if (type === 'bd') { - return 'bd' - } else if (type === 'vpp') { - return 'switch' - } else { - return 'interf'; - } - } - }, - linkConfig: { - label: 'model.label', - linkType: 'parallel', - color: function(link) { - if (link.getData().type === 'tunnel') { - return '#ffffff'; - } else { - return '#ffffff'; - } - }, - width: function(link) { - if (link.getData().type === 'tunnel') { - return 5; - } - } - }, - showIcon: true, - dataProcessor: 'force', - autoLayout: true, - enableSmartNode: false, - tooltipManagerConfig: { - nodeTooltipContentClass: 'TooltipNode', - linkTooltipContentClass: 'TooltipLink' - } - }); - $scope.app = new nx.ui.Application; - - vm.vpp = vpp; - vm.vpp.type = 'vpp'; - vm.vpp.label = vm.vpp.name; - - var nodes = [].concat(vm.vpp); - var links = []; - - _.forEach(vm.vpp.interfaces, function(interf, index){ - interf.label = interf.name; - interf.scale = 0.5; - nodes.push(interf); - links.push({source: 0, target: index + 1}); - }); - - $scope.topo.data({ - nodes: nodes, - links: links - }); - - $scope.app.container(document.getElementById('next-vpp-topo')); - $scope.topo.attach($scope.app); - - }; - - $scope.fillTopologyData = function(vpp) { - var nodes = [].concat(vpp); - var links = []; - vpp.type = 'vpp'; - vpp.label = vpp.name; - - _.forEach(vpp.interfaces, function(interf, index){ - interf.label = interf.name; - interf.scale = 0.5; - nodes.push(interf); - links.push({source: 0, target: index + 1}); - }); - - $scope.topo.data({ - nodes: nodes, - links: links - }); - }; - - $scope.$watch('selectedVpp', function() { - $scope.fillTopologyData($scope.selectedVpp); - }); - - $scope.viewTopology($scope.selectedVpp); - - }]); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js b/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js deleted file mode 100644 index 5bd2c955e..000000000 --- a/vbd/gui/module/src/main/resources/vpp/controllers/vpp.controller.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -var modules = [ - // module - 'app/vpp/vpp.module', - // services - 'app/vpp/services/vpp.services', - 'app/vpp/services/inventory.service', - 'app/vpp/services/bdm.service', - 'app/vpp/services/bdm.bridgedomain.service', - 'app/vpp/services/bdm.interface.service', - 'app/vpp/services/bdm.vpp.service', - 'app/vpp/services/bdm.tunnel.service', - //controllers - 'app/vpp/controllers/inventory.controller', - 'app/vpp/controllers/bdm.controller', - 'app/vpp/controllers/bdm.bridgedomain.controller', - 'app/vpp/controllers/bdm.vpp.controller', - 'app/vpp/controllers/bdm.interface.controller' -]; - - -define(modules, function(vpp) { - - vpp.controller('vppCtrl', ['$scope', '$rootScope', '$timeout', 'toastService', '$mdSidenav', '$mdDialog', - function ($scope, $rootScope, $timeout, toastService, $mdSidenav, $mdDialog) { - - $rootScope['section_logo'] = 'src/app/vpp/assets/images/vpp.gif'; - $scope.view_path = 'src/app/vpp/views/'; - - $scope.mainView = "inventory"; - $scope.selectedVpp = null; - - $scope.setMainView = function(viewName) { - $scope.mainView = viewName; - }; - - $scope.selectVpp = function(vpp) { - $scope.selectedVpp = vpp; - $scope.$broadcast('RELOAD_SELECTED_VPP'); - }; - - // filter used in inventory to filter interfaceList of vxlan_tunnel interfaces - $scope.filterRemoveVxlanIf = function (item) { - return (item.name && item.name.indexOf('vxlan') !== 0) || (item['tp-id'] && item['tp-id'].indexOf('vxlan') !== 0); - }; - - // filter used in inventory to return vxlan_tunnel interfaces - $scope.filterGetVxlanIf = function (item) { - return (item.name && item.name.indexOf('vxlan') === 0) || (item['tp-id'] && item['tp-id'].indexOf('vxlan') === 0); - }; - - }]); - - -}); - - diff --git a/vbd/gui/module/src/main/resources/vpp/main.js b/vbd/gui/module/src/main/resources/vpp/main.js deleted file mode 100644 index cbeb1f692..000000000 --- a/vbd/gui/module/src/main/resources/vpp/main.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -require.config({ - paths : { - 'angular-material' : 'app/vpp/bower_components/angular-material/angular-material.min', - 'angular-animate' : 'app/vpp/bower_components/angular-animate/angular-animate.min', - 'angular-aria' : 'app/vpp/bower_components/angular-aria/angular-aria.min', - 'angular-smart-table' : 'app/vpp/bower_components/angular-smart-table/dist/smart-table', - 'lodash' : 'app/vpp/assets/js/lodash.min', - 'next': 'app/vpp/assets/js/next', - 'angular-ui-grid': 'app/vpp/bower_components/angular-ui-grid/ui-grid.min', - }, - - shim : { - 'angular-material' : ['angular'], - 'angular-animate' : ['angular'], - 'angular-aria' : ['angular'], - 'angular-smart-table' : ['angular'], - 'angular-ui-grid' : ['angular'], - 'lodash' : {exports: '_'} - }, - -}); - -define(['app/vpp/vpp.module']); diff --git a/vbd/gui/module/src/main/resources/vpp/node/node b/vbd/gui/module/src/main/resources/vpp/node/node deleted file mode 100755 index f11f22468..000000000 Binary files a/vbd/gui/module/src/main/resources/vpp/node/node and /dev/null differ diff --git a/vbd/gui/module/src/main/resources/vpp/package.json b/vbd/gui/module/src/main/resources/vpp/package.json deleted file mode 100644 index 3909fb8e0..000000000 --- a/vbd/gui/module/src/main/resources/vpp/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "odl-vpp", - "version": "1.0.0", - "description": "Opendaylight VPP UI", - "main": "main.js", - "devDependencies": { - "bower": "~1.3.12" - }, - "repository": { - "type": "git", - "url": "git clone https://gerrit.fd.io/r/honeycomb" - }, - "author": "Varun Seereeram, Chris Metz, John Burns, Dave Wallace, Daniel Malachovsky", - "license": "ISC", - "keywords": [ - "odl-vpp" - ] -} diff --git a/vbd/gui/module/src/main/resources/vpp/services/bdm.bridgedomain.service.js b/vbd/gui/module/src/main/resources/vpp/services/bdm.bridgedomain.service.js deleted file mode 100644 index e0fcee68f..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/bdm.bridgedomain.service.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.factory('bdmBridgeDomainService', function(VPPRestangular) { - var s = {}; - - var BridgeDomain = function(topologyId) { - this['topology-id'] = topologyId || null; - this['topology-types'] = { - 'vbridge-topology:vbridge-topology': {} - }; - this['underlay-topology'] = [ - { - 'topology-ref': 'topology-netconf' - } - ]; - this['vbridge-topology:tunnel-type'] = 'tunnel-type-vxlan'; - this['vbridge-topology:vxlan'] = { - 'vni': '1' - }; - this['vbridge-topology:flood'] = "true", - this['vbridge-topology:forward'] = "true", - this['vbridge-topology:learn'] = "true", - this['vbridge-topology:unknown-unicast-flood'] = "true", - this['vbridge-topology:arp-termination'] = "false" - }; - - s.createObj = function(topologyId) { - return new BridgeDomain(topologyId); - }; - - s.add = function(bridgeDomain, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomain['topology-id']); - var dataObj = {'topology': [bridgeDomain]}; - - restObj.customPUT(dataObj).then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.get = function(successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology'); - var bridgeDomainList = []; - - restObj.get().then(function(data) { - if(data['network-topology'].topology) { - bridgeDomainList = data['network-topology'].topology.filter(function (topology) { - if (topology['topology-types'] && topology['topology-types']['vbridge-topology:vbridge-topology']) { - return topology['topology-types']['vbridge-topology:vbridge-topology'] !== undefined; - } - }); - } - successCallback(bridgeDomainList); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.getOne = function(bdId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bdId); - - restObj.get().then(function(data) { - successCallback(data.topology[0]); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.remove = function(bdName,successCallback,errorCallback) { - //http://localhost:8181/restconf/config/network-topology:network-topology/topology/testBD - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bdName); - - restObj.remove().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - return s; - }); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/services/bdm.interface.service.js b/vbd/gui/module/src/main/resources/vpp/services/bdm.interface.service.js deleted file mode 100644 index 5fc907b7f..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/bdm.interface.service.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.factory('bdmInterfaceService', function(VPPRestangular, bdmVppService) { - var s = {}; - - var Interface = function(tpId, interfaceName) { - this['tp-id'] = tpId || null; - this['vbridge-topology:user-interface'] = interfaceName; - }; - - s.createObj = function(tpId, interfaceName) { - return new Interface(tpId, interfaceName); - }; - - s.add = function(interf, bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology') - .one('topology').one(bridgeDomainId).one('node').one(vppId).one('termination-point').one(encodeURIComponent(interf['tp-id'])); - - var dataObj = {'termination-point': [interf]}; - - var write = function() { - restObj.customPUT(dataObj).then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - var errorCallback = function() {}; - - bdmVppService.checkAndWriteVpp(bridgeDomainId, vppId, write, errorCallback); - - - }; - - s.delete = function(interf, bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology') - .one('topology').one(bridgeDomainId).one('node').one(vppId).one('termination-point').one(encodeURIComponent(interf['tp-id'])); - - restObj.remove().then(function(data) { - bdmVppService.checkAndDeleteVpp(bridgeDomainId, vppId, - function() { - successCallback(data); - }, - function() { - - } - ); - - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.get = function(bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology') - .one('topology').one(bridgeDomainId).one('node').one(vppId); - - restObj.get().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - return s; - }); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/services/bdm.service.js b/vbd/gui/module/src/main/resources/vpp/services/bdm.service.js deleted file mode 100644 index 5d6592787..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/bdm.service.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module', 'next'], function(vpp) { - vpp.register.factory('bdmService', function(VPPRestangular, VPPRestangularXml) { - var s = {}; - - return s; - }); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/services/bdm.tunnel.service.js b/vbd/gui/module/src/main/resources/vpp/services/bdm.tunnel.service.js deleted file mode 100644 index 7c8f1492f..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/bdm.tunnel.service.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.factory('bdmTunnelService', function(VPPRestangular) { - var s = {}; - - s.get = function(bridgeDomainId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('operational').one('network-topology:network-topology') - .one('topology').one(bridgeDomainId); - - restObj.get().then(function(data) { - successCallback(data.topology[0].link); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - return s; - }); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js b/vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js deleted file mode 100644 index a86fa06fc..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/bdm.vpp.service.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module'], function(vpp) { - vpp.register.factory('bdmVppService', function(VPPRestangular) { - var s = {}; - - var Vpp = function(nodeId, vppId) { - this['node-id'] = nodeId || null; - this['supporting-node'] = [ - { - 'topology-ref': 'topology-netconf', - 'node-ref': vppId - } - ]; - this['netconf-node-topology:pass-through'] = {}; - }; - - s.createObj = function(nodeId, vppId) { - return new Vpp(nodeId, vppId); - }; - - s.add = function(vpp, bridgeDomainId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId).one('node').one(vpp['node-id']); - var dataObj = {'node': [vpp]}; - - restObj.customPUT(dataObj).then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.get = function(bridgeDomainId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId); - - return restObj.get().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.getOne = function(bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId).one('node').one(vppId); - - return restObj.get().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.delete = function(bridgeDomainId, vppId, successCallback, errorCallback) { - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one(bridgeDomainId).one('node').one(vppId); - - return restObj.remove().then(function(data) { - successCallback(data); - }, function(res) { - errorCallback(res.data, res.status); - }); - }; - - s.checkAndWriteVpp = function(bridgeDomainId, vppId, successCallback, errorCallback) { - s.getOne(bridgeDomainId, vppId, - function() { - successCallback(); - }, function() { - var vppObject = s.createObj(vppId, vppId); - - s.add(vppObject, bridgeDomainId, function() { - successCallback(); - }, function() { - errorCallback(); - }); - } - ); - }; - - s.checkAndDeleteVpp = function(bridgeDomainId, vppId, successCallback, errorCallback) { - s.getOne(bridgeDomainId, vppId, - function(data) { - if(!data['termination-point']) { - s.delete(bridgeDomainId, vppId, - function(){ - successCallback(); - }, - function() { - errorCallback(); - } - ); - } - }, - function() { - errorCallback(); - } - ); - }; - - return s; - }); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/services/inventory.service.js b/vbd/gui/module/src/main/resources/vpp/services/inventory.service.js deleted file mode 100644 index 6181ce678..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/inventory.service.js +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module', 'next'], function(vpp) { - vpp.register.factory('VppService', function(VPPRestangular, VPPRestangularXml, VppInterfaceService, $q) { - var s = {}; - - var Vpp = function(name, ipAddress, port, username, password, status) { - this.name = name || null; - this.ipAddress = ipAddress || null; - this.port = port || null; - this.username = username || null; - this.password = password || null; - this.status = status || null; - this.interfaces = []; - }; - - s.createObj = function(name, ipAddress, port, username, password, status) { - return new Vpp(name, ipAddress, port, username, password, status); - }; - - s.getVppList = function(successCallback, errorCallback) { - var vppList = []; - var promiseList = []; - var restObj = VPPRestangular.one('restconf').one('operational').one('network-topology:network-topology').one('topology').one('topology-netconf'); - - restObj.get().then(function(data) { - data.topology[0].node.forEach(function(n) { - if(n['node-id'] !== 'controller-config') { - //create new object - var vppObj = s.createObj(n['node-id'], n['netconf-node-topology:host'], n['netconf-node-topology:port'], null, null, n['netconf-node-topology:connection-status']); - // register a promise - if (vppObj.status === 'connected') { - var promise = VppInterfaceService.getInterfaceListByVppName(n['node-id'], - function (interfaceList) { - vppObj.interfaces = interfaceList; - }, - function (error) { } - ); - // add promise to array - promiseList.push(promise); - // when promise is resolved, push vpp into vppList - promise.then( - function () { - vppList.push(vppObj); - }, - function() { - console.warn('error'); - } - ) - } - else { - vppList.push(vppObj); - } - - } - }); - - // when all promises are resolved, call success callback - $q.all(promiseList).then(function () { - successCallback(vppList); - }); - }, function(res) { - errorCallback(res); - }); - }; - - s.deleteVpp = function(vpp, finishedSuccessfullyCallback) { - console.log(vpp); - var restObj = VPPRestangular.one('restconf').one('config').one('network-topology:network-topology').one('topology').one('topology-netconf').one('node').one('controller-config').one('yang-ext:mount').one('config:modules').one('module').one('odl-sal-netconf-connector-cfg:sal-netconf-connector').one(vpp.name); - - restObj.remove().then(function() { - finishedSuccessfullyCallback(true); - }, function(res) { - finishedSuccessfullyCallback(false); - }); - }; - - s.mountVpp = function(name,ip,port,un,pw,finishedSuccessfullyCallback) { - - var postData = '\ - \ - prefix:sal-netconf-connector\ - '+name+'\ -

'+ip+'
\ - '+port+'\ - '+un+'\ - '+pw+'\ - false\ - \ - prefix:netty-event-executor\ - global-event-executor\ - \ - \ - prefix:binding-broker-osgi-registry\ - binding-osgi-broker\ - \ - \ - prefix:dom-broker-osgi-registry\ - dom-broker\ - \ - \ - prefix:netconf-client-dispatcher\ - global-netconf-dispatcher\ - \ - \ - prefix:threadpool\ - global-netconf-processing-executor\ - \ - '; - - var restObj = VPPRestangularXml.one('restconf').one('config').one('opendaylight-inventory:nodes').one('node').one('controller-config').one('yang-ext:mount'); - - restObj.post('config:modules', postData).then(function() { - finishedSuccessfullyCallback(true); - }, function(res) { - finishedSuccessfullyCallback(false); - }); - }; - - return s; - }); - - vpp.register.factory('VppInterfaceService', function(VPPRestangular, $q) { - var s = {}; - - s.getInterfaceListByVppName = function(vppName, successCallback, errorCallback) { - var interfaceList = []; - var restObj = VPPRestangular.one('restconf').one('operational').one('network-topology:network-topology').one('topology').one('topology-netconf').one('node').one(vppName).one('yang-ext:mount').one('ietf-interfaces:interfaces-state'); - - return restObj.get().then( - function(data) { - if (data['interfaces-state'].interface) { - interfaceList = data['interfaces-state'].interface.filter(function(i) { - if (i.name != 'local0') { - return i; - } - }); - } - successCallback(interfaceList); - }, - function(res) { - errorCallback(res); - } - ); - }; - - return s; - }); -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/services/vpp.services.js b/vbd/gui/module/src/main/resources/vpp/services/vpp.services.js deleted file mode 100644 index 19cee135b..000000000 --- a/vbd/gui/module/src/main/resources/vpp/services/vpp.services.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['app/vpp/vpp.module', 'next'], function(vpp) { - - vpp.register.factory('VPPRestangular', function(Restangular, ENV) { - return Restangular.withConfig(function(RestangularConfig) { - RestangularConfig.setBaseUrl(ENV.getBaseURL("MD_SAL")); - }); - }); - - vpp.register.factory('VPPRestangularXml', function(Restangular, ENV) { - return Restangular.withConfig(function(RestangularConfig) { - RestangularConfig.setBaseUrl(ENV.getBaseURL("MD_SAL")); - RestangularConfig.setDefaultHeaders({ "Content-Type": "application/xml" }, { "Accept": "application/xml" }); - }); - }); - - vpp.register.service('toastService', function($mdToast) { - this.showToast = function(content) { - var toast = $mdToast.simple() - .content(content) - .action('OK') - .position('bottom right'); - $mdToast.show(toast); - } - }); - - vpp.register.service('dataService', ['$timeout', 'bdmTunnelService',function($timeout, bdmTunnelService) { - - var self = this; - - this.vpps = []; - this.interfaces = []; - this.selectedBd = { - name: '' - }; - - - }]); - - - -}); \ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/bridge-domains.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/bridge-domains.tpl.html deleted file mode 100644 index 91b9d0aa4..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/bridge-domains.tpl.html +++ /dev/null @@ -1,56 +0,0 @@ -
-
-
-
-

Overlay topology

- Show Underlay -
-
-
-

Underlay topology

- Show Overlay -
-
-
-
- - - - - {{bd['topology-id']}} - - - Add BD - Remove BD - - - - -
- - - - - - - - - - - -
-
- - - - - - -
AssignedVppInterface NameBridge Domain
- - - {{row.vppName}}{{row['tp-id']}}{{row.vbdName}}
-
-
-
-
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/config-interface-dialog.html b/vbd/gui/module/src/main/resources/vpp/views/config-interface-dialog.html deleted file mode 100644 index 2d7084b7c..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/config-interface-dialog.html +++ /dev/null @@ -1,38 +0,0 @@ - -
- -
-

- {{ConfigInterfaceDialogCtrl.interf.label}} -

- - -
-
-
-
- -
- - - - - - Admin Status - - - -
-
- - - - - - Update - - - -
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/config-vpp-dialog.html b/vbd/gui/module/src/main/resources/vpp/views/config-vpp-dialog.html deleted file mode 100644 index 3fcd4a68b..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/config-vpp-dialog.html +++ /dev/null @@ -1,67 +0,0 @@ - -
- -
-

- Configuring {{ConfigVppDialogCtrl.vpp.name}} -

- - -
X
-
-
-
- -
- - -
- - - - - - - - - - - - -
-
- - - - - - - - -
- - -
- -
-
- - - - - Update - - - - -
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/index.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/index.tpl.html deleted file mode 100644 index 5e6d1094e..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/index.tpl.html +++ /dev/null @@ -1,15 +0,0 @@ -
- - - -
-
-
-
- - -
-
-
-
-
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/inventory-detail.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/inventory-detail.tpl.html deleted file mode 100644 index a5a5dc5d7..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/inventory-detail.tpl.html +++ /dev/null @@ -1,99 +0,0 @@ -
-
- -
- -

Vpp and Interfaces

-
-
-
- - -
- -
-

VPP Detail

-
-
- Back to VPP List -
- - - - - - - - - - - - - - - - - - - - -
VPP Name - - {{vpp.name}} - -
IP Address{{selectedVpp.ipAddress}}
Port{{selectedVpp.port}}
Connection Status{{selectedVpp.status}}
- -
-

VXLAN Tunnel

-
- - - - - - - - - - - - - - - - - - - -
NameOper StatusAdmin StatusSource IPDestination IP
{{interface.name}}{{interface['admin-status']}}{{interface['phys-address']}}{{interface['v3po:vxlan'].src}}{{interface['v3po:vxlan'].dst}}
-
-
-
- -
- -
- -

Interface list

- - - - - - - - - - - - - - - - - -
NameOper StatusAdmin StatusMAC Address
{{interface.name}}{{interface['oper-status']}}{{interface['admin-status']}}{{interface['phys-address']}}
-
-
-
-
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/inventory-table-interfaces-subgrid.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/inventory-table-interfaces-subgrid.tpl.html deleted file mode 100644 index c47617cb1..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/inventory-table-interfaces-subgrid.tpl.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/inventory-table.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/inventory-table.tpl.html deleted file mode 100644 index ab62c75c3..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/inventory-table.tpl.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
-
- -
-

VPP List

-
-
- Mount VPP - Reload VPPs -
- - - - - - - - - - - - - - - - - - - - -
VPP NameIP AddressPortConnection StatusActions
{{vpp.name}}{{vpp.ipAddress}}{{vpp.port}}{{vpp.status}} - - Detail - Edit - Delete -
-
-
-
-
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/inventory.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/inventory.tpl.html deleted file mode 100644 index 9d5e19d5e..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/inventory.tpl.html +++ /dev/null @@ -1,7 +0,0 @@ -
- -
- -
-
-
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/new-bd-dialog.html b/vbd/gui/module/src/main/resources/vpp/views/new-bd-dialog.html deleted file mode 100644 index 41e6ad8a4..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/new-bd-dialog.html +++ /dev/null @@ -1,39 +0,0 @@ - -
- -
-

- New BD -

- - -
X
-
-
-
- -
- - -
- - - - -
- -
- -
-
- - - - - Add - - - -
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/new-vpp-dialog.html b/vbd/gui/module/src/main/resources/vpp/views/new-vpp-dialog.html deleted file mode 100644 index d8d2600f3..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/new-vpp-dialog.html +++ /dev/null @@ -1,69 +0,0 @@ - -
- -
-

- Mount new VPP -

- - -
X
-
-
-
- -
- - -
- - - - - - - - - - - - -
-
- - - - - - - - -
- - -
- -
-
- - - - - Mount - - - Close - - - -
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/root.tpl.html b/vbd/gui/module/src/main/resources/vpp/views/root.tpl.html deleted file mode 100644 index b07c00c51..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/root.tpl.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/views/vpp-topo.html b/vbd/gui/module/src/main/resources/vpp/views/vpp-topo.html deleted file mode 100644 index 8b3c9fd8a..000000000 --- a/vbd/gui/module/src/main/resources/vpp/views/vpp-topo.html +++ /dev/null @@ -1,18 +0,0 @@ - -
- -
-

- Topology for {{VppTopoCtrl.vpp.name}} -

- - -
X
-
-
-
- -
-
-
-
\ No newline at end of file diff --git a/vbd/gui/module/src/main/resources/vpp/vpp.module.js b/vbd/gui/module/src/main/resources/vpp/vpp.module.js deleted file mode 100644 index 464aa35bf..000000000 --- a/vbd/gui/module/src/main/resources/vpp/vpp.module.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -define(['angularAMD', 'app/routingConfig', 'ui-bootstrap', 'Restangular', 'angular-animate', 'angular-aria', - 'angular-material', 'angular-smart-table', 'angular-translate', - 'angular-translate-loader-partial', 'lodash'], function() { - - var vpp = angular.module('app.vpp', ['ui.router.state','app.core', 'ui.bootstrap', 'restangular', 'ngAnimate', - 'ngAria', 'ngMaterial', 'smart-table', 'pascalprecht.translate']); - - vpp.register = vpp; - - vpp.config(function ($stateProvider, $compileProvider, $controllerProvider, $provide, $translateProvider, $translatePartialLoaderProvider, NavHelperProvider, $filterProvider, $mdThemingProvider) { - - $translatePartialLoaderProvider.addPart('app/vpp/assets/data/locale'); - - vpp.register = { - directive : $compileProvider.directive, - controller : $controllerProvider.register, - filter: $filterProvider.register, - factory : $provide.factory, - service : $provide.service - }; - - NavHelperProvider.addControllerUrl('app/vpp/controllers/vpp.controller'); - NavHelperProvider.addToMenu('vpp', { - "link": "#/vpp/index", - "active": "main.vpp", - "title": "VPP", - "icon": "icon-code-fork", - "page": { - "title": "VPP", - "description": "VPP" - } - }); - - var access = routingConfig.accessLevels; - $stateProvider.state('main.vpp', { - url: 'vpp', - abstract: true, - views : { - 'content' : { - templateUrl: 'src/app/vpp/views/root.tpl.html' - } - } - }); - - $stateProvider.state('main.vpp.index', { - url: '/index', - access: access.admin, - views: { - '': { - controller: 'vppCtrl', - templateUrl: 'src/app/vpp/views/index.tpl.html' - } - } - }); - - $mdThemingProvider.definePalette('odl-gray', { - '50': 'BDBDBD', - '100': 'BDBDBD', - '200': 'BDBDBD', - '300': 'BDBDBD', - '400': 'BDBDBD', - '500': '414040', - '600': '414040', - '700': '414040', - '800': '414040', - '900': '414040', - 'A100': '414040', - 'A200': '414040', - 'A400': '414040', - 'A700': '414040', - 'contrastDefaultColor': 'light', // whether, by default, text (contrast) - // on this palette should be dark or light - 'contrastDarkColors': [], - 'contrastLightColors': undefined // could also specify this if default was 'dark' - }); - - $mdThemingProvider.definePalette('odl-orange', { - '50': 'FFA500', - '100': 'FFA500', - '200': 'FFA500', - '300': 'FFA500', - '400': 'FFA500', - '500': 'FFA500', - '600': 'FFA500', - '700': 'FFA500', - '800': 'FFA500', - '900': 'FFA500', - 'A100': 'FFA500', - 'A200': 'FFA500', - 'A400': 'FFA500', - 'A700': 'FFA500', - 'contrastDefaultColor': 'light', // whether, by default, text (contrast) - // on this palette should be dark or light - 'contrastDarkColors': [], - 'contrastLightColors': undefined // could also specify this if default was 'dark' - }); - - $mdThemingProvider.theme('default').dark() - .primaryPalette('odl-gray',{ - 'default': '500' - }) - .accentPalette('odl-orange'); - - }); - - return vpp; -}); diff --git a/vbd/gui/pom.xml b/vbd/gui/pom.xml deleted file mode 100644 index 286c97b15..000000000 --- a/vbd/gui/pom.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - 4.0.0 - - - io.fd.honeycomb.vbd - vbd-aggregator - 1.0.0-SNAPSHOT - ../ - - - io.fd.honeycomb.vbd - vbd-ui - 1.0.0-SNAPSHOT - vbd-ui - Resources - pom - - module - bundle - - diff --git a/vbd/impl/pom.xml b/vbd/impl/pom.xml deleted file mode 100644 index 6f966b8c8..000000000 --- a/vbd/impl/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - io.fd.honeycomb.common - impl-parent - 1.0.0-SNAPSHOT - ../../common/impl-parent - - - 4.0.0 - io.fd.honeycomb.vbd - vbd-impl - 1.0.0-SNAPSHOT - bundle - - - src/main/config/vbd.xml - - - - - - io.fd.honeycomb.vbd - vbd-artifacts - 1.0.0-SNAPSHOT - pom - import - - - - - - - ${project.groupId} - vbd-api - - - - io.fd.honeycomb.v3po - v3po-api - 1.0.0-SNAPSHOT - - - - - junit - junit - test - - - - org.mockito - mockito-all - test - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/config/vbd.xml - xml - config - - - - - - - - - - diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java deleted file mode 100644 index 02c5d89ed..000000000 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/BridgeDomain.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package io.fd.honeycomb.vbd.impl; - -import com.google.common.base.Optional; -import com.google.common.base.Preconditions; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; -import com.google.common.util.concurrent.CheckedFuture; -import com.google.common.util.concurrent.FutureCallback; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import io.fd.honeycomb.vbd.api.VxlanTunnelIdAllocator; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import javax.annotation.Nullable; -import javax.annotation.concurrent.GuardedBy; -import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; -import org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType; -import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; -import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; -import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.external.reference.rev160129.ExternalReference; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.LinkVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.LinkVbridgeAugmentBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.NodeVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.TerminationPointVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.TerminationPointVbridgeAugmentBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.TopologyVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.node.BridgeMember; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.node.BridgeMemberBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.node.termination.point._interface.type.TunnelInterfaceBuilder; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.LinkId; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.link.attributes.DestinationBuilder; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.link.attributes.SourceBuilder; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.LinkBuilder; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.LinkKey; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.node.attributes.SupportingNode; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.binding.DataObject; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Implementation of a single Virtual Bridge Domain. It is bound to a particular network topology instance, manages - * bridge members and projects state into the operational data store. - */ -final class BridgeDomain implements DataTreeChangeListener { - private static final Logger LOG = LoggerFactory.getLogger(BridgeDomain.class); - - private static final int SOURCE_VPP_INDEX = 0; - private static final int DESTINATION_VPP_INDEX = 1; - private final KeyedInstanceIdentifier topology; - @GuardedBy("this") - - private final BindingTransactionChain chain; - private final ListenerRegistration reg; - private final MountPointService mountService; - private final VppModifier vppModifier; - private final VxlanTunnelIdAllocator tunnelIdAllocator; - private TopologyVbridgeAugment config; - private final String bridgeDomainName; - private final String iiBridgeDomainOnVPPRest; - private Multimap> nodesToVpps = ArrayListMultimap.create(); - - private BridgeDomain(final DataBroker dataBroker, final MountPointService mountService, final KeyedInstanceIdentifier topology, - final BindingTransactionChain chain, VxlanTunnelIdAllocator tunnelIdAllocator) { - this.bridgeDomainName = topology.getKey().getTopologyId().getValue(); - this.vppModifier = new VppModifier(mountService, bridgeDomainName); - - this.topology = Preconditions.checkNotNull(topology); - this.chain = Preconditions.checkNotNull(chain); - this.mountService = mountService; - this.tunnelIdAllocator = tunnelIdAllocator; - - this.iiBridgeDomainOnVPPRest = provideIIBrdigeDomainOnVPPRest(); - - reg = dataBroker.registerDataTreeChangeListener( - new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, topology), this); - } - - private String provideIIBrdigeDomainOnVPPRest() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("v3po:vpp/bridge-domains/bridge-domain/"); - strBuilder.append(bridgeDomainName); - return strBuilder.toString(); - } - - static BridgeDomain create(final DataBroker dataBroker, - MountPointService mountService, final KeyedInstanceIdentifier topology, final BindingTransactionChain chain, - final VxlanTunnelIdAllocator tunnelIdAllocator) { - - LOG.debug("Wiping operational state of {}", topology); - - final WriteTransaction tx = chain.newWriteOnlyTransaction(); - tx.delete(LogicalDatastoreType.OPERATIONAL, topology); - tx.submit(); - - return new BridgeDomain(dataBroker, mountService, topology, chain, tunnelIdAllocator); - } - - synchronized void forceStop() { - LOG.info("Bridge domain {} for {} going down", this, topology); - reg.close(); - chain.close(); - LOG.info("Bridge domain {} for {} is down", this, topology); - } - - synchronized void stop() { - LOG.debug("Bridge domain {} for {} shutting down", this, topology); - - final WriteTransaction tx = chain.newWriteOnlyTransaction(); - tx.delete(LogicalDatastoreType.OPERATIONAL, topology); - tx.submit(); - chain.close(); - } - - @Override - public synchronized void onDataTreeChanged(final Collection> changes) { - for (DataTreeModification c : changes) { - LOG.debug("Domain {} for {} processing change {}", this, topology, c); - - final DataObjectModification mod = c.getRootNode(); - switch (mod.getModificationType()) { - case DELETE: - LOG.debug("Topology {} deleted, expecting shutdown", topology); - break; - case SUBTREE_MODIFIED: - // First check if the configuration has changed - final DataObjectModification newConfig = mod.getModifiedAugmentation(TopologyVbridgeAugment.class); - if (newConfig != null) { - if (newConfig.getModificationType() != ModificationType.DELETE) { - LOG.debug("Topology {} modified configuration {}", topology, newConfig); - updateConfiguration(newConfig); - } else { - // FIXME: okay, what can we do about this one? - LOG.error("Topology {} configuration deleted, good luck!", topology); - } - } - - for (DataObjectModification child : mod.getModifiedChildren()) { - LOG.debug("Topology {} modified child {}", topology, child); - - if (Node.class.isAssignableFrom(child.getDataType())) { - modifyNode((DataObjectModification) child); - } - } - - break; - case WRITE: - final Topology data = mod.getDataAfter(); - - // Read configuration - final TopologyVbridgeAugment config = data.getAugmentation(TopologyVbridgeAugment.class); - vppModifier.setConfig(config); - if (config != null) { - setConfiguration(config); - } else { - LOG.error("Topology {} has no configuration, good luck!", topology); - } - - // FIXME: deal with nodes - - break; - default: - LOG.warn("Unhandled topology modification {}", mod); - break; - } - } - } - - private void modifyNode(final DataObjectModification nodeMod) { - switch (nodeMod.getModificationType()) { - case DELETE: - LOG.debug("Topology {} node {} deleted", topology, nodeMod.getIdentifier()); - // FIXME: do something - break; - case SUBTREE_MODIFIED: - LOG.debug("Topology {} node {} modified", topology, nodeMod.getIdentifier()); - for (DataObjectModification nodeChild : nodeMod.getModifiedChildren()) { - if (TerminationPoint.class.isAssignableFrom(nodeChild.getDataType())) { - modifyTerminationPoint((DataObjectModification) nodeChild,nodeMod.getDataAfter().getNodeId()); - } - } - break; - case WRITE: - LOG.debug("Topology {} node {} created", topology, nodeMod.getIdentifier()); - final int numberVppsBeforeAddition = nodesToVpps.keySet().size(); - final Node newNode = nodeMod.getDataAfter(); - createNode(newNode); - final int numberVppsAfterAddition = nodesToVpps.keySet().size(); - if ((numberVppsBeforeAddition < numberVppsAfterAddition) && (numberVppsBeforeAddition >= 1)) { - addTunnel(newNode.getNodeId()); - } - break; - default: - LOG.warn("Unhandled node modification {} in topology {}", nodeMod, topology); - break; - } - } - - private void modifyTerminationPoint(final DataObjectModification nodeChild, final NodeId nodeId) { - final TerminationPoint terminationPoint = nodeChild.getDataAfter(); - final TerminationPointVbridgeAugment termPointVbridgeAug = terminationPoint.getAugmentation(TerminationPointVbridgeAugment.class); - if (termPointVbridgeAug != null) { - final Collection> instanceIdentifiersVPP = nodesToVpps.get(nodeId); - //TODO: probably iterate via all instance identifiers. - if (!instanceIdentifiersVPP.isEmpty()) { - final DataBroker dataBroker = VbdUtil.resolveDataBrokerForMountPoint(instanceIdentifiersVPP.iterator().next(), mountService); - vppModifier.addInterfaceToBridgeDomainOnVpp(dataBroker, termPointVbridgeAug); - } - } - } - - private void addTunnel(final NodeId sourceNode) { - final KeyedInstanceIdentifier iiToSrcVpp = nodesToVpps.get(sourceNode).iterator().next(); - final Integer srcVxlanTunnelId = tunnelIdAllocator.nextIdFor(iiToSrcVpp); - for (Map.Entry> nodeToVpp : nodesToVpps.entries()) { - if (!nodeToVpp.getKey().equals(sourceNode)) { - //TODO: check whether returned value from nodesToVpps is not null - final KeyedInstanceIdentifier iiToDstVpp = nodeToVpp.getValue(); - final Integer dstVxlanTunnelId = tunnelIdAllocator.nextIdFor(iiToDstVpp); - final NodeId dstNode = nodeToVpp.getKey(); - - final ListenableFuture>> ipAddressesFuture = vppModifier.readIpAddressesFromVpps(iiToSrcVpp, iiToDstVpp); - Futures.addCallback(ipAddressesFuture, new FutureCallback>>() { - @Override - public void onSuccess(List> ipAddresses) { - if (ipAddresses.size() == 2) { - LOG.debug("All required IP addresses for creating tunnel were obtained."); - final Optional ipAddressSrcVpp = ipAddresses.get(SOURCE_VPP_INDEX); - final Optional ipAddressDstVpp = ipAddresses.get(DESTINATION_VPP_INDEX); - if (ipAddressSrcVpp != null && ipAddressDstVpp != null) { - if (ipAddressSrcVpp.isPresent() && ipAddressDstVpp.isPresent()) { - //writing v3po:vxlan container to source node - vppModifier.createVirtualInterfaceOnVpp(ipAddressSrcVpp.get(), ipAddressDstVpp.get(), iiToSrcVpp, srcVxlanTunnelId); - - //writing v3po:vxlan container to existing node - vppModifier.createVirtualInterfaceOnVpp(ipAddressDstVpp.get(), ipAddressSrcVpp.get(), iiToDstVpp, dstVxlanTunnelId); - - addTerminationPoint(topology.child(Node.class, new NodeKey(dstNode)), dstVxlanTunnelId); - addTerminationPoint(topology.child(Node.class, new NodeKey(sourceNode)), srcVxlanTunnelId); - - addLinkBetweenTerminationPoints(sourceNode, dstNode, srcVxlanTunnelId, dstVxlanTunnelId); - addLinkBetweenTerminationPoints(dstNode, sourceNode, srcVxlanTunnelId, dstVxlanTunnelId); - } - } - } - } - - @Override - public void onFailure(Throwable t) { - LOG.debug("Reading of IP addresses has failed {}.", t); - } - }); - } - } - } - - private void addLinkBetweenTerminationPoints(final NodeId newVpp, final NodeId odlVpp, - final int srcVxlanTunnelId, final int dstVxlanTunnelId) { - //TODO clarify how should identifier of link looks like - final String linkIdStr = newVpp.getValue() + "-" + odlVpp.getValue(); - final LinkId linkId = new LinkId(linkIdStr); - final KeyedInstanceIdentifier iiToLink = topology.child(Link.class, new LinkKey(linkId)); - final WriteTransaction wTx = chain.newWriteOnlyTransaction(); - wTx.put(LogicalDatastoreType.OPERATIONAL, iiToLink, prepareLinkData(newVpp, odlVpp, linkId, srcVxlanTunnelId, dstVxlanTunnelId), true); - wTx.submit(); - } - - private static Link prepareLinkData(final NodeId newVpp, final NodeId oldVpp, final LinkId linkId, - final int srcVxlanTunnelId, final int dstVxlanTunnelId) { - final LinkBuilder linkBuilder = new LinkBuilder(); - linkBuilder.setLinkId(linkId); - - final SourceBuilder sourceBuilder = new SourceBuilder(); - sourceBuilder.setSourceNode(newVpp); - sourceBuilder.setSourceTp(new TpId(VbdUtil.provideVxlanId(srcVxlanTunnelId))); - linkBuilder.setSource(sourceBuilder.build()); - - final DestinationBuilder destinationBuilder = new DestinationBuilder(); - destinationBuilder.setDestNode(oldVpp); - destinationBuilder.setDestTp(new TpId(VbdUtil.provideVxlanId(dstVxlanTunnelId))); - linkBuilder.setDestination(destinationBuilder.build()); - - final LinkVbridgeAugmentBuilder linkVbridgeAugmentBuilder = new LinkVbridgeAugmentBuilder(); - linkVbridgeAugmentBuilder.setTunnel(new ExternalReference(VbdUtil.provideVxlanId(srcVxlanTunnelId))); - linkBuilder.addAugmentation(LinkVbridgeAugment.class, linkVbridgeAugmentBuilder.build()); - return linkBuilder.build(); - } - - private void createNode(final Node node) { - for (SupportingNode supportingNode : node.getSupportingNode()) { - final NodeId nodeMount = supportingNode.getNodeRef(); - final TopologyId topologyMount = supportingNode.getTopologyRef(); - - final KeyedInstanceIdentifier iiToVpp = InstanceIdentifier - .create(NetworkTopology.class) - .child(Topology.class, new TopologyKey(topologyMount)) - .child(Node.class, new NodeKey(nodeMount)); - nodesToVpps.put(node.getNodeId(), iiToVpp); - ListenableFuture addVppToBridgeDomainFuture = vppModifier.addVppToBridgeDomain(iiToVpp, node); - addSupportingBridgeDomain(addVppToBridgeDomainFuture, node); - } - } - - private void addSupportingBridgeDomain(final ListenableFuture addVppToBridgeDomainFuture, final Node node) { - Futures.addCallback(addVppToBridgeDomainFuture, new FutureCallback() { - @Override - public void onSuccess(Void result) { - LOG.debug("Storing bridge member to operational DS...."); - final BridgeMemberBuilder bridgeMemberBuilder = new BridgeMemberBuilder(); - bridgeMemberBuilder.setSupportingBridgeDomain(new ExternalReference(iiBridgeDomainOnVPPRest)); - final InstanceIdentifier iiToBridgeMember = topology.child(Node.class, node.getKey()).augmentation(NodeVbridgeAugment.class).child(BridgeMember.class); - final WriteTransaction wTx = chain.newWriteOnlyTransaction(); - wTx.put(LogicalDatastoreType.OPERATIONAL, iiToBridgeMember, bridgeMemberBuilder.build(), true); - wTx.submit(); - } - - @Override - public void onFailure(Throwable t) { - //TODO handle this state - } - }); - } - - private void addTerminationPoint(final KeyedInstanceIdentifier nodeIID, final int vxlanTunnelId) { - // build data - final ExternalReference ref = new ExternalReference(VbdUtil.provideVxlanId(vxlanTunnelId)); - final TunnelInterfaceBuilder iFaceBuilder = new TunnelInterfaceBuilder(); - iFaceBuilder.setTunnelInterface(ref); - - final TerminationPointVbridgeAugmentBuilder tpAugmentBuilder = new TerminationPointVbridgeAugmentBuilder(); - tpAugmentBuilder.setInterfaceType(iFaceBuilder.build()); - - final TerminationPointBuilder tpBuilder = new TerminationPointBuilder(); - tpBuilder.addAugmentation(TerminationPointVbridgeAugment.class, tpAugmentBuilder.build()); - tpBuilder.setTpId(new TpId(VbdUtil.provideVxlanId(vxlanTunnelId))); - final TerminationPoint tp = tpBuilder.build(); - - // process data - final WriteTransaction wTx = chain.newWriteOnlyTransaction(); - wTx.put(LogicalDatastoreType.OPERATIONAL, nodeIID.child(TerminationPoint.class, tp.getKey()), tp, true); - final CheckedFuture future = wTx.submit(); - - Futures.addCallback(future, new FutureCallback() { - @Override - public void onSuccess(@Nullable Void result) { - LOG.debug("Termination point successfully added to {}.", nodeIID); - } - - @Override - public void onFailure(Throwable t) { - LOG.warn("Failed to add termination point to {}.", nodeIID); - } - }); - } - - private void setConfiguration(final TopologyVbridgeAugment config) { - LOG.debug("Topology {} configuration set to {}", topology, config); - - this.config = config; - } - - @GuardedBy("this") - private void updateConfiguration(final DataObjectModification mod) { - LOG.debug("Topology {} configuration changed", topology); - - // FIXME: do something smarter - setConfiguration(mod.getDataAfter()); - } -} diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/TopologyMonitor.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/TopologyMonitor.java deleted file mode 100644 index dfab2e877..000000000 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/TopologyMonitor.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package io.fd.honeycomb.vbd.impl; - -import com.google.common.base.Preconditions; -import io.fd.honeycomb.vbd.api.VxlanTunnelIdAllocator; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import javax.annotation.concurrent.GuardedBy; -import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; -import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; -import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction; -import org.opendaylight.controller.md.sal.common.api.data.TransactionChain; -import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.topology.types.VbridgeTopology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; -import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Class responsible for monitoring /network-topology/topology and activating a {@link BridgeDomain} when a particular - * topology is marked as a bridge domain. - */ -final class TopologyMonitor implements DataTreeChangeListener, AutoCloseable { - private static final Logger LOG = LoggerFactory.getLogger(TopologyMonitor.class); - - @GuardedBy("this") - private final Map domains = new HashMap<>(); - private final DataBroker dataBroker; - private final MountPointService mountService; - private static final VxlanTunnelIdAllocator tunnelIdAllocator = new VxlanTunnelIdAllocatorImpl(); - - public TopologyMonitor(DataBroker dataBroker, MountPointService mountService) { - this.dataBroker = Preconditions.checkNotNull(dataBroker); - this.mountService = Preconditions.checkNotNull(mountService); - - } - - @Override - public synchronized void onDataTreeChanged(final Collection> changes) { - for (DataTreeModification c : changes) { - @SuppressWarnings("unchecked") - final KeyedInstanceIdentifier topology = - (KeyedInstanceIdentifier) c.getRootPath().getRootIdentifier() - .firstIdentifierOf(Topology.class); - - Preconditions.checkArgument(!topology.isWildcarded(), "Wildcard topology %s is not supported", topology); - - final DataObjectModification mod = c.getRootNode(); - switch (mod.getModificationType()) { - case DELETE: - LOG.debug("Topology {} removed", topology); - stopDomain(topology); - break; - case WRITE: - LOG.debug("Topology {} added", topology); - startDomain(topology); - break; - default: - LOG.warn("Ignoring unhandled modification type {}", mod.getModificationType()); - break; - } - } - } - - private synchronized void completeDomain(final KeyedInstanceIdentifier topology) { - LOG.debug("Bridge domain for {} completed operation", topology); - domains.remove(topology); - - synchronized (domains) { - domains.notify(); - } - } - - private synchronized void restartDomain(final KeyedInstanceIdentifier topology) { - final BridgeDomain prev = domains.remove(topology); - if (prev == null) { - LOG.warn("No domain for {}, not restarting", topology); - return; - } - - prev.forceStop(); - startDomain(topology); - } - - @GuardedBy("this") - private void startDomain(final KeyedInstanceIdentifier topology) { - final BridgeDomain prev = domains.get(topology.getKey()); - if (prev != null) { - LOG.warn("Bridge domain {} for {} already started", prev, topology); - return; - } - - LOG.debug("Starting bridge domain for {}", topology); - - final BindingTransactionChain chain = dataBroker.createTransactionChain(new TransactionChainListener() { - @Override - public void onTransactionChainSuccessful(final TransactionChain chain) { - completeDomain(topology); - } - - @Override - public void onTransactionChainFailed(final TransactionChain chain, - final AsyncTransaction transaction, final Throwable cause) { - LOG.warn("Bridge domain for {} failed, restarting it", cause); - restartDomain(topology); - } - }); - - final BridgeDomain domain = BridgeDomain.create(dataBroker, mountService, topology, chain, tunnelIdAllocator); - domains.put(topology.getKey(), domain); - - LOG.debug("Bridge domain {} for {} started", domain, topology); - } - - @GuardedBy("this") - private void stopDomain(final KeyedInstanceIdentifier topology) { - final BridgeDomain domain = domains.remove(topology.getKey()); - if (domain == null) { - LOG.warn("Bridge domain for {} not present", topology); - return; - } - - domain.stop(); - } - - @Override - public synchronized void close() { - LOG.debug("Topology monitor {} shut down started", this); - - for (Entry e : domains.entrySet()) { - LOG.debug("Shutting down bridge domain {} (key {})", e.getValue(), e.getKey()); - e.getValue().stop(); - } - - while (!domains.isEmpty()) { - LOG.debug("Waiting for domains for {} to complete", domains.keySet()); - synchronized (domains) { - try { - domains.wait(); - } catch (InterruptedException e) { - LOG.warn("Interrupted while waiting for domain shutdown, {} have not completed yet", - domains.keySet(), e); - break; - } - } - } - - LOG.debug("Topology monitor {} shut down completed", this); - } - - public static class VxlanTunnelIdAllocatorImpl implements VxlanTunnelIdAllocator { - - private final Map, Integer> vppIIToNextTunnelId; - - VxlanTunnelIdAllocatorImpl() { - vppIIToNextTunnelId = new HashMap<>(); - } - - @Override - public synchronized Integer nextIdFor(final KeyedInstanceIdentifier iiToVPP) { - if(vppIIToNextTunnelId.containsKey(iiToVPP)) { - final int value = vppIIToNextTunnelId.get(iiToVPP); - vppIIToNextTunnelId.put(iiToVPP, value + 1); - return value + 1; - } else { - vppIIToNextTunnelId.put(iiToVPP, 0); - return 0; - } - } - - } -} diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VbdUtil.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VbdUtil.java deleted file mode 100644 index 2a29d7b4e..000000000 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VbdUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - *

- * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package io.fd.honeycomb.vbd.impl; - - -import com.google.common.base.Optional; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.MountPoint; -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -public class VbdUtil { - - private static final String TUNNEL_ID_PREFIX = "vxlan_tunnel"; - - - private VbdUtil() { - throw new UnsupportedOperationException("Can't instantiate util class"); - } - - static DataBroker resolveDataBrokerForMountPoint(final InstanceIdentifier iiToMountPoint, final MountPointService mountService) { - final Optional vppMountPointOpt = mountService.getMountPoint(iiToMountPoint); - if (vppMountPointOpt.isPresent()) { - final MountPoint vppMountPoint = vppMountPointOpt.get(); - final Optional dataBrokerOpt = vppMountPoint.getService(DataBroker.class); - if (dataBrokerOpt.isPresent()) { - return dataBrokerOpt.get(); - } - } - return null; - } - - static String provideVxlanId(final int vxlanTunnelId) { - return TUNNEL_ID_PREFIX + vxlanTunnelId; - } - - -} diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VirtualBridgeDomainManager.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VirtualBridgeDomainManager.java deleted file mode 100644 index 0c1d08faa..000000000 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VirtualBridgeDomainManager.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package io.fd.honeycomb.vbd.impl; - -import com.google.common.base.Preconditions; -import javax.annotation.Nonnull; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.TopologyTypesVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.topology.types.VbridgeTopology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.TopologyTypes; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Tip for the Virtual Bridge Domain implementation. This class is instantiated when the application is started - * and {@link #close()}d when it is shut down. - */ -public final class VirtualBridgeDomainManager implements AutoCloseable { - private static final Logger LOG = LoggerFactory.getLogger(VirtualBridgeDomainManager.class); - private static final DataTreeIdentifier LISTEN_TREE = - new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, - InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class).child(TopologyTypes.class) - .augmentation(TopologyTypesVbridgeAugment.class).child(VbridgeTopology.class).build()); - - private final ListenerRegistration reg; - private boolean closed; - - private VirtualBridgeDomainManager(final ListenerRegistration reg) { - this.reg = Preconditions.checkNotNull(reg); - } - - public static VirtualBridgeDomainManager create(@Nonnull final DataBroker dataBroker,@Nonnull MountPointService mountService) { - final ListenerRegistration reg = - dataBroker.registerDataTreeChangeListener(LISTEN_TREE, new TopologyMonitor(dataBroker, mountService)); - - return new VirtualBridgeDomainManager(reg); - } - - @Override - public void close() { - if (!closed) { - LOG.debug("Virtual Bridge Domain manager shut down started"); - - final TopologyMonitor monitor = reg.getInstance(); - reg.close(); - LOG.debug("Topology monitor {} unregistered", monitor); - monitor.close(); - - closed = true; - LOG.debug("Virtual Bridge Domain manager shut down completed"); - } - } -} diff --git a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java b/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java deleted file mode 100644 index cffad412d..000000000 --- a/vbd/impl/src/main/java/io/fd/honeycomb/vbd/impl/VppModifier.java +++ /dev/null @@ -1,255 +0,0 @@ -/** - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - *

- * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package io.fd.honeycomb.vbd.impl; - -import com.google.common.base.Optional; -import com.google.common.util.concurrent.CheckedFuture; -import com.google.common.util.concurrent.FutureCallback; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.SettableFuture; -import java.util.ArrayList; -import java.util.List; -import javax.annotation.Nullable; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; -import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceBuilder; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.external.reference.rev160129.ExternalReference; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Vpp; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentationBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VxlanTunnel; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2Builder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBasedBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.BridgeDomains; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomainBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomainKey; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.TerminationPointVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.TopologyVbridgeAugment; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.TunnelParameters; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.node.termination.point.InterfaceType; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.node.termination.point._interface.type.UserInterface; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Class which is used for manipulation with VPP - */ -final class VppModifier { - private static final Long DEFAULT_ENCAP_VRF_ID = 0L; - - private static final Logger LOG = LoggerFactory.getLogger(BridgeDomain.class); - private final MountPointService mountService; - private final String bridgeDomainName; - private TopologyVbridgeAugment config; - private final InstanceIdentifier iiBridgeDomainOnVPP; - - - VppModifier(final MountPointService mountService, final String bridgeDomainName) { - this.mountService = mountService; - this.bridgeDomainName = bridgeDomainName; - this.iiBridgeDomainOnVPP = InstanceIdentifier.create(Vpp.class) - .child(BridgeDomains.class) - .child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain.class, new BridgeDomainKey(bridgeDomainName)); - } - - /** - * Tryies to read ipv4 addresses from all specified {@code iiToVpps } vpps. - * - * @param iiToVpps collection of instance identifiers which points to concrete mount points. - * @return future which contains list of ip addreases in the same order as was specified in {@code iiToVpps} - */ - @SafeVarargs - final ListenableFuture>> readIpAddressesFromVpps(final KeyedInstanceIdentifier... iiToVpps) { - final List>> ipv4Futures = new ArrayList<>(iiToVpps.length); - for (final KeyedInstanceIdentifier iiToVpp : iiToVpps) { - ipv4Futures.add(readIpAddressFromVpp(iiToVpp)); - } - return Futures.successfulAsList(ipv4Futures); - } - - /** - * Passes through interfaces at mount point specified via {@code iiToVpp}. - * - * When first ipv4 address is found then it is returned. - * - * @param iiToVpp instance idenfifier which point to mounted vpp - * @return if set ipv4 address is found at mounted vpp then it is returned as future. Otherwise absent value is returned - * in future or exception which has been thrown - */ - private ListenableFuture> readIpAddressFromVpp(final KeyedInstanceIdentifier iiToVpp) { - final SettableFuture> resultFuture = SettableFuture.create(); - - final DataBroker vppDataBroker = VbdUtil.resolveDataBrokerForMountPoint(iiToVpp, mountService); - if (vppDataBroker != null) { - final ReadOnlyTransaction rTx = vppDataBroker.newReadOnlyTransaction(); - final CheckedFuture, ReadFailedException> interfaceStateFuture - = rTx.read(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(Interfaces.class)); - - Futures.addCallback(interfaceStateFuture, new FutureCallback>() { - @Override - public void onSuccess(final Optional optInterfaces) { - if (optInterfaces.isPresent()) { - for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface intf : optInterfaces.get().getInterface()) { - final Interface1 interface1 = intf.getAugmentation(Interface1.class); - if (interface1 != null) { - final Ipv4 ipv4 = interface1.getIpv4(); - if (ipv4 != null) { - final List

addresses = ipv4.getAddress(); - if (!addresses.isEmpty()) { - final Ipv4AddressNoZone ip = addresses.iterator().next().getIp(); - if (ip != null) { - resultFuture.set(Optional.of(ip)); - break; - } - } - } - } - } - } else { - LOG.debug("There is no inferface with ipv4 address set at VPP {}.", iiToVpp); - resultFuture.set(Optional.absent()); - } - } - - @Override - public void onFailure(Throwable t) { - resultFuture.setException(t); - } - }); - } else { - LOG.debug("Data broker for vpp {} is missing.", iiToVpp); - resultFuture.set(Optional.absent()); - } - return resultFuture; - } - - void createVirtualInterfaceOnVpp(final Ipv4AddressNoZone ipSrc, final Ipv4AddressNoZone ipDst, final KeyedInstanceIdentifier iiToVpp, - final Integer vxlanTunnelId) { - final Vxlan vxlanData = prepareVxlan(ipSrc, ipDst); - final Interface intfData = prepareVirtualInterfaceData(vxlanData, vxlanTunnelId); - - final DataBroker vppDataBroker = VbdUtil.resolveDataBrokerForMountPoint(iiToVpp, mountService); - if (vppDataBroker != null) { - final WriteTransaction wTx = vppDataBroker.newWriteOnlyTransaction(); - final KeyedInstanceIdentifier iiToInterface - = InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(VbdUtil.provideVxlanId(vxlanTunnelId))); - wTx.put(LogicalDatastoreType.CONFIGURATION, iiToInterface, intfData); - final CheckedFuture submitFuture = wTx.submit(); - Futures.addCallback(submitFuture, new FutureCallback() { - @Override - public void onSuccess(@Nullable Void result) { - LOG.debug("Writing super virtual interface to {} finished successfully.",iiToVpp.getKey().getNodeId()); - } - - @Override - public void onFailure(Throwable t) { - LOG.debug("Writing super virtual interface to {} failed.", iiToVpp.getKey().getNodeId(), t); - } - }); - } else { - LOG.debug("Writing virtual interface {} to VPP {} wasn't successfull because missing data broker.", VbdUtil.provideVxlanId(vxlanTunnelId), iiToVpp); - } - } - - private static Interface prepareVirtualInterfaceData(final Vxlan vxlan, Integer vxlanTunnelId) { - final InterfaceBuilder interfaceBuilder = new InterfaceBuilder(); - //TODO implement tunnel counter - interfaceBuilder.setName(VbdUtil.provideVxlanId(vxlanTunnelId)); - interfaceBuilder.setType(VxlanTunnel.class); - VppInterfaceAugmentationBuilder vppInterfaceAugmentationBuilder = new VppInterfaceAugmentationBuilder(); - vppInterfaceAugmentationBuilder.setVxlan(vxlan); - interfaceBuilder.addAugmentation(VppInterfaceAugmentation.class, vppInterfaceAugmentationBuilder.build()); - return interfaceBuilder.build(); - } - - private Vxlan prepareVxlan(final Ipv4AddressNoZone ipSrc, final Ipv4AddressNoZone ipDst) { - final VxlanBuilder vxlanBuilder = new VxlanBuilder(); - vxlanBuilder.setSrc(new IpAddress(ipSrc)); - vxlanBuilder.setDst(new IpAddress(ipDst)); - final TunnelParameters tunnelParameters = config.getTunnelParameters(); - if (tunnelParameters instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.tunnel.parameters.Vxlan) { - org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.tunnel.parameters.Vxlan vxlan = - (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbridge.topology.rev160129.network.topology.topology.tunnel.parameters.Vxlan) tunnelParameters; - //TODO: handle NPE - vxlanBuilder.setVni(vxlan.getVxlan().getVni()); - } - vxlanBuilder.setEncapVrfId(DEFAULT_ENCAP_VRF_ID); - return vxlanBuilder.build(); - } - - void addInterfaceToBridgeDomainOnVpp(final DataBroker vppDataBroker, final TerminationPointVbridgeAugment termPointVbridgeAug) { - final InterfaceType interfaceType = termPointVbridgeAug.getInterfaceType(); - if (interfaceType instanceof UserInterface) { - //REMARK: according contract in YANG model this should be URI to data on mount point (accroding to RESTCONF) - //It was much more easier to just await concrete interface name, thus isn't necessary parse it (splitting on '/') - final ExternalReference userInterface = ((UserInterface) interfaceType).getUserInterface(); - final KeyedInstanceIdentifier iiToVpp = - InstanceIdentifier.create(Interfaces.class) - .child(Interface.class, new InterfaceKey(userInterface.getValue())); - InstanceIdentifier iiToV3poL2 = iiToVpp.augmentation(VppInterfaceAugmentation.class).child(L2.class); - LOG.debug("Writing L2 data to configuration DS to concrete interface."); - final WriteTransaction wTx = vppDataBroker.newWriteOnlyTransaction(); - wTx.put(LogicalDatastoreType.CONFIGURATION, iiToV3poL2, prepareL2Data(), true); - wTx.submit(); - } - } - - ListenableFuture addVppToBridgeDomain(final KeyedInstanceIdentifier iiToVpp, final Node node) { - final DataBroker vppDataBroker = VbdUtil.resolveDataBrokerForMountPoint(iiToVpp, mountService); - if (vppDataBroker != null) { - final WriteTransaction wTx = vppDataBroker.newWriteOnlyTransaction(); - wTx.put(LogicalDatastoreType.CONFIGURATION, iiBridgeDomainOnVPP, prepareNewBridgeDomainData(), true); - return wTx.submit(); - } - return Futures.immediateFailedFuture(new IllegalStateException("Data broker for vpp is missing")); - } - - private org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain - prepareNewBridgeDomainData() { - final BridgeDomainBuilder bridgeDomainBuilder = new BridgeDomainBuilder(config); - bridgeDomainBuilder.setName(bridgeDomainName); - return bridgeDomainBuilder.build(); - } - - - - private L2 prepareL2Data() { - final L2Builder l2Builder = new L2Builder(); - final BridgeBasedBuilder bridgeBasedBuilder = new BridgeBasedBuilder(); - bridgeBasedBuilder.setSplitHorizonGroup((short) 0); - bridgeBasedBuilder.setBridgedVirtualInterface(false); - bridgeBasedBuilder.setBridgeDomain(bridgeDomainName); - l2Builder.setInterconnection(bridgeBasedBuilder.build()); - return l2Builder.build(); - } - - public void setConfig(final TopologyVbridgeAugment config) { - this.config = config; - } -} diff --git a/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModule.java b/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModule.java deleted file mode 100644 index 6157320d6..000000000 --- a/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModule.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbd.impl.rev160202; - -import io.fd.honeycomb.vbd.impl.VirtualBridgeDomainManager; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; - -public class VbdModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbd.impl.rev160202.AbstractVbdModule { - public VbdModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VbdModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbd.impl.rev160202.VbdModule oldModule, java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - final BindingAwareBroker brokerDependency = getBrokerDependency(); - BindingAwareBroker.ProviderContext session = brokerDependency.registerProvider(new VbdProvider()); - - DataBroker dataBroker = session.getSALService(DataBroker.class); - MountPointService mountService = session.getSALService(MountPointService.class); - return VirtualBridgeDomainManager.create(dataBroker, mountService); - } - -} diff --git a/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModuleFactory.java b/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModuleFactory.java deleted file mode 100644 index 4f87fe6a1..000000000 --- a/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: vbd-impl yang module local name: vbd -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Tue Feb 02 10:45:40 CET 2016 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbd.impl.rev160202; -public class VbdModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbd.impl.rev160202.AbstractVbdModuleFactory { - -} diff --git a/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdProvider.java b/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdProvider.java deleted file mode 100644 index a27aa1e5e..000000000 --- a/vbd/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vbd/impl/rev160202/VbdProvider.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. - *

- * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vbd.impl.rev160202; - -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; -import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; - -/** - * Created by joe on 2.2.2016. - */ -public class VbdProvider implements BindingAwareProvider { - - @Override - public void onSessionInitiated(BindingAwareBroker.ProviderContext session) { - // Intentional NOOP - } -} diff --git a/vbd/impl/src/main/resources/config/vbd.xml b/vbd/impl/src/main/resources/config/vbd.xml deleted file mode 100644 index c3f4c665b..000000000 --- a/vbd/impl/src/main/resources/config/vbd.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - urn:opendaylight:params:xml:ns:yang:vbd:impl?module=vbd-impl&revision=2016-02-02 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - - - - - - - prefix:vbd - vbd-name - - binding:binding-broker-osgi-registry - binding-osgi-broker - - - - - - diff --git a/vbd/impl/src/main/yang/vbd-impl.yang b/vbd/impl/src/main/yang/vbd-impl.yang deleted file mode 100644 index d0c259500..000000000 --- a/vbd/impl/src/main/yang/vbd-impl.yang +++ /dev/null @@ -1,35 +0,0 @@ -module vbd-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:vbd:impl"; - prefix "vbd-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;} - - description - "Service definition for vbd project"; - - revision "2016-02-02" { - description - "Initial revision"; - } - - identity vbd { - base config:module-type; - config:java-name-prefix Vbd; - } - - augment "/config:modules/config:module/config:configuration" { - case vbd { - when "/config:modules/config:module/config:type = 'vbd'"; - container broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity md-sal-binding:binding-broker-osgi-registry; - } - } - } - } - } -} diff --git a/vbd/impl/vbridge-workflow.txt b/vbd/impl/vbridge-workflow.txt deleted file mode 100644 index 9f93e6fd4..000000000 --- a/vbd/impl/vbridge-workflow.txt +++ /dev/null @@ -1,104 +0,0 @@ -VPP Inventory/Topology ----------------------- - -- VPP management done through netconf-node-topology -- Mount point management done by sal-netconf-connector - - -Virtual Bridge Domain management --------------------------------- - -Prerequisite: configured netconf-node-topology - -1) Create a Virtual Bridge Domain: - - A) The UI creates a network topology instance in Controller Data Store - with: - - - topology-types/vbridge-topology container - - tunnel-type set to tunnel-type-vxlan - - tunnel-parameters/vxlan/vni set to appropriate value - - any bridge domain parameters from v3po:bridge-domain-attributes - - B) The Controller App receives a DataTreeChangeNotification about the - topology instance being created - -2) Assign a VPP into a Virtual Bridge Domain - Prerequisite: Virtual Bridge Domain exists - - A) The UI creates a 'node' within the VBD network topology in the - Controller Data Store with: - - - bridge-member container - - supporting-node pointing to the VPP node in the - netconf-node-topology - - B) The Controller App receives a DataTreeChangeNotification about the - node being added, and: - - - it looks at the supporting-node in the netconf topology and if the - node is connected: - - it creates a bridge domain with the name matching this VBD name, - copying bridge domain parameters from VBD Topology configuration - into the VPP - - once that succeeds it creates the corresponding - supporting-bridge-domain leaf in the Controller's operational - datastore. The leaf contains a RESTCONF-encoded instance - identifier of the bridge domain created in the VPP, relative to - that VPP's mount point. - -3) Assigning a physical VPP interface into a Virtual Bridge Domain - Prerequisite: The VPP itself has been added to the Virtual Bridge - Domain - - A) The UI creates a 'termination-point' inside the 'node' added in 2), - with: - - - interface name. - - B) The Controller App receives a notification of this being done and: - - looks if the VPP is connected, if it is, the app will: - - add the interface into the VPP's bridge domain configuration - -Inverse operations are achieved by the UI deleting the corresponding nodes in -the Controller's configuration data store. - - -Virtual Bridge Domain tunnel management ---------------------------------------- - -Operation is triggered by adding more than one VPP into the virtual bridge -domain, for sake of clarity this describes only one-way tunnel setup. The -process is repeated until a full mesh is achieved (FUTURE: spanning tree?). -The process is also simplified for demo purposes, real-world deployment would -deal with day-1 configuration and multi-provider setups. - -Demo assumption: there is exactly one interface with a VRF and IP address -assined, which is the interface to be used for tunnels - -The Controller App looks at the Source VPP: -- it finds the only interface with VRF and IP addresses. It will use this VRF - as the vxlan tunnel VRF. It will use the IP address as the vxlan tunnel - source. - -The Controller App looks at the Destination VPP: -- it finds the only interface with VRF and IP addresses. It will use the IP - address as the vxlan tunnel destination. - -The Controller App sets up the tunnel on the source VPP, using the VNI -configured for this Virtual Bridge Domain and IP addresses as detailed above. - -The controller app creates a new termination point within the VBD's the -controller's operational data store, under the -node representing the source VPP, with a generated ID (mechanism is TBD, must -not conflict with VPP names) and 'tunnel-interface' leaf, which points to the -vxlan interface created on the source VPP (e.g. VPP config state). - -This process is repeated in the reverse direction. - -Once that is done, the controller app will create a link from the newly-created -source TP to the newly-created destination TP in the controller's operational -data store, with leaf 'tunnel' pointing to the source VPP's interface operation -state (e.g. VPP vxlan oper state). A reverse link will be created, with the -'tunnel' leaf pointing to the destination VPP's interface state. - diff --git a/vbd/karaf/pom.xml b/vbd/karaf/pom.xml deleted file mode 100644 index 8c11b8177..000000000 --- a/vbd/karaf/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - io.fd.honeycomb.common - karaf-parent - 1.0.0-SNAPSHOT - ../../common/karaf-parent - - 4.0.0 - io.fd.honeycomb.vbd - vbd-karaf - 1.0.0-SNAPSHOT - ${project.artifactId} - - 3.1.1 - - - odl-vbd-ui - - - - - ${project.groupId} - vbd-artifacts - ${project.version} - pom - import - - - - - - - org.apache.karaf.features - framework - kar - - - - ${project.groupId} - vbd-features - features - xml - runtime - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - diff --git a/vbd/pom.xml b/vbd/pom.xml deleted file mode 100644 index 791f5e7ca..000000000 --- a/vbd/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - org.opendaylight.odlparent - odlparent - 1.6.2-Beryllium-SR2 - - - - io.fd.honeycomb.vbd - vbd-aggregator - 1.0.0-SNAPSHOT - Virtual Bridge Domain - pom - 4.0.0 - - 3.1.1 - - - api - artifacts - gui - features - impl - karaf - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-install-plugin - - true - - - - - -- cgit 1.2.3-korg