diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..fd4f2b0 --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/node_modules/isbinaryfile/lib.zip b/node_modules/isbinaryfile/lib.zip deleted file mode 100644 index debf959..0000000 Binary files a/node_modules/isbinaryfile/lib.zip and /dev/null differ diff --git a/node_modules/jibo-sdk/LICENSE.txt b/node_modules/jibo-sdk/LICENSE.txt new file mode 100644 index 0000000..55281cf --- /dev/null +++ b/node_modules/jibo-sdk/LICENSE.txt @@ -0,0 +1,6 @@ +jibo-sdk - Jibo's SDK plugin for Atom +@version v3.9.10 +Copyright (c) 2017, Jibo, Inc. All rights reserved. +All use of the Jibo SDK is subject to the Jibo SDK End User License Agreement (EULA) +distributed herewith. If you did not receive a copy of the EULA, you may view a +copy at https://developers.jibo.com/license. \ No newline at end of file diff --git a/node_modules/jibo-sdk/README.md b/node_modules/jibo-sdk/README.md new file mode 100644 index 0000000..389fa45 --- /dev/null +++ b/node_modules/jibo-sdk/README.md @@ -0,0 +1,5 @@ +The Jibo Software Developer Kit (SDK) gives developers an easy way to build Jibo Skills (robot applications). The Jibo SDK includes animation and behavior editors and gives you access to Jibo's motors, speech technology, facial recognition and tracking, touch input technology, and more. + +Click [here](http://developer.jibo.com) for Jibo SDK documentation. + +![Jibo README gif](http://jiborobot.github.io/jibo-sdk/resources/images/README.gif) diff --git a/node_modules/jibo-sdk/grammars/esml.json b/node_modules/jibo-sdk/grammars/esml.json new file mode 100644 index 0000000..ef2a237 --- /dev/null +++ b/node_modules/jibo-sdk/grammars/esml.json @@ -0,0 +1,239 @@ +{ + "scopeName": "text.esml", + "fileTypes": [ + "esml" + ], + "name": "Jibo Embodied Speech Markup Language", + "patterns": [ + { + "begin": "()", + "endCaptures": { + "1": { + "name": "keyword.control.tts.end.esml" + } + }, + "name": "meta.tag.tts.esml", + "patterns": [ + { + "include": "#tts-tag-stuff" + } + ] + }, + { + "begin": "()", + "endCaptures": { + "1": { + "name": "keyword.control.anim.end.esml" + } + }, + "name": "meta.tag.anim.esml", + "patterns": [ + { + "include": "#es-ssa-sfx-anim-tag-stuff" + } + ] + }, + { + "begin": "()", + "endCaptures": { + "1": { + "name": "keyword.control.sound.end.esml" + } + }, + "name": "meta.tag.sound.esml", + "patterns": [ + { + "include": "#sound-tag-stuff" + } + ] + }, + { + "begin": "()", + "endCaptures": { + "1": { + "name": "keyword.control.break.end.esml" + } + }, + "name": "meta.tag.break.esml", + "patterns": [ + { + "include": "#break-tag-stuff" + } + ] + }, + { + "begin": "()", + "endCaptures": { + "1": { + "name": "keyword.control.tag.end.esml" + } + }, + "name": "meta.tag.other.esml" + }, + { + "match": "<>", + "name": "invalid.illegal.incomplete.emsl" + } + ], + "repository": { + "string-double-quoted": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.esml" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.esml" + } + }, + "name": "string.quoted.double.esml" + }, + "string-single-quoted": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.esml" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.esml" + } + }, + "name": "string.quoted.single.esml" + }, + "tts-attribute": { + "match": "(?<=[^=])\\b(params|config)", + "name": "entity.other.tts.attribute-name.esml" + }, + "es-ssa-sfx-anim-attribute": { + "match": "(?<=[^=])\\b(path|name|cat|nonBlocking|endNeutral|filter|layers)", + "name": "entity.other.es-ssa-sfx-anim.attribute-name.esml" + }, + "sound-attribute": { + "match": "(?<=[^=])\\b(path|nonBlocking)", + "name": "entity.other.sound.attribute-name.esml" + }, + "break-attribute": { + "match": "(?<=[^=])\\b(size)", + "name": "entity.other.break.attribute-name.esml" + }, + "tts-tag-stuff": { + "patterns": [ + { + "include": "#tts-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + }, + { + "include": "#unquoted-attribute" + } + ] + }, + "es-ssa-sfx-anim-tag-stuff": { + "patterns": [ + { + "include": "#es-ssa-sfx-anim-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + }, + { + "include": "#unquoted-attribute" + } + ] + }, + "sound-tag-stuff": { + "patterns": [ + { + "include": "#sound-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + }, + { + "include": "#unquoted-attribute" + } + ] + }, + "break-tag-stuff": { + "patterns": [ + { + "include": "#break-attribute" + }, + { + "include": "#string-double-quoted" + }, + { + "include": "#string-single-quoted" + }, + { + "include": "#unquoted-attribute" + } + ] + }, + "unquoted-attribute": { + "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+", + "name": "invalid.illegal.unquoted.esml" + } + } +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/grammars/mim-esml.json b/node_modules/jibo-sdk/grammars/mim-esml.json new file mode 100644 index 0000000..06accd9 --- /dev/null +++ b/node_modules/jibo-sdk/grammars/mim-esml.json @@ -0,0 +1,34 @@ +{ + "scopeName": "text.mim-esml", + "fileTypes": [], + "name": "Jibo MIM ESML", + "patterns": [ + { + "match": "\\$\\{\\s*\\}", + "name": "invalid.illegal.incomplete.emsl" + }, + { + "begin": "(\\$\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.code-insert.esml" + } + }, + "end": "(\\})", + "endCaptures": { + "1": { + "name": "keyword.control.code-insert.esml" + } + }, + "contentName": "source.js.embedded.esml", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "include":"text.esml" + } + ] +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/grammars/rule.json b/node_modules/jibo-sdk/grammars/rule.json new file mode 100644 index 0000000..ff2af58 --- /dev/null +++ b/node_modules/jibo-sdk/grammars/rule.json @@ -0,0 +1,47 @@ +{ + "scopeName": "source.rule", + "name": "Jibo Rules", + "fileTypes": [ + "rule", + "nli", + "grm" + ], + "patterns": [ + { + "name": "comment.jibo-rule", + "match": "((#).*\n$)" + }, + { + "name": "keyword.control.jibo-rule", + "match": "(\\$[A-Za-z0-9_\\*]*)" + }, + { + "name": "string.quoted.single.jibo-rule", + "match": "'[^'|\\n]+'" + }, + { + "name": "keyword.operator.jibo-rule", + "match": "(\\+|\\?|\\|)" + }, + { + "match": "(\\b_\\w+\\b)", + "captures": { + "1": { + "name": "variable.parameter.function.jibo-rule" + } + } + }, + { + "name": ".constant.character.escape.jibo-rule", + "match": "\\\\'" + }, + { + "match": "(^[A-Za-z0-9_]+)( |=)", + "captures": { + "1": { + "name": "constant.other.jibo-rule" + } + } + } + ] +} diff --git a/node_modules/jibo-sdk/keymaps/jibo-atom.cson b/node_modules/jibo-sdk/keymaps/jibo-atom.cson new file mode 100644 index 0000000..f003a1e --- /dev/null +++ b/node_modules/jibo-sdk/keymaps/jibo-atom.cson @@ -0,0 +1,137 @@ +'atom-workspace': + 'ctrl-alt-g': 'jibo-sdk:new-project' + 'ctrl-alt-c': 'jibo-sdk:cheat-sheet' + 'ctrl-alt-p': 'jibo-sdk:play' + 'ctrl-alt-s': 'jibo-sdk:stop' + 'ctrl-alt-j': 'atom-react:styleguide' + 'ctrl-alt-d': 'jibo-sdk:debug-pane' + 'ctrl-alt-h': 'jibo-sdk:html-tab' + +'.platform-darwin atom-workspace .editor, .platform-darwin atom-workspace': + 'cmd-r': 'jibo-sdk:run-skill' +'.platform-linux atom-workspace .editor, .platform-linux atom-workspace': + 'cmd-r': 'jibo-sdk:run-skill' +'.platform-win32 atom-workspace .editor, .platform-win32 atom-workspace': + 'f5': 'jibo-sdk:run-skill' + 'ctrl-r': 'jibo-sdk:run-skill' + +'.behavior-editor atom-text-editor:not([mini])': + 'up': 'core:move-up' + 'down': 'core:move-down' + +'.behavior-editor atom-text-editor': + 'up': 'core:move-up' + 'down': 'core:move-down' + 'backspace' : 'core:backspace' + 'delete' : 'core:delete' + +'.behavior-editor .tree-grid-view': + 'up': 'jibo-sdk:up' + 'down': 'jibo-sdk:down' + 'ctrl-alt-/': 'jibo-sdk:skip-selected' + 'cmd-/': 'jibo-sdk:skip-selected' + 'backspace' :'jibo-sdk:delete-bt-elem' + 'delete': 'jibo-sdk:delete-bt-elem' + +'.package-generator': + 'escape': 'jibo-sdk:escape' + +'.asset-selector-modal': + 'up': 'jibo-sdk:up' + 'down': 'jibo-sdk:down' + 'enter': 'jibo-sdk:confirm' + 'right': 'jibo-sdk:right' + 'left': 'jibo-sdk:left' + 'escape': 'jibo-sdk:escape' + +'.animation-editor': + 'cmd-a': 'jibo-sdk:select-all-keyframes' + 'cmd-d': 'jibo-sdk:clear-keyframe-selection' + 's': 'jibo-sdk:upsert-keyframe' + 'a': 'jibo-sdk:upsert-all' + 'r': 'jibo-sdk:reset-keyframes' + 'd': 'jibo-sdk:delete' + 'f5': 'jibo-sdk:insert-blank-frame' + 'shift-f5': 'jibo-sdk:delete-frame' + 'cmd-i': 'jibo-sdk:insert-blank-frame' + 'shift-cmd-i': 'jibo-sdk:delete-frame' + 'backspace': 'jibo-sdk:delete' + 'delete': 'jibo-sdk:delete' + 'escape': 'jibo-sdk:stop-playing' + 'space': 'jibo-sdk:start-playing' + 'left': 'jibo-sdk:step-backward' + 'right': 'jibo-sdk:step-forward' + 'down': 'jibo-sdk:next-layer' + 'up': 'jibo-sdk:previous-layer' + +'.animation-editor .animation-channel-label input': + 's': 'native!' + 'a': 'native!' + 'r': 'native!' + 'd': 'native!' + 'backspace': 'native!' + 'delete': 'native!' + 'left': 'native!' + 'right': 'native!' + 'enter': 'native!' + 'space': 'native!' + + '.animation-editor .animation-settings .settings-container input': + 'enter': 'jibo-sdk:confirm' + 'escape': 'jibo-sdk:escape' + +'.animation-editor atom-text-editor': + 'backspace': 'core:backspace' + 'delete': 'core:delete' + 'left': 'core:move-left' + 'right': 'core:move-right' + 's': 'native!' + 'a': 'native!' + 'r': 'native!' + 'd': 'native!' + 'space': 'native!' + 'enter': 'core:confirm' + 'escape': 'jibo-sdk:lose-focus' + + '.animation-editor .event-editor atom-text-editor:not([mini])': + 'enter': 'editor:newline' + 'up': 'core:move-up' + 'down': 'core:move-down' + 'escape': 'jibo-sdk:lose-focus' + 'ctrl-s': 'jibo-sdk:upsert-and-save' + +'.debug-pane atom-text-editor' : + 'backspace': 'core:backspace' + 'delete': 'core:delete' + 'left': 'core:move-left' + 'right': 'core:move-right' + 's': 'native!' + 'a': 'native!' + 'r': 'native!' + 'enter': 'core:confirm' + +'.flow-editor' : + 'ctrl-o p': 'jibo-sdk:preflight-flow' + + 'ctrl-o t g': 'jibo-sdk:toggle-grid' + 'ctrl-o t a': 'jibo-sdk:toggle-alignment-guide' + 'ctrl-o t s': 'jibo-sdk:toggle-snap-into-position' + 'ctrl-o t b': 'jibo-sdk:toggle-bezier-links' + + 'ctrl-o a t': 'jibo-sdk:align-shape-tops' + 'ctrl-o a m': 'jibo-sdk:align-shape-middles' + 'ctrl-o a b': 'jibo-sdk:align-shape-bottoms' + 'ctrl-o a l': 'jibo-sdk:align-shape-lefts' + 'ctrl-o a c': 'jibo-sdk:align-shape-centers' + 'ctrl-o a r': 'jibo-sdk:align-shape-rights' + 'ctrl-o a w': 'jibo-sdk:align-shape-widths' + 'ctrl-o a h': 'jibo-sdk:align-shape-heights' + + 'ctrl-o d v': 'jibo-sdk:distribute-shapes-vertically' + 'ctrl-o d h': 'jibo-sdk:distribute-shapes-horizontally' + 'ctrl-o d t': 'jibo-sdk:distribute-shapes-tops' + 'ctrl-o d m': 'jibo-sdk:distribute-shapes-middles' + 'ctrl-o d b': 'jibo-sdk:distribute-shapes-bottoms' + 'ctrl-o d l': 'jibo-sdk:distribute-shapes-lefts' + 'ctrl-o d c': 'jibo-sdk:distribute-shapes-centers' + 'ctrl-o d r': 'jibo-sdk:distribute-shapes-rights' diff --git a/node_modules/jibo-sdk/lib/jibo-sdk.js b/node_modules/jibo-sdk/lib/jibo-sdk.js new file mode 100644 index 0000000..f6b72dc --- /dev/null +++ b/node_modules/jibo-sdk/lib/jibo-sdk.js @@ -0,0 +1,23 @@ +/** + * jibo-sdk - Jibo's SDK plugin for Atom + * @version v3.9.10 + * @license Copyright (c) 2017, Jibo, Inc. All rights reserved. + * All use of the Jibo SDK is subject to the Jibo SDK End User License Agreement (EULA) + * distributed herewith. If you did not receive a copy of the EULA, you may view a + * copy at https://developers.jibo.com/license. + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.jiboSdk=e()}}(function(){return function e(t,o,i){function n(r,s){if(!o[r]){if(!t[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var c=o[r]={exports:{}};t[r][0].call(c.exports,function(e){var o=t[r][1][e];return n(o?o:e)},c,c.exports,e,t,o,i)}return o[r].exports}for(var a="function"==typeof require&&require,r=0;r-.5&&this.targetthis.target&&this.audio.playAtTime(this.target),this.lastTarget=this.target,this.wasInRange=e}},e.prototype.update=function(){if(this.doUpdate){requestAnimationFrame(this.update.bind(this));var e=(new Date).getTime();if(e-this.lastUpdate<100)return;this.lastUpdate=e,this.handleDown&&this.isInRange&&this.wasInRange?this.audio.target=this.target:this.audio&&this.audio.reset()}},e.prototype.dispose=function(){this.stopUpdateLoop(),this.audio.dispose(),this.audio=null,this.model=null},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=a},{"./pid-audio-controller":5,path:void 0}],4:[function(e,t,o){"use strict";var i=e("./audio-playback"),n=function(){function e(e,t){this.model=e,this.root=t,this.playbacks=[],this.rebuild(),this.onPropsChanged=this.onPropsChanged.bind(this),this.onDataChanged=this.onDataChanged.bind(this),this.onTogglePlay=this.onTogglePlay.bind(this),this.onToggleTimeScrub=this.onToggleTimeScrub.bind(this),this.onTimeScrub=this.onTimeScrub.bind(this),this.model.on("onpropertieschanged",this.onPropsChanged),this.model.on("ondatachanged",this.onDataChanged),this.model.on("toggle-play",this.onTogglePlay),this.model.on("toggle-time-scrub",this.onToggleTimeScrub),this.model.on("drag-keyframe",this.onTimeScrub)}return e.prototype.onToggleTimeScrub=function(e){this.playbacks.forEach(function(t){t.onToggleTimeScrub(e)})},e.prototype.onTogglePlay=function(e){this.playbacks.forEach(function(t){t.onTogglePlay(e)})},e.prototype.onTimeScrub=function(){this.playbacks.forEach(function(e){e.onTimeScrub()})},e.prototype.onDataChanged=function(){this.playbacks.forEach(function(e){e.onDataChanged()})},e.prototype.rebuild=function(){var e=this;this.playbacks.forEach(function(e){e.dispose()}),this.playbacks=[],this.map={};var t=this.model.getLayersOfType("Audio Event");t.forEach(function(t){t.visible&&!t.locked&&(e.map[t.id]=[],t.keyframes.forEach(function(o){if(o.value.AudioEvent.file&&o.value.AudioEvent.file.length>0){var n=new i.default(e.model,e.root,o);e.playbacks.push(n),e.map[t.id][o.time]=n}}))})},e.prototype.onPropsChanged=function(){this.rebuild()},e.prototype.dispose=function(){this.playbacks.forEach(function(e){e.dispose()}),this.model.removeListener("ondatachanged",this.onDataChanged),this.model.removeListener("toggle-play",this.onTogglePlay),this.model.removeListener("toggle-time-scrub",this.onToggleTimeScrub),this.model.removeListener("time-scrub",this.onTimeScrub),this.playbacks=[]},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{"./audio-playback":3}],5:[function(e,t,o){"use strict";var i=e("node-pid-controller"),n=e("./two-way-controller"),a=function(){function e(e){this.pid=new i(5,1,.02,!1),this._target=0,this.pid.setTarget(this._target),this.audio=new n.default(e),this.isPlaying=!1}return e.prototype.load=function(e){var t=this;this.audio.load(function(){t.isPlaying=!0,e()})},e.prototype.playAtTime=function(e,t){void 0===t&&(t=1),this.audio.playAtTime(e,t)},e.prototype.stop=function(){this.isPlaying=!1,this.audio.stop()},Object.defineProperty(e.prototype,"target",{set:function(e){var t=this.audio.currentTime-e,o=this.pid.update(t);this.audio.playbackRate=o},enumerable:!0,configurable:!0}),e.prototype.zeroPid=function(){this.pid.update(0)},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.audio.currentTime},set:function(e){this.audio.currentTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.audio.duration},enumerable:!0,configurable:!0}),e.prototype.getSamples=function(e){return this.audio.getSamples(e)},e.prototype.reset=function(){this.pid.reset()},e.prototype.dispose=function(){this.audio.dispose(),this.audio=null,this.pid=null},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=a},{"./two-way-controller":6,"node-pid-controller":void 0}],6:[function(e,t,o){"use strict";var i=e("./audio-controller"),n=e("async"),a={FORWARD:0,REVERSE:1},r=function(){function e(e){this.forward=new i.default(e),this.reverse=new i.default(e,!0),this.direction=a.FORWARD,this.forward.onCurrentTime=this.onCurrentTime.bind(this),this._currentTime=0}return Object.defineProperty(e.prototype,"duration",{get:function(){return this.forward.duration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._currentTime},set:function(e){this._currentTime=e,this.reverse.currentTime=this.forward.duration-e,this.forward.currentTime=e,this.direction===a.REVERSE?this.forward.stop():this.reverse.stop()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(e){this._playbackRate=e,e>=0&&this.direction===a.REVERSE?(this.direction=a.FORWARD,this.forward.currentTime=this._currentTime,this.forward.onCurrentTime=this.onCurrentTime.bind(this),this.reverse.onCurrentTime=null,this.reverse.stop()):e<0&&this.direction===a.FORWARD&&(this.direction=a.REVERSE,this.reverse.currentTime=this.forward.duration-this._currentTime,this.reverse.onCurrentTime=this.onCurrentTime.bind(this),this.forward.onCurrentTime=null,this.forward.stop()),this.direction===a.FORWARD?this.forward.playbackRate=e:this.direction===a.REVERSE&&(this.reverse.playbackRate=-e)},enumerable:!0,configurable:!0}),e.prototype.load=function(e){var t=this;n.parallel([function(e){t.forward.load(e)},function(e){t.reverse.load(e)}],e)},e.prototype.stop=function(e){void 0===e&&(e=0),this.currentTime=e,this.forward.stop(),this.reverse.stop()},e.prototype.onCurrentTime=function(e){this.direction===a.REVERSE?this._currentTime=this.forward.duration-e:this._currentTime=e},e.prototype.playAtTime=function(e,t){void 0===t&&(t=1),this._currentTime=e||0,this._playbackRate=t,this.direction===a.REVERSE&&(this.direction=a.FORWARD,this.forward.onCurrentTime=this.onCurrentTime.bind(this),this.reverse.onCurrentTime=null,this.reverse.stop()),this.forward.currentTime=this._currentTime,this.forward.playbackRate=this._playbackRate},e.prototype.dispose=function(){this.forward.onCurrentTime=null,this.forward.dispose(),this.reverse.onCurrentTime=null,this.reverse.dispose(),this.forward=null,this.reverse=null},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{"./audio-controller":2,async:void 0}],7:[function(e,t,o){"use strict";var i=e("animation-utilities"),n=e("atom"),a=e("animation-utilities"),r=e("./dof-controller"),s=e("../views/three-debug"),l=new a.JiboConfig,d=function(){function e(e){this.animationModel=e,this.disposable=new n.CompositeDisposable}return e.prototype.dispose=function(){this.disposable.dispose()},e.prototype.onMouseDown=function(e){this.container.focus(),this.onMouseChange(e)},e.prototype.onMouseChange=function(e){this.renderer&&(this.animationModel.keyframeSelection.isMultiSelect()||!this.animationModel.isLayerOfTypeSelected("Body")?(this.container.childNodes[1].pointerEvents="none",this.container.childNodes[1].style.cursor="not-allowed"):(this.container.childNodes[1].pointerEvents="",this.container.childNodes[1].style.cursor="pointer"))},e.prototype._getThreeColorFromConfig=function(e){var t=atom.config.get("jibo-sdk."+e);return new i.THREE.Color(t.red/255,t.green/255,t.blue/255)},e.prototype._updateBackgroundColor=function(){var e=this._getThreeColorFromConfig("AnimationEditorBackgroundColor");this.renderer.setBackgroundColor(e.r,e.g,e.b,1)},e.prototype._updateGridColor=function(){this.renderer.setGrid(.05,6,this._getThreeColorFromConfig("AnimationEditorGridColor"))},e.prototype.getPaddedValueString=function(e){var t=e<10?"0":"";return t+e},e.prototype.setCamera=function(e){var t=this,o=.35,n=.5,a=new i.THREE.Vector3(0,0,.15);this.renderer.scene._controls.reset();var r={front:function(){t.renderer.setCamera(new i.THREE.Vector3(n,0,o),a,45)},back:function(){t.renderer.setCamera(new i.THREE.Vector3(-n,0,o),a,45)},left:function(){t.renderer.setCamera(new i.THREE.Vector3(0,n,o),a,45)},right:function(){t.renderer.setCamera(new i.THREE.Vector3(0,-n,o),a,45)}};r[e]()},e.prototype.initialize=function(e,t){var o=this;this.container=e,e.addEventListener("mousemove",this.onMouseChange.bind(this),!0),e.addEventListener("mousedown",this.onMouseDown.bind(this),!0),e.addEventListener("mouseup",this.onMouseChange.bind(this),!0),a.RobotInfo.createInfo(l,function(n){a.visualize.createRobotRenderer(n,e,a.visualize.DisplayType.BODY,function(a){a&&(o.renderer=a,o.robotInfo=n,o.dofValues=n.getDefaultDOFValues(),o.debug=new s.default(o.renderer.scene.getScene()),a.setCamera(new i.THREE.Vector3(.5,0,.35),new i.THREE.Vector3(0,0,.15),45),o.dofController=r.default.createWithRenderer(o.renderer,e,r.default.ControllerType.BODY,n),o.dofController.setDOFValues(o.dofValues),o.listenForChanges(),o._updateBackgroundColor(),o.disposable.add(atom.config.observe("jibo-sdk.AnimationEditorBackgroundColor",function(){o._updateBackgroundColor()})),o._updateGridColor(),o.disposable.add(atom.config.observe("jibo-sdk.AnimationEditorGridColor",function(){o._updateGridColor()})),t(null))})})},e.prototype.listenForChanges=function(){var e=this,t=this;this.dofController.on(r.default.EventType.DOF_VALUES_CHANGED,function(o,i){var n=e.animationModel.getLayersOfType("Body");0!==n.length&&"Body"===e.animationModel.getSelectedLayer().type&&(i.topSection_r&&t.animationModel.updateSelectedLayerPropertiesRelative({Head:i.topSection_r/Math.PI*180}),i.middleSection_r&&t.animationModel.updateSelectedLayerPropertiesRelative({Torso:i.middleSection_r/Math.PI*180}),i.bottomSection_r&&t.animationModel.updateSelectedLayerPropertiesRelative({Pelvis:i.bottomSection_r/Math.PI*180}))}),this.dofController.on(r.default.EventType.DOF_SELECTION_CHANGED,function(e,t){1!==t.length}),this.dofController.on(r.default.EventType.DOF_MANIPULATION_ENDED,function(){t.animationModel.addRedoUndoEntry()})},e.prototype.updateDofValues=function(e){this.dofValues=e,this.dofController&&this.dofController.setDOFValues(this.dofValues)},e.prototype.update=function(){this.renderer&&this.renderer.display(this.dofValues)},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=d},{"../views/three-debug":45,"./dof-controller":8,"animation-utilities":void 0,atom:void 0}],8:[function(e,t,o){"use strict";var i=e("animation-utilities"),n={DOF_VALUES_CHANGED:"DOF_VALUES_CHANGED",DOF_SELECTION_CHANGED:"DOF_SELECTION_CHANGED",DOF_MANIPULATION_ENDED:"DOF_MANIPULATION_ENDED"},a={BODY:"BODY"},r=function(e,t,o,i){if(o!==a.BODY)throw new Error("DOFController: unsupported controller type: "+o);return new c(e,t,o,i)},s="topSection_r",l="middleSection_r",d="bottomSection_r",c=function(e,t,o,a){this.renderer=e,this.scene=e.scene,this.controllerType=o,this.robotInfo=a,e.setGrid(.1,4,new i.THREE.Color(.2,.2,.2)),this.dofValues={};for(var r=a.getDOFNames(),c=0;c0){o=u.getSelectedDOFs()[0],v=!0;var i=.5*e.movementX*Math.PI/180,a=u.dofValues[o]+i,r={};r[o]=a,e.shiftKey&&(o===l&&(r[s]=u.dofValues[s]-i),o===d&&(r[l]=u.dofValues[l]-i)),u.setDOFValues(r),u._fireEvent(n.DOF_VALUES_CHANGED,r)}}else o=p(e,m,u.scene.getScene(),u.scene.getCamera()),o&&(u.setSelectedDOFs([o]),u._fireEvent(n.DOF_SELECTION_CHANGED,u.getSelectedDOFs()))},k=function(e){y&&f&&g(e)&&b(e,!0)},S=function(){y&&(y=!1,f&&(v&&(v=!1,u._fireEvent(n.DOF_MANIPULATION_ENDED)),null!==u.getSelectedDOFs()&&u.getSelectedDOFs().length>0&&(u.setSelectedDOFs([]),u._fireEvent(n.DOF_SELECTION_CHANGED,u.getSelectedDOFs()))))},w=function(e){y=!0,f&&g(e)&&b(e,!1)};this.detachFromContainer=function(e){void 0!==e&&e!==!0||u.renderer.detachFromContainer(),null!==m&&(m.removeEventListener("mousemove",k,h),m.removeEventListener("mouseup",S,h),m.removeEventListener("mouseleave",S,h),m.removeEventListener("mousedown",w,h),v&&(v=!1,u._fireEvent(n.DOF_MANIPULATION_ENDED)),null!==u.getSelectedDOFs()&&u.getSelectedDOFs().length>0&&(u.setSelectedDOFs([]),u._fireEvent(n.DOF_SELECTION_CHANGED,u.getSelectedDOFs())),f=!1,m=null)},this.attachToContainer=function(e,t){u.detachFromContainer(t),m=void 0!==e?e:null,null!==m&&(void 0!==t&&t!==!0||u.renderer.attachToContainer(m),m.addEventListener("mousemove",k,h),m.addEventListener("mouseup",S,h),m.addEventListener("mouseleave",S,h),m.addEventListener("mousedown",w,h),f=!0)},this.dispose=function(e){u.detachFromContainer(!1),null!==u.renderer&&(void 0!==e&&e!==!0||u.renderer.dispose(),u.renderer=null),u.scene=null,u.robotInfo=null,u.eventListeners=null},this.attachToContainer(t,!1)};c.prototype.getDOFValues=function(){return this.dofValues},c.prototype.setDOFValues=function(e){for(var t=Object.keys(e),o=0;o0){var l=h[s[0].object.name];return l||null}return null};Object.defineProperty(o,"__esModule",{value:!0}),o.default={EventType:n,ControllerType:a,createWithRenderer:r}},{"animation-utilities":void 0}],9:[function(e,t,o){"use strict";function i(e,t,o){var i=[t,0];return w.apply(i,E.call(arguments,2)),M.apply(e,i),e}var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("events"),r=e("jibo-keyframes"),s=r.JiboKeyframeInfo,l=e("lodash"),d=e("../../common/undo-redo"),c=e("../../common/clipboard"),u=e("animation-utilities"),h=e("./keyframe-selection"),p=e("fs"),m=e("path"),f=e("crypto"),v=e("./keyframes-compositer"),y="win32"===process.platform?process.env.HOMEPATH:process.env.HOME,g=m.resolve(y,".jibo");p.existsSync(g)||p.mkdirSync(g);var b=m.resolve(g,"temp");p.existsSync(b)||p.mkdirSync(b);var k=function(e){function t(t,o){var i=e.call(this)||this;i.setMaxListeners(100),i.limits={},i.editor=t,i.projectRoot=o,i.compositer=new v.default(m.dirname(i.editor.uri)),i.state={selection:{layers:[null]}},i.keyframeSelection=new h.default(i),i.uiState={currentTime:0,currentKeyframe:0,isPlaying:!1},i.getDofLimits(),i._reloadFile(t.uri);var n=f.createHash("md5");n.update(t.uri);var a=n.digest("hex"),r=m.basename(a),s=b+"/"+r+".backup";return p.existsSync(s)||i.backup(),i.undoRedo=new d.default(i),i}return n(t,e),t.createNewFile=function(e){var t=r.runtime.create(s);r.runtime.save(e,t)},t.prototype.dispose=function(){delete this.state,delete this.uiState,this.requestAnimationID&&window.cancelAnimationFrame(this.requestAnimationID)},t.prototype.getCompositedKeyframes=function(){return this.compositer.compositeKeyframes(this.state.keyframes)},t.prototype.getDofLimits=function(){var e=this,t=new u.JiboConfig;u.RobotInfo.createInfo(t,function(t){t.getBodyDOFNames().forEach(function(o){var i=r.channels.dofNameToDisplayName(o);e.limits[i]={};var n=t.getDOFInfo(o),a=n.getLimit("velocity"),s=n.getLimit("acceleration");e.limits[i].velocityLimit=a,e.limits[i].accelerationLimit=s}),e.robotInfo=t,e.emit("onpropertieschanged")})},t.prototype.setLimit=function(e,t){this.limits.exceedsVelLimit=e,this.limits.exceedsAccelLimit=t},t.prototype.getKeyframeInfo=function(){return s},t.prototype.getLayer=function(e){for(var t=0;t=this.state.keyframes.duration&&this.setKeyframe(this.state.keyframes.duration-1),this.isPlaying()&&this.togglePlay(),t!==this.state.selection.layers[0]&&this.emit("layerselected")},t.prototype.reloadFile=function(){this._reloadFile(this.editor.uri)},t.prototype._reloadFile=function(e){var t=this;return this.state?(this.state.keyframes=r.runtime.load(e,s),this.state.overrides={},this.state.keyframes.layers.forEach(function(e){t.state.overrides[e.id]={}}),this.syncOverrides(),this.reload(this.state),this.emit("ondatachanged"),void this.emit("onpropertieschanged")):(console.warn("attempting to reload destroyed AM for ",this),"")},t.prototype.getDuration=function(){return this.state.keyframes.duration},t.prototype.setDuration=function(e,t,o){return this.state.keyframes.duration=this.multiplier&&!t?Math.ceil(e*this.multiplier):e,o&&(this.state.keyframes.layers.forEach(function(t){var o=l.findIndex(t.keyframes,function(t){return t.time>=e});o!==-1&&(t.keyframes=t.keyframes.slice(0,o))}),this.uiState.currentKeyframe>=this.state.keyframes.duration&&this.setKeyframe(this.state.keyframes.duration-1),this.keyframeSelection.validateSelection()),this.emit("ondatachanged"),this.emit("onpropertieschanged"),this.state.keyframes.duration},t.prototype.setKeyframes=function(){var e=this;this.multiplier&&(this.state.keyframes.layers.forEach(function(t){t.keyframes.forEach(function(t){t.time=Math.floor(t.time*e.multiplier)})}),this.syncOverrides(),this.emit("ondatachanged"),this.emit("onpropertieschanged"))},t.prototype.setScale=function(e){e!==this.state.keyframes.scale&&(this.state.keyframes.scale&&(this.multiplier=e/this.state.keyframes.scale),this.state.keyframes.scale=e)},t.prototype.insertBlankFrame=function(e){var t=this,o=[];this.keyframeSelection.forEachLayerSelected(!0,function(e){o.push(t.getLayer(e))});var i=this.keyframeSelection.getLengthSelected();this.setDuration(this.state.keyframes.duration+i,!0,!0),o.forEach(function(t){t.keyframes.forEach(function(t){t.time>=e&&(t.time+=i)})}),this.emit("ondatachanged"),this.emit("onpropertieschanged")},t.prototype.deleteFrame=function(e){var t=this,o=[];this.keyframeSelection.forEachLayerSelected(!0,function(e){o.push(t.getLayer(e))});var i=this.keyframeSelection.getLengthSelected();o.forEach(function(o){for(var n=0;ne+i?a.time-=i:a.time>=e&&a.timet){e.keyframes=i(e.keyframes,a,n),o=!0;break}o||e.keyframes.push(n),this.addRedoUndoEntry()},t.prototype.keyframeExists=function(e,t){var o=this.getLayer(e);return!!o&&l.findIndex(o.keyframes,function(e){return t===e.time})!==-1},t.prototype.getKeyframe=function(e,t){var o=this.getLayer(e);if(o){var i=l.findIndex(o.keyframes,function(e){return t===e.time});if(t!==-1)return o.keyframes[i]}return null},t.prototype.moveKeyframe=function(e,t,o,i,n,a){var r=this.getLayer(e),s=this.getLayer(o),d=l.findIndex(r.keyframes,function(e){return e.time===t}),c=r.keyframes[d];a||r.keyframes.splice(d,1),this.upsertKeyframe(s,i,c.value),this.syncOverrides(),n!==!1&&(this.emit("ondatachanged"),this.emit("onpropertieschanged"))},t.prototype.upsertKeyframe=function(e,t,o){var n=l.findIndex(e.keyframes,function(e){return e.time===t}),a={value:l.cloneDeep(o),time:t};if(n!==-1)e.keyframes[n]=a;else if(0===e.keyframes.length||e.keyframes[e.keyframes.length-1].timet});e.keyframes=i(e.keyframes,r,a)}},t.prototype.resetKeyframes=function(){for(var e in this.state.overrides)this.state.overrides[e]=this.getDefaultPropsForLayerType(this.getLayer(e).type)},t.prototype.syncOverrides=function(){var e=this;this.state.overrides={},this.state.keyframes.layers.forEach(function(t){var o=r.runtime.evaluateLayer(t,e.state.keyframes,s,e.uiState.currentTime);e.state.overrides[t.id]=o})},t.prototype.evaluateAllDOFLayers=function(){var e=this.getCompositedKeyframes(),t=r.runtime.evaluateAllDOFLayers(e,s,this.uiState.currentTime,this.state.overrides);return t},t.prototype.evaluateAllLayersFiltered=function(e){var t=r.runtime.evaluateAllLayersFiltered(this.state.keyframes,s,this.uiState.currentTime,e,!0,this.state.overrides);return t},t.prototype.getDefaultPropsForLayerType=function(e){var t=s.layerTypes[e].getInfo(),o={};for(var i in t.properties)o[i]=l.cloneDeep(t.properties[i].defaultValue);return o},t.prototype.saveFile=function(e){this.state?(r.runtime.save(e,this.state.keyframes),this.emit("save")):console.error("Attempting to save destroyed AM for uri ",this.editor.uri)},t.prototype.isLayerSelected=function(e){for(var t=0;tthis.state.keyframes.duration/this.state.keyframes.framerate;)this.uiState.currentTime-=this.state.keyframes.duration/this.state.keyframes.framerate;var o=Math.floor(this.uiState.currentTime*this.state.keyframes.framerate);this.uiState.currentKeyframe!==o&&this.setKeyframe(o,!0),this.requestAnimationID=window.requestAnimationFrame(this.playLoop.bind(this))},t.prototype.togglePlay=function(){this.isPlaying()?(window.cancelAnimationFrame(this.requestAnimationID),this.requestAnimationID=void 0):(this.lastLoopTime=(new Date).getTime(),this.requestAnimationID=window.requestAnimationFrame(this.playLoop.bind(this))),this.uiState.isPlaying=!this.uiState.isPlaying,this.emit("ondatachanged"),this.emit("toggle-play",this.uiState.isPlaying)},t.prototype.getCurrentTime=function(){return this.uiState.currentTime},t.prototype.stepTimeForward=function(){this.isPlaying()&&this.togglePlay(),this.setKeyframe((this.uiState.currentKeyframe+1)%this.state.keyframes.duration)},t.prototype.stepTimeBackward=function(){this.isPlaying()&&this.togglePlay(),0===this.uiState.currentKeyframe?this.setKeyframe(this.state.keyframes.duration-1):this.setKeyframe(this.uiState.currentKeyframe-1)},t.prototype.nextLayer=function(){if(!(this.state.keyframes.layers.length<2))for(var e=0;e0?e-1:this.state.keyframes.layers.length-1;return this.setSelection(this.state.keyframes.layers[t].id),void this.addRedoUndoEntry()}},t.prototype.canMoveUp=function(e){if(this.state.keyframes.layers.length<2)return!1;var t=this.getLayerIndex(e),o=t>0?t-1:t;return t!==o},t.prototype.canMoveDown=function(e){if(this.state.keyframes.layers.length<2)return!1;var t=this.getLayerIndex(e),o=tt||(t=o.time)}),t===Number.MAX_SAFE_INTEGER?this.setKeyframe(0):this.setKeyframe(t))},t.prototype.goToPrevKeyframe=function(){var e=this,t=-1,o=this.state.selection.layers[0],i=this.getLayer(o);0!==i.keyframes.length&&(i.keyframes.forEach(function(o){o.time>=e.uiState.currentKeyframe||o.time=0?"an":"a";a+="\n "+d+" "+l.type+" layer called "+l.name}a+="\nWhat should we do?";var c=n.showMessageBox(o,{type:"question",buttons:["Cancel the Paste","Add the Extra Layers","Ignore the Extra Layers"],defaultId:1,title:"Clipboard has Extra Layers",message:a});if(0===c)return!1;if(1===c)for(var u=0,h=t;ue?e=i:i=2)return!0;return!1},t.prototype.isAnchor=function(e,t){return this.animationModel.getLayerIndex(e)===this.getState().anchor.layerIndex&&t===this.getState().anchor.keyframeIndex},t.prototype.isSelected=function(e,t){return"undefined"!=typeof this.getState().selected[e]&&i.findIndex(this.getState().selected[e],function(e){return e===t})!==-1},t.prototype.onClick=function(e,t,o){this.onMouseDown(e,t,o)},t.prototype.onMouseDown=function(e,t,o,i){void 0===i&&(i=!1),1!==e.nativeEvent.which&&(e.preventDefault(),e.stopPropagation());var n=a.NORMAL;if("win32"===process.platform?e.nativeEvent.ctrlKey&&(n=a.TOGGLE):e.nativeEvent.metaKey&&(n=a.TOGGLE),"click"!==e.type||!this.isSingleSelect()&&n!==a.TOGGLE){var r=this.isSelected(t,o);if("click"===e.type||n!==a.NORMAL||e.nativeEvent.shiftKey!==!1||!r){n===a.NORMAL&&("click"===e.type||e.nativeEvent.shiftKey===!0||r===!1&&"click"!==e.type&&e.nativeEvent.shiftKey!==!0)&&(this.animationModel.setKeyframe(o),this.animationModel.setSelection(t),this._clearSelection(),i=!0);var s=this.animationModel.getLayerIndex(t);if(e.nativeEvent.shiftKey===!1)this._addKeyframe(t,o,n)&&(i=!0);else for(var l=Math.min(this.anchor.layerIndex,s),d=Math.max(this.anchor.layerIndex,s),c=l;c<=d;c++)for(var u=Math.min(this.anchor.keyframeIndex,o),h=Math.max(this.anchor.keyframeIndex,o),p=u;p<=h;p++)this._addKeyframe(this.animationModel.getLayerByIndex(c).id,p,n)&&(i=!0);e.nativeEvent.shiftKey===!1&&(this.anchor.layerIndex=s,this.anchor.keyframeIndex=o);var m=this.animationModel.getLayerByIndex(s);m!==this.animationModel.getSelectedLayer()&&(this.animationModel.setSelection(t),i=!0),i&&(this.animationModel.addRedoUndoEntry(),this.animationModel.emit("ondatachanged"))}}},t.prototype.clearSelection=function(){this._clearSelection()&&(this.animationModel.addRedoUndoEntry(),this.animationModel.emit("ondatachanged"))},t.prototype.selectAll=function(){this._clearSelection();for(var e=0;e=i.animationModel.getLayerCount()?void(l[e]=!0):void(i.animationModel.getLayerByIndex(t).type!==i.animationModel.getLayerByIndex(o).type&&(s=!0))}),!s){var d=a<0,c=r<0;if(this.forEachSelected(c,d,function(e,t,s){var l=i.animationModel.getLayerIndex(e)+r,d=i.animationModel.getLayerByIndex(l).id,c=t+a;i.animationModel.keyframeExists(e,t)&&(l>=0&&l<=n.animationModel.getLayerCount()-1&&c>=0&&c<=n.animationModel.getDuration()-1?n.animationModel.moveKeyframe(e,t,d,c,!0,o):o||n.animationModel._deleteKeyByTime(e,t));var u=i.getState().selected[e];u[s]=u[s]+a}),t.layerId!==e.layerId){for(var u in l)delete this.getState().selected[u];var h={};for(var u in this.getState().selected){var p=this.animationModel.getLayerIndex(u);h[this.animationModel.getLayerByIndex(p+r).id]=this.getState().selected[u]}this.getState().selected=h}this.animationModel.setSelection(t.layerId),this.animationModel.addRedoUndoEntry(),this.animationModel.emit("ondatachanged"),this.animationModel.emit("onpropertieschanged")}},t.prototype.cutSelectedKeyframes=function(){this.copySelectedKeyframes(),this.deleteKeyframes()},t.prototype.copySelectedKeyframes=function(){var e,t=this;if(this.isMultiSelect())e=this.getState().selected;else{var o=this.getCurrentKeyframe();if(void 0===o.layerId)return;e={},e[o.layerId]=[o.keyframeIndex]}var a=this.animationModel.getDuration()-1,r=this.animationModel.getLayerCount()-1;for(var s in e)r=Math.min(r,this.animationModel.getLayerIndex(s)),e[s].forEach(function(e){a=Math.min(a,e)});var l=[],d=function(o){var n=c.animationModel.getLayer(o),s={layerType:n.type,type:n.type,name:n.name,layerIndex:c.animationModel.getLayerIndex(o)-r,keyframes:[]};e[o].forEach(function(e){var n=t.animationModel.getKeyframe(o,e);n?s.keyframes.push({keyframeIndex:e-a,value:i.cloneDeep(n.value)}):s.keyframes.push({keyframeIndex:e-a,value:null})}),l.push(s)},c=this;for(var s in e)d(s);if(l=i.sortBy(l,function(e){return e.layerIndex}),l.length){var u={type:"keyframes",value:l};n.default.animationData=JSON.stringify(u)}},t.prototype.pasteKeyframes=function(e,t){var o=this.animationModel.getLayerByIndex(0).id;if(this.canPasteKeyframes(o,!0)!==!1){var i=this._clearSelection(),n=this.getLayerMaps(o),r=n.srcMap,s=n.dstMap,l=this.getFinalDurationOfCopy(r,s,t)+1;this.possiblyExtendDuration(l);var d=this.animationModel.getDuration(),c=[];for(var u in r){var h=r[u],p=s[u]||{};for(var m in h)if(m in p)for(var f=h[m],v=p[m],y=0,g=f.keyframes;y=d)break;null!==b.value&&this.animationModel.upsertKeyframe(v,k,b.value),i=!0,c.push({id:v.id,index:k})}}i&&(this.animationModel.syncOverrides(),this.animationModel.emit("ondatachanged"),this.animationModel.emit("onpropertieschanged"),this.animationModel.addRedoUndoEntry());for(var S=0,w=c;S=l)break;null!==m.value&&this.animationModel.upsertKeyframe(u,f,m.value),o=!0,d.push({id:u.id,index:f})}o&&(this.animationModel.syncOverrides(),this.animationModel.emit("ondatachanged"),this.animationModel.emit("onpropertieschanged"),this.animationModel.addRedoUndoEntry());for(var v=0,y=d;vo){var i=atom.getCurrentWindow(),n=e("remote"),a=n.dialog||n.require("dialog"),r=t-o,s="You are pasting keyframes beyond the end of your animation. Would you like to extend the animation by "+r+" frames to make it fit?",l=a.showMessageBox(i,{type:"question",buttons:["No","Yes"],defaultId:1,title:"Paste Duration Exceeds Model",message:s});if(0===l)return!1;this.animationModel.setDuration(t,!0,!0)}},t.prototype.getFinalDurationOfCopy=function(e,t,o){var i=0;for(var n in e){var a=e[n],r=t[n]||{};for(var s in a)if(s in r){var l=a[s],d=l.keyframes[l.keyframes.length-1];i=Math.max(i,d.keyframeIndex)}}return i+o},t.prototype.getFinalDurationOfSingleLayer=function(e,t){var o=e[0],i=o.keyframes[o.keyframes.length-1].keyframeIndex;return i+t},t.prototype._clearSelection=function(){var e=!1;for(var t in this.getState().selected)this.getState().selected[t].length&&(e=!0);return this.getState().selected={},e},t.prototype._addKeyframe=function(e,t,o){var n,r=o===a.TOGGLE&&this.isSelected(e,t);if(r){if("undefined"==typeof this.getState().selected[e])return!1;n=this.getState().selected[e].length,i.remove(this.getState().selected[e],function(e){return e===t})}else{if("undefined"==typeof this.getState().selected[e])return this.getState().selected[e]=[t],!0;n=this.getState().selected[e].length,this.getState().selected[e].push(t),this.getState().selected[e].sort(function(e,t){return e-t}),this.getState().selected[e]=i.uniq(this.getState().selected[e])}return n!==this.getState().selected[e].length},t.prototype.hasLockedLayer=function(e){for(var t=e?[e]:Object.keys(this.getState().selected),o=0,i=t;o=0;t--){var o=e.layers[t];"Reference"===o.type&&e.layers.splice(t,1)}},e.prototype.timeshift=function(e,t,o,i){for(var n=0,a=e.layers;no&&(r.validUpto=o),r.holdAfter>i&&(r.holdAfter=i);for(var s=0,l=r.keyframes;s=0;i--)t.layers.splice(e,0,o.layers[i])},e.prototype.fixLayerIds=function(e,t){for(var o=0,i=0,n=e.layers;i=0},e.prototype.hasCircularReference=function(e,t){for(var o=0,i=e.layers;o=0)return!0}return!1},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=s},{fs:void 0,"jibo-keyframes":void 0,path:void 0}],12:[function(e,t,o){"use strict";var i=e("react"),n=e("./visualizer"),a=e("./timeline"),r=e("../../atom-react/mixins/pane-resize-event-mixin"),s=e("../../common/layout/layout"),l=e("../../common/layout/h-layout"),d=e("../../common/layout/v-layout"),c=e("./properties"),u=e("./pixi/pixi-view"),h=e("atom"),p=e("lodash"),m=e("fs"),f=e("jibo"),v=e("jibo-keyframes").JiboKeyframeInfo,y=i.createClass({displayName:"editor",mixins:[r.default],getInitialState:function(){return{visualizerWidth:0,visualizerHeight:0,timelineWidth:0,timelineHeight:0,focusOnProps:!0}},componentWillMount:function(){var e=this,t=this;this.props.editor.animationModel.on("ondatachanged",function(){t.forceUpdate()}),this.props.editor.animationModel.on("onpropertieschanged",function(){e.checkModified()}),this.props.editor.animationModel.on("save",function(){e.checkModified()})},checkModified:function(){var e=this;try{m.readFile(this.props.editor.uri,"utf8",function(t,o){var i=JSON.parse(o);v.onLoad(i),e.props.editor.animationModel.state&&(p.isEqual(i,e.props.editor.animationModel.state.keyframes)?e.props.editor.setModifiedStatus(!1):e.props.editor.setModifiedStatus(!0))})}catch(e){console.warn("error reading keyframes file, ",e)}},componentDidMount:function(){var e=this;this.setupPaneResizeEventMixin(),this.disposables=new h.CompositeDisposable,this.disposables.add(atom.commands.add(this.getDOMNode(),{"jibo-sdk:select-all-keyframes":this.selectAllKeyframes,"jibo-sdk:clear-keyframe-selection":this.clearKeyframeSelection,"jibo-sdk:upsert-keyframe":this.ifAllowed(this.upsertKeyframe),"jibo-sdk:upsert-all":this.upsertAllKeyframes,"jibo-sdk:reset-keyframes":this.ifAllowed(this.resetKeyframes),"jibo-sdk:delete":this.ifAllowed(this.deletePressed),"jibo-sdk:insert-blank-frame":this.ifAllowed(this.insertBlankFrame),"jibo-sdk:delete-frame":this.ifAllowed(this.deleteFrame),"jibo-sdk:start-playing":this.startPlaying,"jibo-sdk:stop-playing":this.stopPlaying,"jibo-sdk:step-backward":this.stepBackward,"jibo-sdk:step-forward":this.stepForward,"jibo-sdk:next-layer":this.nextLayer,"jibo-sdk:previous-layer":this.previousLayer,"core:undo":this.undo,"core:redo":this.redo,"core:cut":this.ifAllowed(this.cut),"core:copy":this.copy,"core:paste":this.ifAllowed(this.paste),"jibo-sdk:lose-focus":this.setEditorFocus,"jibo-sdk:upsert-and-save":this.ifAllowed(this.upsertAndSave)}));var t=this;requestAnimationFrame(function(){t.setState({visualizerWidth:Math.floor(e.props.paneWidth/2)-4,visualizerHeight:Math.floor(e.props.paneHeight/2)-4,timelineWidth:Math.floor(e.props.paneWidth/2)-4,timelineHeight:Math.floor(e.props.paneHeight/2)-20})}),this.onFocusInCB=this.onFocusIn.bind(this),this.getDOMNode().addEventListener("focusin",this.onFocusInCB,!0),this.onFocusOutCB=this.onFocusOut.bind(this),this.getDOMNode().addEventListener("focusout",this.onFocusOutCB,!0)},ifAllowed:function(e){var t=this;return function(o){t.props.editor.animationModel.keyframeSelection.hasLockedLayer()||e(o)}},onFocusIn:function(){},onFocusOut:function(e){this.props.editor.isPaneActive()!==!1&&(null!==e.relatedTarget&&e.relatedTarget!==document.getElementsByClassName("workspace")[0]||this.getDOMNode().focus())},startPlaying:function(){this.props.editor.animationModel.togglePlay()},stopPlaying:function(){this.props.editor.animationModel.isPlaying()&&this.props.editor.animationModel.togglePlay()},stepBackward:function(){this.props.editor.animationModel.stepTimeBackward(),this.props.editor.animationModel.keyframeSelection.clearSelection()},stepForward:function(){this.props.editor.animationModel.stepTimeForward(),this.props.editor.animationModel.keyframeSelection.clearSelection()},nextLayer:function(){this.props.editor.animationModel.nextLayer()},previousLayer:function(){this.props.editor.animationModel.previousLayer()},undo:function(){this.props.editor.animationModel.undo()},redo:function(){this.props.editor.animationModel.redo()},cut:function(){this.props.editor.animationModel.keyframeSelection.cutSelectedKeyframes()},copy:function(){this.props.editor.animationModel.keyframeSelection.copySelectedKeyframes()},paste:function(){if(this.props.editor.animationModel.keyframeSelection.isSingleSelect()){var e=this.props.editor.animationModel.keyframeSelection.getCurrentKeyframe();this.props.editor.animationModel.keyframeSelection.pasteKeyframes(e.layerId,e.keyframeIndex)}},deletePressed:function(){ +this.props.editor.animationModel.keyframeSelection.deleteKeyframes()},selectAllKeyframes:function(){this.props.editor.animationModel.keyframeSelection.selectAll()},clearKeyframeSelection:function(){this.props.editor.animationModel.keyframeSelection.clearSelection()},upsertKeyframe:function(){this.props.editor.animationModel.keyframeSelection.isSingleSelect()&&this.props.editor.animationModel.upsertKeyframes()},upsertAllKeyframes:function(){this.props.editor.animationModel.keyframeSelection.isSingleSelect()&&this.props.editor.animationModel.upsertKeyframes(!0)},resetKeyframes:function(){this.props.editor.animationModel.keyframeSelection.isSingleSelect()&&this.props.editor.animationModel.resetKeyframes()},upsertAndSave:function(){this.props.editor.animationModel.keyframeSelection.isSingleSelect()&&this.upsertKeyframe(),atom.commands.dispatch(this.getDOMNode(),"core:save")},insertBlankFrame:function(){var e=1e4;this.props.editor.animationModel.keyframeSelection.forEachSelected(!0,!0,function(t,o){o0))return;if(d===this.file)return;this.file=d;var c=p.resolve(l,"audio",d);this.clearCanvas();var u=new XMLHttpRequest;u.open("GET",c,!0),u.responseType="arraybuffer",u.onload=function(){h.decodeAudioData(u.response,function(e){var i=e.getChannelData(0),n=s.findDOMNode(t.refs.canvas),a=Math.min(o.state.keyframes.duration/o.state.keyframes.framerate-r,e.length/e.sampleRate);n.width=18*a*30,n.height=40;var l=n.getContext("2d");l.beginPath(),l.moveTo(0,20);for(var d=1/540,c=0,u=0;u=o.props.animationModel.getDuration()||l<0||l>=o.props.animationModel.getLayerCount()||(t.props.animationModel.getLayerByIndex(a).type!==t.props.animationModel.getLayerByIndex(l).type?o.getDOMNode().parentNode.parentNode.parentNode.childNodes[1+l].childNodes[0].childNodes[n].classList.add("drag-over-mismatched"):t.props.animationModel.keyframeExists(e,i)?o.getDOMNode().parentNode.parentNode.parentNode.childNodes[1+l].childNodes[0].childNodes[n].classList.add("drag-over"):o.getDOMNode().parentNode.parentNode.parentNode.childNodes[1+l].childNodes[0].childNodes[n].classList.add("drag-over-empty"))}),n={layerId:this.props.layerId,keyframeIndex:this.props.keyframeIndex}}},onDragLeave:function(){delete this.getDOMNode().style.background},clearDragOverClasses:function(){for(var e=document.getElementsByClassName("animation-channel-keyframes"),t=0;t120||r<-120?(this.lastAngle=(this.tempInitialRotation+a)/Math.PI*180-r,this.tempInitialRotation=this.lastAngle*Math.PI/180,this.tempInitialAngle=o):this.lastAngle=(this.tempInitialRotation+a)/Math.PI*180,this.animationModel.updateSelectedLayerPropertiesRelative({ +Rotate:this.lastAngle})},e.prototype.dispose=function(){this.renderer.view.removeEventListener("mousedown",this.onMouseDown),document.removeEventListener("mouseup",this.onMouseUp),this.disposed=!0},e.prototype.scaleSpheres=function(){},e.prototype.display=function(){},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=a},{"../pixi-view":25,"animation-utilities":void 0}],19:[function(e,t,o){"use strict";var i=e("jibo-keyframes"),n=e("animation-utilities"),a=e("../pixi-view"),r=function(){function e(e,t,o,a){var r=this;this.matrix=new PIXI.Matrix,this.matrix.identity(),this.renderer=e,this.robotInfo=t,this.screenWidth=this.robotInfo.getEyeScreenInfo().getWidth(),this.screenHeight=this.robotInfo.getEyeScreenInfo().getHeight(),this.animationModel=o,this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onEyeDown=this.onEyeDown.bind(this),this.onEyeMove=this.onEyeMove.bind(this),this.onEyeUp=this.onEyeUp.bind(this),this.stage=new PIXI.Container,this.renderToTop(),this.spheres=[],this.prefix=a?"overlay_vertexJoint":"vertexJoint",this.defaultVertexPositions=n.EyeKinematicsHelper.verticesForDOFValues(t.getDefaultDOFValues(),t);var s=0;Object.keys(this.defaultVertexPositions).forEach(function(e){if(0===e.indexOf(r.prefix)){if(e===r.prefix+"8"&&(r.defaultHeight=i.conversion.toPixelsY(r.defaultVertexPositions[e].y)),e===r.prefix+"6"&&(r.defaultWidth=i.conversion.toPixelsX(r.defaultVertexPositions[e].x)),e!==r.prefix+"5"){var t=r.defaultVertexPositions[e];t.x=i.conversion.toPixelsX(t.x),t.y=i.conversion.toPixelsY(t.y),r.createSphere(t,e,s)}s++}}),this.eye=a?this.renderer.eye.eyeOverlay:this.renderer.eye.eye,this.eye.interactive=!0,this.eye.on("mousedown",this.onEyeDown)}return e.prototype.onEyeDown=function(e){var t=a.WIDTH*e.data.originalEvent.offsetX/this.renderer.view.offsetWidth,o=a.HEIGHT*e.data.originalEvent.offsetY/this.renderer.view.offsetHeight;t/=this.renderer.eye.zoom,o/=this.renderer.eye.zoom,this.delta=new PIXI.Point(t-this.stage.x,o-this.stage.y),this.renderer.view.addEventListener("mousemove",this.onEyeMove),document.addEventListener("mouseup",this.onEyeUp)},e.prototype.onEyeMove=function(e){var t=a.WIDTH*e.offsetX/this.renderer.view.offsetWidth,o=a.HEIGHT*e.offsetY/this.renderer.view.offsetHeight;t/=this.renderer.eye.zoom,o/=this.renderer.eye.zoom,t-=.5*a.WIDTH+this.delta.x,o-=.5*a.HEIGHT+this.delta.y;var i={};i.Translate={x:t,y:o},this.animationModel.updateSelectedLayerPropertiesRelative(i)},e.prototype.onEyeUp=function(){this.renderer.view.removeEventListener("mousemove",this.onEyeMove),document.removeEventListener("mouseup",this.onEyeUp)},e.prototype.refresh=function(){var e=this;this.spheres.forEach(function(t){t.scale.x=1/e.renderer.eye.zoom/e.stage.scale.x,t.scale.y=1/e.renderer.eye.zoom/e.stage.scale.y})},e.prototype.renderToTop=function(){this.renderer.eye.addChild(this.stage)},e.prototype.createSphere=function(e,t,o){var i=17,n=new PIXI.Graphics;n.beginFill(10027008),n.drawCircle(0,0,i),n.name=t,n.interactive=!0,n.x=e.x,n.y=e.y;var a;switch(o){case 3:case 5:a="";break;case 1:case 7:a="";break;case 0:case 2:case 6:case 8:a=""}var r=new PIXI.Text(a,{fontFamily:"fontawesome",fontSize:24,fill:"#aaaaaa"});r.x=-.5*r.width,r.y=-.5*r.height,n.addChild(r),n.scale.x=1/this.renderer.eye.zoom,n.scale.y=1/this.renderer.eye.zoom,this.stage.addChild(n),this.spheres.push(n);var s=this.spheres.length-1;n.on("mousedown",this.onMouseDown.bind(this,s))},e.prototype.onMouseMove=function(e){var t=a.WIDTH*e.offsetX/this.renderer.view.offsetWidth,o=a.HEIGHT*e.offsetY/this.renderer.view.offsetHeight,i=this.renderer.eye.toLocal(new PIXI.Point(t,o));i.x-=this.stage.x,i.y-=this.stage.y,this.matrix.identity(),this.matrix.rotate(-this.stage.rotation),i=this.matrix.apply(i);var n=Math.abs(i.x)/this.defaultWidth,r=Math.abs(i.y)/this.defaultHeight,s=this.animationModel.getSelectedLayerProperties(),l={};switch(this.index){case 0:case 2:case 5:case 7:this.shiftKey&&(n>r?r=n/this.originalScaleRatio:n=r*this.originalScaleRatio),l.Scale={x:n,y:r};break;case 1:case 6:l.Scale={x:s.Scale.x,y:r};break;default:l.Scale={x:n,y:s.Scale.y}}this.animationModel.updateSelectedLayerPropertiesRelative(l)},e.prototype.onMouseDown=function(e,t){if(this.shiftKey=t.data.originalEvent.shiftKey,this.shiftKey){var o=this.animationModel.getSelectedLayerProperties();this.originalScaleRatio=o.Scale.x/o.Scale.y}t.stopPropagation(),this.index=e,this.renderer.view.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp)},e.prototype.onMouseUp=function(){this.renderer.view.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp)},e.prototype.dispose=function(){var e=this;this.stage.parent.removeChild(this.stage),this.spheres.forEach(function(t){t.removeListener("mousedown",e.onMouseDown)}),this.eye.removeListener("mousedown",this.onEyeDown)},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{"../pixi-view":25,"animation-utilities":void 0,"jibo-keyframes":void 0}],20:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("jibo-keyframes"),a=e("./scale-translate-controller-base"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.display=function(e){this.dofValues=e,this.stage.x=n.conversion.toPixelsX(e.overlay_textureSubRootBn_t+.5*this.screenWidth),this.stage.y=-n.conversion.toPixelsX(e.overlay_textureSubRootBn_t_2-.5*this.screenHeight),this.stage.rotation=-e.overlay_textureSubRootBn_r,this.stage.rotation=-e.overlay_textureSubRootBn_r;var t=this.animationModel.getSelectedLayerProperties();void 0!==t&&(this.stage.scale.x=t.Scale.x,this.stage.scale.y=t.Scale.y),this.refresh()},t}(a.default);Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{"./scale-translate-controller-base":19,"jibo-keyframes":void 0}],21:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("jibo-keyframes"),a=e("./scale-translate-controller-base"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.display=function(e){this.dofValues=e,this.stage.x=n.conversion.toPixelsX(e.eyeSubRootBn_t+.5*this.screenWidth),this.stage.y=-n.conversion.toPixelsX(e.eyeSubRootBn_t_2-.5*this.screenHeight),this.stage.rotation=-e.eyeSubRootBn_r,this.stage.rotation=-e.eyeSubRootBn_r;var t=this.animationModel.getSelectedLayerProperties();this.stage.scale.x=t.Scale.x,this.stage.scale.y=t.Scale.y,this.refresh()},t}(a.default);Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{"./scale-translate-controller-base":19,"jibo-keyframes":void 0}],22:[function(e,t,o){"use strict";var i=e("../pixi-view"),n=function(){function e(e,t,o,i){this.renderer=e,this.robotInfo=t,this.screenWidth=this.robotInfo.getEyeScreenInfo().getWidth(),this.screenHeight=this.robotInfo.getEyeScreenInfo().getHeight(),this.animationModel=o,this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.prefix=i?"overlay_vertexJoint":"vertexJoint",this.spheres=[],this.vertexToPropMap={},this.stage=new PIXI.Container,this.renderToTop();for(var n=1;n<10;n++){var a=""+this.prefix+n;this.vertexToPropMap[a]="Vertex "+n,this.createSphere(a,n)}}return e.prototype.refresh=function(){var e=this;this.spheres.forEach(function(t){t.scale.x=1/e.renderer.eye.zoom,t.scale.y=1/e.renderer.eye.zoom})},e.prototype.renderToTop=function(){this.renderer.eye.addChild(this.stage)},e.prototype.createSphere=function(e,t){var o=new PIXI.Graphics;o.beginFill(10027008),o.drawCircle(0,0,17),o.name=e,o.interactive=!0;var i=new PIXI.Text(t,{fontFamily:"Lucida Grande",fontSize:24,fontWeight:"bold",fill:"#aaaaaa"});i.x=-.5*i.width,i.y=-.5*i.height,o.addChild(i),o.scale.x=1/this.renderer.eye.zoom,o.scale.y=1/this.renderer.eye.zoom,this.stage.addChild(o),this.spheres.push(o),o.on("mousedown",this.onMouseDown)},e.prototype.onMouseMove=function(e){var t=i.WIDTH*e.offsetX/this.renderer.view.offsetWidth,o=i.HEIGHT*e.offsetY/this.renderer.view.offsetHeight,n=this.stage.toLocal(new PIXI.Point(t,o)),a=this.vertexToPropMap[this.currentTarget.name],r=this.animationModel.getSelectedLayerProperties(),s={};s[a]={x:n.x/r.Scale.x,y:n.y/r.Scale.y},this.animationModel.updateSelectedLayerPropertiesRelative(s)},e.prototype.onMouseDown=function(e){this.currentTarget=e.target,this.downPosition=this.currentTarget.position,this.renderer.view.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp)},e.prototype.onMouseUp=function(){document.removeEventListener("mouseup",this.onMouseUp),this.renderer.view.removeEventListener("mousemove",this.onMouseMove)},e.prototype.dispose=function(){var e=this;this.stage.parent.removeChild(this.stage),this.spheres.forEach(function(t){t.removeListener("mousedown",e.onMouseDown)})},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{"../pixi-view":25}],23:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("jibo-keyframes"),a=e("./vertex-controller-base"),r=function(e){function t(t,o,i){return e.call(this,t,o,i,!1)||this}return i(t,e),t.prototype.display=function(e){this.dofValues=e,this.stage.x=n.conversion.toPixelsX(e.eyeSubRootBn_t+.5*this.screenWidth),this.stage.y=-n.conversion.toPixelsX(e.eyeSubRootBn_t_2-.5*this.screenHeight),this.stage.rotation=-e.eyeSubRootBn_r,this.spheres[0].x=n.conversion.toPixelsX(e.vertexJoint1_t),this.spheres[0].y=n.conversion.toPixelsY(e.vertexJoint1_t_2),this.spheres[1].x=n.conversion.toPixelsX(e.vertexJoint2_t),this.spheres[1].y=n.conversion.toPixelsY(e.vertexJoint2_t_2),this.spheres[2].x=n.conversion.toPixelsX(e.vertexJoint3_t),this.spheres[2].y=n.conversion.toPixelsY(e.vertexJoint3_t_2),this.spheres[3].x=n.conversion.toPixelsX(e.vertexJoint4_t),this.spheres[3].y=n.conversion.toPixelsY(e.vertexJoint4_t_2),this.spheres[4].x=n.conversion.toPixelsX(e.vertexJoint5_t),this.spheres[4].y=n.conversion.toPixelsY(e.vertexJoint5_t_2),this.spheres[5].x=n.conversion.toPixelsX(e.vertexJoint6_t),this.spheres[5].y=n.conversion.toPixelsY(e.vertexJoint6_t_2),this.spheres[6].x=n.conversion.toPixelsX(e.vertexJoint7_t),this.spheres[6].y=n.conversion.toPixelsY(e.vertexJoint7_t_2),this.spheres[7].x=n.conversion.toPixelsX(e.vertexJoint8_t),this.spheres[7].y=n.conversion.toPixelsY(e.vertexJoint8_t_2),this.spheres[8].x=n.conversion.toPixelsX(e.vertexJoint9_t),this.spheres[8].y=n.conversion.toPixelsY(e.vertexJoint9_t_2),this.refresh()},t}(a.default);Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{"./vertex-controller-base":22,"jibo-keyframes":void 0}],24:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("jibo-keyframes"),a=e("./vertex-controller-base"),r=function(e){function t(t,o,i){return e.call(this,t,o,i,!0)||this}return i(t,e),t.prototype.display=function(e){this.dofValues=e,this.stage.x=n.conversion.toPixelsX(e.overlay_textureSubRootBn_t+.5*this.screenWidth),this.stage.y=-n.conversion.toPixelsX(e.overlay_textureSubRootBn_t_2-.5*this.screenHeight),this.stage.rotation=-e.overlay_textureSubRootBn_r,this.spheres[0].x=n.conversion.toPixelsX(e.overlay_vertexJoint1_t),this.spheres[0].y=n.conversion.toPixelsY(e.overlay_vertexJoint1_t_2),this.spheres[1].x=n.conversion.toPixelsX(e.overlay_vertexJoint2_t),this.spheres[1].y=n.conversion.toPixelsY(e.overlay_vertexJoint2_t_2),this.spheres[2].x=n.conversion.toPixelsX(e.overlay_vertexJoint3_t),this.spheres[2].y=n.conversion.toPixelsY(e.overlay_vertexJoint3_t_2),this.spheres[3].x=n.conversion.toPixelsX(e.overlay_vertexJoint4_t),this.spheres[3].y=n.conversion.toPixelsY(e.overlay_vertexJoint4_t_2),this.spheres[4].x=n.conversion.toPixelsX(e.overlay_vertexJoint5_t),this.spheres[4].y=n.conversion.toPixelsY(e.overlay_vertexJoint5_t_2),this.spheres[5].x=n.conversion.toPixelsX(e.overlay_vertexJoint6_t),this.spheres[5].y=n.conversion.toPixelsY(e.overlay_vertexJoint6_t_2),this.spheres[6].x=n.conversion.toPixelsX(e.overlay_vertexJoint7_t),this.spheres[6].y=n.conversion.toPixelsY(e.overlay_vertexJoint7_t_2),this.spheres[7].x=n.conversion.toPixelsX(e.overlay_vertexJoint8_t),this.spheres[7].y=n.conversion.toPixelsY(e.overlay_vertexJoint8_t_2),this.spheres[8].x=n.conversion.toPixelsX(e.overlay_vertexJoint9_t),this.spheres[8].y=n.conversion.toPixelsY(e.overlay_vertexJoint9_t_2),this.refresh()},t}(a.default);Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{"./vertex-controller-base":22,"jibo-keyframes":void 0}],25:[function(e,t,o){"use strict";var i=e("react"),n=e("path"),a=e("fs"),r=e("module"),s=e("deep-diff").diff,l=e("lodash"),d=e("jibo"),c=e("jibo"),u=c.FaceRenderer,h=c.timer,p=e("animation-utilities"),m=e("../face/mode-select"),f=e("./controllers/vertex-controller-eye"),v=e("./controllers/vertex-controller-overlay"),y=e("./controllers/scale-translate-controller-eye"),g=e("./controllers/scale-translate-controller-eye-overlay"),b=e("./controllers/rotation-controller"),k=e("jibo-keyframes"),S=1280,w=720,E=S/w,M=new p.JiboConfig,C={vertex:v.default,str:g.default,rotation:b.default},x={vertex:f.default,str:y.default,rotation:b.default};o.WIDTH=S,o.HEIGHT=w,Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({displayName:"layout-child",getInitialState:function(){return this.updateFace=this.updateFace.bind(this),this.face=null,this.currentScale=1,this.doUpdate=!0,this.onDataChanged=this.onDataChanged.bind(this),this.previousLayers=[],this.instances={},this.animations={},this.watchers={},{disabled:!0,mode:"str"}},render:function(){var e={width:this.props.width,height:this.props.height};return this.pixiRenderer&&this.setCanvasStyle(this.pixiRenderer.view),i.createElement("div",{ref:"container",className:"pixi-container",style:e,onWheel:this.onWheel},i.createElement(m.default,{disabled:this.state.disabled,onSelect:this.onSelectMode}))},onWheel:function(e){var t=e.nativeEvent.wheelDelta/2400;this.currentScale-=t,this.currentScale>1&&(this.currentScale=1),this.currentScale<.1&&(this.currentScale=.1),this.pixiRenderer.eye.zoom=this.currentScale,this.controller&&this.controller.refresh()},onSelectMode:function(e){this.controller&&(this.controller.dispose(),this.controller=null),this.state.mode=e,this.props.animationModel.isLayerOfTypeSelected("Eye")?this.controller=new x[e](this.pixiRenderer,this.robotInfo,this.props.animationModel,!1):this.controller=new C[e](this.pixiRenderer,this.robotInfo,this.props.animationModel,!0),this.lastLayerType=this.props.animationModel.keyframeSelection.getSelectionLayerType(),this.controller.display(this.getDOFs())},setCanvasStyle:function(e){e.style.position="relative";var t=this.props.height-40;if(E1&&(t/=100),e=i(e).toRgb(),e.a=t,i(e)}function s(e){return i(e).toHsv()}var l=e("tinycolor2");"undefined"!=typeof window&&(window.tinycolor=l),o.toColor=i,o.toPure=n,o.fromRatio=a,o.toAlpha=r,o.toHsv=s;var d={toColor:i,toPure:n,fromRatio:a,toAlpha:r,toHsv:s};"undefined"!=typeof window&&(window.color=d),Object.defineProperty(o,"__esModule",{value:!0}),o.default=d},{tinycolor2:void 0}],34:[function(e,t,o){"use strict";function i(){}var n=e("region"),a=e("drag-helper"),r=e("./color");Object.defineProperty(o,"__esModule",{value:!0}),o.default={toColorValue:function(e){return"string"==typeof e?r.toHsv(e):{h:e.h,s:e.s,v:e.v,a:e.a}},onMouseDown:function(e){e.preventDefault();var t=n.fromDOM(this.getDOMNode()),o=this.getEventInfo(e,t);a(e,{scope:this,constrainTo:t,onDragStart:function(e,i){i.initialPoint=o,i.minLeft=0,i.maxLeft=t.width,this.handleDragStart(e)},onDrag:function(e,o){var i=this.getEventInfo(e,t);this.updateColor(i),this.handleDrag(e,o)},onDrop:function(e,o){var i=this.getEventInfo(e,t);this.updateColor(i),this.handleDrop(e,o)}}),this.updateColor(o),this.handleMouseDown(e,{initialPoint:o})},handleMouseDown:function(e,t){(this.props.onMouseDown||i).apply(this,this.getColors()),this.handleDrag(e,t)},handleUpdate:function(e,t){var o=t.diff||{top:0,left:0},i=t.initialPoint;if(i){var n,a=void 0;a=i.x+o.left,n=i.y+o.top,a=Math.max(a,t.minLeft),a=Math.min(a,t.maxLeft),this.state.top=n,this.state.left=a,this.state.mouseDown={x:a,y:n,width:i.width,height:i.height}}this.props.inPicker||this.props.value||this.setState({value:this.hsv})},handleDragStart:function(){},handleDrag:function(e,t){this.handleUpdate(e,t),(this.props.onDrag||i).apply(this,this.getColors())},handleDrop:function(e,t){this.handleUpdate(e,t),this.state.mouseDown=!1,(this.props.onChange||i).apply(this,this.getColors())},getColors:function(){var e=this.props.inPicker?this.hsv:this.toStringValue(this.hsv),t=[e];return this.props.inPicker||t.push(Object.assign({},this.hsv)),t},getEventInfo:function(e,t){t=t||n.fromDOM(this.getDOMNode());var o=e.clientX-t.left,i=e.clientY-t.top;return{x:o,y:i,width:t.getWidth(),height:t.getHeight()}}}},{"./color":33,"drag-helper":void 0,region:void 0}],35:[function(e,t,o){"use strict";var i=e("tinycolor2");Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e){return e=i(Object.assign({},e)),1===e.toRgb().a?e.toHexString():e.toRgbString()}},{tinycolor2:void 0}],36:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e){var t=e.height,o=e.width;return e.x<0&&(e.x=0),e.x>=o&&(e.x=o),e.y<0&&(e.y=0),e.y>=t&&(e.y=t),e}},{}],37:[function(e,t,o){"use strict";var i=e("react"),n=e("atom"),a=e("../../../common/atom-editor"),r=i.createClass({getInitialState:function(){var e={name:this.props.content.name,payload:this.props.content.payload};return e},componentWillReceiveProps:function(e){e.content.name===this.state.name&&e.content.payload===this.state.payload||this.setState({payload:e.content.payload,name:e.content.name})},componentDidMount:function(){this.subs=new n.CompositeDisposable,this.subs.add(atom.tooltips.add(this.refs.nameEditor.getDOM(),{title:"Event Name"})),this.subs.add(atom.tooltips.add(this.refs.payloadEditor.getDOM(),{title:"Event Payload"}))},componentWillUnmount:function(){this.subs.dispose()},render:function(){var e=this,t="";if(this.state.payload.length>0)try{JSON.parse(this.state.payload)}catch(e){t="Not valid JSON:\n"+e}return i.createElement("div",{className:"event-editor",style:{width:"100%"}},i.createElement("div",{style:{display:"flex",clear:"both",marginTop:15,marginBottom:15}},i.createElement("div",{style:{fontSize:14,marginRight:15}},"Name"),i.createElement(a.default,{mini:!0,ref:"nameEditor",style:{width:"100%"},content:this.state.name,onDidChange:function(t){e.state.name=t,e.props.onChange({name:e.state.name,payload:e.state.payload})}})),i.createElement("div",{style:{fontSize:14,marginRight:15,marginBottom:5}},"Payload"),i.createElement(a.default,{ref:"payloadEditor",style:{height:250,width:"100%"},content:this.state.payload,grammar:"source.json",onDidChange:function(t){e.state.payload=t,e.props.onChange({name:e.state.name,payload:e.state.payload})}}),i.createElement("div",{className:"error-messages"},t))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t){return i.createElement(r,{onChange:e,content:t})}},{"../../../common/atom-editor":96,atom:void 0,react:void 0}],38:[function(e,t,o){"use strict";var i=e("react"),n=e("fs"),a=e("path"),r=e("normalize-path"),s=e("../../../behavior-editor/modals/choose-animation-modal"),l=e("../../../atom-react/mixins/modal-mixin"),d=e("atom"),c=e("../../../common/atom-editor"),u=i.createClass({mixins:[l.default],getInitialState:function(){var e={file:this.props.content.file};return e},componentWillReceiveProps:function(e){e.content.file!==this.state.file&&this.setState({file:e.content.file})},getRoot:function(){return a.resolve(this.props.projectRoot,"animations")},getUri:function(){var e=this.state.file.split("://");if(1===e.length){var t=a.resolve(this.props.sourceFileDir,this.state.file);return t}if(2===e.length){var t=a.resolve(this.props.projectRoot,"node_modules",e[0],"animations",e[1]);return t}},render:function(){var e=this,t={};try{n.statSync(this.getUri())}catch(e){t={disabled:!0}}var o=t.disabled?i.createElement("div",{className:"error-messages"},"No keys file by that name"):null;return i.createElement("div",{style:{width:"100%"}},i.createElement("div",{className:"block"},i.createElement("div",{className:"fileBlock"},i.createElement("button",{ref:"chooseKeys",style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),i.createElement(c.default,{ref:"keyrefsEditor",mini:!0,content:this.state.file,tooltip:{title:"Current Keys File"},onDidChange:function(t){e.state.file=t},onConfirm:function(){e.props.onChange({file:e.state.file})}})),o,i.createElement("br",null)))},onChoose:function(){var e=this;this.createModal(i.createElement(s.default,{root:this.getRoot(),uri:this.getUri(),onChoose:function(t){var o=a.resolve(e.props.projectRoot,"animations",r(t));t=r(a.relative(e.props.sourceFileDir,o)),e.setState({file:t}),e.props.onChange({file:t})},onClose:function(){e.destroyModal()}}))},componentDidMount:function(){this.subs=new d.CompositeDisposable,this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.chooseKeys),{title:"Choose Keys File"}))},componentWillUnmount:function(){this.subs.dispose()}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,n){return i.createElement(u,{onChange:e,content:t,projectRoot:o,sourceFileDir:n})}},{"../../../atom-react/mixins/modal-mixin":57,"../../../behavior-editor/modals/choose-animation-modal":82,"../../../common/atom-editor":96,atom:void 0,fs:void 0,"normalize-path":void 0,path:void 0,react:void 0}],39:[function(e,t,o){"use strict";var i=e("react"),n=e("../../../common/atom-editor"),a=i.createClass({getInitialState:function(){return{offset:this.props.offset}},componentWillReceiveProps:function(e){e.offset!==this.state.offset&&this.setState({offset:e.offset})},render:function(){var e=this;return i.createElement("div",{className:"event-editor",style:{width:"100%"}},i.createElement(n.default,{mini:!0,ref:"offsetEditor",style:{width:"100%"},content:this.state.offset,tooltip:{title:"Frame Offset"},onDidChange:function(t){e.state.offset=t,e.props.onChange(e.state.text)}}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t){return i.createElement(a,{onChange:e,offset:t})}},{"../../../common/atom-editor":96,react:void 0}],40:[function(e,t,o){"use strict";var i=e("react"),n=e("fs"),a=e("path"),r=e("normalize-path"),s=e("../../../common/modals/choose-pixi-modal"),l=e("../../../atom-react/mixins/modal-mixin"),d=e("atom"),c=e("../../../common/atom-editor"),u=i.createClass({mixins:[l.default],getInitialState:function(){var e={file:this.props.content};return e},componentWillReceiveProps:function(e){e.content!==this.state.file&&this.setState({file:e.content})},getRoot:function(){return a.resolve(this.props.projectRoot,"timelines")},getUri:function(){var e=this.state.file.split("://");if(1===e.length){var t=a.resolve(this.props.projectRoot,"timelines",this.state.file);return t}if(2===e.length){var t=a.resolve(this.props.projectRoot,"node_modules",e[0],"timelines",e[1]);return t}},render:function(){var e=this,t={};try{n.statSync(this.getUri())}catch(e){t={disabled:!0}}var o=t.disabled?i.createElement("div",{className:"error-messages"},"No pixi file by that name"):null;return i.createElement("div",{style:{width:"100%"}},i.createElement("div",{className:"block"},i.createElement("div",{className:"fileBlock"},i.createElement("button",{ref:"chooseAudio",style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),i.createElement(c.default,{ref:"pixiEditor",mini:!0,content:this.state.file,onDidChange:function(t){e.state.file=t},tooltip:{title:"Choose Pixi File"},onConfirm:function(){e.props.onChange({file:e.state.file})}})),o,i.createElement("br",null)))},onChoose:function(){var e=this;this.createModal(i.createElement(s.default,{root:this.getRoot(),uri:this.getUri(),onChoose:function(t){t=r(t),e.setState({file:t}),e.props.onChange(t)},onClose:function(){e.destroyModal()}}))},componentDidMount:function(){this.subs=new d.CompositeDisposable,this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.chooseAudio),{title:"Choose Pixi File"}))},componentWillUnmount:function(){this.subs.dispose()}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o){return i.createElement(u,{onChange:e,content:t,projectRoot:o})}},{"../../../atom-react/mixins/modal-mixin":57,"../../../common/atom-editor":96,"../../../common/modals/choose-pixi-modal":108,atom:void 0,fs:void 0,"normalize-path":void 0,path:void 0,react:void 0}],41:[function(e,t,o){"use strict";var i=e("react"),n=e("../../../atom-react/components/float-input-view"),a=e("./color-picker/index"),r=e("color-space/rgb"),s=e("color-space/hsv"),l=e("color-string"),d=e("atom"),c=e("../../../common/atom-editor"),u=i.createClass({getInitialState:function(){var e=[Math.floor(this.props.value.r),Math.floor(this.props.value.g),Math.floor(this.props.value.b)];return{color:l.hexString(e),value:this.props.value}},updateFromDrag:function(e,t){var o=s.rgb([Math.round(t.h),Math.round(100*t.s),Math.round(100*t.v)]),i={r:Math.round(o[0]),g:Math.round(o[1]),b:Math.round(o[2])},n={};n[this.props.propName]=i,this.props.animationModel.updateSelectedLayerProperties(n)},updateFromHexString:function(e){var t=l.getRgb(e);if(t){var o={};o[this.props.propName]={r:t[0],g:t[1],b:t[2]},this.props.animationModel.updateSelectedLayerProperties(o)}else this.refs.editor.setText(this.state.color)},updateFromHsv:function(e){var t=s.rgb(e),o={r:Math.round(t[0]),g:Math.round(t[1]),b:Math.round(t[2])},i={};i[this.props.propName]=o,this.props.animationModel.updateSelectedLayerProperties(i)},_hsvFromState:function(){var e=r.hsv([this.state.value.r,this.state.value.g,this.state.value.b]);return e},_clamp:function(e){return e},onRChange:function(e){var t={};t[this.props.propName]={r:this._clamp(e,0,255),g:this.state.g,b:this.state.b},this.props.animationModel.updateSelectedLayerProperties(t)},onGChange:function(e){var t={};t[this.props.propName]={r:this.state.r,g:this._clamp(e,0,255),b:this.state.b},this.props.animationModel.updateSelectedLayerProperties(t)},onBChange:function(e){var t={};t[this.props.propName]={r:this.state.r,g:this.state.g,b:this._clamp(e,0,255)},this.props.animationModel.updateSelectedLayerProperties(t)},onHChange:function(e){var t=this._hsvFromState();t[0]=this._clamp(Math.round(e),0,360),this.updateFromHsv(t)},onSChange:function(e){var t=this._hsvFromState();t[1]=this._clamp(Math.round(e),0,100),this.updateFromHsv(t)},onVChange:function(e){var t=this._hsvFromState();t[2]=this._clamp(Math.round(e),0,100),this.updateFromHsv(t)},componentWillReceiveProps:function(e){var t=[Math.round(e.value.r),Math.round(e.value.g),Math.round(e.value.b)],o=l.hexString(t);this.setState({color:o,value:{r:t[0],g:t[1],b:t[2]}})},componentWillUnmount:function(){this.subs.dispose()},componentDidMount:function(){this.subs=new d.CompositeDisposable,this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.reset),{title:"Reset Color"})),this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.rgb),{title:"RGB Color"})),this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.hsv),{title:"HSV Color"}))},onRgbConfirm:function(){var e=this.refs.editor.getText();this.updateFromHexString(e)},render:function(){var e=this,t=this.props.propName,o=this.props.tabIndex,r=this.props.defaultValue,s=this._hsvFromState();return i.createElement("div",{className:"hsv-input",style:{float:"right"}},i.createElement(a.default,{saturationWidth:150,saturationHeight:150,value:this.state.color,width:150,onDrag:this.updateFromDrag}),i.createElement("div",{style:{display:"flex",float:"right",clear:"both",marginTop:15}},i.createElement("div",{style:{fontSize:14,margin:2}},"rgb"),i.createElement(c.default,{mini:!0,ref:"editor",tooltip:{title:"RGB Color"},onBlur:this.onRgbConfirm,style:{width:150,float:"left"},content:this.state.color,onConfirm:function(){e.refs.editor.blur()}})),i.createElement("div",{style:{display:"flex",float:"right",clear:"both",marginTop:15}},i.createElement("div",{ref:"reset",className:"btn",style:{marginRight:5},onClick:function(){var o={};o[t]=r,e.props.animationModel.updateSelectedLayerProperties(o),e.props.animationModel.addRedoUndoEntry()}},i.createElement("i",{className:"fa fa-refresh"})),i.createElement("div",{style:{float:"left"}},[i.createElement("div",{ref:"rgb"},i.createElement("div",{style:{display:"flex"}},i.createElement("div",{style:{fontSize:14,margin:2,width:10}},"r"),i.createElement(n.default,{step:1,style:{clear:"both",maxWidth:150},onChange:this.onRChange,value:this.state.value.r,precision:0,tabIndex:o})),i.createElement("div",{style:{display:"flex"}},i.createElement("div",{style:{fontSize:14,margin:2,width:10}},"g"),i.createElement(n.default,{step:1,style:{clear:"both",maxWidth:150},onChange:this.onGChange,value:this.state.value.g,precision:0,tabIndex:o+1})),i.createElement("div",{style:{display:"flex"}},i.createElement("div",{style:{fontSize:14,margin:2,width:10}},"b"),i.createElement(n.default,{step:1,style:{clear:"both",maxWidth:150},onChange:this.onBChange,value:this.state.value.b,precision:0,tabIndex:o+2}))),i.createElement("div",{style:{height:10}}),i.createElement("div",{ref:"hsv"},i.createElement("div",{style:{display:"flex"}},i.createElement("div",{style:{fontSize:14,margin:2,width:10}},"h"),i.createElement(n.default,{step:1,style:{clear:"both",maxWidth:150},onChange:this.onHChange,value:s[0],precision:0,tabIndex:o+3})),i.createElement("div",{style:{display:"flex"}},i.createElement("div",{style:{fontSize:14,margin:2,width:10}},"s"),i.createElement(n.default,{step:1,style:{clear:"both",maxWidth:150},onChange:this.onSChange,value:s[1],precision:0,tabIndex:o+4})),i.createElement("div",{style:{display:"flex"}},i.createElement("div",{style:{fontSize:14,margin:2,width:10}},"v"),i.createElement(n.default,{step:1,style:{clear:"both",maxWidth:150},onChange:this.onVChange,value:s[2],precision:0,tabIndex:o+5})))])))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,n,a){return i.createElement(u,{propName:e,value:t,tabIndex:o,defaultValue:n,animationModel:a})}},{"../../../atom-react/components/float-input-view":50,"../../../common/atom-editor":96,"./color-picker/index":32,atom:void 0,"color-space/hsv":void 0,"color-space/rgb":void 0,"color-string":void 0,react:void 0}],42:[function(e,t,o){"use strict";var i=e("react"),n=e("../../../atom-react/mixins/modal-mixin"),a=e("path"),r=e("fs"),s=e("../../../common/modals/choose-file-modal"),l=e("normalize-path"),d=e("atom"),c=e("../../../common/atom-editor"),u=i.createClass({mixins:[n.default],getInitialState:function(){var e=this.getDisplayValue(this.props.content);return{content:this.props.content,displayValue:e}},componentWillReceiveProps:function(e){var t=e.content,o=this.getDisplayValue(t);this.setState({content:t,displayValue:o})},render:function(){var e=this,t={};try{r.statSync(this.getUri())}catch(e){t={disabled:!0}}var o=t.disabled?i.createElement("div",{className:"error-messages"},"No texture file by that name"):null;return i.createElement("div",{style:{width:"100%"}},i.createElement("div",{className:"block"},i.createElement("div",{className:"fileBlock"},i.createElement("button",{ref:"chooseTexture",style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),i.createElement(c.default,{onBlur:this.onBlur,ref:"editor",mini:!0,content:this.state.displayValue,onDidChange:function(t){e.state.content=e.getDataValue(t),e.state.displayValue=t},onConfirm:function(){e.props.onChange(e.state.content),document.querySelector("atom-pane.pane.active .animation-editor").childNodes[0].focus()}})),o,i.createElement("br",null)))},getUri:function(){return a.resolve(this.props.projectRoot,this.state.content)},getDisplayValue:function(e){var t=e.split("/");if("node_modules"===t[0]){var o=t[1],i=a.join("node_modules",o,"animations","textures");return i=l(a.relative(i,e)),o+"://"+i}if(""===e)return"";var i=a.join("animations","textures");return i=a.relative(i,e),l(i)},getDataValue:function(e){var t=e.split("://");if(1===t.length){var o=a.join("animations","textures",e);return l(o)}if(2===t.length){var o=a.join("node_modules",t[0],"animations","textures",t[1]);return l(o)}return""},onChoose:function(){var e=this;this.createModal(i.createElement(s.default,{root:this.props.projectRoot,uri:this.getUri(),settings:Object.assign({},s.TextureSettings,{restrictPath:"animations/textures"}),onChoose:function(t){var o=l(t),i=e.getDisplayValue(o);e.setState({content:o,displayValue:i}),e.props.onChange(o),document.querySelector("atom-pane.pane.active .animation-editor").childNodes[0].focus()},onClose:function(){e.destroyModal()}}))},onBlur:function(){this.props.onChange(this.state.content),document.querySelector("atom-pane.pane.active .animation-editor").childNodes[0].focus()},componentWillUnmount:function(){this.subs.dispose()},componentDidMount:function(){this.subs=new d.CompositeDisposable,this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.chooseTexture),{title:"Change Texture"})),this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.editor),{title:"Current Texture"}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,n){return i.createElement(u,{key:100,content:t,onChange:e,projectRoot:o,animationPath:n})}},{"../../../atom-react/mixins/modal-mixin":57,"../../../common/atom-editor":96,"../../../common/modals/choose-file-modal":107,atom:void 0,fs:void 0,"normalize-path":void 0,path:void 0,react:void 0}],43:[function(e,t,o){"use strict";var i=e("react"),n=e("atom"),a=i.createClass({displayName:"settings-item",onFocus:function(){this.refs.input.getDOMNode().select()},componentDidMount:function(){var e=this;this.disposables=new n.CompositeDisposable,this.disposables.add(atom.commands.add(this.refs.input.getDOMNode(),{"jibo-sdk:confirm":function(){e.props.onConfirm()},"jibo-sdk:escape":function(){e.props.onCancel()}}))},componentWillUnmount:function(){this.disposables.dispose()},render:function(){return i.createElement("div",null,i.createElement("label",null,this.props.label),i.createElement("br",null),i.createElement("input",{ref:"input",style:{width:122},onFocus:this.onFocus,className:"native-key-bindings",tabIndex:this.props.tabIndex,type:this.props.type,step:this.props.step,onMouseDown:this.props.onMouseDown,onChange:this.props.onChange,value:this.props.value,min:this.props.min}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=a},{atom:void 0,react:void 0}],44:[function(e,t,o){"use strict";var i=e("react"),n=e("./settings-item"),a=i.createClass({displayName:"settings",getInitialState:function(){return{duration:this.props.animationModel.state.keyframes.duration,scale:this.props.animationModel.state.keyframes.scale,lastScale:this.props.animationModel.state.keyframes.scale}},componentDidMount:function(){this.getDOMNode().childNodes[1].childNodes[0].childNodes[2].focus()},onFinished:function(){if(this.state.duration!==this.props.animationModel.state.keyframes.duration)this.props.animationModel.setDuration(this.state.duration,!0,!0),this.props.animationModel.addRedoUndoEntry(),this.props.onFinished();else if(this.state.scale!==this.props.animationModel.state.keyframes.scale){if(0===this.state.scale)return this.setState({scale:this.state.lastScale}),void this.props.onFinished();this.setState({lastScale:this.state.scale}),this.props.animationModel.setScale(this.state.scale),this.props.animationModel.setDuration(this.state.duration,!1,!0),this.props.animationModel.setKeyframes(),this.props.animationModel.addRedoUndoEntry(),this.props.onFinished()}else this.props.onFinished()},onDurationChange:function(e){if(/^\d+$/.test(e.target.value)){var t=parseInt(e.target.value);this.setState({duration:t})}},onScaleChange:function(e){var t=e.target.value;this.setState({scale:t})},onMouseDown:function(){if(this.state.duration!==this.props.animationModel.state.keyframes.duration)this.props.animationModel.setDuration(this.state.duration,!0,!0),this.props.animationModel.addRedoUndoEntry();else if(this.state.scale!==this.props.animationModel.state.keyframes.scale){if(0===this.state.scale)return void this.setState({scale:this.state.lastScale});this.setState({lastScale:this.state.scale}),this.props.animationModel.setScale(this.state.scale);var e=this.props.animationModel.setDuration(this.state.duration,!1,!0);this.props.animationModel.setKeyframes(),this.props.animationModel.addRedoUndoEntry(),this.setState({duration:e})}},onConfirm:function(){this.onFinished()},onCancel:function(){this.props.onFinished()},render:function(){var e=i.createElement(n.default,{label:"Animation Duration",type:"number",step:"0.01",tabIndex:1,onCancel:this.onCancel,onConfirm:this.onConfirm,onMouseDown:this.onMouseDown,onChange:this.onDurationChange,value:this.state.duration,min:1}),t=i.createElement(n.default,{label:"Scale",type:"number",step:"0.01",tabIndex:2,onCancel:this.onCancel,onConfirm:this.onConfirm,onMouseDown:this.onMouseDown,onChange:this.onScaleChange,value:this.state.scale,min:0});return i.createElement("div",{className:"animation-settings native-key-bindings"},i.createElement("div",{onMouseDown:this.onFinished,className:"settings-mousetrap"}),i.createElement("div",{className:"settings-container",onKeyUp:this.onKeyPress,style:{height:"auto"}},e,t))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=a},{"./settings-item":43,react:void 0}],45:[function(e,t,o){"use strict";var i=e("animation-utilities"),n=function(){function e(e){this.scene=e,this.debugObjects={}}return e.prototype.removeIfExists=function(e){this.debugObjects[e]&&(this.scene.remove(this.debugObjects[e]),delete this.debugObjects[e])},e.prototype.addByName=function(e,t){this.removeIfExists(e),this.debugObjects[e]=t,this.scene.add(t)},e.prototype.coerceIfMatrix=function(e){return e instanceof i.THREE.Matrix4?(new i.THREE.Vector3).setFromMatrixPosition(e):e.clone()},e.prototype.info=function(e,t){t=t||"",console.log(t+" name: "+e.name+" ( "+e.position.x+", "+e.position.y+", "+e.position.z+" )");for(var o=0;othis.props.playbackTime?this.getDOMNode().scrollLeft+this.getDOMNode().offsetWidtht&&(this.getDOMNode().scrollLeft=t-this.getDOMNode().offsetWidth)}},onScroll:function(){this.setState({labelsOffset:this.getDOMNode().scrollLeft,headerOffset:{x:this.getDOMNode().scrollLeft,y:this.getDOMNode().scrollTop}})},onMouseMove:function(e){return 0===e.buttons?void this.onMouseUp():(this.setTimeFromMousePosition({nativeEvent:e}),void this.props.animationModel.emit("drag-keyframe"))},onMouseUp:function(){document.removeEventListener("mousemove",this.onMouseMoveBind),document.removeEventListener("mouseup",this.onMouseUpBind)},onMouseDown:function(e){1===e.nativeEvent.which&&(this.onMouseMoveBind=this.onMouseMove.bind(this),this.onMouseUpBind=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBind),document.addEventListener("mouseup",this.onMouseUpBind),this.setTimeFromMousePosition(e))},setTimeFromMousePosition:function(e){var t=d(this.getDOMNode()).find(".animation-timeline-notch").offset(),o=Math.floor((e.nativeEvent.clientX-t.left)/18);o=Math.max(o,0),o=Math.min(o,this.props.animationModel.state.keyframes.duration-1),this.props.animationModel.setKeyframe(o)},onKeyframeUpsert:function(e){this.keyframesUpserted=e},evaluateFiltered:function(e,t){return u.runtime.evaluateAllLayersFiltered(e,h,t,function(e){return"Body"===e.type})},toRadians:function(e){return Math.PI*e/180},markReferences:function(){this.referenceMarks={};for(var e=0,t=this.props.animationModel.state.keyframes.layers;e0&&si[h].velocityLimit&&(a=!0,l=!0),i[h]&&Math.abs(m)>i[h].accelerationLimit&&(r=!0,l=!0)}this.keyframesExceeded.push(l),o+=t}this.props.animationModel.setLimit(a,r)},render:function(){var e=this,t=this.props.animationModel.state.keyframes.duration,o=18*(t+1),s=40*this.props.animationModel.state.keyframes.layers.length,l=Math.floor(t/5)+1,d=270,u={timeline:{width:this.props.width,height:this.props.height,background:"#404040"},container:{width:d+5*l*18+20,height:s+22},headerAnchor:{position:"relative",width:d+5*l*18+20,height:22},labelsAnchor:{position:"relative",width:d,height:s,float:"left",zIndex:2},labels:{position:"absolute",marginLeft:this.state.labelsOffset},channelsContainer:{width:o,height:s,float:"left",zIndex:1},channels:{width:o},indicator:{position:"absolute",marginLeft:18*this.props.animationModel.uiState.currentKeyframe+9-this.state.labelsOffset,height:this.props.height-22,zIndex:1,display:null===this.props.animationModel.getSelectedLayer()?"none":"inline-block"}},h=this.props.animationModel,m=this,f=[],v=[],y=0,g=this.props.animationModel.state.keyframes;return g.layers.forEach(function(r){var s;void 0!==m.keyframesUpserted&&c.indexOf(m.keyframesUpserted.layers,r)!==-1&&(s=m.keyframesUpserted.keyframeTime),f.push(i.createElement(n.default,{key:r.id,type:r.type,keyframesExceeded:e.keyframesExceeded,upserted:s,referenceMarks:e.referenceMarks,totalWidth:o,layerId:r.id,animationModel:h,totalFrames:t,keyframes:r.keyframes,latestHash:e.props.animationModel.undoRedo.latestHash})),v.push(i.createElement(a.default,{tabIndex:200+y,animationModel:h,odd:y++%2===0,key:r.id,layerId:r.id}))}),this.keyframesUpserted=void 0,i.createElement("div",{style:u.timeline,className:"animation-timeline"},i.createElement(p.default,{animationModel:this.props.animationModel,timelineWidth:this.props.width,timelineHeight:this.props.height}),i.createElement("div",{ref:"timeline",style:u.container,className:"animation-timeline-container"},i.createElement("div",{style:u.headerAnchor,onMouseDownCapture:this.onMouseDown},i.createElement(r.default,{offset:this.state.headerOffset,channelWidth:o,width:this.props.width,height:this.props.height+22,labelWidth:d,totalFrames:t,animationModel:this.props.animationModel})),i.createElement("div",{style:u.labelsAnchor},i.createElement("div",{ref:"layerContainer",style:u.labels,className:"animation-channel-labels-container"},v)),i.createElement("div",{style:u.channelsContainer},i.createElement("div",{style:u.channels,className:"animation-timeline-channels"},i.createElement("div",{style:u.indicator,className:"animation-timeline-indicator-line"}),f))))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=m},{"./layer":17,"./layer-label":16,"./playback-controls":26,"./time-notches":46,fs:void 0,"jibo-keyframes":void 0,jquery:void 0,lodash:void 0,path:void 0,react:void 0}],48:[function(e,t,o){"use strict";var i=e("react"),n=e("../controllers/animation-controller"),a=e("lodash"),r=e("path"),s=e("../../atom-react/components/jibo-combo-box"),l=e("atom"),d=e("../../atom-react/mixins/modal-mixin"),c=e("./face-on-body"),u=e("../../atom-react/components/float-input-view"),h=e("../../common/atom-editor"),p=i.createClass({getInitialState:function(){return this.props.model.state.keyframes.animdb||(this.props.model.state.keyframes.animdb={}),this.props.name=this.props.model.state.keyframes.animdb.name||"",this.props.scaleMin=this.props.model.state.keyframes.animdb.scaleMin||1,this.props.scaleMax=this.props.model.state.keyframes.animdb.scaleMax||1,this.props.speedMin=this.props.model.state.keyframes.animdb.speedMin||1,this.props.speedMax=this.props.model.state.keyframes.animdb.speedMax||1,this.props.categories=this.props.model.state.keyframes.animdb.categories||"",this.props.meta=this.props.model.state.keyframes.animdb.meta||"",{name:this.props.name,scaleMin:this.props.scaleMin,scaleMax:this.props.scaleMax,speedMin:this.props.speedMin,speedMax:this.props.speedMax,categories:this.props.categories,meta:this.props.meta}},onPropertyChange:function(e,t){this.props[e]=t,this.props.model.updateAnimationDBData(e,t)},render:function(){var e=this,t=i.createElement("div",{className:"block"},i.createElement("div",{className:"panel-heading"},i.createElement("h1",null,"Animation DB Settings")),i.createElement("div",{style:{align:"right"}},i.createElement("h2",null,"Name (default is key file name)"),i.createElement(h.default,{ref:"nameEditor",mini:!0,content:this.props.name,onDidChange:function(t){e.props.name=t,e.props.model.updateAnimationDBData("name",e.props.name)},onConfirm:function(){e.props.onChange(e.props.name),document.querySelector("atom-pane.pane.active .animation-editor").childNodes[0].focus()}}),i.createElement("h2",null,"Scale Bounds (max/min)"),i.createElement(u.default,{style:{clear:"both",maxWidth:150},onChange:function(t){e.onPropertyChange("scaleMax",t)},value:this.props.scaleMax,precision:4,tabIndex:1}),i.createElement(u.default,{style:{clear:"both",maxWidth:150},onChange:function(t){e.onPropertyChange("scaleMin",t)},value:this.props.scaleMin,precision:4,tabIndex:2}),i.createElement("h2",null,"Speed Bounds (max/min)"),i.createElement(u.default,{style:{clear:"both",maxWidth:150},onChange:function(t){e.onPropertyChange("speedMax",t)},value:this.props.speedMax,precision:4,tabIndex:1}),i.createElement(u.default,{style:{clear:"both",maxWidth:150},onChange:function(t){e.onPropertyChange("speedMin",t)},value:this.props.speedMin,precision:4,tabIndex:2}),i.createElement("h2",null,"Categories (comma separated list)"),i.createElement(h.default,{ref:"categoriesEditor",mini:!0,content:this.props.categories,onDidChange:function(t){e.props.categories=t,e.props.model.updateAnimationDBData("categories",e.props.categories)},onConfirm:function(){e.props.onChange(e.props.categories),document.querySelector("atom-pane.pane.active .animation-editor").childNodes[0].focus()}}),i.createElement("h2",null,"Meta tags (comma separated list)"),i.createElement(h.default,{ref:"metaEditor",mini:!0,content:this.props.meta,onDidChange:function(t){e.props.meta=t,e.props.model.updateAnimationDBData("meta",e.props.meta)}})),i.createElement("div",{style:{align:"center"}},i.createElement("button",{className:"btn",onClick:this.props.onClose},"Close")));return t}}),m=[{label:"Front",display:"front",value:"front"},{label:"Back",display:"back",value:"back"},{label:"Left",display:"left",value:"left"},{label:"Right",display:"right",value:"right"}],f=i.createClass({displayName:"layout-child",mixins:[d.default],componentWillMount:function(){var e=this;this.controller=new n.default(this.props.animationModel),this.lastWidth=this.props.width,this.lastHeight=this.props.height,this.requestAnimationID=window.requestAnimationFrame(function(){e.updateLoop()})},updateLoop:function(){var e=this;if(this.controller.renderer){var t=this.props.animationModel.evaluateAllDOFLayers();t=a.extend({},a.cloneDeep(this.controller.robotInfo.getDefaultDOFValues()),a.cloneDeep(t)),this.resolveTexture(t,"eyeTextureInfixBn_r"),this.resolveTexture(t,"overlayTextureInfixBn_r"),this.resolveTexture(t,"screenBGTextureInfixBn_r"),this.controller.updateDofValues(t),this.controller.update()}this.requestAnimationID=window.requestAnimationFrame(function(){e.updateLoop()})},resolveTexture:function(e,t){e[t]="file://"+r.resolve(this.props.animationModel.projectRoot,e[t])},componentDidMount:function(){var e=this,t=i.findDOMNode(this.refs.preview);this.controller.initialize(t,function(){e.faceOnBody=new c.default(e.refs.faceContainer.getDOMNode(),e.controller.renderer,e.face)}),t.addEventListener("contextmenu",function(e){return"CANVAS"!==e.target.tagName||(e.preventDefault(),e.stopPropagation(),!1)},!1),this.subs=new l.CompositeDisposable,this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.viewAngle),{title:"Body View Angle"})),this.subs.add(atom.tooltips.add(i.findDOMNode(this.refs.reset),{title:"Reset Body View"})),this.face=document.createElement("canvas"),this.face.width=1280,this.face.height=720,this.refs.faceContainer.getDOMNode().appendChild(this.face),this.props.onCreated(this.face)},componentWillUnmount:function(){this.requestAnimationID&&window.cancelAnimationFrame(this.requestAnimationID),this.controller.dispose(),this.subs.dispose()},onMouseDown:function(){return!1},onMouseDownCapture:function(){return!1},onChangeCamera:function(e){this.controller.setCamera(e.value)},onBackgroundColor:function(){},onReset:function(){this.controller.setCamera(m[0].value)},onAnimDBProperties:function(){var e=this,t=this.props.animationModel.editor.animationModel;this.createModal(i.createElement(p,{model:t,onClose:function(){e.destroyModal()}}))},render:function(){this.controller&&this.controller.renderer&&(this.lastWidth!==this.props.width||this.lastHeight!==this.props.height)&&(this.controller.renderer.scene.handleResize(),this.lastWidth=this.props.width,this.lastHeight=this.props.height);var e={preview:{width:this.props.width,height:this.props.height},reset:{position:"absolute",marginLeft:90,marginTop:10},comboBox:{position:"absolute",margin:10},animdb:{position:"absolute",marginLeft:170,marginTop:10},face:{width:this.props.width,height:this.props.height,overflow:"hidden",position:"absolute",pointerEvents:"none"}},t=null;return i.createElement("div",{style:e.preview,tabIndex:1,ref:"preview",className:"animation-preview"},i.createElement("div",{style:e.face,ref:"faceContainer"}),i.createElement("div",{className:"block",style:e.reset},i.createElement("button",{ref:"reset",className:"btn icon icon-sync inline-block-tight",onClick:this.onReset},"Reset")),i.createElement("div",{style:e.comboBox},i.createElement(s.default,{ref:"viewAngle",data:m,init:m[0],onSelected:this.onChangeCamera})),t)}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=f},{"../../atom-react/components/float-input-view":50,"../../atom-react/components/jibo-combo-box":53,"../../atom-react/mixins/modal-mixin":57,"../../common/atom-editor":96,"../controllers/animation-controller":7,"./face-on-body":13,atom:void 0,lodash:void 0,path:void 0,react:void 0}],49:[function(e,t,o){"use strict";var i=e("react/lib/ReactInjection"),n={isCustomAttribute:function(e){return-1!==["mini","gutter-hidden","placeholder-text"].indexOf(e)},Properties:{mini:null,"gutter-hidden":null,"placeholder-text":null},DOMAttributeNames:{},DOMPropertyNames:{}};i.DOMProperty.injectDOMPropertyConfig(n),Object.defineProperty(o,"__esModule",{value:!0}),o.default={activate:function(){},deactivate:function(){}}},{"react/lib/ReactInjection":void 0}],50:[function(e,t,o){"use strict";var i=e("react"),n=i.createClass({displayName:"float-input-view",getDefaultProps:function(){return{style:{width:"100%"},tabIndex:-1,min:-Number.MAX_VALUE,max:Number.MAX_VALUE,defaultValue:0,value:0,precision:20,onChange:function(){}}},getInitialState:function(){return{value:this.toPrecision(this.props.value)}},componentWillMount:function(){this.textValue=this.props.value},componentWillReceiveProps:function(e){var t=this.toPrecision(e.value),o=this.getDOMNode().childNodes[0];this.textValue!==t&&(this.textValue=t,o.value=t,this.setState({value:t}))},toPrecision:function(e){return"number"!=typeof e?0:parseFloat(e.toFixed(this.props.precision))},onFocus:function(){this.getDOMNode().childNodes[0].select(),this.becameSelected=!0},onMouseUp:function(e){this.becameSelected===!0&&(this.becameSelected=!1,e.preventDefault(),e.stopPropagation())},render:function(){var e={width:"100%"};return i.createElement("div",{className:"native-key-bindings",tabIndex:-1},i.createElement("input",{onFocus:this.onFocus,onKeyPress:this.onKeyPress,className:"native-key-bindings",style:Object.assign({},e,this.props.style),tabIndex:this.props.tabIndex,type:"number",onMouseUpCapture:this.onMouseUp,onChange:this.onChange,defaultValue:this.state.value,min:this.props.min,max:this.props.max,onKeyDown:this.onKeyDown,step:"any"}))},onKeyDown:function(){},onKeyPress:function(e){13===e.nativeEvent.keyCode&&(this.getDOMNode().childNodes[0].value=this.state.value)},onChange:function(e){var t=e.target.value;0!==t.length&&(t=parseFloat(t),t=Math.max(this.props.min,t),t=Math.min(this.props.max,t),t=this.toPrecision(t),t!==this.state.value&&(this.setState({value:t}),this.textValue=t,this.props.onChange(t)))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{react:void 0}],51:[function(e,t,o){"use strict";var i=e("react"),n=i.createClass({getDefaultProps:function(){return{min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,tabIndex:-1,defaultValue:0,value:0,precision:0,onChange:function(){}}},getInitialState:function(){return{value:this.toPrecision(this.props.value)}},componentWillMount:function(){this.textValue=this.props.value},componentWillReceiveProps:function(e){var t=this.toPrecision(e.value),o=this.getDOMNode().childNodes[0];this.textValue!==t&&(this.textValue=t,o.value=t,this.setState({value:t}))},toPrecision:function(e){return"number"!=typeof e?0:parseFloat(e.toFixed(this.props.precision))},render:function(){var e={width:"100%"};return i.createElement("div",{className:"native-key-bindings",tabIndex:-1},i.createElement("input",{onKeyPress:this.onKeyPress,className:"native-key-bindings",style:Object.assign({},e,this.props.style),tabIndex:this.props.tabIndex,type:"number",onChange:this.onChange,defaultValue:this.state.value,min:this.props.min,max:this.props.max,step:"any"}))},onKeyPress:function(e){13===e.nativeEvent.keyCode&&(this.getDOMNode().childNodes[0].value=this.state.value)},onChange:function(e){var t=e.target.value;0!==t.length&&(t=parseFloat(t),t=Math.max(this.props.min,t),t=Math.min(this.props.max,t),t=this.toPrecision(t),t!==this.state.value&&(this.setState({value:t}),this.textValue=t,this.props.onChange(t)))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{react:void 0}],52:[function(e,t,o){"use strict";var i=e("react"),n=e("jquery"),a=i.createClass({getInitialState:function(){return{hoveredElement:void 0}},onMouseOver:function(e){this.state.hoveredElement=e,this.setState(this.state)},onMouseOut:function(){this.state.hoveredElement=void 0,this.setState(this.state)},onClick:function(e){this.props.onSelect(e)},render:function(){var e=this,t=[];return this.props.data.forEach(function(o,n){var a="list-item";o===e.state.hoveredElement&&(a+=" selected");var r={},s=null;"string"==typeof o.label?(r={marginLeft:0},s=o.label):s=o.label(),t.push(i.createElement("li",{key:n,className:a,onMouseOver:e.onMouseOver.bind(e,o),onMouseOut:e.onMouseOut.bind(e,o),onClick:e.onClick.bind(e,o)},i.createElement("span",{style:r},s)))}),i.createElement("ul",{className:"list-group"},t)}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({getInitialState:function(){return{clickHandler:this.clickHandler.bind(this)}},render:function(){var e=null;if(this.props.current.display)if("function"==typeof this.props.current.display)e=this.props.current.display();else{var t=null;t=this.props.titleDisplay?this.props.titleDisplay:this.props.current.display,e="  "+t,e=[i.createElement("i",{className:"fa fa-caret-down",style:{fontSize:20}}),e]}var o="combo-box btn";return this.props.hideButton&&(o="combo-box"),i.createElement("div",null,i.createElement("div",{ref:"button",className:o,onClick:this.onClick},e))},removeList:function(){n(document).off("click",this.state.clickHandler),this.node.remove(),this.node=null},onSelect:function(e){this.props.keepFocusAfterClick||this.removeList(),this.props.onSelected(e)},clickHandler:function(e){0===n(e.target).closest(this.node).length&&this.removeList()},onClick:function(e){if(e.preventDefault(),e.stopPropagation(),this.node)this.removeList();else{var t=i.findDOMNode(this.refs.button),o=t.getBoundingClientRect();this.node=n("
").addClass("combo-box-list").css({left:o.left+"px",top:o.bottom+"px"}).appendTo(document.body),n(document).on("click",this.state.clickHandler),i.render(i.createElement(a,{data:this.props.data,onSelect:this.onSelect}),this.node[0])}}})},{jquery:void 0,react:void 0}],53:[function(e,t,o){"use strict";var i=e("react"),n=e("jquery"),a=i.createClass({getInitialState:function(){return{hoveredElement:void 0}},onMouseOver:function(e){this.state.hoveredElement=e,this.setState(this.state)},onMouseOut:function(){this.state.hoveredElement=void 0,this.setState(this.state)},onClick:function(e){this.props.onSelect(e)},render:function(){var e=this,t=[];return this.props.data.forEach(function(o,n){var a="list-item";o===e.state.hoveredElement&&(a+=" selected");var r={},s=null;"string"==typeof o.label?(r={marginLeft:5},s=o.label):s=o.label(),t.push(i.createElement("li",{key:n,className:a,onMouseOver:e.onMouseOver.bind(e,o),onMouseOut:e.onMouseOut.bind(e,o),onClick:e.onClick.bind(e,o)},i.createElement("span",{style:r},s)))}),i.createElement("ul",{className:"list-group"},t)}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({getInitialState:function(){return{clickHandler:this.clickHandler.bind(this),current:this.props.init}},render:function(){var e=null;if(this.state.current.display)if("function"==typeof this.state.current.display)e=this.state.current.display();else{var t=null;t=this.props.titleDisplay?this.props.titleDisplay:this.state.current.display,e="  "+t,e=[i.createElement("i",{className:"fa fa-caret-down",style:{fontSize:20}}),e]}var o="combo-box btn";return this.props.hideButton&&(o="combo-box"),i.createElement("div",null,i.createElement("div",{ref:"button",className:o,onClick:this.onClick},e))},removeList:function(){n(document).off("click",this.state.clickHandler),this.node.remove(),this.node=null},onSelect:function(e){this.state.current=e,this.setState(this.state),this.props.keepFocusAfterClick||this.removeList(),this.props.onSelected(e)},clickHandler:function(e){0===n(e.target).closest(this.node).length&&this.removeList()},onClick:function(e){if(e.preventDefault(),e.stopPropagation(),this.node)this.removeList();else{var t=i.findDOMNode(this.refs.button),o=t.getBoundingClientRect();this.node=n("
").addClass("combo-box-list").css({left:o.left+"px",top:o.bottom+"px"}).appendTo(document.body),n(document).on("click",this.state.clickHandler),i.render(i.createElement(a,{data:this.props.data,onSelect:this.onSelect}),this.node[0])}}})},{jquery:void 0,react:void 0}],54:[function(e,t,o){"use strict";function i(e,t){var o={};if(o[t])return o[t];var i=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return n(i,o),i.content=function(){return this.div({class:t.match(/[A-Z][a-z]+/g).map(function(e){return e.toLowerCase()}).join("-")})},i.prototype.detached=function(){return s.unmountComponentAtNode(this[0]),this.editor.dispose(),this.disposables.dispose()},i.prototype.initialize=function(t){this.disposables=new r.CompositeDisposable,this.editor=t,t.shouldScroll&&(this[0].style.overflow="auto");var o=s.createElement(e,{parent:this[0],editor:t,paneWidth:this[0].offsetWidth,paneHeight:this[0].offsetHeight});if(this.editor.container=this[0],s.render(o,this[0]),this.disposables.add(atom.workspace.onDidChangeActivePaneItem(this.onActivePaneChange.bind(this))),atom.workspace.getActivePaneItem()===this.editor)return this.onActivePaneChange(null)},i.prototype.onActivePaneChange=function(e){var o=null;return e&&(o=e.__displayName||e.constructor.name),e&&o!==t?this.editor.active===!0?(this.editor.active=!1,this.editor.onPaneDeactivated()):void 0:(this.editor.active=!0,this.editor.onPaneActivated())},i}(a.View);return o[t]=i,i}var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=e("atom-space-pen-views"),r=e("atom"),s=e("react");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i},{atom:void 0,"atom-space-pen-views":void 0,react:void 0}],55:[function(e,t,o){"use strict";var i=e("path"),n=e("fs"),a=e("./atom-view-react-bridge"),r=e("atom"),s=e("atom"),l=function(){function e(e,t,o){var n=this;this.__displayName=e,this.emitter=new s.Emitter,this.modifiedStatus=!1,this.shouldScroll=o,this.uri=i.normalize(t),this.tabTitle=i.parse(t).base,this.file=new r.File(this.uri),this.ignoreFirstReload=!0,this.onDidChangeDisposable=this.file.onDidChange(function(){return n.ignoreFirstReload?void(n.ignoreFirstReload=!1):n.shouldPromptToSave()?void(n.ignoreFirstReload=!0):(n.reload(),void(n.ignoreFirstReload=!0))}),this.onDidRenameDisposable=this.file.onDidRename(function(){n.uri=n.file.getPath(),n.tabTitle=i.parse(n.uri).base,n.emitter.emit("did-change-title",{})}),this.active=!1,this.container=null}return e.prototype.dispose=function(){this.onDidChangeDisposable.dispose(),this.onDidRenameDisposable.dispose()},e.prototype.isPaneActive=function(){return this.active},e.prototype.onPaneActivated=function(){},e.prototype.onPaneDeactivated=function(){},e.prototype.getTitle=function(){return this.tabTitle},e.prototype.isModified=function(){return this.modifiedStatus},e.prototype.shouldPromptToSave=function(){return this.modifiedStatus},e.prototype.onDidChangeModified=function(e){return this.emitter.on("did-change-modified",e)},e.prototype.getReactClass=function(){throw new Error("Override "+this.__displayName+".getReactClass()")},e.prototype.getViewClass=function(){return a.default(this.getReactClass(),this.__displayName)},e.prototype.getURI=function(){return this.uri},e.prototype.getPath=function(){return this.uri},e.getProjectRoot=function(e){e=i.normalize(e).toLowerCase();for(var t=atom.project.getPaths(),o=0;o"),t&&(this._modalContainer.width(t),this._modalContainer.addClass("modal-background")),n.render(e,this._modalContainer[0]),this.state=this.state?this.state:{},this.state.modalPanel=atom.workspace.addModalPanel({item:this._modalContainer}),a.push(this.state.modalPanel)},destroyModal:function(){if(n.unmountComponentAtNode(this._modalContainer[0]),this.state.modalPanel){for(var e=a.length-1;e>=0;--e)if(a[e]===this.state.modalPanel){a.splice(e,1);break}this.state.modalPanel.destroy(),this.state.modalPanel=void 0,a.length&&a[a.length-1].show()}}};Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{jquery:void 0,react:void 0}],58:[function(e,t,o){"use strict";function i(e){var t=a(e).parents(".pane");return 0===t.size()&&(t=a(".item-views")),{width:t.width(),height:t.height()}}function n(e){var t=i(e.getDOMNode());e.setProps({paneWidth:t.width,paneHeight:t.height})}var a=e("jquery"),r={setupPaneResizeEventMixin:function(){function e(t){try{var o=i(t.getDOMNode());o.width===t.props.paneWidth&&o.height===t.props.paneHeight||n(t),t.requestID=window.requestAnimationFrame(function(){e(t)})}catch(e){console.log(e)}}e(this)},cleanupPaneResizeEventMixin:function(){window.cancelAnimationFrame(this.requestID)}};Object.defineProperty(o,"__esModule",{value:!0}),o.default=r},{jquery:void 0}],59:[function(e,t,o){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;o1?{disabled:!0}:{});var a=t.disabled?n.createElement("div",{className:"error-messages"},"No animation by that name"):null;return n.createElement("div",{style:{width:"100%"}},n.createElement("div",{className:"block"},n.createElement("div",{className:"fileBlock"},n.createElement("button",{style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),n.createElement(c.default,{ref:"editor",mini:!0,content:this.state.content,onDidChange:function(t){e.state.content=t,e.props.onChange(t),e.setState(e.state)}})),a,n.createElement("div",{className:"btn-group",style:{marginTop:5}},n.createElement("button",i({},o,{className:"btn",onClick:this.onEdit}),"Edit"),n.createElement("button",i({},t,{className:"btn",onClick:this.onPreview}),"Preview"))))},onEdit:function(){atom.workspace.open(this.getUri().replace(".anim",".keys"))},getUri:function(){var e=this.state.content.split("://");if(1===e.length){var t=r.resolve(this.props.projectRoot,"animations",this.state.content);return t}if(2===e.length){var t=r.resolve(this.props.projectRoot,"node_modules",e[0],"animations",e[1]);return t}},onPreview:function(){var e=this;this.createModal(n.createElement(u,{uri:this.getUri(),onClose:function(){e.destroyModal()}}))},onChoose:function(){var e=this;this.createModal(n.createElement(d.default,{root:this.props.projectRoot,uri:this.getUri(),settings:Object.assign({},d.AnimationSettings,{restrictPath:"animations"}),onChoose:function(t,o){e.props.onChange(o),e.setState({content:o})},onClose:function(){e.destroyModal()}}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,i){return n.createElement(h,{key:t,content:e,onChange:o,projectRoot:i})}},{"../../atom-react/mixins/modal-mixin":57,"../../common/animation/animation-visualizer":94,"../../common/atom-editor":96,"../../common/modals/choose-file-modal":107,fs:void 0,path:void 0,react:void 0}],61:[function(e,t,o){"use strict";var i=e("react"),n=e("../../atom-react/mixins/modal-mixin"),a=e("path"),r=e("fs"),s=e("../../common/modals/choose-file-modal"),l=e("../../common/atom-editor"),d=i.createClass({mixins:[n.default],getInitialState:function(){return{key:0,content:this.props.content}},render:function(){var e=this,t={};try{var o=r.statSync(this.getUri()).isFile();o||(t.disabled=!0)}catch(e){t={disabled:!0}}var n=t.disabled?i.createElement("div",{className:"error-messages"},"No audio file by that name"):null;return i.createElement("div",{style:{width:"100%"}},i.createElement("div",{className:"block"},i.createElement("div",{className:"fileBlock"},i.createElement("button",{style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),i.createElement(l.default,{ref:"editor",mini:!0,content:this.state.content,onDidChange:function(t){e.state.content=t,e.props.onChange(t),e.setState(e.state)}})),n,i.createElement("audio",{key:this.state.key++,controls:!0,style:{width:"100%",marginTop:5,marginBottom:5}},i.createElement("source",{src:this.getUri(),type:"audio/mpeg"})),i.createElement("br",null)))},getRoot:function(){return a.resolve(this.props.projectRoot)},getUri:function(){var e=this.state.content.split("://");if(1===e.length){var t=a.resolve(this.props.projectRoot,"audio",this.state.content);return t}if(2===e.length){var t=a.resolve(this.props.projectRoot,"node_modules",e[0],"audio",e[1]);return t}},onChoose:function(){var e=this;this.createModal(i.createElement(s.default,{root:this.getRoot(),uri:this.getUri(),settings:Object.assign({},s.AudioSettings,{restrictPath:"audio"}),onChoose:function(t,o){e.props.onChange(o),e.state.content=o,e.setState(e.state)},onClose:function(){e.destroyModal()}}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,n){return i.createElement(d,{key:t,content:e,onChange:o,projectRoot:n})}},{"../../atom-react/mixins/modal-mixin":57,"../../common/atom-editor":96,"../../common/modals/choose-file-modal":107,fs:void 0,path:void 0,react:void 0}],62:[function(e,t,o){"use strict";var i=e("react"),n=i.createClass({displayName:"boolean-view",getInitialState:function(){return{content:this.props.content}},render:function(){var e="btn selected",t="btn";return i.createElement("div",{className:"block"},i.createElement("div",{className:"btn-group"},i.createElement("button",{className:this.state.content?e:t,onClick:this.toggle},"True"),i.createElement("button",{className:this.state.content?t:e,onClick:this.toggle},"False")))},toggle:function(){this.state.content=!this.state.content,this.setState(this.state),this.props.onChange(this.state.content)}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o){return i.createElement(n,{key:t,content:e,onChange:o})}},{react:void 0}],63:[function(e,t,o){"use strict";var i=e("react"),n=e("../../atom-react/components/jibo-combo-box");Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o){for(var a=[],r={label:"None",display:"None",value:""},s=0;s1?{disabled:!0}:{}),n.createElement("div",{style:{width:"100%"}},n.createElement("div",{className:"block"},n.createElement("div",{className:"fileBlock"},n.createElement("button",{style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),n.createElement(u.default,{ref:"editor",mini:!0,content:this.state.content,onDidChange:function(t){e.state.content=t,e.props.onChange(t),e.setState(e.state)}})),o,n.createElement("div",{className:"btn-group",style:{marginTop:5}},n.createElement("button",i({},t,{className:"btn",onClick:this.onOpen}),"Edit"),n.createElement("button",{className:"btn",onClick:this.onNew},"New"))))},createNewTree:function(e,t){var o=this.props.model.createNewElement(this.props.model.schema[t]),i=r.resolve(this.props.projectRoot,"behaviors",e),n={};n[o.id]=o,l.sync(r.dirname(i)),s.writeFileSync(i,JSON.stringify(n,null," "),"utf8"),atom.workspace.open(i)},onNew:function(){var e=this;c.default.createNewFile(function(t){t=e.props.model.findRelativePathToUri(t,{dropExtension:!0}),e.refs.editor.setText(t)})},getUri:function(){var e,t=this.state.content.split("://");return 1===t.length?e=r.resolve(r.dirname(this.props.model.uri),this.state.content):2===t.length&&(e=r.resolve(this.props.projectRoot,"node_modules",t[0],"behaviors",t[1])),r.extname(e)||(e+=".bt"),s.existsSync(e)||(e=r.resolve(this.props.projectRoot,"src/behaviors",this.state.content),r.extname(e)||(e+=".bt")),e},onOpen:function(){atom.workspace.open(this.getUri())},onChoose:function(){var e=this;this.createModal(n.createElement(d.default,{root:this.props.root,uri:this.getUri(),settings:d.BTSettings,onChoose:function(t,o){var i=e.props.model.findRelativePathToUri(t,{dropExtension:!0});e.props.onChange(i),e.state.content=i,e.setState(e.state)},onCancel:function(){},onClose:function(){e.destroyModal()}}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,i,a){return n.createElement(h,{key:t,content:e,onChange:o,projectRoot:i,model:a})}},{"../../atom-react/mixins/modal-mixin":57,"../../common/atom-editor":96,"../../common/modals/choose-file-modal":107,"../behavior-editor":76,fs:void 0,mkdirp:void 0,path:void 0,react:void 0}],74:[function(e,t,o){"use strict";var i=e("react"),n=e("./arguments");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({propTypes:{behavior:i.PropTypes.object.isRequired,schema:i.PropTypes.object.isRequired},getDefaultProps:function(){return{}},getInitialState:function(){return{key:0}},onChange:function(e,t,o){e[t]=o},onChangeState:function(e,t,o){this.onChange(e,t,o),this.state.key++,this.setState(this.state)},render:function(){var e=[];if(this.props.behavior&&this.props.behavior.options){var t=this.props.model.getSchemaByElement(this.props.behavior);t&&this.render_options(e,t.options)}var o=this.props.isBehaviorArgs?"Behavior Arguments":"Decorator Arguments";return i.createElement("div",{className:"right-pane",ref:"rightPane"},i.createElement("div",{className:"panel-heading",style:{padding:"0px"}},i.createElement("h2",{style:{textAlign:"center",marginTop:"6px",marginBottom:"6px"}},o)),i.createElement("div",{className:"arguments-scroll-container"},e))},render_options:function(e,t){if(void 0!==t)for(var o=0,i=t;o0||p.length>0){var m=null;if(h.length){var f=[];h.forEach(function(e){f.push(i.createElement("li",{style:{paddingLeft:15},className:"list-item"},i.createElement("span",{className:"icon icon-file-submodule"},e)))}),m=[i.createElement("h1",null,"Missing Asset Packs"),i.createElement("h2",null,"Make sure these following asset packs are in the package.json and have been installed"),{assetPacksList:f}]}var v=null;if(p.length){var y=[];p.forEach(function(e){y.push(i.createElement("li",{style:{paddingLeft:15},className:"list-item"},i.createElement("span",{className:"icon icon-file-text"},e)))}),v=[i.createElement("h1",null,"Missing Behaviors"),i.createElement("h2",null,"Make sure the following behaviors are included in your schemas folder"),{behaviorList:y}]}return i.createElement("div",null,i.createElement("ul",{className:"list-group",style:{paddingLeft:20}},m,v))}return i.createElement("div",{tabIndex:-1},i.createElement(s.default,{ref:"topLevel",width:this.props.paneWidth,height:this.props.paneHeight-40,serialized:this.props.editor.layout},i.createElement(l.default,null,i.createElement(d.default,null,i.createElement(n.default,{showRoot:!0,model:this.state.model,onRowSelected:this.onBehaviorRowSelected,onRowDoubleClicked:this.onRowDoubleClicked,onRowHover:this.onBehaviorRowHover,onRowHoverLeave:this.onBehaviorRowHoverLeave,rowClassName:"behavior",isBehavior:!0}),i.createElement(n.default,{key:this.state.decoratorTreeKey,showRoot:!1,model:this.state.decoratorModel,onRowSelected:this.onDecoratorRowSelected,onRowDoubleClicked:this.onDecoratorRowDoubleClicked,onRowHover:this.onDecoratorRowHover,onRowHoverLeave:this.onDecoratorRowHoverLeave,rowClassName:"decorator",isBehavior:!1})),i.createElement(d.default,null,i.createElement(c.default,{schema:this.state.schema,model:this.state.model,behavior:this.state.model.getSelectedBehavior(),isBehaviorArgs:!0,projectRoot:this.props.editor.projectRoot}),i.createElement(c.default,{schema:this.state.schema,model:this.state.model,behavior:this.state.model.getSelectedDecorator(),isBehaviorArgs:!1,projectRoot:this.props.editor.projectRoot})))))},chooseBehavior:function(e){ +var t=this;this.createModal(i.createElement(f.default,{schema:this.state.schema,types:["leaf","composite"],onChoose:function(t,o){e(t,o)},onClose:function(){t.destroyModal()}}))},chooseDecorator:function(e){var t=this;this.createModal(i.createElement(f.default,{schema:this.state.schema,types:["decorator"],onChoose:function(t,o){e(t,o)},onClose:function(){t.destroyModal()}}))},undo:function(){this.undoredo.undo()},redo:function(){this.undoredo.redo()},componentDidMount:function(){var e=this;this.setupPaneResizeEventMixin(),this.disposable=new p.CompositeDisposable,this.disposable.add(atom.commands.add(this.getDOMNode(),{"jibo-sdk:add-decorator":this.addDecorator,"jibo-sdk:add-sibling-above":this.addSiblingAbove,"jibo-sdk:add-sibling-below":this.addSiblingBelow,"jibo-sdk:add-child":this.addChild,"jibo-sdk:swap-behavior":this.swap,"jibo-sdk:move-up-behavior":this.moveUp,"jibo-sdk:move-down-behavior":this.moveDown,"jibo-sdk:edit-description":this.editDescription,"core:undo":this.undo,"core:redo":this.redo})),this.modifiedInterval=setInterval(function(){e.props.editor.checkModified()},100),this.state.model.setSelectedElement(this.state.model.getRoot())},componentWillUnmount:function(){clearInterval(this.modifiedInterval),this.disposable.dispose(),this.cleanupPaneResizeEventMixin()}})},{"../atom-react/mixins/modal-mixin":57,"../atom-react/mixins/pane-resize-event-mixin":58,"../common/layout/h-layout":103,"../common/layout/layout":104,"../common/layout/v-layout":105,"../common/undo-redo":110,"./behavior-arguments-view":74,"./decorator-model":78,"./modals/behavior-selector-modal":81,"./tree-view":91,atom:void 0,marked:void 0,react:void 0}],76:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("fs"),a=e("path"),r=e("../atom-react/core/react-editor"),s=e("./behavior-editor-view"),l=e("./tree-model"),d=e("../common/tree-view-helper"),c=e("lodash"),u=e("./schema-reader"),h=e("./behavior-reader"),p=e("../common/get-asset-packs"),m=e("jibo"),f=e("crypto"),v=e("jibo-analytics"),y="win32"===process.platform?process.env.HOMEPATH:process.env.HOME,g=a.resolve(y,".jibo");n.existsSync(g)||n.mkdirSync(g);var b=a.resolve(g,"temp");n.existsSync(b)||n.mkdirSync(b);var k=function(t){function o(e){var o=t.call(this,"BehaviorEditor",e,!1)||this;o.projectRoot=m.utils.PathUtils.findRoot(e),o.ignoreNextSave=!1,o.schema=(new u.default).getNewSchema(e),o.data=new h.default(o.schema).read(e);var i=o.getUiState();return o.layout=i?i:[],o.model=new l.default(o.data,o.schema,e),o.lastSaved=JSON.stringify(o.model.data),o.onReload=o.onReload.bind(o),o.loadAnimDB(o.projectRoot),o}return i(o,t),o.createNewFile=function(t){var i=d.default.getFolderPathWithDirectory(d.default.getFolderPathOfSelection(),"src/behaviors");if(!i)return void alert("You must have a valid project loaded in order to create a new behavior tree file.");var n=atom.getCurrentWindow(),a=e("remote"),r=a.dialog||a.require("dialog");r.showSaveDialog(n,{title:"New Behavior Tree",defaultPath:i,filters:o.getDialogFilter()},function(e){if(e){if(o.isValidDirectory(e)){var i=(new u.default).getNewSchema(e);l.default.createNewFile(e,i.core.schema.Sequence),atom.workspace.open(e),v.default.event("behavior-editor","new",{})}else alert('You must save behavior trees under the "src/behaviors" folder.');t&&t(e)}})},o.isValidDirectory=function(e){var t=a.normalize("/src/behaviors/");return!!e.includes(t)},o.getDialogFilter=function(){return[{name:"Behavior Tree",extensions:["bt"]}]},o.prototype.loadAnimDB=function(e){var t=p.getAssetPackDictionary(e)["jibo-anim-db-animations"];m.animDB._animDB||m.animDB.init(m,t&&t.root+"/animdb.json")},o.prototype.backup=function(e){var t=c.cloneDeep(this.model.data),o=f.createHash("md5");o.update(e);for(var i=o.digest("hex"),r=a.basename(i),s=b+"/"+r+".backup",l=Object.keys(t),d=0;d")>=0)&&(u.args[h]=u.args[h].split("\n"));n.writeFileSync(s,JSON.stringify(t,null," "),"utf8")},o.prototype.saveFile=function(e){if(!o.isValidDirectory(e))return alert('You must save behavior trees under the "src/behaviors" folder.'),!1;this.ignoreNextSave=!0,this.lastSaved=JSON.stringify(this.model.data);for(var t=c.cloneDeep(this.model.data),i=Object.keys(t),a=0;a")>=0)&&(r.options[d]=r.options[d].split("\n"))}return n.writeFileSync(e,JSON.stringify(t,null," "),"utf8"),v.default.event("behavior-editor","saved",{}),!0},o.prototype.checkModified=function(){var e=JSON.stringify(this.model.data);return e!==this.lastSaved?(this.setModifiedStatus(!0),!0):(this.setModifiedStatus(!1),!1)},o.prototype.serialize=function(){return this.saveUiState(this.layout),t.prototype.serialize.call(this)},o.prototype.dispose=function(){this.saveUiState(this.layout),t.prototype.dispose.call(this)},o.prototype.getReactClass=function(){return s.default},o.prototype.getNewSchema=function(e){return(new u.default).getNewSchema(e)},o.prototype.onReload=function(){this.reload()},o.prototype.reload=function(e){return void 0===e&&(e=this.uri),this.ignoreNextSave?void(this.ignoreNextSave=!1):(this.data=new h.default(this.schema).read(e),this.model.reload(this.data),void this.model.emit("ondatachanged"))},o.prototype.getSaveDialogOptions=function(){return{title:"Behavior Save As",filters:o.getDialogFilter()}},o}(r.default);Object.defineProperty(o,"__esModule",{value:!0}),o.default=k,atom.deserializers.add({deserialize:r.default.deserialize.bind(k),name:"BehaviorEditor"})},{"../atom-react/core/react-editor":55,"../common/get-asset-packs":100,"../common/tree-view-helper":109,"./behavior-editor-view":75,"./behavior-reader":77,"./schema-reader":84,"./tree-model":85,crypto:void 0,fs:void 0,jibo:void 0,"jibo-analytics":void 0,lodash:void 0,path:void 0,remote:void 0}],77:[function(e,t,o){"use strict";var i=e("fs"),n=function(){function t(e){this.schema=e}return t.prototype._getSchemaByElement=function(e){if(!e["asset-pack"]){var t=this.schema.core.schema[e.class];return t||(t=this.schema.project.schema[e.class]),t}var o=e["asset-pack"];return this.schema[o].schema[e.class]},t.prototype._update01=function(t){var o=this;if(!t.meta){var i=e("behaviorify/lib/core");t.meta={version:1},Object.keys(t).forEach(function(e){if("meta"!==e){var n=t[e],a=o._getSchemaByElement(n),r={};a.options.forEach(function(t,o){i[e]?r[i[e][o]]=n.args[o]:r[t.field]=n.args[o]}),delete n.args,n.options=r}})}},t.prototype._update=function(e){this._update01(e)},t.prototype.read=function(e){var t;try{t=JSON.parse(i.readFileSync(e,"utf8"))}catch(e){return void console.error(e)}return this._update(t),Object.keys(t).forEach(function(e){if("meta"!==e){var o=t[e];Object.keys(o.options).forEach(function(e){Array.isArray(o.options[e])&&(o.options[e]=o.options[e].join("\n"))})}}),t},t}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{"behaviorify/lib/core":void 0,fs:void 0}],78:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;o-1&&(k="Decorator");var S="Choose a "+k;return i.createElement("div",{className:"behavior-selector-modal asset-selector-modal",ref:"modal"},i.createElement("div",{className:"panel-heading",style:{padding:"0px"}},i.createElement("h2",{style:{textAlign:"center",marginTop:"6px",marginBottom:"6px"}},S)),i.createElement("label",{style:{marginLeft:10}},"Search"),i.createElement(r.default,{ref:"editor",style:{marginLeft:10,marginRight:10,marginBottom:10},mini:!0,content:this.state.filter,onDidChange:function(t){e.setState({filter:t})}}),i.createElement("div",{className:"contents"},i.createElement("div",{className:"list-contents"},this.getPanelHeading("Asset Pack"),i.createElement("div",{className:"list-group asset-pack",ref:"assetPackList"},t)),i.createElement("div",{className:"list-contents"},this.getPanelHeading(k),i.createElement("ul",{className:"list-group schema-list",ref:"schemaList"},n)),i.createElement("div",{className:"description-contents"},this.getPanelHeading("Description"),i.createElement("div",{className:"behavior-description"},i.createElement("div",{dangerouslySetInnerHTML:{__html:b}})))),i.createElement("div",{className:"btn-group"},i.createElement("button",{className:"btn",onClick:this.onChoose},"Choose"),i.createElement("button",{className:"btn",onClick:this.onCancel},"Cancel")))},onLeft:function(){var e=i.findDOMNode(this.refs.assetPackList);e.focus()},onRight:function(){var e=i.findDOMNode(this.refs.schemaList);e.focus()},componentDidMount:function(){var e=this,t=this.refs.editor,o=i.findDOMNode(this.refs.schemaList),a=i.findDOMNode(this.refs.assetPackList);setTimeout(function(){t.focus(),o.setAttribute("tabIndex","0"),a.setAttribute("tabIndex","1"),e.disposable=new n.CompositeDisposable,e.disposable.add(atom.commands.add(o,{"jibo-sdk:up":e._moveUp,"jibo-sdk:down":e._moveDown,"jibo-sdk:confirm":e.onChoose,"jibo-sdk:left":e.onLeft})),e.disposable.add(atom.commands.add(a,{"jibo-sdk:right":e.onRight})),e.disposable.add(atom.commands.add(e.getDOMNode(),{"jibo-sdk:escape":e.onCancel})),e.disposable.add(atom.commands.add(t.getDOM(),"jibo-sdk:confirm",function(){e.onChoose()}))},100)},componentWillUnmount:function(){this.disposable.dispose()}})},{"../../common/atom-editor":96,atom:void 0,marked:void 0,react:void 0}],82:[function(e,t,o){"use strict";var i=e("react"),n=e("atom"),a=e("../../common/directory-tree-view"),r=e("path"),s=e("normalize-path"),l=e("../../common/get-asset-packs"),d=e("../../common/animation/animation-visualizer"),c=e("../../common/atom-editor");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({onChoose:function(){var e=this.state.currentAssetPack,t=r.join(e.root,"animations"),o=r.relative(t,this.state.currentAnimation);o=s(o),"project"!==this.state.currentAssetPack.id&&(o=e.id+"://"+o),this.props.onChoose(o),this.props.onClose()},onCancel:function(){this.props.onClose()},getLength:function(){return Object.keys(this.behaviorToIndexMap).length},getInitialState:function(){return{currentAssetPack:{id:"project"},currentAnimation:"",filter:""}},onAssetPackSelected:function(e){this.setState({currentAssetPack:e})},onSelected:function(e){this.setState({currentAnimation:e})},getPanelHeading:function(e){return i.createElement("div",{className:"panel-heading",style:{padding:"0px",width:"100%",height:30}},i.createElement("p",{style:{textAlign:"center",marginTop:"4px",marginBottom:"4px"}},e))},render:function(){for(var e,t=this,o=l.default(this.props.root),n=[],s=0;s=0)&&(this.state.currentName===n&&(a+=" selected"),e.push(i.createElement("li",{className:a,onDoubleClick:this.onChoose.bind(this),onClick:this.onNameSelected.bind(this,n)},i.createElement("span",null,n))))}return e},render:function(){var e=this,t=this.getAnimationList();return i.createElement("div",{className:"asset-selector-modal",ref:"modal"},i.createElement("div",{className:"panel-heading",style:{padding:"0px"}},i.createElement("h2",{style:{textAlign:"center",marginTop:"6px",marginBottom:"6px"}},"Choose an Animation")),i.createElement("label",{style:{marginLeft:10}},"Search"),i.createElement(l.default,{ref:"editor",style:{marginLeft:10,marginRight:10,marginBottom:10},mini:!0,content:this.state.filter,onDidChange:function(t){e.setState({filter:t})}}),i.createElement("div",{className:"contents"},i.createElement("div",{className:"name-list-contents"},this.getPanelHeading("Animation Name"),i.createElement("div",{className:"list-group asset-pack",ref:"assetPackList"},t)),i.createElement("div",{className:"preview-contents"},this.getPanelHeading("Preview"),i.createElement("div",{className:"asset-preview"},i.createElement(r.default,{uri:this.state.currentAnimation,style:{width:"100%",height:"100%"}})))),i.createElement("div",{className:"btn-group"},i.createElement("button",{className:"btn",onClick:this.onChoose},"Choose"),i.createElement("button",{className:"btn",onClick:this.onCancel},"Cancel")))},componentWillMount:function(){this.animationNames=s.animDB.getAnimationNames()},componentDidMount:function(){var e=this,t=this.refs.editor;setTimeout(function(){t.focus(),e.getDOMNode().setAttribute("tabIndex","0"),e.disposable=new n.CompositeDisposable,e.disposable.add(atom.commands.add(e.getDOMNode(),{"jibo-sdk:escape":e.onCancel,"jibo-sdk:confirm":e.onChoose}))},100)},componentWillUnmount:function(){this.disposable.dispose()}})},{"../../common/animation/animation-visualizer":94,"../../common/atom-editor":96,atom:void 0,jibo:void 0,path:void 0,react:void 0}],84:[function(e,t,o){"use strict";function i(t){if(!t.meta){var o=e("behaviorify/lib/core"),i=Object.keys(t);i.forEach(function(e){var i=t[e],n=i.meta&&i.meta.length>0?i.meta:[];n.forEach(function(e,t){e.type=i.args[t]}),i.options=n,delete i.meta,delete i.args,o[e]&&i.options.forEach(function(t,n){i.options[n].field=o[e][n]})})}}function n(e){i(e)}var a=e("../atom-react/core/react-editor"),r=e("fs"),s=e("path"),l=function(){function t(e){this.SchemaPaths=["node_modules/jibo/schema/schema.json","node_modules/jibo/schema/schema-base.json"],e&&(this.SchemaPaths=this.SchemaPaths.concat(e))}return t.prototype._requireWithDescriptions=function(e){var t;try{t=JSON.parse(r.readFileSync(e,"utf8")),n(t),delete t.meta,Object.keys(t).forEach(function(o){var i=t[o];if(i.description&&i.description.url){var n=s.resolve(s.dirname(e),i.description.url);try{i.description=r.readFileSync(n,"utf8")}catch(e){i.description=""}}})}catch(t){console.warn("Could not read "+e),console.warn(t)}return t},t.prototype._generateSchemaObject=function(e,t){var o={};return e.forEach(function(e){o=Object.assign(o,e)}),Object.keys(o).forEach(function(e){o[e].class=e,o[e].assetPack=t}),o},t.prototype._addProjectSchema=function(e,t,o){var i=s.resolve(o,"schemas"),n=[];try{r.lstatSync(i);for(var a=r.readdirSync(i),l=0;l {\n}",string:"null",boolean:!1,enum:"null"};return t?t:o[e]},t.createNewFile=function(e,o){var i={id:1,class:o.class,name:""};i.args=[],o.args&&o.args.forEach(function(e,n){var a=o.meta[n].defaultValue;if(Array.isArray(e)){var r=e;e=e[0],"enum"===e&&void 0===a&&(a=r[1].value)}i.args.push(t.getDefaultValueForType(e.toLowerCase(),a))});var n={};n[i.id]=i,l.writeFileSync(e,JSON.stringify(n,null," "),"utf8")},t.prototype.findRelativePathToUri=function(e,t){var o=c.relative(c.dirname(this.uri),e);if("."!==o[0]&&(o="./"+o),t&&t.dropExtension===!0){var i=c.extname(o);""!==i&&(o=o.replace(RegExp("\\"+i+"$"),""))}return h(o)},t.prototype.getSchemaByElement=function(e){if(!e["asset-pack"]){var t=this.schema.core.schema[e.class];return t||(t=this.schema.project.schema[e.class]),t}var o=e["asset-pack"];return this.schema[o].schema[e.class]},t.prototype.addRedoUndoEntry=function(){},t.prototype.getMutationFunctionNames=function(){return["moveUp","moveDown","addRedoUndoEntry"]},t.prototype.reload=function(e){var t=this;this.data=e,this.projectRoot=r.default.getProjectRoot(this.uri);var o=c.join(this.projectRoot,"node_modules","jibo");if(!l.existsSync(o))return void(this.installJibo=!0);this.installJibo=!1,this.nextId=0;var i=void 0===e?[]:Object.keys(e);i.forEach(function(o){if("meta"!==o){var i=e[o];t.nextId=Math.max(t.nextId,i.id)}});for(var n=0;n0){var o=this.data[e.id].decorators[0];t=this.data[o]}return t}},t.prototype._setSelectionState=function(e,t){return void 0!==e&&this.selectionState[e.id]!==t&&(this.selectionState[e.id]=t,!0)},t.prototype.setRenderDescription=function(e){this._setAndClearDescriptionElement(),this.description.element=e,this.description.newValue=void 0},t.prototype._setAndClearDescriptionElement=function(){this.description.element&&"string"==typeof this.description.newValue&&(this.description.element.name=this.description.newValue,this.addRedoUndoEntry()),this._clearDescription()},t.prototype._clearDescription=function(){this.description={element:void 0,newValue:void 0}},t.prototype.isSelected=function(e){return this.selectedElement&&e.id===this.selectedElement.id},t.prototype.createNewElement=function(e,o,i){var n={id:u.v4(),class:o.class,name:"",options:{}};return n["asset-pack"]=e,i&&(n.parent=i.id),o.options&&o.options.forEach(function(e){var o=e.defaultValue,i=e.field,a=e.type;if(Array.isArray(a)){var r=a; +a=a[0],"enum"===a&&void 0===o&&(o=r[1].value)}n.options[i]=t.getDefaultValueForType(a.toLowerCase(),o)}),n},t.prototype.deleteRow=function(e,t){var o=this;if("undefined"==typeof e&&(e=this.selectedElement),"undefined"==typeof t){var i=this.data[e.parent];t=i.children.indexOf(e.id)}var n=e.parent,a=this.data[n],r=this.isSelected(e);this.selectionState[e.id]=void 0;for(var s=[a.children.splice(t,1)[0]];s.length>0;){var l=s.pop();r||(r=this.isSelected(this.data[l])),this.data[l].decorators&&this.data[l].decorators.forEach(function(e){delete o.data[e]}),this.data[l].children&&(s=s.concat(this.data[l].children)),delete this.data[l]}r&&this.setSelectedElement(a),this.addRedoUndoEntry(),this.emit("ondatachanged")},t.prototype.addDecoratorAbove=function(e,t,o,i){e.decorators=e.decorators?e.decorators:[];var n=this.createNewElement(o,i);e.decorators.splice(t,0,n.id),this.data[n.id]=n,this.selectedElement===e&&this.setSelectedDecorator(n),this.addRedoUndoEntry(),this.emit("ondatachanged")},t.prototype.addDecoratorBelow=function(e,t,o,i){this.addDecoratorAbove(e,t+1,o,i)},t.prototype.deleteDecorator=function(e,t){if("undefined"==typeof e&&(e=this.selectedElement),"undefined"==typeof t){var o=this.data[e.parent];t=o.children.indexOf(e.id)}var i=e.decorators.splice(t,1)[0];this.selectedDecorator&&i===this.selectedDecorator.id&&(this.selectedDecorator=void 0),delete this.data[i];var n=this._getFirstDecorator(e);this.setSelectedDecorator(n),this.addRedoUndoEntry(),this.emit("ondatachanged")},t.prototype.addSiblingAbove=function(e,t,o,i){var n=this.getParent(e),a=this.createNewElement(o,i,n);this.data[a.id]=a,n.children.splice(t,0,a.id),this.addRedoUndoEntry(),this.setSelectedElement(a)},t.prototype.addSiblingBelow=function(e,t,o,i){this.addSiblingAbove(e,t+1,o,i)},t.prototype.addChild=function(e,t,o){var i=this.createNewElement(t,o,e);e.children=e.children?e.children:[],e.children.unshift(i.id),this.data[i.id]=i,this.setSelectedElement(i),this.addRedoUndoEntry(),this.emit("ondatachanged")},t.prototype.skip=function(e){e.skipped=!e.skipped,this.addRedoUndoEntry(),this.getParent(e)?this.emit("ondatachanged"):e.skipped=!1,this.addRedoUndoEntry()},t.prototype.swap=function(e,t,o){var i=this.getParent(e),n=this.getRoot()===e,a=this.createNewElement(t,o,i);a.parent=void 0===i?void 0:i.id,a.id=e.id,a.children=e.children,a.decorators=e.decorators,this.data[a.id]=a,n&&(this.root=a),this.setSelectedElement(a),this.addRedoUndoEntry(),this.emit("ondatachanged")},t.prototype.moveUp=function(e,t){var o=t-1,i=this.data[e.parent];i.children.splice(t,1),i.children.splice(o,0,e.id),this.addRedoUndoEntry(),this.emit("ondatachanged")},t.prototype.canMoveUp=function(e,t){return 0!==t},t.prototype.isSkipped=function(e){return e.skipped},t.prototype.moveDown=function(e,t){if(this.canMoveDown(e,t)){var o=t+1,i=this.data[e.parent];i.children.splice(t,1),i.children.splice(o,0,e.id),this.emit("ondatachanged")}},t.prototype.canMoveDown=function(e,t){var o=this.data[e.parent];return t0;)i();d.default.behaviorData=JSON.stringify(t)}},t.prototype.copyDecorator=function(){if(void 0!==this.selectedDecorator){var e=this.selectedDecorator.id,t=this.data[e],o={};o[e]=t,d.default.behaviorData=JSON.stringify(o)}},t.prototype.cut=function(){if(void 0!==this.selectedElement){this.copy();var e=this.selectedElement,t=this.data[e.parent],o=t.children.indexOf(e.id),i=t;if(this.deleteRow(e,o),t.children.length>0){o=Math.max(0,o-1);var n=t.children[o];i=this.data[n]}this.addRedoUndoEntry(),this.setSelectedElement(i)}},t.prototype.cutDecorator=function(){if(void 0!==this.selectedDecorator&&void 0!==this.selectedElement){this.copyDecorator();var e=this.selectedDecorator,t=this.selectedElement.decorators.indexOf(e.id);this.addRedoUndoEntry(),this.deleteDecorator(this.selectedElement,t)}},t.prototype.skipDecorator=function(){if(void 0!==this.selectedDecorator&&void 0!==this.selectedElement){var e=this.selectedDecorator;e.skipped=!e.skipped,this.emit("ondatachanged"),this.addRedoUndoEntry()}},t.prototype.up=function(){if(void 0!==this.selectedElement){var e=this.selectedElement,t=this.data[e.parent];if(t){var o=t.children.indexOf(e.id);if(0===o)this.setSelectedElement(t);else{for(o--,e=this.data[t.children[o]];e.children&&0!==e.children.length;)e=this.data[e.children[e.children.length-1]];this.setSelectedElement(e)}this.emit("ondatachanged")}}},t.prototype.upDecorator=function(){if(this.selectedDecorator){var e=this.selectedElement.decorators.indexOf(this.selectedDecorator.id);e>0&&(e--,this.setSelectedDecorator(this.data[this.selectedElement.decorators[e]]),this.emit("ondatachanged"))}},t.prototype.down=function(){if(void 0!==this.selectedElement){var e,t=!1,o=this.selectedElement,i=this.data[o.parent];if(i&&(e=i.children.indexOf(o.id)),o.children&&o.children.length>0)this.setSelectedElement(this.data[o.children[0]]),t=!0;else if(i&&e0},t.prototype.getChildElement=function(e,t){return this.data[e.children[t]]},t.prototype.shouldNotIndent=function(e){return 0===e},t.prototype.getLabel=function(e,t,o,i){var a=this;switch(t){case 0:return String(i);case 1:return"";case 2:var r=[];r.push(e.class),e.decorators&&e.decorators.length>0&&(r.push(" *("),e.decorators.forEach(function(t,o){var i={};a.data[t].skipped&&(i={"font-style":"italic",color:"#555555"}),r.push(p.createElement("span",{style:i},a.data[t].class)),o!==e.decorators.length-1&&r.push(", ")}),r.push(")"));var l="";this.isSelected(e)&&(l="row-selected-text");var d={},c="";"leaf"===this.getSchemaByElement(e).type?(d.className="icon-stack-base fa fa-leaf",c="green"):"composite"===this.getSchemaByElement(e).type&&(d.className="fa fa-sitemap",c="lightblue"),this.shouldSkip(e)&&(d.className="fa fa-eye-slash",c="#555555"),d.style={color:c};var u=this.shouldSkip(e)?{"font-style":"italic",color:"#555555"}:{};return p.createElement("p",{className:l,style:u},p.createElement("i",n({},d))," ",r);case 3:return e===this.description.element?p.createElement(s.default,{content:e.name,onChange:function(e){a.description.newValue=e},width:o,onConfirm:function(){a._setAndClearDescriptionElement(),a.emit("ondatachanged")}}):e.name}},t.prototype.getRoot=function(){return this.root},t}(a.default);Object.defineProperty(o,"__esModule",{value:!0}),o.default=m},{"../atom-react/core/react-editor":55,"../common/clipboard":97,"./description-editor":79,"./event-emitter":80,fs:void 0,"node-uuid":void 0,path:void 0,react:void 0,slash:void 0}],86:[function(e,t,o){"use strict";var i=e("react");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({displayName:"TreeViewHeader",onMouseDown:function(e,t){t.preventDefault(),this.props.parentReact.onSeparatorDown(e,t)},render:function(){for(var e=[],t=0;t1?n=i.createElement("div",{onMouseDown:this.onMouseDown.bind(this,t),className:"separator"}):a.width=20):(a.width="100%",n=i.createElement("div",null)),e.push(i.createElement("div",{key:t,style:a,className:"cell"},i.createElement("h1",{style:{display:"inline-block"}},o),n))}return i.createElement("div",{className:"row-wrapper-header"},e)}})},{react:void 0}],87:[function(e,t,o){"use strict";var i=e("react"),n=e("./tree-view-row"),a=e("./tree-view-parent"),r=i.createClass({getInitialState:function(){return{isExpanded:!0}},onToggleExpanded:function(){this.state.isExpanded=!this.state.isExpanded,this.setState(this.state)},render:function(){var e=[];if(this.props.showRoot&&e.push(i.createElement(a.default,{row:this.props.row,isRoot:this.props.isRoot,key:0,columnWidths:this.props.columnWidths,element:this.props.element,model:this.props.model,depth:this.props.depth,treeView:this.props.treeView,onToggleExpanded:this.onToggleExpanded,isExpanded:this.state.isExpanded,rowClassName:this.props.rowClassName,isBehavior:this.props.isBehavior})),this.props.model.hasChildren(this.props.element))for(var t=0;t0)return this.props.model.data[t.children[o-1]]},getTotalChildren:function(e){var t=this;if(e.children!==[]&&e.children){var o=0;return e.children.forEach(function(e){e=t.props.model.data[e],o+=1+t.getTotalChildren(e)}),o}return 0},getDecoratorLine:function(e){for(var t=this.props.model.owner.decorators,o=0;o=0},createFile:function(e){var t=i.parse(e).base;if(this.props.filter&&!t.toLowerCase().includes(this.props.filter.toLowerCase()))return null;if(this.props.contentFilter&&!this.uriContains(e,this.props.contentFilter))return null;var o=this.state.selectedItem===e?"list-item selected-item":"list-item";return a.createElement("ul",{className:"list-tree"},a.createElement("li",{onClick:this.onSelected.bind(this,e),onDoubleClick:this.onChosen.bind(this,e),className:o},a.createElement("span",{className:"icon icon-file-text"},t)))},onSelected:function(e){this.props.onSelected(e),this.state.selectedItem=e,this.setState(this.state)},onChosen:function(e){this.state.selectedItem=e,this.setState(this.state),this.props.onChosen(e)},onCollapsed:function(e){this.state.collapsedDirectoried[e]?delete this.state.collapsedDirectoried[e]:this.state.collapsedDirectoried[e]=!0,this.setState(this.state)},createDirectory:function(e,t,o){var r=this;void 0===t&&(t=!1),void 0===o&&(o=!1);var s=i.parse(e).base;if(".git"===s||"node_modules"===s)return null;var l=n.readdirSync(e),d=[];if(l.forEach(function(t){var a=i.resolve(e,t),s=n.lstatSync(a);if(s.isDirectory())d.push(r.createDirectory(a,!1,o));else if(r.props.extension instanceof Array)for(var l=0;l0)for(var o=0;o0){var i=this.props.uri.split("://");e=i[0],t=s.resolve(this.props.root,"node_modules",i[0]),o=s.resolve(this.props.root,l.assetPackUriToRelativeUri(o,this.props.settings.restrictPath||""))}else{var i=s.relative(this.props.root,o).split(s.sep);"node_modules"===i[0]&&(e=i[1],t=s.resolve(this.props.root,i[0],i[1]),o=s.resolve(this.props.root,o))}return{currentAssetPack:{id:e,root:t},currentFile:o,filter:"",key:0}},onAssetPackSelected:function(e){this.setState({currentAssetPack:e})},onSelected:function(e){this.setState({currentFile:e})},getPanelHeading:function(e){return i.createElement("div",{className:"panel-heading",style:{padding:"0px",width:"100%",height:30}},i.createElement("p",{style:{textAlign:"center",marginTop:"4px",marginBottom:"4px"}},e))},getPreview:function(){var e=this,t=function(t){return i.createElement("div",{className:"preview-contents"},e.getPanelHeading("Preview"),i.createElement("div",{className:"asset-preview"},t))},o=null,n=this.props.settings.previewType;if(n){switch(n){case"text":var a="";if(this.state.currentFile)try{if(c.sync(this.state.currentFile))return t("No Preview Available");a=d.readFileSync(this.state.currentFile,"utf8")}catch(e){}o=i.createElement("pre",null,a);break;case"image":o=i.createElement("img",{key:this.state.key++,controls:!0,style:{width:"100%",padding:15},src:this.state.currentFile});break;case"audio":o=i.createElement("audio",{key:this.state.key++,controls:!0,style:{width:"100%",marginTop:"auto",marginBottom:"auto"}},i.createElement("source",{src:this.state.currentFile,type:"audio/mpeg"}));break;case"jiboAnim":o=i.createElement(r.default,{uri:this.state.currentFile,style:{width:"100%",height:"100%"}});break;default:o="No Preview Available"}o=t(o)}return o},render:function(){for(var e,t=this,o=l.default(this.props.root),n=[],r=0;r span");if(1!==e.length)return null;var t=e[0].getAttribute("data-path");return t?t:null},getFolderPathOfSelection:function(){var e=this.getFilePathOfSelection();if(e)return n.dirname(e);var t=i(".tree-view-scroller .directory.selected > .list-item > span.icon");if(1!==t.length)return null;var o=t[0].getAttribute("data-path");return o?o:null},getFolderPathWithDirectory:function(e,t){e&&(e=n.normalize(e));var o=n.normalize("/"+t+"/");if(e)e.includes(o)||(e=n.resolve(a.default.getProjectRoot(e),t));else{var i=a.default.getProjectRoot("");if(!i)return null;e=n.resolve(i,t)}return e}}},{"../atom-react/core/react-editor":55,jquery:void 0,path:void 0}],110:[function(e,t,o){"use strict";var i=e("crypto"),n=function(){function e(e,t){this.model=e,this.debugMode=t,this.debugMode=t,this.model=e;var o=[],i=[];this.undoStack=o,this.redoStack=i;var n=e.getMutationFunctionNames(),a=this.copy;this.latestHash="";var r=this;n.forEach(function(n){var s=e[n];e[n]=function(){s.apply(e,arguments);var n=a(e.getData());r.hashData(n),o[o.length-1]!==n&&(t&&(console.log("added entry"),console.log(JSON.stringify(e.getData(),null,"\t"))),o.push(n),this.emit("ondatachanged")),i.length=0}});var s=a(e.getData());o.push(s),this.hashData(s)}return e.prototype.restore=function(){this.undoStack.length>0&&this.model.reload(JSON.parse(this.undoStack[this.undoStack.length-1]))},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();this.redoStack.push(e);var t=JSON.parse(this.undoStack[this.undoStack.length-1]);this.hashData(this.undoStack[this.undoStack.length-1]),this.model.reload(t),this.debugMode&&(console.log("undone"),console.log(JSON.stringify(t,null,"\t"))),this.model.emit("ondatachanged")}},e.prototype.redo=function(){if(this.redoStack.length>0){var e=this.redoStack.pop();this.undoStack.push(e),this.hashData(e);var t=JSON.parse(e);this.model.reload(t),this.debugMode&&(console.log("redone"),console.log(JSON.stringify(t,null,"\t"))),this.model.emit("ondatachanged")}},e.prototype.hashData=function(e){if(void 0!==e){var t=i.createHash("sha1");t.update(e),this.latestHash=t.digest("hex")}},e.prototype.isSame=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},e.prototype.copy=function(e){return JSON.stringify(e)},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{crypto:void 0}],111:[function(e,t,o){"use strict";var i=e("./subflow-view"),n=e("./picture-view");Object.defineProperty(o,"__esModule",{value:!0}),o.default={subflow:i.default,image:n.default}},{"./picture-view":112,"./subflow-view":113}],112:[function(e,t,o){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,o=1,i=arguments.length;o1?{disabled:!0}:{}),n.createElement("div",{style:{width:"100%"}},n.createElement("div",{className:"block"},n.createElement("div",{className:"fileBlock"},n.createElement("button",{style:{float:"right"},className:"btn",onClick:this.onChoose},"..."),n.createElement(u.default,{ref:"editor",mini:!0,content:this.state.content,onDidChange:function(t){e.state.content=t,e.props.onChange(t),e.setState(e.state)}})),o,n.createElement("div",{className:"btn-group",style:{marginTop:5}},n.createElement("button",i({},t,{className:"btn",onClick:this.onOpen}),"Edit"),n.createElement("button",{className:"btn",onClick:this.onNew},"New"))))},createNewTree:function(e,t){var o=this.props.model.createNewElement(this.props.model.schema[t]),i=r.resolve(this.props.projectRoot,"flows",e),n={};n[o.id]=o,l.sync(r.dirname(i)),s.writeFileSync(i,JSON.stringify(n,null," "),"utf8"),atom.workspace.open(i)},onNew:function(){var e=this;c.default.createNewFile(function(t){var o=n.findDOMNode(e.refs.editor);t=e.props.model.findRelativePathToUri(t,{dropExtension:!0}),o.getModel().setText(t)})},getRoot:function(){var e=r.resolve(this.props.projectRoot,"flows");return e},getUri:function(){var e,t=this.state.content.split("://");return 1===t.length?e=r.resolve(r.dirname(this.props.model.uri),this.state.content):2===t.length&&(e=r.resolve(this.props.projectRoot,"node_modules",t[0],"flows",t[1])),r.extname(e)||(e+=".flow"),s.existsSync(e)||(e=r.resolve(this.props.projectRoot,"src/flows",this.state.content),r.extname(e)||(e+=".flow")),e},onOpen:function(){atom.workspace.open(this.getUri())},onChoose:function(){var e=this;this.createModal(n.createElement(d.default,{root:this.getRoot(),uri:this.getUri(),onChoose:function(t,o){var i=e.props.model.findRelativePathToUri(o,{dropExtension:!0});e.props.onChange(i),e.state.content=i,e.setState(e.state)},onCancel:function(){},onClose:function(){e.destroyModal()}}))}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,o,i,a){return n.createElement(h,{key:t,content:e,onChange:o,projectRoot:i,model:a})}},{"../../atom-react/mixins/modal-mixin":57,"../../common/atom-editor":96,"../flow-editor":114,"../modals/choose-flow-modal":117,fs:void 0,mkdirp:void 0,path:void 0,react:void 0}],114:[function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},n=e("../atom-react/core/react-editor"),a=e("./views/flow-editor-view"),r=e("../common/tree-view-helper"),s=e("./flow-model"),l=e("jibo"),d={},c=function(t){function o(e){var o=t.call(this,"FlowEditor",e,!1)||this;o.uri=e,o.projectRoot=l.utils.PathUtils.findRoot(e);var i=o.getUiState();return o.layout=i?i:[],o.model=new s.default(e,o.projectRoot),o.lastSaved=JSON.stringify(o.model.data),d[e]=o,o}return i(o,t),o.getProcedureParameters=function(e){for(var t in d)if(t===e&&d[t].model.surface){for(var o in d[t].model.surface.model.nodeDataArray){var i=d[t].model.surface.model.nodeDataArray[o];if("Flow.Begin"===i.class)return i.options.inputParameters}return""}var n,a=l.flow.FlowRootFactory.create(e);try{n=a.getStartActivity()}catch(e){console.warn(e)}return n?n.options.inputParameters.join("\n"):""},o.createNewFile=function(t){var i=r.default.getFolderPathWithDirectory(r.default.getFolderPathOfSelection(),"src/flows"),n=atom.getCurrentWindow(),a=e("remote"),l=a.dialog||a.require("dialog");l.showSaveDialog(n,{title:"New Flow",defaultPath:i,filters:o.getDialogFilter()},function(e){e&&(o.isValidDirectory()?(s.default.createNewFile(e),atom.workspace.open(e)):alert('You must save flows under the "src/flows" folder.'),t&&t(e))})},o.isValidDirectory=function(){return!0},o.getDialogFilter=function(){return[{name:"Flows",extensions:["flow"]}]},o.prototype.showModified=function(e){this.setModifiedStatus(e)},o.prototype.serialize=function(){return this.saveUiState(this.layout),t.prototype.serialize.call(this)},o.prototype.dispose=function(){this.saveUiState(this.layout),t.prototype.dispose.call(this);for(var e in d)if(this===d[e]){delete d[e];break}},o.prototype.onPaneDeactivated=function(){this.model.onPaneDeactivated()},o.prototype.getReactClass=function(){return a.default},o.prototype.setSelectedShape=function(e){this.editor.setState({selectedShape:e})},o.prototype.saveFile=function(e){return o.isValidDirectory()?(this.model.saveToFile(e),!0):(alert('You must save flows under the "flows" folder.'),!1)},o.prototype.reload=function(){},o.prototype.getSaveDialogOptions=function(){return{title:"Save Flow As",filters:o.getDialogFilter()}},o.prototype.setSelectedBufferRange=function(e){var t=e[0][0];this.model.navigateToShapeOnLine(this.uri,t)},o}(n.default);atom.deserializers.add({deserialize:n.default.deserialize.bind(c),name:"FlowEditor"}),Object.defineProperty(o,"__esModule",{value:!0}),o.default=c},{"../atom-react/core/react-editor":55,"../common/tree-view-helper":109,"./flow-model":115,"./views/flow-editor-view":124,jibo:void 0,remote:void 0}],115:[function(e,t,o){"use strict";var i=e("fs"),n=e("path"),a=e("../behavior-editor/schema-reader"),r=e("slash"),s=e("glob"),l=e("find-root"),d=e("../common/get-asset-packs"),c=e("jibo"),u='\n{\n "class": "go.GraphLinksModel",\n "dataFormat": "flow-1",\n "nodeKeyProperty": "id",\n "nodeCategoryProperty": "class",\n "linkFromPortIdProperty": "fromPort",\n "linkToPortIdProperty": "toPort",\n "nodeDataArray": [],\n "linkDataArray": []}\n',h=function(){function e(e,t){this.uri=e,this.projectRoot=t,this.schema=this.loadSchemas(e),this.loadAnimDB(t)}return e.createNewFile=function(e){var t=JSON.parse(u),o=JSON.stringify(t,null," ");i.writeFileSync(e,o)},e.prototype.loadAnimDB=function(e){var t=d.getAssetPackDictionary(e)["jibo-anim-db-animations"];c.animDB._animDB||c.animDB.init(c,t&&t.root+"/animdb.json")},e.prototype.findRelativePathToUri=function(e,t){var o=n.relative(n.dirname(this.uri),e);if("."!==o[0]&&(o="./"+o),t&&t.dropExtension===!0){var i=n.extname(o);""!==i&&(o=o.replace(RegExp("\\"+i+"$"),""))}return r(o)},e.prototype.clearObsoleteOptions=function(e,t){for(var o=this.getSchemaByElement(e).options,i=0,n=o;i=0&&!(n[o].indexOf('"class": ')>=0);o--);if(o>=0)for(var a=o;a=0){var r=n[a],s=r.split(":"),l=s[1].replace(/[ ",]/g,""),d=this.surface.findNodeForKey(l);this.surface.select(d),this.surface.commandHandler.scrollToPart(d),this.surface.select(d);break}},e.prototype.onPaneDeactivated=function(){},e.prototype.listifyOptions=function(e){for(var t=e.nodeDataArray,o=0;o")>=0)&&(i.options[r]=i.options[r].split("\n"))}}return e},e.prototype.saveToFile=function(e){var t=this.surface.model.toJson(),o=JSON.parse(t);o=this.listifyOptions(o),i.writeFileSync(e,JSON.stringify(o,null," "),"utf8"),this.surface.isModified=!1},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=h},{"../behavior-editor/schema-reader":84,"../common/get-asset-packs":100,"find-root":void 0,fs:void 0,glob:void 0,jibo:void 0,path:void 0,slash:void 0}],116:[function(e,t,o){"use strict";var i=e("../atom-react/core/react-editor"),n=e("../common/tree-view-helper"),a=e("jibo-dev"),r=e("path"),s=function(){function e(){}return e.preflight=function(){var e=i.default.getProjectRoot(""),t=n.default.getFilePathOfSelection();if(!t||!t.endsWith(".flow"))return void alert("Cannot preflight "+t);var o=new a.FlowLint(e,t);o.run();var s=r.resolve(e,"preflight.log");o.writeReportToFile(s),atom.workspace.open(s)},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=s},{"../atom-react/core/react-editor":55,"../common/tree-view-helper":109,"jibo-dev":void 0,path:void 0}],117:[function(e,t,o){"use strict";var i=e("react"),n=e("atom"),a=e("../../common/directory-tree-view"),r=e("path"),s=e("normalize-path"),l=e("../../common/get-asset-packs"),d=e("../../common/atom-editor");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({onChoose:function(){var e=this.state.currentAssetPack,t=r.join(e.root,"src/flows"),o=r.relative(t,this.state.currentFlow);o=s(o),"project"!==this.state.currentAssetPack.id&&(o=e.id+"://"+o),this.props.onChoose(o,this.state.currentFlow),this.props.onClose()},onCancel:function(){this.props.onCancel(),this.props.onClose()},getLength:function(){return Object.keys(this.behaviorToIndexMap).length},getInitialState:function(){return{currentAssetPack:{id:"project"},currentFlow:"",filter:""}},onAssetPackSelected:function(e){this.setState({currentAssetPack:e})},onSelected:function(e){this.setState({currentFlow:e})},getPanelHeading:function(e){return i.createElement("div",{className:"panel-heading",style:{padding:"0px",width:"100%",height:30}},i.createElement("p",{style:{textAlign:"center",marginTop:"4px",marginBottom:"4px"}},e))},render:function(){for(var e,t=this,o=l.default(this.props.root),n=[],s=0;s=a){var r=t.midPoint,s=new i.default.Point(o.x-this._offset.x-r.x,o.y-this._offset.y-r.y);e.segmentOffset=s.rotate(-t.midAngle)}else{var l=e.segmentFraction,d=void 0,c=void 0;if(n>=0)d=t.getPoint(n),c=n0?t.getPoint(u-1):d}var h=d.x+(c.x-d.x)*l,p=d.y+(c.y-d.y)*l,s=new i.default.Point(o.x-this._offset.x-h,o.y-this._offset.y-p),m=n>=0?d.directionPoint(c):c.directionPoint(d);e.segmentOffset=s.rotate(-m)}}}}},{"./go":125}],121:[function(e,t,o){"use strict";var i=e("./go");o.LinkShiftingTool=function(){i.default.Tool.call(this),this.name="LinkShifting";var e=new i.default.Shape;e.geometryString="F1 M0 0 L8 0 M8 4 L0 4",e.fill=null,e.stroke="dodgerblue",e.background="lightblue",e.cursor="pointer",e.segmentIndex=0,e.segmentFraction=1,e.segmentOrientation=i.default.Link.OrientAlong,this._fromHandleArchetype=e,e=new i.default.Shape,e.geometryString="F1 M0 0 L8 0 M8 4 L0 4",e.fill=null,e.stroke="dodgerblue",e.background="lightblue",e.cursor="pointer",e.segmentIndex=-1,e.segmentFraction=1,e.segmentOrientation=i.default.Link.OrientAlong,this._toHandleArchetype=e,this._handle=null,this._originalPoints=null},i.default.Diagram.inherit(o.LinkShiftingTool,i.default.Tool),o.LinkShiftingTool.prototype.updateAdornments=function(e){if(null!==e&&e instanceof i.default.Link){var t=e,o="LinkShiftingFrom",n=null;if(t.isSelected&&this.diagram&&!this.diagram.isReadOnly){var a=t.selectionObject;if(null!==a&&t.actualBounds.isReal()&&t.isVisible()&&a.actualBounds.isReal()&&a.isVisibleObject()){var r=t.computeSpot(!0);(r.isSide()||r.isSpot())&&(n=t.findAdornment(o),null===n&&(n=this.makeAdornment(a,!1),n.category=o,t.addAdornment(o,n)))}}if(null===n&&t.removeAdornment(o),o="LinkShiftingTo",n=null,t.isSelected&&this.diagram&&!this.diagram.isReadOnly){var a=t.selectionObject;if(null!==a&&t.actualBounds.isReal()&&t.isVisible()&&a.actualBounds.isReal()&&a.isVisibleObject()){var r=t.computeSpot(!1);(r.isSide()||r.isSpot())&&(n=t.findAdornment(o),null===n&&(n=this.makeAdornment(a,!0),n.category=o,t.addAdornment(o,n)))}}null===n&&t.removeAdornment(o)}},o.LinkShiftingTool.prototype.makeAdornment=function(e,t){var o=new i.default.Adornment;o.type=i.default.Panel.Link;var n=t?this._toHandleArchetype:this._fromHandleArchetype;return null!==n&&o.add(n.copy()),o.adornedObject=e,o},o.LinkShiftingTool.prototype.canStart=function(){if(!this.isEnabled)return!1;var e=this.diagram;if(null===e||e.isReadOnly||e.isModelReadOnly)return!1;if(!e.lastInput.left)return!1;var t=this.findToolHandleAt(e.firstInput.documentPoint,"LinkShiftingFrom");return null===t&&(t=this.findToolHandleAt(e.firstInput.documentPoint,"LinkShiftingTo")),null!==t},o.LinkShiftingTool.prototype.doActivate=function(){var e=this.diagram;if(null!==e){var t=this.findToolHandleAt(e.firstInput.documentPoint,"LinkShiftingFrom");if(null===t&&(t=this.findToolHandleAt(e.firstInput.documentPoint,"LinkShiftingTo")),null!==t){var o=t.part,n=o.adornedObject.part;n instanceof i.default.Link&&(this._handle=t,this._originalPoints=n.points.copy(),this.startTransaction(this.name),e.isMouseCaptured=!0,e.currentCursor="pointer",this.isActive=!0)}}},o.LinkShiftingTool.prototype.doDeactivate=function(){this.isActive=!1;var e=this.diagram;null!==e&&(e.isMouseCaptured=!1,e.currentCursor="",this.stopTransaction())},o.LinkShiftingTool.prototype.doStop=function(){this._handle=null,this._originalPoints=null},o.LinkShiftingTool.prototype.doCancel=function(){var e=this._handle.part,t=e.adornedObject.part;t.points=this._originalPoints,this.stopTool()},o.LinkShiftingTool.prototype.doMouseMove=function(){this.isActive&&this.doReshape(this.diagram.lastInput.documentPoint)},o.LinkShiftingTool.prototype.doMouseUp=function(){this.isActive&&(this.doReshape(this.diagram.lastInput.documentPoint),this.transactionResult=this.name),this.stopTool()},o.LinkShiftingTool.prototype.doReshape=function(e){var t=this._handle.part,o=t.adornedObject.part,n="LinkShiftingFrom"===t.category,a=null;a=n?o.fromPort:o.toPort;var r=new i.default.Rect(a.getDocumentPoint(i.default.Spot.TopLeft),a.getDocumentPoint(i.default.Spot.BottomRight)),s=r.width>0?(e.x-r.x)/r.width:0,l=r.height>0?(e.y-r.y)/r.height:0,d=void 0,c=void 0;s<=0?(d=0,c=l<=0?0:l>=1?1:l):s>=1?(d=1,c=l<=0?0:l>=1?1:l):l<=0?(d=s,c=0):l>=1?(d=s,c=1):s>l?s>1-l?(d=1,c=l):(d=s,c=0):s>1-l?(d=s,c=1):(d=0,c=l),void 0!==d&&void 0!==c&&(n?o.fromSpot=new i.default.Spot(d,c):o.toSpot=new i.default.Spot(d,c))}},{"./go":125}],122:[function(e,t,o){"use strict";var i=e("./go");o.ResizeMultipleTool=function(){i.default.ResizingTool.call(this),this.name="ResizeMultiple"},i.default.Diagram.inherit(o.ResizeMultipleTool,i.default.ResizingTool),o.ResizeMultipleTool.prototype.resize=function(e){var t=this.diagram;null!==t&&t.selection.each(function(t){if(!(t instanceof i.default.Link||t instanceof i.default.Group||t.data&&t.data.clazz.startsWith("Flow.Begin"))){var o=t.resizeObject,n=t.position.copy(),a=o.getDocumentAngle(),r=o.getDocumentScale(),s=Math.PI*a/180,l=Math.cos(s),d=Math.sin(s),c=e.width-o.naturalBounds.width,u=e.height-o.naturalBounds.height,h=a>0&&a<180?1:0,p=a>90&&a<270?1:0,m=a>180&&a<360?1:0;n.x+=r*((e.x+c*p)*l-(e.y+u*h)*d),n.y+=r*((e.x+c*m)*d+(e.y+u*p)*l),o.desiredSize=e.size,t.position=n}})}},{"./go":125}],123:[function(e,t,o){"use strict";var i=e("react"),n=e("../../behavior-editor/arguments"),a=e("../arguments"),r=e("./JiboColors"),s=e("./go");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({displayName:"layout-child",propTypes:{shape:i.PropTypes.object.isRequired,schema:i.PropTypes.object.isRequired},getDefaultProps:function(){return{}},getInitialState:function(){return{key:0}},onChange:function(e,t,o){var i=this.props.model.surface.model;i.startTransaction("field value change"),i.setDataProperty(e,t,o),i.commitTransaction("field value change")},onChangeState:function(e,t,o){this.onChange(e,t,o),this.state.key++,this.setState(this.state)},getObject:function(e){var t=this.props.shape.data;if(t._isPaletteNode)return{};void 0===e&&(e="options");for(var o=0,i=e.split(".");o=0&&(t+="// "+a+"\n")}return t}function v(e,t,o,i,n){n.data.options.inputParameters=H.default.getProcedureParameters(t),n.data.options.subflowId=e.model.findRelativePathToUri(t,{dropExtension:!0}),o.startTransaction("set-name"),o.setDataProperty(n.data,"name",j.basename(i,".flow")),o.commitTransaction("set-name")}function y(e,t,o,i,n){n.data.options.behaviorPath=e.model.findRelativePathToUri(i,{dropExtension:!0}),o.startTransaction("set-name"),o.setDataProperty(n.data,"name",j.basename(i,".bt")),o.commitTransaction("set-name")}function g(e,t,o,i,n){o.startTransaction("set-name"),o.setDataProperty(n.data,"url",i),o.commitTransaction("set-name")}function b(e,t,o,i,n){var a=j.resolve(t,i);e.getSchemaByElementField(n.data,"getMimPath")?n.data.options.getMimPath=k(e,j.relative(t,a),n):(n.data.options.mimPath=R(j.relative(t,a)),L.existsSync(a)&&L.statSync(a).isFile()&&(n.data.options.getPromptData=S(e,a,n),"Mim.Announcement"!==n.data.class&&(n.data.options.onSuccess=w(e,a,n)),o.startTransaction("set-name"),o.setDataProperty(n.data,"name",E(i)),o.commitTransaction("set-name")))}function k(e,t,o){var i=e.getSchemaByElementField(o.data,"getMimPath").defaultValue;return i.replace(/return ['"][^'"]+['"];?/,"return '"+R(t)+"';")}function S(e,t,o){var i=e.getSchemaByElementField(o.data,"getPromptData").defaultValue,n=f(t);return i+"\n"+n+"\n"}function w(e,t,o){var i=e.getSchemaByElementField(o.data,"onSuccess").defaultValue,n=M(t,"rule_slots");return i+"\n//Transitions: "+n+"\n"}function E(e){var t=j.basename(e,".mim");return m(t)}function M(e,t){var o=L.readFileSync(e,"utf8");return C(o,t)}function C(e,t){for(var o,i=e.split("\n"),n=0;n",e.style.display="none",document.body.appendChild(e)}var O=e("react"),T=e("../../atom-react/mixins/pane-resize-event-mixin"),L=e("fs"),j=e("path"),R=e("normalize-path"),I=e("node-uuid"),B=e("../../common/modals/choose-file-modal"),A=e("../modals/choose-flow-modal"),F=e("jquery"),H=e("../flow-editor"),U=e("./JiboColors"),z=e("./go");_();var W=z.default.GraphObject.make,V=e("./LinkLabelDraggingTool"),K=e("./LinkShiftingTool"),G=e("./GuidedDraggingTool"),J=e("./ResizeMultipleTool"),q=e("../../common/layout/layout"),X=e("../../common/layout/h-layout"),Y=e("./flow-arguments-view"),Q=e("./procedure-view"),$=e("atom"),Z=O.createClass({displayName:"FlowEditorView",mixins:[T.default],versionUpModified:!1,shapeProperties:{},paletteIconWidth:140,getInitialState:function(){return{selectedShape:null,tempSelectedShape:null,diagram:null,key:0}},componentDidMount:function(){this.setupPaneResizeEventMixin(),this.disposables=new $.CompositeDisposable,this.disposables.add(atom.commands.add(this.getDOMNode(),{"jibo-sdk:align-shape-tops":this.alignShapeTops,"jibo-sdk:align-shape-middles":this.alignShapeMiddles,"jibo-sdk:align-shape-bottoms":this.alignShapeBottoms, +"jibo-sdk:align-shape-lefts":this.alignShapeLefts,"jibo-sdk:align-shape-centers":this.alignShapeCenters,"jibo-sdk:align-shape-rights":this.alignShapeRights,"jibo-sdk:align-shape-widths":this.alignShapeWidths,"jibo-sdk:align-shape-heights":this.alignShapeHeights,"jibo-sdk:distribute-shapes-vertically":this.distributeShapesVertically,"jibo-sdk:distribute-shapes-horizontally":this.distributeShapesHorizontally,"jibo-sdk:distribute-shapes-tops":this.distributeShapesTops,"jibo-sdk:distribute-shapes-middles":this.distributeShapesMiddles,"jibo-sdk:distribute-shapes-bottoms":this.distributeShapesBottoms,"jibo-sdk:distribute-shapes-lefts":this.distributeShapesLefts,"jibo-sdk:distribute-shapes-centers":this.distributeShapesCenters,"jibo-sdk:distribute-shapes-rights":this.distributeShapesRights,"jibo-sdk:toggle-grid":this.toggleGrid,"jibo-sdk:toggle-alignment-guide":this.toggleAlignmentGuide,"jibo-sdk:toggle-snap-into-position":this.toggleSnapIntoPosition,"core:undo":this.undo,"core:redo":this.redo,"core:cut":this.cut,"core:copy":this.copy,"core:paste":this.paste}));var e=O.findDOMNode(this.refs.palette),t=O.findDOMNode(this.refs.diagram);this.initializeSurface(e,t)},componentWillUnmount:function(){this.cleanupPaneResizeEventMixin(),this.disposables.dispose()},componentWillReceiveProps:function(){this.requestDiagramUpdate()},dispose:function(){this.saveUiState(this.layout)},serialize:function(){this.saveUiState(this.layout)},onInnerHLayoutResize:function(){},onHLayoutResize:function(){},onVLayoutResize:function(){},undo:function(){},redo:function(){},cut:function(){},copy:function(){},paste:function(){},render:function(){var e=this,t={border:"solid 1px gray",height:"100%"},o=this.state.diagram,i=[],n=this.state.selectedShape||this.state.tempSelectedShape,a=this.state.selectedShape instanceof z.default.Node||this.state.selectedShape instanceof z.default.Link,r=this.state.tempSelectedShape instanceof z.default.Node;return!o||a&&!r||i.push(O.createElement(Q.default,{model:this.props.editor.model,setParentsSelectedShape:function(t){e.setState({tempSelectedShape:t,selectedShape:null})},diagram:o,projectRoot:this.props.editor.projectRoot})),(a||r)&&(0!==i.length&&i.push(O.createElement("hr",{key:this.state.key++})),i.push(O.createElement(Y.default,{title:n?n.data.name:"",subtitle:n?n.data.class:"",model:this.props.editor.model,shape:n,projectRoot:this.props.editor.projectRoot}))),O.createElement("div",{tabIndex:-1},O.createElement(q.default,{width:this.props.paneWidth,height:this.props.paneHeight-40,ref:"topLevel",serialized:this.props.editor.layout},O.createElement(X.default,{onLayoutResize:this.onLayoutResize},O.createElement("div",{style:t,ref:"palette"}),O.createElement("div",{className:"native-key-bindings",style:t,ref:"diagram"}),O.createElement("div",{className:"right-pane",ref:"rightPane"},O.createElement("div",{className:"arguments-scroll-container"},i)))))},onLayoutResize:function(){this.requestDiagramUpdate()},initializeSurface:function(e,t){this.loadShapeProperties();var o=this.setupDiagram(t),i=this.setupPalette(e);this.setupNodeTemplates(o,!1),this.setupNodeTemplates(i,!0),this.loadPalette(i),this.setupLinkTemplates(o);var n=this.loadFromFile(this.props.editor.uri);this.versionUpModified=D(n),o.model=n,this.props.editor.model.setSurface(o,i),this.setState({selectedShape:void 0,diagram:o}),this.requestDiagramUpdate=function(){o.requestUpdate(),i.requestUpdate()},this.requestDiagramUpdate()},requestDiagramUpdate:function(){},setupDiagram:function(e){var t=this,o=W(z.default.Diagram,e,{allowDrop:!0,allowResize:!0,initialContentAlignment:z.default.Spot.Center,LinkDrawn:this.showLinkLabel,LinkRelinked:this.showLinkLabel,"animationManager.isEnabled":!1,"undoManager.isEnabled":!0,resizingTool:new J.ResizeMultipleTool,draggingTool:new G.GuidedDraggingTool,"draggingTool.horizontalGuidelineColor":"blue","draggingTool.verticalGuidelineColor":"blue","draggingTool.centerGuidelineColor":"green","draggingTool.guidelineWidth":1}),n="#2B3856",a="#151B54";return o.grid=W(z.default.Panel,"Grid",{name:"GRID",visible:!1,gridCellSize:new z.default.Size(10,10),gridOrigin:new z.default.Point(0,0)},W(z.default.Shape,"LineH",{stroke:a,strokeWidth:.5,interval:1}),W(z.default.Shape,"LineH",{stroke:a,strokeWidth:.5,interval:5}),W(z.default.Shape,"LineH",{stroke:n,strokeWidth:1,interval:10}),W(z.default.Shape,"LineV",{stroke:a,strokeWidth:.5,interval:1}),W(z.default.Shape,"LineV",{stroke:a,strokeWidth:.5,interval:5}),W(z.default.Shape,"LineV",{stroke:n,strokeWidth:1,interval:10})),e.style.position="relative",o.addDiagramListener("ObjectDoubleClicked",function(e){var i=e.subject.part;if(i instanceof z.default.Node){var n=i.data,a=void 0,r=j.parse(t.props.editor.getURI()).dir;"Flow.Subflow"===n.class?a=j.resolve(r,n.options.subflowId+".flow"):n.class.startsWith("Mim")&&n.options.mimPath?a=j.resolve(t.props.editor.projectRoot,n.options.mimPath):"Subtree"!==n.class&&"Flow.Subtree"!==n.class||(a=j.resolve(r,n.options.behaviorPath+".bt")),a&&L.existsSync(a)&&atom.workspace.open(a)}else if(i instanceof z.default.Link){var s=i.findObject("link-label");s&&o.commandHandler.editTextBlock(s)}}),o.addDiagramListener("Modified",function(){var e=o.isModified||t.versionUpModified;t.versionUpModified=!1,t.props.editor.showModified(e)}),o.addDiagramListener("ExternalObjectsDropped",function(e){var i=[];e.subject.each(function(e){i.push(e)}),o.toolManager.draggingTool.clearGuidelines();for(var n=function(e){return e.data._deleteOnDrop?(e.diagram.commandHandler.deleteSelection(),"continue"):(delete e.data.key,delete e.data.paletteOrdering,delete e.data._isPaletteNode,e.data.options={},t.displayShape(e.part),void t.chooseNameOrTargetOfActivity(o,e.part,function(){},function(){e.diagram.commandHandler.deleteSelection()}))},a=0,r=i;a");var t=O.createElement(A.default,{root:this.root,onChoose:this.onChoose,onCancel:this.onCancel,onClose:function(){e.destroyModal()}});O.render(t,this._modalContainer[0]),this.state.modalPanel=atom.workspace.addModalPanel({item:this._modalContainer})},e.prototype.destroyModal=function(){O.unmountComponentAtNode(this._modalContainer[0]),this.state.modalPanel&&(this.state.modalPanel.destroy(),this.state.modalPanel=void 0)},e}(),te=function(){function e(e,t,o){this.root=e,this.onChoose=t,this.onCancel=o,this.state={}}return e.prototype.createModal=function(){var e=this;this._modalContainer=F("
");var t=O.createElement(B.default,{root:this.root,settings:B.BTSettings,onChoose:this.onChoose,onCancel:this.onCancel,onClose:function(){e.destroyModal()}});O.render(t,this._modalContainer[0]),this.state.modalPanel=atom.workspace.addModalPanel({item:this._modalContainer})},e.prototype.destroyModal=function(){O.unmountComponentAtNode(this._modalContainer[0]),this.state.modalPanel&&(this.state.modalPanel.destroy(),this.state.modalPanel=void 0)},e}(),oe=function(){function e(e,t,o){this.root=e,this.onChoose=t,this.onCancel=o,this.state={}}return e.prototype.createModal=function(e){var t=this;this._modalContainer=F("
");var o=O.createElement(B.default,{root:this.root,settings:Object.assign({},B.MimSettings,{contentFilter:e}),onChoose:this.onChoose,onCancel:this.onCancel,onClose:function(){t.destroyModal()}});O.render(o,this._modalContainer[0]),this.state.modalPanel=atom.workspace.addModalPanel({item:this._modalContainer})},e.prototype.destroyModal=function(){O.unmountComponentAtNode(this._modalContainer[0]),this.state.modalPanel&&(this.state.modalPanel.destroy(),this.state.modalPanel=void 0)},e}(),ie=function(){function e(e,t,o){this.root=e,this.onChoose=t,this.onCancel=o,this.state={}}return e.prototype.createModal=function(){var e=this;this._modalContainer=F("
");var t=O.createElement(B.default,{root:this.root,settings:B.ImageSettings,onChoose:this.onChoose,onCancel:this.onCancel,onClose:function(){e.destroyModal()}});O.render(t,this._modalContainer[0]),this.state.modalPanel=atom.workspace.addModalPanel({item:this._modalContainer})},e.prototype.destroyModal=function(){O.unmountComponentAtNode(this._modalContainer[0]),this.state.modalPanel&&(this.state.modalPanel.destroy(),this.state.modalPanel=void 0)},e}(),ne=[{key:"control-M",method:c},{key:"control-N",method:u},{key:"control-L",method:h},{key:"control-T",method:p},{key:"Up",method:d},{key:"Down",method:d},{key:"Left",method:d},{key:"Right",method:d},{key:"meta-Up",method:d},{key:"meta-Down",method:d},{key:"meta-Left",method:d},{key:"meta-Right",method:d}];Object.defineProperty(o,"__esModule",{value:!0}),o.default=Z},{"../../atom-react/mixins/pane-resize-event-mixin":58,"../../common/layout/h-layout":103,"../../common/layout/layout":104,"../../common/modals/choose-file-modal":107,"../flow-editor":114,"../modals/choose-flow-modal":117,"./GuidedDraggingTool":118,"./JiboColors":119,"./LinkLabelDraggingTool":120,"./LinkShiftingTool":121,"./ResizeMultipleTool":122,"./flow-arguments-view":123,"./go":125,"./procedure-view":126,atom:void 0,fs:void 0,jquery:void 0,"node-uuid":void 0,"normalize-path":void 0,path:void 0,react:void 0}],125:[function(e,t,o){"use strict";var i,n=e("path"),a=e("find-root");i=e(n.join(a(__dirname),"resources/externals/go")),Object.defineProperty(o,"__esModule",{value:!0}),o.default=i},{"find-root":void 0,path:void 0}],126:[function(e,t,o){"use strict";var i=e("react"),n=e("./JiboColors");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({displayName:"layout-child",currentScale:1,propTypes:{diagram:i.PropTypes.object.isRequired},getDefaultProps:function(){return{}},getInitialState:function(){return{key:0}},onChange:function(e,t,o){var i=this.props.model.surface.model;i.startTransaction("field value change"),i.setDataProperty(e,t,o),i.commitTransaction("field value change")},handleMouseOver:function(){},handleMouseEnter:function(e){this.currentScale=this.props.diagram.scale,this.props.diagram.scrollToRect(e.actualBounds),this.props.diagram.scale=this.currentScale;var t=this.props.model.surface.model; +t.startTransaction("highlight change"),e.isHighlighted=!0},handleMouseLeave:function(e){this.props.diagram.scale=this.currentScale,e.diagram.undoManager.rollbackTransaction();var t=[];this.props.diagram.selection.each(function(e){t.push(e)}),0!==t.length&&this.props.diagram.scrollToRect(t[0].actualBounds)},handleClick:function(e){this.props.setParentsSelectedShape(e)},handleDoubleClick:function(e){this.props.diagram.scale=this.currentScale,e.diagram.undoManager.rollbackTransaction(),this.props.diagram.clearSelection(),this.props.diagram.select(e)},refCallback:function(e,t){var o=this;e&&(e.getDOMNode().ondblclick=function(){return o.handleDoubleClick(t)})},render:function(){var e=[],t=this.findReferences("blackboard"),o=this.findReferences("notepad\\.params"),n=this.findReferences("notepad","notepad\\.params");return this.populate(e,"Blackboard",t),this.populate(e,"Input Parameters",o),this.populate(e,"Notepad",n),i.createElement("div",null,e)},populate:function(e,t,o){for(var a=this,r=[],s="",l=function(e){var t=e.node,o={width:"100%"};e.isAssignment&&(o.color="white");var l="";e.varName!==s&&(s=l=e.varName);var c={padding:"2px"},u=i.createElement("tr",{key:d.state.key++},i.createElement("td",{key:d.state.key++,style:Object.assign({},c,{color:n.default.Limeade})},l),i.createElement("td",{key:d.state.key++,style:c},i.createElement("div",{onMouseEnter:function(){a.handleMouseEnter(t)},onMouseLeave:function(){a.handleMouseLeave(t)},ref:function(e){return a.refCallback(e,t)},onClick:function(){a.handleClick(t)},style:o},e.line)));r.push(u)},d=this,c=0,u=o;c=0){var r=l[t][this.state.prompt_category];o").addClass("combo-box-list").css({left:o.left+"px",top:o.bottom+"px"}).appendTo(document.body),n(document).on("click",this.state.clickHandler),i.render(i.createElement(a,{data:this.props.data,onSelect:this.onSelect}),this.node[0])}}})},{jquery:void 0,react:void 0}],154:[function(e,t,o){"use strict";var i=e("react"),n=e("../../atom-react/components/float-input-view"),a=e("../../atom-react/components/integer-input-view");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({getInitialState:function(){return{value:this.props.value}},componentWillReceiveProps:function(e){this.setState({value:e.value})},render:function(){var e={marginTop:4,height:20,width:50,display:"inline"},t="number"===this.props.type?i.createElement(n.default,{min:this.props.min,max:this.props.max,value:this.state.value,onChange:this.props.onChange,style:e}):i.createElement(a.default,{min:this.props.min,max:this.props.max,value:this.state.value,onChange:this.props.onChange,style:e});return t}})},{"../../atom-react/components/float-input-view":50,"../../atom-react/components/integer-input-view":51,react:void 0}],155:[function(e,t,o){"use strict";var i=e("react"),n=e("../../common/atom-editor");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({render:function(){return i.createElement("div",{style:{width:"100%"}},i.createElement(n.default,{ref:"editor",mini:!0,content:this.props.content,grammar:this.props.grammar,advanced:{softWrap:!0},onDidStopChanging:this.props.onChange}))},componentWillReceiveProps:function(e){var t=this.refs.editor;t.setText(e.content),t.props.onDidStopChanging=e.onChange}})},{"../../common/atom-editor":96,react:void 0}],156:[function(e,t,o){"use strict";var i=e("react"),n=e("../../common/atom-editor");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({render:function(){return i.createElement("div",{style:{width:"100%"}},i.createElement(n.default,{ref:"editor",hideGutter:!0,style:{minHeight:this.props.height},content:this.props.content,grammar:this.props.grammar,advanced:{softWrap:!0,hideInvisibles:!0},onDidStopChanging:this.props.onChange}))},componentWillReceiveProps:function(e){var t=this.refs.editor;t.setText(e.content),t.props.onDidStopChanging=e.onChange}})},{"../../common/atom-editor":96,react:void 0}],157:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=[[{displayName:"Prompt ID",dataName:"prompt_id",type:"string",description:"Unique identifier for this prompt, to assist error messages in telling you where something went wrong when debugging."},{dataName:"delete"}],[{displayName:"Prompt Category",dataName:"prompt_category",type:"dropdown",params:{data:"promptCategories"},description:"The main category for the prompt"},{displayName:"Prompt Subcategory",dataName:"prompt_sub_category",type:"dropdown",params:{data:"promptSubCategories"},description:"The sub category for the prompt. Some main categories will only have one sub category."}],[{displayName:"Weight",dataName:"weight",type:"number",params:{min:0},description:"Weighting for randomization - larger numbers will be picked more than smaller numbers. 0 disables the prompt."},{displayName:"Index",dataName:"index",type:"integer",params:{min:1},description:"Index of the prompt. Represents order in which prompts should be used, given repetitions of MIM errors.",promptCat:"prompt-cat-error-only",short:!0},{displayName:"Media",dataName:"media",type:"dropdown",params:{data:"mediaTypes"},description:"The type of media. TTS handles all SFX, animations, and TTS. If you are sure you want nothing to happen, Silence is available.",short:!0}],[{displayName:"Condition",dataName:"condition",type:"string",description:"Condition for which the prompt should be usable. This is standard Javascript, as though in an if() expression.",params:{grammar:"source.js"}}],[{displayName:"Prompt",dataName:"prompt",type:"string",params:{grammar:"text.mim-esml"},description:"The prompt text. Standard text, with optional ESML tags and ${} wrapping Javascript for dynamic insertion."}]]},{}],158:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default={mim_type:{type:"string",default:"announcement",values:["announcement","question","optional-response"]},rule_name:{type:"string",default:""},gui:{type:"object",default:null},timeout:{type:"number",default:6},no_matches_for_gui:{type:"number",default:0},no_inputs_for_gui:{type:"number",default:0},ignore_no_match:{type:"boolean",default:!1},barge_in:{type:"boolean",default:!0},es_auto_tagging:{type:"boolean",default:!0},parse_all_asr:{type:"boolean",default:!1},thanks_handling:{type:"string",default:"ignore",values:["ignore","respondAndListen","respondAndEnd"]},notes:{type:"string",default:""}}},{}],159:[function(e,t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default={prompt_category:{type:"string",default:"Entry-Core",values:["Entry-Core","Error"]},prompt_sub_category:{type:"string",default:"AN",values:["AN","Q","NI","NM","HoldReturn","Truncated","Verbose","Thanks"]},index:{type:"number",default:1},condition:{type:"string",default:""},prompt:{type:"string",default:""},media:{type:"string",default:"TTS",values:["TTS","silence"]},prompt_id:{type:"string",default:""},weight:{type:"number",default:1}}},{}],160:[function(e,t,o){"use strict";var i=e("react"),n=e("jibo-cli"),a=e("jquery"),r=e("path"),s=e("fs"),l=e("atom"),d=e("../atom-react/components/jibo-combo-box"),c=e("jibo-analytics"),u=e("../common/atom-editor"),h=i.createClass({getInitialState:function(){return this.data=[{label:"Create Skill",display:"Skill",value:{template:"behavior-template",fields:[{label:"Package.json name",ref:"packageName"}]}},{label:"Create Asset Pack",display:"Asset Pack",value:{template:"asset-pack-template",fields:[{label:"Package.json name",ref:"packageName"},{label:"Asset Pack Title",ref:"titleName"}]}}],{step:0,type:this.data[0].value}},onChangeConfiguration:function(e){this.setState({type:e.value})},getFieldValue:function(e){var t=this.refs[e];return t?t.getText():""},createInputField:function(e,t,o){var n=this;return i.createElement("div",{className:"block"},i.createElement("label",null,e),i.createElement(u.default,{ref:t,tabIndex:o,mini:!0,content:"",onDidChange:function(e){var o=i.findDOMNode(n.refs.generateButton);n.fields[t]=e.length>0,o.disabled=!n.areFieldsFilledIn()}}))},render:function(){var e=this;switch(this.state.step){case 0:var t=[];return this.state.type.fields.forEach(function(o,i){t.push(e.createInputField(o.label,o.ref,i))}),i.createElement("div",{className:"block package-generator"},i.createElement("div",{className:"panel-heading"},i.createElement("h1",{style:{textAlign:"center"}},"New Jibo Skill")),i.createElement("div",{className:"block"},i.createElement("label",null,"Type"),i.createElement(d.default,{data:this.data,init:this.data[0],onSelected:this.onChangeConfiguration})),t,i.createElement("hr",null),i.createElement("div",{className:"btn-group"},i.createElement("button",{className:"btn",ref:"generateButton",onClick:this.onChoose},"Generate"),i.createElement("button",{className:"btn",onClick:this.props.onClose +},"Cancel")));case 1:return i.createElement("div",{className:"inline-block",style:{display:"flex"}},i.createElement("i",{className:"fa fa-cog fa-spin fa-5x"}),i.createElement("label",{style:{margin:"auto",fontSize:23}},"Installing node dependencies"))}},areFieldsFilledIn:function(){for(var e=Object.keys(this.fields),t=!0,o=0;o0?s[s.length-1]:o;this.setState(this.state),n.packageGenerator(this.state.type.template,a,l,i,function(){e.props.onClose(),atom.open({pathsToOpen:[a]}),c.default.event("new-project",e.state.type.template,{})})},getPackagesDirectory:function(){return atom.config.get("core.projectHome")||process.env.ATOM_REPOS_HOME||r.join(s.getHomeDirectory(),"github")}});Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){var e=a("
"),t=atom.workspace.addModalPanel({item:e});i.render(i.createElement(h,{onClose:function(){t.destroy()}}),e[0])}},{"../atom-react/components/jibo-combo-box":53,"../common/atom-editor":96,atom:void 0,fs:void 0,"jibo-analytics":void 0,"jibo-cli":void 0,jquery:void 0,path:void 0,react:void 0}],161:[function(e,t,o){"use strict";function i(e){var t=r.normalize("/rules/");return!!e.includes(t)}function n(){var t=s.default.getFolderPathWithDirectory(s.default.getFolderPathOfSelection(),"src/rules");if(!t)return void alert("You must have a valid project loaded in order to create a new .rule file.");var o=atom.getCurrentWindow(),n=e("remote"),r=n.dialog||n.require("dialog");r.showSaveDialog(o,{title:"New Rule",defaultPath:t,filters:[{name:"Rules",extensions:["rule"]}]},function(e){if(e)if(i(e)){var t="TopRule = $* (hello world){what='hello'} $*;";a.writeFileSync(e,t,"utf8"),atom.workspace.open(e),l.default.event("rules-editor","new",{})}else alert('You must save rule files under the "src/rules" folder.')})}var a=e("fs"),r=e("path"),s=e("../common/tree-view-helper"),l=e("jibo-analytics");Object.defineProperty(o,"__esModule",{value:!0}),o.default=n},{"../common/tree-view-helper":109,fs:void 0,"jibo-analytics":void 0,path:void 0,remote:void 0}],162:[function(e,t,o){"use strict";var i=e("react");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({getInitialState:function(){return{hover:!1}},render:function(){var e={marginTop:-20,width:10,height:20},t=null;return this.state.hover&&(t=i.createElement("span",{className:"badge badge-info",style:{fontSize:15}},this.props.message)),i.createElement("div",null,i.createElement("div",{onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,style:e}),t)},onMouseOver:function(){this.setState({hover:!0})},onMouseOut:function(){this.setState({hover:!1})}})},{react:void 0}],163:[function(e,t,o){"use strict";var i=e("react");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({getInitialState:function(){return{hover:!1}},render:function(){var e={marginLeft:-50,marginTop:-25,width:30,height:25},t=null;return this.state.hover&&(t=i.createElement("span",{className:"badge badge-info",style:{fontSize:15}},this.props.message)),i.createElement("div",null,i.createElement("div",{onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,style:e}),t)},onMouseOver:function(){this.setState({hover:!0})},onMouseOut:function(){this.setState({hover:!1})}})},{react:void 0}],164:[function(e,t,o){"use strict";function i(){var t=r(__dirname),o=a.join(t,"parser/build/Release/jsjibonlu.jibo"),i=a.join(t,"parser/build/Release/jsjibonlu.node");n.existsSync(o)&&n.renameSync(o,i);var s;try{s=e(i);var l=a.join(t,"parser","deps","data");s.set_data_dir(l);var d=a.join(t,"resources/crew/dummy-crew.rule"),c=n.readFileSync(d,"utf8");s.compile_fst_from_text(c,"handle:crew")}catch(e){console.warn("Error importing jibo-parser. The Rule Tester Panel will not work.")}return s}var n=e("fs"),a=e("path"),r=e("find-root");Object.defineProperty(o,"__esModule",{value:!0}),o.default=i},{"find-root":void 0,fs:void 0,path:void 0}],165:[function(e,t,o){"use strict";var i=e("path"),n=e("react"),a=e("./error-popup"),r=e("./gutter-popup"),s=e("./jibo-parser"),l=function(){function e(){this.start(),this.nlu=s.default()}return e.prototype.onChange=function(){this.marker&&(this.marker.destroy(),this.lineNumber&&this.lineNumber.parentNode&&this.lineNumber.parentNode.removeChild(this.lineNumber));var e=this.editor.getText();try{this.nlu&&this.nlu.syntax_check(e)}catch(e){var t=JSON.parse(e.message);if(t.info.line){var o=[[t.info.line-1,t.info.column-1],[t.info.line-1,t.info.column]];this.marker=this.editor.markBufferRange(o,{invalidate:"never"}),this.editor.decorateMarker(this.marker,{type:"highlight",class:"jibo-highlight-red"}),this.editor.decorateMarker(this.marker,{type:"line-number",class:"jibo-line-number-red"});var i=document.createElement("div");n.render(n.createElement(a.default,{message:t.info.msg,marker:this.marker}),i),this.editor.decorateMarker(this.marker,{type:"overlay",item:i})}else{var o=[[0,0],[0,1]];this.marker=this.editor.markBufferRange(o,{invalidate:"never"}),this.editor.decorateMarker(this.marker,{type:"line-number",class:"jibo-line-number-red"});var i=document.createElement("div");n.render(n.createElement(r.default,{message:t.info.msg,marker:this.marker}),i),this.editor.decorateMarker(this.marker,{type:"overlay",item:i})}console.log(t)}},e.prototype.start=function(){var e=this;atom.workspace.observeActivePaneItem(function(t){if(t&&t.constructor&&"TextEditor"===t.constructor.name){var o=i.extname(t.getPath());e.dispoable&&e.dispoable.dispose(),".nli"!==o&&".rule"!==o&&".grm"!==o||(e.editor=t,e.dispoable=t.onDidStopChanging(e.onChange.bind(e)))}})},e}();Object.defineProperty(o,"__esModule",{value:!0}),o.default=new l},{"./error-popup":162,"./gutter-popup":163,"./jibo-parser":164,path:void 0,react:void 0}],166:[function(e,t,o){"use strict";var i=e("react"),n=e("parser-download"),a=e("./jibo-parser"),r=e("path"),s=e("find-root"),l=a.default(),d={};Object.defineProperty(o,"__esModule",{value:!0}),o.default=i.createClass({addDisposable:function(e){this.disposables.push(e)},getInitialState:function(){return this.disposables=[],{result:"",compileTime:0,parseTime:0}},compile:function(){if(l){var e=i.findDOMNode(this.refs.json);this.parser=null,l.remove_from_memory("handle:1");try{var t=performance.now(),o=l.compile_fst_from_text(this.props.editor.getText(),"handle:1"),n=performance.now();this.parser=l.build_sentence_parser(o),this.setState({compileTime:n-t})}catch(t){e.getModel().setText("[]"),this.setState({compileTime:0,parseTime:0})}}},onDownload:function(){var e=this,t={force32:!0,version:"2.0.0",type:process.versions.modules,temp:r.join(s(__dirname),"tmp"),dir:r.join(s(__dirname),"parser"),rename:!0,logger:function(e){console.log("[parser-download]",e)}};n(t,function(t){t&&console.error(t),l=a.default(),e.setState({})})},parse:function(){var e=i.findDOMNode(this.refs.json),t=i.findDOMNode(this.refs.editor);if(this.parser){var o=performance.now();try{var n=this.parser.parse_sentence(t.getModel().getText()),a=performance.now();this.setState({parseTime:a-o}),n=JSON.parse(n),n=JSON.stringify(n,null,4),e.getModel().setText(n)}catch(t){e.getModel().setText("[]"),this.setState({compileTime:0,parseTime:0})}}else e.getModel().setText("[]"),this.setState({compileTime:0,parseTime:0})},render:function(){var e={width:"100%",height:"100%",display:"flex",flexDirection:"column"};return l?i.createElement("div",{style:e,ref:"container"},i.createElement("div",{className:"panel-heading",style:{padding:"0px"}},i.createElement("h2",{style:{textAlign:"center",marginTop:"6px",marginBottom:"6px"}},"Test ",this.props.editor.getTitle())),i.createElement("atom-text-editor",{ref:"editor",style:{marginLeft:10,marginRight:10,marginBottom:10,marginTop:20},mini:!0,"placeholder-text":"Enter test sentence here"}),i.createElement("div",{className:"text-info",style:{margin:10}},i.createElement("span",{className:"icon icon-graph"})," ","compile time: "+this.state.compileTime.toFixed(2)+"ms, parse time: "+this.state.parseTime.toFixed(2)+"ms"),i.createElement("div",{className:"json-container"},i.createElement("atom-text-editor",{"gutter-hidden":!0,ref:"json",style:{height:"100%"}})),i.createElement("div",{style:{height:26}})):i.createElement("div",{style:e,ref:"container"},i.createElement("div",{className:"panel-heading",style:{padding:"0px"}},i.createElement("h2",{style:{textAlign:"center",marginTop:"6px",marginBottom:"6px"}},"Test ",this.props.editor.getTitle())),i.createElement("div",{className:"text-center highlight-warning",style:{margin:"10px"}},"The Rule Tester Panel is currently disabled because the NLU Parser module is out of date. This can happen when updating to a newer version of Atom."),i.createElement("div",{className:"text-center"},i.createElement("button",{className:"btn btn-lg",style:{marginBottom:"6px"},onClick:this.onDownload},"Click To Update"),i.createElement("p",null,i.createElement("em",null,"Please refresh current .rule file after updating"))),i.createElement("div",{style:{height:26}}))},componentDidMount:function(){var e=this;if(l){var t=i.findDOMNode(this.refs.editor),o=i.findDOMNode(this.refs.json),n=i.findDOMNode(this.refs.container);n.addResizeListener=function(){console.log(n.clientWidth,n.clientHeight)};for(var a=!1,r=atom.grammars.getGrammars(),s=0;s");i.addClass("toolbar"),v.render(v.createElement(y.default,null),i[0]),t.toolbarPanel=atom.workspace.addTopPanel({item:i});var n=function(e){var o=null;if(e&&(o=e.__displayName||(e.constructor?e.constructor.name:null)),"TextEditor"===o){var i=r.extname(e.getPath());if(".nli"===i||".rule"===i||".grm"===i)return t.editor=e,void t.toggleRulePane(!0,e)}t.toggleRulePane(!1)};atom.workspace.observeActivePaneItem(function(e){n(e)}),n(atom.workspace.getActiveTextEditor()),e("./rules/rule-grammar"),o=!0},a=function(){return w.default.isUserLoggedIn()?void n():(i=!0,void w.default.showDialog(function(e,t){return i=!1,e?void console.log(e):void(t&&n())}))};a(),this.disposable.add(atom.commands.add("atom-workspace",{"jibo-sdk:login":function(){return o?void alert("You are already logged in"):void(i||a())}}))},t.prototype.deactivate=function(){this.toolbarPanel&&this.toolbarPanel.destroy(),this.disposable.dispose(),g.default.deactivate()},t.prototype.openURI=function(e){if(h.default.useDefaultEditor()!==!1){if("atom://jibo-cheat-sheet"===e)return new b.default(e,!0);var t={".keys":s.default,".bt":l.default,".mim":d.default,".flow":c.default},o=r.extname(e).toLowerCase();if(a.has(t,o)){var i={".anim":"animation-preview",".keys":"animation-editor",".bt":"behavior-editor",".mim":"mim-editor",".flow":"flow-editor"};return M.default.event(i[o],"opened",{}),new t[o](e)}}},t}();t.exports=new C},{"./animation-editor/animation-editor":1,"./atom-react/atom-integration":49,"./behavior-editor/behavior-editor":76,"./cheat-sheet/cheat-sheat-tab":92,"./common/json-opener":101,"./flow-editor/flow-editor":114,"./flow-editor/flow-preflight-runner":116,"./gating/login":127,"./launcher/launcher":129,"./mim-editor/mim-editor":137,"./package-generator/package-generator-modal":160,"./rules/create-new-rule":161,"./rules/rule-grammar":165,"./rules/rule-tester-panel":166,"./toolbar/toolbar":168,atom:void 0,"jibo-analytics":void 0,jquery:void 0,lodash:void 0,loophole:void 0,path:void 0,react:void 0}]},{},[169])(169)}); \ No newline at end of file diff --git a/node_modules/jibo-sdk/menus/jibo-atom.cson b/node_modules/jibo-sdk/menus/jibo-atom.cson new file mode 100644 index 0000000..c5385aa --- /dev/null +++ b/node_modules/jibo-sdk/menus/jibo-atom.cson @@ -0,0 +1,112 @@ +'menu': [ + { + 'label': 'Jibo', + 'submenu': [ + {'label': 'New Animation', 'command': 'jibo-sdk:new-animation-file'} + {'label': 'New Behavior Tree', 'command': 'jibo-sdk:new-behavior-tree-file'} + {'label': 'New MIM', 'command': 'jibo-sdk:new-mim-file'} + {'label': 'New Flow', 'command': 'jibo-sdk:new-flow-file'} + {'label': 'New Rule', 'command': 'jibo-sdk:new-rule-file'} + {'label': 'New Project', 'command': 'jibo-sdk:new-project'} + {'type': 'separator'} + {'label': 'Flow', + 'submenu': [ + {'label': 'Preflight', 'command': 'jibo-sdk:preflight-flow'} + {'label': 'Toggle', + 'submenu': [ + {'label': 'Grid ^O t g', 'command': 'jibo-sdk:toggle-grid'} + {'label': 'Alignment guides ^O t a', 'command': 'jibo-sdk:toggle-alignment-guide'} + {'label': 'Snapping-to-grid ^O t s', 'command': 'jibo-sdk:toggle-snap-into-position'} + {'label': 'Bezier links ^O t b', 'command': 'jibo-sdk:toggle-bezier-links'} + ]} + {'label': 'Align Shape', + 'submenu': [ + {'label': 'Tops ^O a t', 'command': 'jibo-sdk:align-shape-tops'} + {'label': 'Middles ^O a m', 'command': 'jibo-sdk:align-shape-middles'} + {'label': 'Bottoms ^O a b', 'command': 'jibo-sdk:align-shape-bottoms'} + {'label': 'Lefts ^O a l', 'command': 'jibo-sdk:align-shape-lefts'} + {'label': 'Centers ^O a c', 'command': 'jibo-sdk:align-shape-centers'} + {'label': 'Rights ^O a r', 'command': 'jibo-sdk:align-shape-rights'} + ]} + {'label': 'Equalize Shape', + 'submenu': [ + {'label': 'Widths ^O a w', 'command': 'jibo-sdk:align-shape-widths'}, + {'label': 'Heights ^O a h', 'command': 'jibo-sdk:align-shape-heights'} + ]} + {'label': 'Distribute Shapes', + 'submenu': [ + {'label': 'Vertically ^O d v', 'command': 'jibo-sdk:distribute-shapes-vertically'}, + {'label': 'Tops ^O d t', 'command': 'jibo-sdk:distribute-shapes-tops'} + {'label': 'Middles ^O d m', 'command': 'jibo-sdk:distribute-shapes-middles'} + {'label': 'Bottoms ^O d b', 'command': 'jibo-sdk:distribute-shapes-bottoms'} + {'label': 'Horizontally ^O d h', 'command': 'jibo-sdk:distribute-shapes-horizontally'} + {'label': 'Lefts ^O d l', 'command': 'jibo-sdk:distribute-shapes-lefts'} + {'label': 'Centers ^O d c', 'command': 'jibo-sdk:distribute-shapes-centers'} + {'label': 'Rights ^O d r', 'command': 'jibo-sdk:distribute-shapes-rights'} + + ]} + ]} + {'label': 'Open Cheat Sheet', 'command': 'jibo-sdk:cheat-sheet'} + {'label': 'Atom React Styleguide', 'command': 'atom-react:styleguide'} + {'type': 'separator'} + {'label': 'Login...', 'command': 'jibo-sdk:login'} + ] + } +] +'context-menu': + 'atom-pane .bodyRenderer': [ + {'label': 'Play Animation', 'command': 'jibo-sdk:play-animation'} + ] + '.tree-view.full-menu': [ + {'type': 'separator'} + { + 'label': 'Jibo', + 'submenu': [ + {'label': 'New Animation', 'command': 'jibo-sdk:new-animation-file'} + {'label': 'New Behavior Tree', 'command': 'jibo-sdk:new-behavior-tree-file'} + {'label': 'New MIM', 'command': 'jibo-sdk:new-mim-file'} + {'label': 'New Flow', 'command': 'jibo-sdk:new-flow-file'} + {'label': 'New Rule', 'command': 'jibo-sdk:new-rule-file'} + {'label': 'New Project', 'command': 'jibo-sdk:new-project'} + {'type': 'separator'} + {'label': 'Flow', + 'submenu': [ + {'label': 'Preflight ^O p', 'command': 'jibo-sdk:preflight-flow'} + {'label': 'Toggle', + 'submenu': [ + {'label': 'Grid ^O t g', 'command': 'jibo-sdk:toggle-grid'} + {'label': 'Alignment guides ^O t a', 'command': 'jibo-sdk:toggle-alignment-guide'} + {'label': 'Snapping-to-grid ^O t s', 'command': 'jibo-sdk:toggle-snap-into-position'} + {'label': 'Bezier links ^O t b', 'command': 'jibo-sdk:toggle-bezier-links'} + ]} + {'label': 'Align Shape', + 'submenu': [ + {'label': 'Tops ^O a t', 'command': 'jibo-sdk:align-shape-tops'} + {'label': 'Middles ^O a m', 'command': 'jibo-sdk:align-shape-middles'} + {'label': 'Bottoms ^O a b', 'command': 'jibo-sdk:align-shape-bottoms'} + {'label': 'Lefts ^O a l', 'command': 'jibo-sdk:align-shape-lefts'} + {'label': 'Centers ^O a c', 'command': 'jibo-sdk:align-shape-centers'} + {'label': 'Rights ^O a r', 'command': 'jibo-sdk:align-shape-rights'} + ]} + {'label': 'Equalize Shape', + 'submenu': [ + {'label': 'Widths ^O a w', 'command': 'jibo-sdk:align-shape-widths'}, + {'label': 'Heights ^O a h', 'command': 'jibo-sdk:align-shape-heights'} + ]} + {'label': 'Distribute Shapes', + 'submenu': [ + {'label': 'Vertically ^O d v', 'command': 'jibo-sdk:distribute-shapes-vertically'}, + {'label': 'Tops ^O d t', 'command': 'jibo-sdk:distribute-shapes-tops'} + {'label': 'Middles ^O d m', 'command': 'jibo-sdk:distribute-shapes-middles'} + {'label': 'Bottoms ^O d b', 'command': 'jibo-sdk:distribute-shapes-bottoms'} + {'label': 'Horizontally ^O d h', 'command': 'jibo-sdk:distribute-shapes-horizontally'} + {'label': 'Lefts ^O d l', 'command': 'jibo-sdk:distribute-shapes-lefts'} + {'label': 'Centers ^O d c', 'command': 'jibo-sdk:distribute-shapes-centers'} + {'label': 'Rights ^O d r', 'command': 'jibo-sdk:distribute-shapes-rights'} + + ]} + ]} + {'label': 'Open as JSON', 'command': 'jibo-sdk:open-as-json'} + ] + } + ] diff --git a/node_modules/jibo-sdk/npm-shrinkwrap.json b/node_modules/jibo-sdk/npm-shrinkwrap.json new file mode 100644 index 0000000..2604ee6 --- /dev/null +++ b/node_modules/jibo-sdk/npm-shrinkwrap.json @@ -0,0 +1,10592 @@ +{ + "name": "jibo-sdk", + "version": "3.9.10", + "dependencies": { + "animation-utilities": { + "version": "2.8.3", + "from": "animation-utilities@beta", + "resolved": "https://registry.npmjs.org/animation-utilities/-/animation-utilities-2.8.3.tgz", + "dependencies": { + "stats-js": { + "version": "1.0.0-alpha1", + "from": "stats-js@1.0.0-alpha1", + "resolved": "https://registry.npmjs.org/stats-js/-/stats-js-1.0.0-alpha1.tgz" + }, + "three": { + "version": "0.70.1", + "from": "three@0.70.1", + "resolved": "https://registry.npmjs.org/three/-/three-0.70.1.tgz" + }, + "urijs": { + "version": "1.17.1", + "from": "urijs@1.17.1", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.17.1.tgz" + } + } + }, + "async": { + "version": "1.5.2", + "from": "async@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" + }, + "atom-space-pen-views": { + "version": "2.2.0", + "from": "atom-space-pen-views@>=2.0.5 <3.0.0", + "resolved": "https://registry.npmjs.org/atom-space-pen-views/-/atom-space-pen-views-2.2.0.tgz", + "dependencies": { + "fuzzaldrin": { + "version": "2.1.0", + "from": "fuzzaldrin@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-2.1.0.tgz" + }, + "space-pen": { + "version": "5.1.2", + "from": "space-pen@>=5.1.2 <6.0.0", + "resolved": "https://registry.npmjs.org/space-pen/-/space-pen-5.1.2.tgz", + "dependencies": { + "grim": { + "version": "1.5.0", + "from": "grim@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/grim/-/grim-1.5.0.tgz", + "dependencies": { + "emissary": { + "version": "1.3.3", + "from": "emissary@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/emissary/-/emissary-1.3.3.tgz", + "dependencies": { + "mixto": { + "version": "1.0.0", + "from": "mixto@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/mixto/-/mixto-1.0.0.tgz" + }, + "property-accessors": { + "version": "1.1.3", + "from": "property-accessors@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/property-accessors/-/property-accessors-1.1.3.tgz" + }, + "es6-weak-map": { + "version": "0.1.4", + "from": "es6-weak-map@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-0.1.4.tgz", + "dependencies": { + "d": { + "version": "0.1.1", + "from": "d@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz" + }, + "es5-ext": { + "version": "0.10.12", + "from": "es5-ext@>=0.10.6 <0.11.0", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.12.tgz", + "dependencies": { + "es6-iterator": { + "version": "2.0.0", + "from": "es6-iterator@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz" + }, + "es6-symbol": { + "version": "3.1.0", + "from": "es6-symbol@>=3.1.0 <3.2.0", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.0.tgz" + } + } + }, + "es6-iterator": { + "version": "0.1.3", + "from": "es6-iterator@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz" + }, + "es6-symbol": { + "version": "2.0.1", + "from": "es6-symbol@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz" + } + } + } + } + } + } + }, + "jquery": { + "version": "2.1.4", + "from": "jquery@2.1.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.1.4.tgz" + } + } + } + } + }, + "behaviorify": { + "version": "1.0.0", + "from": "behaviorify@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/behaviorify/-/behaviorify-1.0.0.tgz", + "dependencies": { + "babel-core": { + "version": "5.8.38", + "from": "babel-core@>=5.4.5 <6.0.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.38.tgz", + "dependencies": { + "babel-plugin-constant-folding": { + "version": "1.0.1", + "from": "babel-plugin-constant-folding@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-constant-folding/-/babel-plugin-constant-folding-1.0.1.tgz" + }, + "babel-plugin-dead-code-elimination": { + "version": "1.0.2", + "from": "babel-plugin-dead-code-elimination@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dead-code-elimination/-/babel-plugin-dead-code-elimination-1.0.2.tgz" + }, + "babel-plugin-eval": { + "version": "1.0.1", + "from": "babel-plugin-eval@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-eval/-/babel-plugin-eval-1.0.1.tgz" + }, + "babel-plugin-inline-environment-variables": { + "version": "1.0.1", + "from": "babel-plugin-inline-environment-variables@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-inline-environment-variables/-/babel-plugin-inline-environment-variables-1.0.1.tgz" + }, + "babel-plugin-jscript": { + "version": "1.0.4", + "from": "babel-plugin-jscript@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jscript/-/babel-plugin-jscript-1.0.4.tgz" + }, + "babel-plugin-member-expression-literals": { + "version": "1.0.1", + "from": "babel-plugin-member-expression-literals@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-member-expression-literals/-/babel-plugin-member-expression-literals-1.0.1.tgz" + }, + "babel-plugin-property-literals": { + "version": "1.0.1", + "from": "babel-plugin-property-literals@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-property-literals/-/babel-plugin-property-literals-1.0.1.tgz" + }, + "babel-plugin-proto-to-assign": { + "version": "1.0.4", + "from": "babel-plugin-proto-to-assign@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-proto-to-assign/-/babel-plugin-proto-to-assign-1.0.4.tgz" + }, + "babel-plugin-react-constant-elements": { + "version": "1.0.3", + "from": "babel-plugin-react-constant-elements@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-react-constant-elements/-/babel-plugin-react-constant-elements-1.0.3.tgz" + }, + "babel-plugin-react-display-name": { + "version": "1.0.3", + "from": "babel-plugin-react-display-name@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-react-display-name/-/babel-plugin-react-display-name-1.0.3.tgz" + }, + "babel-plugin-remove-console": { + "version": "1.0.1", + "from": "babel-plugin-remove-console@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-console/-/babel-plugin-remove-console-1.0.1.tgz" + }, + "babel-plugin-remove-debugger": { + "version": "1.0.1", + "from": "babel-plugin-remove-debugger@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-debugger/-/babel-plugin-remove-debugger-1.0.1.tgz" + }, + "babel-plugin-runtime": { + "version": "1.0.7", + "from": "babel-plugin-runtime@>=1.0.7 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-runtime/-/babel-plugin-runtime-1.0.7.tgz" + }, + "babel-plugin-undeclared-variables-check": { + "version": "1.0.2", + "from": "babel-plugin-undeclared-variables-check@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-undeclared-variables-check/-/babel-plugin-undeclared-variables-check-1.0.2.tgz", + "dependencies": { + "leven": { + "version": "1.0.2", + "from": "leven@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-1.0.2.tgz" + } + } + }, + "babel-plugin-undefined-to-void": { + "version": "1.1.6", + "from": "babel-plugin-undefined-to-void@>=1.1.6 <2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-undefined-to-void/-/babel-plugin-undefined-to-void-1.1.6.tgz" + }, + "babylon": { + "version": "5.8.38", + "from": "babylon@>=5.8.38 <6.0.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.38.tgz" + }, + "bluebird": { + "version": "2.11.0", + "from": "bluebird@>=2.9.33 <3.0.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz" + }, + "chalk": { + "version": "1.1.3", + "from": "chalk@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "convert-source-map": { + "version": "1.3.0", + "from": "convert-source-map@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.3.0.tgz" + }, + "core-js": { + "version": "1.2.7", + "from": "core-js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz" + }, + "debug": { + "version": "2.6.0", + "from": "debug@>=2.1.1 <3.0.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.2", + "from": "ms@0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + } + } + }, + "detect-indent": { + "version": "3.0.1", + "from": "detect-indent@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz", + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "from": "get-stdin@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" + }, + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + } + } + }, + "esutils": { + "version": "2.0.2", + "from": "esutils@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + }, + "fs-readdir-recursive": { + "version": "0.1.2", + "from": "fs-readdir-recursive@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-0.1.2.tgz" + }, + "globals": { + "version": "6.4.1", + "from": "globals@>=6.4.0 <7.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-6.4.1.tgz" + }, + "home-or-tmp": { + "version": "1.0.0", + "from": "home-or-tmp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz", + "dependencies": { + "os-tmpdir": { + "version": "1.0.2", + "from": "os-tmpdir@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "user-home": { + "version": "1.1.1", + "from": "user-home@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" + } + } + }, + "is-integer": { + "version": "1.0.6", + "from": "is-integer@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.6.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.2", + "from": "is-finite@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + } + } + } + }, + "js-tokens": { + "version": "1.0.1", + "from": "js-tokens@1.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz" + }, + "json5": { + "version": "0.4.0", + "from": "json5@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz" + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@>=2.0.3 <3.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "output-file-sync": { + "version": "1.1.2", + "from": "output-file-sync@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.4 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + } + } + }, + "path-exists": { + "version": "1.0.0", + "from": "path-exists@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "private": { + "version": "0.1.6", + "from": "private@>=0.1.6 <0.2.0", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" + }, + "regenerator": { + "version": "0.8.40", + "from": "regenerator@0.8.40", + "resolved": "https://registry.npmjs.org/regenerator/-/regenerator-0.8.40.tgz", + "dependencies": { + "commoner": { + "version": "0.10.8", + "from": "commoner@>=0.10.3 <0.11.0", + "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", + "dependencies": { + "commander": { + "version": "2.9.0", + "from": "commander@>=2.5.0 <3.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + } + } + }, + "detective": { + "version": "4.3.2", + "from": "detective@>=4.3.1 <5.0.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.3.2.tgz", + "dependencies": { + "acorn": { + "version": "3.3.0", + "from": "acorn@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" + }, + "defined": { + "version": "1.0.0", + "from": "defined@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + } + } + }, + "glob": { + "version": "5.0.15", + "from": "glob@>=5.0.15 <6.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "dependencies": { + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "iconv-lite": { + "version": "0.4.15", + "from": "iconv-lite@>=0.4.5 <0.5.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" + }, + "q": { + "version": "1.4.1", + "from": "q@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz" + }, + "recast": { + "version": "0.11.20", + "from": "recast@>=0.11.17 <0.12.0", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.20.tgz", + "dependencies": { + "ast-types": { + "version": "0.9.4", + "from": "ast-types@0.9.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.4.tgz" + }, + "esprima": { + "version": "3.1.3", + "from": "esprima@>=3.1.0 <3.2.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz" + } + } + } + } + }, + "defs": { + "version": "1.1.1", + "from": "defs@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/defs/-/defs-1.1.1.tgz", + "dependencies": { + "alter": { + "version": "0.2.0", + "from": "alter@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/alter/-/alter-0.2.0.tgz", + "dependencies": { + "stable": { + "version": "0.1.5", + "from": "stable@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.5.tgz" + } + } + }, + "ast-traverse": { + "version": "0.1.1", + "from": "ast-traverse@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz" + }, + "breakable": { + "version": "1.0.0", + "from": "breakable@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/breakable/-/breakable-1.0.0.tgz" + }, + "simple-fmt": { + "version": "0.1.0", + "from": "simple-fmt@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/simple-fmt/-/simple-fmt-0.1.0.tgz" + }, + "simple-is": { + "version": "0.2.0", + "from": "simple-is@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/simple-is/-/simple-is-0.2.0.tgz" + }, + "stringmap": { + "version": "0.2.2", + "from": "stringmap@>=0.2.2 <0.3.0", + "resolved": "https://registry.npmjs.org/stringmap/-/stringmap-0.2.2.tgz" + }, + "stringset": { + "version": "0.2.1", + "from": "stringset@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/stringset/-/stringset-0.2.1.tgz" + }, + "tryor": { + "version": "0.1.2", + "from": "tryor@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz" + }, + "yargs": { + "version": "3.27.0", + "from": "yargs@>=3.27.0 <3.28.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.27.0.tgz", + "dependencies": { + "camelcase": { + "version": "1.2.1", + "from": "camelcase@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" + }, + "cliui": { + "version": "2.1.0", + "from": "cliui@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "dependencies": { + "center-align": { + "version": "0.1.3", + "from": "center-align@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "dependencies": { + "align-text": { + "version": "0.1.4", + "from": "align-text@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "dependencies": { + "kind-of": { + "version": "3.1.0", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "longest": { + "version": "1.0.1", + "from": "longest@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + }, + "repeat-string": { + "version": "1.6.1", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + } + } + }, + "lazy-cache": { + "version": "1.0.4", + "from": "lazy-cache@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" + } + } + }, + "right-align": { + "version": "0.1.3", + "from": "right-align@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "dependencies": { + "align-text": { + "version": "0.1.4", + "from": "align-text@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "dependencies": { + "kind-of": { + "version": "3.1.0", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "longest": { + "version": "1.0.1", + "from": "longest@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + }, + "repeat-string": { + "version": "1.6.1", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + } + } + } + } + }, + "wordwrap": { + "version": "0.0.2", + "from": "wordwrap@0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" + } + } + }, + "decamelize": { + "version": "1.2.0", + "from": "decamelize@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + }, + "os-locale": { + "version": "1.4.0", + "from": "os-locale@>=1.4.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "dependencies": { + "lcid": { + "version": "1.0.0", + "from": "lcid@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "dependencies": { + "invert-kv": { + "version": "1.0.0", + "from": "invert-kv@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" + } + } + } + } + }, + "window-size": { + "version": "0.1.4", + "from": "window-size@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz" + }, + "y18n": { + "version": "3.2.1", + "from": "y18n@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz" + } + } + } + } + }, + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "from": "esprima-fb@>=15001.1001.0-dev-harmony-fb <15001.1002.0", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz" + }, + "recast": { + "version": "0.10.33", + "from": "recast@0.10.33", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.33.tgz", + "dependencies": { + "ast-types": { + "version": "0.8.12", + "from": "ast-types@0.8.12", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.12.tgz" + } + } + }, + "through": { + "version": "2.3.8", + "from": "through@>=2.3.8 <2.4.0", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "regexpu": { + "version": "1.3.0", + "from": "regexpu@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/regexpu/-/regexpu-1.3.0.tgz", + "dependencies": { + "recast": { + "version": "0.10.43", + "from": "recast@>=0.10.10 <0.11.0", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "from": "esprima-fb@>=15001.1001.0-dev-harmony-fb <15001.1002.0", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz" + }, + "ast-types": { + "version": "0.8.15", + "from": "ast-types@0.8.15", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz" + } + } + }, + "regenerate": { + "version": "1.3.2", + "from": "regenerate@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz" + }, + "regjsgen": { + "version": "0.2.0", + "from": "regjsgen@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz" + }, + "regjsparser": { + "version": "0.1.5", + "from": "regjsparser@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "dependencies": { + "jsesc": { + "version": "0.5.0", + "from": "jsesc@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" + } + } + } + } + }, + "repeating": { + "version": "1.1.3", + "from": "repeating@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.2", + "from": "is-finite@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + } + } + } + }, + "resolve": { + "version": "1.2.0", + "from": "resolve@>=1.1.6 <2.0.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" + }, + "shebang-regex": { + "version": "1.0.0", + "from": "shebang-regex@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.1 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + }, + "source-map-support": { + "version": "0.2.10", + "from": "source-map-support@>=0.2.10 <0.3.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz", + "dependencies": { + "source-map": { + "version": "0.1.32", + "from": "source-map@0.1.32", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + }, + "to-fast-properties": { + "version": "1.0.2", + "from": "to-fast-properties@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz" + }, + "trim-right": { + "version": "1.0.1", + "from": "trim-right@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz" + }, + "try-resolve": { + "version": "1.0.1", + "from": "try-resolve@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/try-resolve/-/try-resolve-1.0.1.tgz" + } + } + }, + "escodegen": { + "version": "1.8.1", + "from": "escodegen@>=1.6.1 <2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "dependencies": { + "estraverse": { + "version": "1.9.3", + "from": "estraverse@>=1.9.1 <2.0.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz" + }, + "esutils": { + "version": "2.0.2", + "from": "esutils@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + }, + "optionator": { + "version": "0.8.2", + "from": "optionator@>=0.8.1 <0.9.0", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "dependencies": { + "prelude-ls": { + "version": "1.1.2", + "from": "prelude-ls@>=1.1.2 <1.2.0", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" + }, + "deep-is": { + "version": "0.1.3", + "from": "deep-is@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" + }, + "wordwrap": { + "version": "1.0.0", + "from": "wordwrap@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + }, + "type-check": { + "version": "0.3.2", + "from": "type-check@>=0.3.2 <0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" + }, + "levn": { + "version": "0.3.0", + "from": "levn@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" + }, + "fast-levenshtein": { + "version": "2.0.6", + "from": "fast-levenshtein@>=2.0.4 <2.1.0", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + } + } + }, + "source-map": { + "version": "0.2.0", + "from": "source-map@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + }, + "esprima": { + "version": "2.7.3", + "from": "esprima@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + } + } + }, + "clamp": { + "version": "1.0.1", + "from": "clamp@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz" + }, + "color-space": { + "version": "1.14.7", + "from": "color-space@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/color-space/-/color-space-1.14.7.tgz", + "dependencies": { + "husl": { + "version": "5.0.3", + "from": "husl@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/husl/-/husl-5.0.3.tgz" + }, + "mumath": { + "version": "3.3.3", + "from": "mumath@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/mumath/-/mumath-3.3.3.tgz", + "dependencies": { + "almost-equal": { + "version": "1.1.0", + "from": "almost-equal@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/almost-equal/-/almost-equal-1.1.0.tgz" + } + } + } + } + }, + "color-string": { + "version": "0.3.0", + "from": "color-string@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "dependencies": { + "color-name": { + "version": "1.1.1", + "from": "color-name@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz" + } + } + }, + "deep-diff": { + "version": "0.3.4", + "from": "deep-diff@>=0.3.3 <0.4.0", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.4.tgz" + }, + "drag-helper": { + "version": "1.3.6", + "from": "drag-helper@>=1.2.3 <2.0.0", + "resolved": "https://registry.npmjs.org/drag-helper/-/drag-helper-1.3.6.tgz", + "dependencies": { + "has-touch": { + "version": "1.0.1", + "from": "has-touch@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/has-touch/-/has-touch-1.0.1.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "region-align": { + "version": "2.1.3", + "from": "region-align@>=2.1.3 <3.0.0", + "resolved": "https://registry.npmjs.org/region-align/-/region-align-2.1.3.tgz" + } + } + }, + "find-root": { + "version": "1.0.0", + "from": "find-root@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.0.0.tgz" + }, + "glob": { + "version": "7.1.1", + "from": "glob@>=7.1.1 <8.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "from": "fs.realpath@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + } + }, + "isbinaryfile": { + "version": "3.0.2", + "from": "isbinaryfile@3.0.2", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz" + }, + "jibo": { + "version": "6.0.8", + "from": "jibo@beta", + "resolved": "https://registry.npmjs.org/jibo/-/jibo-6.0.8.tgz", + "dependencies": { + "callsite": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz" + }, + "eases": { + "version": "1.0.8", + "from": "https://registry.npmjs.org/eases/-/eases-1.0.8.tgz", + "resolved": "https://registry.npmjs.org/eases/-/eases-1.0.8.tgz" + }, + "hammerjs": { + "version": "2.0.8", + "from": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz" + }, + "jibo-client-framework": { + "version": "1.4.7", + "from": "https://registry.npmjs.org/jibo-client-framework/-/jibo-client-framework-1.4.7.tgz", + "resolved": "https://registry.npmjs.org/jibo-client-framework/-/jibo-client-framework-1.4.7.tgz", + "dependencies": { + "ws-without-native": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/ws-without-native/-/ws-without-native-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/ws-without-native/-/ws-without-native-1.0.2.tgz", + "dependencies": { + "options": { + "version": "0.0.6", + "from": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz" + }, + "ultron": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz" + } + } + } + } + }, + "jibo-common-types": { + "version": "1.1.4", + "from": "https://registry.npmjs.org/jibo-common-types/-/jibo-common-types-1.1.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-common-types/-/jibo-common-types-1.1.4.tgz", + "dependencies": { + "async": { + "version": "2.1.4", + "from": "https://registry.npmjs.org/async/-/async-2.1.4.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-2.1.4.tgz", + "dependencies": { + "lodash": { + "version": "4.17.4", + "from": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + } + } + }, + "uuid": { + "version": "3.0.1", + "from": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" + } + } + }, + "jibo-dof-arbiter": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/jibo-dof-arbiter/-/jibo-dof-arbiter-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-dof-arbiter/-/jibo-dof-arbiter-1.0.4.tgz" + }, + "jibo-eventemitter3": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/jibo-eventemitter3/-/jibo-eventemitter3-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/jibo-eventemitter3/-/jibo-eventemitter3-1.3.1.tgz" + }, + "jibo-flow-core": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/jibo-flow-core/-/jibo-flow-core-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-flow-core/-/jibo-flow-core-1.0.4.tgz" + }, + "jibo-kb": { + "version": "4.3.4", + "from": "https://registry.npmjs.org/jibo-kb/-/jibo-kb-4.3.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-kb/-/jibo-kb-4.3.4.tgz", + "dependencies": { + "blob-to-buffer": { + "version": "1.2.6", + "from": "https://registry.npmjs.org/blob-to-buffer/-/blob-to-buffer-1.2.6.tgz", + "resolved": "https://registry.npmjs.org/blob-to-buffer/-/blob-to-buffer-1.2.6.tgz" + }, + "fs-extra": { + "version": "0.30.0", + "from": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "nedb": { + "version": "1.8.0", + "from": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", + "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "binary-search-tree": { + "version": "0.2.5", + "from": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz", + "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz" + }, + "localforage": { + "version": "1.4.3", + "from": "https://registry.npmjs.org/localforage/-/localforage-1.4.3.tgz", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.4.3.tgz", + "dependencies": { + "lie": { + "version": "3.0.2", + "from": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", + "dependencies": { + "es3ify": { + "version": "0.1.4", + "from": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", + "dependencies": { + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "from": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz" + }, + "jstransform": { + "version": "3.0.0", + "from": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", + "dependencies": { + "base62": { + "version": "0.1.1", + "from": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz" + }, + "source-map": { + "version": "0.1.31", + "from": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + }, + "through": { + "version": "2.3.8", + "from": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "immediate": { + "version": "3.0.6", + "from": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" + }, + "inline-process-browser": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", + "dependencies": { + "falafel": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "dependencies": { + "acorn": { + "version": "1.2.2", + "from": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + }, + "foreach": { + "version": "2.0.5", + "from": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "object-keys": { + "version": "1.0.11", + "from": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" + } + } + }, + "through2": { + "version": "0.6.5", + "from": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + }, + "unreachable-branch-transform": { + "version": "0.3.0", + "from": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", + "dependencies": { + "esmangle-evaluator": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz" + }, + "recast": { + "version": "0.10.43", + "from": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "from": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + }, + "private": { + "version": "0.1.6", + "from": "https://registry.npmjs.org/private/-/private-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" + }, + "ast-types": { + "version": "0.8.15", + "from": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz" + } + } + }, + "through2": { + "version": "0.6.5", + "from": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + } + } + } + } + }, + "underscore": { + "version": "1.4.4", + "from": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz" + } + } + } + } + }, + "jibo-log": { + "version": "2.0.6", + "from": "https://registry.npmjs.org/jibo-log/-/jibo-log-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/jibo-log/-/jibo-log-2.0.6.tgz", + "dependencies": { + "format-error": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/format-error/-/format-error-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/format-error/-/format-error-1.0.0.tgz", + "dependencies": { + "prettyjson": { + "version": "0.13.0", + "from": "https://registry.npmjs.org/prettyjson/-/prettyjson-0.13.0.tgz", + "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-0.13.0.tgz", + "dependencies": { + "colors": { + "version": "0.6.2", + "from": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + }, + "minimist": { + "version": "0.0.8", + "from": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + } + } + }, + "fs-extra": { + "version": "0.26.7", + "from": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "minilog": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/minilog/-/minilog-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/minilog/-/minilog-2.1.0.tgz", + "dependencies": { + "microee": { + "version": "0.0.2", + "from": "https://registry.npmjs.org/microee/-/microee-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/microee/-/microee-0.0.2.tgz" + } + } + }, + "syslog-client": { + "version": "1.0.11", + "from": "https://registry.npmjs.org/syslog-client/-/syslog-client-1.0.11.tgz", + "resolved": "https://registry.npmjs.org/syslog-client/-/syslog-client-1.0.11.tgz" + } + } + }, + "jibo-state-machine": { + "version": "3.4.4", + "from": "https://registry.npmjs.org/jibo-state-machine/-/jibo-state-machine-3.4.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-state-machine/-/jibo-state-machine-3.4.4.tgz" + }, + "jibo-typed-events": { + "version": "3.3.4", + "from": "https://registry.npmjs.org/jibo-typed-events/-/jibo-typed-events-3.3.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-typed-events/-/jibo-typed-events-3.3.4.tgz" + }, + "jibo-cai-utils": { + "version": "2.3.9", + "from": "https://registry.npmjs.org/jibo-cai-utils/-/jibo-cai-utils-2.3.9.tgz", + "resolved": "https://registry.npmjs.org/jibo-cai-utils/-/jibo-cai-utils-2.3.9.tgz" + }, + "orchestrator": { + "version": "0.3.8", + "from": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "dependencies": { + "end-of-stream": { + "version": "0.1.5", + "from": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "sequencify": { + "version": "0.0.7", + "from": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" + }, + "stream-consume": { + "version": "0.1.0", + "from": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" + } + } + }, + "pixi.js": { + "version": "4.3.4", + "from": "https://registry.npmjs.org/pixi.js/-/pixi.js-4.3.4.tgz", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-4.3.4.tgz", + "dependencies": { + "bit-twiddle": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz" + }, + "earcut": { + "version": "2.1.1", + "from": "https://registry.npmjs.org/earcut/-/earcut-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.1.1.tgz" + }, + "eventemitter3": { + "version": "2.0.2", + "from": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.2.tgz" + }, + "ismobilejs": { + "version": "0.4.0", + "from": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-0.4.0.tgz", + "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-0.4.0.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "pixi-gl-core": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/pixi-gl-core/-/pixi-gl-core-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/pixi-gl-core/-/pixi-gl-core-1.1.0.tgz" + }, + "resource-loader": { + "version": "2.0.4", + "from": "https://registry.npmjs.org/resource-loader/-/resource-loader-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/resource-loader/-/resource-loader-2.0.4.tgz", + "dependencies": { + "mini-signals": { + "version": "1.1.1", + "from": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.1.1.tgz" + }, + "parse-uri": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.0.tgz" + } + } + } + } + }, + "semver": { + "version": "5.3.0", + "from": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "uuid": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz" + } + } + }, + "jibo-analytics": { + "version": "0.1.8", + "from": "jibo-analytics@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/jibo-analytics/-/jibo-analytics-0.1.8.tgz" + }, + "jibo-anim-db": { + "version": "3.1.4", + "from": "jibo-anim-db@beta", + "resolved": "https://registry.npmjs.org/jibo-anim-db/-/jibo-anim-db-3.1.4.tgz", + "dependencies": { + "jibo-cai-utils": { + "version": "2.3.9", + "from": "jibo-cai-utils@beta", + "resolved": "https://registry.npmjs.org/jibo-cai-utils/-/jibo-cai-utils-2.3.9.tgz" + }, + "semver-utils": { + "version": "1.1.1", + "from": "semver-utils@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/semver-utils/-/semver-utils-1.1.1.tgz" + }, + "lodash": { + "version": "4.17.4", + "from": "lodash@>=4.11.1 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + }, + "json-stable-stringify": { + "version": "1.0.1", + "from": "json-stable-stringify@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + } + } + } + } + }, + "jibo-cli": { + "version": "3.0.7", + "from": "jibo-cli@beta", + "resolved": "https://registry.npmjs.org/jibo-cli/-/jibo-cli-3.0.7.tgz", + "dependencies": { + "colors": { + "version": "1.1.2", + "from": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz" + }, + "commander": { + "version": "2.8.1", + "from": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + } + } + }, + "compute-hamming": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/compute-hamming/-/compute-hamming-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/compute-hamming/-/compute-hamming-1.1.0.tgz", + "dependencies": { + "validate.io-array": { + "version": "1.0.6", + "from": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz" + }, + "validate.io-function": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz" + }, + "validate.io-string": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/validate.io-string/-/validate.io-string-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/validate.io-string/-/validate.io-string-1.0.2.tgz" + } + } + }, + "prompt": { + "version": "0.2.14", + "from": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", + "dependencies": { + "pkginfo": { + "version": "0.4.0", + "from": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.0.tgz", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.0.tgz" + }, + "read": { + "version": "1.0.7", + "from": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "dependencies": { + "mute-stream": { + "version": "0.0.7", + "from": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz" + } + } + }, + "revalidator": { + "version": "0.1.8", + "from": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz" + }, + "utile": { + "version": "0.2.1", + "from": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "deep-equal": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz" + }, + "i": { + "version": "0.3.5", + "from": "https://registry.npmjs.org/i/-/i-0.3.5.tgz", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.5.tgz" + }, + "ncp": { + "version": "0.4.2", + "from": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "winston": { + "version": "0.8.3", + "from": "https://registry.npmjs.org/winston/-/winston-0.8.3.tgz", + "resolved": "https://registry.npmjs.org/winston/-/winston-0.8.3.tgz", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "colors": { + "version": "0.6.2", + "from": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + }, + "cycle": { + "version": "1.0.3", + "from": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz" + }, + "eyes": { + "version": "0.1.8", + "from": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" + }, + "isstream": { + "version": "0.1.2", + "from": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, + "pkginfo": { + "version": "0.3.1", + "from": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz" + }, + "stack-trace": { + "version": "0.0.9", + "from": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz" + } + } + } + } + }, + "async": { + "version": "0.9.0", + "from": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz" + }, + "electron-prebuilt": { + "version": "1.4.3", + "from": "https://registry.npmjs.org/electron-prebuilt/-/electron-prebuilt-1.4.3.tgz", + "resolved": "https://registry.npmjs.org/electron-prebuilt/-/electron-prebuilt-1.4.3.tgz", + "dependencies": { + "electron-download": { + "version": "3.3.0", + "from": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", + "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", + "dependencies": { + "debug": { + "version": "2.6.0", + "from": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.2", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + } + } + }, + "fs-extra": { + "version": "0.30.0", + "from": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "home-path": { + "version": "1.0.3", + "from": "https://registry.npmjs.org/home-path/-/home-path-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.3.tgz" + }, + "minimist": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + }, + "path-exists": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "dependencies": { + "pinkie-promise": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + } + } + }, + "rc": { + "version": "1.1.6", + "from": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "dependencies": { + "deep-extend": { + "version": "0.4.1", + "from": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz" + }, + "ini": { + "version": "1.3.4", + "from": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "strip-json-comments": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" + } + } + }, + "semver": { + "version": "5.3.0", + "from": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "sumchecker": { + "version": "1.3.0", + "from": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.0.tgz", + "dependencies": { + "es6-promise": { + "version": "4.0.5", + "from": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.0.5.tgz", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.0.5.tgz" + } + } + } + } + } + } + }, + "cli-spinner": { + "version": "0.2.5", + "from": "https://registry.npmjs.org/cli-spinner/-/cli-spinner-0.2.5.tgz", + "resolved": "https://registry.npmjs.org/cli-spinner/-/cli-spinner-0.2.5.tgz" + }, + "ensureDir": { + "version": "1.0.6", + "from": "https://registry.npmjs.org/ensureDir/-/ensureDir-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/ensureDir/-/ensureDir-1.0.6.tgz" + }, + "extract-zip": { + "version": "1.6.0", + "from": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.0.tgz", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.0.tgz", + "dependencies": { + "concat-stream": { + "version": "1.5.0", + "from": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz", + "dependencies": { + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "typedarray": { + "version": "0.0.6", + "from": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + }, + "readable-stream": { + "version": "2.0.6", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + } + }, + "debug": { + "version": "0.7.4", + "from": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz" + }, + "mkdirp": { + "version": "0.5.0", + "from": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "dependencies": { + "minimist": { + "version": "0.0.8", + "from": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + }, + "yauzl": { + "version": "2.4.1", + "from": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "dependencies": { + "fd-slicer": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "dependencies": { + "pend": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz" + } + } + } + } + } + } + }, + "font-awesome": { + "version": "4.7.0", + "from": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz" + }, + "fs-extra": { + "version": "0.26.7", + "from": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "fs-plus": { + "version": "2.9.3", + "from": "https://registry.npmjs.org/fs-plus/-/fs-plus-2.9.3.tgz", + "resolved": "https://registry.npmjs.org/fs-plus/-/fs-plus-2.9.3.tgz", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "mkdirp": { + "version": "0.3.5", + "from": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" + }, + "rimraf": { + "version": "2.2.8", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz" + } + } + }, + "jibo-kb": { + "version": "4.3.4", + "from": "https://registry.npmjs.org/jibo-kb/-/jibo-kb-4.3.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-kb/-/jibo-kb-4.3.4.tgz", + "dependencies": { + "async": { + "version": "1.5.2", + "from": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" + }, + "blob-to-buffer": { + "version": "1.2.6", + "from": "https://registry.npmjs.org/blob-to-buffer/-/blob-to-buffer-1.2.6.tgz", + "resolved": "https://registry.npmjs.org/blob-to-buffer/-/blob-to-buffer-1.2.6.tgz" + }, + "fs-extra": { + "version": "0.30.0", + "from": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "jibo-log": { + "version": "2.0.6", + "from": "https://registry.npmjs.org/jibo-log/-/jibo-log-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/jibo-log/-/jibo-log-2.0.6.tgz", + "dependencies": { + "format-error": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/format-error/-/format-error-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/format-error/-/format-error-1.0.0.tgz", + "dependencies": { + "prettyjson": { + "version": "0.13.0", + "from": "https://registry.npmjs.org/prettyjson/-/prettyjson-0.13.0.tgz", + "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-0.13.0.tgz", + "dependencies": { + "colors": { + "version": "0.6.2", + "from": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + }, + "minimist": { + "version": "0.0.8", + "from": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + } + } + }, + "fs-extra": { + "version": "0.26.7", + "from": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "minilog": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/minilog/-/minilog-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/minilog/-/minilog-2.1.0.tgz", + "dependencies": { + "microee": { + "version": "0.0.2", + "from": "https://registry.npmjs.org/microee/-/microee-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/microee/-/microee-0.0.2.tgz" + } + } + }, + "syslog-client": { + "version": "1.0.11", + "from": "https://registry.npmjs.org/syslog-client/-/syslog-client-1.0.11.tgz", + "resolved": "https://registry.npmjs.org/syslog-client/-/syslog-client-1.0.11.tgz" + } + } + }, + "nedb": { + "version": "1.8.0", + "from": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", + "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "binary-search-tree": { + "version": "0.2.5", + "from": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz", + "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz" + }, + "localforage": { + "version": "1.4.3", + "from": "https://registry.npmjs.org/localforage/-/localforage-1.4.3.tgz", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.4.3.tgz", + "dependencies": { + "lie": { + "version": "3.0.2", + "from": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.0.2.tgz", + "dependencies": { + "es3ify": { + "version": "0.1.4", + "from": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", + "dependencies": { + "esprima-fb": { + "version": "3001.1.0-dev-harmony-fb", + "from": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz" + }, + "jstransform": { + "version": "3.0.0", + "from": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-3.0.0.tgz", + "dependencies": { + "base62": { + "version": "0.1.1", + "from": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/base62/-/base62-0.1.1.tgz" + }, + "source-map": { + "version": "0.1.31", + "from": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.31.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + }, + "through": { + "version": "2.3.8", + "from": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "immediate": { + "version": "3.0.6", + "from": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" + }, + "inline-process-browser": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", + "dependencies": { + "falafel": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", + "dependencies": { + "acorn": { + "version": "1.2.2", + "from": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + }, + "foreach": { + "version": "2.0.5", + "from": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "object-keys": { + "version": "1.0.11", + "from": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz" + } + } + }, + "through2": { + "version": "0.6.5", + "from": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + }, + "unreachable-branch-transform": { + "version": "0.3.0", + "from": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", + "dependencies": { + "esmangle-evaluator": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz" + }, + "recast": { + "version": "0.10.43", + "from": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", + "dependencies": { + "esprima-fb": { + "version": "15001.1001.0-dev-harmony-fb", + "from": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + }, + "private": { + "version": "0.1.6", + "from": "https://registry.npmjs.org/private/-/private-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" + }, + "ast-types": { + "version": "0.8.15", + "from": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz" + } + } + }, + "through2": { + "version": "0.6.5", + "from": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + } + } + } + } + }, + "underscore": { + "version": "1.4.4", + "from": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz" + } + } + } + } + }, + "jibo-sync": { + "version": "0.2.8", + "from": "https://registry.npmjs.org/jibo-sync/-/jibo-sync-0.2.8.tgz", + "resolved": "https://registry.npmjs.org/jibo-sync/-/jibo-sync-0.2.8.tgz", + "dependencies": { + "async": { + "version": "1.5.2", + "from": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" + }, + "crypto": { + "version": "0.0.3", + "from": "https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-0.0.3.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "parse-gitignore": { + "version": "0.2.0", + "from": "https://registry.npmjs.org/parse-gitignore/-/parse-gitignore-0.2.0.tgz", + "resolved": "https://registry.npmjs.org/parse-gitignore/-/parse-gitignore-0.2.0.tgz", + "dependencies": { + "ends-with": { + "version": "0.2.0", + "from": "https://registry.npmjs.org/ends-with/-/ends-with-0.2.0.tgz", + "resolved": "https://registry.npmjs.org/ends-with/-/ends-with-0.2.0.tgz" + }, + "is-glob": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + } + } + }, + "starts-with": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/starts-with/-/starts-with-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/starts-with/-/starts-with-1.0.2.tgz" + } + } + }, + "stream-meter": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", + "dependencies": { + "readable-stream": { + "version": "2.2.2", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + } + }, + "tar-fs": { + "version": "1.15.0", + "from": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.0.tgz", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.0.tgz", + "dependencies": { + "pump": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", + "dependencies": { + "end-of-stream": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.1.0.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "once": { + "version": "1.4.0", + "from": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "tar-stream": { + "version": "1.5.2", + "from": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.2.tgz", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.2.tgz", + "dependencies": { + "bl": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/bl/-/bl-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.0.tgz" + }, + "end-of-stream": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.1.0.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "readable-stream": { + "version": "2.2.2", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + } + } + }, + "lifesized": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/lifesized/-/lifesized-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/lifesized/-/lifesized-1.0.0.tgz" + }, + "nugget": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", + "dependencies": { + "debug": { + "version": "2.6.0", + "from": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.2", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + } + } + }, + "minimist": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + }, + "pretty-bytes": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "dependencies": { + "get-stdin": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" + }, + "meow": { + "version": "3.7.0", + "from": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "dependencies": { + "camelcase-keys": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "dependencies": { + "camelcase": { + "version": "2.1.1", + "from": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" + } + } + }, + "decamelize": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + }, + "loud-rejection": { + "version": "1.6.0", + "from": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "dependencies": { + "currently-unhandled": { + "version": "0.4.1", + "from": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "dependencies": { + "array-find-index": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz" + } + } + }, + "signal-exit": { + "version": "3.0.2", + "from": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" + } + } + }, + "map-obj": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" + }, + "normalize-package-data": { + "version": "2.3.5", + "from": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz", + "dependencies": { + "hosted-git-info": { + "version": "2.1.5", + "from": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz" + }, + "is-builtin-module": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "dependencies": { + "builtin-modules": { + "version": "1.1.1", + "from": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" + } + } + }, + "semver": { + "version": "5.3.0", + "from": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "validate-npm-package-license": { + "version": "3.0.1", + "from": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "dependencies": { + "spdx-correct": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "dependencies": { + "spdx-license-ids": { + "version": "1.2.2", + "from": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz" + } + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz" + } + } + } + } + }, + "object-assign": { + "version": "4.1.1", + "from": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "read-pkg-up": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "dependencies": { + "find-up": { + "version": "1.1.2", + "from": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "dependencies": { + "path-exists": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz" + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "dependencies": { + "load-json-file": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "parse-json": { + "version": "2.2.0", + "from": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "dependencies": { + "error-ex": { + "version": "1.3.0", + "from": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz", + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "from": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + } + } + } + } + }, + "pify": { + "version": "2.3.0", + "from": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + }, + "strip-bom": { + "version": "2.0.0", + "from": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "dependencies": { + "is-utf8": { + "version": "0.2.1", + "from": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" + } + } + } + } + }, + "path-type": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "pify": { + "version": "2.3.0", + "from": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + } + } + } + } + } + } + }, + "redent": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "dependencies": { + "indent-string": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "dependencies": { + "repeating": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + } + } + } + } + } + }, + "strip-indent": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz" + } + } + }, + "trim-newlines": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" + } + } + } + } + }, + "progress-stream": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", + "dependencies": { + "through2": { + "version": "0.2.3", + "from": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "from": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "2.1.2", + "from": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "dependencies": { + "object-keys": { + "version": "0.4.0", + "from": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" + } + } + } + } + }, + "speedometer": { + "version": "0.1.4", + "from": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz" + } + } + }, + "single-line-log": { + "version": "1.1.2", + "from": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", + "dependencies": { + "string-width": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "from": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + } + } + } + } + }, + "throttleit": { + "version": "0.0.2", + "from": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz" + } + } + }, + "osenv": { + "version": "0.1.4", + "from": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + }, + "os-tmpdir": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + } + } + }, + "react": { + "version": "0.13.2", + "from": "https://registry.npmjs.org/react/-/react-0.13.2.tgz", + "resolved": "https://registry.npmjs.org/react/-/react-0.13.2.tgz", + "dependencies": { + "envify": { + "version": "3.4.1", + "from": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", + "resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", + "dependencies": { + "through": { + "version": "2.3.8", + "from": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + }, + "jstransform": { + "version": "11.0.3", + "from": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", + "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", + "dependencies": { + "base62": { + "version": "1.1.2", + "from": "https://registry.npmjs.org/base62/-/base62-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/base62/-/base62-1.1.2.tgz" + }, + "commoner": { + "version": "0.10.8", + "from": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", + "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", + "dependencies": { + "detective": { + "version": "4.3.2", + "from": "https://registry.npmjs.org/detective/-/detective-4.3.2.tgz", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.3.2.tgz", + "dependencies": { + "acorn": { + "version": "3.3.0", + "from": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" + }, + "defined": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + } + } + }, + "glob": { + "version": "5.0.15", + "from": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "dependencies": { + "inflight": { + "version": "1.0.6", + "from": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.4.0", + "from": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "from": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "iconv-lite": { + "version": "0.4.15", + "from": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" + }, + "private": { + "version": "0.1.6", + "from": "https://registry.npmjs.org/private/-/private-0.1.6.tgz", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" + }, + "q": { + "version": "1.4.1", + "from": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz" + }, + "recast": { + "version": "0.11.20", + "from": "https://registry.npmjs.org/recast/-/recast-0.11.20.tgz", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.20.tgz", + "dependencies": { + "ast-types": { + "version": "0.9.4", + "from": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.4.tgz", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.4.tgz" + }, + "esprima": { + "version": "3.1.3", + "from": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + } + } + }, + "esprima-fb": { + "version": "15001.1.0-dev-harmony-fb", + "from": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz" + }, + "object-assign": { + "version": "2.1.1", + "from": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz" + }, + "source-map": { + "version": "0.4.4", + "from": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + } + } + } + } + }, + "resolve": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" + }, + "skills-service-manager": { + "version": "4.0.6", + "from": "https://registry.npmjs.org/skills-service-manager/-/skills-service-manager-4.0.6.tgz", + "resolved": "https://registry.npmjs.org/skills-service-manager/-/skills-service-manager-4.0.6.tgz", + "dependencies": { + "async": { + "version": "1.5.2", + "from": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" + }, + "body-parser": { + "version": "1.16.0", + "from": "https://registry.npmjs.org/body-parser/-/body-parser-1.16.0.tgz", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.16.0.tgz", + "dependencies": { + "bytes": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz" + }, + "content-type": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz" + }, + "debug": { + "version": "2.6.0", + "from": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.2", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + } + } + }, + "depd": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz" + }, + "http-errors": { + "version": "1.5.1", + "from": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz", + "dependencies": { + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "setprototypeof": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz" + }, + "statuses": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" + } + } + }, + "iconv-lite": { + "version": "0.4.15", + "from": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" + }, + "on-finished": { + "version": "2.3.0", + "from": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "dependencies": { + "ee-first": { + "version": "1.1.1", + "from": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + } + } + }, + "qs": { + "version": "6.2.1", + "from": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz" + }, + "raw-body": { + "version": "2.2.0", + "from": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", + "dependencies": { + "unpipe": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + } + } + }, + "type-is": { + "version": "1.6.14", + "from": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz", + "dependencies": { + "media-typer": { + "version": "0.3.0", + "from": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" + }, + "mime-types": { + "version": "2.1.14", + "from": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", + "dependencies": { + "mime-db": { + "version": "1.26.0", + "from": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz" + } + } + } + } + } + } + }, + "connect": { + "version": "3.5.0", + "from": "https://registry.npmjs.org/connect/-/connect-3.5.0.tgz", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.5.0.tgz", + "dependencies": { + "debug": { + "version": "2.2.0", + "from": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.1", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + } + } + }, + "finalhandler": { + "version": "0.5.0", + "from": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.0.tgz", + "dependencies": { + "escape-html": { + "version": "1.0.3", + "from": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" + }, + "on-finished": { + "version": "2.3.0", + "from": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "dependencies": { + "ee-first": { + "version": "1.1.1", + "from": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + } + } + }, + "statuses": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" + }, + "unpipe": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + } + } + }, + "parseurl": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" + }, + "utils-merge": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" + } + } + }, + "jibo-common-types": { + "version": "1.1.4", + "from": "https://registry.npmjs.org/jibo-common-types/-/jibo-common-types-1.1.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-common-types/-/jibo-common-types-1.1.4.tgz", + "dependencies": { + "async": { + "version": "2.1.4", + "from": "https://registry.npmjs.org/async/-/async-2.1.4.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-2.1.4.tgz", + "dependencies": { + "lodash": { + "version": "4.17.4", + "from": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + } + } + }, + "uuid": { + "version": "3.0.1", + "from": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" + } + } + }, + "jibo-log": { + "version": "2.0.6", + "from": "https://registry.npmjs.org/jibo-log/-/jibo-log-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/jibo-log/-/jibo-log-2.0.6.tgz", + "dependencies": { + "format-error": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/format-error/-/format-error-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/format-error/-/format-error-1.0.0.tgz", + "dependencies": { + "prettyjson": { + "version": "0.13.0", + "from": "https://registry.npmjs.org/prettyjson/-/prettyjson-0.13.0.tgz", + "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-0.13.0.tgz", + "dependencies": { + "colors": { + "version": "0.6.2", + "from": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + }, + "minimist": { + "version": "0.0.8", + "from": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + } + } + }, + "minilog": { + "version": "2.1.0", + "from": "https://registry.npmjs.org/minilog/-/minilog-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/minilog/-/minilog-2.1.0.tgz", + "dependencies": { + "microee": { + "version": "0.0.2", + "from": "https://registry.npmjs.org/microee/-/microee-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/microee/-/microee-0.0.2.tgz" + } + } + }, + "syslog-client": { + "version": "1.0.11", + "from": "https://registry.npmjs.org/syslog-client/-/syslog-client-1.0.11.tgz", + "resolved": "https://registry.npmjs.org/syslog-client/-/syslog-client-1.0.11.tgz" + } + } + }, + "jibo-node-xml": { + "version": "4.3.7", + "from": "https://registry.npmjs.org/jibo-node-xml/-/jibo-node-xml-4.3.7.tgz", + "resolved": "https://registry.npmjs.org/jibo-node-xml/-/jibo-node-xml-4.3.7.tgz" + }, + "jibo-service-framework": { + "version": "1.4.4", + "from": "https://registry.npmjs.org/jibo-service-framework/-/jibo-service-framework-1.4.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-service-framework/-/jibo-service-framework-1.4.4.tgz", + "dependencies": { + "jibo-client-framework": { + "version": "1.4.7", + "from": "https://registry.npmjs.org/jibo-client-framework/-/jibo-client-framework-1.4.7.tgz", + "resolved": "https://registry.npmjs.org/jibo-client-framework/-/jibo-client-framework-1.4.7.tgz" + } + } + }, + "jibo-state-machine": { + "version": "3.4.4", + "from": "https://registry.npmjs.org/jibo-state-machine/-/jibo-state-machine-3.4.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-state-machine/-/jibo-state-machine-3.4.4.tgz" + }, + "jibo-typed-events": { + "version": "3.3.4", + "from": "https://registry.npmjs.org/jibo-typed-events/-/jibo-typed-events-3.3.4.tgz", + "resolved": "https://registry.npmjs.org/jibo-typed-events/-/jibo-typed-events-3.3.4.tgz" + }, + "jimp": { + "version": "0.2.27", + "from": "https://registry.npmjs.org/jimp/-/jimp-0.2.27.tgz", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.2.27.tgz", + "dependencies": { + "bignumber.js": { + "version": "2.4.0", + "from": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-2.4.0.tgz" + }, + "bmp-js": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.0.1.tgz" + }, + "es6-promise": { + "version": "3.3.1", + "from": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz" + }, + "exif-parser": { + "version": "0.1.9", + "from": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.9.tgz", + "resolved": "https://registry.npmjs.org/exif-parser/-/exif-parser-0.1.9.tgz" + }, + "file-type": { + "version": "3.9.0", + "from": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz" + }, + "jpeg-js": { + "version": "0.2.0", + "from": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.2.0.tgz", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.2.0.tgz" + }, + "load-bmfont": { + "version": "1.3.0", + "from": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.3.0.tgz", + "dependencies": { + "buffer-equal": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz" + }, + "parse-bmfont-ascii": { + "version": "1.0.6", + "from": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz" + }, + "parse-bmfont-binary": { + "version": "1.0.6", + "from": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz" + }, + "parse-bmfont-xml": { + "version": "1.1.3", + "from": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/parse-bmfont-xml/-/parse-bmfont-xml-1.1.3.tgz", + "dependencies": { + "xml-parse-from-string": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/xml-parse-from-string/-/xml-parse-from-string-1.0.0.tgz" + }, + "xml2js": { + "version": "0.4.17", + "from": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz", + "dependencies": { + "sax": { + "version": "1.2.1", + "from": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz" + }, + "xmlbuilder": { + "version": "4.2.1", + "from": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", + "dependencies": { + "lodash": { + "version": "4.17.4", + "from": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + } + } + } + } + } + } + }, + "xhr": { + "version": "2.3.3", + "from": "https://registry.npmjs.org/xhr/-/xhr-2.3.3.tgz", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.3.3.tgz", + "dependencies": { + "global": { + "version": "4.3.1", + "from": "https://registry.npmjs.org/global/-/global-4.3.1.tgz", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.1.tgz", + "dependencies": { + "min-document": { + "version": "2.19.0", + "from": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "dependencies": { + "dom-walk": { + "version": "0.1.1", + "from": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz" + } + } + }, + "process": { + "version": "0.5.2", + "from": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz" + } + } + }, + "is-function": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz" + }, + "parse-headers": { + "version": "2.0.1", + "from": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", + "dependencies": { + "for-each": { + "version": "0.3.2", + "from": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz" + }, + "trim": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz" + } + } + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + }, + "pixelmatch": { + "version": "4.0.2", + "from": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz" + }, + "pngjs": { + "version": "3.0.0", + "from": "https://registry.npmjs.org/pngjs/-/pngjs-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.0.0.tgz" + }, + "read-chunk": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz" + }, + "stream-to-buffer": { + "version": "0.1.0", + "from": "https://registry.npmjs.org/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz", + "dependencies": { + "stream-to": { + "version": "0.2.2", + "from": "https://registry.npmjs.org/stream-to/-/stream-to-0.2.2.tgz", + "resolved": "https://registry.npmjs.org/stream-to/-/stream-to-0.2.2.tgz" + } + } + }, + "url-regex": { + "version": "3.2.0", + "from": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-3.2.0.tgz", + "dependencies": { + "ip-regex": { + "version": "1.0.3", + "from": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz" + } + } + } + } + }, + "md5": { + "version": "2.2.1", + "from": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "dependencies": { + "charenc": { + "version": "0.0.2", + "from": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz" + }, + "crypt": { + "version": "0.0.2", + "from": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz" + }, + "is-buffer": { + "version": "1.1.4", + "from": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "mime": { + "version": "1.3.4", + "from": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" + }, + "orchestrator": { + "version": "0.3.8", + "from": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "dependencies": { + "end-of-stream": { + "version": "0.1.5", + "from": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "sequencify": { + "version": "0.0.7", + "from": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" + }, + "stream-consume": { + "version": "0.1.0", + "from": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" + } + } + }, + "rimraf": { + "version": "2.5.4", + "from": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + }, + "router": { + "version": "1.1.5", + "from": "https://registry.npmjs.org/router/-/router-1.1.5.tgz", + "resolved": "https://registry.npmjs.org/router/-/router-1.1.5.tgz", + "dependencies": { + "array-flatten": { + "version": "2.1.1", + "from": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz" + }, + "debug": { + "version": "2.2.0", + "from": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.1", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + } + } + }, + "methods": { + "version": "1.1.2", + "from": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" + }, + "parseurl": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" + }, + "path-to-regexp": { + "version": "0.1.7", + "from": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" + }, + "setprototypeof": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz" + }, + "utils-merge": { + "version": "1.0.0", + "from": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" + } + } + }, + "rule-generator": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/rule-generator/-/rule-generator-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/rule-generator/-/rule-generator-2.0.3.tgz" + }, + "semver": { + "version": "5.3.0", + "from": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "serve-static": { + "version": "1.11.2", + "from": "https://registry.npmjs.org/serve-static/-/serve-static-1.11.2.tgz", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.11.2.tgz", + "dependencies": { + "encodeurl": { + "version": "1.0.1", + "from": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz" + }, + "escape-html": { + "version": "1.0.3", + "from": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" + }, + "parseurl": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" + }, + "send": { + "version": "0.14.2", + "from": "https://registry.npmjs.org/send/-/send-0.14.2.tgz", + "resolved": "https://registry.npmjs.org/send/-/send-0.14.2.tgz", + "dependencies": { + "debug": { + "version": "2.2.0", + "from": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "dependencies": { + "ms": { + "version": "0.7.1", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + } + } + }, + "depd": { + "version": "1.1.0", + "from": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz" + }, + "destroy": { + "version": "1.0.4", + "from": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" + }, + "etag": { + "version": "1.7.0", + "from": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz" + }, + "fresh": { + "version": "0.3.0", + "from": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz" + }, + "http-errors": { + "version": "1.5.1", + "from": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz", + "dependencies": { + "inherits": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "setprototypeof": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz" + } + } + }, + "ms": { + "version": "0.7.2", + "from": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + }, + "on-finished": { + "version": "2.3.0", + "from": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "dependencies": { + "ee-first": { + "version": "1.1.1", + "from": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" + } + } + }, + "range-parser": { + "version": "1.2.0", + "from": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" + }, + "statuses": { + "version": "1.3.1", + "from": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" + } + } + } + } + }, + "tcp-proxy": { + "version": "0.0.1", + "from": "https://registry.npmjs.org/tcp-proxy/-/tcp-proxy-0.0.1.tgz", + "resolved": "https://registry.npmjs.org/tcp-proxy/-/tcp-proxy-0.0.1.tgz", + "dependencies": { + "uuid": { + "version": "1.4.2", + "from": "https://registry.npmjs.org/uuid/-/uuid-1.4.2.tgz", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-1.4.2.tgz" + }, + "eventemitter3": { + "version": "0.0.0", + "from": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-0.0.0.tgz", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-0.0.0.tgz" + } + } + }, + "pos": { + "version": "0.4.2", + "from": "https://registry.npmjs.org/pos/-/pos-0.4.2.tgz", + "resolved": "https://registry.npmjs.org/pos/-/pos-0.4.2.tgz" + } + } + }, + "uuid": { + "version": "2.0.3", + "from": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz" + }, + "wrench": { + "version": "1.5.9", + "from": "https://registry.npmjs.org/wrench/-/wrench-1.5.9.tgz", + "resolved": "https://registry.npmjs.org/wrench/-/wrench-1.5.9.tgz" + }, + "ws-without-native": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/ws-without-native/-/ws-without-native-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/ws-without-native/-/ws-without-native-1.0.2.tgz", + "dependencies": { + "options": { + "version": "0.0.6", + "from": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz" + }, + "ultron": { + "version": "1.0.2", + "from": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz" + } + } + } + } + }, + "jibo-dev": { + "version": "2.1.4", + "from": "jibo-dev@beta", + "resolved": "https://registry.npmjs.org/jibo-dev/-/jibo-dev-2.1.4.tgz", + "dependencies": { + "browserify": { + "version": "13.3.0", + "from": "browserify@>=13.1.1 <14.0.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-13.3.0.tgz", + "dependencies": { + "JSONStream": { + "version": "1.3.0", + "from": "JSONStream@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.0.tgz", + "dependencies": { + "jsonparse": { + "version": "1.3.0", + "from": "jsonparse@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz" + }, + "through": { + "version": "2.3.8", + "from": "through@>=2.2.7 <3.0.0", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "assert": { + "version": "1.4.1", + "from": "assert@>=1.4.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz" + }, + "browser-pack": { + "version": "6.0.2", + "from": "browser-pack@>=6.0.1 <7.0.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", + "dependencies": { + "combine-source-map": { + "version": "0.7.2", + "from": "combine-source-map@>=0.7.1 <0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "from": "convert-source-map@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" + }, + "inline-source-map": { + "version": "0.6.2", + "from": "inline-source-map@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz" + }, + "lodash.memoize": { + "version": "3.0.4", + "from": "lodash.memoize@>=3.0.3 <3.1.0", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.3 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + }, + "umd": { + "version": "3.0.1", + "from": "umd@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz" + } + } + }, + "browser-resolve": { + "version": "1.11.2", + "from": "browser-resolve@>=1.11.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "dependencies": { + "resolve": { + "version": "1.1.7", + "from": "resolve@1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" + } + } + }, + "browserify-zlib": { + "version": "0.1.4", + "from": "browserify-zlib@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "dependencies": { + "pako": { + "version": "0.2.9", + "from": "pako@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz" + } + } + }, + "buffer": { + "version": "4.9.1", + "from": "buffer@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "dependencies": { + "base64-js": { + "version": "1.2.0", + "from": "base64-js@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz" + }, + "ieee754": { + "version": "1.1.8", + "from": "ieee754@>=1.1.4 <2.0.0", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + } + } + }, + "cached-path-relative": { + "version": "1.0.0", + "from": "cached-path-relative@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.0.tgz" + }, + "concat-stream": { + "version": "1.5.2", + "from": "concat-stream@>=1.5.1 <1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "dependencies": { + "typedarray": { + "version": "0.0.6", + "from": "typedarray@>=0.0.5 <0.1.0", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + }, + "readable-stream": { + "version": "2.0.6", + "from": "readable-stream@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + } + }, + "console-browserify": { + "version": "1.1.0", + "from": "console-browserify@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "dependencies": { + "date-now": { + "version": "0.1.4", + "from": "date-now@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" + } + } + }, + "constants-browserify": { + "version": "1.0.0", + "from": "constants-browserify@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz" + }, + "crypto-browserify": { + "version": "3.11.0", + "from": "crypto-browserify@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", + "dependencies": { + "browserify-cipher": { + "version": "1.0.0", + "from": "browserify-cipher@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "dependencies": { + "browserify-aes": { + "version": "1.0.6", + "from": "browserify-aes@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "from": "buffer-xor@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + }, + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + } + } + }, + "browserify-des": { + "version": "1.0.0", + "from": "browserify-des@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "dependencies": { + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + }, + "des.js": { + "version": "1.0.0", + "from": "des.js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "dependencies": { + "minimalistic-assert": { + "version": "1.0.0", + "from": "minimalistic-assert@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" + } + } + } + } + }, + "evp_bytestokey": { + "version": "1.0.0", + "from": "evp_bytestokey@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" + } + } + }, + "browserify-sign": { + "version": "4.0.0", + "from": "browserify-sign@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.1 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "browserify-rsa": { + "version": "4.0.1", + "from": "browserify-rsa@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" + }, + "elliptic": { + "version": "6.3.2", + "from": "elliptic@>=6.0.0 <7.0.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", + "dependencies": { + "brorand": { + "version": "1.0.6", + "from": "brorand@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" + }, + "hash.js": { + "version": "1.0.3", + "from": "hash.js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" + } + } + }, + "parse-asn1": { + "version": "5.0.0", + "from": "parse-asn1@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", + "dependencies": { + "asn1.js": { + "version": "4.9.1", + "from": "asn1.js@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "dependencies": { + "minimalistic-assert": { + "version": "1.0.0", + "from": "minimalistic-assert@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" + } + } + }, + "browserify-aes": { + "version": "1.0.6", + "from": "browserify-aes@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "from": "buffer-xor@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + }, + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + } + } + }, + "evp_bytestokey": { + "version": "1.0.0", + "from": "evp_bytestokey@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" + } + } + } + } + }, + "create-ecdh": { + "version": "4.0.0", + "from": "create-ecdh@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "elliptic": { + "version": "6.3.2", + "from": "elliptic@>=6.0.0 <7.0.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", + "dependencies": { + "brorand": { + "version": "1.0.6", + "from": "brorand@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" + }, + "hash.js": { + "version": "1.0.3", + "from": "hash.js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" + } + } + } + } + }, + "create-hash": { + "version": "1.1.2", + "from": "create-hash@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.2.tgz", + "dependencies": { + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + }, + "ripemd160": { + "version": "1.0.1", + "from": "ripemd160@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz" + }, + "sha.js": { + "version": "2.4.8", + "from": "sha.js@>=2.3.6 <3.0.0", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz" + } + } + }, + "create-hmac": { + "version": "1.1.4", + "from": "create-hmac@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz" + }, + "diffie-hellman": { + "version": "5.0.2", + "from": "diffie-hellman@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "miller-rabin": { + "version": "4.0.0", + "from": "miller-rabin@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", + "dependencies": { + "brorand": { + "version": "1.0.6", + "from": "brorand@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" + } + } + } + } + }, + "pbkdf2": { + "version": "3.0.9", + "from": "pbkdf2@>=3.0.3 <4.0.0", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.9.tgz" + }, + "public-encrypt": { + "version": "4.0.0", + "from": "public-encrypt@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "browserify-rsa": { + "version": "4.0.1", + "from": "browserify-rsa@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" + }, + "parse-asn1": { + "version": "5.0.0", + "from": "parse-asn1@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", + "dependencies": { + "asn1.js": { + "version": "4.9.1", + "from": "asn1.js@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "dependencies": { + "minimalistic-assert": { + "version": "1.0.0", + "from": "minimalistic-assert@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" + } + } + }, + "browserify-aes": { + "version": "1.0.6", + "from": "browserify-aes@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "from": "buffer-xor@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + }, + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + } + } + }, + "evp_bytestokey": { + "version": "1.0.0", + "from": "evp_bytestokey@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" + } + } + } + } + }, + "randombytes": { + "version": "2.0.3", + "from": "randombytes@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz" + } + } + }, + "defined": { + "version": "1.0.0", + "from": "defined@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + }, + "deps-sort": { + "version": "2.0.0", + "from": "deps-sort@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz" + }, + "domain-browser": { + "version": "1.1.7", + "from": "domain-browser@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz" + }, + "duplexer2": { + "version": "0.1.4", + "from": "duplexer2@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz" + }, + "events": { + "version": "1.1.1", + "from": "events@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz" + }, + "has": { + "version": "1.0.1", + "from": "has@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "dependencies": { + "function-bind": { + "version": "1.1.0", + "from": "function-bind@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + } + } + }, + "htmlescape": { + "version": "1.1.1", + "from": "htmlescape@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz" + }, + "https-browserify": { + "version": "0.0.1", + "from": "https-browserify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "insert-module-globals": { + "version": "7.0.1", + "from": "insert-module-globals@>=7.0.0 <8.0.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "dependencies": { + "combine-source-map": { + "version": "0.7.2", + "from": "combine-source-map@>=0.7.1 <0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "from": "convert-source-map@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" + }, + "inline-source-map": { + "version": "0.6.2", + "from": "inline-source-map@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz" + }, + "lodash.memoize": { + "version": "3.0.4", + "from": "lodash.memoize@>=3.0.3 <3.1.0", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.3 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + }, + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + }, + "lexical-scope": { + "version": "1.2.0", + "from": "lexical-scope@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "dependencies": { + "astw": { + "version": "2.0.0", + "from": "astw@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.0.0.tgz", + "dependencies": { + "acorn": { + "version": "1.2.2", + "from": "acorn@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + } + } + } + } + } + } + }, + "labeled-stream-splicer": { + "version": "2.0.0", + "from": "labeled-stream-splicer@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "dependencies": { + "isarray": { + "version": "0.0.1", + "from": "isarray@>=0.0.1 <0.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "stream-splicer": { + "version": "2.0.0", + "from": "stream-splicer@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz" + } + } + }, + "module-deps": { + "version": "4.0.8", + "from": "module-deps@>=4.0.8 <5.0.0", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.0.8.tgz", + "dependencies": { + "detective": { + "version": "4.3.2", + "from": "detective@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.3.2.tgz", + "dependencies": { + "acorn": { + "version": "3.3.0", + "from": "acorn@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" + } + } + }, + "stream-combiner2": { + "version": "1.1.1", + "from": "stream-combiner2@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz" + } + } + }, + "os-browserify": { + "version": "0.1.2", + "from": "os-browserify@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz" + }, + "parents": { + "version": "1.0.1", + "from": "parents@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "dependencies": { + "path-platform": { + "version": "0.11.15", + "from": "path-platform@>=0.11.15 <0.12.0", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz" + } + } + }, + "path-browserify": { + "version": "0.0.0", + "from": "path-browserify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" + }, + "process": { + "version": "0.11.9", + "from": "process@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.9.tgz" + }, + "punycode": { + "version": "1.4.1", + "from": "punycode@>=1.3.2 <2.0.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + }, + "querystring-es3": { + "version": "0.2.1", + "from": "querystring-es3@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" + }, + "read-only-stream": { + "version": "2.0.0", + "from": "read-only-stream@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz" + }, + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "resolve": { + "version": "1.2.0", + "from": "resolve@>=1.1.4 <2.0.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" + }, + "shasum": { + "version": "1.0.2", + "from": "shasum@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "from": "json-stable-stringify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + } + } + }, + "sha.js": { + "version": "2.4.8", + "from": "sha.js@>=2.4.4 <2.5.0", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz" + } + } + }, + "shell-quote": { + "version": "1.6.1", + "from": "shell-quote@>=1.6.1 <2.0.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + }, + "array-filter": { + "version": "0.0.1", + "from": "array-filter@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz" + }, + "array-reduce": { + "version": "0.0.0", + "from": "array-reduce@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz" + }, + "array-map": { + "version": "0.0.0", + "from": "array-map@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz" + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "from": "stream-browserify@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz" + }, + "stream-http": { + "version": "2.6.3", + "from": "stream-http@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.6.3.tgz", + "dependencies": { + "builtin-status-codes": { + "version": "3.0.0", + "from": "builtin-status-codes@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz" + }, + "to-arraybuffer": { + "version": "1.0.1", + "from": "to-arraybuffer@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz" + } + } + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "subarg": { + "version": "1.0.0", + "from": "subarg@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz" + }, + "syntax-error": { + "version": "1.1.6", + "from": "syntax-error@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.1.6.tgz", + "dependencies": { + "acorn": { + "version": "2.7.0", + "from": "acorn@>=2.7.0 <3.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz" + } + } + }, + "timers-browserify": { + "version": "1.4.2", + "from": "timers-browserify@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz" + }, + "tty-browserify": { + "version": "0.0.0", + "from": "tty-browserify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" + }, + "url": { + "version": "0.11.0", + "from": "url@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "dependencies": { + "punycode": { + "version": "1.3.2", + "from": "punycode@1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + }, + "querystring": { + "version": "0.2.0", + "from": "querystring@0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + } + } + }, + "util": { + "version": "0.10.3", + "from": "util@>=0.10.1 <0.11.0", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "dependencies": { + "inherits": { + "version": "2.0.1", + "from": "inherits@2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + }, + "vm-browserify": { + "version": "0.0.4", + "from": "vm-browserify@>=0.0.1 <0.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "dependencies": { + "indexof": { + "version": "0.0.1", + "from": "indexof@0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + }, + "chalk": { + "version": "1.1.3", + "from": "chalk@>=1.1.3 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "colors": { + "version": "1.1.2", + "from": "colors@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz" + }, + "del": { + "version": "2.2.2", + "from": "del@>=2.2.2 <3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "dependencies": { + "globby": { + "version": "5.0.0", + "from": "globby@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "dependencies": { + "array-union": { + "version": "1.0.2", + "from": "array-union@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "dependencies": { + "array-uniq": { + "version": "1.0.3", + "from": "array-uniq@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + } + } + }, + "arrify": { + "version": "1.0.1", + "from": "arrify@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + } + } + }, + "is-path-cwd": { + "version": "1.0.0", + "from": "is-path-cwd@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz" + }, + "is-path-in-cwd": { + "version": "1.0.0", + "from": "is-path-in-cwd@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "dependencies": { + "is-path-inside": { + "version": "1.0.0", + "from": "is-path-inside@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "dependencies": { + "path-is-inside": { + "version": "1.0.2", + "from": "path-is-inside@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" + } + } + } + } + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "pify": { + "version": "2.3.0", + "from": "pify@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "pinkie-promise@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "pinkie@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + }, + "rimraf": { + "version": "2.5.4", + "from": "rimraf@>=2.2.8 <3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "escodegen": { + "version": "1.8.1", + "from": "escodegen@>=1.6.1 <2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "dependencies": { + "estraverse": { + "version": "1.9.3", + "from": "estraverse@>=1.9.1 <2.0.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz" + }, + "esutils": { + "version": "2.0.2", + "from": "esutils@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + }, + "optionator": { + "version": "0.8.2", + "from": "optionator@>=0.8.1 <0.9.0", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "dependencies": { + "prelude-ls": { + "version": "1.1.2", + "from": "prelude-ls@>=1.1.2 <1.2.0", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" + }, + "deep-is": { + "version": "0.1.3", + "from": "deep-is@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" + }, + "wordwrap": { + "version": "1.0.0", + "from": "wordwrap@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + }, + "type-check": { + "version": "0.3.2", + "from": "type-check@>=0.3.2 <0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" + }, + "levn": { + "version": "0.3.0", + "from": "levn@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" + }, + "fast-levenshtein": { + "version": "2.0.6", + "from": "fast-levenshtein@>=2.0.4 <2.1.0", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + } + } + }, + "source-map": { + "version": "0.2.0", + "from": "source-map@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + }, + "esprima": { + "version": "2.7.3", + "from": "esprima@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz" + }, + "estraverse": { + "version": "4.2.0", + "from": "estraverse@>=4.2.0 <5.0.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" + }, + "gulp": { + "version": "3.9.1", + "from": "gulp@>=3.9.1 <4.0.0", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "dependencies": { + "archy": { + "version": "1.0.0", + "from": "archy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" + }, + "deprecated": { + "version": "0.0.1", + "from": "deprecated@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz" + }, + "gulp-util": { + "version": "3.0.8", + "from": "gulp-util@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "dependencies": { + "array-differ": { + "version": "1.0.0", + "from": "array-differ@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" + }, + "array-uniq": { + "version": "1.0.3", + "from": "array-uniq@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + }, + "beeper": { + "version": "1.1.1", + "from": "beeper@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz" + }, + "dateformat": { + "version": "2.0.0", + "from": "dateformat@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz" + }, + "fancy-log": { + "version": "1.3.0", + "from": "fancy-log@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "dependencies": { + "time-stamp": { + "version": "1.0.1", + "from": "time-stamp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz" + } + } + }, + "gulplog": { + "version": "1.0.0", + "from": "gulplog@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "dependencies": { + "glogg": { + "version": "1.0.0", + "from": "glogg@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "dependencies": { + "sparkles": { + "version": "1.0.0", + "from": "sparkles@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" + } + } + } + } + }, + "has-gulplog": { + "version": "0.1.0", + "from": "has-gulplog@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "dependencies": { + "sparkles": { + "version": "1.0.0", + "from": "sparkles@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" + } + } + }, + "lodash._reescape": { + "version": "3.0.0", + "from": "lodash._reescape@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "from": "lodash._reevaluate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "from": "lodash._reinterpolate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + }, + "lodash.template": { + "version": "3.6.2", + "from": "lodash.template@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "dependencies": { + "lodash._basecopy": { + "version": "3.0.1", + "from": "lodash._basecopy@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "lodash._basetostring": { + "version": "3.0.1", + "from": "lodash._basetostring@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "lodash._basevalues": { + "version": "3.0.0", + "from": "lodash._basevalues@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "lodash.escape": { + "version": "3.2.0", + "from": "lodash.escape@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "dependencies": { + "lodash._root": { + "version": "3.0.1", + "from": "lodash._root@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" + } + } + }, + "lodash.keys": { + "version": "3.1.2", + "from": "lodash.keys@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "dependencies": { + "lodash._getnative": { + "version": "3.9.1", + "from": "lodash._getnative@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "lodash.isarguments": { + "version": "3.1.0", + "from": "lodash.isarguments@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + }, + "lodash.isarray": { + "version": "3.0.4", + "from": "lodash.isarray@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + } + } + }, + "lodash.restparam": { + "version": "3.6.1", + "from": "lodash.restparam@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + }, + "lodash.templatesettings": { + "version": "3.1.1", + "from": "lodash.templatesettings@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz" + } + } + }, + "multipipe": { + "version": "0.1.2", + "from": "multipipe@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "dependencies": { + "duplexer2": { + "version": "0.0.2", + "from": "duplexer2@0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "from": "readable-stream@>=1.1.9 <1.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + } + } + } + } + }, + "object-assign": { + "version": "3.0.0", + "from": "object-assign@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + }, + "replace-ext": { + "version": "0.0.1", + "from": "replace-ext@0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + }, + "vinyl": { + "version": "0.5.3", + "from": "vinyl@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "dependencies": { + "clone": { + "version": "1.0.2", + "from": "clone@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + }, + "clone-stats": { + "version": "0.0.1", + "from": "clone-stats@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + } + } + } + } + }, + "interpret": { + "version": "1.0.1", + "from": "interpret@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz" + }, + "liftoff": { + "version": "2.3.0", + "from": "liftoff@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "dependencies": { + "extend": { + "version": "3.0.0", + "from": "extend@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" + }, + "findup-sync": { + "version": "0.4.3", + "from": "findup-sync@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "dependencies": { + "detect-file": { + "version": "0.1.0", + "from": "detect-file@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "dependencies": { + "fs-exists-sync": { + "version": "0.1.0", + "from": "fs-exists-sync@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz" + } + } + }, + "is-glob": { + "version": "2.0.1", + "from": "is-glob@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "from": "is-extglob@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + } + } + }, + "micromatch": { + "version": "2.3.11", + "from": "micromatch@>=2.3.7 <3.0.0", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "from": "arr-diff@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "dependencies": { + "arr-flatten": { + "version": "1.0.1", + "from": "arr-flatten@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" + } + } + }, + "array-unique": { + "version": "0.2.1", + "from": "array-unique@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" + }, + "braces": { + "version": "1.8.5", + "from": "braces@>=1.8.2 <2.0.0", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "dependencies": { + "expand-range": { + "version": "1.8.2", + "from": "expand-range@>=1.8.1 <2.0.0", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "dependencies": { + "fill-range": { + "version": "2.2.3", + "from": "fill-range@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "dependencies": { + "is-number": { + "version": "2.1.0", + "from": "is-number@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" + }, + "isobject": { + "version": "2.1.0", + "from": "isobject@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "dependencies": { + "isarray": { + "version": "1.0.0", + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + } + } + }, + "randomatic": { + "version": "1.1.6", + "from": "randomatic@>=1.1.3 <2.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz" + }, + "repeat-string": { + "version": "1.6.1", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + } + } + } + } + }, + "preserve": { + "version": "0.2.0", + "from": "preserve@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" + }, + "repeat-element": { + "version": "1.1.2", + "from": "repeat-element@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "from": "expand-brackets@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "dependencies": { + "is-posix-bracket": { + "version": "0.1.1", + "from": "is-posix-bracket@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" + } + } + }, + "extglob": { + "version": "0.3.2", + "from": "extglob@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz" + }, + "filename-regex": { + "version": "2.0.0", + "from": "filename-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz" + }, + "is-extglob": { + "version": "1.0.0", + "from": "is-extglob@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + }, + "kind-of": { + "version": "3.1.0", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "normalize-path": { + "version": "2.0.1", + "from": "normalize-path@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" + }, + "object.omit": { + "version": "2.0.1", + "from": "object.omit@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "dependencies": { + "for-own": { + "version": "0.1.4", + "from": "for-own@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz", + "dependencies": { + "for-in": { + "version": "0.1.6", + "from": "for-in@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.6.tgz" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "from": "is-extendable@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + } + } + }, + "parse-glob": { + "version": "3.0.4", + "from": "parse-glob@>=3.0.4 <4.0.0", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "dependencies": { + "glob-base": { + "version": "0.3.0", + "from": "glob-base@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "from": "glob-parent@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + } + } + }, + "is-dotfile": { + "version": "1.0.2", + "from": "is-dotfile@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" + } + } + }, + "regex-cache": { + "version": "0.4.3", + "from": "regex-cache@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "dependencies": { + "is-equal-shallow": { + "version": "0.1.3", + "from": "is-equal-shallow@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + }, + "is-primitive": { + "version": "2.0.0", + "from": "is-primitive@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" + } + } + } + } + }, + "resolve-dir": { + "version": "0.1.1", + "from": "resolve-dir@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "dependencies": { + "expand-tilde": { + "version": "1.2.2", + "from": "expand-tilde@>=1.2.2 <2.0.0", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "from": "os-homedir@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + } + } + }, + "global-modules": { + "version": "0.2.3", + "from": "global-modules@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "dependencies": { + "global-prefix": { + "version": "0.1.5", + "from": "global-prefix@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "dependencies": { + "homedir-polyfill": { + "version": "1.0.1", + "from": "homedir-polyfill@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "dependencies": { + "parse-passwd": { + "version": "1.0.0", + "from": "parse-passwd@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz" + } + } + }, + "ini": { + "version": "1.3.4", + "from": "ini@>=1.3.4 <2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "which": { + "version": "1.2.12", + "from": "which@>=1.2.12 <2.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.12.tgz", + "dependencies": { + "isexe": { + "version": "1.1.2", + "from": "isexe@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz" + } + } + } + } + }, + "is-windows": { + "version": "0.2.0", + "from": "is-windows@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz" + } + } + } + } + } + } + }, + "fined": { + "version": "1.0.2", + "from": "fined@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.0.2.tgz", + "dependencies": { + "expand-tilde": { + "version": "1.2.2", + "from": "expand-tilde@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "from": "os-homedir@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + } + } + }, + "lodash.assignwith": { + "version": "4.2.0", + "from": "lodash.assignwith@>=4.0.7 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz" + }, + "lodash.isempty": { + "version": "4.4.0", + "from": "lodash.isempty@>=4.2.1 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz" + }, + "lodash.pick": { + "version": "4.4.0", + "from": "lodash.pick@>=4.2.1 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz" + }, + "parse-filepath": { + "version": "1.0.1", + "from": "parse-filepath@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "dependencies": { + "is-absolute": { + "version": "0.2.6", + "from": "is-absolute@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "dependencies": { + "is-relative": { + "version": "0.2.1", + "from": "is-relative@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "dependencies": { + "is-unc-path": { + "version": "0.1.2", + "from": "is-unc-path@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "dependencies": { + "unc-path-regex": { + "version": "0.1.2", + "from": "unc-path-regex@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz" + } + } + } + } + }, + "is-windows": { + "version": "0.2.0", + "from": "is-windows@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz" + } + } + }, + "map-cache": { + "version": "0.2.2", + "from": "map-cache@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz" + }, + "path-root": { + "version": "0.1.1", + "from": "path-root@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "dependencies": { + "path-root-regex": { + "version": "0.1.2", + "from": "path-root-regex@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz" + } + } + } + } + } + } + }, + "flagged-respawn": { + "version": "0.3.2", + "from": "flagged-respawn@>=0.3.2 <0.4.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "from": "lodash.isplainobject@>=4.0.4 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" + }, + "lodash.isstring": { + "version": "4.0.1", + "from": "lodash.isstring@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" + }, + "lodash.mapvalues": { + "version": "4.6.0", + "from": "lodash.mapvalues@>=4.4.0 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" + }, + "rechoir": { + "version": "0.6.2", + "from": "rechoir@>=0.6.2 <0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" + }, + "resolve": { + "version": "1.2.0", + "from": "resolve@>=1.1.7 <2.0.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" + } + } + }, + "orchestrator": { + "version": "0.3.8", + "from": "orchestrator@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "dependencies": { + "end-of-stream": { + "version": "0.1.5", + "from": "end-of-stream@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "once@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "sequencify": { + "version": "0.0.7", + "from": "sequencify@>=0.0.7 <0.1.0", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" + }, + "stream-consume": { + "version": "0.1.0", + "from": "stream-consume@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" + } + } + }, + "semver": { + "version": "4.3.6", + "from": "semver@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" + }, + "tildify": { + "version": "1.2.0", + "from": "tildify@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "from": "os-homedir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + } + } + }, + "v8flags": { + "version": "2.0.11", + "from": "v8flags@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.0.11.tgz", + "dependencies": { + "user-home": { + "version": "1.1.1", + "from": "user-home@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" + } + } + }, + "vinyl-fs": { + "version": "0.3.14", + "from": "vinyl-fs@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "dependencies": { + "defaults": { + "version": "1.0.3", + "from": "defaults@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "dependencies": { + "clone": { + "version": "1.0.2", + "from": "clone@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + } + } + }, + "glob-stream": { + "version": "3.1.18", + "from": "glob-stream@>=3.1.5 <4.0.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "dependencies": { + "glob": { + "version": "4.5.3", + "from": "glob@>=4.3.1 <5.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "dependencies": { + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "minimatch": { + "version": "2.0.10", + "from": "minimatch@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "from": "ordered-read-streams@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz" + }, + "glob2base": { + "version": "0.0.12", + "from": "glob2base@>=0.0.12 <0.0.13", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "dependencies": { + "find-index": { + "version": "0.1.1", + "from": "find-index@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz" + } + } + }, + "unique-stream": { + "version": "1.0.0", + "from": "unique-stream@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz" + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "from": "glob-watcher@>=0.0.6 <0.0.7", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "dependencies": { + "gaze": { + "version": "0.5.2", + "from": "gaze@>=0.5.1 <0.6.0", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "dependencies": { + "globule": { + "version": "0.1.0", + "from": "globule@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "dependencies": { + "lodash": { + "version": "1.0.2", + "from": "lodash@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz" + }, + "glob": { + "version": "3.1.21", + "from": "glob@>=3.1.21 <3.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "dependencies": { + "graceful-fs": { + "version": "1.2.3", + "from": "graceful-fs@>=1.2.0 <1.3.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" + }, + "inherits": { + "version": "1.0.2", + "from": "inherits@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz" + } + } + }, + "minimatch": { + "version": "0.2.14", + "from": "minimatch@>=0.2.11 <0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "dependencies": { + "lru-cache": { + "version": "2.7.3", + "from": "lru-cache@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz" + }, + "sigmund": { + "version": "1.0.1", + "from": "sigmund@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" + } + } + } + } + } + } + } + } + }, + "graceful-fs": { + "version": "3.0.11", + "from": "graceful-fs@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "dependencies": { + "natives": { + "version": "1.1.0", + "from": "natives@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz" + } + } + }, + "strip-bom": { + "version": "1.0.0", + "from": "strip-bom@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "dependencies": { + "first-chunk-stream": { + "version": "1.0.0", + "from": "first-chunk-stream@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" + }, + "is-utf8": { + "version": "0.2.1", + "from": "is-utf8@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" + } + } + }, + "through2": { + "version": "0.6.5", + "from": "through2@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "readable-stream@>=1.0.33-1 <1.1.0-0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <4.1.0-0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + }, + "vinyl": { + "version": "0.4.6", + "from": "vinyl@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "dependencies": { + "clone": { + "version": "0.2.0", + "from": "clone@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz" + }, + "clone-stats": { + "version": "0.0.1", + "from": "clone-stats@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + } + } + } + } + } + } + }, + "gulp-if": { + "version": "2.0.2", + "from": "gulp-if@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/gulp-if/-/gulp-if-2.0.2.tgz", + "dependencies": { + "gulp-match": { + "version": "1.0.3", + "from": "gulp-match@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/gulp-match/-/gulp-match-1.0.3.tgz", + "dependencies": { + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=3.0.3 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + } + } + }, + "ternary-stream": { + "version": "2.0.1", + "from": "ternary-stream@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ternary-stream/-/ternary-stream-2.0.1.tgz", + "dependencies": { + "duplexify": { + "version": "3.5.0", + "from": "duplexify@>=3.5.0 <4.0.0", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.0.tgz", + "dependencies": { + "end-of-stream": { + "version": "1.0.0", + "from": "end-of-stream@1.0.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "once@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "stream-shift": { + "version": "1.0.0", + "from": "stream-shift@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz" + } + } + }, + "fork-stream": { + "version": "0.0.4", + "from": "fork-stream@>=0.0.4 <0.0.5", + "resolved": "https://registry.npmjs.org/fork-stream/-/fork-stream-0.0.4.tgz" + }, + "merge-stream": { + "version": "1.0.1", + "from": "merge-stream@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "dependencies": { + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + } + } + } + } + } + }, + "gulp-tslint": { + "version": "7.1.0", + "from": "gulp-tslint@>=7.0.1 <8.0.0", + "resolved": "https://registry.npmjs.org/gulp-tslint/-/gulp-tslint-7.1.0.tgz", + "dependencies": { + "gulp-util": { + "version": "3.0.8", + "from": "gulp-util@>=3.0.8 <3.1.0", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "dependencies": { + "array-differ": { + "version": "1.0.0", + "from": "array-differ@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" + }, + "array-uniq": { + "version": "1.0.3", + "from": "array-uniq@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + }, + "beeper": { + "version": "1.1.1", + "from": "beeper@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz" + }, + "dateformat": { + "version": "2.0.0", + "from": "dateformat@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz" + }, + "fancy-log": { + "version": "1.3.0", + "from": "fancy-log@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "dependencies": { + "time-stamp": { + "version": "1.0.1", + "from": "time-stamp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz" + } + } + }, + "gulplog": { + "version": "1.0.0", + "from": "gulplog@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "dependencies": { + "glogg": { + "version": "1.0.0", + "from": "glogg@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "dependencies": { + "sparkles": { + "version": "1.0.0", + "from": "sparkles@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" + } + } + } + } + }, + "has-gulplog": { + "version": "0.1.0", + "from": "has-gulplog@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "dependencies": { + "sparkles": { + "version": "1.0.0", + "from": "sparkles@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" + } + } + }, + "lodash._reescape": { + "version": "3.0.0", + "from": "lodash._reescape@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "from": "lodash._reevaluate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "from": "lodash._reinterpolate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + }, + "lodash.template": { + "version": "3.6.2", + "from": "lodash.template@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "dependencies": { + "lodash._basecopy": { + "version": "3.0.1", + "from": "lodash._basecopy@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "lodash._basetostring": { + "version": "3.0.1", + "from": "lodash._basetostring@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "lodash._basevalues": { + "version": "3.0.0", + "from": "lodash._basevalues@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "lodash.escape": { + "version": "3.2.0", + "from": "lodash.escape@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "dependencies": { + "lodash._root": { + "version": "3.0.1", + "from": "lodash._root@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" + } + } + }, + "lodash.keys": { + "version": "3.1.2", + "from": "lodash.keys@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "dependencies": { + "lodash._getnative": { + "version": "3.9.1", + "from": "lodash._getnative@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "lodash.isarguments": { + "version": "3.1.0", + "from": "lodash.isarguments@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + }, + "lodash.isarray": { + "version": "3.0.4", + "from": "lodash.isarray@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + } + } + }, + "lodash.restparam": { + "version": "3.6.1", + "from": "lodash.restparam@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + }, + "lodash.templatesettings": { + "version": "3.1.1", + "from": "lodash.templatesettings@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz" + } + } + }, + "multipipe": { + "version": "0.1.2", + "from": "multipipe@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "dependencies": { + "duplexer2": { + "version": "0.0.2", + "from": "duplexer2@0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "from": "readable-stream@>=1.1.9 <1.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + } + } + } + } + }, + "object-assign": { + "version": "3.0.0", + "from": "object-assign@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + }, + "replace-ext": { + "version": "0.0.1", + "from": "replace-ext@0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + }, + "vinyl": { + "version": "0.5.3", + "from": "vinyl@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "dependencies": { + "clone": { + "version": "1.0.2", + "from": "clone@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + }, + "clone-stats": { + "version": "0.0.1", + "from": "clone-stats@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + } + } + } + } + }, + "map-stream": { + "version": "0.1.0", + "from": "map-stream@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz" + }, + "through": { + "version": "2.3.8", + "from": "through@>=2.3.8 <2.4.0", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "gulp-uglify-harmony": { + "version": "1.5.2", + "from": "jiborobot/gulp-uglify-harmony#master", + "resolved": "git://github.com/jiborobot/gulp-uglify-harmony.git#2b26cc0999dbd6d90993b20156e603c562625da1", + "dependencies": { + "deap": { + "version": "1.0.0", + "from": "deap@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/deap/-/deap-1.0.0.tgz" + }, + "fancy-log": { + "version": "1.3.0", + "from": "fancy-log@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "dependencies": { + "time-stamp": { + "version": "1.0.1", + "from": "time-stamp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz" + } + } + }, + "gulp-util": { + "version": "3.0.8", + "from": "gulp-util@>=3.0.8 <3.1.0", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "dependencies": { + "array-differ": { + "version": "1.0.0", + "from": "array-differ@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" + }, + "array-uniq": { + "version": "1.0.3", + "from": "array-uniq@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + }, + "beeper": { + "version": "1.1.1", + "from": "beeper@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz" + }, + "dateformat": { + "version": "2.0.0", + "from": "dateformat@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz" + }, + "gulplog": { + "version": "1.0.0", + "from": "gulplog@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "dependencies": { + "glogg": { + "version": "1.0.0", + "from": "glogg@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "dependencies": { + "sparkles": { + "version": "1.0.0", + "from": "sparkles@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" + } + } + } + } + }, + "has-gulplog": { + "version": "0.1.0", + "from": "has-gulplog@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "dependencies": { + "sparkles": { + "version": "1.0.0", + "from": "sparkles@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" + } + } + }, + "lodash._reescape": { + "version": "3.0.0", + "from": "lodash._reescape@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "from": "lodash._reevaluate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "from": "lodash._reinterpolate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" + }, + "lodash.template": { + "version": "3.6.2", + "from": "lodash.template@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "dependencies": { + "lodash._basecopy": { + "version": "3.0.1", + "from": "lodash._basecopy@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "lodash._basetostring": { + "version": "3.0.1", + "from": "lodash._basetostring@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" + }, + "lodash._basevalues": { + "version": "3.0.0", + "from": "lodash._basevalues@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "lodash.escape": { + "version": "3.2.0", + "from": "lodash.escape@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "dependencies": { + "lodash._root": { + "version": "3.0.1", + "from": "lodash._root@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" + } + } + }, + "lodash.keys": { + "version": "3.1.2", + "from": "lodash.keys@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "dependencies": { + "lodash._getnative": { + "version": "3.9.1", + "from": "lodash._getnative@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "lodash.isarguments": { + "version": "3.1.0", + "from": "lodash.isarguments@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + }, + "lodash.isarray": { + "version": "3.0.4", + "from": "lodash.isarray@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + } + } + }, + "lodash.restparam": { + "version": "3.6.1", + "from": "lodash.restparam@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" + }, + "lodash.templatesettings": { + "version": "3.1.1", + "from": "lodash.templatesettings@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz" + } + } + }, + "multipipe": { + "version": "0.1.2", + "from": "multipipe@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "dependencies": { + "duplexer2": { + "version": "0.0.2", + "from": "duplexer2@0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "from": "readable-stream@>=1.1.9 <1.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + } + } + } + } + }, + "object-assign": { + "version": "3.0.0", + "from": "object-assign@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" + }, + "replace-ext": { + "version": "0.0.1", + "from": "replace-ext@0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" + }, + "vinyl": { + "version": "0.5.3", + "from": "vinyl@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "dependencies": { + "clone": { + "version": "1.0.2", + "from": "clone@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" + }, + "clone-stats": { + "version": "0.0.1", + "from": "clone-stats@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + } + } + } + } + }, + "isobject": { + "version": "2.1.0", + "from": "isobject@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "dependencies": { + "isarray": { + "version": "1.0.0", + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + } + } + }, + "uglify-js": { + "version": "2.7.5", + "from": "jiborobot/UglifyJS2-harmony#harmony", + "resolved": "git://github.com/jiborobot/UglifyJS2-harmony.git#0a3fcf14dfdd21a0f1575c47879fc1c87175a6af", + "dependencies": { + "async": { + "version": "0.2.10", + "from": "async@>=0.2.6 <0.3.0", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.1 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + }, + "uglify-to-browserify": { + "version": "1.0.2", + "from": "uglify-to-browserify@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" + }, + "yargs": { + "version": "3.10.0", + "from": "yargs@>=3.10.0 <3.11.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "dependencies": { + "camelcase": { + "version": "1.2.1", + "from": "camelcase@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" + }, + "cliui": { + "version": "2.1.0", + "from": "cliui@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "dependencies": { + "center-align": { + "version": "0.1.3", + "from": "center-align@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "dependencies": { + "align-text": { + "version": "0.1.4", + "from": "align-text@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "dependencies": { + "kind-of": { + "version": "3.1.0", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "longest": { + "version": "1.0.1", + "from": "longest@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + }, + "repeat-string": { + "version": "1.6.1", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + } + } + }, + "lazy-cache": { + "version": "1.0.4", + "from": "lazy-cache@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" + } + } + }, + "right-align": { + "version": "0.1.3", + "from": "right-align@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "dependencies": { + "align-text": { + "version": "0.1.4", + "from": "align-text@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "dependencies": { + "kind-of": { + "version": "3.1.0", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "longest": { + "version": "1.0.1", + "from": "longest@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" + }, + "repeat-string": { + "version": "1.6.1", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + } + } + } + } + }, + "wordwrap": { + "version": "0.0.2", + "from": "wordwrap@0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" + } + } + }, + "decamelize": { + "version": "1.2.0", + "from": "decamelize@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + }, + "window-size": { + "version": "0.1.0", + "from": "window-size@0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" + } + } + } + } + }, + "uglify-save-license": { + "version": "0.4.1", + "from": "uglify-save-license@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/uglify-save-license/-/uglify-save-license-0.4.1.tgz" + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "from": "vinyl-sourcemaps-apply@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "dependencies": { + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.1 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + } + } + }, + "jibo-flow-core": { + "version": "1.0.4", + "from": "jibo-flow-core@beta", + "resolved": "https://registry.npmjs.org/jibo-flow-core/-/jibo-flow-core-1.0.4.tgz" + }, + "mapstraction": { + "version": "1.0.0", + "from": "mapstraction@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/mapstraction/-/mapstraction-1.0.0.tgz", + "dependencies": { + "convert-source-map": { + "version": "1.3.0", + "from": "convert-source-map@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.3.0.tgz" + } + } + }, + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + }, + "pretty-hrtime": { + "version": "1.0.3", + "from": "pretty-hrtime@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz" + }, + "through2": { + "version": "2.0.3", + "from": "through2@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "dependencies": { + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.1.5 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.1 <4.1.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + }, + "tsify-preprocess": { + "version": "2.0.3", + "from": "tsify-preprocess@>=2.0.3 <3.0.0", + "resolved": "https://registry.npmjs.org/tsify-preprocess/-/tsify-preprocess-2.0.3.tgz", + "dependencies": { + "convert-source-map": { + "version": "1.3.0", + "from": "convert-source-map@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.3.0.tgz" + }, + "fs.realpath": { + "version": "1.0.0", + "from": "fs.realpath@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "preprocess": { + "version": "3.1.0", + "from": "preprocess@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/preprocess/-/preprocess-3.1.0.tgz", + "dependencies": { + "xregexp": { + "version": "3.1.0", + "from": "xregexp@3.1.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.0.tgz" + } + } + }, + "semver": { + "version": "5.3.0", + "from": "semver@>=5.1.0 <6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "tsconfig": { + "version": "5.0.3", + "from": "tsconfig@>=5.0.3 <6.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-5.0.3.tgz", + "dependencies": { + "any-promise": { + "version": "1.3.0", + "from": "any-promise@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz" + }, + "parse-json": { + "version": "2.2.0", + "from": "parse-json@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "dependencies": { + "error-ex": { + "version": "1.3.0", + "from": "error-ex@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz", + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "from": "is-arrayish@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + } + } + } + } + }, + "strip-bom": { + "version": "2.0.0", + "from": "strip-bom@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "dependencies": { + "is-utf8": { + "version": "0.2.1", + "from": "is-utf8@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" + } + } + }, + "strip-json-comments": { + "version": "2.0.1", + "from": "strip-json-comments@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" + } + } + } + } + }, + "tslint": { + "version": "4.4.2", + "from": "tslint@>=4.1.1 <5.0.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-4.4.2.tgz", + "dependencies": { + "babel-code-frame": { + "version": "6.22.0", + "from": "babel-code-frame@>=6.20.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", + "dependencies": { + "esutils": { + "version": "2.0.2", + "from": "esutils@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" + }, + "js-tokens": { + "version": "3.0.1", + "from": "js-tokens@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz" + } + } + }, + "diff": { + "version": "3.2.0", + "from": "diff@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz" + }, + "findup-sync": { + "version": "0.3.0", + "from": "findup-sync@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "dependencies": { + "glob": { + "version": "5.0.15", + "from": "glob@>=5.0.0 <5.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "dependencies": { + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + } + } + } + }, + "optimist": { + "version": "0.6.1", + "from": "optimist@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "from": "wordwrap@>=0.0.2 <0.1.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" + }, + "minimist": { + "version": "0.0.10", + "from": "minimist@>=0.0.1 <0.1.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" + } + } + }, + "resolve": { + "version": "1.2.0", + "from": "resolve@>=1.1.7 <2.0.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" + }, + "update-notifier": { + "version": "1.0.3", + "from": "update-notifier@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-1.0.3.tgz", + "dependencies": { + "boxen": { + "version": "0.6.0", + "from": "boxen@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-0.6.0.tgz", + "dependencies": { + "ansi-align": { + "version": "1.1.0", + "from": "ansi-align@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-1.1.0.tgz" + }, + "camelcase": { + "version": "2.1.1", + "from": "camelcase@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" + }, + "cli-boxes": { + "version": "1.0.0", + "from": "cli-boxes@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz" + }, + "filled-array": { + "version": "1.1.0", + "from": "filled-array@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "repeating": { + "version": "2.0.1", + "from": "repeating@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "dependencies": { + "is-finite": { + "version": "1.0.2", + "from": "is-finite@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + } + } + } + }, + "string-width": { + "version": "1.0.2", + "from": "string-width@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "from": "code-point-at@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + } + } + }, + "widest-line": { + "version": "1.0.0", + "from": "widest-line@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz" + } + } + }, + "configstore": { + "version": "2.1.0", + "from": "configstore@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz", + "dependencies": { + "dot-prop": { + "version": "3.0.0", + "from": "dot-prop@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "dependencies": { + "is-obj": { + "version": "1.0.1", + "from": "is-obj@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz" + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "os-tmpdir": { + "version": "1.0.2", + "from": "os-tmpdir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "osenv": { + "version": "0.1.4", + "from": "osenv@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "from": "os-homedir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + } + } + }, + "uuid": { + "version": "2.0.3", + "from": "uuid@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz" + }, + "write-file-atomic": { + "version": "1.3.1", + "from": "write-file-atomic@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.1.tgz", + "dependencies": { + "imurmurhash": { + "version": "0.1.4", + "from": "imurmurhash@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + }, + "slide": { + "version": "1.1.6", + "from": "slide@>=1.1.5 <2.0.0", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz" + } + } + } + } + }, + "is-npm": { + "version": "1.0.0", + "from": "is-npm@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz" + }, + "latest-version": { + "version": "2.0.0", + "from": "latest-version@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz", + "dependencies": { + "package-json": { + "version": "2.4.0", + "from": "package-json@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz", + "dependencies": { + "got": { + "version": "5.7.1", + "from": "got@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", + "dependencies": { + "create-error-class": { + "version": "3.0.2", + "from": "create-error-class@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "dependencies": { + "capture-stack-trace": { + "version": "1.0.0", + "from": "capture-stack-trace@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz" + } + } + }, + "duplexer2": { + "version": "0.1.4", + "from": "duplexer2@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz" + }, + "is-redirect": { + "version": "1.0.0", + "from": "is-redirect@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz" + }, + "is-retry-allowed": { + "version": "1.1.0", + "from": "is-retry-allowed@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz" + }, + "is-stream": { + "version": "1.1.0", + "from": "is-stream@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" + }, + "lowercase-keys": { + "version": "1.0.0", + "from": "lowercase-keys@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz" + }, + "node-status-codes": { + "version": "1.0.0", + "from": "node-status-codes@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "parse-json": { + "version": "2.2.0", + "from": "parse-json@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "dependencies": { + "error-ex": { + "version": "1.3.0", + "from": "error-ex@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz", + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "from": "is-arrayish@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + } + } + } + } + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "pinkie-promise@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "pinkie@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + }, + "read-all-stream": { + "version": "3.1.0", + "from": "read-all-stream@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz" + }, + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.5 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "timed-out": { + "version": "3.1.3", + "from": "timed-out@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz" + }, + "unzip-response": { + "version": "1.0.2", + "from": "unzip-response@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz" + }, + "url-parse-lax": { + "version": "1.0.0", + "from": "url-parse-lax@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "dependencies": { + "prepend-http": { + "version": "1.0.4", + "from": "prepend-http@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz" + } + } + } + } + }, + "registry-auth-token": { + "version": "3.1.0", + "from": "registry-auth-token@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.1.0.tgz", + "dependencies": { + "rc": { + "version": "1.1.6", + "from": "rc@>=1.1.6 <2.0.0", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "dependencies": { + "deep-extend": { + "version": "0.4.1", + "from": "deep-extend@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz" + }, + "ini": { + "version": "1.3.4", + "from": "ini@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "strip-json-comments": { + "version": "1.0.4", + "from": "strip-json-comments@>=1.0.4 <1.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" + } + } + } + } + }, + "registry-url": { + "version": "3.1.0", + "from": "registry-url@>=3.0.3 <4.0.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "dependencies": { + "rc": { + "version": "1.1.6", + "from": "rc@>=1.1.6 <2.0.0", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "dependencies": { + "deep-extend": { + "version": "0.4.1", + "from": "deep-extend@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz" + }, + "ini": { + "version": "1.3.4", + "from": "ini@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "strip-json-comments": { + "version": "1.0.4", + "from": "strip-json-comments@>=1.0.4 <1.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" + } + } + } + } + }, + "semver": { + "version": "5.3.0", + "from": "semver@>=5.1.0 <6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + } + } + } + } + }, + "lazy-req": { + "version": "1.1.0", + "from": "lazy-req@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/lazy-req/-/lazy-req-1.1.0.tgz" + }, + "semver-diff": { + "version": "2.1.0", + "from": "semver-diff@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "dependencies": { + "semver": { + "version": "5.3.0", + "from": "semver@>=5.0.3 <6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + } + } + }, + "xdg-basedir": { + "version": "2.0.0", + "from": "xdg-basedir@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz", + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "from": "os-homedir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + } + } + } + } + } + } + }, + "typescript": { + "version": "2.1.5", + "from": "typescript@>=2.1.4 <3.0.0", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.1.5.tgz" + }, + "vinyl-buffer": { + "version": "1.0.0", + "from": "vinyl-buffer@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/vinyl-buffer/-/vinyl-buffer-1.0.0.tgz", + "dependencies": { + "bl": { + "version": "0.9.5", + "from": "bl@>=0.9.1 <0.10.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "readable-stream@>=1.0.26 <1.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + } + } + }, + "through2": { + "version": "0.6.5", + "from": "through2@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "readable-stream@>=1.0.33-1 <1.1.0-0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <4.1.0-0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + }, + "vinyl-source-stream": { + "version": "1.1.0", + "from": "vinyl-source-stream@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.0.tgz", + "dependencies": { + "vinyl": { + "version": "0.4.6", + "from": "vinyl@>=0.4.3 <0.5.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "dependencies": { + "clone": { + "version": "0.2.0", + "from": "clone@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz" + }, + "clone-stats": { + "version": "0.0.1", + "from": "clone-stats@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" + } + } + }, + "through2": { + "version": "0.6.5", + "from": "through2@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "from": "readable-stream@>=1.0.33-1 <1.1.0-0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "0.0.1", + "from": "isarray@0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <4.1.0-0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + }, + "watchify": { + "version": "3.9.0", + "from": "watchify@>=3.8.0 <4.0.0", + "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz", + "dependencies": { + "anymatch": { + "version": "1.3.0", + "from": "anymatch@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", + "dependencies": { + "arrify": { + "version": "1.0.1", + "from": "arrify@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, + "micromatch": { + "version": "2.3.11", + "from": "micromatch@>=2.1.5 <3.0.0", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "from": "arr-diff@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "dependencies": { + "arr-flatten": { + "version": "1.0.1", + "from": "arr-flatten@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" + } + } + }, + "array-unique": { + "version": "0.2.1", + "from": "array-unique@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" + }, + "braces": { + "version": "1.8.5", + "from": "braces@>=1.8.2 <2.0.0", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "dependencies": { + "expand-range": { + "version": "1.8.2", + "from": "expand-range@>=1.8.1 <2.0.0", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "dependencies": { + "fill-range": { + "version": "2.2.3", + "from": "fill-range@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "dependencies": { + "is-number": { + "version": "2.1.0", + "from": "is-number@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" + }, + "isobject": { + "version": "2.1.0", + "from": "isobject@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "dependencies": { + "isarray": { + "version": "1.0.0", + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + } + } + }, + "randomatic": { + "version": "1.1.6", + "from": "randomatic@>=1.1.3 <2.0.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz" + }, + "repeat-string": { + "version": "1.6.1", + "from": "repeat-string@>=1.5.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" + } + } + } + } + }, + "preserve": { + "version": "0.2.0", + "from": "preserve@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" + }, + "repeat-element": { + "version": "1.1.2", + "from": "repeat-element@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "from": "expand-brackets@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "dependencies": { + "is-posix-bracket": { + "version": "0.1.1", + "from": "is-posix-bracket@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" + } + } + }, + "extglob": { + "version": "0.3.2", + "from": "extglob@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz" + }, + "filename-regex": { + "version": "2.0.0", + "from": "filename-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz" + }, + "is-extglob": { + "version": "1.0.0", + "from": "is-extglob@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + }, + "is-glob": { + "version": "2.0.1", + "from": "is-glob@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" + }, + "kind-of": { + "version": "3.1.0", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + } + } + }, + "normalize-path": { + "version": "2.0.1", + "from": "normalize-path@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" + }, + "object.omit": { + "version": "2.0.1", + "from": "object.omit@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "dependencies": { + "for-own": { + "version": "0.1.4", + "from": "for-own@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz", + "dependencies": { + "for-in": { + "version": "0.1.6", + "from": "for-in@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.6.tgz" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "from": "is-extendable@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + } + } + }, + "parse-glob": { + "version": "3.0.4", + "from": "parse-glob@>=3.0.4 <4.0.0", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "dependencies": { + "glob-base": { + "version": "0.3.0", + "from": "glob-base@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "dependencies": { + "glob-parent": { + "version": "2.0.0", + "from": "glob-parent@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + } + } + }, + "is-dotfile": { + "version": "1.0.2", + "from": "is-dotfile@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" + } + } + }, + "regex-cache": { + "version": "0.4.3", + "from": "regex-cache@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "dependencies": { + "is-equal-shallow": { + "version": "0.1.3", + "from": "is-equal-shallow@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + }, + "is-primitive": { + "version": "2.0.0", + "from": "is-primitive@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" + } + } + } + } + } + } + }, + "browserify": { + "version": "14.0.0", + "from": "browserify@>=14.0.0 <15.0.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.0.0.tgz", + "dependencies": { + "JSONStream": { + "version": "1.3.0", + "from": "JSONStream@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.0.tgz", + "dependencies": { + "jsonparse": { + "version": "1.3.0", + "from": "jsonparse@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.0.tgz" + }, + "through": { + "version": "2.3.8", + "from": "through@>=2.2.7 <3.0.0", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + } + } + }, + "assert": { + "version": "1.4.1", + "from": "assert@>=1.4.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz" + }, + "browser-pack": { + "version": "6.0.2", + "from": "browser-pack@>=6.0.1 <7.0.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", + "dependencies": { + "combine-source-map": { + "version": "0.7.2", + "from": "combine-source-map@>=0.7.1 <0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "from": "convert-source-map@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" + }, + "inline-source-map": { + "version": "0.6.2", + "from": "inline-source-map@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz" + }, + "lodash.memoize": { + "version": "3.0.4", + "from": "lodash.memoize@>=3.0.3 <3.1.0", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.3 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + }, + "umd": { + "version": "3.0.1", + "from": "umd@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz" + } + } + }, + "browser-resolve": { + "version": "1.11.2", + "from": "browser-resolve@>=1.11.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "dependencies": { + "resolve": { + "version": "1.1.7", + "from": "resolve@1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" + } + } + }, + "browserify-zlib": { + "version": "0.1.4", + "from": "browserify-zlib@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "dependencies": { + "pako": { + "version": "0.2.9", + "from": "pako@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz" + } + } + }, + "buffer": { + "version": "5.0.3", + "from": "buffer@>=5.0.2 <6.0.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.3.tgz", + "dependencies": { + "base64-js": { + "version": "1.2.0", + "from": "base64-js@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz" + }, + "ieee754": { + "version": "1.1.8", + "from": "ieee754@>=1.1.4 <2.0.0", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz" + } + } + }, + "cached-path-relative": { + "version": "1.0.0", + "from": "cached-path-relative@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.0.tgz" + }, + "concat-stream": { + "version": "1.5.2", + "from": "concat-stream@>=1.5.1 <1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "dependencies": { + "typedarray": { + "version": "0.0.6", + "from": "typedarray@>=0.0.5 <0.1.0", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + }, + "readable-stream": { + "version": "2.0.6", + "from": "readable-stream@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + } + }, + "console-browserify": { + "version": "1.1.0", + "from": "console-browserify@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "dependencies": { + "date-now": { + "version": "0.1.4", + "from": "date-now@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" + } + } + }, + "constants-browserify": { + "version": "1.0.0", + "from": "constants-browserify@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz" + }, + "crypto-browserify": { + "version": "3.11.0", + "from": "crypto-browserify@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", + "dependencies": { + "browserify-cipher": { + "version": "1.0.0", + "from": "browserify-cipher@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "dependencies": { + "browserify-aes": { + "version": "1.0.6", + "from": "browserify-aes@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "from": "buffer-xor@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + }, + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + } + } + }, + "browserify-des": { + "version": "1.0.0", + "from": "browserify-des@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "dependencies": { + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + }, + "des.js": { + "version": "1.0.0", + "from": "des.js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "dependencies": { + "minimalistic-assert": { + "version": "1.0.0", + "from": "minimalistic-assert@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" + } + } + } + } + }, + "evp_bytestokey": { + "version": "1.0.0", + "from": "evp_bytestokey@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" + } + } + }, + "browserify-sign": { + "version": "4.0.0", + "from": "browserify-sign@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.0.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.1 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "browserify-rsa": { + "version": "4.0.1", + "from": "browserify-rsa@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" + }, + "elliptic": { + "version": "6.3.2", + "from": "elliptic@>=6.0.0 <7.0.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", + "dependencies": { + "brorand": { + "version": "1.0.6", + "from": "brorand@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" + }, + "hash.js": { + "version": "1.0.3", + "from": "hash.js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" + } + } + }, + "parse-asn1": { + "version": "5.0.0", + "from": "parse-asn1@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", + "dependencies": { + "asn1.js": { + "version": "4.9.1", + "from": "asn1.js@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "dependencies": { + "minimalistic-assert": { + "version": "1.0.0", + "from": "minimalistic-assert@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" + } + } + }, + "browserify-aes": { + "version": "1.0.6", + "from": "browserify-aes@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "from": "buffer-xor@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + }, + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + } + } + }, + "evp_bytestokey": { + "version": "1.0.0", + "from": "evp_bytestokey@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" + } + } + } + } + }, + "create-ecdh": { + "version": "4.0.0", + "from": "create-ecdh@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "elliptic": { + "version": "6.3.2", + "from": "elliptic@>=6.0.0 <7.0.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz", + "dependencies": { + "brorand": { + "version": "1.0.6", + "from": "brorand@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" + }, + "hash.js": { + "version": "1.0.3", + "from": "hash.js@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz" + } + } + } + } + }, + "create-hash": { + "version": "1.1.2", + "from": "create-hash@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.2.tgz", + "dependencies": { + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + }, + "ripemd160": { + "version": "1.0.1", + "from": "ripemd160@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-1.0.1.tgz" + }, + "sha.js": { + "version": "2.4.8", + "from": "sha.js@>=2.3.6 <3.0.0", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz" + } + } + }, + "create-hmac": { + "version": "1.1.4", + "from": "create-hmac@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.4.tgz" + }, + "diffie-hellman": { + "version": "5.0.2", + "from": "diffie-hellman@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "miller-rabin": { + "version": "4.0.0", + "from": "miller-rabin@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", + "dependencies": { + "brorand": { + "version": "1.0.6", + "from": "brorand@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.0.6.tgz" + } + } + } + } + }, + "pbkdf2": { + "version": "3.0.9", + "from": "pbkdf2@>=3.0.3 <4.0.0", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.9.tgz" + }, + "public-encrypt": { + "version": "4.0.0", + "from": "public-encrypt@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "from": "bn.js@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + }, + "browserify-rsa": { + "version": "4.0.1", + "from": "browserify-rsa@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz" + }, + "parse-asn1": { + "version": "5.0.0", + "from": "parse-asn1@>=5.0.0 <6.0.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.0.0.tgz", + "dependencies": { + "asn1.js": { + "version": "4.9.1", + "from": "asn1.js@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "dependencies": { + "minimalistic-assert": { + "version": "1.0.0", + "from": "minimalistic-assert@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz" + } + } + }, + "browserify-aes": { + "version": "1.0.6", + "from": "browserify-aes@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", + "dependencies": { + "buffer-xor": { + "version": "1.0.3", + "from": "buffer-xor@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + }, + "cipher-base": { + "version": "1.0.3", + "from": "cipher-base@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz" + } + } + }, + "evp_bytestokey": { + "version": "1.0.0", + "from": "evp_bytestokey@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz" + } + } + } + } + }, + "randombytes": { + "version": "2.0.3", + "from": "randombytes@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.3.tgz" + } + } + }, + "deps-sort": { + "version": "2.0.0", + "from": "deps-sort@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz" + }, + "domain-browser": { + "version": "1.1.7", + "from": "domain-browser@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz" + }, + "duplexer2": { + "version": "0.1.4", + "from": "duplexer2@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz" + }, + "events": { + "version": "1.1.1", + "from": "events@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz" + }, + "has": { + "version": "1.0.1", + "from": "has@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "dependencies": { + "function-bind": { + "version": "1.1.0", + "from": "function-bind@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + } + } + }, + "htmlescape": { + "version": "1.1.1", + "from": "htmlescape@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz" + }, + "https-browserify": { + "version": "0.0.1", + "from": "https-browserify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "insert-module-globals": { + "version": "7.0.1", + "from": "insert-module-globals@>=7.0.0 <8.0.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "dependencies": { + "combine-source-map": { + "version": "0.7.2", + "from": "combine-source-map@>=0.7.1 <0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "from": "convert-source-map@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz" + }, + "inline-source-map": { + "version": "0.6.2", + "from": "inline-source-map@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz" + }, + "lodash.memoize": { + "version": "3.0.4", + "from": "lodash.memoize@>=3.0.3 <3.1.0", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.3 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + }, + "is-buffer": { + "version": "1.1.4", + "from": "is-buffer@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz" + }, + "lexical-scope": { + "version": "1.2.0", + "from": "lexical-scope@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "dependencies": { + "astw": { + "version": "2.0.0", + "from": "astw@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.0.0.tgz", + "dependencies": { + "acorn": { + "version": "1.2.2", + "from": "acorn@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz" + } + } + } + } + } + } + }, + "labeled-stream-splicer": { + "version": "2.0.0", + "from": "labeled-stream-splicer@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "dependencies": { + "isarray": { + "version": "0.0.1", + "from": "isarray@>=0.0.1 <0.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "stream-splicer": { + "version": "2.0.0", + "from": "stream-splicer@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz" + } + } + }, + "module-deps": { + "version": "4.0.8", + "from": "module-deps@>=4.0.8 <5.0.0", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.0.8.tgz", + "dependencies": { + "detective": { + "version": "4.3.2", + "from": "detective@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.3.2.tgz", + "dependencies": { + "acorn": { + "version": "3.3.0", + "from": "acorn@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" + } + } + }, + "stream-combiner2": { + "version": "1.1.1", + "from": "stream-combiner2@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz" + } + } + }, + "os-browserify": { + "version": "0.1.2", + "from": "os-browserify@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz" + }, + "parents": { + "version": "1.0.1", + "from": "parents@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "dependencies": { + "path-platform": { + "version": "0.11.15", + "from": "path-platform@>=0.11.15 <0.12.0", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz" + } + } + }, + "path-browserify": { + "version": "0.0.0", + "from": "path-browserify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" + }, + "process": { + "version": "0.11.9", + "from": "process@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.9.tgz" + }, + "punycode": { + "version": "1.4.1", + "from": "punycode@>=1.3.2 <2.0.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + }, + "querystring-es3": { + "version": "0.2.1", + "from": "querystring-es3@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" + }, + "read-only-stream": { + "version": "2.0.0", + "from": "read-only-stream@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz" + }, + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "resolve": { + "version": "1.2.0", + "from": "resolve@>=1.1.4 <2.0.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.2.0.tgz" + }, + "shasum": { + "version": "1.0.2", + "from": "shasum@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "from": "json-stable-stringify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + } + } + }, + "sha.js": { + "version": "2.4.8", + "from": "sha.js@>=2.4.4 <2.5.0", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz" + } + } + }, + "shell-quote": { + "version": "1.6.1", + "from": "shell-quote@>=1.6.1 <2.0.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + }, + "array-filter": { + "version": "0.0.1", + "from": "array-filter@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz" + }, + "array-reduce": { + "version": "0.0.0", + "from": "array-reduce@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz" + }, + "array-map": { + "version": "0.0.0", + "from": "array-map@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz" + } + } + }, + "stream-browserify": { + "version": "2.0.1", + "from": "stream-browserify@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz" + }, + "stream-http": { + "version": "2.6.3", + "from": "stream-http@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.6.3.tgz", + "dependencies": { + "builtin-status-codes": { + "version": "3.0.0", + "from": "builtin-status-codes@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz" + }, + "to-arraybuffer": { + "version": "1.0.1", + "from": "to-arraybuffer@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz" + } + } + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "subarg": { + "version": "1.0.0", + "from": "subarg@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz" + }, + "syntax-error": { + "version": "1.1.6", + "from": "syntax-error@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.1.6.tgz", + "dependencies": { + "acorn": { + "version": "2.7.0", + "from": "acorn@>=2.7.0 <3.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz" + } + } + }, + "timers-browserify": { + "version": "1.4.2", + "from": "timers-browserify@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz" + }, + "tty-browserify": { + "version": "0.0.0", + "from": "tty-browserify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" + }, + "url": { + "version": "0.11.0", + "from": "url@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "dependencies": { + "punycode": { + "version": "1.3.2", + "from": "punycode@1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + }, + "querystring": { + "version": "0.2.0", + "from": "querystring@0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + } + } + }, + "util": { + "version": "0.10.3", + "from": "util@>=0.10.1 <0.11.0", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "dependencies": { + "inherits": { + "version": "2.0.1", + "from": "inherits@2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + } + } + }, + "vm-browserify": { + "version": "0.0.4", + "from": "vm-browserify@>=0.0.1 <0.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "dependencies": { + "indexof": { + "version": "0.0.1", + "from": "indexof@0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" + } + } + } + } + }, + "chokidar": { + "version": "1.6.1", + "from": "chokidar@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.1.tgz", + "dependencies": { + "async-each": { + "version": "1.0.1", + "from": "async-each@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz" + }, + "glob-parent": { + "version": "2.0.0", + "from": "glob-parent@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "is-binary-path": { + "version": "1.0.1", + "from": "is-binary-path@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "dependencies": { + "binary-extensions": { + "version": "1.8.0", + "from": "binary-extensions@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz" + } + } + }, + "is-glob": { + "version": "2.0.1", + "from": "is-glob@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "from": "is-extglob@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "readdirp": { + "version": "2.1.0", + "from": "readdirp@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "from": "set-immediate-shim@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" + } + } + }, + "fsevents": { + "version": "1.0.17", + "from": "fsevents@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.0.17.tgz", + "dependencies": { + "nan": { + "version": "2.5.1", + "from": "nan@>=2.3.0 <3.0.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz" + }, + "node-pre-gyp": { + "version": "0.6.32", + "from": "node-pre-gyp@>=0.6.29 <0.7.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz" + }, + "abbrev": { + "version": "1.0.9", + "from": "abbrev@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz" + }, + "ansi-regex": { + "version": "2.0.0", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" + }, + "ansi-styles": { + "version": "2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + }, + "aproba": { + "version": "1.0.4", + "from": "aproba@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz" + }, + "are-we-there-yet": { + "version": "1.1.2", + "from": "are-we-there-yet@>=1.1.2 <1.2.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz" + }, + "asn1": { + "version": "0.2.3", + "from": "asn1@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz" + }, + "assert-plus": { + "version": "0.2.0", + "from": "assert-plus@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" + }, + "asynckit": { + "version": "0.4.0", + "from": "asynckit@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + }, + "aws-sign2": { + "version": "0.6.0", + "from": "aws-sign2@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" + }, + "aws4": { + "version": "1.5.0", + "from": "aws4@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz" + }, + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "bcrypt-pbkdf": { + "version": "1.0.0", + "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz" + }, + "block-stream": { + "version": "0.0.9", + "from": "block-stream@*", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" + }, + "boom": { + "version": "2.10.1", + "from": "boom@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" + }, + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + }, + "buffer-shims": { + "version": "1.0.0", + "from": "buffer-shims@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" + }, + "caseless": { + "version": "0.11.0", + "from": "caseless@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" + }, + "code-point-at": { + "version": "1.1.0", + "from": "code-point-at@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" + }, + "combined-stream": { + "version": "1.0.5", + "from": "combined-stream@>=1.0.5 <1.1.0", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "commander": { + "version": "2.9.0", + "from": "commander@>=2.9.0 <3.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" + }, + "console-control-strings": { + "version": "1.1.0", + "from": "console-control-strings@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "cryptiles": { + "version": "2.0.5", + "from": "cryptiles@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" + }, + "debug": { + "version": "2.2.0", + "from": "debug@>=2.2.0 <2.3.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz" + }, + "deep-extend": { + "version": "0.4.1", + "from": "deep-extend@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz" + }, + "delayed-stream": { + "version": "1.0.0", + "from": "delayed-stream@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + }, + "delegates": { + "version": "1.0.0", + "from": "delegates@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" + }, + "ecc-jsbn": { + "version": "0.1.1", + "from": "ecc-jsbn@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz" + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + }, + "extend": { + "version": "3.0.0", + "from": "extend@>=3.0.0 <3.1.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" + }, + "extsprintf": { + "version": "1.0.2", + "from": "extsprintf@1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz" + }, + "forever-agent": { + "version": "0.6.1", + "from": "forever-agent@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + }, + "form-data": { + "version": "2.1.2", + "from": "form-data@>=2.1.1 <2.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz" + }, + "fs.realpath": { + "version": "1.0.0", + "from": "fs.realpath@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "fstream": { + "version": "1.0.10", + "from": "fstream@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz" + }, + "fstream-ignore": { + "version": "1.0.5", + "from": "fstream-ignore@>=1.0.5 <1.1.0", + "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz" + }, + "gauge": { + "version": "2.7.2", + "from": "gauge@>=2.7.1 <2.8.0", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.2.tgz" + }, + "generate-function": { + "version": "2.0.0", + "from": "generate-function@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" + }, + "generate-object-property": { + "version": "1.2.0", + "from": "generate-object-property@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" + }, + "glob": { + "version": "7.1.1", + "from": "glob@>=7.0.5 <8.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz" + }, + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + }, + "har-validator": { + "version": "2.0.6", + "from": "har-validator@>=2.0.6 <2.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz" + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" + }, + "has-unicode": { + "version": "2.0.1", + "from": "has-unicode@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" + }, + "hawk": { + "version": "3.1.3", + "from": "hawk@>=3.1.3 <3.2.0", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz" + }, + "hoek": { + "version": "2.16.3", + "from": "hoek@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + }, + "http-signature": { + "version": "1.1.1", + "from": "http-signature@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz" + }, + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "ini": { + "version": "1.3.4", + "from": "ini@>=1.3.0 <1.4.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" + }, + "is-my-json-valid": { + "version": "2.15.0", + "from": "is-my-json-valid@>=2.12.4 <3.0.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" + }, + "is-property": { + "version": "1.0.2", + "from": "is-property@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + }, + "is-typedarray": { + "version": "1.0.0", + "from": "is-typedarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "isstream": { + "version": "0.1.2", + "from": "isstream@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, + "jodid25519": { + "version": "1.0.2", + "from": "jodid25519@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz" + }, + "jsbn": { + "version": "0.1.0", + "from": "jsbn@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz" + }, + "json-schema": { + "version": "0.2.3", + "from": "json-schema@0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" + }, + "json-stringify-safe": { + "version": "5.0.1", + "from": "json-stringify-safe@>=5.0.1 <5.1.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "jsonpointer": { + "version": "4.0.1", + "from": "jsonpointer@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz" + }, + "jsprim": { + "version": "1.3.1", + "from": "jsprim@>=1.2.2 <2.0.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz" + }, + "mime-db": { + "version": "1.25.0", + "from": "mime-db@>=1.25.0 <1.26.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.25.0.tgz" + }, + "mime-types": { + "version": "2.1.13", + "from": "mime-types@>=2.1.7 <2.2.0", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.13.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" + }, + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "mkdirp": { + "version": "0.5.1", + "from": "mkdirp@>=0.5.1 <0.6.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "ms": { + "version": "0.7.1", + "from": "ms@0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + }, + "nopt": { + "version": "3.0.6", + "from": "nopt@>=3.0.6 <3.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" + }, + "npmlog": { + "version": "4.0.2", + "from": "npmlog@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz" + }, + "number-is-nan": { + "version": "1.0.1", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + }, + "oauth-sign": { + "version": "0.8.2", + "from": "oauth-sign@>=0.8.1 <0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" + }, + "object-assign": { + "version": "4.1.0", + "from": "object-assign@>=4.1.0 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz" + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "pinkie": { + "version": "2.0.4", + "from": "pinkie@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "pinkie-promise@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" + }, + "punycode": { + "version": "1.4.1", + "from": "punycode@>=1.4.1 <2.0.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + }, + "qs": { + "version": "6.3.0", + "from": "qs@>=6.3.0 <6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz" + }, + "readable-stream": { + "version": "2.2.2", + "from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz" + }, + "request": { + "version": "2.79.0", + "from": "request@>=2.79.0 <3.0.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "rimraf@>=2.5.4 <2.6.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + }, + "semver": { + "version": "5.3.0", + "from": "semver@>=5.3.0 <5.4.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "set-blocking": { + "version": "2.0.0", + "from": "set-blocking@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + }, + "signal-exit": { + "version": "3.0.2", + "from": "signal-exit@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" + }, + "sntp": { + "version": "1.0.9", + "from": "sntp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" + }, + "string-width": { + "version": "1.0.2", + "from": "string-width@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "stringstream": { + "version": "0.0.5", + "from": "stringstream@>=0.0.4 <0.1.0", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" + }, + "strip-json-comments": { + "version": "1.0.4", + "from": "strip-json-comments@>=1.0.4 <1.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.1 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" + }, + "supports-color": { + "version": "0.2.0", + "from": "supports-color@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz" + }, + "tough-cookie": { + "version": "2.3.2", + "from": "tough-cookie@>=2.3.0 <2.4.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz" + }, + "tar": { + "version": "2.2.1", + "from": "tar@>=2.2.1 <2.3.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" + }, + "tunnel-agent": { + "version": "0.4.3", + "from": "tunnel-agent@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" + }, + "tweetnacl": { + "version": "0.14.5", + "from": "tweetnacl@>=0.14.0 <0.15.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" + }, + "uid-number": { + "version": "0.0.6", + "from": "uid-number@>=0.0.6 <0.1.0", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + }, + "uuid": { + "version": "3.0.1", + "from": "uuid@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" + }, + "verror": { + "version": "1.3.6", + "from": "verror@1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz" + }, + "wide-align": { + "version": "1.1.0", + "from": "wide-align@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" + }, + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "dashdash": { + "version": "1.14.1", + "from": "dashdash@>=1.12.0 <2.0.0", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "chalk": { + "version": "1.1.3", + "from": "chalk@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "dependencies": { + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "rc": { + "version": "1.1.6", + "from": "rc@>=1.1.6 <1.2.0", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz", + "dependencies": { + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + } + } + }, + "getpass": { + "version": "0.1.6", + "from": "getpass@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "sshpk": { + "version": "1.10.1", + "from": "sshpk@>=1.7.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "tar-pack": { + "version": "3.3.0", + "from": "tar-pack@>=3.3.0 <3.4.0", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz", + "dependencies": { + "once": { + "version": "1.3.3", + "from": "once@>=1.3.3 <1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" + }, + "readable-stream": { + "version": "2.1.5", + "from": "readable-stream@>=2.1.4 <2.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz" + } + } + } + } + } + } + }, + "defined": { + "version": "1.0.0", + "from": "defined@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + }, + "outpipe": { + "version": "1.1.1", + "from": "outpipe@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", + "dependencies": { + "shell-quote": { + "version": "1.6.1", + "from": "shell-quote@>=1.4.2 <2.0.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "dependencies": { + "jsonify": { + "version": "0.0.0", + "from": "jsonify@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + }, + "array-filter": { + "version": "0.0.1", + "from": "array-filter@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz" + }, + "array-reduce": { + "version": "0.0.0", + "from": "array-reduce@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz" + }, + "array-map": { + "version": "0.0.0", + "from": "array-map@>=0.0.0 <0.1.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz" + } + } + } + } + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + } + } + }, + "jibo-keyframes": { + "version": "2.5.3", + "from": "jibo-keyframes@beta", + "resolved": "https://registry.npmjs.org/jibo-keyframes/-/jibo-keyframes-2.5.3.tgz", + "dependencies": { + "color-space": { + "version": "1.1.2", + "from": "color-space@1.1.2", + "resolved": "https://registry.npmjs.org/color-space/-/color-space-1.1.2.tgz", + "dependencies": { + "husl": { + "version": "6.0.6", + "from": "husl@>=5.0.0", + "resolved": "https://registry.npmjs.org/husl/-/husl-6.0.6.tgz" + } + } + }, + "eases": { + "version": "1.0.8", + "from": "eases@>=1.0.6 <2.0.0", + "resolved": "https://registry.npmjs.org/eases/-/eases-1.0.8.tgz" + }, + "semver": { + "version": "5.3.0", + "from": "semver@>=5.0.3 <6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" + }, + "uuid": { + "version": "2.0.3", + "from": "uuid@>=2.0.1 <3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz" + } + } + }, + "jquery": { + "version": "2.2.4", + "from": "jquery@>=2.1.3 <3.0.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz" + }, + "jsonschema": { + "version": "1.1.1", + "from": "jsonschema@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz" + }, + "lodash": { + "version": "3.10.1", + "from": "lodash@>=3.7.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz" + }, + "loophole": { + "version": "1.1.0", + "from": "loophole@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/loophole/-/loophole-1.1.0.tgz" + }, + "marked": { + "version": "0.3.6", + "from": "marked@>=0.3.5 <0.4.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz" + }, + "mkdirp": { + "version": "0.5.1", + "from": "mkdirp@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "dependencies": { + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + }, + "node-pid-controller": { + "version": "0.1.2", + "from": "node-pid-controller@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/node-pid-controller/-/node-pid-controller-0.1.2.tgz" + }, + "node-uuid": { + "version": "1.4.7", + "from": "node-uuid@>=1.4.7 <2.0.0", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" + }, + "normalize-path": { + "version": "1.0.0", + "from": "normalize-path@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz" + }, + "parser-download": { + "version": "2.2.2", + "from": "parser-download@beta", + "resolved": "https://registry.npmjs.org/parser-download/-/parser-download-2.2.2.tgz", + "dependencies": { + "chalk": { + "version": "1.1.3", + "from": "chalk@>=1.1.3 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "extract-zip": { + "version": "1.6.0", + "from": "extract-zip@>=1.5.0 <2.0.0", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.0.tgz", + "dependencies": { + "concat-stream": { + "version": "1.5.0", + "from": "concat-stream@1.5.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz", + "dependencies": { + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.1 <2.1.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "typedarray": { + "version": "0.0.6", + "from": "typedarray@>=0.0.5 <0.1.0", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" + }, + "readable-stream": { + "version": "2.0.6", + "from": "readable-stream@>=2.0.0 <2.1.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "isarray": { + "version": "1.0.0", + "from": "isarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "process-nextick-args": { + "version": "1.0.7", + "from": "process-nextick-args@>=1.0.6 <1.1.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" + }, + "string_decoder": { + "version": "0.10.31", + "from": "string_decoder@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "util-deprecate": { + "version": "1.0.2", + "from": "util-deprecate@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + } + } + } + } + }, + "debug": { + "version": "0.7.4", + "from": "debug@0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz" + }, + "mkdirp": { + "version": "0.5.0", + "from": "mkdirp@0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "dependencies": { + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + } + } + }, + "yauzl": { + "version": "2.4.1", + "from": "yauzl@2.4.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "dependencies": { + "fd-slicer": { + "version": "1.0.1", + "from": "fd-slicer@>=1.0.1 <1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "dependencies": { + "pend": { + "version": "1.2.0", + "from": "pend@>=1.2.0 <1.3.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz" + } + } + } + } + } + } + }, + "fs-extra": { + "version": "0.30.0", + "from": "fs-extra@>=0.30.0 <0.31.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "jsonfile": { + "version": "2.4.0", + "from": "jsonfile@>=2.1.0 <3.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz" + }, + "klaw": { + "version": "1.3.1", + "from": "klaw@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "rimraf": { + "version": "2.5.4", + "from": "rimraf@>=2.2.8 <3.0.0", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + } + } + }, + "minimist": { + "version": "1.2.0", + "from": "minimist@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" + } + } + }, + "pixi-animate": { + "version": "1.3.1", + "from": "pixi-animate@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/pixi-animate/-/pixi-animate-1.3.1.tgz" + }, + "pixi.js": { + "version": "4.3.4", + "from": "pixi.js@>=4.3.3 <5.0.0", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-4.3.4.tgz", + "dependencies": { + "bit-twiddle": { + "version": "1.0.2", + "from": "bit-twiddle@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz" + }, + "earcut": { + "version": "2.1.1", + "from": "earcut@>=2.0.7 <3.0.0", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.1.1.tgz" + }, + "eventemitter3": { + "version": "2.0.2", + "from": "eventemitter3@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.2.tgz" + }, + "ismobilejs": { + "version": "0.4.0", + "from": "ismobilejs@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-0.4.0.tgz" + }, + "object-assign": { + "version": "4.1.1", + "from": "object-assign@>=4.0.1 <5.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + }, + "pixi-gl-core": { + "version": "1.1.0", + "from": "pixi-gl-core@>=1.0.3 <2.0.0", + "resolved": "https://registry.npmjs.org/pixi-gl-core/-/pixi-gl-core-1.1.0.tgz" + }, + "resource-loader": { + "version": "2.0.4", + "from": "resource-loader@>=2.0.4 <3.0.0", + "resolved": "https://registry.npmjs.org/resource-loader/-/resource-loader-2.0.4.tgz", + "dependencies": { + "mini-signals": { + "version": "1.1.1", + "from": "mini-signals@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.1.1.tgz" + }, + "parse-uri": { + "version": "1.0.0", + "from": "parse-uri@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.0.tgz" + } + } + } + } + }, + "react": { + "version": "0.13.3", + "from": "react@>=0.13.3 <0.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-0.13.3.tgz", + "dependencies": { + "envify": { + "version": "3.4.1", + "from": "envify@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", + "dependencies": { + "through": { + "version": "2.3.8", + "from": "through@>=2.3.4 <2.4.0", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + }, + "jstransform": { + "version": "11.0.3", + "from": "jstransform@>=11.0.3 <12.0.0", + "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", + "dependencies": { + "base62": { + "version": "1.1.2", + "from": "base62@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/base62/-/base62-1.1.2.tgz" + }, + "commoner": { + "version": "0.10.8", + "from": "commoner@>=0.10.3 <0.11.0", + "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", + "dependencies": { + "commander": { + "version": "2.9.0", + "from": "commander@>=2.5.0 <3.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + } + } + }, + "detective": { + "version": "4.3.2", + "from": "detective@>=4.3.1 <5.0.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.3.2.tgz", + "dependencies": { + "acorn": { + "version": "3.3.0", + "from": "acorn@>=3.1.0 <4.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz" + }, + "defined": { + "version": "1.0.0", + "from": "defined@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" + } + } + }, + "glob": { + "version": "5.0.15", + "from": "glob@>=5.0.15 <6.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "dependencies": { + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "minimatch": { + "version": "3.0.3", + "from": "minimatch@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + } + } + } + } + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "from": "graceful-fs@>=4.1.2 <5.0.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" + }, + "iconv-lite": { + "version": "0.4.15", + "from": "iconv-lite@>=0.4.5 <0.5.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz" + }, + "private": { + "version": "0.1.6", + "from": "private@>=0.1.6 <0.2.0", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" + }, + "q": { + "version": "1.4.1", + "from": "q@>=1.1.2 <2.0.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz" + }, + "recast": { + "version": "0.11.20", + "from": "recast@>=0.11.17 <0.12.0", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.20.tgz", + "dependencies": { + "ast-types": { + "version": "0.9.4", + "from": "ast-types@0.9.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.4.tgz" + }, + "esprima": { + "version": "3.1.3", + "from": "esprima@>=3.1.0 <3.2.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz" + }, + "source-map": { + "version": "0.5.6", + "from": "source-map@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" + } + } + } + } + }, + "esprima-fb": { + "version": "15001.1.0-dev-harmony-fb", + "from": "esprima-fb@>=15001.1.0-dev-harmony-fb <15002.0.0", + "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz" + }, + "object-assign": { + "version": "2.1.1", + "from": "object-assign@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz" + }, + "source-map": { + "version": "0.4.4", + "from": "source-map@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "dependencies": { + "amdefine": { + "version": "1.0.1", + "from": "amdefine@>=0.0.4", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" + } + } + } + } + } + } + } + } + }, + "region": { + "version": "2.1.2", + "from": "region@>=2.1.2 <3.0.0", + "resolved": "https://registry.npmjs.org/region/-/region-2.1.2.tgz", + "dependencies": { + "hasown": { + "version": "1.0.1", + "from": "hasown@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-1.0.1.tgz" + }, + "newify": { + "version": "1.1.9", + "from": "newify@>=1.1.9 <2.0.0", + "resolved": "https://registry.npmjs.org/newify/-/newify-1.1.9.tgz" + }, + "object-assign": { + "version": "2.1.1", + "from": "object-assign@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz" + } + } + }, + "request": { + "version": "2.79.0", + "from": "request@>=2.79.0 <3.0.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "dependencies": { + "aws-sign2": { + "version": "0.6.0", + "from": "aws-sign2@>=0.6.0 <0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" + }, + "aws4": { + "version": "1.5.0", + "from": "aws4@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz" + }, + "caseless": { + "version": "0.11.0", + "from": "caseless@>=0.11.0 <0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" + }, + "combined-stream": { + "version": "1.0.5", + "from": "combined-stream@>=1.0.5 <1.1.0", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "dependencies": { + "delayed-stream": { + "version": "1.0.0", + "from": "delayed-stream@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + } + } + }, + "extend": { + "version": "3.0.0", + "from": "extend@>=3.0.0 <3.1.0", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" + }, + "forever-agent": { + "version": "0.6.1", + "from": "forever-agent@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + }, + "form-data": { + "version": "2.1.2", + "from": "form-data@>=2.1.1 <2.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", + "dependencies": { + "asynckit": { + "version": "0.4.0", + "from": "asynckit@>=0.4.0 <0.5.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + } + } + }, + "har-validator": { + "version": "2.0.6", + "from": "har-validator@>=2.0.6 <2.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "dependencies": { + "chalk": { + "version": "1.1.3", + "from": "chalk@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + }, + "has-ansi": { + "version": "2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + } + } + }, + "supports-color": { + "version": "2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + } + } + }, + "commander": { + "version": "2.9.0", + "from": "commander@>=2.9.0 <3.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + } + } + }, + "is-my-json-valid": { + "version": "2.15.0", + "from": "is-my-json-valid@>=2.12.4 <3.0.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", + "dependencies": { + "generate-function": { + "version": "2.0.0", + "from": "generate-function@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" + }, + "generate-object-property": { + "version": "1.2.0", + "from": "generate-object-property@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "dependencies": { + "is-property": { + "version": "1.0.2", + "from": "is-property@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" + } + } + }, + "jsonpointer": { + "version": "4.0.1", + "from": "jsonpointer@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz" + }, + "xtend": { + "version": "4.0.1", + "from": "xtend@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + } + } + }, + "pinkie-promise": { + "version": "2.0.1", + "from": "pinkie-promise@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "dependencies": { + "pinkie": { + "version": "2.0.4", + "from": "pinkie@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" + } + } + } + } + }, + "hawk": { + "version": "3.1.3", + "from": "hawk@>=3.1.3 <3.2.0", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "dependencies": { + "hoek": { + "version": "2.16.3", + "from": "hoek@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" + }, + "boom": { + "version": "2.10.1", + "from": "boom@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" + }, + "cryptiles": { + "version": "2.0.5", + "from": "cryptiles@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" + }, + "sntp": { + "version": "1.0.9", + "from": "sntp@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" + } + } + }, + "http-signature": { + "version": "1.1.1", + "from": "http-signature@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "from": "assert-plus@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" + }, + "jsprim": { + "version": "1.3.1", + "from": "jsprim@>=1.2.2 <2.0.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", + "dependencies": { + "extsprintf": { + "version": "1.0.2", + "from": "extsprintf@1.0.2", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz" + }, + "json-schema": { + "version": "0.2.3", + "from": "json-schema@0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" + }, + "verror": { + "version": "1.3.6", + "from": "verror@1.3.6", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz" + } + } + }, + "sshpk": { + "version": "1.10.2", + "from": "sshpk@>=1.7.0 <2.0.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz", + "dependencies": { + "asn1": { + "version": "0.2.3", + "from": "asn1@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz" + }, + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + }, + "dashdash": { + "version": "1.14.1", + "from": "dashdash@>=1.12.0 <2.0.0", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" + }, + "getpass": { + "version": "0.1.6", + "from": "getpass@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz" + }, + "jsbn": { + "version": "0.1.0", + "from": "jsbn@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz" + }, + "tweetnacl": { + "version": "0.14.5", + "from": "tweetnacl@>=0.14.0 <0.15.0", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" + }, + "jodid25519": { + "version": "1.0.2", + "from": "jodid25519@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz" + }, + "ecc-jsbn": { + "version": "0.1.1", + "from": "ecc-jsbn@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz" + } + } + } + } + }, + "is-typedarray": { + "version": "1.0.0", + "from": "is-typedarray@>=1.0.0 <1.1.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" + }, + "isstream": { + "version": "0.1.2", + "from": "isstream@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, + "json-stringify-safe": { + "version": "5.0.1", + "from": "json-stringify-safe@>=5.0.1 <5.1.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "mime-types": { + "version": "2.1.14", + "from": "mime-types@>=2.1.7 <2.2.0", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", + "dependencies": { + "mime-db": { + "version": "1.26.0", + "from": "mime-db@>=1.26.0 <1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz" + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "from": "oauth-sign@>=0.8.1 <0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" + }, + "qs": { + "version": "6.3.0", + "from": "qs@>=6.3.0 <6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz" + }, + "stringstream": { + "version": "0.0.5", + "from": "stringstream@>=0.0.4 <0.1.0", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" + }, + "tough-cookie": { + "version": "2.3.2", + "from": "tough-cookie@>=2.3.0 <2.4.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "dependencies": { + "punycode": { + "version": "1.4.1", + "from": "punycode@>=1.4.1 <2.0.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + } + } + }, + "tunnel-agent": { + "version": "0.4.3", + "from": "tunnel-agent@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" + }, + "uuid": { + "version": "3.0.1", + "from": "uuid@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" + } + } + }, + "slash": { + "version": "1.0.0", + "from": "slash@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz" + }, + "tinycolor2": { + "version": "1.4.1", + "from": "tinycolor2@>=1.1.1 <2.0.0", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz" + }, + "underscore-plus": { + "version": "1.6.6", + "from": "underscore-plus@>=1.6.6 <2.0.0", + "resolved": "https://registry.npmjs.org/underscore-plus/-/underscore-plus-1.6.6.tgz", + "dependencies": { + "underscore": { + "version": "1.6.0", + "from": "underscore@>=1.6.0 <1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" + } + } + }, + "url-parse-as-address": { + "version": "1.0.0", + "from": "url-parse-as-address@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/url-parse-as-address/-/url-parse-as-address-1.0.0.tgz" + } + } +} diff --git a/node_modules/jibo-sdk/package.json b/node_modules/jibo-sdk/package.json new file mode 100644 index 0000000..cee41c7 --- /dev/null +++ b/node_modules/jibo-sdk/package.json @@ -0,0 +1,52 @@ +{ + "name": "jibo-sdk", + "main": "./lib/jibo-sdk.js", + "version": "3.9.10", + "description": "Jibo's SDK plugin for Atom", + "engines": { + "atom": ">=1.12.0" + }, + "dependencies": { + "animation-utilities": "beta", + "async": "^1.0.0", + "atom-space-pen-views": "^2.0.5", + "behaviorify": "^1.0.0", + "clamp": "^1.0.1", + "color-space": "^1.2.1", + "color-string": "^0.3.0", + "deep-diff": "^0.3.3", + "drag-helper": "^1.2.3", + "find-root": "^1.0.0", + "glob": "^7.1.1", + "isbinaryfile": "3.0.2", + "jibo": "beta", + "jibo-anim-db": "beta", + "jibo-analytics": "^0.1.5", + "jibo-cli": "beta", + "jibo-dev": "beta", + "jibo-keyframes": "beta", + "jquery": "^2.1.3", + "jsonschema": "^1.0.2", + "lodash": "^3.7.0", + "loophole": "^1.1.0", + "marked": "^0.3.5", + "mkdirp": "^0.5.0", + "pixi-animate": "^1.1.0", + "node-pid-controller": "^0.1.1", + "node-uuid": "^1.4.7", + "normalize-path": "^1.0.0", + "parser-download": "beta", + "react": "^0.13.3", + "region": "^2.1.2", + "request": "^2.79.0", + "slash": "^1.0.0", + "tinycolor2": "^1.1.1", + "underscore-plus": "^1.6.6", + "url-parse-as-address": "^1.0.0" + }, + "scripts": { + "postinstall": "parser-download -r -f -v 2.4.0 -t 49" + }, + "license": "SEE LICENSE IN LICENSE.txt", + "author": "Jibo, Inc. " +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/parser/build/Release/.deps/Release/jsjibonlu.node.d b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/jsjibonlu.node.d new file mode 100644 index 0000000..0fe60b5 --- /dev/null +++ b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/jsjibonlu.node.d @@ -0,0 +1 @@ +cmd_Release/jsjibonlu.node := c++ -bundle -stdlib=libc++ -undefined dynamic_lookup -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -o Release/jsjibonlu.node Release/obj.target/jsjibonlu/src/jsjibonluapi.o Release/obj.target/jsjibonlu/src/js_fst.o Release/obj.target/jsjibonlu/src/js_sentence_parser.o Release/obj.target/jsjibonlu/src/js_sentence_generator.o Release/obj.target/jsjibonlu/src/v8_engine.o -L../deps/darwin/x64/lib -ljibonlu -lfst -lPocoJSON -lPocoFoundation -lPocoUtil -lPocoXML diff --git a/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_fst.o.d b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_fst.o.d new file mode 100644 index 0000000..26a00e7 --- /dev/null +++ b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_fst.o.d @@ -0,0 +1,32 @@ +cmd_Release/obj.target/jsjibonlu/src/js_fst.o := c++ '-DNODE_GYP_MODULE_NAME=jsjibonlu' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rprieto/.node-gyp/iojs-1.3.0/include/node -I/Users/rprieto/.node-gyp/iojs-1.3.0/src -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/uv/include -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include -I../deps/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=c++11 -stdlib=libc++ -fexceptions -MMD -MF ./Release/.deps/Release/obj.target/jsjibonlu/src/js_fst.o.d.raw -c -o Release/obj.target/jsjibonlu/src/js_fst.o ../src/js_fst.cpp +Release/obj.target/jsjibonlu/src/js_fst.o: ../src/js_fst.cpp \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_buffer.h \ + ../deps/include/jibonluapi/jibonluapi.h \ + ../deps/include/jibonluapi/stats.h \ + ../deps/include/jibonluapi/parameters.h \ + ../deps/include/jibonluapi/error_handling.h \ + ../deps/include/jibonluapi/exceptions.h ../src/js_error_handling.h \ + ../src/js_fst.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h \ + ../src/iojs_now_macros.h +../src/js_fst.cpp: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_buffer.h: +../deps/include/jibonluapi/jibonluapi.h: +../deps/include/jibonluapi/stats.h: +../deps/include/jibonluapi/parameters.h: +../deps/include/jibonluapi/error_handling.h: +../deps/include/jibonluapi/exceptions.h: +../src/js_error_handling.h: +../src/js_fst.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h: +../src/iojs_now_macros.h: diff --git a/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_generator.o.d b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_generator.o.d new file mode 100644 index 0000000..9190b86 --- /dev/null +++ b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_generator.o.d @@ -0,0 +1,30 @@ +cmd_Release/obj.target/jsjibonlu/src/js_sentence_generator.o := c++ '-DNODE_GYP_MODULE_NAME=jsjibonlu' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rprieto/.node-gyp/iojs-1.3.0/include/node -I/Users/rprieto/.node-gyp/iojs-1.3.0/src -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/uv/include -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include -I../deps/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=c++11 -stdlib=libc++ -fexceptions -MMD -MF ./Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_generator.o.d.raw -c -o Release/obj.target/jsjibonlu/src/js_sentence_generator.o ../src/js_sentence_generator.cpp +Release/obj.target/jsjibonlu/src/js_sentence_generator.o: \ + ../src/js_sentence_generator.cpp \ + ../deps/include/jibonluapi/jibonluapi.h \ + ../deps/include/jibonluapi/stats.h \ + ../deps/include/jibonluapi/parameters.h \ + ../deps/include/jibonluapi/error_handling.h ../src/js_fst.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h \ + ../src/iojs_now_macros.h ../src/js_error_handling.h \ + ../src/js_sentence_generator.h +../src/js_sentence_generator.cpp: +../deps/include/jibonluapi/jibonluapi.h: +../deps/include/jibonluapi/stats.h: +../deps/include/jibonluapi/parameters.h: +../deps/include/jibonluapi/error_handling.h: +../src/js_fst.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h: +../src/iojs_now_macros.h: +../src/js_error_handling.h: +../src/js_sentence_generator.h: diff --git a/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_parser.o.d b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_parser.o.d new file mode 100644 index 0000000..788a4e9 --- /dev/null +++ b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_parser.o.d @@ -0,0 +1,32 @@ +cmd_Release/obj.target/jsjibonlu/src/js_sentence_parser.o := c++ '-DNODE_GYP_MODULE_NAME=jsjibonlu' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rprieto/.node-gyp/iojs-1.3.0/include/node -I/Users/rprieto/.node-gyp/iojs-1.3.0/src -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/uv/include -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include -I../deps/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=c++11 -stdlib=libc++ -fexceptions -MMD -MF ./Release/.deps/Release/obj.target/jsjibonlu/src/js_sentence_parser.o.d.raw -c -o Release/obj.target/jsjibonlu/src/js_sentence_parser.o ../src/js_sentence_parser.cpp +Release/obj.target/jsjibonlu/src/js_sentence_parser.o: \ + ../src/js_sentence_parser.cpp ../deps/include/jibonluapi/jibonluapi.h \ + ../deps/include/jibonluapi/stats.h \ + ../deps/include/jibonluapi/parameters.h \ + ../deps/include/jibonluapi/error_handling.h ../src/js_fst.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h \ + ../src/iojs_now_macros.h ../src/js_error_handling.h \ + ../src/js_sentence_parser.h ../src/v8_engine.h \ + ../deps/include/jibonluapi/exceptions.h +../src/js_sentence_parser.cpp: +../deps/include/jibonluapi/jibonluapi.h: +../deps/include/jibonluapi/stats.h: +../deps/include/jibonluapi/parameters.h: +../deps/include/jibonluapi/error_handling.h: +../src/js_fst.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h: +../src/iojs_now_macros.h: +../src/js_error_handling.h: +../src/js_sentence_parser.h: +../src/v8_engine.h: +../deps/include/jibonluapi/exceptions.h: diff --git a/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/jsjibonluapi.o.d b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/jsjibonluapi.o.d new file mode 100644 index 0000000..da7dc29 --- /dev/null +++ b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/jsjibonluapi.o.d @@ -0,0 +1,29 @@ +cmd_Release/obj.target/jsjibonlu/src/jsjibonluapi.o := c++ '-DNODE_GYP_MODULE_NAME=jsjibonlu' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rprieto/.node-gyp/iojs-1.3.0/include/node -I/Users/rprieto/.node-gyp/iojs-1.3.0/src -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/uv/include -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include -I../deps/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=c++11 -stdlib=libc++ -fexceptions -MMD -MF ./Release/.deps/Release/obj.target/jsjibonlu/src/jsjibonluapi.o.d.raw -c -o Release/obj.target/jsjibonlu/src/jsjibonluapi.o ../src/jsjibonluapi.cpp +Release/obj.target/jsjibonlu/src/jsjibonluapi.o: ../src/jsjibonluapi.cpp \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h \ + ../deps/include/jibonluapi/jibonluapi.h \ + ../deps/include/jibonluapi/stats.h \ + ../deps/include/jibonluapi/parameters.h \ + ../deps/include/jibonluapi/error_handling.h ../src/js_fst.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h \ + ../src/iojs_now_macros.h ../src/js_sentence_parser.h \ + ../src/js_sentence_generator.h +../src/jsjibonluapi.cpp: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h: +../deps/include/jibonluapi/jibonluapi.h: +../deps/include/jibonluapi/stats.h: +../deps/include/jibonluapi/parameters.h: +../deps/include/jibonluapi/error_handling.h: +../src/js_fst.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_object_wrap.h: +../src/iojs_now_macros.h: +../src/js_sentence_parser.h: +../src/js_sentence_generator.h: diff --git a/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/v8_engine.o.d b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/v8_engine.o.d new file mode 100644 index 0000000..969ab1a --- /dev/null +++ b/node_modules/jibo-sdk/parser/build/Release/.deps/Release/obj.target/jsjibonlu/src/v8_engine.o.d @@ -0,0 +1,24 @@ +cmd_Release/obj.target/jsjibonlu/src/v8_engine.o := c++ '-DNODE_GYP_MODULE_NAME=jsjibonlu' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/rprieto/.node-gyp/iojs-1.3.0/include/node -I/Users/rprieto/.node-gyp/iojs-1.3.0/src -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/uv/include -I/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include -I../deps/include -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=c++11 -stdlib=libc++ -fexceptions -MMD -MF ./Release/.deps/Release/obj.target/jsjibonlu/src/v8_engine.o.d.raw -c -o Release/obj.target/jsjibonlu/src/v8_engine.o ../src/v8_engine.cpp +Release/obj.target/jsjibonlu/src/v8_engine.o: ../src/v8_engine.cpp \ + ../src/v8_engine.h /Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h \ + /Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h \ + ../deps/include/jibonluapi/exceptions.h \ + ../deps/include/jibonluapi/error_handling.h \ + ../deps/include/jibonluapi/jibonluapi.h \ + ../deps/include/jibonluapi/stats.h \ + ../deps/include/jibonluapi/parameters.h +../src/v8_engine.cpp: +../src/v8_engine.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8-version.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/deps/v8/include/v8config.h: +/Users/rprieto/.node-gyp/iojs-1.3.0/src/node_version.h: +../deps/include/jibonluapi/exceptions.h: +../deps/include/jibonluapi/error_handling.h: +../deps/include/jibonluapi/jibonluapi.h: +../deps/include/jibonluapi/stats.h: +../deps/include/jibonluapi/parameters.h: diff --git a/node_modules/jibo-sdk/parser/build/Release/jsjibonlu.jibo b/node_modules/jibo-sdk/parser/build/Release/jsjibonlu.jibo new file mode 100755 index 0000000..b0cd1b2 Binary files /dev/null and b/node_modules/jibo-sdk/parser/build/Release/jsjibonlu.jibo differ diff --git a/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_fst.o b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_fst.o new file mode 100644 index 0000000..2fa3a80 Binary files /dev/null and b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_fst.o differ diff --git a/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_sentence_generator.o b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_sentence_generator.o new file mode 100644 index 0000000..4ecb393 Binary files /dev/null and b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_sentence_generator.o differ diff --git a/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_sentence_parser.o b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_sentence_parser.o new file mode 100644 index 0000000..fd65e58 Binary files /dev/null and b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/js_sentence_parser.o differ diff --git a/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/jsjibonluapi.o b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/jsjibonluapi.o new file mode 100644 index 0000000..0101fb5 Binary files /dev/null and b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/jsjibonluapi.o differ diff --git a/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/v8_engine.o b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/v8_engine.o new file mode 100644 index 0000000..b8b0d09 Binary files /dev/null and b/node_modules/jibo-sdk/parser/build/Release/obj.target/jsjibonlu/src/v8_engine.o differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoFoundation.30.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoFoundation.30.dylib new file mode 100644 index 0000000..1dd0a6d Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoFoundation.30.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoFoundation.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoFoundation.dylib new file mode 100644 index 0000000..1dd0a6d Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoFoundation.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoJSON.30.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoJSON.30.dylib new file mode 100644 index 0000000..1692499 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoJSON.30.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoJSON.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoJSON.dylib new file mode 100644 index 0000000..1692499 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoJSON.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoUtil.30.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoUtil.30.dylib new file mode 100644 index 0000000..270aa9c Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoUtil.30.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoUtil.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoUtil.dylib new file mode 100644 index 0000000..270aa9c Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoUtil.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoXML.30.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoXML.30.dylib new file mode 100644 index 0000000..552d264 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoXML.30.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoXML.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoXML.dylib new file mode 100644 index 0000000..552d264 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libPocoXML.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libfst.3.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libfst.3.dylib new file mode 100644 index 0000000..4f08253 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libfst.3.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libfst.dylib b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libfst.dylib new file mode 100644 index 0000000..4f08253 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libfst.dylib differ diff --git a/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libjibonlu.a b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libjibonlu.a new file mode 100644 index 0000000..2c5c839 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/darwin/x64/lib/libjibonlu.a differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/canada_city_province.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/canada_city_province.fst new file mode 100644 index 0000000..1ec9149 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/canada_city_province.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/canada_province.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/canada_province.fst new file mode 100644 index 0000000..02248b6 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/canada_province.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/city_state.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/city_state.fst new file mode 100644 index 0000000..075d47b Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/city_state.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/country.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/country.fst new file mode 100644 index 0000000..34c58b0 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/country.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/date.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/date.fst new file mode 100644 index 0000000..5a0022b Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/date.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/digits.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/digits.fst new file mode 100644 index 0000000..6f78913 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/digits.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/factory_list.txt b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/factory_list.txt new file mode 100644 index 0000000..3a0f2b0 --- /dev/null +++ b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/factory_list.txt @@ -0,0 +1,15 @@ +factory:city_state +factory:date +factory:state +factory:time +factory:yes_no +factory:timer +factory:world_city_country +factory:country +factory:first_name +factory:last_name +factory:music_genre +factory:digits +factory:year +factory:canada_city_province +factory:canada_province diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/first_name.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/first_name.fst new file mode 100644 index 0000000..02d3dfb Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/first_name.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/last_name.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/last_name.fst new file mode 100644 index 0000000..8ed4987 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/last_name.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/music_genre.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/music_genre.fst new file mode 100644 index 0000000..aa63b98 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/music_genre.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/state.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/state.fst new file mode 100644 index 0000000..90a3e53 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/state.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/time.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/time.fst new file mode 100644 index 0000000..16b1cb7 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/time.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/timer.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/timer.fst new file mode 100644 index 0000000..0f3f270 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/timer.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/world_city_country.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/world_city_country.fst new file mode 100644 index 0000000..95410e6 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/world_city_country.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/year.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/year.fst new file mode 100644 index 0000000..ad3cbcc Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/year.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/yes_no.fst b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/yes_no.fst new file mode 100644 index 0000000..bc07355 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/en-us/factory_rules/yes_no.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/en-us/word_lists/stop_words b/node_modules/jibo-sdk/parser/deps/data/en-us/word_lists/stop_words new file mode 100644 index 0000000..90a3964 --- /dev/null +++ b/node_modules/jibo-sdk/parser/deps/data/en-us/word_lists/stop_words @@ -0,0 +1,4 @@ +a +an +that +the diff --git a/node_modules/jibo-sdk/parser/deps/data/jp-jp/factory_rules/factory_list.txt b/node_modules/jibo-sdk/parser/deps/data/jp-jp/factory_rules/factory_list.txt new file mode 100644 index 0000000..1939f7f --- /dev/null +++ b/node_modules/jibo-sdk/parser/deps/data/jp-jp/factory_rules/factory_list.txt @@ -0,0 +1 @@ +factory:yes_no diff --git a/node_modules/jibo-sdk/parser/deps/data/jp-jp/factory_rules/yes_no.fst b/node_modules/jibo-sdk/parser/deps/data/jp-jp/factory_rules/yes_no.fst new file mode 100644 index 0000000..98753e8 Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/jp-jp/factory_rules/yes_no.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/jp-jp/word_lists/stop_words b/node_modules/jibo-sdk/parser/deps/data/jp-jp/word_lists/stop_words new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/jibo-sdk/parser/deps/data/zh-cn/factory_rules/factory_list.txt b/node_modules/jibo-sdk/parser/deps/data/zh-cn/factory_rules/factory_list.txt new file mode 100644 index 0000000..1939f7f --- /dev/null +++ b/node_modules/jibo-sdk/parser/deps/data/zh-cn/factory_rules/factory_list.txt @@ -0,0 +1 @@ +factory:yes_no diff --git a/node_modules/jibo-sdk/parser/deps/data/zh-cn/factory_rules/yes_no.fst b/node_modules/jibo-sdk/parser/deps/data/zh-cn/factory_rules/yes_no.fst new file mode 100644 index 0000000..7b7b86d Binary files /dev/null and b/node_modules/jibo-sdk/parser/deps/data/zh-cn/factory_rules/yes_no.fst differ diff --git a/node_modules/jibo-sdk/parser/deps/data/zh-cn/word_lists/stop_words b/node_modules/jibo-sdk/parser/deps/data/zh-cn/word_lists/stop_words new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/jibo-sdk/parser/lib/e2e_tests.js b/node_modules/jibo-sdk/parser/lib/e2e_tests.js new file mode 100644 index 0000000..9ef16dd --- /dev/null +++ b/node_modules/jibo-sdk/parser/lib/e2e_tests.js @@ -0,0 +1,679 @@ +var fs = require('fs'); +/********************************/ +/* test fuctions */ +/********************************/ + +function check_throw(a) { + if (!does_it_throw(a)) + throw new Error('Statement did not throw, but its expected to throw'); +} + +function check_no_throw(a) { + if (does_it_throw(a)) + throw new Error('statement is not expected to throw, but throwed'); +} + +function does_it_throw(a) { + var throwed = false; + try { + a(); + throwed = false; + } catch(e) { + throwed = true; + } + return throwed; +} + +function check_parse_ref_json(parses_json, ref_json) { + ref_obj = JSON.parse(ref_json); + parses_obj = JSON.parse(parses_json); + ref_cmp = JSON.stringify(ref_obj); + parses_cmp = JSON.stringify(parses_obj); + if (ref_cmp != parses_cmp) + throw new Error('Expecting reference to be the same as parse, but they were different') +} + +/********************************/ +/* Initialization */ +/********************************/ +var argv = process.argv; + +// checking for command line arguments +if (argv.length != 4) { + console.log('Incorrect number of command line arguments'); + console.log('Usage: node e2e_tests.js full_path_to_dir_containing_jsjibonlu full_path_to_datadir') + console.log('Example: node e2e_tests.js /Users/my_user/my_directory_containig_jsjibonlu/ /Users/my_user/my_directory/data'); + process.exit(1); +} + +// gteting install prefix +var install_prefix = argv[2]; +var datadir = argv[3]; + +// Loading jsjibonlu library +var jsjibonlu = require(install_prefix + '/jsjibonlu'); + +/********************************/ +/* Compiling tests */ +/********************************/ + +// good rule format +var grm = 'TopRule = aa;' +var f = function() {jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");}; +check_no_throw(f); + +// bad number of argumets +var f = function() {jsjibonlu.compile_fst_from_text(grm);}; +check_throw(f); + +// bad number of argumets +var f = function() {jsjibonlu.compile_fst_from_text("handle:my_handle");}; +check_throw(f); + +// bad argument types +var f = function() {jsjibonlu.compile_fst_from_text("handle:my_handle", grm);}; +check_throw(f); + +// bad argument types +var f = function() {jsjibonlu.compile_fst_from_text(grm, "handle:my_handle", 3);}; +check_throw(f); + +// bad argument types +var f = function() {jsjibonlu.compile_fst_from_text(grm, "handle:my_handle", "/filepath/file.rule");}; +check_no_throw(f); + +// bad rule format +var f = function() {jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");}; +grm = 'TopRule = aa'; +check_throw(f); + +// referencing factory rule +grm = 'TopRule = $factory:date;' +check_no_throw(f) + +/********************************/ +/* Parsing */ +/********************************/ + +// bad number of arguments +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa" +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst, fst);}; +check_throw(f) + +// incorrect argument type +// bad number of arguments +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa" +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser('a');}; +check_throw(f) + +// correct call +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa" +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst);}; +check_no_throw(f) + +// incorrect argument type +// bad number of arguments +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa"; +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst);parses_json = parser.parse_sentence(txt,txt);}; +check_throw(f) + +// incorrect argument type +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa"; +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst);parses_json = parser.parse_sentence(fst);}; +check_throw(f) + +// correct parse +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa"; +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst);parses_json = parser.parse_sentence(txt)}; +check_no_throw(f) + +// empty parse +grm = "TopRule = aa{nl='aa'};"; +txt = "aaa"; +parses_json = ''; +ref_json = '[]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_no_throw(f) +check_parse_ref_json(parses_json, ref_json); + +// some parse +grm = "TopRule = aa{nl='aa'};"; +txt = "aa"; +parses_json = ''; +ref_json = '[{"Input":"aa", "NLParse":{"nl":"aa"}, "heuristic_score":3, "index":0}]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_no_throw(f) +check_parse_ref_json(parses_json, ref_json); + +// error with factory, unset data dir +grm = "TopRule = $factory:date{date=date._date_nl};"; +txt = "aa"; +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_throw(f) + +// setting the dat_dir +jsjibonlu.remove_from_memory('handle:my_handle'); +jsjibonlu.set_data_dir(datadir); + +/********************************/ +/* num_fsts_in_mem */ +/********************************/ + +// incorrect call +var f = function() {num_of_fsts_at_start = jsjibonlu.num_fsts_in_mem(3);} +check_throw(f); + +// incorrect call +var f = function() {num_of_fsts_at_start = jsjibonlu.num_fsts_in_mem('hi');} +check_throw(f); + +// correct call +var f = function() {num_of_fsts_at_start = jsjibonlu.num_fsts_in_mem();} +check_no_throw(f); + +// error with unknown factory, data dir is set +grm = "TopRule = $factory:datedate{date=datedate._date_nl};"; +txt = "aa"; +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_throw(f) + +// error with known factory, unknown nl var +grm = "TopRule = $factory:date{mydate=b};"; +txt = "july 29th 1995"; +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt);}; +check_throw(f); + +// no error +grm = "TopRule = $factory:date{date=date._date_nl};"; +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_no_throw(f) +check_parse_ref_json(parses_json, ref_json); + +/********************************/ +/* saving fst */ +/********************************/ + +// wrong number of arguments +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");fst.save_fst("my_fst_file.fst", 1)}; +check_throw(f) + +// wrong type of argument +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");fst.save_fst(1)}; +check_throw(f) + +// correct call +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");fst.save_fst("my_fst_file.fst")}; +check_no_throw(f) + +/********************************/ +/* opening fst file */ +/********************************/ + +// incorrect number of arguments +var f = function() {fst = jsjibonlu.read_fst_from_uri("file:my_fst_file.fst", 1);}; +check_throw(f) + +// wrong type of arguments +var f = function() {fst = jsjibonlu.read_fst_from_uri(1);}; +check_throw(f) + +// non existing file type of arguments +var f = function() {fst = jsjibonlu.read_fst_from_uri("file:my_fst_file2.fst");}; +check_throw(f) + +// correct call +var f = function() {fst = jsjibonlu.read_fst_from_uri("file:my_fst_file.fst");}; +check_no_throw(f) + +/********************************/ +/* parsingfrom fst file */ +/********************************/ + +// correct call +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +var f = function() {fst = jsjibonlu.read_fst_from_uri("file:my_fst_file.fst");parser = jsjibonlu.build_sentence_parser(fst);parses_json = parser.parse_sentence(txt);}; +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + + +/********************************/ +/* parsingfrom fst in memory */ +/********************************/ + +// trying to parse from a removed handle from memory +grm = "TopRule = $factory:date{date=date._date_nl};"; +txt = "july 29th 1995" +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");fst1 = jsjibonlu.read_fst_from_uri("handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst1);parses_json = parser.parse_sentence(txt);}; +check_no_throw(f) +check_parse_ref_json(parses_json, ref_json); + + +/************************************/ +/* parsing several fsts in parallel */ +/************************************/ + +// correct call +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}, {"Input":"july 29th 1995", "NLParse":{"july":"july"}, "heuristic_score":5, "index":1}]'; +second_rule = 'TopRule = $* july {july = \'july\'} $*;'; +var f = function() {fst1 = jsjibonlu.read_fst_from_uri("file:my_fst_file.fst");fst2 = jsjibonlu.compile_fst_from_text(second_rule, "handle:my_handle");arr=[fst1, fst2];parser = jsjibonlu.build_sentence_parser(arr);parses_json = parser.parse_sentence(txt);}; +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +/************************************/ +/* reading from fst file */ +/************************************/ + +// correct call +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file("./my_fst_file.fst", "handle:my_handle_from_fst_file"); + parser = jsjibonlu.build_sentence_parser(fst); + parses_json = parser.parse_sentence(txt); +}; +f(); +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +// correct call, testing handle +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file("./my_fst_file.fst", "handle:my_handle_from_fst_file_2"); + fst_2 = jsjibonlu.read_fst_from_uri("handle:my_handle_from_fst_file_2"); + parser = jsjibonlu.build_sentence_parser(fst_2); + parses_json = parser.parse_sentence(txt); +}; +f(); +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +// wrong number of arguments +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file("./my_fst_file.fst"); +}; +check_throw(f); + +// wrong number of argumets +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file("./my_fst_file.fst", "handle:my_handle_fst_file_3", "handle:my_handle_fst_file_3"); +}; +check_throw(f); + +// file that does not exist +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file("./my_fst_file_does_not_exist.fst", "handle:my_handle_fst_file_3"); +}; +check_throw(f); + +// wrong type +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file(3, "handle:my_handle_fst_file_3"); +}; +check_throw(f); + +// wrong type +var f = function() { + fst = jsjibonlu.load_fst_from_fst_file("./my_fst_file.fst", 3); +}; +check_throw(f); + +/************************************/ +/* parsing with union fst */ +/************************************/ + +// correct call +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995","union_original_fst_name":"file:my_fst_file.fst"}, "heuristic_score":15, "index":0}]'; +second_rule = 'TopRule = $* july {july = \'july\'} $*;'; +var f = function() { + fst2 = jsjibonlu.compile_fst_from_text(second_rule, "handle:my_handle"); + arr=["file:my_fst_file.fst", "handle:my_handle"]; + union_fst = jsjibonlu.union_fst(arr, "handle:my_union_handle"); + parser = jsjibonlu.build_sentence_parser(union_fst); + parses_json = parser.parse_sentence(txt); +}; +f(); +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +// correct call, testing handle +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995", "union_original_fst_name":"file:my_fst_file.fst"}, "heuristic_score":15, "index":0}]'; +second_rule = 'TopRule = $* july {july = \'july\'} $*;'; +var f = function() { + fst2 = jsjibonlu.compile_fst_from_text(second_rule, "handle:my_handle"); + arr=["file:my_fst_file.fst", "handle:my_handle"]; + union_fst = jsjibonlu.union_fst(arr, "handle:my_union_handle"); + union_fst_2 = jsjibonlu.read_fst_from_uri("handle:my_union_handle"); + parser = jsjibonlu.build_sentence_parser(union_fst_2); + parses_json = parser.parse_sentence(txt); +}; +f(); +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +// wrong number of arguments +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +second_rule = 'TopRule = $* july {july = \'july\'} $*;'; +var f = function() { + fst2 = jsjibonlu.compile_fst_from_text(second_rule, "handle:my_handle"); + arr=["file:my_fst_file.fst", "handle:my_handle"]; + union_fst = jsjibonlu.union_fst(arr); + parser = jsjibonlu.build_sentence_parser(union_fst); + parses_json = parser.parse_sentence(txt); +}; +check_throw(f); + +// incorrect argument +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +second_rule = 'TopRule = $* july {july = \'july\'} $*;'; +var f = function() { + fst2 = jsjibonlu.compile_fst_from_text(second_rule, "handle:my_handle"); + arr=["file:my_fst_file.fst", "handle:my_handle"]; + union_fst = jsjibonlu.union_fst(arr, arr); + parser = jsjibonlu.build_sentence_parser(union_fst); + parses_json = parser.parse_sentence(txt); +}; +check_throw(f); + +// incorrect argument +txt = "july 29th 1995"; +parses_json = ''; +ref_json = '[{"Input":"july 29th 1995", "NLParse":{"date":"07\\/29\\/1995"}, "heuristic_score":15, "index":0}]'; +second_rule = 'TopRule = $* july {july = \'july\'} $*;'; +var f = function() { + fst2 = jsjibonlu.compile_fst_from_text(second_rule, "handle:my_handle"); + arr=["file:my_fst_file.fst", "handle:my_handle"]; + union_fst = jsjibonlu.union_fst(1, "handle:my_union_handle"); + parser = jsjibonlu.build_sentence_parser(union_fst); + parses_json = parser.parse_sentence(txt); +}; +check_throw(f); + +/************************************/ +/* dumping fst in array of ints */ +/************************************/ + +// correct call +rule = 'TopRule = $* july {july = \'july\'} $*;'; +fs = require('fs'); +var f = function() {fst1 = jsjibonlu.compile_fst_from_text(rule, "handle:my_handle"); + fst1.save_fst("file-to-cmp1.fst"); + arr = fst1.to_buffer(); + saved_arr = fs.readFileSync("./file-to-cmp1.fst") + if (arr.length != saved_arr.length) + throw new Error("Length of buffers is different"); + for (i = 0; i < arr.length; ++i) { + if (arr[i] != saved_arr[i]) + throw new Error("Buffers differ"); + } + }; +check_no_throw(f); + +// wrong number of arguments +rule = 'TopRule = $* july {july = \'july\'} $*;'; +fs = require('fs'); +var f = function() {fst1 = jsjibonlu.compile_fst_from_text(rule, "handle:my_handle"); + fst1.save_fst("file-to-cmp1.fst"); + arr = new Buffer(fst1.to_buffer("hello")); + saved_arr = fs.readFileSync("./file-to-cmp1.fst") + if (arr.length != saved_arr.length) + throw new Error("Length of buffers is different"); + for (i = 0; i < arr.length; ++i) { + if (arr[i] != saved_arr[i]) + throw new Error("Buffers differ"); + } + }; +check_throw(f); + +/*******************************************/ +/* reading handle rule inside another rule */ +/*******************************************/ + +grm = "TopRule = $handle:hndl{nl=hndl._nl};"; +hndl = "TopRule = julius{_nl='julius'}|marcus{_nl='marcus'};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");fst1 = jsjibonlu.compile_fst_from_text(hndl, "handle:hndl");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; + +txt = "julius"; +parses_json = ''; +ref_json = '[{"Input":"julius", "NLParse":{"nl":"julius"}, "heuristic_score":7, "index":0}]'; +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +txt = "marcus"; +parses_json = ''; +ref_json = '[{"Input":"marcus", "NLParse":{"nl":"marcus"}, "heuristic_score":7, "index":0}]'; +check_no_throw(f); +check_parse_ref_json(parses_json, ref_json); + +/********************************/ +/* Removing fst from memory */ +/********************************/ + +// wrong number of arguments +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");jsjibonlu.remove_from_memory("handle:my_handle", 1)}; +check_throw(f) + +// wrong type of argument +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");jsjibonlu.remove_from_memory(1)}; +check_throw(f) + +// correct call +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");jsjibonlu.remove_from_memory("handle:my_handle")}; +check_no_throw(f) + +// trying to parse from a removed handle from memory +grm = "TopRule = $factory:date{date=date._date_nl};"; +txt = "july 29th 1995" +parses_json = ''; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");jsjibonlu.remove_from_memory("handle:my_handle");fst2 = jsjibonlu.read_fst_from_uri("handle:my_handle");}; +check_throw(f) + +/********************************/ +/* syntax check */ +/********************************/ + +// wrong number of arguments +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {jsjibonlu.syntax_check(grm, "handle:my_handle");}; +check_throw(f) + +// wrong type of argument +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {jsjibonlu.syntax_check(1);}; +check_throw(f) + +// correct call +grm = "TopRule = $factory:date{date=date._date_nl};"; +var f = function() {jsjibonlu.syntax_check(grm);}; +check_no_throw(f) + +// bad argument types +var f = function() {jsjibonlu.syntax_check(grm, 3);}; +check_throw(f); + +// bad argument types +var f = function() {jsjibonlu.syntax_check(grm, "/filepath/file.rule");}; +check_no_throw(f); + +// with include file +grm = "TopRule = $include:./myfile.rule:my_rule;"; +fs.writeFileSync("./myfile.rule","my_rule = aa;\n"); +jsjibonlu.syntax_check(grm, process.cwd() + "/file.rule"); +var f = function() {jsjibonlu.syntax_check(grm, process.cwd() + "/file.rule");}; +check_no_throw(f); + +// wrong syntax +grm = "TopRule = $factory:date{date=date._date_nl}"; +var f = function() {jsjibonlu.syntax_check(grm);}; +check_throw(f) + +// undefined rule +grm = "TopRule = $a;" +var f = function() {jsjibonlu.syntax_check(grm);}; +check_throw(f) + + +/********************************/ +/* fst error behavior */ +/********************************/ + +// Wrong number of arguments +var f = function() {jsjibonlu.set_fst_error_behavior(0);}; +check_throw(f); + +// Correct number of arguments +var f = function() {jsjibonlu.set_fst_error_behavior();}; +check_no_throw(f); + +// Opening valid fst file +var f = function() {fst = jsjibonlu.read_fst_from_uri("file:my_fst_file.fst");}; +check_no_throw(f); + +// Writing incorrect fst file and attempting to open it +fs.writeFile('./my_normal_text_file.fst', "hello there"); +var f = function() {fst = jsjibonlu.read_fst_from_uri("file:my_normal_text_file.fst");}; +console.log('**** Expected Error Message: In the next line you will see a std::cerr error message, output by openfst, but you can ignore it') +check_throw(f); +console.log('**** End of Exepcted Error Message') + +/********************************/ +/* javascript nl returns */ +/********************************/ +grm = "TopRule = $* $weather $* ;\n"; +grm += "weather = weather{%nl='weather'%} {%cities=[]%} *(+(in|and|or) $city{%cities.push(this.city.nl)%});\n"; +grm += "city = (palo alto){% this.nl = 'palo alto' %}|(sunnyvale){%this.nl = 'sunnyvale'%}|(los altos){%this.nl = 'los altos'%}|(cupertino){%this.nl = 'cupertino'%};"; +txt = "weather in palo alto in cupertino and in sunnyvale" +ref_json = '[{"Input":"weather in palo alto in cupertino and in sunnyvale", "NLParse":{"nl":"weather","cities":["palo alto","cupertino","sunnyvale"]}, "heuristic_score":51, "index":0}]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst);parses_json = parser.parse_sentence(txt);}; +check_no_throw(f); +check_parse_ref_json(ref_json, parses_json); + + +/*******************************/ +/* reset_memory */ +/*******************************/ + +// incorrect call +var f = function() {jsjibonlu.reset_memory(3);} +check_throw(f); + +// incorrect call +var f = function() {jsjibonlu.reset_memory('hi');} +check_throw(f); + +// correct call +var f = function() {jsjibonlu.reset_memory()}; +check_no_throw(f); + +// compiling a couple of rules +grm = "TopRule = aa{nl='aa'};"; +handle = 'handle:my_handle1'; +var f = function() {jsjibonlu.compile_fst_from_text(grm, handle);}; +check_no_throw(f); +handle = 'handle:my_handle2'; +check_no_throw(f); +var f = function() {var n = jsjibonlu.num_fsts_in_mem(); if (n != num_of_fsts_at_start + 2) { throw new Error('Error in num_fsts_in_mem')} } +check_no_throw(f); +var f = function() {jsjibonlu.reset_memory(); var n = jsjibonlu.num_fsts_in_mem(); if (n != num_of_fsts_at_start) { throw new Error('Error in reset_memory')} } +check_no_throw(f); + +/*******************************/ +/* change_locale */ +/*******************************/ +// incorrect call wrong number of arguments +var f = function() {jsjibonlu.change_locale('jp-jp', 'jp-jp')}; +check_throw(f); + +// incorrect call wrong number of arguments +var f = function() {jsjibonlu.change_locale(3)}; +check_throw(f); + +// correct number of arguments incorrect locale +var f = function() {jsjibonlu.change_locale('incorrect-locale')}; +check_throw(f); + +// Inputing an incorrect locale causes all factory fsts to get unloaded +var f = function() {var n = jsjibonlu.num_fsts_in_mem(); if (n != 0) { throw new Error('Error in setting locale')} } +check_no_throw(f); + +// Reseting datadir +var f = function() { jsjibonlu.set_data_dir(datadir);}; +check_no_throw(f); +var f = function() {var n = jsjibonlu.num_fsts_in_mem(); if (n != num_of_fsts_at_start) { throw new Error('Error in setting locale and resetting data_dir')} } +check_no_throw(f); + +// correct call +var f = function() {jsjibonlu.change_locale('jp-jp')}; +check_no_throw(f); + +// parsing +grm = "TopRule = [$factory:yes_no{% nl = this.yes_no._nl %}];"; +txt = "はい"; +parses_json = ''; +ref_json = '[{"Input":"はい", "NLParse":{"nl":"yes"}, "heuristic_score":7, "index":0}]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_no_throw(f) +check_parse_ref_json(parses_json, ref_json); + +// correct call +var f = function() {jsjibonlu.change_locale('zh-cn')}; +check_no_throw(f); + +// parsing +grm = "TopRule = [$factory:yes_no{% nl = this.yes_no._nl %}];"; +txt = "是"; +parses_json = ''; +ref_json = '[{"Input":"是", "NLParse":{"nl":"yes"}, "heuristic_score":4, "index":0}]'; +var f = function() {fst = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle");parser = jsjibonlu.build_sentence_parser(fst); parses_json = parser.parse_sentence(txt)}; +check_no_throw(f) +check_parse_ref_json(parses_json, ref_json); + +// removing handle from memory +var f = function() {jsjibonlu.remove_from_memory('handle:my_handle');} +check_no_throw(f); + +// bringing locale back to en-us +var f = function() {jsjibonlu.change_locale('en-us')}; +check_no_throw(f); +var f = function() {var n = jsjibonlu.num_fsts_in_mem(); if (n != num_of_fsts_at_start) { throw new Error('Error in setting locale and resetting data_dir')} } +check_no_throw(f); + +console.log('\n\n\nSuccess'); + diff --git a/node_modules/jibo-sdk/parser/lib/example.js b/node_modules/jibo-sdk/parser/lib/example.js new file mode 100644 index 0000000..0bd0500 --- /dev/null +++ b/node_modules/jibo-sdk/parser/lib/example.js @@ -0,0 +1,223 @@ +var fs = require('fs'); + +////////////////////////// +// Library Initialization +////////////////////////// + +// checking for command line arguments +var argv = process.argv; + +if (argv.length != 4) { + console.log('Incorrect number of command line arguments'); + console.log('Usage: node example.js full_path_to_dir_containing_jsjibonlu full_path_to_datadir') + console.log('Example: node example.js /Users/my_user/my_directory_containig_jsjibonlu/ /Users/my_user/my_directory/data'); + process.exit(1); +} + +// gteting install prefix +var install_prefix = argv[2]; +var datadir = argv[3]; + +// Loading jsjibonlu library +var jsjibonlu = require(install_prefix + '/jsjibonlu'); + +// Setting datapath (directory with factory rules +// and word lists +jsjibonlu.set_data_dir(datadir) + +// Setting fst error behavior so that it does not crash +// every time there is an error +jsjibonlu.set_fst_error_behavior(); + +////////////////////////// +// Compiling a rule +////////////////////////// + +// Rule to be compiled +var grm = "TopRule = $* hello{nl='hello'}|goodbye{nl='goodbye'} $* $factory:date{date=date._date_nl} $* ;"; + +// Compiling rule (use a handle name) +var fst1 = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle"); + +////////////////////////// +// Parsing +////////////////////////// + +// Creating rule parser +var parser = jsjibonlu.build_sentence_parser(fst1); + +// Parsing sentence +var sentence = "aaaa hello and the day is july the 29th of the year 1995 yeah"; +var parses_json = parser.parse_sentence(sentence); +var parses_obj = JSON.parse(parses_json); +console.log("*** These are the parses of sentence:" + sentence) +console.log(parses_obj) + +////////////////////////// +// Parsing from an fst that is already +// in memory +////////////////////////// +var fst4 = jsjibonlu.read_fst_from_uri("handle:my_handle"); +var parser = jsjibonlu.build_sentence_parser(fst4); +var sentence = "aaaa hello and the day is july the 29th of the year 1995 yeah"; +var parses_json = parser.parse_sentence(sentence); +var parses_obj = JSON.parse(parses_json); +console.log("*** These are the parses of sentence:" + sentence) +console.log(parses_obj) + +////////////////////////// +// Saving compiled fst +////////////////////////// +// Saving compiled rule +fst1.save_fst("myfst.fst"); + +////////////////////////// +// getting buffer from copiled fst +////////////////////////// +// getting buffer +buf = fst1.to_buffer(); +console.log("*** example of fst returned as a buffer"); +console.log(buf); + +////////////////////////// +// Openingfst from file +////////////////////////// +var fst2 = jsjibonlu.read_fst_from_uri("file:myfst.fst"); +var fst3 = jsjibonlu.load_fst_from_fst_file("./myfst.fst", "handle:my_fst_file_handle"); + +////////////////////////// +// Parsing Using fst in parallel +////////////////////////// + +// Creating parallel parser +fsts = [fst1, fst2]; +var parser = jsjibonlu.build_sentence_parser(fsts); + +// Parsing sentence +var sentence = "aaaa hello and the day is july the 29th of the year 1995 yeah"; +var parses_json = parser.parse_sentence(sentence); +var parses_obj = JSON.parse(parses_json); +console.log("*** These are the parses of sentence:" + sentence) +console.log(parses_obj) + +////////////////////////// +// Parsing with union fst +////////////////////////// + +// grms +var grm_union_1 = "TopRule = $* hello{nl='hello'}|goodbye{nl='goodbye'} $* $factory:date{date=date._date_nl} $* ;"; +var grm_union_2 = "TopRule = $* here{nl='here'}|there{nl='there'} $* $factory:date{date=date._date_nl} $* ;"; + +// Compiling rule (use a handle name) +var fst_union_part1 = jsjibonlu.compile_fst_from_text(grm_union_1, "handle:my_handle_union_1"); +var fst_union_part2 = jsjibonlu.compile_fst_from_text(grm_union_2, "handle:my_handle_union_2"); + +// get the union +var fst_union = jsjibonlu.union_fst(["handle:my_handle_union_1", "handle:my_handle_union_2"], "handle:my_handle_union_handle"); + +// remove parts from memory +jsjibonlu.remove_from_memory("handle:my_handle_union_1"); +jsjibonlu.remove_from_memory("handle:my_handle_union_2"); + +// parse +var parser_union = jsjibonlu.build_sentence_parser(fst_union); +var parsed_union = parser_union.parse_sentence("hello july 31st 1995"); +var parsed_union = parser_union.parse_sentence("here july 31st 1995"); + +/////////////////////////// +// Removing rom memory +////////////////////////// +// Atempting to remove from memory a uri that does not exist +// will not throw an error +jsjibonlu.remove_from_memory("file:myfst.fst"); +jsjibonlu.remove_from_memory("handle:my_handle"); +// the statement in the following line will fail, since it has been removed from memory: +// var fst3 = jsjibonlu.read_fst_from_uri("handle:my_handle"); + +/////////////////////////// +// syntax check (without compiling) +////////////////////////// + +// The only difference between compile_fst_from_text and +// syntax_check is that syntax_check does not compile the +// fst. all the syntax checks are exactly the same. +// compile_fst_from_text throws exactly the same errors +// (in the same json format) when finding syntax errors + +// correcty syntax (does not throw) +jsjibonlu.syntax_check(grm); + +// incorrect syntax (does throw) +var wrong_rule = "TopRule = a b c $a {ret='a'}; a = a {m='b};" +try { + jsjibonlu.syntax_check(wrong_rule) +} catch (e) { + err_obj = JSON.parse(e.message); + console.log("*** Example of compilation error object:"); + console.log(err_obj); + console.log("*** example of error member in the error object:"); + console.log(err_obj.info.msg); +} + + +// Rule to be compiled +var grm = "TopRule = $* hello{nl='hello'}|goodbye{nl='goodbye'} $* $factory:date{date=date._date_nl} $* ;"; + +// Compiling rule (use a handle name) +var fst1 = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle"); + +////////////////////////// +// Parsing +////////////////////////// + +// Compiling rule (use a handle name) +grm = "TopRule = $handle:hndl{nl=hndl._nl};"; +hndl = "TopRule = julius{_nl='julius'}|marcus{_nl='marcus'};"; +var fst1 = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle"); +var fst2 = jsjibonlu.compile_fst_from_text(hndl, "handle:hndl"); + +var parser = jsjibonlu.build_sentence_parser(fst1); + +var sentence = 'julius'; +console.log("*** Example parsing with handle rules referenced inside another rule:"); +var parses_json = parser.parse_sentence(sentence); +console.log(parses_json); +var sentence = 'marcus'; +var parses_json = parser.parse_sentence(sentence); +console.log(parses_json); + +/////////////////////// +// With include files +/////////////////////// + +grm = "TopRule = $include:./myfile.rule:my_rule;"; +fs.writeFileSync("./myfile.rule","my_rule = aa;\n"); +jsjibonlu.syntax_check(grm, process.cwd() + "/file.rule"); +var f = function() {jsjibonlu.syntax_check(grm, process.cwd() + "/file.rule");}; + +//////////////////////// +// reset memory example +//////////////////////// + +// reset memory eliminates all fsts from memory, except for factories +jsjibonlu.reset_memory(); + +//////////////////////// +// change locale example +//////////////////////// +jsjibonlu.reset_memory(); +jsjibonlu.change_locale('zh-cn'); +grm = "TopRule = [$factory:yes_no{% nl = this.yes_no._nl %}];"; +txt = "是"; +var fst1 = jsjibonlu.compile_fst_from_text(grm, "handle:my_handle"); +var parser = jsjibonlu.build_sentence_parser(fst1); +var parses_json = parser.parse_sentence(txt); +console.log("*** Example parsing with different locale"); +console.log(parses_json); + +//////////////////////// +// locale back to en-us +//////////////////////// +jsjibonlu.reset_memory(); +jsjibonlu.change_locale('en-us'); + diff --git a/node_modules/jibo-sdk/parser/lib/main.js b/node_modules/jibo-sdk/parser/lib/main.js new file mode 100644 index 0000000..0314ca1 --- /dev/null +++ b/node_modules/jibo-sdk/parser/lib/main.js @@ -0,0 +1 @@ +module.exports = module.require('../build/Release/jsjibonlu'); \ No newline at end of file diff --git a/node_modules/jibo-sdk/resources/crew/dummy-crew.rule b/node_modules/jibo-sdk/resources/crew/dummy-crew.rule new file mode 100644 index 0000000..bf5463b --- /dev/null +++ b/node_modules/jibo-sdk/resources/crew/dummy-crew.rule @@ -0,0 +1,681 @@ +TopRule = + ([george?(?(\')s)]) + {_users='uid0001'} + {_fields='f'} + | + (george [jetson?(?(\')s)]) + {_users='uid0001'} + {_fields='fl'} + | + (george jetson [dad?(?(\')s)]) + {_users='uid0001'} + {_fields='fln'} + | + (george [dad?(?(\')s)]) + {_users='uid0001'} + {_fields='fn'} + | + (george dad [jetson?(?(\')s)]) + {_users='uid0001'} + {_fields='fnl'} + | + ([jetson?(?(\')s)]) + {_users='uid0001,uid0002,uid0003,uid0004,uid0005'} + {_fields='l,l,l,l,l'} + | + (jetson [dad?(?(\')s)]) + {_users='uid0001'} + {_fields='ln'} + | + (jetson dad [george?(?(\')s)]) + {_users='uid0001'} + {_fields='lnf'} + | + (jetson [george?(?(\')s)]) + {_users='uid0001'} + {_fields='lf'} + | + (jetson george [dad?(?(\')s)]) + {_users='uid0001'} + {_fields='lfn'} + | + ([dad?(?(\')s)]) + {_users='uid0001'} + {_fields='n'} + | + (dad [george?(?(\')s)]) + {_users='uid0001'} + {_fields='nf'} + | + (dad george [jetson?(?(\')s)]) + {_users='uid0001'} + {_fields='nfl'} + | + (dad [jetson?(?(\')s)]) + {_users='uid0001'} + {_fields='nl'} + | + (dad jetson [george?(?(\')s)]) + {_users='uid0001'} + {_fields='nlf'} + | + ([jane?(?(\')s)]) + {_users='uid0002'} + {_fields='f'} + | + (jane [jetson?(?(\')s)]) + {_users='uid0002'} + {_fields='fl'} + | + (jane jetson [mom?(?(\')s)]) + {_users='uid0002'} + {_fields='fln'} + | + (jane [mom?(?(\')s)]) + {_users='uid0002'} + {_fields='fn'} + | + (jane mom [jetson?(?(\')s)]) + {_users='uid0002'} + {_fields='fnl'} + | + (jetson [mom?(?(\')s)]) + {_users='uid0002'} + {_fields='ln'} + | + (jetson mom [jane?(?(\')s)]) + {_users='uid0002'} + {_fields='lnf'} + | + (jetson [jane?(?(\')s)]) + {_users='uid0002'} + {_fields='lf'} + | + (jetson jane [mom?(?(\')s)]) + {_users='uid0002'} + {_fields='lfn'} + | + ([mom?(?(\')s)]) + {_users='uid0002'} + {_fields='n'} + | + (mom [jane?(?(\')s)]) + {_users='uid0002'} + {_fields='nf'} + | + (mom jane [jetson?(?(\')s)]) + {_users='uid0002'} + {_fields='nfl'} + | + (mom [jetson?(?(\')s)]) + {_users='uid0002'} + {_fields='nl'} + | + (mom jetson [jane?(?(\')s)]) + {_users='uid0002'} + {_fields='nlf'} + | + ([elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='f'} + | + (elroy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='fm'} + | + (elroy john [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='fml'} + | + (elroy john jetson cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='fmln'} + | + (elroy john cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='fmn'} + | + (elroy john cool boy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='fmnl'} + | + (elroy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='fl'} + | + (elroy jetson cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='fln'} + | + (elroy jetson cool boy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='flnm'} + | + (elroy jetson [john?(?(\')s)]) + {_users='uid0003'} + {_fields='flm'} + | + (elroy jetson john cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='flmn'} + | + (elroy cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='fn'} + | + (elroy cool boy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='fnm'} + | + (elroy cool boy john [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='fnml'} + | + (elroy cool boy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='fnl'} + | + (elroy cool boy jetson [john?(?(\')s)]) + {_users='uid0003'} + {_fields='fnlm'} + | + ([john?(?(\')s)]) + {_users='uid0003'} + {_fields='m'} + | + (john [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='ml'} + | + (john jetson cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='mln'} + | + (john jetson cool boy [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='mlnf'} + | + (john jetson [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='mlf'} + | + (john jetson elroy cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='mlfn'} + | + (john cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='mn'} + | + (john cool boy [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='mnf'} + | + (john cool boy elroy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='mnfl'} + | + (john cool boy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='mnl'} + | + (john cool boy jetson [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='mnlf'} + | + (john [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='mf'} + | + (john elroy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='mfl'} + | + (john elroy jetson cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='mfln'} + | + (john elroy cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='mfn'} + | + (john elroy cool boy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='mfnl'} + | + (jetson cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='ln'} + | + (jetson cool boy [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='lnf'} + | + (jetson cool boy elroy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='lnfm'} + | + (jetson cool boy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='lnm'} + | + (jetson cool boy john [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='lnmf'} + | + (jetson [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='lf'} + | + (jetson elroy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='lfm'} + | + (jetson elroy john cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='lfmn'} + | + (jetson elroy cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='lfn'} + | + (jetson elroy cool boy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='lfnm'} + | + (jetson [john?(?(\')s)]) + {_users='uid0003'} + {_fields='lm'} + | + (jetson john cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='lmn'} + | + (jetson john cool boy [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='lmnf'} + | + (jetson john [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='lmf'} + | + (jetson john elroy cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='lmfn'} + | + (cool [boy?(?(\')s)]) + {_users='uid0003'} + {_fields='n'} + | + (cool boy [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='nf'} + | + (cool boy elroy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='nfm'} + | + (cool boy elroy john [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='nfml'} + | + (cool boy elroy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='nfl'} + | + (cool boy elroy jetson [john?(?(\')s)]) + {_users='uid0003'} + {_fields='nflm'} + | + (cool boy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='nm'} + | + (cool boy john [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='nml'} + | + (cool boy john jetson [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='nmlf'} + | + (cool boy john [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='nmf'} + | + (cool boy john elroy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='nmfl'} + | + (cool boy [jetson?(?(\')s)]) + {_users='uid0003'} + {_fields='nl'} + | + (cool boy jetson [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='nlf'} + | + (cool boy jetson elroy [john?(?(\')s)]) + {_users='uid0003'} + {_fields='nlfm'} + | + (cool boy jetson [john?(?(\')s)]) + {_users='uid0003'} + {_fields='nlm'} + | + (cool boy jetson john [elroy?(?(\')s)]) + {_users='uid0003'} + {_fields='nlmf'} + | + ([judy?(?(\')s)]) + {_users='uid0004'} + {_fields='f'} + | + (judy [july?(?(\')s)]) + {_users='uid0004'} + {_fields='fm'} + | + (judy july [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='fml'} + | + (judy july jetson cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='fmln'} + | + (judy july cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='fmn'} + | + (judy july cool lady [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='fmnl'} + | + (judy [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='fl'} + | + (judy jetson cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='fln'} + | + (judy jetson cool lady [july?(?(\')s)]) + {_users='uid0004'} + {_fields='flnm'} + | + (judy jetson [july?(?(\')s)]) + {_users='uid0004'} + {_fields='flm'} + | + (judy jetson july cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='flmn'} + | + (judy cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='fn'} + | + (judy cool lady [july?(?(\')s)]) + {_users='uid0004'} + {_fields='fnm'} + | + (judy cool lady july [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='fnml'} + | + (judy cool lady [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='fnl'} + | + (judy cool lady jetson [july?(?(\')s)]) + {_users='uid0004'} + {_fields='fnlm'} + | + ([july?(?(\')s)]) + {_users='uid0004'} + {_fields='m'} + | + (july [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='ml'} + | + (july jetson cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='mln'} + | + (july jetson cool lady [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='mlnf'} + | + (july jetson [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='mlf'} + | + (july jetson judy cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='mlfn'} + | + (july cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='mn'} + | + (july cool lady [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='mnf'} + | + (july cool lady judy [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='mnfl'} + | + (july cool lady [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='mnl'} + | + (july cool lady jetson [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='mnlf'} + | + (july [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='mf'} + | + (july judy [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='mfl'} + | + (july judy jetson cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='mfln'} + | + (july judy cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='mfn'} + | + (july judy cool lady [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='mfnl'} + | + (jetson cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='ln'} + | + (jetson cool lady [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='lnf'} + | + (jetson cool lady judy [july?(?(\')s)]) + {_users='uid0004'} + {_fields='lnfm'} + | + (jetson cool lady [july?(?(\')s)]) + {_users='uid0004'} + {_fields='lnm'} + | + (jetson cool lady july [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='lnmf'} + | + (jetson [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='lf'} + | + (jetson judy [july?(?(\')s)]) + {_users='uid0004'} + {_fields='lfm'} + | + (jetson judy july cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='lfmn'} + | + (jetson judy cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='lfn'} + | + (jetson judy cool lady [july?(?(\')s)]) + {_users='uid0004'} + {_fields='lfnm'} + | + (jetson [july?(?(\')s)]) + {_users='uid0004'} + {_fields='lm'} + | + (jetson july cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='lmn'} + | + (jetson july cool lady [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='lmnf'} + | + (jetson july [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='lmf'} + | + (jetson july judy cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='lmfn'} + | + (cool [lady?(?(\')s)]) + {_users='uid0004'} + {_fields='n'} + | + (cool lady [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='nf'} + | + (cool lady judy [july?(?(\')s)]) + {_users='uid0004'} + {_fields='nfm'} + | + (cool lady judy july [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='nfml'} + | + (cool lady judy [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='nfl'} + | + (cool lady judy jetson [july?(?(\')s)]) + {_users='uid0004'} + {_fields='nflm'} + | + (cool lady [july?(?(\')s)]) + {_users='uid0004'} + {_fields='nm'} + | + (cool lady july [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='nml'} + | + (cool lady july jetson [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='nmlf'} + | + (cool lady july [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='nmf'} + | + (cool lady july judy [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='nmfl'} + | + (cool lady [jetson?(?(\')s)]) + {_users='uid0004'} + {_fields='nl'} + | + (cool lady jetson [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='nlf'} + | + (cool lady jetson judy [july?(?(\')s)]) + {_users='uid0004'} + {_fields='nlfm'} + | + (cool lady jetson [july?(?(\')s)]) + {_users='uid0004'} + {_fields='nlm'} + | + (cool lady jetson july [judy?(?(\')s)]) + {_users='uid0004'} + {_fields='nlmf'} + | + ([rosie?(?(\')s)]) + {_users='uid0005'} + {_fields='f'} + | + (rosie [jetson?(?(\')s)]) + {_users='uid0005'} + {_fields='fl'} + | + (rosie jetson [robot?(?(\')s)]) + {_users='uid0005'} + {_fields='fln'} + | + (rosie [robot?(?(\')s)]) + {_users='uid0005'} + {_fields='fn'} + | + (rosie robot [jetson?(?(\')s)]) + {_users='uid0005'} + {_fields='fnl'} + | + (jetson [robot?(?(\')s)]) + {_users='uid0005'} + {_fields='ln'} + | + (jetson robot [rosie?(?(\')s)]) + {_users='uid0005'} + {_fields='lnf'} + | + (jetson [rosie?(?(\')s)]) + {_users='uid0005'} + {_fields='lf'} + | + (jetson rosie [robot?(?(\')s)]) + {_users='uid0005'} + {_fields='lfn'} + | + ([robot?(?(\')s)]) + {_users='uid0005'} + {_fields='n'} + | + (robot [rosie?(?(\')s)]) + {_users='uid0005'} + {_fields='nf'} + | + (robot rosie [jetson?(?(\')s)]) + {_users='uid0005'} + {_fields='nfl'} + | + (robot [jetson?(?(\')s)]) + {_users='uid0005'} + {_fields='nl'} + | + (robot jetson [rosie?(?(\')s)]) + {_users='uid0005'} + {_fields='nlf'} + | + ([XXXXXXXXXX?(?(\')s)]) + {_users='null'} + {_fields='null'} +; diff --git a/node_modules/jibo-sdk/resources/docs/cheat-sheet.md b/node_modules/jibo-sdk/resources/docs/cheat-sheet.md new file mode 100644 index 0000000..3fbaca7 --- /dev/null +++ b/node_modules/jibo-sdk/resources/docs/cheat-sheet.md @@ -0,0 +1,68 @@ +## Jibo SDK Keystroke Cheatsheet +---- +#### Jibo Atom Package +| Task | Keystroke | +| ---------------------------- | --------- | +| Create a new skill | `ctrl-alt-g` | +| Open Chrome DevTools (debugger) | Mac: `cmd-opt-i` PC `ctrl-alt-i` | +| Play in the simulator | Mac: `cmd-r` PC: `ctrl-r` | +| Stop the simulator | Mac: `cmd-q` PC: `ctrl-q` | + +#### Behavior Editor +| Task | Keystroke | +| ----------------------- | ----------------------------- | +| Skip selected | `ctrl-alt-/` or `cmd-/` | + +#### Animation Editor +| Task | Keystroke | +| --------------------------------| --------- | +| Delete a keyframe | `d` or `backspace` or `delete` | +| Delete frame (s) | Mac: `shift-cmd-i` or `shift-F5` PC: `shift-F5` | +| Deselect all frames | Mac: `cmd-d` PC: `ctrl-d` | +| Duplicate frame(s) | cmd-drag | +| Insert frame(s) | Mac: `cmd-i` or `F5` PC: `F5` | +| Key a frame (current layer) | `s` | +| Key frames (all layers) | `a` | +| Move back one frame | left arrow | +| Move forward one frame | right arrow | +| Move keyframe(s) | drag | +| Play preview | `spacebar` | +| Reset a keyframe | `r` | +| Select a frame | click | +| Select all frames | Mac: `cmd-a` PC: `ctrl-a` | +| Select multiple adjacent frames | shift-click | +| Select multiple non-adjacent frames | Mac: cmd-click PC: ctrl-click | +| Stop preview | `spacebar` or `esc` | + +#### Animation Editor - Text Boxes +| Task | Keystroke | +| --------------------- | --------- | +| Insert and update a keyframe | `ctrl-s` | +| Lose focus, Close autocomplete list | `esc` | +| New line, Confirm autocomplete | `enter` | + +#### Flow Editor +| Task | Keystroke | +| --------------------- | --------- | +| Automatically layout selected shapes (experimental) | `ctrl-l` | +| Copy selection in place | Mac: opt-drag PC: alt-drag | +| Create transition | Shift-select activities, then `ctrl-t` | +| Cut, copy, paste, select all, undo, redo | native keystrokes | +| Delete selection | `del` or `backspace` | +| Edit text block | `F2` | +| Exit/Cancel | `Esc` | +| Fit to Page | `shift-z` (repeat to return to original) | +| Insert activity into transition | Drag activity from palette onto transition line | +| Move shape | arrow keys | +| Move shape-fine | command-arrow keys | +| Normalize link (undo label and attachment point adjustments) | `ctrl-n` | +| Replace existing activity | Drag new activity from palette onto activity to be replaced | +| Resize activity to original dimensions | `ctrl-m` | +| Scroll entire page | shift-arrow keys | +| Scroll to selection | `spacebar` | +| Scroll | `home` or `end` | +| Scroll | `pageup` or `pagedown` | +| Zoom 100% | Mac: `command-0` PC: `ctrl-0` | +| Zoom in | `+` (plus) | +| Zoom out | `-` (minus) | + diff --git a/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema-base.json b/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema-base.json new file mode 100644 index 0000000..d13077a --- /dev/null +++ b/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema-base.json @@ -0,0 +1,183 @@ +{ + "TimeoutSucceed": { + "description": "Forces a behavior to succeed after a given number of milliseconds.", + "type": "decorator", + "options": [ + { + "type": "int", + "field": "timeout", + "description": "Enter the number of milliseconds until forced success." + } + ] + }, + "TimeoutSucceedJs": { + "description": "Uses JavaScript to force a behavior to succeed after a given number of milliseconds.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "getTime", + "description": "Return the number of milliseconds until forced success.", + "defaultValue": "() => {\n return 0;\n}" + } + ] + }, + "TimeoutJs": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 300}, + "description": "Succeeds after a given number of dynamically-calculated milliseconds.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getTime", + "description": "Return the number of milliseconds until forced success.", + "defaultValue": "() => {\n return 0;\n}" + } + ] + }, + "TimeoutFail": { + "description": "Forces a behavior to fail after a given number of milliseconds.", + "type": "decorator", + "options": [ + { + "type": "int", + "field": "timeout", + "description": "Enter the number of milliseconds until forced failure." + } + ] + }, + "FailOnCondition": { + "description": "Forces a behavior to fail if specified condition returns false.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "init", + "description": "Initialize optional variables for the condition below." + }, + { + "type": "Function", + "field": "conditional", + "description": "Return true when you want behavior to fail." + } + ] + }, + "Case": { + "description": "Use under Switch statements to specify when a behavior should execute and when it should fail.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "conditional", + "description": "Return false for conditions under which behavior should fail." + } + ] + }, + "SucceedOnCondition": { + "description": "Forces a behavor to succeed if its conditional function returns true.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "init", + "description": "Initialize optional variables for the condition below." + }, + { + "type": "Function", + "field": "conditional", + "description": "Return true when you want behavior to succeed." + } + ] + }, + "StartOnCondition": { + "description": "Prevents a behavior from starting until its conditional function returns true.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "init", + "description": "Initialize optional variables for the condition below." + }, + { + "type": "Function", + "field": "conditional", + "description": "Return true when you want component to start." + } + ] + }, + "WhileCondition": { + "description": "Repeats a behavior until its conditional function returns false.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "init", + "description": "Initialize optional variables for the condition below." + }, + { + "type": "Function", + "field": "conditional", + "description": "Repeat behavior as long as condition return true.", + "defaultValue": "() => {\n return true;\n}" + } + ] + }, + "ExecuteScript": { + "description": "Synchronously executes arbitrary JavaScript. Use ExecuteScriptAsync for asynchronous calls.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "exec", + "description": "Enter function that will execute once and then succeed." + } + ] + }, + "ExecuteScriptAsync": { + "description": "Asynchronously executes arbitrary JavaScript. Will not succeed until the callback is called.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "exec", + "description": "Behavior will succeed when succeed is called, fail when fail is called.", + "defaultValue": "(succeed, fail) => {\n succeed();\n}" + } + ] + }, + "Null": { + "description": "This behavior never succeeds or fails. It will remain 'in progress' indefinitely. It must be decorated in order to succeed or fail.", + "type": "leaf", + "options": [] + }, + "Sequence": { + "description": "This behavior plays its children in order from top to bottom. If one child fails, this behavior will fail. If all its children succeed ,this behavor will succeed.", + "type": "composite", + "options": [] + }, + "Parallel": { + "description": "This behavior starts all of its children at the same time. This behavior will return success by default when all of its children have succeeded, or, if told to succeed on one, will succeed upon success of any child.", + "type": "composite", + "options": [ + { + "type": "boolean", + "field": "succeedOnOne", + "description": "Set to True to force parallel to succeed as soon as one of its children succeeds.", + "defaultValue": false + } + ] + }, + "Switch": { + "description": "Attempts to execute its children in order from top to bottom until one child succeeds. This behavior always succeeds regardless of whether any children succeed. Use this behavior with Case decorators for branching.", + "type": "composite", + "options": [] + }, + "Random": { + "description": "Chooses one of its children randomly. Succeeds if that child succeeds and fails otherwise.", + "type": "composite", + "options": [] + }, + "meta": { + "version": 1 + } +} diff --git a/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema-flow.json b/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema-flow.json new file mode 100644 index 0000000..9a96375 --- /dev/null +++ b/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema-flow.json @@ -0,0 +1,481 @@ +{ + "Flow.Begin": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Limeade", + "order": 100 + }, + "description": "The first shape to be executed in a Jibo Flow Editor procedure, only one allowed per procedure.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "inputParameters", + "description": "Prototype function text that is copied to provide input parms (and defaults) to this procedure when it is called from another procedure as a subflow. This code is just a text template and is not executed here.", + "defaultValue": "()=>{\n return {\n// parm1: 'parm1_default_value',\n// parm2: 'parm2_default_value'\n };\n}" + } + ] + }, + "Flow.Begin-Parallel": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Grass", + "order": 101 + }, + "description": "The beginning of an Asynchronous thread, more than one allowed per procedure. Execution commences when the page is invoked, simultaneously with the Flow.Begin on the page.", + "type": "leaf", + "options": [ + ] + }, + "Flow.Picture": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "white", + "text": "picture", + "title": "picture", + "order": 102 + }, + "description": "An image to display on the diagram as an annotation (not an activity that is executed at runtime).", + "type": "leaf", + "options": [ + { + "location": "", + "type": "string", + "field": "title", + "description": "The picture title.", + "defaultValue": "" + }, + { + "location": "", + "type": "image", + "field": "url", + "description": "The URI/Filename for the picture.", + "defaultValue": "" + }, + { + "location": "", + "type": "string", + "field": "caption", + "description": "The picture caption.", + "defaultValue": "" + } + ] + }, + "Flow.Comment": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "white", + "text": "notes", + "order": 103 + }, + "description": "A place to keep notes.", + "type": "leaf", + "options": [ + { + "location": "", + "type": "string", + "field": "text", + "description": "The text of the comment.", + "defaultValue": "" + } + ] + }, + "Flow.End": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Firecracker", + "order": 104 + }, + "description": "Ends execution of a Jibo Flow Editor procedure and returns to the calling procedure, or exits if this is the top-most procedure.", + "type": "leaf", + "options": [ + { + "location": "options", + "type": "Function", + "field": "getTransition", + "description": "Returns the string value that will be used as the Transition from the subflow activity (if undefined, the Flow.End activity name is used).", + "defaultValue": "() => { return ; }" + } + ] + }, + "Flow.Subflow": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Topaz", + "order": 105 + }, + "description": "Calls a subflow.", + "type": "leaf", + "options": [ + { + "type": "subflow", + "field": "subflowId", + "description": "path to subflow's .flow file (without the .flow extension)", + "defaultValue": "" + }, + { + "type": "Function", + "field": "inputParameters", + "description": "Returns the object that appears in the called subflow as 'notepad.params'.", + "defaultValue": "() => {return {}; }" + }, + { + "type": "Function", + "field": "getTransition", + "description": "Returns the transition result from the subflow.", + "defaultValue": "(subflow_result_object) => {\n return subflow_result_object.transition;\n}" + } + ] + }, + "Flow.Subtree": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Topaz", + "order": 106 + }, + "description": "Executes a behavior tree (.bt) as a single behavior and returns the status of the subtree.", + "type": "leaf", + "options": [ + { + "type": "Subtree", + "field": "behaviorPath", + "description": "Select a subtree.", + "defaultValue": "null" + }, + { + "type": "Function", + "field": "getNotepad", + "description": "Returns an object that will be this tree's notepad.", + "defaultValue": "() => {\n return {};\n}" + }, + { + "type": "Function", + "field": "onResult", + "description": "Returns the transition result from the subtree.", + "defaultValue": "(treeResult) => {\n\treturn treeResult.transition;\n}" + } + ] + }, + "Flow.Throw": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Grass", + "order": 107 + }, + "description": "Throws an exception (the name of the activity becomes the name of the exception thrown).", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getPayload", + "description": "Returns an object that will be made available as the 'payload' argument to Flow.Catch.", + "defaultValue": "() => {\n return {};\n}" + } + ] + }, + "Flow.Interrupt": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Limeade", + "order": 108 + }, + "description": "For use in Parallel threads; causes the Primary thread to take an exception, no matter where it is (the name of the activity becomes the name of the exception thrown).", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getPayload", + "description": "Returns an object that will be made available as the 'payload' argument to Flow.Catch.", + "defaultValue": "() => {\n return {};\n}" + } + ] + }, + "Flow.Catch": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Limeade", + "order": 109 + }, + "description": "Catches the exception given by the name of the activity.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getTransition", + "description": "Called with the actual Exception string and the return value from the Exception or Interrupt's getPayload() functions. Returns the Flow.Catch transition value.", + "defaultValue": "(exception, payload) => {\n\treturn '';\n}" + } + ] + }, + "Flow.Eval": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Grape", + "order": 110 + }, + "description": "Evaluates a Javascript function, the return value of the function becomes the activity result.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "Script", + "description": "The return value becomes the activity result.", + "defaultValue": "() => {\n return '';\n}" + } + ] + }, + "Flow.Eval-Async": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Grape", + "order": 111 + }, + "description": "Evaluates a Javascript function, the value passed to 'done' becomes the activity result.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "exec", + "description": "Function to be executed. The value passed to 'done' becomes the activity result.", + "defaultValue": "(done) => {\n done('');\n}" + }, + { + "type": "Function", + "field": "onStop", + "description": "Function to be executed when/if the activity receives a stop request.", + "defaultValue": "() => { }" + } + ] + }, + "Flow.Wait": { + "paletteInfo": { + "uses": [ + "xxx-disabled-flow" + ], + "color": "Grape", + "order": 112 + }, + "description": "Pauses for the specified number of milliseconds.", + "type": "leaf", + "options": [ + { + "type": "string", + "field": "ms_to_pause", + "description": "The number of milliseconds to pause.", + "defaultValue": "0" + } + ] + }, + "Mim": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Tangerine", + "order": 113 + }, + "description": "A Multimodal Interaction Module, for all your speaking needs.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getMimPath", + "description": "Return path to mim file (from project root)", + "defaultValue": "() => {\n\treturn 'mims/myMim.mim';\n}" + }, + { + "type": "Function", + "field": "getPromptData", + "description": "Get Prompt Data - Return variables for Mim prompt conditions and text replacement", + "defaultValue": "() => {\n\treturn {};\n}" + }, + { + "type": "Function", + "field": "onStatus", + "description": "MIM Status - provides incremental listen results.", + "defaultValue": "(status) => {\n\tlet mimState = status.state;\n\tlet asrResults = status.asrResults;\n\tlet speakerIds = status.speakerIds;\n}" + }, + { + "type": "Function", + "field": "onSuccess", + "description": "MIM Success - provides data on the end result of the MIM - a successful response.", + "defaultValue": "(results) => {\n\tlet mimState = results.state;\n\tlet asrResults = results.asrResults;\n\tlet speakerIds = results.speakerIds;\n\tlet transition = results.firstGrammarTag;\n\treturn transition;\n}" + }, + { + "type": "Function", + "field": "onFailure", + "description": "MIM Failure - provides data on the failure of the MIM - an overall failure due to no input or no matching response.", + "defaultValue": "(results) => {\n\tlet mimState = results.state;\n\tlet asrResults = results.asrResults;\n\tlet speakerIds = results.speakerIds;\n\tlet exception = results.exception;\n\treturn exception;\n}" + } + ] + }, + "Mim.Announcement": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Tennis", + "order": 114 + }, + "description": "A Multimodal Interaction Module that plays announcements.", + "type": "leaf", + "options": [ + { + "type": "mim", + "field": "mimPath", + "description": "path to mim file (from project root)", + "defaultValue": "" + }, + { + "type": "Function", + "field": "getPromptData", + "description": "Get Prompt Data - Return variables for Mim prompt conditions and text replacement", + "defaultValue": "() => {\n\treturn {};\n}" + } + ] + }, + "Mim.Optional-Response": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Twilight", + "order": 115 + }, + "description": "A Multimodal Interaction Module that plays an Announcement and waits briefly for a response.", + "type": "leaf", + "options": [ + { + "type": "mim", + "field": "mimPath", + "description": "path to mim file (from project root)", + "defaultValue": "" + }, + { + "type": "Function", + "field": "getPromptData", + "description": "Get Prompt Data - Return variables for Mim prompt conditions and text replacement", + "defaultValue": "() => {\n\treturn {};\n}" + }, + { + "type": "Function", + "field": "onStatus", + "description": "MIM Status - provides incremental listen results.", + "defaultValue": "(status) => {\n\tlet mimState = status.state;\n\tlet asrResults = status.asrResults;\n\tlet speakerIds = status.speakerIds;\n}" + }, + { + "type": "Function", + "field": "onSuccess", + "description": "MIM Success - provides data on the end result of the MIM - a successful response.", + "defaultValue": "(results) => {\n\tlet mimState = results.state;\n\tlet asrResults = results.asrResults;\n\tlet speakerIds = results.speakerIds;\n\tlet transition = results.firstGrammarTag;\n\treturn transition;\n}" + } + ] + }, + "Mim.Question": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Candy", + "order": 116 + }, + "description": "A Multimodal Interaction Module that plays an Announcement and waits indefinitely for a response.", + "type": "leaf", + "options": [ + { + "type": "mim", + "field": "mimPath", + "description": "path to mim file (from project root)", + "defaultValue": "" + }, + { + "type": "Function", + "field": "getPromptData", + "description": "Get Prompt Data - Return variables for Mim prompt conditions and text replacement", + "defaultValue": "() => {\n\treturn {};\n}" + }, + { + "type": "Function", + "field": "onStatus", + "description": "MIM Status - provides incremental listen results.", + "defaultValue": "(status) => {\n\tlet mimState = status.state;\n\tlet asrResults = status.asrResults;\n\tlet speakerIds = status.speakerIds;\n}" + }, + { + "type": "Function", + "field": "onSuccess", + "description": "MIM Success - provides data on the end result of the MIM - a successful response.", + "defaultValue": "(results) => {\n\tlet mimState = results.state;\n\tlet asrResults = results.asrResults;\n\tlet speakerIds = results.speakerIds;\n\tlet transition = results.firstGrammarTag;\n\treturn transition;\n}" + }, + { + "type": "Function", + "field": "onFailure", + "description": "MIM Failure - provides data on the failure of the MIM - an overall failure due to no input or no matching response.", + "defaultValue": "(results) => {\n\tlet mimState = results.state;\n\tlet asrResults = results.asrResults;\n\tlet speakerIds = results.speakerIds;\n\tlet exception = results.exception;\n\treturn exception;\n}" + } + ] + }, + "Menu": { + "paletteInfo": { + "uses": [ + "flow" + ], + "color": "Candy", + "order": 117 + }, + "description": "A self contained single stage menu.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getConfig", + "description": "Provide the menu config data.", + "defaultValue": "(loadCallback) => {\n\tloadCallback({});\n}" + }, + { + "type": "Function", + "field": "onMenuClosed", + "description": "Called when the menu is closed by the user or a timeout.", + "defaultValue": "(wasTimeout, menu, overrideMenuTransition, exception) => {\n\t//exception will be ~InteractionError.MenuTimeout or ~InteractionError.MenuClosed\n\treturn exception;\n}" + }, + { + "type": "Function", + "field": "onItemChosen", + "description": "Called when a user utterance matches the menu rule, or an item is selected", + "defaultValue": "(menuResult, menu, overrideMenuTransition) => {\n\treturn undefined;//return a transition here\n}" + }, + { + "type": "Function", + "field": "onPositionalSelect", + "description": "Called when a user tries to choose an item with positional selection - 'open the second one', etc", + "defaultValue": "(commandAsr, intendedIndex, menu) => {\n\t//Return an index to use, NaN to not select anything, or undefined to do the normal behavior (selecting intendedIndex)\n}" + } + ] + }, + "meta": { + "version": 1 + } +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema.json b/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema.json new file mode 100644 index 0000000..5a4fe96 --- /dev/null +++ b/node_modules/jibo-sdk/resources/externals/backward-compatibility/schemas/schema.json @@ -0,0 +1,492 @@ +{ + "Subtree": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 200}, + "description": "Executes a behavior tree (.bt) as a single behavior and returns the status of the subtree.", + "type": "leaf", + "options": [ + { + "type": "Subtree", + "field": "behaviorPath", + "description": "Select a subtree.", + "defaultValue": "null" + }, + { + "type": "Function", + "field": "getNotepad", + "description": "Enter optional information to return an object that will be this tree's notepad.", + "defaultValue": "() => {\n return {};\n}" + }, + { + "type": "Function", + "field": "onResult", + "description": "Enter optional code that will be called with the subtree's results with the subtree is done.", + "defaultValue": "(treeResult) => {\n}" + } + ] + }, + "SubtreeJs": { + "description": "Dynamically executes a behavior tree (.bt) as a single behavior. This behavior returns the status of the subtree.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getFileName", + "description": "Specify a subtree.", + "defaultValue": "(callback) => {\n}" + }, + { + "type": "Function", + "field": "getNotepad", + "description": "Enter optional information to return an object that will be this tree's notepad.", + "defaultValue": "() => {\n return {};\n}" + }, + { + "type": "Function", + "field": "onResult", + "description": "Enter optional code that will be called with the subtree's results with the subtree is done.", + "defaultValue": "(treeResult) => {\n}" + } + ] + }, + "PlayAnimation": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 201}, + "description": "Plays an animation file (.keys). Succeeds when the animation is finished.", + "type": "leaf", + "options": [ + { + "type": "Animation", + "field": "animPath", + "description": "Select the animation file to play.", + "defaultValue": "null" + }, + { + "type": "boolean", + "field": "cache", + "description": "True for caching the animation. False for single-play and destroy.", + "defaultValue": true + }, + { + "type": "boolean", + "field": "upload", + "description": "True for uploading to the GPU immediately.", + "defaultValue": true + }, + { + "type": "Function", + "field": "config", + "description": "Enter optional code to modify the animation's playback.", + "defaultValue": "(animation) => {\n}" + } + ] + }, + "PlayAudio": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 202}, + "description": "Plays a single audio source. The audio format is any format supported by HTML5 audio. Succeeds when the audio file is finished playing", + "type": "leaf", + "options": [ + { + "type": "Audio", + "field": "audioPath", + "description": "Enter the audio file path.", + "defaultValue": "null" + }, + { + "type": "boolean", + "field": "cache", + "description": "True for caching the audio. False for single-play and destroy.", + "defaultValue": true + } + ] + }, + "LookAt": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 203}, + "description": "Creates body and eye animations for looking at a point in 3D space", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getTarget", + "description": "Return the x, y, and z coordinates Jibo should look at.", + "defaultValue": "() => {\n return {x: 0, y: 0, z: 0};\n}" + }, + { + "type": "boolean", + "field": "isContinuous", + "description": "True for continuous mode look at. False for single-shot look at.", + "defaultValue": false + }, + { + "type": "Function", + "field": "config", + "description": "Enter optional code to modify the lookAt behavior.", + "defaultValue": "(lookAt) => {\n}" + } + ] + }, + "Blink": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 204}, + "description": "Animates Jibo's eye to blink once.", + "type": "leaf", + "options": [] + }, + "TextToSpeech": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 205}, + "description": "Creates speech output for Jibo.", + "type": "leaf", + "options": [ + { + "type": "SSML", + "field": "words", + "description": "Enter text for Jibo to say. Takes plain text or SSML markup.", + "defaultValue": "Hello" + }, + { + "type": "Function", + "field": "onWord", + "description" : "Enter optional code to execute each time Jibo says a single word.", + "defaultValue": "(word) => {\n}" + } + ] + }, + "TextToSpeechJs": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 206}, + "description": "Dynamically creates speech output for Jibo.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getWords", + "description": "Return what you want Jibo to say.", + "defaultValue": "(callback) => {\n callback('Hello');\n}" + }, + { + "type": "Function", + "field": "onWord", + "description": "Enter optional code to execute each time Jibo says a single word.", + "defaultValue": "(word) => {\n}" + } + ] + }, + "StartOnAnimEvent": { + "description": "Prevents the behavior it's decorating from starting until a specified event is received from an animation.", + "type": "decorator", + "options": [ + { + "type": "string", + "field": "eventName", + "description": "Specify the event name (set on the animation's Event Layer) on which the animation should start." + }, + { + "type": "Function", + "field": "onReceived", + "description": "Enter optional code to execute after the event is received but before the behavior starts.", + "defaultValue": "(animFileName, payload) => {\n}" + } + ] + }, + "StartOnEvent": { + "description": "Prevents behavior it's decorating from starting until specified event is received from the global emitter.", + "type": "decorator", + "options": [ + { + "type": "string", + "field": "eventName", + "description": "Specify the event name you want to listen for the component to start." + }, + { + "type": "Function", + "field": "onEvent", + "description": "This function is called after the event was received but before the component starts.", + "defaultValue": "() => {\n}" + } + ] + }, + "SucceedOnEvent": { + "description": "Forces the behavior it's decorating to succeed when an event is received from the global emitter.", + "type": "decorator", + "options": [ + { + "type": "string", + "field": "eventName", + "description": "Specify the event name you want to listen for the component to succeed." + }, + { + "type": "Function", + "field": "onEvent", + "description": "This function is called after the event was received along with any payload.", + "defaultValue": "() => {\n}" + } + ] + }, + "SucceedOnEmbedded": { + "description": "Succeeds a behavior upon hearing a built-in listening rule.", + "type": "decorator", + "options": [ + { + "type": ["enum", + { + "label": "Hey Jibo", + "display": "Hey Jibo", + "value": "hey_jibo" + } + ], + "field": "rule", + "description": "Specify the name of the embedded rule you want to listen for (hey_jibo).", + "defaultValue": "hey_jibo" + }, + { + "type": "Function", + "field": "onResult", + "description": "(listener), event emitter for hey-jibo (asr, spkr) and error events.", + "defaultValue": "(listener) => {\n\tlistener.on('hey-jibo', function(asrResult, speakerIds) {\n\n\t});\n}" + } + ] + }, + "ListenEmbedded": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 207}, + "description": "Listens only for an embedded rule (hey_jibo)", + "type": "leaf", + "options": [ + { + "type": ["enum", + { + "label": "Hey Jibo", + "display": "Hey Jibo", + "value": "hey_jibo" + } + ], + "field": "rule", + "description": "Specify the name of the embedded rule you want to listen for (hey_jibo).", + "defaultValue": "hey_jibo" + }, + { + "type": "Function", + "field": "onResult", + "description": "(listener), event emitter for hey-jibo (asr, spkr) and error events.", + "defaultValue": "(listener) => {\n\tlistener.on('hey-jibo', function(asrResult, speakerIds) {\n\n\t});\n}" + } + ] + }, + "Listen": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 208}, + "description": "Tells Jibo to listen for auditory input using Natural Language Understanding (NLU).", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getOptions", + "description": "Set the dictionary of options that will be returned for the listening task.", + "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" + }, + { + "type": "Rule", + "field": "rule", + "description": "Specify the file path for the rule to use to parse Listen results.", + "defaultValue": "null" + }, + { + "type": "Function", + "field": "onResult", + "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for hey-jibo (asr, spkr) and timeout() events.", + "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" + } + ] + }, + "SucceedOnListen": { + "description": "Succeeds a behavior upon hearing a custom Natural Language Understand (NLU) rule.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "getOptions", + "description": "Set the dictionary of options that will be returned for the listening task.", + "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" + }, + { + "type": "Rule", + "field": "rule", + "description": "Specify the file path for the rule to use to parse Listen results.", + "defaultValue": "null" + }, + { + "type": "Function", + "field": "onResult", + "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for hey-jibo (asr, spkr) and timeout() events.", + "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" + } + ] + }, + "ListenJs": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 209}, + "description": "Tells Jibo to listen for auditory input using Natural Language Understanding (NLU).", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getOptions", + "description": "Set the dictionary of options that will be returned for the listening task.", + "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" + }, + { + "type": "Function", + "field": "getRule", + "description": "Pass a custom listening rule into the callback.", + "defaultValue": "(callback) => {\n callback(\"TopRule = $* Hello World $*;\");\n}" + }, + { + "type": "Function", + "field": "onResult", + "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for cloud (asr, spkr), hey-jibo (asr, spkr), timeout (), incremental (asr, stop()), and end-of-speech() results.", + "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" + } + ] + }, + "SucceedOnListenJs": { + "description": "Succeeds a behavior upon hearing a custom Natural Language Understand (NLU) rule.", + "type": "decorator", + "options": [ + { + "type": "Function", + "field": "getOptions", + "description": "Set the dictionary of options that will be returned for the listening task.", + "defaultValue": "() => {\n let options = {\n heyJibo: false,\n detectEnd: false,\n incremental: false,\n authenticateSpeaker: ''\n }\n return options;\n}" + }, + { + "type": "Function", + "field": "getRule", + "description": "Pass a custom listening rule into the callback.", + "defaultValue": "() => {\n callback(\"TopRule = $* Hello World $*;\");\n}" + }, + { + "type": "Function", + "field": "onResult", + "description": "Enter code to execute when Jibo has heard input. (listener), event emitter for cloud (asr, spkr), hey-jibo (asr, spkr), timeout (), incremental (asr, stop()), and end-of-speech() results.", + "defaultValue": "(listener) => {\n listener.on('cloud', function(asrResult, speakerIds) {\n\n });\n}" + } + ] + }, + "TakePhoto": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 210}, + "description": "Attempts to take a photo and return the image url in the onPhoto callback", + "type": "leaf", + "options": [ + { + "type": ["enum", + { + "label": "Small (672x380) - coming soon!", + "display": "Small (672x380)", + "value": 1 + }, + { + "label": "Medium (1280x720)", + "display": "Medium (1280x720)", + "value": 2 + }, + { + "label": "Large (1920x1080) - coming soon!", + "display": "Large (1920x1080)", + "value": 3 + }, + { + "label": "X-Large (2688x1520) - coming soon!", + "display": "X-Large (2688x1520)", + "value": 4 + } + ], + "field": "resolution", + "description": "Specify the resolution of the photo you want to take.", + "defaultValue": 2 + }, + { + "type": "Function", + "field": "onPhoto", + "description" : "Set optional code to execute after the photo is taken. If successful, returns imageUrl; otherwise, returns error.", + "defaultValue": "(error, imageUrl) => {\n}" + }, + { + "type": "boolean", + "field": "noDistortion", + "description": "True to remove camera distortion from the photo. False to keep camera distortion on the photo.", + "defaultValue": true + } + ] + }, + "ReadBarcode": { + "paletteInfo": {"uses": ["flow", "bt"], "color": "JiboBlue", "order": 211}, + "description": "Attempts to read a barcode or QRcode and returns the barcode data", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "onBarcode", + "description" : "Enter the code that will be called when the barcode is read. If successful, returns barcode/QRcode data; otherwise, returns error.", + "defaultValue": "(error, data) => {\n}" + } + ] + }, + "Mim": { + "paletteInfo": {"uses": ["bt"], "color": "JiboBlue", "order": 212}, + "description": "A Multimodal Interaction Module, for all your speaking needs.", + "type": "leaf", + "options": [ + { + "type": "mim", + "field": "mimPath", + "description": "path to mim file (from project root)", + "defaultValue": "" + }, + { + "type": "Function", + "field": "getPromptData", + "description": "Return variables for Mim prompt conditions and text replacement", + "defaultValue": "() => {\n\treturn {};\n}" + }, + { + "type": "Function", + "field": "onStatus", + "description": "provides incremental listen results.", + "defaultValue": "(status) => {\n\tlet mimState = status.state;\n\tlet asrResults = status.asrResults;\n\tlet speakerIds = status.speakerIds;\n}" + }, + { + "type": "Function", + "field": "onSuccess", + "description": "provides data on the end result of the MIM - a successful response.", + "defaultValue": "(results) => {\n\tlet mimState = results.state;\n\tlet asrResults = results.asrResults;\n\tlet speakerIds = results.speakerIds;\n}" + } + ] + }, + "Menu": { + "paletteInfo": {"uses": ["bt"], "color": "JiboBlue", "order": 213}, + "description": "A self contained single stage menu.", + "type": "leaf", + "options": [ + { + "type": "Function", + "field": "getConfig", + "description": "Provide the menu config data.", + "defaultValue": "(loadCallback) => {\n\tloadCallback({});\n}" + }, + { + "type": "Function", + "field": "onMenuClosed", + "description": "Called when the menu is closed by the user or a timeout.", + "defaultValue": "(wasTimeout, menu, overrideMenuTransition) => {\n}" + }, + { + "type": "Function", + "field": "onItemChosen", + "description": "Called when a user utterance matches the menu rule, or an item is selected", + "defaultValue": "(menuResult, menu, overrideMenuTransition) => {\n}" + }, + { + "type": "Function", + "field": "onPositionalSelect", + "description": "Called when a user tries to choose an item with positional selection - 'open the second one', etc", + "defaultValue": "(commandAsr, intendedIndex, menu) => {\n\t//Return an index to use, NaN to not select anything, or undefined to do the normal behavior (selecting intendedIndex)\n}" + } + ] + }, + "meta": { + "version": 1 + } +} diff --git a/node_modules/jibo-sdk/resources/externals/go-debug.js b/node_modules/jibo-sdk/resources/externals/go-debug.js new file mode 100644 index 0000000..0341dca --- /dev/null +++ b/node_modules/jibo-sdk/resources/externals/go-debug.js @@ -0,0 +1,40332 @@ +/* + * GoJS v1.6.18 JavaScript Library for HTML Diagrams + * Northwoods Software, https://www.nwoods.com/ + * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. + * Copyright (C) 1998-2016 by Northwoods Software Corporation. All Rights Reserved. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.6.18/doc/license.html. + */ +(function(window) { + var f, aa = {}; + if (!window.document || void 0 === window.document.createElement("canvas").getContext) throw window.console && window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."), Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."); + if (!Object.defineProperty) throw Error("GoJS requires a newer version of JavaScript"); + Function.prototype.bind || (Function.prototype.bind = function(a) { + function b() { + return g.apply(a, e.concat(d.call(arguments))) + } + + function c() {} + var d = Array.prototype.slice, + e = d.call(arguments, 1), + g = this; + c.prototype = this.prototype; + b.prototype = new c; + return b + }); + (function() { + for (var a = 0, b = ["ms", "moz", "webkit", "o"], c = 0; c < b.length && !window.requestAnimationFrame; ++c) window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"]; + window.requestAnimationFrame || (window.requestAnimationFrame = function(b) { + var c = (new Date).getTime(), + g = Math.max(8, 16 - (c - a)), + h = window.setTimeout(function() { + b(c + g) + }, g); + a = c + g; + return h + }); + window.cancelAnimationFrame || (window.cancelAnimationFrame = + function(a) { + window.clearTimeout(a) + }) + })(); + var u = { + bj: !1, + Rz: !1, + mE: !1, + BH: !1, + fF: !1, + EE: !1, + ut: null, + enableBoundsInfo: function(a) { + u.bj = !0; + a && a.Sp() + }, + disableBoundsInfo: function(a) { + u.bj = !1; + a && (ca(a.gd, !0), a.Sp()) + }, + jE: function(a, b) { + void 0 === a && (a = u.ut); + void 0 === b && (b = a.Fl("").mb); + var c = b.length, + d = a.gd; + d.fillStyle = "rgba(255,255,0,.3)"; + for (var e = 0; e < c; e++) { + var g = b.ea(e), + h = g.W; + if (null !== g.va) u.jE(a, g.va); + else { + var k = g.zk.copy(); + k.vA(g.Hd); + d.save(); + d.transform(k.m11, k.m12, k.m21, k.m22, k.dx, k.dy); + d.fillRect(h.x, h.y, h.width, h.height); + d.restore() + } + } + }, + kE: function(a, + b) { + a || (a = u.ut); + b || (b = a.Fl("").mb); + var c = a.gd, + d = b.length; + c.fillStyle = "rgba(0,0,255,.3)"; + for (var e = 0; e < d; e++) { + var g = b.ea(e), + h = g.Ga, + k = g.zk; + null !== g.va ? u.kE(a, g.va) : (c.save(), c.transform(k.m11, k.m12, k.m21, k.m22, k.dx, k.dy), c.fillRect(h.x, h.y, h.width, h.height), c.restore()) + } + }, + wH: function(a, b) { + a || (a = u.ut); + b || (b = a.Fl("").mb); + var c = a.gd, + d = b.length; + c.fillStyle = "rgba(0,0,255,.3)"; + for (var e = 0; e < d; e++) { + var g = b.ea(e), + h = g.Ia, + k = g.zk; + null !== g.va ? u.wH(a, g.va) : (c.save(), c.transform(k.m11, k.m12, k.m21, k.m22, k.dx, k.dy), + c.fillRect(h.x || 0, h.y || 0, h.width, h.height), c.restore()) + } + }, + vK: function() { + u.kE(); + u.jE() + }, + wK: function(a) { + a || (a = u.ut); + var b = a.ad; + a = a.gd; + a.strokeStyle = "rgba(0,255,0,.9)"; + a.rect(b.x, b.y, b.width, b.height); + a.stroke() + }, + lE: function(a, b) { + b.fillStyle = "red"; + b.fillRect(0, 0, 8, 8); + b.lineWidth = 8; + b.strokeStyle = "rgba(255,255,0,.6)"; + var c = a.xb; + b.rect(c.x, c.y, c.width, c.height); + b.stroke(); + b.fillStyle = "rgba(0,255,0,.2)"; + b.fillRect(a.ad.x, a.ad.y, a.ad.width, a.ad.height) + }, + xH: function(a, b) { + b instanceof da || (a.lineWidth = 2, a.strokeStyle = + "rgba(255,0,0,.5)", a.rect(b.Xb.x, b.Xb.y, b.Xb.width, b.Xb.height), a.stroke(), void 0 !== b.stroke && (a.strokeStyle = b.stroke), void 0 !== b.Oe && (a.lineWidth = b.Oe), null !== b.U && b.U.type === ga && (a.lineWidth = 1, a.strokeStyle = "rgba(10,200,10,.6)", void 0 !== b.stroke && (a.strokeStyle = b.stroke), void 0 !== b.Oe && (a.lineWidth = b.Oe))) + }, + yH: function(a, b) { + a.lineWidth = 1; + a.strokeStyle = "rgba(0,0,255,.5)"; + a.rect(b.Ga.x, b.Ga.y, b.Ga.width, b.Ga.height); + a.stroke(); + void 0 !== b.stroke && (a.strokeStyle = b.stroke); + void 0 !== b.Oe && (a.lineWidth = + b.Oe) + }, + Qz: function(a, b, c) { + a.setTransform(1, 0, 0, 1, 0, 0); + a.scale(b.jd, b.jd); + a.transform(c.m11, c.m12, c.m21, c.m22, c.dx, c.dy); + c = b.Yb.length; + for (var d = 0; d < c; d++) + for (var e = b.Yb.ea(d), g = e.mb.length, h = 0; h < g; h++) { + var k = e.mb.ea(h); + if (void 0 !== k.location && null !== k.location) { + if (k.location.F()) { + var l = k.location.x, + m = k.location.y; + a.beginPath(); + a.strokeStyle = "limegreen"; + a.lineWidth = 2; + a.moveTo(l, m + 6); + a.lineTo(l, m); + a.lineTo(l + 6, m); + a.moveTo(l, m); + a.lineTo(l + 10, m + 20); + a.stroke() + } + l = k.position.x; + m = k.position.y; + a.beginPath(); + a.strokeStyle = "red"; + a.lineWidth = 2; + a.moveTo(l, m + 6); + a.lineTo(l, m); + a.lineTo(l + 6, m); + a.moveTo(l, m); + a.lineTo(l + 20, m + 10); + a.stroke() + } + } + a.setTransform(1, 0, 0, 1, 0, 0) + }, + xK: function(a, b, c) { + var d = a.length; + b.fillStyle = "rgba(255,0,0,.1)"; + for (var e = 0; e < d; e++) { + var g, h = a[e]; + g = c.Hd; + var k = h.x, + l = h.y, + m = k + h.width, + n = l + h.height, + p = g.m11, + q = g.m12, + r = g.m21, + s = g.m22, + t = g.dx, + v = g.dy, + x = k * p + l * r + t, + h = k * q + l * s + v; + g = m * p + l * r + t; + var l = m * q + l * s + v, + y = k * p + n * r + t, + k = k * q + n * s + v, + p = m * p + n * r + t, + m = m * q + n * s + v, + n = x, + q = h, + n = Math.min(n, g), + x = Math.max(x, g), + q = Math.min(q, + l), + h = Math.max(h, l), + n = Math.min(n, y), + x = Math.max(x, y), + q = Math.min(q, k), + h = Math.max(h, k), + n = Math.min(n, p), + x = Math.max(x, p), + q = Math.min(q, m), + h = Math.max(h, m); + g = new w(n, q, x - n, h - q); + b.fillRect(g.x, g.y, g.width, g.height) + } + }, + zH: function(a, b, c, d, e) { + a.fillStyle = "rgba(0,255,0,.2)"; + a.fillRect(b, c, d, e) + }, + AH: function(a, b, c) { + a.save(); + var d = b.Hd; + d.reset(); + 1 !== b.scale && d.scale(b.scale); + b = b.position; + 0 === b.x && 0 === b.y || d.translate(-b.x, -b.y); + a.setTransform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy); + c = c.Yc.o; + d = c.length; + for (b = 0; b < d; b++) { + var e = + c[b]; + a.beginPath(); + a.moveTo(e.x - 4, e.y); + a.lineTo(e.x + 4, e.y); + a.moveTo(e.x, e.y - 4); + a.lineTo(e.x, e.y + 4); + a.lineWidth = 2; + a.strokeStyle = "rgba(255,0,0,.9)"; + a.stroke() + } + a.restore() + }, + tK: function(a) { + a || (a = u.ut); + for (a = a.mn; a.next();) z.trace(a.value.toString()) + }, + nL: function(a, b) { + var c = b.lo(a), + d = b.Qb; + d.te = b.aB(c); + d.ga = c; + return ha(b, d, a) + }, + iL: function(a, b) { + b.pe(a.ga) && (b.gd.fillStyle = "lime", b.gd.fillRect(a.te.x, a.te.y, 1 * b.scale, 1 * b.scale)) + }, + jL: function(a) { + var b = ja(a, !1, null, null); + if (!b.yp) { + a = a.gd; + for (var c = 0; c <= b.Om; c++) + for (var d = + 0; d <= b.Pm; d++) { + var e = b.lc[c][d]; + if (0 !== e) { + var g = c * b.Rd + b.Sf, + h = d * b.zd + b.Tf; + 0 !== e && (a.fillStyle = "rgba(255, 0, 0, .2)", a.fillRect(g, h, b.Rd, b.zd)); + 999999 <= e || (e %= 10, a.fillStyle = "blue", a.fillText(e.toString(), g, h + b.zd)) + } + } + } + }, + dumpReferences: function(a) { + if (a instanceof C) + for (a = a.mn; a.next();) { + var b = a.value; + z.trace(b.toString()); + for (b = b.ni; b.next();) u.dumpReferences(b.value) + } else if (a instanceof D) { + z.trace("References for " + a); + null !== a.layer && z.trace(" " + a.layer.toString() + ' LayerName: "' + a.If + '"'); + a.vn !== + a && z.trace(" SelectionObject: " + a.vn.toString() + ' SelectionObjectName: "' + a.Ix + '"'); + a.Zb !== a && z.trace(" LocationObject: " + a.Zb.toString() + ' LocationObjectName: "' + a.sx + '"'); + if (a.Wg) { + for (var c = "", b = a.Wg.i; b.next();) c += b.key + " "; + z.trace(" Adornments: " + c) + } + null !== a.Va && z.trace(" ContainingGroup: " + a.Va.toString()); + if (a instanceof E) { + if (a.Dd) + for (b = a.Dd.i; b.next();); + if (0 < a.ee.count) { + c = ""; + for (b = a.ee; b.next();) c += b.value.toString() + ", "; + z.trace(" Links: " + c) + } + null !== a.Nd && z.trace(" LabeledLink: " + a.Nd.toString()); + if (a instanceof F) { + z.trace(" Placeholder: " + a.placeholder); + c = ""; + for (b = a.Hc; b.next();) c += b.value.toString() + ", "; + z.trace(" Members: " + c); + c = ""; + for (b = a.wm.i; b.next();) c += b.value.toString() + ", "; + z.trace(" NestedGroups: " + c); + z.trace(" Layout: " + a.Sb) + } + } else if (a instanceof G) { + z.trace(" Path: " + a.path); + z.trace(" From: " + a.Y + " " + a.md + ' "' + a.$f + '"'); + z.trace(" To: " + a.da + " " + a.Qd + ' "' + a.Ug + '"'); + c = ""; + for (b = a.Hf; b.next();) c += b.value.toString() + ", "; + z.trace(" LabelNodes: " + c) + } + } + }, + dumpVisualTree: function(a) { + if (a instanceof C) + for (a = a.mn; a.next();) { + var b = a.value; + z.trace(b.toString()); + for (b = b.ni; b.next();) u.dumpVisualTree(b.value) + } else a instanceof D && (b = " ", a.$D && (b += "c"), a.dE && (b += "d"), a.CE && (b += "g"), a.dF && (b += "m"), a.sF && (b += "h"), a.tF && (b += "z"), a.yF && (b += "o"), a.vk && (b += "s"), a.RF && (b += "t"), a.GF && (b += "A"), a.jx && (b += "B"), a.jA && (b += "L"), a.kb && (b += "S"), a.sk && (b += "H"), u.bC(a, 1, b)) + }, + bC: function(a, b, c) { + for (var d = "", e = 0; e < b; e++) d += " "; + d += a.toString(); + c && (d += c); + c = " "; + c = a.visible ? c + "v" : c + "~"; + a.ig && (c += "p"); + a.Ff && (c += "m"); + a.Mt && + (c += "a"); + d += c; + if (0 !== a.Vb || 0 !== a.column) d += " [" + a.Vb + "," + a.column + "]"; + d += " " + a.W.toString(); + a.Aa.F() && (d += " d:" + a.Aa.toString()); + a.Ga.F() && (d += " n:" + a.Ga.toString()); + 1 !== a.scale && (d += " s:" + a.scale); + 0 !== a.angle && (d += " a:" + a.angle); + null !== a.background && (d += " b:" + a.background.toString()); + null !== a.vl && (d += " a:" + a.background.toString()); + a instanceof I && (d += " elts:" + a.va.count, 0 !== a.WF && (d += " top:" + a.WF), 0 !== a.XE && (d += " left:" + a.XE), null !== a.Tt && (d += " itemArray#:" + z.bb(a.Tt)), a.lI && (d += " cat:" + a.lI), null !== + a.data && (d += " data:" + a.data)); + null !== a.yd && (d += ' portId: "' + a.yd + '"'); + z.trace(d); + if (a instanceof I) + for (a = a.elements; a.next();) u.bC(a.value, b + 1, "") + }, + zK: function(a) { + z.trace("DelayedReferences (" + a.ng.count + ")"); + for (a = a.ng.i; a.next();) { + for (var b = "", c = a.value.i; c.next();) b += ka(c.value) + ", "; + z.trace(" " + a.key + ": " + b) + } + }, + OD: function(a, b) { + if (!z.Za(b) || b instanceof Element || b instanceof CanvasRenderingContext2D || b instanceof la || b instanceof ma) return ""; + var c = "", + d; + for (d in b) + if ("string" !== typeof d) "" === c && + (c = b + "\n"), c += " " + d + " is not a string property\n"; + else if ("_" !== d.charAt(0) && !(2 >= d.length)) { + var e = z.tb(b, d); + if (null !== e && "function" !== typeof e) { + if (b.hasOwnProperty(d)) { + var g = Object.getPrototypeOf(b); + if (g && g.Yv && g.Yv[d]) continue + } else if (z.ex(b, d)) continue; + "" === c && (c = b + "\n"); + c += ' unknown property "' + d + '" has value: ' + e + " at " + a + "\n" + } + } + return c + }, + Lw: function(a, b) { + if (null !== b && void 0 !== b && "number" !== typeof b && "string" !== typeof b && "boolean" !== typeof b && "function" !== typeof b) + if (void 0 !== z.nd(b)) { + if (!u.mw.contains(b)) + if (u.mw.add(b), + u.Mv.add(u.OD(a, b)), b instanceof J || b instanceof K || b instanceof na) + for (var c = b.i; c.next();) u.Lw(a + "[" + c.key + "]", c.value); + else + for (c in b) { + var d = z.tb(b, c); + if (void 0 !== d && null !== d && z.Za(d) && d !== b.Yv) { + if (b instanceof qa) { + if (d === b.Nj) continue + } else if (b instanceof I) { + if ("data" === c || d === b.fe) continue; + if ("itemArray" === c || d === b.Ii) continue; + if (b instanceof D && d === b.il) continue + } else if (!(b instanceof C)) + if (b instanceof ra) { + if ("archetypeGroupData" === c || d === b.iy) continue + } else if (b instanceof ta) { + if ("archetypeLinkData" === + c || d === b.ky) continue; + if ("archetypeLabelNodeData" === c || d === b.jy) continue + } else if (b instanceof va) { + if ("archetypeNodeData" === c || d === b.Mk) continue + } else if (b instanceof M) { + if ("nodeDataArray" === c || d === b.wf) continue; + if ("linkDataArray" === c || d === b.vf || d === b.sm) continue; + if (d === b.vc) continue; + if (d === b.ng) continue + } else if (b instanceof wa || b instanceof xa || b instanceof ya) continue; + u.Lw(a + "." + c, d) + } + } + } else if (Array.isArray(b)) + for (c = 0; c < b.length; c++) u.Lw(a + "[" + c + "]", b[c]); + else u.Mv.add(u.OD(a, b)) + }, + checkProperties: function(a) { + void 0 === + u.mw ? u.mw = new K(Object) : u.mw.clear(); + u.Mv = new za; + u.Lw("", a); + a = u.Mv.toString(); + u.Mv = null; + return a + } + }; + aa.Debug = u; + var z = { + pd: 1, + Tc: 2, + fd: 4, + ed: 8, + jn: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("534.30") && 0 < window.navigator.userAgent.indexOf("Android"), + NE: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("MSIE 10.0"), + OE: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("Trident/7"), + GK: void 0 !== window.navigator && 0 < window.navigator.userAgent.indexOf("Edge/"), + rk: void 0 !== window.navigator && void 0 !== window.navigator.platform && 0 <= window.navigator.platform.toUpperCase().indexOf("MAC"), + PE: void 0 !== window.navigator && void 0 !== window.navigator.platform && null !== window.navigator.platform.match(/(iPhone|iPod|iPad)/i), + aE: function(a, b, c) { + var d = -1; + return function() { + var e = this, + g = arguments; - 1 !== d && z.clearTimeout(d); + d = z.setTimeout(function() { + d = -1; + c || a.apply(e, g) + }, b); + c && !d && a.apply(e, g) + } + }, + setTimeout: function(a, b) { + return window.setTimeout(a, b) + }, + clearTimeout: function(a) { + window.clearTimeout(a) + }, + createElement: function(a) { + return window.document.createElement(a) + }, + k: function(a) { + throw Error(a); + }, + oa: function(a, + b) { + var c = "The object is frozen, so its properties cannot be set: " + a.toString(); + void 0 !== b && (c += " to value: " + b); + z.k(c) + }, + l: function(a, b, c, d) { + a instanceof b || (c = z.getTypeName(c), void 0 !== d && (c += "." + d), z.ic(a, b, c)) + }, + g: function(a, b, c, d) { + typeof a !== b && (c = z.getTypeName(c), void 0 !== d && (c += "." + d), z.ic(a, b, c)) + }, + p: function(a, b, c) { + "number" === typeof a && isFinite(a) || (b = z.getTypeName(b), void 0 !== c && (b += "." + c), z.k(b + " must be a real number type, and not NaN or Infinity: " + a)) + }, + Ba: function(a, b, c, d) { + a instanceof + Ba && a.ze === b || (c = z.getTypeName(c), void 0 !== d && (c += "." + d), z.ic(a, "a constant of class " + z.kf(b), c)) + }, + ot: function(a, b) { + "string" === typeof a ? Ca(a) || z.k('Color "' + a + '" is not a valid color string for ' + b) : a instanceof Da || z.k("Value for " + b + " must be a color string or a Brush, not " + a) + }, + ic: function(a, b, c, d) { + b = z.getTypeName(b); + c = z.getTypeName(c); + void 0 !== d && (c += "." + d); + "string" === typeof a ? z.k(c + " value is not an instance of " + b + ': "' + a + '"') : z.k(c + " value is not an instance of " + b + ": " + a) + }, + ka: function(a, + b, c, d) { + c = z.getTypeName(c); + void 0 !== d && (c += "." + d); + z.k(c + " is not in the range " + b + ": " + a) + }, + od: function(a) { + z.k(z.kf(a) + " constructor cannot take any arguments.") + }, + Sa: function(a) { + z.k("Collection was modified during iteration: " + a.toString() + "\n Perhaps you should iterate over a copy of the collection,\n or you could collect items to be removed from the collection after the iteration.") + }, + trace: function(a) { + window.console && window.console.log(a) + }, + Za: function(a) { + return "object" === typeof a && null !== a + }, + isArray: function(a) { + return Array.isArray(a) || + a instanceof NodeList || a instanceof HTMLCollection + }, + gI: function(a) { + return Array.isArray(a) + }, + nt: function(a, b, c) { + z.isArray(a) || z.ic(a, "Array or NodeList or HTMLCollection", b, c) + }, + bb: function(a) { + return a.length + }, + zl: function(a) { + return Array.prototype.slice.call(a) + }, + Ya: function(a, b) { + Array.isArray(a); + return a[b] + }, + LD: function(a, b, c) { + Array.isArray(a) ? a[b] = c : z.k("Cannot replace an object in an HTMLCollection or NodeList at " + b) + }, + Dz: function(a, b) { + if (Array.isArray(a)) return a.indexOf(b); + for (var c = a.length, d = + 0; d < c; d++) + if (a[d] === b) return d; + return -1 + }, + aj: function(a, b, c) { + Array.isArray(a) ? b >= a.length ? a.push(c) : a.splice(b, 0, c) : z.k("Cannot insert an object into an HTMLCollection or NodeList: " + c + " at " + b) + }, + hi: function(a, b) { + Array.isArray(a) ? b >= a.length ? a.pop() : a.splice(b, 1) : z.k("Cannot remove an object from an HTMLCollection or NodeList at " + b) + }, + Yx: [], + O: function() { + var a = z.Yx.pop(); + return void 0 === a ? new N : a + }, + Tb: function(a, b) { + var c = z.Yx.pop(); + if (void 0 === c) return new N(a, b); + c.x = a; + c.y = b; + return c + }, + A: function(a) { + z.Yx.push(a) + }, + nB: [], + Xl: function() { + var a = z.nB.pop(); + return void 0 === a ? new Ea : a + }, + pk: function(a) { + z.nB.push(a) + }, + Zx: [], + kg: function() { + var a = z.Zx.pop(); + return void 0 === a ? new w : a + }, + yk: function(a, b, c, d) { + var e = z.Zx.pop(); + if (void 0 === e) return new w(a, b, c, d); + e.x = a; + e.y = b; + e.width = c; + e.height = d; + return e + }, + dc: function(a) { + z.Zx.push(a) + }, + oB: [], + Fh: function() { + var a = z.oB.pop(); + return void 0 === a ? new Fa : a + }, + jf: function(a) { + z.oB.push(a) + }, + $x: null, + v: function() { + var a = z.$x; + return null !== a ? (z.$x = null, a) : new Ga + }, + u: function(a) { + a.reset(); + z.$x = a + }, + mB: [], + rb: function() { + var a = z.mB.pop(); + return void 0 === a ? [] : a + }, + xa: function(a) { + a.length = 0; + z.mB.push(a) + }, + xj: Object.freeze([]), + am: 1, + kc: function(a) { + a.__gohashid = z.am++ + }, + It: function(a) { + var b = a.__gohashid; + void 0 === b && (b = z.am++, a.__gohashid = b); + return b + }, + nd: function(a) { + return a.__gohashid + }, + ia: function(a, b) { + b.py = a; + aa[a] = b + }, + Qa: function(a, b) { + function c() {} + c.prototype = b.prototype; + a.prototype = new c; + a.prototype.constructor = a + }, + ii: function(a) { + a.CG = !0 + }, + defineProperty: function(a, b, c, d, e) { + z.g(a, "function", "Util.defineProperty:classfunc"); + z.g(b, "object", "Util.defineProperty:propobj"); + z.g(c, "function", "Util.defineProperty:getter"); + z.g(d, "function", "Util.defineProperty:setter"); + for (var g in b) { + b = b[g]; + c = { + get: c, + set: d, + enumerable: !0 + }; + if (void 0 !== e) + for (var h in e) c[h] = e[h]; + Object.defineProperty(a.prototype, g, c); + e = Object.getOwnPropertyDescriptor(a.prototype, g); + b && e && Object.defineProperty(a.prototype, b, e); + break + } + }, + GJ: !1, + w: function(a, b, c, d) { + z.g(a, "function", "Util.defineReadOnlyProperty:classfunc"); + z.g(b, "object", "Util.defineReadOnlyProperty:propobj"); + z.g(c, "function", "Util.defineReadOnlyProperty:getter"); + for (var e in b) { + var g = b[e]; + b = { + get: c, + set: function(a) { + z.k('The property "' + g + '" is read-only and cannot be set to ' + a) + }, + enumerable: !0 + }; + if (void 0 !== d) + for (var h in d) b[h] = d[h]; + Object.defineProperty(a.prototype, e, b); + d = Object.getOwnPropertyDescriptor(a.prototype, e); + g && d && Object.defineProperty(a.prototype, g, d); + break + } + }, + Yd: function(a, b) { + for (var c in b) b[c] = !0; + a.prototype.Yv = b + }, + getTypeName: function(a) { + return void 0 === a ? "" : "string" === typeof a ? a : "function" === + typeof a ? z.kf(a) : null === a ? "*" : "" + }, + kf: function(a) { + if ("function" === typeof a) { + if (a.py) return a.py; + if (a.name) return a.name; + var b = a.toString(), + c = b.indexOf("("), + b = b.substring(9, c).trim(); + if ("" !== b) return a.py = b + } else if ("object" === typeof a && a.constructor) return z.kf(a.constructor); + return typeof a + }, + s: function(a, b, c) { + z.g(a, "function", "Util.defineEnumValue:classfunc"); + z.g(b, "string", "Util.defineEnumValue:name"); + z.g(c, "number", "Util.defineEnumValue:num"); + c = new Ba(a, b, c); + Object.freeze(c); + a[b] = c; + var d = a.Fu; + d instanceof + na || (d = new na("string", Ba), a.Fu = d); + d.add(b, c); + return c + }, + tb: function(a, b) { + if (!a || !b) return null; + var c = void 0; + try { + "function" === typeof b ? c = b(a) : "function" === typeof a.getAttribute ? (c = a.getAttribute(b), null === c && (c = void 0)) : c = a[b] + } catch (d) { + u && z.trace("property get error: " + d.toString()) + } + return c + }, + Ra: function(a, b, c) { + if (a && b) try { + "function" === typeof b ? b(a, c) : "function" === typeof a.setAttribute ? a.setAttribute(b, c) : a[b] = c + } catch (d) { + u && z.trace("property set error: " + d.toString()) + } + }, + qu: function(a, b) { + z.g(a, "object", + "Setting properties requires Objects as arguments"); + z.g(b, "object", "Setting properties requires Objects as arguments"); + var c = a instanceof I, + d = a instanceof C, + e; + for (e in b) { + "" === e && z.k("Setting properties requires non-empty property names"); + var g = a, + h = e; + if (c || d) { + var k = e.indexOf("."); + if (0 < k) { + var l = e.substring(0, k); + if (c) g = a.oe(l); + else if (g = a[l], void 0 === g || null === g) g = a.hb[l]; + z.Za(g) ? h = e.substr(k + 1) : z.k("Unable to find object named: " + l + " in " + a.toString() + " when trying to set property: " + e) + } + } + if ("_" !== + h[0] && !z.ex(g, h)) + if (d && "ModelChanged" === h) { + a.QG(b[h]); + continue + } else if (d && "Changed" === h) { + a.Rm(b[h]); + continue + } else if (d && z.ex(a.hb, h)) g = a.hb; + else if (d && Ia(a, h)) { + a.yz(h, b[h]); + continue + } else if (a instanceof M && "Changed" === h) { + a.Rm(b[h]); + continue + } else z.k('Trying to set undefined property "' + h + '" on object: ' + g.toString()); + g[h] = b[e]; + "_" === h[0] && g instanceof O && g.NG(h) + } + }, + ex: function(a, b) { + if (a.hasOwnProperty(b)) return !0; + for (var c = Object.getPrototypeOf(a); c && c !== Function;) { + if (c.hasOwnProperty(b)) return !0; + var d = c.Yv; + if (d && d[b]) return !0; + c = Object.getPrototypeOf(c) + } + return !1 + }, + VI: function(a) { + for (var b = [], c = 0; 256 > c; c++) b[c] = c; + for (var d = 0, e = 0, c = 0; 256 > c; c++) d = (d + b[c] + 119) % 256, e = b[c], b[c] = b[d], b[d] = e; + for (var d = c = 0, g = "", h = 0; h < a.length; h++) c = (c + 1) % 256, d = (d + b[c]) % 256, e = b[c], b[c] = b[d], b[d] = e, g += String.fromCharCode(a.charCodeAt(h) ^ b[(b[c] + b[d]) % 256]); + return g + }, + VH: function(a) { + for (var b = [], c = 0; 256 > c; c++) b["0123456789abcdef".charAt(c >> 4) + "0123456789abcdef".charAt(c & 15)] = String.fromCharCode(c); + a.length % 2 && (a = "0" + a); + for (var d = [], e = 0, c = 0; c < a.length; c += 2) d[e++] = b[a.substr(c, 2)]; + a = d.join(""); + return "" === a ? "0" : a + }, + Fg: function(a) { + return z.VI(z.VH(a)) + }, + Zl: null, + adym: "70a114bcad351489", + vfo: "2be640fdb26e", + bH: "28fc4e", + cH: "2bfb40" + }; + z.Zl = function() { + var a = window.document.createElement("canvas"), + b = a.getContext("2d"); + b[z.Fg("7ca11abfd022028846")] = z.Fg("398c3597c01238"); + for (var c = ["5da73c80a3330d854f9e5e671d6633", "32ab5ff3b26f42dc0ed90f22422913b54ae6247590da4bb21c324ba3a84e385776", "54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387", "74bf19bce72555874c86"], d = 1; 5 > d; d++) b[z.Fg("7ca11abfd7330390")](z.Fg(c[d - 1]), 10, 15 * d + 0); + b[z.Fg("7ca11abfd022028846")] = z.Fg("39f046ebb36e4b"); + for (d = 1; 5 > d; d++) b[z.Fg("7ca11abfd7330390")](z.Fg(c[d - + 1]), 10, 15 * d + 0); + if (4 !== c.length || "5" !== c[0][0] || "7" !== c[3][0]) z.s = function(a, b) { + var c = new Ba(a, b, 2); + Object.freeze(c); + a[b] = c; + var d = a.Fu; + d instanceof na || (d = new na("string", Ba), a.Fu = d); + d.add(b, c); + return c + }; + return a + }(); + + function Ba(a, b, c) { + z.kc(this); + this.xB = a; + this.Ub = b; + this.HG = c + } + z.ia("EnumValue", Ba); + Ba.prototype.toString = function() { + return z.kf(this.xB) + "." + this.Ub + }; + z.w(Ba, { + ze: "classType" + }, function() { + return this.xB + }); + z.w(Ba, { + name: "name" + }, function() { + return this.Ub + }); + z.w(Ba, { + value: "value" + }, function() { + return this.HG + }); + var Ja; + Ba.findName = Ja = function(a, b) { + if (void 0 === b || null === b || "" === b) return null; + z.g(a, "function", "findName:classfunc"); + z.g(b, "string", "EnumValue.findName:name"); + var c = a.Fu; + return c instanceof na ? c.na(b) : null + }; + + function za() { + this.wB = [] + } + za.prototype.toString = function() { + return this.wB.join("") + }; + za.prototype.add = function(a) { + "" !== a && this.wB.push(a) + }; + + function ma() {} + + function Ka(a) { + void 0 === a && (a = 42); + this.seed = a; + this.Ux = 48271; + this.Eu = 2147483647; + this.lB = this.Eu / this.Ux; + this.lG = this.Eu % this.Ux; + this.kG = 1 / this.Eu; + this.random() + } + Ka.prototype.random = function() { + var a = this.seed % this.lB * this.Ux - this.seed / this.lB * this.lG; + this.seed = 0 < a ? a : a + this.Eu; + return this.seed * this.kG + }; + + function Ma() {} + z.w(Ma, { + i: "iterator" + }, function() { + return this + }); + Ma.prototype.reset = Ma.prototype.reset = function() {}; + Ma.prototype.next = Ma.prototype.hasNext = Ma.prototype.next = function() { + return !1 + }; + Ma.prototype.first = Ma.prototype.first = function() { + return null + }; + Ma.prototype.any = function() { + return !1 + }; + Ma.prototype.all = function() { + return !0 + }; + Ma.prototype.each = function() { + return this + }; + Ma.prototype.map = function() { + return this + }; + Ma.prototype.filter = function() { + return this + }; + Ma.prototype.concat = function(a) { + return a.i + }; + z.w(Ma, { + count: "count" + }, function() { + return 0 + }); + Ma.prototype.Nf = function() {}; + Ma.prototype.toString = function() { + return "EmptyIterator" + }; + var Pa = new Ma; + + function Ra(a) { + this.key = -1; + this.value = a + } + z.Yd(Ra, { + key: !0, + value: !0 + }); + z.w(Ra, { + i: "iterator" + }, function() { + return this + }); + Ra.prototype.reset = Ra.prototype.reset = function() { + this.key = -1 + }; + Ra.prototype.next = Ra.prototype.hasNext = Ra.prototype.next = function() { + return -1 === this.key ? (this.key = 0, !0) : !1 + }; + Ra.prototype.first = Ra.prototype.first = function() { + this.key = 0; + return this.value + }; + Ra.prototype.any = function(a) { + this.key = -1; + return a(this.value) + }; + Ra.prototype.all = function(a) { + this.key = -1; + return a(this.value) + }; + Ra.prototype.each = function(a) { + this.key = -1; + a(this.value); + return this + }; + Ra.prototype.map = function(a) { + return new Ra(a(this.value)) + }; + Ra.prototype.filter = function(a) { + return a(this.value) ? new Ra(this.value) : Pa + }; + Ra.prototype.concat = function(a) { + return new Sa(this, a.i) + }; + z.w(Ra, { + count: "count" + }, function() { + return 1 + }); + Ra.prototype.Nf = function() { + this.value = null + }; + Ra.prototype.toString = function() { + return "SingletonIterator(" + this.value + ")" + }; + + function Sa(a, b) { + this.$k = a; + this.al = b; + this.Gu = !1 + } + z.Yd(Sa, { + key: !0, + value: !0 + }); + z.w(Sa, { + i: "iterator" + }, function() { + return this + }); + Sa.prototype.reset = Sa.prototype.reset = function() { + this.$k.reset(); + this.al.reset(); + this.Gu = !1 + }; + Sa.prototype.next = Sa.prototype.hasNext = Sa.prototype.next = function() { + if (!this.Gu) { + var a = this.$k; + if (a.next()) return this.key = a.key, this.value = a.value, !0; + this.Gu = !0 + } + return this.Gu && (a = this.al, a.next()) ? (this.key = a.key, this.value = a.value, !0) : !1 + }; + Sa.prototype.first = Sa.prototype.first = function() { + this.reset(); + return this.next() ? this.value : null + }; + Sa.prototype.any = function(a) { + return this.$k.any(a) || this.al.any(a) ? !0 : !1 + }; + Sa.prototype.all = function(a) { + return this.$k.all(a) && this.al.all(a) ? !0 : !1 + }; + Sa.prototype.each = function(a) { + this.$k.each(a); + this.al.each(a); + return this + }; + Sa.prototype.map = function(a) { + return new Sa(this.$k.map(a), this.al.map(a)) + }; + Sa.prototype.filter = function(a) { + return new Sa(this.$k.filter(a), this.al.filter(a)) + }; + Sa.prototype.concat = function(a) { + return new Sa(this, a.i) + }; + z.w(Sa, { + count: "count" + }, function() { + return this.$k.count + this.al.count + }); + Sa.prototype.Nf = function() { + this.value = this.key = null + }; + Sa.prototype.toString = function() { + return "ConcatIterator()" + }; + + function Ta(a) { + this.Bc = a; + this.Vh = null; + this.reset() + } + z.Yd(Ta, { + key: !0, + value: !0 + }); + z.w(Ta, { + i: "iterator" + }, function() { + return this + }); + z.defineProperty(Ta, { + rn: "predicate" + }, function() { + return this.Vh + }, function(a) { + this.Vh = a + }); + Ta.prototype.reset = Ta.prototype.reset = function() { + var a = this.Bc; + a.ec = null; + this.nb = a.H; + this.Uc = -1 + }; + Ta.prototype.next = Ta.prototype.hasNext = Ta.prototype.next = function() { + var a = this.Bc; + if (a.H !== this.nb) { + if (0 > this.key) return !1; + z.Sa(a) + } + var a = a.o, + b = a.length, + c = ++this.Uc, + d = this.Vh; + if (null !== d) + for (; c < b;) { + var e = a[c]; + if (d(e)) return this.key = this.Uc = c, this.value = e, !0; + c++ + } else { + if (c < b) return this.key = c, this.value = a[c], !0; + this.Nf() + } + return !1 + }; + Ta.prototype.first = Ta.prototype.first = function() { + var a = this.Bc; + this.nb = a.H; + this.Uc = 0; + var a = a.o, + b = a.length, + c = this.Vh; + if (null !== c) { + for (var d = 0; d < b;) { + var e = a[d]; + if (c(e)) return this.key = this.Uc = d, this.value = e; + d++ + } + return null + } + return 0 < b ? (e = a[0], this.key = 0, this.value = e) : null + }; + Ta.prototype.any = function(a) { + var b = this.Bc; + b.ec = null; + var c = b.H; + this.Uc = -1; + for (var d = b.o, e = d.length, g = this.Vh, h = 0; h < e; h++) { + var k = d[h]; + if (null === g || g(k)) { + if (a(k)) return !0; + b.H !== c && z.Sa(b) + } + } + return !1 + }; + Ta.prototype.all = function(a) { + var b = this.Bc; + b.ec = null; + var c = b.H; + this.Uc = -1; + for (var d = b.o, e = d.length, g = this.Vh, h = 0; h < e; h++) { + var k = d[h]; + if (null === g || g(k)) { + if (!a(k)) return !1; + b.H !== c && z.Sa(b) + } + } + return !0 + }; + Ta.prototype.each = function(a) { + var b = this.Bc; + b.ec = null; + var c = b.H; + this.Uc = -1; + for (var d = b.o, e = d.length, g = this.Vh, h = 0; h < e; h++) { + var k = d[h]; + if (null === g || g(k)) a(k), b.H !== c && z.Sa(b) + } + return this + }; + Ta.prototype.map = function(a) { + var b = this.Bc; + b.ec = null; + var c = b.H; + this.Uc = -1; + for (var d = [], e = b.o, g = e.length, h = this.Vh, k = 0; k < g; k++) { + var l = e[k]; + if (null === h || h(l)) d.push(a(l)), b.H !== c && z.Sa(b) + } + a = new J; + a.o = d; + a.Jc(); + return a.i + }; + Ta.prototype.filter = function(a) { + var b = this.Bc; + b.ec = null; + var c = b.H; + this.Uc = -1; + for (var d = [], e = b.o, g = e.length, h = this.Vh, k = 0; k < g; k++) { + var l = e[k]; + if (null === h || h(l)) a(l) && d.push(l), b.H !== c && z.Sa(b) + } + a = new J(b.ba); + a.o = d; + a.Jc(); + return a.i + }; + Ta.prototype.concat = function(a) { + this.Bc.ec = null; + return new Sa(this, a.i) + }; + z.w(Ta, { + count: "count" + }, function() { + var a = this.Vh; + if (null !== a) { + for (var b = 0, c = this.Bc.o, d = c.length, e = 0; e < d; e++) a(c[e]) && b++; + return b + } + return this.Bc.o.length + }); + Ta.prototype.Nf = function() { + this.key = -1; + this.value = null; + this.nb = -1; + this.Vh = null; + this.Bc.ec = this + }; + Ta.prototype.toString = function() { + return "ListIterator@" + this.Uc + "/" + this.Bc.count + }; + + function Ua(a) { + this.Bc = a; + this.reset() + } + z.Yd(Ua, { + key: !0, + value: !0 + }); + z.w(Ua, { + i: "iterator" + }, function() { + return this + }); + Ua.prototype.reset = Ua.prototype.reset = function() { + var a = this.Bc; + a.Lj = null; + this.nb = a.H; + this.Uc = a.o.length + }; + Ua.prototype.next = Ua.prototype.hasNext = Ua.prototype.next = function() { + var a = this.Bc; + if (a.H !== this.nb) { + if (0 > this.key) return !1; + z.Sa(a) + } + var b = --this.Uc; + if (0 <= b) return this.key = b, this.value = a.o[b], !0; + this.Nf(); + return !1 + }; + Ua.prototype.first = Ua.prototype.first = function() { + var a = this.Bc; + this.nb = a.H; + var b = a.o; + this.Uc = a = b.length - 1; + return 0 <= a ? (b = b[a], this.key = a, this.value = b) : null + }; + Ua.prototype.any = function(a) { + var b = this.Bc; + b.Lj = null; + var c = b.H, + d = b.o, + e = d.length; + this.Uc = e; + for (e -= 1; 0 <= e; e--) { + if (a(d[e])) return !0; + b.H !== c && z.Sa(b) + } + return !1 + }; + Ua.prototype.all = function(a) { + var b = this.Bc; + b.Lj = null; + var c = b.H, + d = b.o, + e = d.length; + this.Uc = e; + for (e -= 1; 0 <= e; e--) { + if (!a(d[e])) return !1; + b.H !== c && z.Sa(b) + } + return !0 + }; + Ua.prototype.each = function(a) { + var b = this.Bc; + b.Lj = null; + var c = b.H, + d = b.o, + e = d.length; + this.Uc = e; + for (e -= 1; 0 <= e; e--) a(d[e]), b.H !== c && z.Sa(b); + return this + }; + Ua.prototype.map = function(a) { + var b = this.Bc; + b.Lj = null; + var c = b.H, + d = [], + e = b.o, + g = e.length; + this.Uc = g; + for (g -= 1; 0 <= g; g--) d.push(a(e[g])), b.H !== c && z.Sa(b); + a = new J; + a.o = d; + a.Jc(); + return a.i + }; + Ua.prototype.filter = function(a) { + var b = this.Bc; + b.Lj = null; + var c = b.H, + d = [], + e = b.o, + g = e.length; + this.Uc = g; + for (g -= 1; 0 <= g; g--) { + var h = e[g]; + a(h) && d.push(h); + b.H !== c && z.Sa(b) + } + a = new J(b.ba); + a.o = d; + a.Jc(); + return a.i + }; + Ua.prototype.concat = function(a) { + this.Bc.Lj = null; + return new Sa(this, a.i) + }; + z.w(Ua, { + count: "count" + }, function() { + return this.Bc.o.length + }); + Ua.prototype.Nf = function() { + this.key = -1; + this.value = null; + this.nb = -1; + this.Bc.Lj = this + }; + Ua.prototype.toString = function() { + return "ListIteratorBackwards(" + this.Uc + "/" + this.Bc.count + ")" + }; + + function J(a) { + z.kc(this); + this.G = !1; + this.o = []; + this.H = 0; + this.Lj = this.ec = null; + void 0 === a || null === a ? this.ba = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a || "boolean" === a || "function" === a ? this.ba = a : z.ka(a, "the string 'object', 'number', 'string', 'boolean', or 'function'", "List constructor: type") : "function" === typeof a ? this.ba = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a === Boolean ? "boolean" : a === Function ? "function" : a : z.ka(a, "null, a primitive type name, or a class type", + "List constructor: type") + } + z.ia("List", J); + J.prototype.Yg = function(a) { + null !== this.ba && ("string" === typeof this.ba ? typeof a === this.ba && null !== a || z.ic(a, this.ba) : a instanceof this.ba || z.ic(a, this.ba)) + }; + J.prototype.Jc = function() { + var a = this.H; + a++; + 999999999 < a && (a = 0); + this.H = a + }; + J.prototype.freeze = J.prototype.freeze = function() { + this.G = !0; + return this + }; + J.prototype.thaw = J.prototype.Wa = function() { + this.G = !1; + return this + }; + J.prototype.toString = function() { + return "List(" + z.getTypeName(this.ba) + ")#" + z.nd(this) + }; + J.prototype.add = J.prototype.push = J.prototype.add = function(a) { + null !== a && (u && this.Yg(a), this.G && z.oa(this, a), this.o.push(a), this.Jc()) + }; + J.prototype.addAll = J.prototype.$c = function(a) { + if (null === a) return this; + this.G && z.oa(this); + var b = this.o; + if (z.isArray(a)) + for (var c = z.bb(a), d = 0; d < c; d++) { + var e = z.Ya(a, d); + u && this.Yg(e); + b.push(e) + } else + for (a = a.i; a.next();) e = a.value, u && this.Yg(e), b.push(e); + this.Jc(); + return this + }; + J.prototype.clear = J.prototype.clear = function() { + this.G && z.oa(this); + this.o.length = 0; + this.Jc() + }; + J.prototype.contains = J.prototype.has = J.prototype.contains = function(a) { + if (null === a) return !1; + u && this.Yg(a); + return -1 !== this.o.indexOf(a) + }; + J.prototype.indexOf = J.prototype.indexOf = function(a) { + if (null === a) return -1; + u && this.Yg(a); + return this.o.indexOf(a) + }; + J.prototype.elt = J.prototype.get = J.prototype.ea = function(a) { + u && z.p(a, J, "elt:i"); + var b = this.o; + (0 > a || a >= b.length) && z.ka(a, "0 <= i < length", J, "elt:i"); + return b[a] + }; + J.prototype.setElt = J.prototype.set = J.prototype.Rg = function(a, b) { + u && (this.Yg(b), z.p(a, J, "setElt:i")); + var c = this.o; + (0 > a || a >= c.length) && z.ka(a, "0 <= i < length", J, "setElt:i"); + this.G && z.oa(this, a); + c[a] = b + }; + J.prototype.first = J.prototype.first = function() { + var a = this.o; + return 0 === a.length ? null : a[0] + }; + J.prototype.last = J.prototype.de = function() { + var a = this.o, + b = a.length; + return 0 < b ? a[b - 1] : null + }; + J.prototype.pop = J.prototype.pop = function() { + this.G && z.oa(this); + var a = this.o; + return 0 < a.length ? a.pop() : null + }; + J.prototype.any = function(a) { + for (var b = this.o, c = this.H, d = b.length, e = 0; e < d; e++) { + if (a(b[e])) return !0; + this.H !== c && z.Sa(this) + } + return !1 + }; + J.prototype.all = function(a) { + for (var b = this.o, c = this.H, d = b.length, e = 0; e < d; e++) { + if (!a(b[e])) return !1; + this.H !== c && z.Sa(this) + } + return !0 + }; + J.prototype.each = function(a) { + for (var b = this.o, c = this.H, d = b.length, e = 0; e < d; e++) a(b[e]), this.H !== c && z.Sa(this); + return this + }; + J.prototype.map = function(a) { + for (var b = new J, c = [], d = this.o, e = this.H, g = d.length, h = 0; h < g; h++) c.push(a(d[h])), this.H !== e && z.Sa(this); + b.o = c; + b.Jc(); + return b + }; + J.prototype.filter = function(a) { + for (var b = new J(this.ba), c = [], d = this.o, e = this.H, g = d.length, h = 0; h < g; h++) { + var k = d[h]; + a(k) && c.push(k); + this.H !== e && z.Sa(this) + } + b.o = c; + b.Jc(); + return b + }; + J.prototype.concat = function(a) { + return this.copy().$c(a) + }; + J.prototype.insertAt = J.prototype.Ld = function(a, b) { + u && (this.Yg(b), z.p(a, J, "insertAt:i")); + 0 > a && z.ka(a, ">= 0", J, "insertAt:i"); + this.G && z.oa(this, a); + var c = this.o; + a >= c.length ? c.push(b) : c.splice(a, 0, b); + this.Jc(); + return !0 + }; + J.prototype.remove = J.prototype["delete"] = J.prototype.remove = function(a) { + if (null === a) return !1; + u && this.Yg(a); + this.G && z.oa(this, a); + var b = this.o; + a = b.indexOf(a); + if (-1 === a) return !1; + a === b.length - 1 ? b.pop() : b.splice(a, 1); + this.Jc(); + return !0 + }; + J.prototype.removeAt = J.prototype.dd = function(a) { + u && z.p(a, J, "removeAt:i"); + var b = this.o; + (0 > a || a >= b.length) && z.ka(a, "0 <= i < length", J, "removeAt:i"); + this.G && z.oa(this, a); + a === b.length - 1 ? b.pop() : b.splice(a, 1); + this.Jc() + }; + J.prototype.removeRange = J.prototype.removeRange = function(a, b) { + u && (z.p(a, J, "removeRange:from"), z.p(b, J, "removeRange:to")); + var c = this.o; + (0 > a || a >= c.length) && z.ka(a, "0 <= from < length", J, "elt:from"); + (0 > b || b >= c.length) && z.ka(b, "0 <= to < length", J, "elt:to"); + this.G && z.oa(this, a); + var d = c.slice((b || a) + 1 || c.length); + c.length = 0 > a ? c.length + a : a; + c.push.apply(c, d); + this.Jc() + }; + J.prototype.copy = function() { + var a = new J(this.ba), + b = this.o; + 0 < b.length && (a.o = Array.prototype.slice.call(b)); + return a + }; + J.prototype.toArray = J.prototype.jc = function() { + for (var a = this.o, b = this.count, c = Array(b), d = 0; d < b; d++) c[d] = a[d]; + return c + }; + J.prototype.toSet = J.prototype.VF = function() { + for (var a = new K(this.ba), b = this.o, c = this.count, d = 0; d < c; d++) a.add(b[d]); + return a + }; + J.prototype.sort = J.prototype.sort = function(a) { + u && z.g(a, "function", J, "sort:sortfunc"); + this.G && z.oa(this); + this.o.sort(a); + this.Jc(); + return this + }; + J.prototype.sortRange = J.prototype.dq = function(a, b, c) { + var d = this.o, + e = d.length; + void 0 === b && (b = 0); + void 0 === c && (c = e); + u && (z.g(a, "function", J, "sortRange:sortfunc"), z.p(b, J, "sortRange:from"), z.p(c, J, "sortRange:to")); + this.G && z.oa(this); + var g = c - b; + if (1 >= g) return this; + (0 > b || b >= e - 1) && z.ka(b, "0 <= from < length", J, "sortRange:from"); + if (2 === g) return c = d[b], e = d[b + 1], 0 < a(c, e) && (d[b] = e, d[b + 1] = c, this.Jc()), this; + if (0 === b) + if (c >= e) d.sort(a); + else + for (g = d.slice(0, c), g.sort(a), a = 0; a < c; a++) d[a] = g[a]; + else if (c >= e) + for (g = d.slice(b), + g.sort(a), a = b; a < e; a++) d[a] = g[a - b]; + else + for (g = d.slice(b, c), g.sort(a), a = b; a < c; a++) d[a] = g[a - b]; + this.Jc(); + return this + }; + J.prototype.reverse = J.prototype.reverse = function() { + this.G && z.oa(this); + this.o.reverse(); + this.Jc(); + return this + }; + z.w(J, { + count: "count" + }, function() { + return this.o.length + }); + z.w(J, { + size: "size" + }, function() { + return this.o.length + }); + z.w(J, { + length: "length" + }, function() { + return this.o.length + }); + z.w(J, { + i: "iterator" + }, function() { + if (0 >= this.o.length) return Pa; + var a = this.ec; + return null !== a ? (a.reset(), a) : new Ta(this) + }); + z.w(J, { + ln: "iteratorBackwards" + }, function() { + if (0 >= this.o.length) return Pa; + var a = this.Lj; + return null !== a ? (a.reset(), a) : new Ua(this) + }); + + function Wa(a) { + this.Xh = a; + this.reset() + } + z.Yd(Wa, { + key: !0, + value: !0 + }); + z.w(Wa, { + i: "iterator" + }, function() { + return this + }); + Wa.prototype.reset = Wa.prototype.reset = function() { + var a = this.Xh; + a.ec = null; + this.nb = a.H; + this.lb = null + }; + Wa.prototype.next = Wa.prototype.hasNext = Wa.prototype.next = function() { + var a = this.Xh; + if (a.H !== this.nb) { + if (null === this.key) return !1; + z.Sa(a) + } + var b = this.lb, + b = null === b ? a.Ka : b.cb; + if (null !== b) return this.lb = b, this.value = b.value, this.key = b.key, !0; + this.Nf(); + return !1 + }; + Wa.prototype.first = Wa.prototype.first = function() { + var a = this.Xh; + this.nb = a.H; + a = a.Ka; + if (null !== a) { + this.lb = a; + var b = a.value; + this.key = a.key; + return this.value = b + } + return null + }; + Wa.prototype.any = function(a) { + var b = this.Xh; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (a(d.value)) return !0; + b.H !== c && z.Sa(b); + d = d.cb + } + return !1 + }; + Wa.prototype.all = function(a) { + var b = this.Xh; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (!a(d.value)) return !1; + b.H !== c && z.Sa(b); + d = d.cb + } + return !0 + }; + Wa.prototype.each = function(a) { + var b = this.Xh; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) a(d.value), b.H !== c && z.Sa(b), d = d.cb; + return this + }; + Wa.prototype.map = function(a) { + var b = this.Xh; + b.ec = null; + for (var c = new J, d = b.H, e = b.Ka; null !== e;) c.add(a(e.value)), b.H !== d && z.Sa(b), e = e.cb; + return c.i + }; + Wa.prototype.filter = function(a) { + var b = this.Xh; + b.ec = null; + for (var c = new J(b.ba), d = b.H, e = b.Ka; null !== e;) { + var g = e.value; + a(g) && c.add(g); + b.H !== d && z.Sa(b); + e = e.cb + } + return c.i + }; + Wa.prototype.concat = function(a) { + this.Xh.ec = null; + return new Sa(this, a.i) + }; + z.w(Wa, { + count: "count" + }, function() { + return this.Xh.rd + }); + Wa.prototype.Nf = function() { + this.value = this.key = null; + this.nb = -1; + this.Xh.ec = this + }; + Wa.prototype.toString = function() { + return null !== this.lb ? "SetIterator@" + this.lb.value : "SetIterator" + }; + + function K(a) { + z.kc(this); + this.G = !1; + void 0 === a || null === a ? this.ba = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a ? this.ba = a : z.ka(a, "the string 'object', 'number' or 'string'", "Set constructor: type") : "function" === typeof a ? this.ba = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a : z.ka(a, "null, a primitive type name, or a class type", "Set constructor: type"); + this.sd = {}; + this.rd = 0; + this.ec = null; + this.H = 0; + this.Sh = this.Ka = null + } + z.ia("Set", K); + K.prototype.Yg = function(a) { + null !== this.ba && ("string" === typeof this.ba ? typeof a === this.ba && null !== a || z.ic(a, this.ba) : a instanceof this.ba || z.ic(a, this.ba)) + }; + K.prototype.Jc = function() { + var a = this.H; + a++; + 999999999 < a && (a = 0); + this.H = a + }; + K.prototype.freeze = K.prototype.freeze = function() { + this.G = !0; + return this + }; + K.prototype.thaw = K.prototype.Wa = function() { + this.G = !1; + return this + }; + K.prototype.toString = function() { + return "Set(" + z.getTypeName(this.ba) + ")#" + z.nd(this) + }; + K.prototype.add = K.prototype.add = function(a) { + if (null === a) return !1; + u && this.Yg(a); + this.G && z.oa(this, a); + var b = a; + z.Za(a) && (b = z.It(a)); + return void 0 === this.sd[b] ? (this.rd++, a = new Ya(a, a), this.sd[b] = a, b = this.Sh, null === b ? this.Ka = a : (a.Ho = b, b.cb = a), this.Sh = a, this.Jc(), !0) : !1 + }; + K.prototype.addAll = K.prototype.$c = function(a) { + if (null === a) return this; + this.G && z.oa(this); + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) this.add(z.Ya(a, c)); + else + for (a = a.i; a.next();) this.add(a.value); + return this + }; + K.prototype.contains = K.prototype.has = K.prototype.contains = function(a) { + if (null === a) return !1; + u && this.Yg(a); + var b = a; + return z.Za(a) && (b = z.nd(a), void 0 === b) ? !1 : void 0 !== this.sd[b] + }; + K.prototype.containsAll = function(a) { + if (null === a) return !0; + for (a = a.i; a.next();) + if (!this.contains(a.value)) return !1; + return !0 + }; + K.prototype.containsAny = function(a) { + if (null === a) return !0; + for (a = a.i; a.next();) + if (this.contains(a.value)) return !0; + return !1 + }; + K.prototype.first = K.prototype.first = function() { + var a = this.Ka; + return null === a ? null : a.value + }; + K.prototype.any = function(a) { + for (var b = this.H, c = this.Ka; null !== c;) { + if (a(c.value)) return !0; + this.H !== b && z.Sa(this); + c = c.cb + } + return !1 + }; + K.prototype.all = function(a) { + for (var b = this.H, c = this.Ka; null !== c;) { + if (!a(c.value)) return !1; + this.H !== b && z.Sa(this); + c = c.cb + } + return !0 + }; + K.prototype.each = function(a) { + for (var b = this.H, c = this.Ka; null !== c;) a(c.value), this.H !== b && z.Sa(this), c = c.cb; + return this + }; + K.prototype.map = function(a) { + for (var b = new K, c = this.H, d = this.Ka; null !== d;) b.add(a(d.value)), this.H !== c && z.Sa(this), d = d.cb; + return b + }; + K.prototype.filter = function(a) { + for (var b = new K(this.ba), c = this.H, d = this.Ka; null !== d;) { + var e = d.value; + a(e) && b.add(e); + this.H !== c && z.Sa(this); + d = d.cb + } + return b + }; + K.prototype.concat = function(a) { + return this.copy().$c(a) + }; + K.prototype.remove = K.prototype["delete"] = K.prototype.remove = function(a) { + if (null === a) return !1; + u && this.Yg(a); + this.G && z.oa(this, a); + var b = a; + if (z.Za(a) && (b = z.nd(a), void 0 === b)) return !1; + a = this.sd[b]; + if (void 0 === a) return !1; + var c = a.cb, + d = a.Ho; + null !== c && (c.Ho = d); + null !== d && (d.cb = c); + this.Ka === a && (this.Ka = c); + this.Sh === a && (this.Sh = d); + delete this.sd[b]; + this.rd--; + this.Jc(); + return !0 + }; + K.prototype.removeAll = K.prototype.IA = function(a) { + if (null === a) return this; + this.G && z.oa(this); + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) this.remove(z.Ya(a, c)); + else + for (a = a.i; a.next();) this.remove(a.value); + return this + }; + K.prototype.retainAll = function(a) { + if (null === a || 0 === this.count) return this; + this.G && z.oa(this); + var b = new K(this.ba); + b.$c(a); + a = []; + for (var c = this.i; c.next();) { + var d = c.value; + b.contains(d) || a.push(d) + } + this.IA(a); + return this + }; + K.prototype.clear = K.prototype.clear = function() { + this.G && z.oa(this); + this.sd = {}; + this.rd = 0; + this.Sh = this.Ka = null; + this.Jc() + }; + K.prototype.copy = function() { + var a = new K(this.ba), + b = this.sd, + c; + for (c in b) a.add(b[c].value); + return a + }; + K.prototype.toArray = K.prototype.jc = function() { + var a = Array(this.rd), + b = this.sd, + c = 0, + d; + for (d in b) a[c] = b[d].value, c++; + return a + }; + K.prototype.toList = function() { + var a = new J(this.ba), + b = this.sd, + c; + for (c in b) a.add(b[c].value); + return a + }; + z.w(K, { + count: "count" + }, function() { + return this.rd + }); + z.w(K, { + size: "size" + }, function() { + return this.rd + }); + z.w(K, { + i: "iterator" + }, function() { + if (0 >= this.rd) return Pa; + var a = this.ec; + return null !== a ? (a.reset(), a) : new Wa(this) + }); + + function Za(a) { + this.Na = a; + this.reset() + } + z.Yd(Za, { + key: !0, + value: !0 + }); + z.w(Za, { + i: "iterator" + }, function() { + return this + }); + Za.prototype.reset = Za.prototype.reset = function() { + this.nb = this.Na.H; + this.lb = null + }; + Za.prototype.next = Za.prototype.hasNext = Za.prototype.next = function() { + var a = this.Na; + if (a.H !== this.nb) { + if (null === this.key) return !1; + z.Sa(a) + } + var b = this.lb, + b = null === b ? a.Ka : b.cb; + if (null !== b) return this.lb = b, this.value = this.key = a = b.key, !0; + this.Nf(); + return !1 + }; + Za.prototype.first = Za.prototype.first = function() { + var a = this.Na; + this.nb = a.H; + a = a.Ka; + return null !== a ? (this.lb = a, this.value = this.key = a = a.key) : null + }; + Za.prototype.any = function(a) { + var b = this.Na, + c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (a(d.key)) return !0; + b.H !== c && z.Sa(b); + d = d.cb + } + return !1 + }; + Za.prototype.all = function(a) { + var b = this.Na, + c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (!a(d.key)) return !1; + b.H !== c && z.Sa(b); + d = d.cb + } + return !0 + }; + Za.prototype.each = function(a) { + var b = this.Na, + c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) a(d.key), b.H !== c && z.Sa(b), d = d.cb; + return this + }; + Za.prototype.map = function(a) { + var b = this.Na, + c = b.H; + this.lb = null; + for (var d = new J, e = b.Ka; null !== e;) d.add(a(e.key)), b.H !== c && z.Sa(b), e = e.cb; + return d.i + }; + Za.prototype.filter = function(a) { + var b = this.Na, + c = b.H; + this.lb = null; + for (var d = new J(b.bf), e = b.Ka; null !== e;) { + var g = e.key; + a(g) && d.add(g); + b.H !== c && z.Sa(b); + e = e.cb + } + return d.i + }; + Za.prototype.concat = function(a) { + return new Sa(this, a.i) + }; + z.w(Za, { + count: "count" + }, function() { + return this.Na.rd + }); + Za.prototype.Nf = function() { + this.value = this.key = null; + this.nb = -1 + }; + Za.prototype.toString = function() { + return null !== this.lb ? "MapKeySetIterator@" + this.lb.value : "MapKeySetIterator" + }; + + function $a(a) { + z.kc(this); + this.G = !0; + this.Na = a + } + z.Qa($a, K); + $a.prototype.freeze = function() { + return this + }; + $a.prototype.Wa = function() { + return this + }; + $a.prototype.toString = function() { + return "MapKeySet(" + this.Na.toString() + ")" + }; + $a.prototype.add = $a.prototype.set = $a.prototype.add = function() { + z.k("This Set is read-only: " + this.toString()); + return !1 + }; + $a.prototype.contains = $a.prototype.has = $a.prototype.contains = function(a) { + return this.Na.contains(a) + }; + $a.prototype.remove = $a.prototype["delete"] = $a.prototype.remove = function() { + z.k("This Set is read-only: " + this.toString()); + return !1 + }; + $a.prototype.clear = $a.prototype.clear = function() { + z.k("This Set is read-only: " + this.toString()) + }; + $a.prototype.first = $a.prototype.first = function() { + var a = this.Na.Ka; + return null !== a ? a.key : null + }; + $a.prototype.any = function(a) { + for (var b = this.Na.Ka; null !== b;) { + if (a(b.key)) return !0; + b = b.cb + } + return !1 + }; + $a.prototype.all = function(a) { + for (var b = this.Na.Ka; null !== b;) { + if (!a(b.key)) return !1; + b = b.cb + } + return !0 + }; + $a.prototype.each = function(a) { + for (var b = this.Na.Ka; null !== b;) a(b.key), b = b.cb; + return this + }; + $a.prototype.map = function(a) { + for (var b = new K, c = this.Na.Ka; null !== c;) b.add(a(c.key)), c = c.cb; + return b + }; + $a.prototype.filter = function(a) { + for (var b = new K(this.Na.bf), c = this.Na.Ka; null !== c;) { + var d = c.key; + a(d) && b.add(d); + c = c.cb + } + return b + }; + $a.prototype.concat = function(a) { + return this.VF().$c(a) + }; + $a.prototype.copy = function() { + return new $a(this.Na) + }; + $a.prototype.toSet = $a.prototype.VF = function() { + var a = new K(this.Na.bf), + b = this.Na.sd, + c; + for (c in b) a.add(b[c].key); + return a + }; + $a.prototype.toArray = $a.prototype.jc = function() { + var a = this.Na.sd, + b = Array(this.Na.rd), + c = 0, + d; + for (d in a) b[c] = a[d].key, c++; + return b + }; + $a.prototype.toList = function() { + var a = new J(this.ba), + b = this.Na.sd, + c; + for (c in b) a.add(b[c].key); + return a + }; + z.w($a, { + count: "count" + }, function() { + return this.Na.rd + }); + z.w($a, { + size: "size" + }, function() { + return this.Na.rd + }); + z.w($a, { + i: "iterator" + }, function() { + return 0 >= this.Na.rd ? Pa : new Za(this.Na) + }); + + function ab(a) { + this.Na = a; + this.reset() + } + z.Yd(ab, { + key: !0, + value: !0 + }); + z.w(ab, { + i: "iterator" + }, function() { + return this + }); + ab.prototype.reset = ab.prototype.reset = function() { + var a = this.Na; + a.Mj = null; + this.nb = a.H; + this.lb = null + }; + ab.prototype.next = ab.prototype.hasNext = ab.prototype.next = function() { + var a = this.Na; + if (a.H !== this.nb) { + if (null === this.key) return !1; + z.Sa(a) + } + var b = this.lb, + b = null === b ? a.Ka : b.cb; + if (null !== b) return this.lb = b, this.value = b.value, this.key = b.key, !0; + this.Nf(); + return !1 + }; + ab.prototype.first = ab.prototype.first = function() { + var a = this.Na; + this.nb = a.H; + a = a.Ka; + if (null !== a) { + this.lb = a; + var b = a.value; + this.key = a.key; + return this.value = b + } + return null + }; + ab.prototype.any = function(a) { + var b = this.Na; + b.Mj = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (a(d.value)) return !0; + b.H !== c && z.Sa(b); + d = d.cb + } + return !1 + }; + ab.prototype.all = function(a) { + var b = this.Na; + b.Mj = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (!a(d.value)) return !1; + b.H !== c && z.Sa(b); + d = d.cb + } + return !0 + }; + ab.prototype.each = function(a) { + var b = this.Na; + b.Mj = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) a(d.value), b.H !== c && z.Sa(b), d = d.cb; + return this + }; + ab.prototype.map = function(a) { + var b = this.Na; + b.Mj = null; + var c = b.H; + this.lb = null; + for (var d = new J, e = b.Ka; null !== e;) d.add(a(e.value)), b.H !== c && z.Sa(b), e = e.cb; + return d.i + }; + ab.prototype.filter = function(a) { + var b = this.Na; + b.Mj = null; + var c = b.H; + this.lb = null; + for (var d = new J(b.bf), e = b.Ka; null !== e;) { + var g = e.value; + a(g) && d.add(g); + b.H !== c && z.Sa(b); + e = e.cb + } + return d.i + }; + ab.prototype.concat = function(a) { + this.Na.Mj = null; + return new Sa(this, a.i) + }; + z.w(ab, { + count: "count" + }, function() { + return this.Na.rd + }); + ab.prototype.Nf = function() { + this.value = this.key = null; + this.nb = -1; + this.Na.Mj = this + }; + ab.prototype.toString = function() { + return null !== this.lb ? "MapValueSetIterator@" + this.lb.value : "MapValueSetIterator" + }; + + function Ya(a, b) { + this.key = a; + this.value = b; + this.Ho = this.cb = null + } + z.Yd(Ya, { + key: !0, + value: !0 + }); + Ya.prototype.toString = function() { + return "{" + this.key + ":" + this.value + "}" + }; + + function bb(a) { + this.Na = a; + this.reset() + } + z.Yd(bb, { + key: !0, + value: !0 + }); + z.w(bb, { + i: "iterator" + }, function() { + return this + }); + bb.prototype.reset = bb.prototype.reset = function() { + var a = this.Na; + a.ec = null; + this.nb = a.H; + this.lb = null + }; + bb.prototype.next = bb.prototype.hasNext = bb.prototype.next = function() { + var a = this.Na; + if (a.H !== this.nb) { + if (null === this.key) return !1; + z.Sa(a) + } + var b = this.lb, + b = null === b ? a.Ka : b.cb; + if (null !== b) return this.lb = b, this.key = b.key, this.value = b.value, !0; + this.Nf(); + return !1 + }; + bb.prototype.first = bb.prototype.first = function() { + var a = this.Na; + this.nb = a.H; + a = a.Ka; + return null !== a ? (this.lb = a, this.key = a.key, this.value = a.value, a) : null + }; + bb.prototype.any = function(a) { + var b = this.Na; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (a(d)) return !0; + b.H !== c && z.Sa(b); + d = d.cb + } + return !1 + }; + bb.prototype.all = function(a) { + var b = this.Na; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) { + if (!a(d)) return !1; + b.H !== c && z.Sa(b); + d = d.cb + } + return !0 + }; + bb.prototype.each = function(a) { + var b = this.Na; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = b.Ka; null !== d;) a(d), b.H !== c && z.Sa(b), d = d.cb; + return this + }; + bb.prototype.map = function(a) { + var b = this.Na; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = new J, e = b.Ka; null !== e;) d.add(a(e)), b.H !== c && z.Sa(b), e = e.cb; + return d.i + }; + bb.prototype.filter = function(a) { + var b = this.Na; + b.ec = null; + var c = b.H; + this.lb = null; + for (var d = new J, e = b.Ka; null !== e;) a(e) && d.add(e), b.H !== c && z.Sa(b), e = e.cb; + return d.i + }; + bb.prototype.concat = function(a) { + this.Na.ec = null; + return new Sa(this, a.i) + }; + z.w(bb, { + count: "count" + }, function() { + return this.Na.rd + }); + bb.prototype.Nf = function() { + this.value = this.key = null; + this.nb = -1; + this.Na.ec = this + }; + bb.prototype.toString = function() { + return null !== this.lb ? "MapIterator@" + this.lb : "MapIterator" + }; + + function na(a, b) { + z.kc(this); + this.G = !1; + void 0 === a || null === a ? this.bf = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a ? this.bf = a : z.ka(a, "the string 'object', 'number' or 'string'", "Map constructor: keytype") : "function" === typeof a ? this.bf = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a : z.ka(a, "null, a primitive type name, or a class type", "Map constructor: keytype"); + void 0 === b || null === b ? this.fi = null : "string" === typeof b ? "object" === b || "string" === b || "boolean" === b || "number" === + b || "function" === b ? this.fi = b : z.ka(b, "the string 'object', 'number', 'string', 'boolean', or 'function'", "Map constructor: valtype") : "function" === typeof b ? this.fi = b === Object ? "object" : b === String ? "string" : b === Number ? "number" : b === Boolean ? "boolean" : b === Function ? "function" : b : z.ka(b, "null, a primitive type name, or a class type", "Map constructor: valtype"); + this.sd = {}; + this.rd = 0; + this.Mj = this.ec = null; + this.H = 0; + this.Sh = this.Ka = null + } + z.ia("Map", na); + + function db(a, b) { + null !== a.bf && ("string" === typeof a.bf ? typeof b === a.bf && null !== b || z.ic(b, a.bf) : b instanceof a.bf || z.ic(b, a.bf)) + } + na.prototype.Jc = function() { + var a = this.H; + a++; + 999999999 < a && (a = 0); + this.H = a + }; + na.prototype.freeze = na.prototype.freeze = function() { + this.G = !0; + return this + }; + na.prototype.thaw = na.prototype.Wa = function() { + this.G = !1; + return this + }; + na.prototype.toString = function() { + return "Map(" + z.getTypeName(this.bf) + "," + z.getTypeName(this.fi) + ")#" + z.nd(this) + }; + na.prototype.add = na.prototype.set = na.prototype.add = function(a, b) { + u && (db(this, a), null !== this.fi && ("string" === typeof this.fi ? typeof b === this.fi && null !== b || z.ic(b, this.fi) : b instanceof this.fi || z.ic(b, this.fi))); + this.G && z.oa(this, a); + var c = a; + z.Za(a) && (c = z.It(a)); + var d = this.sd[c]; + if (void 0 === d) return this.rd++, d = new Ya(a, b), this.sd[c] = d, c = this.Sh, null === c ? this.Ka = d : (d.Ho = c, c.cb = d), this.Sh = d, this.Jc(), !0; + d.value = b; + return !1 + }; + na.prototype.addAll = na.prototype.$c = function(a) { + if (null === a) return this; + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) { + var d = z.Ya(a, c); + this.add(d.key, d.value) + } else + for (a = a.i; a.next();) this.add(a.key, a.value); + return this + }; + na.prototype.first = na.prototype.first = function() { + return this.Ka + }; + na.prototype.any = function(a) { + for (var b = this.H, c = this.Ka; null !== c;) { + if (a(c)) return !0; + this.H !== b && z.Sa(this); + c = c.cb + } + return !1 + }; + na.prototype.all = function(a) { + for (var b = this.H, c = this.Ka; null !== c;) { + if (!a(c)) return !1; + this.H !== b && z.Sa(this); + c = c.cb + } + return !0 + }; + na.prototype.each = function(a) { + for (var b = this.H, c = this.Ka; null !== c;) a(c), this.H !== b && z.Sa(this), c = c.cb; + return this + }; + na.prototype.map = function(a) { + for (var b = new na(this.bf), c = this.H, d = this.Ka; null !== d;) b.add(d.key, a(d)), this.H !== c && z.Sa(this), d = d.cb; + return b + }; + na.prototype.filter = function(a) { + for (var b = new na(this.bf, this.fi), c = this.H, d = this.Ka; null !== d;) a(d) && b.add(d.key, d.value), this.H !== c && z.Sa(this), d = d.cb; + return b + }; + na.prototype.concat = function(a) { + return this.copy().$c(a) + }; + na.prototype.contains = na.prototype.has = na.prototype.contains = function(a) { + u && db(this, a); + var b = a; + return z.Za(a) && (b = z.nd(a), void 0 === b) ? !1 : void 0 !== this.sd[b] + }; + na.prototype.getValue = na.prototype.get = na.prototype.na = function(a) { + u && db(this, a); + var b = a; + if (z.Za(a) && (b = z.nd(a), void 0 === b)) return null; + a = this.sd[b]; + return void 0 === a ? null : a.value + }; + na.prototype.remove = na.prototype["delete"] = na.prototype.remove = function(a) { + if (null === a) return !1; + u && db(this, a); + this.G && z.oa(this, a); + var b = a; + if (z.Za(a) && (b = z.nd(a), void 0 === b)) return !1; + a = this.sd[b]; + if (void 0 === a) return !1; + var c = a.cb, + d = a.Ho; + null !== c && (c.Ho = d); + null !== d && (d.cb = c); + this.Ka === a && (this.Ka = c); + this.Sh === a && (this.Sh = d); + delete this.sd[b]; + this.rd--; + this.Jc(); + return !0 + }; + na.prototype.clear = na.prototype.clear = function() { + this.G && z.oa(this); + this.sd = {}; + this.rd = 0; + this.Sh = this.Ka = null; + this.Jc() + }; + na.prototype.copy = function() { + var a = new na(this.bf, this.fi), + b = this.sd, + c; + for (c in b) { + var d = b[c]; + a.add(d.key, d.value) + } + return a + }; + na.prototype.toArray = na.prototype.jc = function() { + var a = this.sd, + b = Array(this.rd), + c = 0, + d; + for (d in a) { + var e = a[d]; + b[c] = new Ya(e.key, e.value); + c++ + } + return b + }; + na.prototype.toKeySet = na.prototype.uj = function() { + return new $a(this) + }; + z.w(na, { + count: "count" + }, function() { + return this.rd + }); + z.w(na, { + size: "size" + }, function() { + return this.rd + }); + z.w(na, { + i: "iterator" + }, function() { + if (0 >= this.count) return Pa; + var a = this.ec; + return null !== a ? (a.reset(), a) : new bb(this) + }); + z.w(na, { + UE: "iteratorKeys" + }, function() { + return 0 >= this.count ? Pa : new Za(this) + }); + z.w(na, { + VE: "iteratorValues" + }, function() { + if (0 >= this.count) return Pa; + var a = this.Mj; + return null !== a ? (a.reset(), a) : new ab(this) + }); + + function N(a, b) { + void 0 === a ? this.K = this.J = 0 : "number" === typeof a && "number" === typeof b ? (this.J = a, this.K = b) : z.k("Invalid arguments to Point constructor: " + a + ", " + b); + this.G = !1 + } + z.ia("Point", N); + z.ii(N); + z.Yd(N, { + x: !0, + y: !0 + }); + N.prototype.assign = function(a) { + this.J = a.J; + this.K = a.K + }; + N.prototype.setTo = N.prototype.n = function(a, b) { + u && (z.g(a, "number", N, "setTo:x"), z.g(b, "number", N, "setTo:y")); + this.J = a; + this.K = b; + return this + }; + N.prototype.set = N.prototype.set = function(a) { + u && z.l(a, N, N, "set:p"); + this.Pa(); + this.J = a.J; + this.K = a.K; + return this + }; + N.prototype.copy = function() { + var a = new N; + a.J = this.J; + a.K = this.K; + return a + }; + f = N.prototype; + f.La = function() { + this.G = !0; + Object.freeze(this); + return this + }; + f.V = function() { + return Object.isFrozen(this) ? this : this.copy().freeze() + }; + f.freeze = function() { + this.G = !0; + return this + }; + f.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + return this + }; + f.Pa = function(a) { + if (this.G) { + var b = "The Point is frozen, so its properties cannot be set: " + this.toString(); + void 0 !== a && (b += " to value: " + a); + z.k(b) + } + }; + N.parse = function(a) { + if ("string" === typeof a) { + a = a.split(" "); + for (var b = 0, c = 0; + "" === a[b];) b++; + var d = a[b++]; + d && (c = parseFloat(d)); + for (var e = 0; + "" === a[b];) b++; + (d = a[b++]) && (e = parseFloat(d)); + return new N(c, e) + } + return new N + }; + N.stringify = function(a) { + return a instanceof N ? a.x.toString() + " " + a.y.toString() : a.toString() + }; + N.prototype.toString = function() { + return "Point(" + this.x + "," + this.y + ")" + }; + N.prototype.equals = N.prototype.N = function(a) { + return a instanceof N ? this.J === a.x && this.K === a.y : !1 + }; + N.prototype.equalTo = N.prototype.Vw = function(a, b) { + return this.J === a && this.K === b + }; + N.prototype.equalsApprox = N.prototype.Mc = function(a) { + return eb(this.J, a.x) && eb(this.K, a.y) + }; + N.prototype.add = N.prototype.add = function(a) { + u && z.l(a, N, N, "add:p"); + this.Pa(); + this.J += a.x; + this.K += a.y; + return this + }; + N.prototype.subtract = N.prototype.xu = function(a) { + u && z.l(a, N, N, "subtract:p"); + this.Pa(); + this.J -= a.x; + this.K -= a.y; + return this + }; + N.prototype.offset = N.prototype.offset = function(a, b) { + u && (z.p(a, N, "offset:dx"), z.p(b, N, "offset:dy")); + this.Pa(); + this.J += a; + this.K += b; + return this + }; + N.prototype.rotate = N.prototype.rotate = function(a) { + u && z.p(a, N, "rotate:angle"); + this.Pa(); + if (0 === a) return this; + var b = this.J, + c = this.K; + if (0 === b && 0 === c) return this; + var d = 0, + e = 0; + 360 <= a ? a -= 360 : 0 > a && (a += 360); + 90 === a ? (d = 0, e = 1) : 180 === a ? (d = -1, e = 0) : 270 === a ? (d = 0, e = -1) : (a = a * Math.PI / 180, d = Math.cos(a), e = Math.sin(a)); + this.J = d * b - e * c; + this.K = e * b + d * c; + return this + }; + N.prototype.scale = N.prototype.scale = function(a, b) { + u && (z.p(a, N, "scale:sx"), z.p(b, N, "scale:sy")); + this.J *= a; + this.K *= b; + return this + }; + N.prototype.distanceSquaredPoint = N.prototype.Af = function(a) { + u && z.l(a, N, N, "distanceSquaredPoint:p"); + var b = a.x - this.J; + a = a.y - this.K; + return b * b + a * a + }; + N.prototype.distanceSquared = N.prototype.kp = function(a, b) { + u && (z.p(a, N, "distanceSquared:px"), z.p(b, N, "distanceSquared:py")); + var c = a - this.J, + d = b - this.K; + return c * c + d * d + }; + N.prototype.normalize = N.prototype.normalize = function() { + this.Pa(); + var a = this.J, + b = this.K, + c = Math.sqrt(a * a + b * b); + 0 < c && (this.J = a / c, this.K = b / c); + return this + }; + N.prototype.directionPoint = N.prototype.Ec = function(a) { + u && z.l(a, N, N, "directionPoint:p"); + return fb(a.x - this.J, a.y - this.K) + }; + N.prototype.direction = N.prototype.direction = function(a, b) { + u && (z.p(a, N, "direction:px"), z.p(b, N, "direction:py")); + return fb(a - this.J, b - this.K) + }; + + function fb(a, b) { + if (0 === a) return 0 < b ? 90 : 0 > b ? 270 : 0; + if (0 === b) return 0 < a ? 0 : 180; + if (isNaN(a) || isNaN(b)) return 0; + var c = 180 * Math.atan(Math.abs(b / a)) / Math.PI; + 0 > a ? c = 0 > b ? c + 180 : 180 - c : 0 > b && (c = 360 - c); + return c + } + N.prototype.projectOntoLineSegment = function(a, b, c, d) { + u && (z.p(a, N, "projectOntoLineSegment:px"), z.p(b, N, "projectOntoLineSegment:py"), z.p(c, N, "projectOntoLineSegment:qx"), z.p(d, N, "projectOntoLineSegment:qy")); + ib(a, b, c, d, this.J, this.K, this); + return this + }; + N.prototype.projectOntoLineSegmentPoint = function(a, b) { + u && (z.l(a, N, N, "projectOntoLineSegmentPoint:p"), z.l(b, N, N, "projectOntoLineSegmentPoint:q")); + ib(a.x, a.y, b.x, b.y, this.J, this.K, this); + return this + }; + N.prototype.snapToGrid = function(a, b, c, d) { + u && (z.p(a, N, "snapToGrid:originx"), z.p(b, N, "snapToGrid:originy"), z.p(c, N, "snapToGrid:cellwidth"), z.p(d, N, "snapToGrid:cellheight")); + jb(this.J, this.K, a, b, c, d, this); + return this + }; + N.prototype.snapToGridPoint = function(a, b) { + u && (z.l(a, N, N, "snapToGridPoint:p"), z.l(b, Ea, N, "snapToGridPoint:q")); + jb(this.J, this.K, a.x, a.y, b.width, b.height, this); + return this + }; + N.prototype.setRectSpot = N.prototype.ru = function(a, b) { + u && (z.l(a, w, N, "setRectSpot:r"), z.l(b, Q, N, "setRectSpot:spot")); + this.Pa(); + this.J = a.x + b.x * a.width + b.offsetX; + this.K = a.y + b.y * a.height + b.offsetY; + return this + }; + N.prototype.setSpot = N.prototype.tu = function(a, b, c, d, e) { + u && (z.p(a, N, "setSpot:x"), z.p(b, N, "setSpot:y"), z.p(c, N, "setSpot:w"), z.p(d, N, "setSpot:h"), (0 > c || 0 > d) && z.k("Point.setSpot:Width and height cannot be negative"), z.l(e, Q, N, "setSpot:spot")); + this.Pa(); + this.J = a + e.x * c + e.offsetX; + this.K = b + e.y * d + e.offsetY; + return this + }; + N.prototype.transform = function(a) { + u && z.l(a, Fa, N, "transform:t"); + a.Cb(this); + return this + }; + + function ub(a, b) { + u && z.l(b, Fa, N, "transformInverted:t"); + b.ki(a); + return a + } + var vb; + N.distanceLineSegmentSquared = vb = function(a, b, c, d, e, g) { + u && (z.p(a, N, "distanceLineSegmentSquared:px"), z.p(b, N, "distanceLineSegmentSquared:py"), z.p(c, N, "distanceLineSegmentSquared:ax"), z.p(d, N, "distanceLineSegmentSquared:ay"), z.p(e, N, "distanceLineSegmentSquared:bx"), z.p(g, N, "distanceLineSegmentSquared:by")); + var h = e - c, + k = g - d, + l = h * h + k * k; + c -= a; + d -= b; + var m = -c * h - d * k; + if (0 >= m || m >= l) return h = e - a, k = g - b, Math.min(c * c + d * d, h * h + k * k); + a = h * d - k * c; + return a * a / l + }; + var wb; + N.distanceSquared = wb = function(a, b, c, d) { + u && (z.p(a, N, "distanceSquared:px"), z.p(b, N, "distanceSquared:py"), z.p(c, N, "distanceSquared:qx"), z.p(d, N, "distanceSquared:qy")); + a = c - a; + b = d - b; + return a * a + b * b + }; + var xb; + N.direction = xb = function(a, b, c, d) { + u && (z.p(a, N, "direction:px"), z.p(b, N, "direction:py"), z.p(c, N, "direction:qx"), z.p(d, N, "direction:qy")); + a = c - a; + b = d - b; + if (0 === a) return 0 < b ? 90 : 0 > b ? 270 : 0; + if (0 === b) return 0 < a ? 0 : 180; + if (isNaN(a) || isNaN(b)) return 0; + d = 180 * Math.atan(Math.abs(b / a)) / Math.PI; + 0 > a ? d = 0 > b ? d + 180 : 180 - d : 0 > b && (d = 360 - d); + return d + }; + z.defineProperty(N, { + x: "x" + }, function() { + return this.J + }, function(a) { + this.Pa(a); + u && z.g(a, "number", N, "x"); + this.J = a + }); + z.defineProperty(N, { + y: "y" + }, function() { + return this.K + }, function(a) { + this.Pa(a); + u && z.g(a, "number", N, "y"); + this.K = a + }); + N.prototype.isReal = N.prototype.F = function() { + return isFinite(this.x) && isFinite(this.y) + }; + + function Ea(a, b) { + void 0 === a ? this.Ea = this.Fa = 0 : "number" === typeof a && (0 <= a || isNaN(a)) && "number" === typeof b && (0 <= b || isNaN(b)) ? (this.Fa = a, this.Ea = b) : z.k("Invalid arguments to Size constructor: " + a + ", " + b); + this.G = !1 + } + z.ia("Size", Ea); + z.ii(Ea); + z.Yd(Ea, { + width: !0, + height: !0 + }); + Ea.prototype.assign = function(a) { + this.Fa = a.Fa; + this.Ea = a.Ea + }; + Ea.prototype.setTo = Ea.prototype.n = function(a, b) { + u && (z.g(a, "number", Ea, "setTo:w"), z.g(b, "number", Ea, "setTo:h"), 0 > a && z.ka(a, ">= 0", Ea, "setTo:w"), 0 > b && z.ka(b, ">= 0", Ea, "setTo:h")); + this.Fa = a; + this.Ea = b; + return this + }; + Ea.prototype.set = Ea.prototype.set = function(a) { + u && z.l(a, Ea, Ea, "set:s"); + this.Pa(); + this.Fa = a.Fa; + this.Ea = a.Ea; + return this + }; + Ea.prototype.copy = function() { + var a = new Ea; + a.Fa = this.Fa; + a.Ea = this.Ea; + return a + }; + f = Ea.prototype; + f.La = function() { + this.G = !0; + Object.freeze(this); + return this + }; + f.V = function() { + return Object.isFrozen(this) ? this : this.copy().freeze() + }; + f.freeze = function() { + this.G = !0; + return this + }; + f.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + return this + }; + f.Pa = function(a) { + if (this.G) { + var b = "The Size is frozen, so its properties cannot be set: " + this.toString(); + void 0 !== a && (b += " to value: " + a); + z.k(b) + } + }; + Ea.parse = function(a) { + if ("string" === typeof a) { + a = a.split(" "); + for (var b = 0, c = 0; + "" === a[b];) b++; + var d = a[b++]; + d && (c = parseFloat(d)); + for (var e = 0; + "" === a[b];) b++; + (d = a[b++]) && (e = parseFloat(d)); + return new Ea(c, e) + } + return new Ea + }; + Ea.stringify = function(a) { + return a instanceof Ea ? a.width.toString() + " " + a.height.toString() : a.toString() + }; + Ea.prototype.toString = function() { + return "Size(" + this.width + "," + this.height + ")" + }; + Ea.prototype.equals = Ea.prototype.N = function(a) { + return a instanceof Ea ? this.Fa === a.width && this.Ea === a.height : !1 + }; + Ea.prototype.equalTo = Ea.prototype.Vw = function(a, b) { + return this.Fa === a && this.Ea === b + }; + Ea.prototype.equalsApprox = Ea.prototype.Mc = function(a) { + return eb(this.Fa, a.width) && eb(this.Ea, a.height) + }; + z.defineProperty(Ea, { + width: "width" + }, function() { + return this.Fa + }, function(a) { + this.Pa(a); + u && z.g(a, "number", Ea, "width"); + 0 > a && z.ka(a, ">= 0", Ea, "width"); + this.Fa = a + }); + z.defineProperty(Ea, { + height: "height" + }, function() { + return this.Ea + }, function(a) { + this.Pa(a); + u && z.g(a, "number", Ea, "height"); + 0 > a && z.ka(a, ">= 0", Ea, "height"); + this.Ea = a + }); + Ea.prototype.isReal = Ea.prototype.F = function() { + return isFinite(this.width) && isFinite(this.height) + }; + + function w(a, b, c, d) { + void 0 === a ? this.Ea = this.Fa = this.K = this.J = 0 : a instanceof N ? b instanceof N ? (this.J = Math.min(a.J, b.J), this.K = Math.min(a.K, b.K), this.Fa = Math.abs(a.J - b.J), this.Ea = Math.abs(a.K - b.K)) : b instanceof Ea ? (this.J = a.J, this.K = a.K, this.Fa = b.Fa, this.Ea = b.Ea) : z.k("Incorrect arguments supplied to Rect constructor") : "number" === typeof a && "number" === typeof b && "number" === typeof c && (0 <= c || isNaN(c)) && "number" === typeof d && (0 <= d || isNaN(d)) ? (this.J = a, this.K = b, this.Fa = c, this.Ea = d) : z.k("Invalid arguments to Rect constructor: " + + a + ", " + b + ", " + c + ", " + d); + this.G = !1 + } + z.ia("Rect", w); + z.ii(w); + z.Yd(w, { + x: !0, + y: !0, + width: !0, + height: !0 + }); + w.prototype.assign = function(a) { + this.J = a.J; + this.K = a.K; + this.Fa = a.Fa; + this.Ea = a.Ea + }; + + function yb(a, b, c) { + a.Fa = b; + a.Ea = c + } + w.prototype.setTo = w.prototype.n = function(a, b, c, d) { + u && (z.g(a, "number", w, "setTo:x"), z.g(b, "number", w, "setTo:y"), z.g(c, "number", w, "setTo:w"), z.g(d, "number", w, "setTo:h"), 0 > c && z.ka(c, ">= 0", w, "setTo:w"), 0 > d && z.ka(d, ">= 0", w, "setTo:h")); + this.J = a; + this.K = b; + this.Fa = c; + this.Ea = d; + return this + }; + w.prototype.set = w.prototype.set = function(a) { + u && z.l(a, w, w, "set:r"); + this.Pa(); + this.J = a.J; + this.K = a.K; + this.Fa = a.Fa; + this.Ea = a.Ea; + return this + }; + w.prototype.setPoint = w.prototype.Kf = function(a) { + u && z.l(a, N, w, "setPoint:p"); + this.Pa(); + this.J = a.J; + this.K = a.K; + return this + }; + w.prototype.setSize = function(a) { + u && z.l(a, Ea, w, "setSize:s"); + this.Pa(); + this.Fa = a.Fa; + this.Ea = a.Ea; + return this + }; + w.prototype.copy = function() { + var a = new w; + a.J = this.J; + a.K = this.K; + a.Fa = this.Fa; + a.Ea = this.Ea; + return a + }; + f = w.prototype; + f.La = function() { + this.G = !0; + Object.freeze(this); + return this + }; + f.V = function() { + return Object.isFrozen(this) ? this : this.copy().freeze() + }; + f.freeze = function() { + this.G = !0; + return this + }; + f.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + return this + }; + f.Pa = function(a) { + if (this.G) { + var b = "The Rect is frozen, so its properties cannot be set: " + this.toString(); + void 0 !== a && (b += " to value: " + a); + z.k(b) + } + }; + w.parse = function(a) { + if ("string" === typeof a) { + a = a.split(" "); + for (var b = 0, c = 0; + "" === a[b];) b++; + var d = a[b++]; + d && (c = parseFloat(d)); + for (var e = 0; + "" === a[b];) b++; + (d = a[b++]) && (e = parseFloat(d)); + for (var g = 0; + "" === a[b];) b++; + (d = a[b++]) && (g = parseFloat(d)); + for (var h = 0; + "" === a[b];) b++; + (d = a[b++]) && (h = parseFloat(d)); + return new w(c, e, g, h) + } + return new w + }; + w.stringify = function(a) { + return a instanceof w ? a.x.toString() + " " + a.y.toString() + " " + a.width.toString() + " " + a.height.toString() : a.toString() + }; + w.prototype.toString = function() { + return "Rect(" + this.x + "," + this.y + "," + this.width + "," + this.height + ")" + }; + w.prototype.equals = w.prototype.N = function(a) { + return a instanceof w ? this.J === a.x && this.K === a.y && this.Fa === a.width && this.Ea === a.height : !1 + }; + w.prototype.equalTo = w.prototype.Vw = function(a, b, c, d) { + return this.J === a && this.K === b && this.Fa === c && this.Ea === d + }; + w.prototype.equalsApprox = w.prototype.Mc = function(a) { + return eb(this.J, a.x) && eb(this.K, a.y) && eb(this.Fa, a.width) && eb(this.Ea, a.height) + }; + w.prototype.containsPoint = w.prototype.Ma = function(a) { + u && z.l(a, N, w, "containsPoint:p"); + return this.J <= a.x && this.J + this.Fa >= a.x && this.K <= a.y && this.K + this.Ea >= a.y + }; + w.prototype.containsRect = w.prototype.mk = function(a) { + u && z.l(a, w, w, "containsRect:r"); + return this.J <= a.x && a.x + a.width <= this.J + this.Fa && this.K <= a.y && a.y + a.height <= this.K + this.Ea + }; + w.prototype.contains = w.prototype.contains = function(a, b, c, d) { + u ? (z.p(a, w, "contains:x"), z.p(b, w, "contains:y"), void 0 === c ? c = 0 : z.p(c, w, "contains:w"), void 0 === d ? d = 0 : z.p(d, w, "contains:h"), (0 > c || 0 > d) && z.k("Rect.contains:Width and height cannot be negative")) : (void 0 === c && (c = 0), void 0 === d && (d = 0)); + return this.J <= a && a + c <= this.J + this.Fa && this.K <= b && b + d <= this.K + this.Ea + }; + w.prototype.reset = function() { + this.Pa(); + this.Ea = this.Fa = this.K = this.J = 0 + }; + w.prototype.offset = w.prototype.offset = function(a, b) { + u && (z.p(a, w, "offset:dx"), z.p(b, w, "offset:dy")); + this.Pa(); + this.J += a; + this.K += b; + return this + }; + w.prototype.inflate = w.prototype.ag = function(a, b) { + u && (z.p(a, w, "inflate:w"), z.p(b, w, "inflate:h")); + return zb(this, b, a, b, a) + }; + w.prototype.addMargin = w.prototype.Cw = function(a) { + u && z.l(a, Db, w, "addMargin:m"); + return zb(this, a.top, a.right, a.bottom, a.left) + }; + w.prototype.subtractMargin = w.prototype.rJ = function(a) { + u && z.l(a, Db, w, "subtractMargin:m"); + return zb(this, -a.top, -a.right, -a.bottom, -a.left) + }; + w.prototype.grow = function(a, b, c, d) { + u && (z.p(a, w, "grow:t"), z.p(b, w, "grow:r"), z.p(c, w, "grow:b"), z.p(d, w, "grow:l")); + return zb(this, a, b, c, d) + }; + + function zb(a, b, c, d, e) { + a.Pa(); + var g = a.Fa; + c + e <= -g ? (a.J += g / 2, a.Fa = 0) : (a.J -= e, a.Fa += c + e); + c = a.Ea; + b + d <= -c ? (a.K += c / 2, a.Ea = 0) : (a.K -= b, a.Ea += b + d); + return a + } + w.prototype.intersectRect = function(a) { + u && z.l(a, w, w, "intersectRect:r"); + return Eb(this, a.x, a.y, a.width, a.height) + }; + w.prototype.intersect = function(a, b, c, d) { + u && (z.p(a, w, "intersect:x"), z.p(b, w, "intersect:y"), z.p(c, w, "intersect:w"), z.p(d, w, "intersect:h"), (0 > c || 0 > d) && z.k("Rect.intersect:Width and height cannot be negative")); + return Eb(this, a, b, c, d) + }; + + function Eb(a, b, c, d, e) { + a.Pa(); + var g = Math.max(a.J, b), + h = Math.max(a.K, c); + b = Math.min(a.J + a.Fa, b + d); + c = Math.min(a.K + a.Ea, c + e); + a.J = g; + a.K = h; + a.Fa = Math.max(0, b - g); + a.Ea = Math.max(0, c - h); + return a + } + w.prototype.intersectsRect = w.prototype.Ig = function(a) { + u && z.l(a, w, w, "intersectsRect:r"); + return this.GE(a.x, a.y, a.width, a.height) + }; + w.prototype.intersects = w.prototype.GE = function(a, b, c, d) { + u && (z.p(a, w, "intersects:x"), z.p(b, w, "intersects:y"), z.p(a, w, "intersects:w"), z.p(b, w, "intersects:h"), (0 > c || 0 > d) && z.k("Rect.intersects:Width and height cannot be negative")); + var e = this.Fa, + g = this.J; + if (Infinity !== e && Infinity !== c && (e += g, c += a, isNaN(c) || isNaN(e) || g > c || a > e)) return !1; + a = this.Ea; + c = this.K; + return Infinity !== a && Infinity !== d && (a += c, d += b, isNaN(d) || isNaN(a) || c > d || b > a) ? !1 : !0 + }; + + function Hb(a, b) { + var c = a.Fa, + d = b.width + 10 + 10, + e = a.J, + g = b.x - 10; + if (e > d + g || g > c + e) return !1; + c = a.Ea; + d = b.height + 10 + 10; + e = a.K; + g = b.y - 10; + return e > d + g || g > c + e ? !1 : !0 + } + w.prototype.unionPoint = w.prototype.vj = function(a) { + u && z.l(a, N, w, "unionPoint:p"); + return Ib(this, a.x, a.y, 0, 0) + }; + w.prototype.unionRect = w.prototype.qi = function(a) { + u && z.l(a, w, w, "unionRect:r"); + return Ib(this, a.J, a.K, a.Fa, a.Ea) + }; + w.prototype.union = w.prototype.dG = function(a, b, c, d) { + this.Pa(); + u ? (z.p(a, w, "union:x"), z.p(b, w, "union:y"), void 0 === c ? c = 0 : z.p(c, w, "union:w"), void 0 === d ? d = 0 : z.p(d, w, "union:h"), (0 > c || 0 > d) && z.k("Rect.union:Width and height cannot be negative")) : (void 0 === c && (c = 0), void 0 === d && (d = 0)); + return Ib(this, a, b, c, d) + }; + + function Ib(a, b, c, d, e) { + var g = Math.min(a.J, b), + h = Math.min(a.K, c); + b = Math.max(a.J + a.Fa, b + d); + c = Math.max(a.K + a.Ea, c + e); + a.J = g; + a.K = h; + a.Fa = b - g; + a.Ea = c - h; + return a + } + w.prototype.setSpot = w.prototype.tu = function(a, b, c) { + u && (z.p(a, w, "setSpot:x"), z.p(b, w, "setSpot:y"), z.l(c, Q, w, "setSpot:spot")); + this.Pa(); + this.J = a - c.offsetX - c.x * this.Fa; + this.K = b - c.offsetY - c.y * this.Ea; + return this + }; + var Jb; + w.contains = Jb = function(a, b, c, d, e, g, h, k) { + u ? (z.p(a, w, "contains:rx"), z.p(b, w, "contains:ry"), z.p(c, w, "contains:rw"), z.p(d, w, "contains:rh"), z.p(e, w, "contains:x"), z.p(g, w, "contains:y"), void 0 === h ? h = 0 : z.p(h, w, "contains:w"), void 0 === k ? k = 0 : z.p(k, w, "contains:h"), (0 > c || 0 > d || 0 > h || 0 > k) && z.k("Rect.contains:Width and height cannot be negative")) : (void 0 === h && (h = 0), void 0 === k && (k = 0)); + return a <= e && e + h <= a + c && b <= g && g + k <= b + d + }; + w.intersects = function(a, b, c, d, e, g, h, k) { + u && (z.p(a, w, "intersects:rx"), z.p(b, w, "intersects:ry"), z.p(c, w, "intersects:rw"), z.p(d, w, "intersects:rh"), z.p(e, w, "intersects:x"), z.p(g, w, "intersects:y"), z.p(h, w, "intersects:w"), z.p(k, w, "intersects:h"), (0 > c || 0 > d || 0 > h || 0 > k) && z.k("Rect.intersects:Width and height cannot be negative")); + c += a; + h += e; + if (a > h || e > c) return !1; + a = d + b; + k += g; + return b > k || g > a ? !1 : !0 + }; + z.defineProperty(w, { + x: "x" + }, function() { + return this.J + }, function(a) { + this.Pa(a); + u && z.g(a, "number", w, "x"); + this.J = a + }); + z.defineProperty(w, { + y: "y" + }, function() { + return this.K + }, function(a) { + this.Pa(a); + u && z.g(a, "number", w, "y"); + this.K = a + }); + z.defineProperty(w, { + width: "width" + }, function() { + return this.Fa + }, function(a) { + this.Pa(a); + u && z.g(a, "number", w, "width"); + 0 > a && z.ka(a, ">= 0", w, "width"); + this.Fa = a + }); + z.defineProperty(w, { + height: "height" + }, function() { + return this.Ea + }, function(a) { + this.Pa(a); + u && z.g(a, "number", w, "height"); + 0 > a && z.ka(a, ">= 0", w, "height"); + this.Ea = a + }); + z.defineProperty(w, { + left: "left" + }, function() { + return this.J + }, function(a) { + this.Pa(a); + u && z.g(a, "number", w, "left"); + this.J = a + }); + z.defineProperty(w, { + top: "top" + }, function() { + return this.K + }, function(a) { + this.Pa(a); + u && z.g(a, "number", w, "top"); + this.K = a + }); + z.defineProperty(w, { + right: "right" + }, function() { + return this.J + this.Fa + }, function(a) { + this.Pa(a); + u && z.p(a, w, "right"); + this.J += a - (this.J + this.Fa) + }); + z.defineProperty(w, { + bottom: "bottom" + }, function() { + return this.K + this.Ea + }, function(a) { + this.Pa(a); + u && z.p(a, w, "top"); + this.K += a - (this.K + this.Ea) + }); + z.defineProperty(w, { + position: "position" + }, function() { + return new N(this.J, this.K) + }, function(a) { + this.Pa(a); + u && z.l(a, N, w, "position"); + this.J = a.x; + this.K = a.y + }); + z.defineProperty(w, { + size: "size" + }, function() { + return new Ea(this.Fa, this.Ea) + }, function(a) { + this.Pa(a); + u && z.l(a, Ea, w, "size"); + this.Fa = a.width; + this.Ea = a.height + }); + z.defineProperty(w, { + xl: "center" + }, function() { + return new N(this.J + this.Fa / 2, this.K + this.Ea / 2) + }, function(a) { + this.Pa(a); + u && z.l(a, N, w, "center"); + this.J = a.x - this.Fa / 2; + this.K = a.y - this.Ea / 2 + }); + z.defineProperty(w, { + ra: "centerX" + }, function() { + return this.J + this.Fa / 2 + }, function(a) { + this.Pa(a); + u && z.p(a, w, "centerX"); + this.J = a - this.Fa / 2 + }); + z.defineProperty(w, { + za: "centerY" + }, function() { + return this.K + this.Ea / 2 + }, function(a) { + this.Pa(a); + u && z.p(a, w, "centerY"); + this.K = a - this.Ea / 2 + }); + w.prototype.isReal = w.prototype.F = function() { + return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height) + }; + w.prototype.isEmpty = function() { + return 0 === this.width && 0 === this.height + }; + + function Db(a, b, c, d) { + void 0 === a ? this.fh = this.Xg = this.nh = this.oh = 0 : void 0 === b ? this.left = this.bottom = this.right = this.top = a : void 0 === c ? (d = b, this.top = a, this.right = b, this.bottom = a, this.left = d) : void 0 !== d ? (this.top = a, this.right = b, this.bottom = c, this.left = d) : z.k("Invalid arguments to Margin constructor: " + a + ", " + b + ", " + c + ", " + d); + this.G = !1 + } + z.ia("Margin", Db); + z.ii(Db); + z.Yd(Db, { + top: !0, + right: !0, + bottom: !0, + left: !0 + }); + Db.prototype.assign = function(a) { + this.oh = a.oh; + this.nh = a.nh; + this.Xg = a.Xg; + this.fh = a.fh + }; + Db.prototype.setTo = Db.prototype.n = function(a, b, c, d) { + u && (z.g(a, "number", Db, "setTo:t"), z.g(b, "number", Db, "setTo:r"), z.g(c, "number", Db, "setTo:b"), z.g(d, "number", Db, "setTo:l")); + this.Pa(); + this.oh = a; + this.nh = b; + this.Xg = c; + this.fh = d; + return this + }; + Db.prototype.set = Db.prototype.set = function(a) { + u && z.l(a, Db, Db, "assign:m"); + this.Pa(); + this.oh = a.oh; + this.nh = a.nh; + this.Xg = a.Xg; + this.fh = a.fh; + return this + }; + Db.prototype.copy = function() { + var a = new Db; + a.oh = this.oh; + a.nh = this.nh; + a.Xg = this.Xg; + a.fh = this.fh; + return a + }; + f = Db.prototype; + f.La = function() { + this.G = !0; + Object.freeze(this); + return this + }; + f.V = function() { + return Object.isFrozen(this) ? this : this.copy().freeze() + }; + f.freeze = function() { + this.G = !0; + return this + }; + f.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + return this + }; + f.Pa = function(a) { + if (this.G) { + var b = "The Margin is frozen, so its properties cannot be set: " + this.toString(); + void 0 !== a && (b += " to value: " + a); + z.k(b) + } + }; + Db.parse = function(a) { + if ("string" === typeof a) { + a = a.split(" "); + for (var b = 0, c = NaN; + "" === a[b];) b++; + var d = a[b++]; + d && (c = parseFloat(d)); + if (isNaN(c)) return new Db; + for (var e = NaN; + "" === a[b];) b++; + (d = a[b++]) && (e = parseFloat(d)); + if (isNaN(e)) return new Db(c); + for (var g = NaN; + "" === a[b];) b++; + (d = a[b++]) && (g = parseFloat(d)); + if (isNaN(g)) return new Db(c, e); + for (var h = NaN; + "" === a[b];) b++; + (d = a[b++]) && (h = parseFloat(d)); + return isNaN(h) ? new Db(c, e) : new Db(c, e, g, h) + } + return new Db + }; + Db.stringify = function(a) { + return a instanceof Db ? a.top.toString() + " " + a.right.toString() + " " + a.bottom.toString() + " " + a.left.toString() : a.toString() + }; + Db.prototype.toString = function() { + return "Margin(" + this.top + "," + this.right + "," + this.bottom + "," + this.left + ")" + }; + Db.prototype.equals = Db.prototype.N = function(a) { + return a instanceof Db ? this.oh === a.top && this.nh === a.right && this.Xg === a.bottom && this.fh === a.left : !1 + }; + Db.prototype.equalTo = Db.prototype.Vw = function(a, b, c, d) { + return this.oh === a && this.nh === b && this.Xg === c && this.fh === d + }; + Db.prototype.equalsApprox = Db.prototype.Mc = function(a) { + return eb(this.oh, a.top) && eb(this.nh, a.right) && eb(this.Xg, a.bottom) && eb(this.fh, a.left) + }; + z.defineProperty(Db, { + top: "top" + }, function() { + return this.oh + }, function(a) { + this.Pa(a); + u && z.p(a, Db, "top"); + this.oh = a + }); + z.defineProperty(Db, { + right: "right" + }, function() { + return this.nh + }, function(a) { + this.Pa(a); + u && z.p(a, Db, "right"); + this.nh = a + }); + z.defineProperty(Db, { + bottom: "bottom" + }, function() { + return this.Xg + }, function(a) { + this.Pa(a); + u && z.p(a, Db, "bottom"); + this.Xg = a + }); + z.defineProperty(Db, { + left: "left" + }, function() { + return this.fh + }, function(a) { + this.Pa(a); + u && z.p(a, Db, "left"); + this.fh = a + }); + Db.prototype.isReal = Db.prototype.F = function() { + return isFinite(this.top) && isFinite(this.right) && isFinite(this.bottom) && isFinite(this.left) + }; + + function Fa() { + this.m11 = 1; + this.m21 = this.m12 = 0; + this.m22 = 1; + this.dy = this.dx = 0 + } + z.ii(Fa); + z.Yd(Fa, { + m11: !0, + m12: !0, + m21: !0, + m22: !0, + dx: !0, + dy: !0 + }); + Fa.prototype.set = Fa.prototype.set = function(a) { + u && z.l(a, Fa, Fa, "set:t"); + this.m11 = a.m11; + this.m12 = a.m12; + this.m21 = a.m21; + this.m22 = a.m22; + this.dx = a.dx; + this.dy = a.dy; + return this + }; + Fa.prototype.copy = function() { + var a = new Fa; + a.m11 = this.m11; + a.m12 = this.m12; + a.m21 = this.m21; + a.m22 = this.m22; + a.dx = this.dx; + a.dy = this.dy; + return a + }; + Fa.prototype.toString = function() { + return "Transform(" + this.m11 + "," + this.m12 + "," + this.m21 + "," + this.m22 + "," + this.dx + "," + this.dy + ")" + }; + Fa.prototype.equals = Fa.prototype.N = function(a) { + return a instanceof Fa ? this.m11 === a.m11 && this.m12 === a.m12 && this.m21 === a.m21 && this.m22 === a.m22 && this.dx === a.dx && this.dy === a.dy : !1 + }; + Fa.prototype.isIdentity = Fa.prototype.Pt = function() { + return 1 === this.m11 && 0 === this.m12 && 0 === this.m21 && 1 === this.m22 && 0 === this.dx && 0 === this.dy + }; + Fa.prototype.reset = Fa.prototype.reset = function() { + this.m11 = 1; + this.m21 = this.m12 = 0; + this.m22 = 1; + this.dy = this.dx = 0; + return this + }; + Fa.prototype.multiply = Fa.prototype.multiply = function(a) { + u && z.l(a, Fa, Fa, "multiply:matrix"); + var b = this.m12 * a.m11 + this.m22 * a.m12, + c = this.m11 * a.m21 + this.m21 * a.m22, + d = this.m12 * a.m21 + this.m22 * a.m22, + e = this.m11 * a.dx + this.m21 * a.dy + this.dx, + g = this.m12 * a.dx + this.m22 * a.dy + this.dy; + this.m11 = this.m11 * a.m11 + this.m21 * a.m12; + this.m12 = b; + this.m21 = c; + this.m22 = d; + this.dx = e; + this.dy = g; + return this + }; + Fa.prototype.multiplyInverted = Fa.prototype.vA = function(a) { + u && z.l(a, Fa, Fa, "multiplyInverted:matrix"); + var b = 1 / (a.m11 * a.m22 - a.m12 * a.m21), + c = a.m22 * b, + d = -a.m12 * b, + e = -a.m21 * b, + g = a.m11 * b, + h = b * (a.m21 * a.dy - a.m22 * a.dx), + k = b * (a.m12 * a.dx - a.m11 * a.dy); + a = this.m12 * c + this.m22 * d; + b = this.m11 * e + this.m21 * g; + e = this.m12 * e + this.m22 * g; + g = this.m11 * h + this.m21 * k + this.dx; + h = this.m12 * h + this.m22 * k + this.dy; + this.m11 = this.m11 * c + this.m21 * d; + this.m12 = a; + this.m21 = b; + this.m22 = e; + this.dx = g; + this.dy = h; + return this + }; + Fa.prototype.invert = Fa.prototype.fA = function() { + var a = 1 / (this.m11 * this.m22 - this.m12 * this.m21), + b = -this.m12 * a, + c = -this.m21 * a, + d = this.m11 * a, + e = a * (this.m21 * this.dy - this.m22 * this.dx), + g = a * (this.m12 * this.dx - this.m11 * this.dy); + this.m11 = this.m22 * a; + this.m12 = b; + this.m21 = c; + this.m22 = d; + this.dx = e; + this.dy = g; + return this + }; + Fa.prototype.rotate = Fa.prototype.rotate = function(a, b, c) { + u && (z.p(a, Fa, "rotate:angle"), z.p(b, Fa, "rotate:rx"), z.p(c, Fa, "rotate:ry")); + 360 <= a ? a -= 360 : 0 > a && (a += 360); + if (0 === a) return this; + this.translate(b, c); + var d = 0, + e = 0; + 90 === a ? (d = 0, e = 1) : 180 === a ? (d = -1, e = 0) : 270 === a ? (d = 0, e = -1) : (e = a * Math.PI / 180, d = Math.cos(e), e = Math.sin(e)); + a = this.m12 * d + this.m22 * e; + var g = this.m11 * -e + this.m21 * d, + h = this.m12 * -e + this.m22 * d; + this.m11 = this.m11 * d + this.m21 * e; + this.m12 = a; + this.m21 = g; + this.m22 = h; + this.translate(-b, -c); + return this + }; + Fa.prototype.translate = Fa.prototype.translate = function(a, b) { + u && (z.p(a, Fa, "translate:x"), z.p(b, Fa, "translate:y")); + this.dx += this.m11 * a + this.m21 * b; + this.dy += this.m12 * a + this.m22 * b; + return this + }; + Fa.prototype.scale = Fa.prototype.scale = function(a, b) { + void 0 === b && (b = a); + u && (z.p(a, Fa, "translate:sx"), z.p(b, Fa, "translate:sy")); + this.m11 *= a; + this.m12 *= a; + this.m21 *= b; + this.m22 *= b; + return this + }; + Fa.prototype.transformPoint = Fa.prototype.Cb = function(a) { + u && z.l(a, N, Fa, "transformPoint:p"); + var b = a.J, + c = a.K; + a.J = b * this.m11 + c * this.m21 + this.dx; + a.K = b * this.m12 + c * this.m22 + this.dy; + return a + }; + Fa.prototype.invertedTransformPoint = Fa.prototype.ki = function(a) { + u && z.l(a, N, Fa, "invertedTransformPoint:p"); + var b = 1 / (this.m11 * this.m22 - this.m12 * this.m21), + c = -this.m12 * b, + d = this.m11 * b, + e = b * (this.m12 * this.dx - this.m11 * this.dy), + g = a.J, + h = a.K; + a.J = g * this.m22 * b + h * -this.m21 * b + b * (this.m21 * this.dy - this.m22 * this.dx); + a.K = g * c + h * d + e; + return a + }; + Fa.prototype.transformRect = Fa.prototype.bG = function(a) { + u && z.l(a, w, Fa, "transformRect:rect"); + var b = a.J, + c = a.K, + d = b + a.Fa, + e = c + a.Ea, + g = this.m11, + h = this.m12, + k = this.m21, + l = this.m22, + m = this.dx, + n = this.dy, + p = b * g + c * k + m, + q = b * h + c * l + n, + r = d * g + c * k + m, + c = d * h + c * l + n, + s = b * g + e * k + m, + b = b * h + e * l + n, + g = d * g + e * k + m, + d = d * h + e * l + n, + e = p, + h = q, + p = Math.min(p, r), + e = Math.max(e, r), + h = Math.min(h, c), + q = Math.max(q, c), + p = Math.min(p, s), + e = Math.max(e, s), + h = Math.min(h, b), + q = Math.max(q, b), + p = Math.min(p, g), + e = Math.max(e, g), + h = Math.min(h, d), + q = Math.max(q, d); + a.J = p; + a.K = h; + a.Fa = + e - p; + a.Ea = q - h; + return a + }; + + function Q(a, b, c, d) { + void 0 === a ? this.xg = this.wg = this.K = this.J = 0 : (void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = 0), this.x = a, this.y = b, this.offsetX = c, this.offsetY = d); + this.G = !1 + } + z.ia("Spot", Q); + z.ii(Q); + z.Yd(Q, { + x: !0, + y: !0, + offsetX: !0, + offsetY: !0 + }); + Q.prototype.assign = function(a) { + this.J = a.J; + this.K = a.K; + this.wg = a.wg; + this.xg = a.xg + }; + Q.prototype.setTo = Q.prototype.n = function(a, b, c, d) { + u && (Kb(a, "setTo:x"), Kb(b, "setTo:y"), Pb(c, "setTo:offx"), Pb(d, "setTo:offy")); + this.Pa(); + this.J = a; + this.K = b; + this.wg = c; + this.xg = d; + return this + }; + Q.prototype.set = Q.prototype.set = function(a) { + u && z.l(a, Q, Q, "set:s"); + this.Pa(); + this.J = a.J; + this.K = a.K; + this.wg = a.wg; + this.xg = a.xg; + return this + }; + Q.prototype.copy = function() { + var a = new Q; + a.J = this.J; + a.K = this.K; + a.wg = this.wg; + a.xg = this.xg; + return a + }; + f = Q.prototype; + f.La = function() { + this.G = !0; + Object.freeze(this); + return this + }; + f.V = function() { + return Object.isFrozen(this) ? this : this.copy().freeze() + }; + f.freeze = function() { + this.G = !0; + return this + }; + f.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + return this + }; + f.Pa = function(a) { + if (this.G) { + var b = "The Spot is frozen, so its properties cannot be set: " + this.toString(); + void 0 !== a && (b += " to value: " + a); + z.k(b) + } + }; + + function Tb(a, b) { + a.J = NaN; + a.K = NaN; + a.wg = b; + return a + } + + function Kb(a, b) { + (isNaN(a) || 1 < a || 0 > a) && z.ka(a, "0 <= " + b + " <= 1", Q, b) + } + + function Pb(a, b) { + (isNaN(a) || Infinity === a || -Infinity === a) && z.ka(a, "real number, not NaN or Infinity", Q, b) + } + var Ub; + Q.parse = Ub = function(a) { + if ("string" === typeof a) { + a = a.trim(); + if ("None" === a) return Yb; + if ("TopLeft" === a) return Zb; + if ("Top" === a || "TopCenter" === a || "MiddleTop" === a) return $b; + if ("TopRight" === a) return cc; + if ("Left" === a || "LeftCenter" === a || "MiddleLeft" === a) return dc; + if ("Center" === a) return ec; + if ("Right" === a || "RightCenter" === a || "MiddleRight" === a) return fc; + if ("BottomLeft" === a) return gc; + if ("Bottom" === a || "BottomCenter" === a || "MiddleBottom" === a) return hc; + if ("BottomRight" === a) return ic; + if ("TopSide" === a) return pc; + if ("LeftSide" === + a) return qc; + if ("RightSide" === a) return sc; + if ("BottomSide" === a) return tc; + if ("TopBottomSides" === a) return uc; + if ("LeftRightSides" === a) return vc; + if ("TopLeftSides" === a) return wc; + if ("TopRightSides" === a) return xc; + if ("BottomLeftSides" === a) return Cc; + if ("BottomRightSides" === a) return Dc; + if ("NotTopSide" === a) return Ec; + if ("NotLeftSide" === a) return Fc; + if ("NotRightSide" === a) return Gc; + if ("NotBottomSide" === a) return Hc; + if ("AllSides" === a) return Ic; + if ("Default" === a) return Pc; + a = a.split(" "); + for (var b = 0, c = 0; + "" === a[b];) b++; + var d = a[b++]; + void 0 !== d && 0 < d.length && (c = parseFloat(d)); + for (var e = 0; + "" === a[b];) b++; + d = a[b++]; + void 0 !== d && 0 < d.length && (e = parseFloat(d)); + for (var g = 0; + "" === a[b];) b++; + d = a[b++]; + void 0 !== d && 0 < d.length && (g = parseFloat(d)); + for (var h = 0; + "" === a[b];) b++; + d = a[b++]; + void 0 !== d && 0 < d.length && (h = parseFloat(d)); + return new Q(c, e, g, h) + } + return new Q + }; + Q.stringify = function(a) { + return a instanceof Q ? a.cd() ? a.x.toString() + " " + a.y.toString() + " " + a.offsetX.toString() + " " + a.offsetY.toString() : a.toString() : a.toString() + }; + Q.prototype.toString = function() { + return this.cd() ? 0 === this.wg && 0 === this.xg ? "Spot(" + this.x + "," + this.y + ")" : "Spot(" + this.x + "," + this.y + "," + this.offsetX + "," + this.offsetY + ")" : this.N(Yb) ? "None" : this.N(Zb) ? "TopLeft" : this.N($b) ? "Top" : this.N(cc) ? "TopRight" : this.N(dc) ? "Left" : this.N(ec) ? "Center" : this.N(fc) ? "Right" : this.N(gc) ? "BottomLeft" : this.N(hc) ? "Bottom" : this.N(ic) ? "BottomRight" : this.N(pc) ? "TopSide" : this.N(qc) ? "LeftSide" : this.N(sc) ? "RightSide" : this.N(tc) ? "BottomSide" : this.N(uc) ? "TopBottomSides" : this.N(vc) ? + "LeftRightSides" : this.N(wc) ? "TopLeftSides" : this.N(xc) ? "TopRightSides" : this.N(Cc) ? "BottomLeftSides" : this.N(Dc) ? "BottomRightSides" : this.N(Ec) ? "NotTopSide" : this.N(Fc) ? "NotLeftSide" : this.N(Gc) ? "NotRightSide" : this.N(Hc) ? "NotBottomSide" : this.N(Ic) ? "AllSides" : this.N(Pc) ? "Default" : "None" + }; + Q.prototype.equals = Q.prototype.N = function(a) { + return a instanceof Q ? (this.J === a.x || isNaN(this.J) && isNaN(a.x)) && (this.K === a.y || isNaN(this.K) && isNaN(a.y)) && this.wg === a.offsetX && this.xg === a.offsetY : !1 + }; + Q.prototype.opposite = function() { + return new Q(.5 - (this.J - .5), .5 - (this.K - .5), -this.wg, -this.xg) + }; + Q.prototype.includesSide = Q.prototype.vp = function(a) { + if (!this.kj()) return !1; + if (!a.kj()) + if (a.N(Qc)) a = qc; + else if (a.N(Rc)) a = sc; + else if (a.N(Sc)) a = pc; + else if (a.N(Tc)) a = tc; + else return !1; + a = a.offsetY; + return (this.xg & a) === a + }; + z.defineProperty(Q, { + x: "x" + }, function() { + return this.J + }, function(a) { + this.Pa(a); + u && Kb(a, "x"); + this.J = a + }); + z.defineProperty(Q, { + y: "y" + }, function() { + return this.K + }, function(a) { + this.Pa(a); + u && Kb(a, "y"); + this.K = a + }); + z.defineProperty(Q, { + offsetX: "offsetX" + }, function() { + return this.wg + }, function(a) { + this.Pa(a); + u && Pb(a, "offsetX"); + this.wg = a + }); + z.defineProperty(Q, { + offsetY: "offsetY" + }, function() { + return this.xg + }, function(a) { + this.Pa(a); + u && Pb(a, "offsetY"); + this.xg = a + }); + Q.prototype.isSpot = Q.prototype.cd = function() { + return !isNaN(this.x) && !isNaN(this.y) + }; + Q.prototype.isNoSpot = Q.prototype.Be = function() { + return isNaN(this.x) || isNaN(this.y) + }; + Q.prototype.isSide = Q.prototype.kj = function() { + return this.Be() && 1 === this.offsetX && 0 !== this.offsetY + }; + Q.prototype.isDefault = Q.prototype.bd = function() { + return isNaN(this.x) && isNaN(this.y) && -1 === this.offsetX && 0 === this.offsetY + }; + var Yb; + Q.None = Yb = Tb(new Q(0, 0, 0, 0), 0).La(); + var Pc; + Q.Default = Pc = Tb(new Q(0, 0, -1, 0), -1).La(); + var Zb; + Q.TopLeft = Zb = (new Q(0, 0, 0, 0)).La(); + var $b; + Q.TopCenter = $b = (new Q(.5, 0, 0, 0)).La(); + var cc; + Q.TopRight = cc = (new Q(1, 0, 0, 0)).La(); + var dc; + Q.LeftCenter = dc = (new Q(0, .5, 0, 0)).La(); + var ec; + Q.Center = ec = (new Q(.5, .5, 0, 0)).La(); + var fc; + Q.RightCenter = fc = (new Q(1, .5, 0, 0)).La(); + var gc; + Q.BottomLeft = gc = (new Q(0, 1, 0, 0)).La(); + var hc; + Q.BottomCenter = hc = (new Q(.5, 1, 0, 0)).La(); + var ic; + Q.BottomRight = ic = (new Q(1, 1, 0, 0)).La(); + var Zc; + Q.MiddleTop = Zc = $b; + var $c; + Q.MiddleLeft = $c = dc; + var ad; + Q.MiddleRight = ad = fc; + var bd; + Q.MiddleBottom = bd = hc; + var Sc; + Q.Top = Sc = $b; + var Qc; + Q.Left = Qc = dc; + var Rc; + Q.Right = Rc = fc; + var Tc; + Q.Bottom = Tc = hc; + var pc; + Q.TopSide = pc = Tb(new Q(0, 0, 1, z.pd), 1).La(); + var qc; + Q.LeftSide = qc = Tb(new Q(0, 0, 1, z.Tc), 1).La(); + var sc; + Q.RightSide = sc = Tb(new Q(0, 0, 1, z.fd), 1).La(); + var tc; + Q.BottomSide = tc = Tb(new Q(0, 0, 1, z.ed), 1).La(); + var uc; + Q.TopBottomSides = uc = Tb(new Q(0, 0, 1, z.pd | z.ed), 1).La(); + var vc; + Q.LeftRightSides = vc = Tb(new Q(0, 0, 1, z.Tc | z.fd), 1).La(); + var wc; + Q.TopLeftSides = wc = Tb(new Q(0, 0, 1, z.pd | z.Tc), 1).La(); + var xc; + Q.TopRightSides = xc = Tb(new Q(0, 0, 1, z.pd | z.fd), 1).La(); + var Cc; + Q.BottomLeftSides = Cc = Tb(new Q(0, 0, 1, z.ed | z.Tc), 1).La(); + var Dc; + Q.BottomRightSides = Dc = Tb(new Q(0, 0, 1, z.ed | z.fd), 1).La(); + var Ec; + Q.NotTopSide = Ec = Tb(new Q(0, 0, 1, z.Tc | z.fd | z.ed), 1).La(); + var Fc; + Q.NotLeftSide = Fc = Tb(new Q(0, 0, 1, z.pd | z.fd | z.ed), 1).La(); + var Gc; + Q.NotRightSide = Gc = Tb(new Q(0, 0, 1, z.pd | z.Tc | z.ed), 1).La(); + var Hc; + Q.NotBottomSide = Hc = Tb(new Q(0, 0, 1, z.pd | z.Tc | z.fd), 1).La(); + var Ic; + Q.AllSides = Ic = Tb(new Q(0, 0, 1, z.pd | z.Tc | z.fd | z.ed), 1).La(); + + function cd() { + this.pf = [1, 0, 0, 1, 0, 0] + } + cd.prototype.copy = function() { + var a = new cd; + a.pf[0] = this.pf[0]; + a.pf[1] = this.pf[1]; + a.pf[2] = this.pf[2]; + a.pf[3] = this.pf[3]; + a.pf[4] = this.pf[4]; + a.pf[5] = this.pf[5]; + return a + }; + + function dd(a) { + this.type = a; + this.r2 = this.y2 = this.x2 = this.r1 = this.y1 = this.x1 = 0; + this.RD = []; + this.pattern = null + } + dd.prototype.addColorStop = function(a, b) { + this.RD.push({ + offset: a, + color: b + }) + }; + + function ed(a, b, c) { + this.fillStyle = "#000000"; + this.font = "10px sans-serif"; + this.globalAlpha = 1; + this.lineCap = "butt"; + this.nn = 0; + this.lineJoin = "miter"; + this.lineWidth = 1; + this.miterLimit = 10; + this.shadowBlur = 0; + this.shadowColor = "rgba(0, 0, 0, 0)"; + this.shadowOffsetY = this.shadowOffsetX = 0; + this.strokeStyle = "#000000"; + this.textAlign = "start"; + this.Nw = !1; + this.zg = this.Is = this.Hs = 0; + this.document = b || document; + this.nE = c; + this.nx = null; + this.path = []; + this.ej = new cd; + this.stack = []; + this.Cf = []; + this.Tw = a; + this.NI = "http://www.w3.org/2000/svg"; + this.width = this.Tw.width; + this.height = this.Tw.height; + this.Vl = pd(this, "svg", { + width: this.width + "px", + height: this.height + "px", + EL: "0 0 " + this.Tw.width + " " + this.Tw.height + }); + this.Vl.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://www.w3.org/2000/svg"); + this.Vl.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); + qd(this, 1, 0, 0, 1, 0, 0); + a = z.am++; + b = pd(this, "clipPath", { + id: "mainClip" + a + }); + b.appendChild(pd(this, "rect", { + x: 0, + y: 0, + width: this.width, + height: this.height + })); + this.Vl.appendChild(b); + this.Cf[0].setAttributeNS(null, "clip-path", "url(#mainClip" + a + ")") + } + f = ed.prototype; + f.arc = function(a, b, c, d, e, g) { + rd(this, a, b, c, d, e, g) + }; + f.beginPath = function() { + this.path = [] + }; + f.bezierCurveTo = function(a, b, c, d, e, g) { + this.path.push(["C", a, b, c, d, e, g]) + }; + f.clearRect = function() {}; + f.clip = function() { + sd(this, "clipPath", this.path, new cd) + }; + f.closePath = function() { + this.path.push(["z"]) + }; + f.createLinearGradient = function(a, b, c, d) { + var e = new dd("linear"); + e.x1 = a; + e.y1 = b; + e.x2 = c; + e.y2 = d; + return e + }; + f.createPattern = function(a) { + var b = new dd("pattern"); + b.pattern = a; + return b + }; + f.createRadialGradient = function(a, b, c, d, e, g) { + var h = new dd("radial"); + h.x1 = a; + h.y1 = b; + h.r1 = c; + h.x2 = d; + h.y2 = e; + h.r2 = g; + return h + }; + f.drawImage = function(a, b, c, d, e, g, h, k, l) { + var m = ""; + a instanceof HTMLCanvasElement && (m = a.toDataURL()); + a instanceof HTMLImageElement && (m = a.src); + m = { + x: 0, + y: 0, + width: a.naturalWidth, + height: a.naturalHeight, + href: m + }; + m.preserveAspectRatio = td(d, k) && td(e, l) ? "xMidYMid slice" : "none"; + var n = ""; + k /= d; + l /= e; + if (0 !== g || 0 !== h) n += " translate(" + g + ", " + h + ")"; + if (1 !== k || 1 !== l) n += " scale(" + k + ", " + l + ")"; + if (0 !== b || 0 !== c) n += " translate(" + -b + ", " + -c + ")"; + if (0 !== b || 0 !== c || d !== a.naturalWidth || e !== a.naturalHeight) a = "CLIP" + z.am++, g = pd(this, + "clipPath", { + id: a + }), g.appendChild(pd(this, "rect", { + x: b, + y: c, + width: d, + height: e + })), this.Vl.appendChild(g), m["clip-path"] = "url(#" + a + ")"; + ud(this, "image", m, this.ej, n); + this.addElement("image", m) + }; + f.fill = function() { + sd(this, "fill", this.path, this.ej) + }; + f.Gg = function() { + this.Nw ? this.clip() : this.fill() + }; + f.fillRect = function(a, b, c, d) { + vd(this, "fill", [a, b, c, d], this.ej) + }; + f.fillText = function(a, b, c) { + a = [a, b, c]; + b = this.textAlign; + "left" === b ? b = "start" : "right" === b ? b = "end" : "center" === b && (b = "middle"); + b = { + x: a[1], + y: a[2], + style: "font: " + this.font, + "text-anchor": b + }; + ud(this, "fill", b, this.ej); + this.addElement("text", b, a[0]) + }; + f.lineTo = function(a, b) { + this.path.push(["L", a, b]) + }; + f.moveTo = function(a, b) { + this.path.push(["M", a, b]) + }; + f.quadraticCurveTo = function(a, b, c, d) { + this.path.push(["Q", a, b, c, d]) + }; + f.rect = function(a, b, c, d) { + this.path.push(["M", a, b], ["L", a + c, b], ["L", a + c, b + d], ["L", a, b + d], ["z"]) + }; + f.restore = function() { + this.ej = this.stack.pop(); + this.path = this.stack.pop(); + var a = this.stack.pop(); + this.fillStyle = a.fillStyle; + this.font = a.font; + this.globalAlpha = a.globalAlpha; + this.lineCap = a.lineCap; + this.nn = a.nn; + this.lineJoin = a.lineJoin; + this.lineWidth = a.lineWidth; + this.miterLimit = a.miterLimit; + this.shadowBlur = a.shadowBlur; + this.shadowColor = a.shadowColor; + this.shadowOffsetX = a.shadowOffsetX; + this.shadowOffsetY = a.shadowOffsetY; + this.strokeStyle = a.strokeStyle; + this.textAlign = a.textAlign + }; + f.save = function() { + this.stack.push({ + fillStyle: this.fillStyle, + font: this.font, + globalAlpha: this.globalAlpha, + lineCap: this.lineCap, + nn: this.nn, + lineJoin: this.lineJoin, + lineWidth: this.lineWidth, + miterLimit: this.miterLimit, + shadowBlur: this.shadowBlur, + shadowColor: this.shadowColor, + shadowOffsetX: this.shadowOffsetX, + shadowOffsetY: this.shadowOffsetY, + strokeStyle: this.strokeStyle, + textAlign: this.textAlign + }); + for (var a = [], b = 0; b < this.path.length; b++) a.push(this.path[b]); + this.stack.push(a); + this.stack.push(this.ej.copy()) + }; + f.setTransform = function(a, b, c, d, e, g) { + 1 === a && 0 === b && 0 === c && 1 === d && 0 === e && 0 === g || qd(this, a, b, c, d, e, g) + }; + f.scale = function() {}; + f.stroke = function() { + sd(this, "stroke", this.path, this.ej) + }; + f.tj = function() { + this.Kn || this.stroke() + }; + f.strokeRect = function(a, b, c, d) { + vd(this, "stroke", [a, b, c, d], this.ej) + }; + + function pd(a, b, c, d) { + a = a.document.createElementNS(a.NI, b); + if (z.Za(c)) + for (var e in c) a.setAttributeNS("href" === e ? "http://www.w3.org/1999/xlink" : "", e, c[e]); + void 0 !== d && (a.textContent = d); + return a + } + f.addElement = function(a, b, c) { + a = pd(this, a, b, c); + 0 < this.Cf.length ? this.Cf[this.Cf.length - 1].appendChild(a) : this.Vl.appendChild(a); + return this.nx = a + }; + + function ud(a, b, c, d, e) { + 1 !== a.globalAlpha && (c.opacity = a.globalAlpha); + "fill" === b ? (/^rgba\(/.test(a.fillStyle) ? (a = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle), c.fill = "rgb(" + a[1] + "," + a[2] + "," + a[3] + ")", c["fill-opacity"] = a[4]) : c.fill = a.fillStyle instanceof dd ? wd(a, a.fillStyle) : a.fillStyle, c.stroke = "none") : "stroke" === b && (c.fill = "none", /^rgba\(/.test(a.strokeStyle) ? (b = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle), + c.stroke = "rgb(" + b[1] + "," + b[2] + "," + b[3] + ")", c["stroke-opacity"] = b[4]) : c.stroke = a.strokeStyle instanceof dd ? wd(a, a.strokeStyle) : a.strokeStyle, c["stroke-width"] = a.lineWidth, c["stroke-linecap"] = a.lineCap, c["stroke-linejoin"] = a.lineJoin, c["stroke-miterlimit"] = a.miterLimit); + d = d.pf; + d = "matrix(" + d[0] + ", " + d[1] + ", " + d[2] + ", " + d[3] + ", " + d[4] + ", " + d[5] + ")"; + void 0 !== e && (d += e); + c.transform = d + } + + function wd(a, b) { + var c = "GRAD" + z.am++, + d; + if ("linear" === b.type) d = { + x1: b.x1, + x2: b.x2, + y1: b.y1, + y2: b.y2, + id: c, + gradientUnits: "userSpaceOnUse" + }, d = pd(a, "linearGradient", d); + else if ("radial" === b.type) d = { + x1: b.x1, + x2: b.x2, + y1: b.y1, + y2: b.y2, + r1: b.r1, + r2: b.r2, + id: c + }, d = pd(a, "radialGradient", d); + else if ("pattern" === b.type) { + var e = b.pattern; + d = { + width: e.width, + height: e.height, + id: c, + patternUnits: "userSpaceOnUse" + }; + var g = ""; + e instanceof HTMLCanvasElement && (g = e.toDataURL()); + e instanceof HTMLImageElement && (g = e.src); + e = { + x: 0, + y: 0, + width: e.width, + height: e.height, + href: g + }; + d = pd(a, "pattern", d); + d.appendChild(pd(a, "image", e)) + } else throw Error("invalid gradient"); + for (var e = b.RD, g = e.length, h = [], k = 0; k < g; k++) { + var l = e[k], + m = l.color, + l = { + offset: l.offset, + "stop-color": m + }; + /^rgba\(/.test(m) && (m = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(m), l["stop-color"] = "rgb(" + m[1] + "," + m[2] + "," + m[3] + ")", l["stop-opacity"] = m[4]); + h.push(l) + } + h.sort(function(a, b) { + return a.offset > b.offset ? 1 : -1 + }); + for (k = 0; k < g; k++) d.appendChild(pd(a, "stop", + h[k])); + a.Vl.appendChild(d); + return "url(#" + c + ")" + } + + function vd(a, b, c, d) { + c = { + x: c[0], + y: c[1], + width: c[2], + height: c[3] + }; + ud(a, b, c, d); + a.addElement("rect", c) + } + + function sd(a, b, c, d) { + for (var e = [], g = 0; g < c.length; g++) { + var h = z.zl(c[g]), + k = [h.shift()]; + if ("A" === k[0]) k.push(h.shift() + "," + h.shift(), h.shift(), h.shift() + "," + h.shift(), h.shift() + "," + h.shift()); + else + for (; h.length;) k.push(h.shift() + "," + h.shift()); + e.push(k.join(" ")) + } + c = { + d: e.join(" ") + }; + ud(a, b, c, d); + "clipPath" === b ? (b = "CLIP" + z.am++, d = pd(a, "clipPath", { + id: b + }), d.appendChild(pd(a, "path", c)), a.Vl.appendChild(d), 0 < a.Cf.length && a.Cf[a.Cf.length - 1].setAttributeNS(null, "clip-path", "url(#" + b + ")")) : a.addElement("path", + c) + } + + function rd(a, b, c, d, e, g, h) { + var k = Math.abs(e - g); + if (e !== g) { + var l = b + d * Math.cos(g); + g = c + d * Math.sin(g); + k >= 2 * Math.PI ? (rd(a, b, c, d, e, e + Math.PI, h), rd(a, b, c, d, e + Math.PI, e + 2 * Math.PI, h), a.path.push(["M", l, g])) : (b += d * Math.cos(e), c += d * Math.sin(e), k = 180 * k / Math.PI, e = h ? 0 : 1, h = 180 <= k === !!h ? 0 : 1, 0 !== a.path.length ? a.path.push(["L", b, c]) : a.path.push(["M", b, c]), a.path.push(["A", d, d, k, h, e, l, g])) + } + } + + function qd(a, b, c, d, e, g, h) { + var k = new cd; + k.pf = [b, c, d, e, g, h]; + b = {}; + ud(a, "g", b, k); + k = a.addElement("g", b); + a.Cf.push(k) + } + f.gb = function() { + if (0 !== this.shadowOffsetX || 0 !== this.shadowOffsetY || 0 !== this.shadowBlur) { + var a = "SHADOW" + z.am++, + b = this.addElement("filter", { + id: a, + x: "-100%", + y: "-100%", + width: "300%", + height: "300%" + }, null), + c, d, e, g, h; + c = pd(this, "feGaussianBlur", { + "in": "SourceAlpha", + result: "blur", + vL: this.shadowBlur / 2 + }); + d = pd(this, "feFlood", { + "in": "blur", + result: "flood", + "flood-color": this.shadowColor + }); + e = pd(this, "feComposite", { + "in": "flood", + in2: "blur", + operator: "in", + result: "comp" + }); + g = pd(this, "feOffset", { + "in": "comp", + result: "offsetBlur", + dx: this.shadowOffsetX, + dy: this.shadowOffsetY + }); + h = pd(this, "feMerge", {}); + h.appendChild(pd(this, "feMergeNode", { + "in": "offsetBlur" + })); + h.appendChild(pd(this, "feMergeNode", { + "in": "SourceGraphic" + })); + b.appendChild(c); + b.appendChild(d); + b.appendChild(e); + b.appendChild(g); + b.appendChild(h); + 0 < this.Cf.length && this.Cf[this.Cf.length - 1].setAttributeNS(null, "filter", "url(#" + a + ")") + } + }; + f.TA = function(a, b, c) { + this.Hs = a; + this.Is = b; + this.zg = c + }; + f.wn = function() { + this.shadowBlur = this.shadowOffsetY = this.shadowOffsetX = 0 + }; + f.xn = function() { + this.shadowOffsetX = this.Hs; + this.shadowOffsetY = this.Is; + this.shadowBlur = this.zg + }; + f.Tz = function() { + return !1 + }; + f.Pz = function() {}; + + function la(a, b) { + this.ownerDocument = void 0 === b ? document : b; + var c = this.ownerDocument.createElement("canvas"); + c.tabIndex = 0; + this.Kd = c; + this.yl = new xd(c); + c.Z = a; + Object.seal(this) + } + f = la.prototype; + f.toDataURL = function(a, b) { + return this.Kd.toDataURL(a, b) + }; + f.getBoundingClientRect = function() { + return this.Kd.getBoundingClientRect() + }; + f.focus = function() { + return this.Kd.focus() + }; + f.addEventListener = function(a, b, c) { + this.Kd.addEventListener(a, b, c) + }; + f.removeEventListener = function(a, b, c) { + this.Kd.removeEventListener(a, b, c) + }; + z.defineProperty(la, { + width: "width" + }, function() { + return this.Kd.width + }, function(a) { + this.Kd.width = a + }); + z.defineProperty(la, { + height: "height" + }, function() { + return this.Kd.height + }, function(a) { + this.Kd.height = a + }); + z.defineProperty(la, { + style: "style" + }, function() { + return this.Kd.style + }, function(a) { + this.Kd.style = a + }); + + function xd(a) { + a.getContext && a.getContext("2d") || z.k("Browser does not support HTML Canvas Element"); + this.Ca = a.getContext("2d"); + this.ly = this.ny = this.my = ""; + this.Kn = !1; + this.zg = this.Is = this.Hs = 0; + Object.seal(this) + } + z.defineProperty(xd, { + fillStyle: "fillStyle" + }, function() { + return this.Ca.fillStyle + }, function(a) { + this.ly !== a && (this.ly = this.Ca.fillStyle = a) + }); + z.defineProperty(xd, { + font: "font" + }, function() { + return this.Ca.font + }, function(a) { + this.my !== a && (this.my = this.Ca.font = a) + }); + z.defineProperty(xd, { + globalAlpha: "globalAlpha" + }, function() { + return this.Ca.globalAlpha + }, function(a) { + this.Ca.globalAlpha = a + }); + z.defineProperty(xd, { + lineCap: "lineCap" + }, function() { + return this.Ca.lineCap + }, function(a) { + this.Ca.lineCap = a + }); + z.defineProperty(xd, { + nn: "lineDashOffset" + }, function() { + return this.Ca.nn + }, function(a) { + this.Ca.nn = a + }); + z.defineProperty(xd, { + lineJoin: "lineJoin" + }, function() { + return this.Ca.lineJoin + }, function(a) { + this.Ca.lineJoin = a + }); + z.defineProperty(xd, { + lineWidth: "lineWidth" + }, function() { + return this.Ca.lineWidth + }, function(a) { + this.Ca.lineWidth = a + }); + z.defineProperty(xd, { + miterLimit: "miterLimit" + }, function() { + return this.Ca.miterLimit + }, function(a) { + this.Ca.miterLimit = a + }); + z.defineProperty(xd, { + shadowBlur: "shadowBlur" + }, function() { + return this.Ca.shadowBlur + }, function(a) { + this.Ca.shadowBlur = a + }); + z.defineProperty(xd, { + shadowColor: "shadowColor" + }, function() { + return this.Ca.shadowColor + }, function(a) { + this.Ca.shadowColor = a + }); + z.defineProperty(xd, { + shadowOffsetX: "shadowOffsetX" + }, function() { + return this.Ca.shadowOffsetX + }, function(a) { + this.Ca.shadowOffsetX = a + }); + z.defineProperty(xd, { + shadowOffsetY: "shadowOffsetY" + }, function() { + return this.Ca.shadowOffsetY + }, function(a) { + this.Ca.shadowOffsetY = a + }); + z.defineProperty(xd, { + strokeStyle: "strokeStyle" + }, function() { + return this.Ca.strokeStyle + }, function(a) { + this.ny !== a && (this.ny = this.Ca.strokeStyle = a) + }); + z.defineProperty(xd, { + textAlign: "textAlign" + }, function() { + return this.Ca.textAlign + }, function(a) { + this.Ca.textAlign = a + }); + z.defineProperty(xd, { + Jt: "imageSmoothingEnabled" + }, function() { + return this.Ca.Jt + }, function(a) { + this.Ca.Jt = a + }); + f = xd.prototype; + f.arc = function(a, b, c, d, e, g) { + this.Ca.arc(a, b, c, d, e, g) + }; + f.beginPath = function() { + this.Ca.beginPath() + }; + f.bezierCurveTo = function(a, b, c, d, e, g) { + this.Ca.bezierCurveTo(a, b, c, d, e, g) + }; + f.clearRect = function(a, b, c, d) { + this.Ca.clearRect(a, b, c, d) + }; + f.clip = function() { + this.Ca.clip() + }; + f.closePath = function() { + this.Ca.closePath() + }; + f.createLinearGradient = function(a, b, c, d) { + return this.Ca.createLinearGradient(a, b, c, d) + }; + f.createPattern = function(a, b) { + return this.Ca.createPattern(a, b) + }; + f.createRadialGradient = function(a, b, c, d, e, g) { + return this.Ca.createRadialGradient(a, b, c, d, e, g) + }; + f.drawImage = function(a, b, c, d, e, g, h, k, l) { + void 0 === d ? this.Ca.drawImage(a, b, c) : this.Ca.drawImage(a, b, c, d, e, g, h, k, l) + }; + f.fill = function() { + this.Ca.fill() + }; + f.fillRect = function(a, b, c, d) { + this.Ca.fillRect(a, b, c, d) + }; + f.fillText = function(a, b, c) { + this.Ca.fillText(a, b, c) + }; + f.getImageData = function(a, b, c, d) { + return this.Ca.getImageData(a, b, c, d) + }; + f.lineTo = function(a, b) { + this.Ca.lineTo(a, b) + }; + f.measureText = function(a) { + return this.Ca.measureText(a) + }; + f.moveTo = function(a, b) { + this.Ca.moveTo(a, b) + }; + f.quadraticCurveTo = function(a, b, c, d) { + this.Ca.quadraticCurveTo(a, b, c, d) + }; + f.rect = function(a, b, c, d) { + this.Ca.rect(a, b, c, d) + }; + f.restore = function() { + this.Ca.restore() + }; + xd.prototype.rotate = function(a) { + this.Ca.rotate(a) + }; + f = xd.prototype; + f.save = function() { + this.Ca.save() + }; + f.setTransform = function(a, b, c, d, e, g) { + this.Ca.setTransform(a, b, c, d, e, g) + }; + f.scale = function(a, b) { + this.Ca.scale(a, b) + }; + f.stroke = function() { + this.Ca.stroke() + }; + f.transform = function(a, b, c, d, e, g) { + 1 === a && 0 === b && 0 === c && 1 === d && 0 === e && 0 === g || this.Ca.transform(a, b, c, d, e, g) + }; + f.translate = function(a, b) { + this.Ca.translate(a, b) + }; + f.Gg = function(a) { + if (a instanceof Da && a.type === yd) { + var b = a.On; + a = a.ty; + a > b ? (this.scale(b / a, 1), this.translate((a - b) / 2, 0)) : b > a && (this.scale(1, a / b), this.translate(0, (b - a) / 2)); + this.Kn ? this.clip() : this.fill(); + a > b ? (this.translate(-(a - b) / 2, 0), this.scale(1 / (b / a), 1)) : b > a && (this.translate(0, -(b - a) / 2), this.scale(1, 1 / (a / b))) + } else this.Kn ? this.clip() : this.fill() + }; + f.tj = function() { + this.Kn || this.stroke() + }; + z.defineProperty(xd, { + Nw: "clipInsteadOfFill" + }, function() { + return this.Kn + }, function(a) { + this.Kn = a + }); + f = xd.prototype; + f.TA = function(a, b, c) { + this.Hs = a; + this.Is = b; + this.zg = c + }; + f.wn = function() { + this.shadowBlur = this.shadowOffsetY = this.shadowOffsetX = 0 + }; + f.xn = function() { + this.shadowOffsetX = this.Hs; + this.shadowOffsetY = this.Is; + this.shadowBlur = this.zg + }; + f.Tz = function(a, b) { + var c = this.Ca; + if (void 0 !== c.setLineDash) c.setLineDash(a), c.lineDashOffset = b; + else if (void 0 !== c.webkitLineDash) c.webkitLineDash = a, c.webkitLineDashOffset = b; + else if (void 0 !== c.mozDash) c.mozDash = a, c.mozDashOffset = b; + else return !1; + return !0 + }; + f.Pz = function() { + var a = this.Ca; + void 0 !== a.setLineDash ? (a.setLineDash(z.xj), a.lineDashOffset = 0) : void 0 !== a.webkitLineDash ? (a.webkitLineDash = z.xj, a.webkitLineDashOffset = 0) : void 0 !== a.mozDash && (a.mozDash = null, a.mozDashOffset = 0) + }; + + function ca(a, b) { + b && (a.my = ""); + a.ny = ""; + a.ly = "" + } + var Hd = (Math.sqrt(2) - 1) / 3 * 4, + Id = (new N(0, 0)).La(), + Jd = (new w(0, 0, 0, 0)).La(), + Kd = (new Db(0, 0, 0, 0)).La(), + Ld = (new Db(2, 2, 2, 2)).La(), + Md = (new N(6, 6)).La(), + Nd = (new N(-Infinity, -Infinity)).La(), + Od = (new N(Infinity, Infinity)).La(), + Pd = (new Ea(0, 0)).La(), + Qd = (new Ea(1, 1)).La(), + ae = (new Ea(6, 6)).La(), + be = (new Ea(8, 8)).La(), + ce = (new Ea(10, 10)).La(), + de = (new Ea(Infinity, Infinity)).La(), + ee = (new N(NaN, NaN)).La(), + fe = (new Ea(NaN, NaN)).La(), + ge = (new w(NaN, NaN, NaN, NaN)).La(), + he = (new Q(.156, .156)).La(), + ie = (new Q(.844, .844)).La(), + je = new ma, + ke = new ma, + le = null; + + function se(a) { + if (0 >= a) return 0; + var b = le; + if (null === b) { + for (var b = [], c = 0; 2E3 >= c; c++) b[c] = Math.sqrt(c); + le = b + } + return 1 > a ? (c = 1 / a, 2E3 >= c ? 1 / b[c | 0] : Math.sqrt(a)) : 2E3 >= a ? b[a | 0] : Math.sqrt(a) + } + + function eb(a, b) { + var c = a - b; + return .5 > c && -.5 < c + } + + function td(a, b) { + var c = a - b; + return 5E-8 > c && -5E-8 < c + } + + function te(a, b, c, d, e, g, h) { + 0 >= e && (e = 1E-6); + var k = 0, + l = 0, + m = 0, + n = 0; + a < c ? (l = a, k = c) : (l = c, k = a); + b < d ? (n = b, m = d) : (n = d, m = b); + if (a === c) return n <= h && h <= m && a - e <= g && g <= a + e; + if (b === d) return l <= g && g <= k && b - e <= h && h <= b + e; + k += e; + l -= e; + if (l <= g && g <= k && (m += e, n -= e, n <= h && h <= m)) + if (k - l > m - n) + if (a - c > e || c - a > e) { + if (g = (d - b) / (c - a) * (g - a) + b, g - e <= h && h <= g + e) return !0 + } else return !0; + else if (b - d > e || d - b > e) { + if (h = (c - a) / (d - b) * (h - b) + a, h - e <= g && g <= h + e) return !0 + } else return !0; + return !1 + } + + function ue(a, b, c, d, e, g, h, k, l, m, n, p) { + if (te(a, b, h, k, p, c, d) && te(a, b, h, k, p, e, g)) return te(a, b, h, k, p, m, n); + var q = (a + c) / 2, + r = (b + d) / 2, + s = (c + e) / 2, + t = (d + g) / 2; + e = (e + h) / 2; + g = (g + k) / 2; + d = (q + s) / 2; + c = (r + t) / 2; + var s = (s + e) / 2, + t = (t + g) / 2, + v = (d + s) / 2, + x = (c + t) / 2; + return ue(a, b, q, r, d, c, v, x, l, m, n, p) || ue(v, x, s, t, e, g, h, k, l, m, n, p) + } + + function ve(a, b, c, d, e, g, h, k, l, m) { + if (te(a, b, h, k, l, c, d) && te(a, b, h, k, l, e, g)) Ib(m, a, b, 0, 0), Ib(m, h, k, 0, 0); + else { + var n = (a + c) / 2, + p = (b + d) / 2, + q = (c + e) / 2, + r = (d + g) / 2; + e = (e + h) / 2; + g = (g + k) / 2; + d = (n + q) / 2; + c = (p + r) / 2; + var q = (q + e) / 2, + r = (r + g) / 2, + s = (d + q) / 2, + t = (c + r) / 2; + ve(a, b, n, p, d, c, s, t, l, m); + ve(s, t, q, r, e, g, h, k, l, m) + } + } + + function we(a, b, c, d, e, g, h, k, l, m) { + if (te(a, b, h, k, l, c, d) && te(a, b, h, k, l, e, g)) 0 === m.length && (m.push(a), m.push(b)), m.push(h), m.push(k); + else { + var n = (a + c) / 2, + p = (b + d) / 2, + q = (c + e) / 2, + r = (d + g) / 2; + e = (e + h) / 2; + g = (g + k) / 2; + d = (n + q) / 2; + c = (p + r) / 2; + var q = (q + e) / 2, + r = (r + g) / 2, + s = (d + q) / 2, + t = (c + r) / 2; + we(a, b, n, p, d, c, s, t, l, m); + we(s, t, q, r, e, g, h, k, l, m) + } + } + + function xe(a, b, c, d, e, g, h, k, l, m, n, p, q, r) { + var s = 1 - l; + a = a * s + c * l; + b = b * s + d * l; + c = c * s + e * l; + d = d * s + g * l; + e = e * s + h * l; + g = g * s + k * l; + k = a * s + c * l; + h = b * s + d * l; + c = c * s + e * l; + d = d * s + g * l; + m.x = a; + m.y = b; + n.x = k; + n.y = h; + p.x = k * s + c * l; + p.y = h * s + d * l; + q.x = c; + q.y = d; + r.x = e; + r.y = g + } + + function ye(a, b, c, d, e, g, h, k, l, m) { + if (te(a, b, e, g, m, c, d)) return te(a, b, e, g, m, k, l); + var n = (a + c) / 2, + p = (b + d) / 2; + c = (c + e) / 2; + d = (d + g) / 2; + var q = (n + c) / 2, + r = (p + d) / 2; + return ye(a, b, n, p, q, r, h, k, l, m) || ye(q, r, c, d, e, g, h, k, l, m) + } + + function ze(a, b, c, d, e, g, h, k) { + if (te(a, b, e, g, h, c, d)) Ib(k, a, b, 0, 0), Ib(k, e, g, 0, 0); + else { + var l = (a + c) / 2, + m = (b + d) / 2; + c = (c + e) / 2; + d = (d + g) / 2; + var n = (l + c) / 2, + p = (m + d) / 2; + ze(a, b, l, m, n, p, h, k); + ze(n, p, c, d, e, g, h, k) + } + } + + function Je(a, b, c, d, e, g, h, k) { + if (te(a, b, e, g, h, c, d)) 0 === k.length && (k.push(a), k.push(b)), k.push(e), k.push(g); + else { + var l = (a + c) / 2, + m = (b + d) / 2; + c = (c + e) / 2; + d = (d + g) / 2; + var n = (l + c) / 2, + p = (m + d) / 2; + Je(a, b, l, m, n, p, h, k); + Je(n, p, c, d, e, g, h, k) + } + } + + function Ke(a, b, c, d, e, g, h, k, l, m, n, p, q, r) { + 0 >= q && (q = 1E-6); + if (te(a, b, h, k, q, c, d) && te(a, b, h, k, q, e, g)) { + var s = (a - h) * (m - p) - (b - k) * (l - n); + if (0 === s) return !1; + q = ((a * k - b * h) * (l - n) - (a - h) * (l * p - m * n)) / s; + s = ((a * k - b * h) * (m - p) - (b - k) * (l * p - m * n)) / s; + if ((l > n ? l - n : n - l) < (m > p ? m - p : p - m)) { + if (h = l = 0, b < k ? (l = b, h = k) : (l = k, h = b), s < l || s > h) return !1 + } else if (a < h ? l = a : (l = h, h = a), q < l || q > h) return !1; + r.x = q; + r.y = s; + return !0 + } + var s = (a + c) / 2, + t = (b + d) / 2; + c = (c + e) / 2; + d = (d + g) / 2; + e = (e + h) / 2; + g = (g + k) / 2; + var v = (s + c) / 2, + x = (t + d) / 2; + c = (c + e) / 2; + d = (d + g) / 2; + var y = (v + c) / 2, + A = (x + d) / 2, + B = (n - l) * (n - l) + (p - m) * (p - m), + L = !1; + Ke(a, b, s, t, v, x, y, A, l, m, n, p, q, r) && (b = (r.x - l) * (r.x - l) + (r.y - m) * (r.y - m), b < B && (B = b, L = !0)); + a = r.x; + s = r.y; + Ke(y, A, c, d, e, g, h, k, l, m, n, p, q, r) && (b = (r.x - l) * (r.x - l) + (r.y - m) * (r.y - m), b < B ? L = !0 : (r.x = a, r.y = s)); + return L + } + + function Le(a, b, c, d, e, g, h, k, l, m, n, p, q) { + var r = 0; + 0 >= q && (q = 1E-6); + if (te(a, b, h, k, q, c, d) && te(a, b, h, k, q, e, g)) { + q = (a - h) * (m - p) - (b - k) * (l - n); + if (0 === q) return r; + var s = ((a * k - b * h) * (l - n) - (a - h) * (l * p - m * n)) / q, + t = ((a * k - b * h) * (m - p) - (b - k) * (l * p - m * n)) / q; + if (s >= n) return r; + if ((l > n ? l - n : n - l) < (m > p ? m - p : p - m)) { + if (a = l = 0, b < k ? (l = b, a = k) : (l = k, a = b), t < l || t > a) return r + } else if (a < h ? (l = a, a = h) : l = h, s < l || s > a) return r; + 0 < q ? r++ : 0 > q && r-- + } else { + var s = (a + c) / 2, + t = (b + d) / 2, + v = (c + e) / 2, + x = (d + g) / 2; + e = (e + h) / 2; + g = (g + k) / 2; + d = (s + v) / 2; + c = (t + x) / 2; + var v = (v + e) / 2, + x = (x + g) / 2, + y = (d + v) / 2, + A = (c + x) / 2, + r = r + Le(a, b, s, t, d, c, y, A, l, m, n, p, q), + r = r + Le(y, A, v, x, e, g, h, k, l, m, n, p, q) + } + return r + } + + function ib(a, b, c, d, e, g, h) { + if (td(a, c)) { + var k = 0; + c = 0; + b < d ? (k = b, c = d) : (k = d, c = b); + d = g; + if (d < k) return h.x = a, h.y = k, !1; + if (d > c) return h.x = a, h.y = c, !1; + h.x = a; + h.y = d; + return !0 + } + if (td(b, d)) { + a < c ? k = a : (k = c, c = a); + d = e; + if (d < k) return h.x = k, h.y = b, !1; + if (d > c) return h.x = c, h.y = b, !1; + h.x = d; + h.y = b; + return !0 + } + k = ((a - e) * (a - c) + (b - g) * (b - d)) / ((c - a) * (c - a) + (d - b) * (d - b)); + if (-5E-6 > k) return h.x = a, h.y = b, !1; + if (1.000005 < k) return h.x = c, h.y = d, !1; + h.x = a + k * (c - a); + h.y = b + k * (d - b); + return !0 + } + + function Me(a, b, c, d, e, g, h, k, l) { + if (eb(a, c) && eb(b, d)) return l.x = a, l.y = b, !1; + if (td(e, h)) { + if (td(a, c)) return ib(a, b, c, d, e, g, l), !1; + g = (d - b) / (c - a) * (e - a) + b; + return ib(a, b, c, d, e, g, l) + } + k = (k - g) / (h - e); + if (td(a, c)) { + g = k * (a - e) + g; + c = h = 0; + b < d ? (h = b, c = d) : (h = d, c = b); + if (g < h) return l.x = a, l.y = h, !1; + if (g > c) return l.x = a, l.y = c, !1; + l.x = a; + l.y = g; + return !0 + } + h = (d - b) / (c - a); + if (td(k, h)) return ib(a, b, c, d, e, g, l), !1; + e = (h * a - k * e + g - b) / (h - k); + if (td(h, 0)) { + a < c ? h = a : (h = c, c = a); + if (e < h) return l.x = h, l.y = b, !1; + if (e > c) return l.x = c, l.y = b, !1; + l.x = e; + l.y = b; + return !0 + } + g = + h * (e - a) + b; + return ib(a, b, c, d, e, g, l) + } + + function Ne(a, b, c, d, e, g, h, k, l) { + var m = 1E21, + n = a, + p = b; + if (Me(a, b, a, d, e, g, h, k, l)) { + var q = (l.x - e) * (l.x - e) + (l.y - g) * (l.y - g); + q < m && (m = q, n = l.x, p = l.y) + } + Me(c, b, c, d, e, g, h, k, l) && (q = (l.x - e) * (l.x - e) + (l.y - g) * (l.y - g), q < m && (m = q, n = l.x, p = l.y)); + Me(a, b, c, b, e, g, h, k, l) && (q = (l.x - e) * (l.x - e) + (l.y - g) * (l.y - g), q < m && (m = q, n = l.x, p = l.y)); + Me(a, d, c, d, e, g, h, k, l) && (q = (l.x - e) * (l.x - e) + (l.y - g) * (l.y - g), q < m && (m = q, n = l.x, p = l.y)); + l.x = n; + l.y = p; + return 1E21 > m + } + + function Oe(a, b, c, d, e, g, h, k, l) { + c = a - c; + var m = e - h, + n = h = 0; + 0 === c || 0 === m ? 0 === c ? (k = (g - k) / m, h = a, n = k * h + (g - k * e)) : (d = (b - d) / c, h = e, n = d * h + (b - d * a)) : (d = (b - d) / c, k = (g - k) / m, a = b - d * a, h = (g - k * e - a) / (d - k), n = d * h + a); + l.n(h, n); + return l + } + + function Pe(a, b, c) { + var d = b.x, + e = b.y, + g = c.x, + h = c.y, + k = a.left, + l = a.right, + m = a.top, + n = a.bottom; + return d === g ? (g = a = 0, e < h ? (a = e, g = h) : (a = h, g = e), k <= d && d <= l && a <= n && g >= m) : e === h ? (d < g ? a = d : (a = g, g = d), m <= e && e <= n && a <= l && g >= k) : a.Ma(b) || a.Ma(c) || bf(k, m, l, m, d, e, g, h) || bf(l, m, l, n, d, e, g, h) || bf(l, n, k, n, d, e, g, h) || bf(k, n, k, m, d, e, g, h) ? !0 : !1 + } + + function bf(a, b, c, d, e, g, h, k) { + return 0 >= cf(a, b, c, d, e, g) * cf(a, b, c, d, h, k) && 0 >= cf(e, g, h, k, a, b) * cf(e, g, h, k, c, d) + } + + function cf(a, b, c, d, e, g) { + c -= a; + d -= b; + a = e - a; + b = g - b; + g = a * d - b * c; + 0 === g && (g = a * c + b * d, 0 < g && (g = (a - c) * c + (b - d) * d, 0 > g && (g = 0))); + return 0 > g ? -1 : 0 < g ? 1 : 0 + } + + function df(a) { + 0 > a && (a += 360); + 360 <= a && (a -= 360); + return a + } + + function ef(a, b, c, d) { + var e = Math.PI; + d || (b *= e / 180, c *= e / 180); + d = b < c ? 1 : -1; + var g = [], + h = e / 2, + k = b; + for (b = Math.min(2 * e, Math.abs(c - b)); 1E-5 < b;) { + c = k + d * Math.min(b, h); + var e = (c - k) / 2, + l = a * Math.cos(e), + m = a * Math.sin(e), + n = -m, + p = l * l + n * n, + q = p + l * l + n * m, + p = 4 / 3 * (Math.sqrt(2 * p * q) - q) / (l * m - n * l), + m = l - p * n, + l = n + p * l, + n = -l, + p = e + k, + e = Math.cos(p), + p = Math.sin(p); + g.push([0 + a * Math.cos(k), 0 + a * Math.sin(k), 0 + m * e - l * p, 0 + m * p + l * e, 0 + m * e - n * p, 0 + m * p + n * e, 0 + a * Math.cos(c), 0 + a * Math.sin(c)]); + b -= Math.abs(c - k); + k = c + } + return g + } + + function jb(a, b, c, d, e, g, h) { + c = Math.floor((a - c) / e) * e + c; + d = Math.floor((b - d) / g) * g + d; + var k = c; + c + e - a < e / 2 && (k = c + e); + a = d; + d + g - b < g / 2 && (a = d + g); + h.n(k, a) + } + + function ff(a, b) { + var c = Math.max(a, b), + d = Math.min(a, b), + e = 1, + g = 1; + do e = c % d, c = g = d, d = e; while (0 < e); + return g + } + + function gf(a, b, c, d) { + var e = 0 > c, + g = 0 > d, + h = 0, + k = h = 0; + a < b ? (h = 1, k = 0) : (h = 0, k = 1); + var l = 0, + m = 0, + n = 0, + p = 0, + l = 0 === h ? a : b, + n = 0 === h ? c : d; + if (0 === h ? e : g) n = -n; + h = k; + m = 0 === h ? a : b; + p = 0 === h ? c : d; + if (0 === h ? e : g) p = -p; + a = a = 0; + if (0 < p) + if (0 < n) { + b = l * l; + a = m * m; + l *= n; + c = m * p; + d = -a + c; + e = -a + Math.sqrt(l * l + c * c); + m = d; + for (g = 0; 9999999999 > g; ++g) { + m = .5 * (d + e); + if (m === d || m === e) break; + k = l / (m + b); + h = c / (m + a); + k = k * k + h * h - 1; + if (0 < k) d = m; + else if (0 > k) e = m; + else break + } + n = b * n / (m + b) - n; + p = a * p / (m + a) - p; + a = Math.sqrt(n * n + p * p) + } else a = Math.abs(p - m); + else p = l * l - m * m, a = l * n, a < p ? (p = a / p, a = m * Math.sqrt(Math.abs(1 - + p * p)), n = l * p - n, a = Math.sqrt(n * n + a * a)) : a = Math.abs(n - l); + return a + } + + function hf(a) { + 1 < arguments.length && z.k("Geometry constructor can take at most one optional argument, the Geometry type."); + z.kc(this); + this.G = !1; + void 0 === a ? a = jf : u && z.Ba(a, hf, hf, "constructor:type"); + this.ba = a; + this.Gb = this.zb = this.Cc = this.xc = 0; + this.Cj = new J(kf); + this.mv = this.Cj.H; + this.Xu = (new w).freeze(); + this.ib = !0; + this.bi = Zb; + this.ci = ic; + this.po = this.ro = NaN; + this.Bi = lf + } + z.ia("Geometry", hf); + z.ii(hf); + hf.prototype.copy = function() { + var a = new hf; + a.ba = this.ba; + a.xc = this.xc; + a.Cc = this.Cc; + a.zb = this.zb; + a.Gb = this.Gb; + for (var b = this.Cj.o, c = b.length, d = a.Cj, e = 0; e < c; e++) { + var g = b[e].copy(); + d.add(g) + } + a.mv = this.mv; + a.Xu.assign(this.Xu); + a.ib = this.ib; + a.bi = this.bi.V(); + a.ci = this.ci.V(); + a.ro = this.ro; + a.po = this.po; + a.Bi = this.Bi; + return a + }; + var mf; + hf.Line = mf = z.s(hf, "Line", 0); + var nf; + hf.Rectangle = nf = z.s(hf, "Rectangle", 1); + var of; + hf.Ellipse = of = z.s(hf, "Ellipse", 2); + var jf; + hf.Path = jf = z.s(hf, "Path", 3); + hf.prototype.La = function() { + this.freeze(); + Object.freeze(this); + return this + }; + hf.prototype.freeze = function() { + this.G = !0; + var a = this.cc; + a.freeze(); + for (var a = a.o, b = a.length, c = 0; c < b; c++) a[c].freeze(); + return this + }; + hf.prototype.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + var a = this.cc; + a.Wa(); + for (var a = a.o, b = a.length, c = 0; c < b; c++) a[c].Wa(); + return this + }; + hf.prototype.equalsApprox = hf.prototype.Mc = function(a) { + if (!(a instanceof hf)) return !1; + if (this.type !== a.type) return this.type === mf && a.type === jf ? pf(this, a) : a.type === mf && this.type === jf ? pf(a, this) : !1; + if (this.type === jf) { + var b = this.cc.o; + a = a.cc.o; + var c = b.length; + if (c !== a.length) return !1; + for (var d = 0; d < c; d++) + if (!b[d].Mc(a[d])) return !1; + return !0 + } + return eb(this.Ha, a.Ha) && eb(this.Da, a.Da) && eb(this.L, a.L) && eb(this.M, a.M) + }; + + function pf(a, b) { + if (a.type !== mf || b.type !== jf) return !1; + if (1 === b.cc.count) { + var c = b.cc.ea(0); + if (1 === c.Ab.count && eb(a.Ha, c.Ha) && eb(a.Da, c.Da) && (c = c.Ab.ea(0), c.type === qf && eb(a.L, c.L) && eb(a.M, c.M))) return !0 + } + return !1 + } + var rf; + hf.stringify = rf = function(a) { + return a.toString() + }; + hf.prototype.toString = function(a) { + void 0 === a && (a = -1); + switch (this.type) { + case mf: + return 0 > a ? "M" + this.Ha.toString() + " " + this.Da.toString() + "L" + this.L.toString() + " " + this.M.toString() : "M" + this.Ha.toFixed(a) + " " + this.Da.toFixed(a) + "L" + this.L.toFixed(a) + " " + this.M.toFixed(a); + case nf: + var b = new w(this.Ha, this.Da, 0, 0); + b.dG(this.L, this.M, 0, 0); + return 0 > a ? "M" + b.x.toString() + " " + b.y.toString() + "H" + b.right.toString() + "V" + b.bottom.toString() + "H" + b.left.toString() + "z" : "M" + b.x.toFixed(a) + " " + b.y.toFixed(a) + "H" + b.right.toFixed(a) + + "V" + b.bottom.toFixed(a) + "H" + b.left.toFixed(a) + "z"; + case of: + b = new w(this.Ha, this.Da, 0, 0); + b.dG(this.L, this.M, 0, 0); + if (0 > a) { + var c = b.left.toString() + " " + (b.y + b.height / 2).toString(), + d = b.right.toString() + " " + (b.y + b.height / 2).toString(); + return "M" + c + "A" + (b.width / 2).toString() + " " + (b.height / 2).toString() + " 0 0 1 " + d + "A" + (b.width / 2).toString() + " " + (b.height / 2).toString() + " 0 0 1 " + c + } + c = b.left.toFixed(a) + " " + (b.y + b.height / 2).toFixed(a); + d = b.right.toFixed(a) + " " + (b.y + b.height / 2).toFixed(a); + return "M" + c + "A" + (b.width / + 2).toFixed(a) + " " + (b.height / 2).toFixed(a) + " 0 0 1 " + d + "A" + (b.width / 2).toFixed(a) + " " + (b.height / 2).toFixed(a) + " 0 0 1 " + c; + case jf: + for (var b = "", c = this.cc.o, d = c.length, e = 0; e < d; e++) { + var g = c[e]; + 0 < e && (b += " x "); + g.Ot && (b += "F "); + b += g.toString(a) + } + return b; + default: + return this.type.toString() + } + }; + hf.fillPath = function(a) { + "string" !== typeof a && z.ic(a, "string", hf, "fillPath:str"); + a = a.split(/[Xx]/); + for (var b = a.length, c = "", d = 0; d < b; d++) var e = a[d], + c = null !== e.match(/[Ff]/) ? 0 === d ? c + e : c + ("X" + (" " === e[0] ? "" : " ") + e) : c + ((0 === d ? "" : "X ") + "F" + (" " === e[0] ? "" : " ") + e); + return c + }; + var sf; + hf.parse = sf = function(a, b) { + function c() { + return m >= t - 1 ? !0 : null !== l[m + 1].match(/[A-Za-z]/) + } + + function d() { + m++; + return l[m] + } + + function e() { + var a = new N(parseFloat(d()), parseFloat(d())); + n === n.toLowerCase() && (a.x = s.x + a.x, a.y = s.y + a.y); + return a + } + + function g() { + return s = e() + } + + function h() { + return r = e() + } + + function k() { + return "c" !== p.toLowerCase() && "s" !== p.toLowerCase() ? s : new N(2 * s.x - r.x, 2 * s.y - r.y) + } + void 0 === b && (b = !1); + "string" !== typeof a && z.ic(a, "string", hf, "parse:str"); + a = a.replace(/,/gm, " "); + a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, + "$1 $2"); + a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2"); + a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm, "$1 $2"); + a = a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2"); + a = a.replace(/([0-9])([+\-])/gm, "$1 $2"); + a = a.replace(/(\.[0-9]*)(\.)/gm, "$1 $2"); + a = a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm, "$1 $3 $4 "); + a = a.replace(/[\s\r\t\n]+/gm, " "); + a = a.replace(/^\s+|\s+$/g, ""); + for (var l = a.split(" "), m = -1, n = "", p = "", q = new N(0, 0), r = new N(0, 0), s = new N(0, + 0), t = l.length, v = z.v(), x = !1, y = !1, A = !0; !(m >= t - 1);) + if (p = n, n = d(), "" !== n) switch (n.toUpperCase()) { + case "X": + A = !0; + y = x = !1; + break; + case "M": + var B = g(); + null === v.$b || !0 === A ? (R(v, B.x, B.y, x, !1, !y), A = !1) : v.moveTo(B.x, B.y); + for (q = s; !c();) B = g(), v.lineTo(B.x, B.y); + break; + case "L": + for (; !c();) B = g(), v.lineTo(B.x, B.y); + break; + case "H": + for (; !c();) s = B = new N((n === n.toLowerCase() ? s.x : 0) + parseFloat(d()), s.y), v.lineTo(s.x, s.y); + break; + case "V": + for (; !c();) s = B = new N(s.x, (n === n.toLowerCase() ? s.y : 0) + parseFloat(d())), v.lineTo(s.x, s.y); + break; + case "C": + for (; !c();) { + var L = e(), + H = h(), + B = g(); + S(v, L.x, L.y, H.x, H.y, B.x, B.y) + } + break; + case "S": + for (; !c();) L = k(), H = h(), B = g(), S(v, L.x, L.y, H.x, H.y, B.x, B.y); + break; + case "Q": + for (; !c();) H = h(), B = g(), yf(v, H.x, H.y, B.x, B.y); + break; + case "T": + for (; !c();) r = H = k(), B = g(), yf(v, H.x, H.y, B.x, B.y); + break; + case "B": + for (; !c();) { + var B = parseFloat(d()), + L = parseFloat(d()), + H = parseFloat(d()), + U = parseFloat(d()), + ea = parseFloat(d()), + W = ea, + P = !1; + c() || (W = parseFloat(d()), c() || (P = 0 !== parseFloat(d()))); + n === n.toLowerCase() && (H += s.x, U += s.y); + v.arcTo(B, L, + H, U, ea, W, P) + } + break; + case "A": + for (; !c();) L = Math.abs(parseFloat(d())), H = Math.abs(parseFloat(d())), U = parseFloat(d()), ea = !!parseFloat(d()), W = !!parseFloat(d()), B = g(), zf(v, L, H, U, ea, W, B.x, B.y); + break; + case "Z": + B = v.q.cc.o[v.q.cc.length - 1]; + T(v); + s = q; + break; + case "F": + B = ""; + for (L = 1; l[m + L];) + if (null !== l[m + L].match(/[Uu]/)) L++; + else if (null === l[m + L].match(/[A-Za-z]/)) L++; + else { + B = l[m + L]; + break + } + B.match(/[Mm]/) ? x = !0 : Af(v); + break; + case "U": + B = ""; + for (L = 1; l[m + L];) + if (null !== l[m + L].match(/[Ff]/)) L++; + else if (null === l[m + L].match(/[A-Za-z]/)) L++; + else { + B = l[m + L]; + break + } + B.match(/[Mm]/) ? y = !0 : v.gb(!1) + } + q = v.q; + z.u(v); + if (b) + for (v = q.cc.i; v.next();) B = v.value, B.Ot = !0; + return q + }; + + function Bf(a, b) { + for (var c = a.length, d = z.O(), e = 0; e < c; e++) { + var g = a[e]; + d.x = g[0]; + d.y = g[1]; + b.Cb(d); + g[0] = d.x; + g[1] = d.y; + d.x = g[2]; + d.y = g[3]; + b.Cb(d); + g[2] = d.x; + g[3] = d.y; + d.x = g[4]; + d.y = g[5]; + b.Cb(d); + g[4] = d.x; + g[5] = d.y; + d.x = g[6]; + d.y = g[7]; + b.Cb(d); + g[6] = d.x; + g[7] = d.y + } + z.A(d) + } + hf.prototype.iA = function() { + if (this.ib || this.mv !== this.cc.H) return !0; + for (var a = this.cc.o, b = a.length, c = 0; c < b; c++) + if (a[c].iA()) return !0; + return !1 + }; + hf.prototype.eB = function() { + this.ib = !1; + this.mv = this.cc.H; + for (var a = this.cc.o, b = a.length, c = 0; c < b; c++) a[c].eB() + }; + hf.prototype.rh = function() { + var a = this.Xu; + a.Wa(); + isNaN(this.ro) || isNaN(this.po) ? a.n(0, 0, 0, 0) : a.n(0, 0, this.ro, this.po); + Cf(this, a, !1); + Ib(a, 0, 0, 0, 0); + a.freeze() + }; + hf.prototype.computeBoundsWithoutOrigin = hf.prototype.fH = function() { + var a = new w; + Cf(this, a, !0); + return a + }; + + function Cf(a, b, c) { + switch (a.type) { + case mf: + case nf: + case of: + c ? b.n(a.xc, a.Cc, 0, 0) : Ib(b, a.xc, a.Cc, 0, 0); + Ib(b, a.zb, a.Gb, 0, 0); + break; + case jf: + var d = a.cc; + a = d.o; + for (var d = d.length, e = 0; e < d; e++) { + var g = a[e]; + c && 0 === e ? b.n(g.Ha, g.Da, 0, 0) : Ib(b, g.Ha, g.Da, 0, 0); + for (var h = g.Ab.o, k = h.length, l = g.Ha, m = g.Da, n = 0; n < k; n++) { + var p = h[n]; + switch (p.type) { + case qf: + case Df: + l = p.L; + m = p.M; + Ib(b, l, m, 0, 0); + break; + case Ef: + ve(l, m, p.zc, p.Qc, p.Ah, p.Bh, p.L, p.M, .5, b); + l = p.L; + m = p.M; + break; + case Ff: + ze(l, m, p.zc, p.Qc, p.L, p.M, .5, b); + l = p.L; + m = p.M; + break; + case Gf: + case Hf: + var q = + p.type === Gf ? If(p, g) : Jf(p, g, l, m), + r = q.length; + if (0 === r) { + l = p.ra; + m = p.za; + Ib(b, l, m, 0, 0); + break + } + for (var p = null, s = 0; s < r; s++) p = q[s], ve(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], .5, b); + null !== p && (l = p[6], m = p[7]); + break; + default: + z.k("Unknown Segment type: " + p.type) + } + } + } + break; + default: + z.k("Unknown Geometry type: " + a.type) + } + } + hf.prototype.normalize = hf.prototype.normalize = function() { + this.G && z.oa(this); + var a = this.fH(); + this.offset(-a.x, -a.y); + return new N(-a.x, -a.y) + }; + hf.prototype.offset = hf.prototype.offset = function(a, b) { + this.G && z.oa(this); + u && (z.p(a, hf, "offset"), z.p(b, hf, "offset")); + this.transform(1, 0, 0, 1, a, b); + return this + }; + hf.prototype.scale = hf.prototype.scale = function(a, b) { + this.G && z.oa(this); + u && (z.p(a, hf, "scale:x"), z.p(b, hf, "scale:y"), 0 === a && z.ka(a, "scale must be non-zero", hf, "scale:x"), 0 === b && z.ka(b, "scale must be non-zero", hf, "scale:y")); + this.transform(a, 0, 0, b, 0, 0); + return this + }; + hf.prototype.rotate = hf.prototype.rotate = function(a, b, c) { + this.G && z.oa(this); + void 0 === b && (b = 0); + void 0 === c && (c = 0); + u && (z.p(a, hf, "rotate:angle"), z.p(b, hf, "rotate:x"), z.p(c, hf, "rotate:y")); + var d = z.Fh(); + d.reset(); + d.rotate(a, b, c); + this.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy); + z.jf(d); + return this + }; + hf.prototype.transform = hf.prototype.transform = function(a, b, c, d, e, g) { + var h = 0, + k = 0; + switch (this.type) { + case mf: + case nf: + case of: + h = this.xc; + k = this.Cc; + this.xc = h * a + k * c + e; + this.Cc = h * b + k * d + g; + h = this.zb; + k = this.Gb; + this.zb = h * a + k * c + e; + this.Gb = h * b + k * d + g; + break; + case jf: + for (var l = this.cc.o, m = l.length, n = 0; n < m; n++) { + var p = l[n], + h = p.Ha, + k = p.Da; + p.Ha = h * a + k * c + e; + p.Da = h * b + k * d + g; + for (var p = p.Ab.o, q = p.length, r = 0; r < q; r++) { + var s = p[r]; + switch (s.type) { + case qf: + case Df: + h = s.L; + k = s.M; + s.L = h * a + k * c + e; + s.M = h * b + k * d + g; + break; + case Ef: + h = s.zc; + k = s.Qc; + s.zc = + h * a + k * c + e; + s.Qc = h * b + k * d + g; + h = s.Ah; + k = s.Bh; + s.Ah = h * a + k * c + e; + s.Bh = h * b + k * d + g; + h = s.L; + k = s.M; + s.L = h * a + k * c + e; + s.M = h * b + k * d + g; + break; + case Ff: + h = s.zc; + k = s.Qc; + s.zc = h * a + k * c + e; + s.Qc = h * b + k * d + g; + h = s.L; + k = s.M; + s.L = h * a + k * c + e; + s.M = h * b + k * d + g; + break; + case Gf: + h = s.ra; + k = s.za; + s.ra = h * a + k * c + e; + s.za = h * b + k * d + g; + 0 !== b && (h = 180 * Math.atan2(b, a) / Math.PI, 0 > h && (h += 360), s.Fe += h); + 0 > a && (s.Fe = 180 - s.Fe, s.Lf = -s.Lf); + 0 > d && (s.Fe = -s.Fe, s.Lf = -s.Lf); + s.radiusX *= Math.sqrt(a * a + c * c); + void 0 !== s.radiusY && (s.radiusY *= Math.sqrt(b * b + d * d)); + break; + case Hf: + h = s.L; + k = s.M; + s.L = h * + a + k * c + e; + s.M = h * b + k * d + g; + 0 !== b && (h = 180 * Math.atan2(b, a) / Math.PI, 0 > h && (h += 360), s.wj += h); + 0 > a && (s.wj = 180 - s.wj, s.Ol = !s.Ol); + 0 > d && (s.wj = -s.wj, s.Ol = !s.Ol); + s.radiusX *= Math.sqrt(a * a + c * c); + s.radiusY *= Math.sqrt(b * b + d * d); + break; + default: + z.k("Unknown Segment type: " + s.type) + } + } + } + } + this.ib = !0; + return this + }; + hf.prototype.Ma = function(a, b, c, d) { + var e = a.x, + g = a.y, + h = this.vb.x - 20; + a = a.y; + for (var k = 0, l = 0, m = 0, n = 0, p = 0, q = 0, r = this.cc.o, s = r.length, t = 0; t < s; t++) { + var v = r[t]; + if (v.Ot) { + if (c && v.Ma(e, g, b)) return !0; + for (var x = v.Ab, l = v.Ha, m = v.Da, y = l, A = m, B = x.o, L = 0; L <= x.length; L++) { + var H, U; + L !== x.length ? (H = B[L], U = H.type, p = H.L, q = H.M) : (U = qf, p = y, q = A); + switch (U) { + case Df: + n = Kf(e, g, h, a, l, m, y, A); + if (isNaN(n)) return !0; + k += n; + y = p; + A = q; + break; + case qf: + n = Kf(e, g, h, a, l, m, p, q); + if (isNaN(n)) return !0; + k += n; + break; + case Ef: + n = Le(l, m, H.zc, H.Qc, H.Ah, H.Bh, p, q, h, + a, e, g, .5); + k += n; + break; + case Ff: + n = Le(l, m, (l + 2 * H.zc) / 3, (m + 2 * H.Qc) / 3, (2 * H.zc + p) / 3, (2 * H.Qc + q) / 3, p, q, h, a, e, g, .5); + k += n; + break; + case Gf: + case Hf: + U = H.type === Gf ? If(H, v) : Jf(H, v, l, m); + var ea = U.length; + if (0 === ea) { + n = Kf(e, g, h, a, l, m, H.ra, H.za); + if (isNaN(n)) return !0; + k += n; + break + } + for (var W = null, P = 0; P < ea; P++) { + W = U[P]; + if (0 === P) { + n = Kf(e, g, h, a, l, m, W[0], W[1]); + if (isNaN(n)) return !0; + k += n + } + n = Le(W[0], W[1], W[2], W[3], W[4], W[5], W[6], W[7], h, a, e, g, .5); + k += n + } + null !== W && (p = W[6], q = W[7]); + break; + default: + z.k("Unknown Segment type: " + H.type) + } + l = p; + m = q + } + if (0 !== + k) return !0; + k = 0 + } else if (v.Ma(e, g, d ? b : b + 2)) return !0 + } + return 0 !== k + }; + + function Kf(a, b, c, d, e, g, h, k) { + if (te(e, g, h, k, .05, a, b)) return NaN; + var l = (a - c) * (g - k); + if (0 === l) return 0; + var m = ((a * d - b * c) * (e - h) - (a - c) * (e * k - g * h)) / l; + b = (a * d - b * c) * (g - k) / l; + if (m >= a) return 0; + if ((e > h ? e - h : h - e) < (g > k ? g - k : k - g)) { + if (e = a = 0, g < k ? (a = g, e = k) : (a = k, e = g), b < a || b > e) return 0 + } else if (e < h ? (a = e, e = h) : a = h, m < a || m > e) return 0; + return 0 < l ? 1 : -1 + } + + function Nf(a, b, c, d) { + a = a.cc.o; + for (var e = a.length, g = 0; g < e; g++) + if (a[g].Ma(b, c, d)) return !0; + return !1 + } + hf.prototype.getPointAlongPath = function(a) { + (0 > a || 1 < a) && z.ka(a, "0 <= fraction <= 1", hf, "getPointAlongPath:fraction"); + var b = this.cc.first(), + c = z.rb(), + d = []; + d.push(b.Ha); + d.push(b.Da); + for (var e = b.Ha, g = b.Da, h = e, k = g, l = b.Ab.o, m = l.length, n = 0; n < m; n++) { + var p = l[n]; + switch (p.ba) { + case Df: + c.push(d); + d = []; + d.push(p.L); + d.push(p.M); + e = p.L; + g = p.M; + h = e; + k = g; + break; + case qf: + d.push(p.L); + d.push(p.M); + e = p.L; + g = p.M; + break; + case Ef: + we(e, g, p.Cd, p.Ne, p.mh, p.yg, p.zb, p.Gb, .5, d); + e = p.L; + g = p.M; + break; + case Ff: + Je(e, g, p.Cd, p.Ne, p.zb, p.Gb, .5, d); + e = p.L; + g = p.M; + break; + case Gf: + var q = If(p, b), + r = q.length; + if (0 === r) { + d.push(p.ra); + d.push(p.za); + e = p.ra; + g = p.za; + break + } + for (var s = 0; s < r; s++) { + var t = q[s]; + we(e, g, t[2], t[3], t[4], t[5], t[6], t[7], .5, d); + e = t[6]; + g = t[7] + } + break; + case Hf: + q = Jf(p, b, e, g); + r = q.length; + for (s = 0; s < r; s++) t = q[s], we(e, g, t[2], t[3], t[4], t[5], t[6], t[7], .5, d), e = t[6], g = t[7]; + break; + default: + z.k("Segment not of valid type") + } + p.Rh && (d.push(h), d.push(k)) + } + c.push(d); + q = 0; + h = c.length; + for (k = d = b = 0; k < h; k++) + for (l = c[k], m = l.length, n = 0; n < m; n += 2) e = l[n], g = l[n + 1], 0 !== n && (p = Math.sqrt(wb(b, + d, e, g)), q += p), b = e, d = g; + a *= q; + for (k = q = 0; k < h; k++) + for (l = c[k], m = l.length, n = 0; n < m; n++) { + e = l[n]; + g = l[n + 1]; + if (0 !== n) { + p = Math.sqrt(wb(b, d, e, g)); + if (q + p > a) return n = (a - q) / p, z.xa(c), new N(b + (e - b) * n, d + (g - d) * n); + q += p + } + b = e; + d = g + } + z.xa(c); + return null + }; + z.defineProperty(hf, { + type: "type" + }, function() { + return this.ba + }, function(a) { + this.ba !== a && (u && z.Ba(a, hf, hf, "type"), this.G && z.oa(this, a), this.ba = a, this.ib = !0) + }); + z.defineProperty(hf, { + Ha: "startX" + }, function() { + return this.xc + }, function(a) { + this.xc !== a && (u && z.p(a, hf, "startX"), this.G && z.oa(this, a), this.xc = a, this.ib = !0) + }); + z.defineProperty(hf, { + Da: "startY" + }, function() { + return this.Cc + }, function(a) { + this.Cc !== a && (u && z.p(a, hf, "startY"), this.G && z.oa(this, a), this.Cc = a, this.ib = !0) + }); + z.defineProperty(hf, { + L: "endX" + }, function() { + return this.zb + }, function(a) { + this.zb !== a && (u && z.p(a, hf, "endX"), this.G && z.oa(this, a), this.zb = a, this.ib = !0) + }); + z.defineProperty(hf, { + M: "endY" + }, function() { + return this.Gb + }, function(a) { + this.Gb !== a && (u && z.p(a, hf, "endY"), this.G && z.oa(this, a), this.Gb = a, this.ib = !0) + }); + z.defineProperty(hf, { + cc: "figures" + }, function() { + return this.Cj + }, function(a) { + this.Cj !== a && (u && z.l(a, J, hf, "figures"), this.G && z.oa(this, a), this.Cj = a, this.ib = !0) + }); + hf.prototype.add = hf.prototype.add = function(a) { + this.Cj.add(a); + return this + }; + hf.prototype.setSpots = function(a, b, c, d, e, g, h, k) { + this.G && z.oa(this); + this.bi = (new Q(a, b, e, g)).freeze(); + this.ci = (new Q(c, d, h, k)).freeze(); + return this + }; + z.defineProperty(hf, { + C: "spot1" + }, function() { + return this.bi + }, function(a) { + u && z.l(a, Q, hf, "spot1"); + this.G && z.oa(this, a); + this.bi = a.V() + }); + z.defineProperty(hf, { + D: "spot2" + }, function() { + return this.ci + }, function(a) { + u && z.l(a, Q, hf, "spot2"); + this.G && z.oa(this, a); + this.ci = a.V() + }); + z.defineProperty(hf, { + Xd: "defaultStretch" + }, function() { + return this.Bi + }, function(a) { + u && z.Ba(a, O, hf, "stretch"); + this.G && z.oa(this, a); + this.Bi = a + }); + z.w(hf, { + vb: "bounds" + }, function() { + this.iA() && (this.eB(), this.rh()); + return this.Xu + }); + + function kf(a, b, c, d) { + z.kc(this); + this.G = !1; + void 0 === c && (c = !0); + this.jm = c; + void 0 === d && (d = !0); + this.so = d; + void 0 !== a ? (u && z.p(a, kf, "sx"), this.xc = a) : this.xc = 0; + void 0 !== b ? (u && z.p(b, kf, "sy"), this.Cc = b) : this.Cc = 0; + this.Lo = new J(Of); + this.nw = this.Lo.H; + this.ib = !0 + } + z.ia("PathFigure", kf); + z.ii(kf); + kf.prototype.copy = function() { + var a = new kf; + a.jm = this.jm; + a.so = this.so; + a.xc = this.xc; + a.Cc = this.Cc; + for (var b = this.Lo.o, c = b.length, d = a.Lo, e = 0; e < c; e++) { + var g = b[e].copy(); + d.add(g) + } + a.nw = this.nw; + a.ib = this.ib; + return a + }; + kf.prototype.equalsApprox = kf.prototype.Mc = function(a) { + if (!(a instanceof kf && eb(this.Ha, a.Ha) && eb(this.Da, a.Da))) return !1; + var b = this.Ab.o; + a = a.Ab.o; + var c = b.length; + if (c !== a.length) return !1; + for (var d = 0; d < c; d++) + if (!b[d].Mc(a[d])) return !1; + return !0 + }; + f = kf.prototype; + f.toString = function(a) { + void 0 === a && (a = -1); + for (var b = 0 > a ? "M" + this.Ha.toString() + " " + this.Da.toString() : "M" + this.Ha.toFixed(a) + " " + this.Da.toFixed(a), c = this.Ab.o, d = c.length, e = 0; e < d; e++) b += " " + c[e].toString(a); + return b + }; + f.freeze = function() { + this.G = !0; + var a = this.Ab; + a.freeze(); + for (var b = a.o, a = a.length, c = 0; c < a; c++) b[c].freeze(); + return this + }; + f.Wa = function() { + this.G = !1; + var a = this.Ab; + a.Wa(); + for (var a = a.o, b = a.length, c = 0; c < b; c++) a[c].Wa(); + return this + }; + f.iA = function() { + if (this.ib) return !0; + var a = this.Ab; + if (this.nw !== a.H) return !0; + for (var a = a.o, b = a.length, c = 0; c < b; c++) + if (a[c].ib) return !0; + return !1 + }; + f.eB = function() { + this.ib = !1; + var a = this.Ab; + this.nw = a.H; + for (var a = a.o, b = a.length, c = 0; c < b; c++) { + var d = a[c]; + d.ib = !1; + d.mg = null + } + }; + z.defineProperty(kf, { + Ot: "isFilled" + }, function() { + return this.jm + }, function(a) { + u && z.g(a, "boolean", kf, "isFilled"); + this.G && z.oa(this, a); + this.jm = a + }); + z.defineProperty(kf, { + sk: "isShadowed" + }, function() { + return this.so + }, function(a) { + u && z.g(a, "boolean", kf, "isShadowed"); + this.G && z.oa(this, a); + this.so = a + }); + z.defineProperty(kf, { + Ha: "startX" + }, function() { + return this.xc + }, function(a) { + u && z.p(a, kf, "startX"); + this.G && z.oa(this, a); + this.xc = a; + this.ib = !0 + }); + z.defineProperty(kf, { + Da: "startY" + }, function() { + return this.Cc + }, function(a) { + u && z.p(a, kf, "startY"); + this.G && z.oa(this, a); + this.Cc = a; + this.ib = !0 + }); + z.defineProperty(kf, { + Ab: "segments" + }, function() { + return this.Lo + }, function(a) { + u && z.l(a, J, kf, "segments"); + this.G && z.oa(this, a); + this.Lo = a; + this.ib = !0 + }); + kf.prototype.add = kf.prototype.add = function(a) { + this.Lo.add(a); + return this + }; + kf.prototype.Ma = function(a, b, c) { + for (var d = this.Ha, e = this.Da, g = d, h = e, k = this.Ab.o, l = k.length, m = 0; m < l; m++) { + var n = k[m]; + switch (n.type) { + case Df: + g = n.L; + h = n.M; + d = n.L; + e = n.M; + break; + case qf: + if (te(d, e, n.L, n.M, c, a, b)) return !0; + d = n.L; + e = n.M; + break; + case Ef: + if (ue(d, e, n.zc, n.Qc, n.Ah, n.Bh, n.L, n.M, .5, a, b, c)) return !0; + d = n.L; + e = n.M; + break; + case Ff: + if (ye(d, e, n.zc, n.Qc, n.L, n.M, .5, a, b, c)) return !0; + d = n.L; + e = n.M; + break; + case Gf: + case Hf: + var p = n.type === Gf ? If(n, this) : Jf(n, this, d, e), + q = p.length; + if (0 === q) { + if (te(d, e, n.ra, n.za, c, a, b)) return !0; + d = n.ra; + e = n.za; + break + } + for (var r = null, s = 0; s < q; s++) + if (r = p[s], 0 === s && te(d, e, r[0], r[1], c, a, b) || ue(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], .5, a, b, c)) return !0; + null !== r && (d = r[6], e = r[7]); + break; + default: + z.k("Unknown Segment type: " + n.type) + } + if (n.gx && (d !== g || e !== h) && te(d, e, g, h, c, a, b)) return !0 + } + return !1 + }; + + function Of(a, b, c, d, e, g, h, k) { + z.kc(this); + this.G = !1; + void 0 === a ? a = qf : u && z.Ba(a, Of, Of, "constructor:type"); + this.ba = a; + void 0 !== b ? (u && z.p(b, Of, "ex"), this.zb = b) : this.zb = 0; + void 0 !== c ? (u && z.p(c, Of, "ey"), this.Gb = c) : this.Gb = 0; + void 0 === d && (d = 0); + void 0 === e && (e = 0); + void 0 === g && (g = 0); + void 0 === h && (h = 0); + a === Hf ? (a = g % 360, 0 > a && (a += 360), this.Cd = a, this.Ne = 0, u && z.p(d, Of, "x1"), this.mh = Math.max(d, 0), u && z.p(e, Of, "y1"), this.yg = Math.max(e, 0), this.xo = "boolean" === typeof h ? !!h : !1, this.Ln = !!k) : (u && z.p(d, Of, "x1"), this.Cd = d, u && z.p(e, + Of, "y1"), this.Ne = e, u && z.p(g, Of, "x2"), a === Gf && (g = Math.max(g, 0)), this.mh = g, "number" === typeof h ? (a === Gf && (h = Math.max(h, 0)), this.yg = h) : this.yg = 0, this.Ln = this.xo = !1); + this.Rh = !1; + this.ib = !0; + this.mg = null + } + z.ia("PathSegment", Of); + z.ii(Of); + Of.prototype.copy = function() { + var a = new Of; + a.ba = this.ba; + a.zb = this.zb; + a.Gb = this.Gb; + a.Cd = this.Cd; + a.Ne = this.Ne; + a.mh = this.mh; + a.yg = this.yg; + a.xo = this.xo; + a.Ln = this.Ln; + a.Rh = this.Rh; + a.ib = this.ib; + return a + }; + Of.prototype.equalsApprox = Of.prototype.Mc = function(a) { + if (!(a instanceof Of) || this.type !== a.type || this.gx !== a.gx) return !1; + switch (this.type) { + case Df: + case qf: + return eb(this.L, a.L) && eb(this.M, a.M); + case Ef: + return eb(this.L, a.L) && eb(this.M, a.M) && eb(this.zc, a.zc) && eb(this.Qc, a.Qc) && eb(this.Ah, a.Ah) && eb(this.Bh, a.Bh); + case Ff: + return eb(this.L, a.L) && eb(this.M, a.M) && eb(this.zc, a.zc) && eb(this.Qc, a.Qc); + case Gf: + return eb(this.Fe, a.Fe) && eb(this.Lf, a.Lf) && eb(this.ra, a.ra) && eb(this.za, a.za) && eb(this.radiusX, a.radiusX) && + eb(this.radiusY, a.radiusY); + case Hf: + return this.Ol === a.Ol && this.kx === a.kx && eb(this.wj, a.wj) && eb(this.L, a.L) && eb(this.M, a.M) && eb(this.radiusX, a.radiusX) && eb(this.radiusY, a.radiusY); + default: + return !1 + } + }; + Of.prototype.toString = function(a) { + void 0 === a && (a = -1); + var b = ""; + switch (this.type) { + case Df: + b = 0 > a ? "M" + this.L.toString() + " " + this.M.toString() : "M" + this.L.toFixed(a) + " " + this.M.toFixed(a); + break; + case qf: + b = 0 > a ? "L" + this.L.toString() + " " + this.M.toString() : "L" + this.L.toFixed(a) + " " + this.M.toFixed(a); + break; + case Ef: + b = 0 > a ? "C" + this.zc.toString() + " " + this.Qc.toString() + " " + this.Ah.toString() + " " + this.Bh.toString() + " " + this.L.toString() + " " + this.M.toString() : "C" + this.zc.toFixed(a) + " " + this.Qc.toFixed(a) + " " + this.Ah.toFixed(a) + + " " + this.Bh.toFixed(a) + " " + this.L.toFixed(a) + " " + this.M.toFixed(a); + break; + case Ff: + b = 0 > a ? "Q" + this.zc.toString() + " " + this.Qc.toString() + " " + this.L.toString() + " " + this.M.toString() : "Q" + this.zc.toFixed(a) + " " + this.Qc.toFixed(a) + " " + this.L.toFixed(a) + " " + this.M.toFixed(a); + break; + case Gf: + b = 0 > a ? "B" + this.Fe.toString() + " " + this.Lf.toString() + " " + this.ra.toString() + " " + this.za.toString() + " " + this.radiusX : "B" + this.Fe.toFixed(a) + " " + this.Lf.toFixed(a) + " " + this.ra.toFixed(a) + " " + this.za.toFixed(a) + " " + this.radiusX; + break; + case Hf: + b = 0 > a ? "A" + this.radiusX.toString() + " " + this.radiusY.toString() + " " + this.wj.toString() + " " + (this.kx ? 1 : 0) + " " + (this.Ol ? 1 : 0) + " " + this.L.toString() + " " + this.M.toString() : "A" + this.radiusX.toFixed(a) + " " + this.radiusY.toFixed(a) + " " + this.wj.toFixed(a) + " " + (this.kx ? 1 : 0) + " " + (this.Ol ? 1 : 0) + " " + this.L.toFixed(a) + " " + this.M.toFixed(a); + break; + default: + b = this.type.toString() + } + return b + (this.Rh ? "z" : "") + }; + var Df; + Of.Move = Df = z.s(Of, "Move", 0); + var qf; + Of.Line = qf = z.s(Of, "Line", 1); + var Ef; + Of.Bezier = Ef = z.s(Of, "Bezier", 2); + var Ff; + Of.QuadraticBezier = Ff = z.s(Of, "QuadraticBezier", 3); + var Gf; + Of.Arc = Gf = z.s(Of, "Arc", 4); + var Hf; + Of.SvgArc = Hf = z.s(Of, "SvgArc", 4); + Of.prototype.freeze = function() { + this.G = !0; + return this + }; + Of.prototype.Wa = function() { + this.G = !1; + return this + }; + Of.prototype.close = Of.prototype.close = function() { + this.Rh = !0; + return this + }; + + function If(a, b) { + if (null !== a.mg && !1 === b.ib) return a.mg; + var c = a.radiusX, + d = a.radiusY; + void 0 === d && (d = c); + if (0 === c || 0 === d) return a.mg = [], a.mg; + var e = a.Cd, + g = a.Ne, + h = ef(c < d ? c : d, a.Fe, a.Fe + a.Lf, !1); + if (c !== d) { + var k = z.Fh(); + k.reset(); + c < d ? k.scale(1, d / c) : k.scale(c / d, 1); + Bf(h, k); + z.jf(k) + } + c = h.length; + for (d = 0; d < c; d++) k = h[d], k[0] += e, k[1] += g, k[2] += e, k[3] += g, k[4] += e, k[5] += g, k[6] += e, k[7] += g; + a.mg = h; + return a.mg + } + + function Jf(a, b, c, d) { + function e(a, b, c, d) { + return (a * d < b * c ? -1 : 1) * Math.acos((a * c + b * d) / (Math.sqrt(a * a + b * b) * Math.sqrt(c * c + d * d))) + } + if (null !== a.mg && !1 === b.ib) return a.mg; + b = a.mh; + var g = a.yg; + if (0 === b || 0 === g) return a.mg = [], a.mg; + var h = Math.PI / 180 * a.Cd, + k = a.xo, + l = a.Ln, + m = a.zb, + n = a.Gb, + p = Math.cos(h), + q = Math.sin(h), + r = p * (c - m) / 2 + q * (d - n) / 2, + h = -q * (c - m) / 2 + p * (d - n) / 2, + s = r * r / (b * b) + h * h / (g * g); + 1 < s && (b *= Math.sqrt(s), g *= Math.sqrt(s)); + s = (k === l ? -1 : 1) * Math.sqrt((b * b * g * g - b * b * h * h - g * g * r * r) / (b * b * h * h + g * g * r * r)); + isNaN(s) && (s = 0); + k = s * b * h / g; + s = s * -g * + r / b; + isNaN(k) && (k = 0); + isNaN(s) && (s = 0); + c = (c + m) / 2 + p * k - q * s; + d = (d + n) / 2 + q * k + p * s; + n = e(1, 0, (r - k) / b, (h - s) / g); + p = (r - k) / b; + m = (h - s) / g; + r = (-r - k) / b; + k = (-h - s) / g; + h = e(p, m, r, k); + r = (p * r + m * k) / (Math.sqrt(p * p + m * m) * Math.sqrt(r * r + k * k)); - 1 >= r ? h = Math.PI : 1 <= r && (h = 0); + !l && 0 < h && (h -= 2 * Math.PI); + l && 0 > h && (h += 2 * Math.PI); + l = b > g ? 1 : b / g; + r = b > g ? g / b : 1; + b = ef(b > g ? b : g, n, n + h, !0); + g = z.Fh(); + g.reset(); + g.translate(c, d); + g.rotate(a.Cd, 0, 0); + g.scale(l, r); + Bf(b, g); + z.jf(g); + a.mg = b; + return a.mg + } + z.defineProperty(Of, { + gx: "isClosed" + }, function() { + return this.Rh + }, function(a) { + this.Rh !== a && (this.Rh = a, this.ib = !0) + }); + z.defineProperty(Of, { + type: "type" + }, function() { + return this.ba + }, function(a) { + u && z.Ba(a, Of, Of, "type"); + this.G && z.oa(this, a); + this.ba = a; + this.ib = !0 + }); + z.defineProperty(Of, { + L: "endX" + }, function() { + return this.zb + }, function(a) { + u && z.p(a, Of, "endX"); + this.G && z.oa(this, a); + this.zb = a; + this.ib = !0 + }); + z.defineProperty(Of, { + M: "endY" + }, function() { + return this.Gb + }, function(a) { + u && z.p(a, Of, "endY"); + this.G && z.oa(this, a); + this.Gb = a; + this.ib = !0 + }); + z.defineProperty(Of, { + zc: "point1X" + }, function() { + return this.Cd + }, function(a) { + u && z.p(a, Of, "point1X"); + this.G && z.oa(this, a); + this.Cd = a; + this.ib = !0 + }); + z.defineProperty(Of, { + Qc: "point1Y" + }, function() { + return this.Ne + }, function(a) { + u && z.p(a, Of, "point1Y"); + this.G && z.oa(this, a); + this.Ne = a; + this.ib = !0 + }); + z.defineProperty(Of, { + Ah: "point2X" + }, function() { + return this.mh + }, function(a) { + u && z.p(a, Of, "point2X"); + this.G && z.oa(this, a); + this.mh = a; + this.ib = !0 + }); + z.defineProperty(Of, { + Bh: "point2Y" + }, function() { + return this.yg + }, function(a) { + u && z.p(a, Of, "point2Y"); + this.G && z.oa(this, a); + this.yg = a; + this.ib = !0 + }); + z.defineProperty(Of, { + ra: "centerX" + }, function() { + return this.Cd + }, function(a) { + u && z.p(a, Of, "centerX"); + this.G && z.oa(this, a); + this.Cd = a; + this.ib = !0 + }); + z.defineProperty(Of, { + za: "centerY" + }, function() { + return this.Ne + }, function(a) { + u && z.p(a, Of, "centerY"); + this.G && z.oa(this, a); + this.Ne = a; + this.ib = !0 + }); + z.defineProperty(Of, { + radiusX: "radiusX" + }, function() { + return this.mh + }, function(a) { + u && z.p(a, Of, "radiusX"); + 0 > a && z.ka(a, ">= zero", Of, "radiusX"); + this.G && z.oa(this, a); + this.mh = a; + this.ib = !0 + }); + z.defineProperty(Of, { + radiusY: "radiusY" + }, function() { + return this.yg + }, function(a) { + u && z.p(a, Of, "radiusY"); + 0 > a && z.ka(a, ">= zero", Of, "radiusY"); + this.G && z.oa(this, a); + this.yg = a; + this.ib = !0 + }); + z.defineProperty(Of, { + Fe: "startAngle" + }, function() { + return this.zb + }, function(a) { + this.zb !== a && (this.G && z.oa(this, a), u && z.p(a, Of, "startAngle"), a %= 360, 0 > a && (a += 360), this.zb = a, this.ib = !0) + }); + z.defineProperty(Of, { + Lf: "sweepAngle" + }, function() { + return this.Gb + }, function(a) { + u && z.p(a, Of, "sweepAngle"); + this.G && z.oa(this, a); + 360 < a && (a = 360); - 360 > a && (a = -360); + this.Gb = a; + this.ib = !0 + }); + z.defineProperty(Of, { + Ol: "isClockwiseArc" + }, function() { + return this.Ln + }, function(a) { + this.G && z.oa(this, a); + this.Ln = a; + this.ib = !0 + }); + z.defineProperty(Of, { + kx: "isLargeArc" + }, function() { + return this.xo + }, function(a) { + this.G && z.oa(this, a); + this.xo = a; + this.ib = !0 + }); + z.defineProperty(Of, { + wj: "xAxisRotation" + }, function() { + return this.Cd + }, function(a) { + u && z.p(a, Of, "xAxisRotation"); + a %= 360; + 0 > a && (a += 360); + this.G && z.oa(this, a); + this.Cd = a; + this.ib = !0 + }); + + function Pf() { + this.Z = null; + this.uz = (new N(0, 0)).freeze(); + this.By = (new N(0, 0)).freeze(); + this.Tu = this.Pv = 0; + this.Uu = 1; + this.Dv = ""; + this.xw = this.jv = !1; + this.fv = this.Wu = 0; + this.yj = this.qv = this.Av = !1; + this.Yq = null; + this.vw = 0; + this.Ag = this.uw = null + } + z.ia("InputEvent", Pf); + Pf.prototype.copy = function() { + var a = new Pf; + a.Z = this.Z; + a.uz.assign(this.te); + a.By.assign(this.ga); + a.Pv = this.Pv; + a.Tu = this.Tu; + a.Uu = this.Uu; + a.Dv = this.Dv; + a.jv = this.jv; + a.xw = this.xw; + a.Wu = this.Wu; + a.fv = this.fv; + a.Av = this.Av; + a.qv = this.qv; + a.yj = this.yj; + a.Yq = this.Yq; + a.vw = this.vw; + a.uw = this.uw; + a.Ag = this.Ag; + return a + }; + Pf.prototype.toString = function() { + var a = "^"; + 0 !== this.xd && (a += "M:" + this.xd); + 0 !== this.button && (a += "B:" + this.button); + "" !== this.key && (a += "K:" + this.key); + 0 !== this.Pe && (a += "C:" + this.Pe); + 0 !== this.Cl && (a += "D:" + this.Cl); + this.Gc && (a += "h"); + this.bubbles && (a += "b"); + null !== this.ga && (a += "@" + this.ga.toString()); + return a + }; + z.defineProperty(Pf, { + h: "diagram" + }, function() { + return this.Z + }, function(a) { + this.Z = a + }); + z.defineProperty(Pf, { + te: "viewPoint" + }, function() { + return this.uz + }, function(a) { + z.l(a, N, Pf, "viewPoint"); + this.uz.assign(a) + }); + z.defineProperty(Pf, { + ga: "documentPoint" + }, function() { + return this.By + }, function(a) { + z.l(a, N, Pf, "documentPoint"); + this.By.assign(a) + }); + z.defineProperty(Pf, { + xd: "modifiers" + }, function() { + return this.Pv + }, function(a) { + this.Pv = a + }); + z.defineProperty(Pf, { + button: "button" + }, function() { + return this.Tu + }, function(a) { + this.Tu = a; + if (null === this.event) switch (a) { + case 0: + this.buttons = 1; + break; + case 1: + this.buttons = 4; + break; + case 2: + this.buttons = 2 + } + }); + z.defineProperty(Pf, { + buttons: "buttons" + }, function() { + return this.Uu + }, function(a) { + this.Uu = a + }); + z.defineProperty(Pf, { + key: "key" + }, function() { + return this.Dv + }, function(a) { + this.Dv = a + }); + z.defineProperty(Pf, { + El: "down" + }, function() { + return this.jv + }, function(a) { + this.jv = a + }); + z.defineProperty(Pf, { + up: "up" + }, function() { + return this.xw + }, function(a) { + this.xw = a + }); + z.defineProperty(Pf, { + Pe: "clickCount" + }, function() { + return this.Wu + }, function(a) { + this.Wu = a + }); + z.defineProperty(Pf, { + Cl: "delta" + }, function() { + return this.fv + }, function(a) { + this.fv = a + }); + z.defineProperty(Pf, { + Qt: "isMultiTouch" + }, function() { + return this.Av + }, function(a) { + this.Av = a + }); + z.defineProperty(Pf, { + Gc: "handled" + }, function() { + return this.qv + }, function(a) { + this.qv = a + }); + z.defineProperty(Pf, { + bubbles: "bubbles" + }, function() { + return this.yj + }, function(a) { + this.yj = a + }); + z.defineProperty(Pf, { + event: "event" + }, function() { + return this.Yq + }, function(a) { + this.Yq = a + }); + z.w(Pf, { + lj: "isTouchEvent" + }, function() { + var a = window.TouchEvent; + return a && this.event instanceof a ? !0 : (a = window.PointerEvent) && this.event instanceof a && "touch" === this.event.pointerType + }); + z.w(Pf, { + rk: "isMac" + }, function() { + return z.rk + }); + z.defineProperty(Pf, { + timestamp: "timestamp" + }, function() { + return this.vw + }, function(a) { + this.vw = a + }); + z.defineProperty(Pf, { + Sg: "targetDiagram" + }, function() { + return this.uw + }, function(a) { + this.uw = a + }); + z.defineProperty(Pf, { + Ge: "targetObject" + }, function() { + return this.Ag + }, function(a) { + this.Ag = a + }); + z.defineProperty(Pf, { + control: "control" + }, function() { + return 0 !== (this.xd & 1) + }, function(a) { + this.xd = a ? this.xd | 1 : this.xd & -2 + }); + z.defineProperty(Pf, { + shift: "shift" + }, function() { + return 0 !== (this.xd & 4) + }, function(a) { + this.xd = a ? this.xd | 4 : this.xd & -5 + }); + z.defineProperty(Pf, { + alt: "alt" + }, function() { + return 0 !== (this.xd & 2) + }, function(a) { + this.xd = a ? this.xd | 2 : this.xd & -3 + }); + z.defineProperty(Pf, { + $t: "meta" + }, function() { + return 0 !== (this.xd & 8) + }, function(a) { + this.xd = a ? this.xd | 8 : this.xd & -9 + }); + z.defineProperty(Pf, { + left: "left" + }, function() { + var a = this.event; + return null !== a && a instanceof MouseEvent && ("mousedown" === a.type || "mouseup" === a.type) ? 0 === this.button : 0 !== (this.buttons & 1) + }, function(a) { + this.buttons = a ? this.buttons | 1 : this.buttons & -2 + }); + z.defineProperty(Pf, { + right: "right" + }, function() { + var a = this.event; + return null !== a && a instanceof MouseEvent && ("mousedown" === a.type || "mouseup" === a.type) ? 2 === this.button : 0 !== (this.buttons & 2) + }, function(a) { + this.buttons = a ? this.buttons | 2 : this.buttons & -3 + }); + z.defineProperty(Pf, { + VK: "middle" + }, function() { + var a = this.event; + return null !== a && a instanceof MouseEvent && ("mousedown" === a.type || "mouseup" === a.type) ? 1 === this.button : 0 !== (this.buttons & 4) + }, function(a) { + this.buttons = a ? this.buttons | 4 : this.buttons & -5 + }); + + function Qf() { + this.Z = null; + this.Ub = ""; + this.Zv = this.sw = null; + this.Vu = !1 + } + z.ia("DiagramEvent", Qf); + Qf.prototype.copy = function() { + var a = new Qf; + a.Z = this.Z; + a.Ub = this.Ub; + a.sw = this.sw; + a.Zv = this.Zv; + a.Vu = this.Vu; + return a + }; + Qf.prototype.toString = function() { + var a = "*" + this.name; + this.cancel && (a += "x"); + null !== this.WA && (a += ":" + this.WA.toString()); + null !== this.CA && (a += "(" + this.CA.toString() + ")"); + return a + }; + z.defineProperty(Qf, { + h: "diagram" + }, function() { + return this.Z + }, function(a) { + this.Z = a + }); + z.defineProperty(Qf, { + name: "name" + }, function() { + return this.Ub + }, function(a) { + this.Ub = a + }); + z.defineProperty(Qf, { + WA: "subject" + }, function() { + return this.sw + }, function(a) { + this.sw = a + }); + z.defineProperty(Qf, { + CA: "parameter" + }, function() { + return this.Zv + }, function(a) { + this.Zv = a + }); + z.defineProperty(Qf, { + cancel: "cancel" + }, function() { + return this.Vu + }, function(a) { + this.Vu = a + }); + + function Rf() { + this.vq = Sf; + this.Cm = this.Ov = ""; + this.Wr = this.Xr = this.$r = this.as = this.Zr = this.Z = this.ie = null + } + z.ia("ChangedEvent", Rf); + var Tf; + Rf.Transaction = Tf = z.s(Rf, "Transaction", -1); + var Sf; + Rf.Property = Sf = z.s(Rf, "Property", 0); + var Uf; + Rf.Insert = Uf = z.s(Rf, "Insert", 1); + var Vf; + Rf.Remove = Vf = z.s(Rf, "Remove", 2); + Rf.prototype.clear = Rf.prototype.clear = function() { + this.Wr = this.Xr = this.$r = this.as = this.Zr = this.Z = this.ie = null + }; + Rf.prototype.copy = function() { + var a = new Rf; + a.vq = this.vq; + a.Ov = this.Ov; + a.Cm = this.Cm; + a.ie = this.ie; + a.Z = this.Z; + a.Zr = this.Zr; + var b = this.as; + a.as = z.Za(b) && "function" === typeof b.V ? b.V() : b; + b = this.$r; + a.$r = z.Za(b) && "function" === typeof b.V ? b.V() : b; + b = this.Xr; + a.Xr = z.Za(b) && "function" === typeof b.V ? b.V() : b; + b = this.Wr; + a.Wr = z.Za(b) && "function" === typeof b.V ? b.V() : b; + return a + }; + Rf.prototype.toString = function() { + var a = "", + a = this.Dc === Tf ? a + "* " : this.Dc === Sf ? a + (null !== this.ha ? "!m" : "!d") : a + ((null !== this.ha ? "!m" : "!d") + this.Dc); + this.propertyName && "string" === typeof this.propertyName && (a += " " + this.propertyName); + this.rf && this.rf !== this.propertyName && (a += " " + this.rf); + a += ": "; + this.Dc === Tf ? null !== this.oldValue && (a += " " + this.oldValue) : (null !== this.object && (a += ka(this.object)), null !== this.oldValue && (a += " old: " + ka(this.oldValue)), null !== this.Mg && (a += " " + this.Mg), null !== this.newValue && + (a += " new: " + ka(this.newValue)), null !== this.Kg && (a += " " + this.Kg)); + return a + }; + Rf.prototype.getValue = Rf.prototype.na = function(a) { + return a ? this.oldValue : this.newValue + }; + Rf.prototype.getParam = function(a) { + return a ? this.Mg : this.Kg + }; + Rf.prototype.canUndo = Rf.prototype.canUndo = function() { + return null !== this.ha || null !== this.h ? !0 : !1 + }; + Rf.prototype.undo = Rf.prototype.undo = function() { + this.canUndo() && (null !== this.ha ? this.ha.Vm(this, !0) : null !== this.h && this.h.Vm(this, !0)) + }; + Rf.prototype.canRedo = Rf.prototype.canRedo = function() { + return null !== this.ha || null !== this.h ? !0 : !1 + }; + Rf.prototype.redo = Rf.prototype.redo = function() { + this.canRedo() && (null !== this.ha ? this.ha.Vm(this, !1) : null !== this.h && this.h.Vm(this, !1)) + }; + z.defineProperty(Rf, { + ha: "model" + }, function() { + return this.ie + }, function(a) { + this.ie = a + }); + z.defineProperty(Rf, { + h: "diagram" + }, function() { + return this.Z + }, function(a) { + this.Z = a + }); + z.defineProperty(Rf, { + Dc: "change" + }, function() { + return this.vq + }, function(a) { + u && z.Ba(a, Rf, Rf, "change"); + this.vq = a + }); + z.defineProperty(Rf, { + rf: "modelChange" + }, function() { + return this.Ov + }, function(a) { + u && z.g(a, "string", Rf, "modelChange"); + this.Ov = a + }); + z.defineProperty(Rf, { + propertyName: "propertyName" + }, function() { + return this.Cm + }, function(a) { + u && "string" !== typeof a && z.g(a, "function", Rf, "propertyName"); + this.Cm = a + }); + z.w(Rf, { + TE: "isTransactionFinished" + }, function() { + return this.vq === Tf && ("CommittedTransaction" === this.Cm || "FinishedUndo" === this.Cm || "FinishedRedo" === this.Cm) + }); + z.defineProperty(Rf, { + object: "object" + }, function() { + return this.Zr + }, function(a) { + this.Zr = a + }); + z.defineProperty(Rf, { + oldValue: "oldValue" + }, function() { + return this.as + }, function(a) { + this.as = a + }); + z.defineProperty(Rf, { + Mg: "oldParam" + }, function() { + return this.$r + }, function(a) { + this.$r = a + }); + z.defineProperty(Rf, { + newValue: "newValue" + }, function() { + return this.Xr + }, function(a) { + this.Xr = a + }); + z.defineProperty(Rf, { + Kg: "newParam" + }, function() { + return this.Wr + }, function(a) { + this.Wr = a + }); + + function M(a) { + 1 < arguments.length && z.k("Model constructor can only take one optional argument, the Array of node data."); + z.kc(this); + this.Kq = this.Ub = ""; + this.Gi = !1; + this.az = {}; + this.wf = []; + this.vc = new na(null, Object); + this.Vj = "key"; + this.Rn = this.Ao = null; + this.Cq = this.Zu = !1; + this.nq = null; + this.xm = "category"; + this.ng = new na(null, K); + this.Pj = null; + this.Vi = !1; + this.sz = null; + this.pa = new Wf; + void 0 !== a && (this.gg = a) + } + z.ia("Model", M); + M.prototype.cloneProtected = function(a) { + a.Ub = this.Ub; + a.Kq = this.Kq; + a.Gi = this.Gi; + a.Vj = this.Vj; + a.Ao = this.Ao; + a.Rn = this.Rn; + a.FJ = this.Zu; + a.Cq = this.Cq; + a.nq = this.nq; + a.xm = this.xm + }; + M.prototype.copy = function() { + var a = new this.constructor; + this.cloneProtected(a); + return a + }; + M.prototype.clear = M.prototype.clear = function() { + this.wf = []; + this.vc.clear(); + this.ng.clear(); + this.pa.clear() + }; + f = M.prototype; + f.toString = function(a) { + void 0 === a && (a = 0); + if (1 < a) return this.ZA(); + var b = ("" !== this.name ? this.name : "") + " Model"; + if (0 < a) { + b += "\n node data:"; + a = this.gg; + for (var c = z.bb(a), d = 0; d < c; d++) var e = z.Ya(a, d), + b = b + (" " + this.pb(e) + ":" + ka(e)) + } + return b + }; + f.Cn = function() { + var a = ""; + "" !== this.name && (a += ',\n "name": ' + this.quote(this.name)); + "" !== this.Al && (a += ',\n "dataFormat": ' + this.quote(this.Al)); + this.jb && (a += ',\n "isReadOnly": ' + this.jb); + "key" !== this.qj && "string" === typeof this.qj && (a += ',\n "nodeKeyProperty": ' + this.quote(this.qj)); + this.Jz && (a += ',\n "copiesArrays": true'); + this.Iz && (a += ',\n "copiesArrayObjects": true'); + "category" !== this.qn && "string" === typeof this.qn && (a += ',\n "nodeCategoryProperty": ' + this.quote(this.qn)); + return a + }; + f.hu = function(a) { + a.name && (this.name = a.name); + a.dataFormat && (this.Al = a.dataFormat); + a.isReadOnly && (this.jb = a.isReadOnly); + a.nodeKeyProperty && (this.qj = a.nodeKeyProperty); + a.copiesArrays && (this.Jz = a.copiesArrays); + a.copiesArrayObjects && (this.Iz = a.copiesArrayObjects); + a.nodeCategoryProperty && (this.qn = a.nodeCategoryProperty) + }; + + function Xf(a) { + return ',\n "modelData": ' + Yf(a, a.tk) + } + + function Zf(a, b) { + var c = b.modelData; + z.Za(c) && (a.ku(c), a.tk = c) + } + f.hB = function() { + var a = this.tk, + b = !1, + c; + for (c in a) + if (!$f(c, a[c])) { + b = !0; + break + } + a = ""; + b && (a = Xf(this)); + return a + ',\n "nodeDataArray": ' + ag(this, this.gg, !0) + }; + f.FA = function(a) { + Zf(this, a); + a = a.nodeDataArray; + z.isArray(a) && (this.ku(a), this.gg = a) + }; + + function bg(a, b, c, d) { + if (b === c) return !0; + if (typeof b !== typeof c || "function" === typeof b || "function" === typeof c) return !1; + if (Array.isArray(b) && Array.isArray(c)) { + if (d.na(b) === c) return !0; + d.add(b, c); + if (b.length !== c.length) return !1; + for (var e = 0; e < b.length; e++) + if (!bg(a, b[e], c[e], d)) return !1; + return !0 + } + if (z.Za(b) && z.Za(c)) { + if (d.na(b) === c) return !0; + d.add(b, c); + for (e in b) { + var g = b[e]; + if (!$f(e, g)) { + var h = c[e]; + if (void 0 === h || !bg(a, g, h, d)) return !1 + } + } + for (var k in c) + if (h = c[k], !$f(k, h) && (g = b[k], void 0 === g || !bg(a, g, h, d))) return !1; + return !0 + } + return !1 + } + + function mg(a, b, c) { + a[c] !== b[c] && z.k("Model.computeJsonDifference: Model." + c + ' is not the same in both models: "' + a[c] + '" and "' + b[c] + '"') + } + f.iB = function(a) { + mg(this, a, "nodeKeyProperty"); + this instanceof ng && mg(this, a, "nodeParentKeyProperty"); + for (var b = new K, c = new K, d = (new K).$c(this.vc.UE), e = new na, g = a.gg, h = 0; h < g.length; h++) { + var k = g[h], + l = a.pb(k); + if (void 0 !== l) { + d.remove(l); + var m = this.ne(l); + null === m ? (b.add(l), c.add(k)) : bg(this, m, k, e) || c.add(k) + } else this.oA(k), l = this.pb(k), b.add(l), c.add(k) + } + g = ""; + bg(this, this.tk, a.tk, e) || (g += Xf(this)); + 0 < b.count && (g += this.by + ag(this, b.jc(), !0)); + 0 < c.count && (g += this.qB + ag(this, c.jc(), !0)); + 0 < d.count && (g += this.gy + + ag(this, d.jc(), !0)); + return g + }; + M.prototype.computeJsonDifference = M.prototype.computeJSONDifference = function(a, b) { + z.l(a, M, M, "computeJsonDifference:newmodel"); + void 0 === b && (b = this.constructor === M ? "go.Model" : this.constructor === V ? "go.GraphLinksModel" : this.constructor === ng ? "go.TreeModel" : z.kf(this)); + return '{ "class": ' + this.quote(b) + ', "incremental": 1' + this.Cn() + this.iB(a) + "}" + }; + f = M.prototype; + f.by = ',\n "insertedNodeKeys": '; + f.qB = ',\n "modifiedNodeData": '; + f.gy = ',\n "removedNodeKeys": '; + f.gB = function(a, b) { + var c = this, + d = !1, + e = new K, + g = new K, + h = new K; + a.Yf.each(function(a) { + a.ha === c && ("nodeDataArray" === a.rf ? a.Dc === Uf ? e.add(a.newValue) : a.Dc === Vf && h.add(a.oldValue) : c.le(a.object) ? g.add(a.object) : c.tk === a.object && a.Dc === Sf && (d = !0)) + }); + var k = new K; + e.each(function(a) { + k.add(c.pb(a)); + b || g.add(a) + }); + var l = new K; + h.each(function(a) { + l.add(c.pb(a)); + b && g.add(a) + }); + var m = ""; + d && (m += Xf(this)); + 0 < k.count && (m += (b ? this.gy : this.by) + ag(this, k.jc(), !0)); + 0 < g.count && (m += this.qB + ag(this, g.jc(), !0)); + 0 < l.count && (m += (b ? + this.by : this.gy) + ag(this, l.jc(), !0)); + return m + }; + f.EA = function(a) { + Zf(this, a); + var b = a.insertedNodeKeys; + if (z.isArray(b)) + for (var c = z.bb(b), d = 0; d < c; d++) { + var e = z.Ya(b, d), + g = this.ne(e); + null === g && (g = this.copyNodeData({}), this.Mx(g, e), this.rl(g)) + } + b = a.modifiedNodeData; + if (z.isArray(b)) + for (c = z.bb(b), d = 0; d < c; d++) { + var h = z.Ya(b, d), + e = this.pb(h), + g = this.ne(e); + if (null !== g) + for (var k in h) "__gohashid" !== k && k !== this.qj && this.setDataProperty(g, k, h[k]) + } + a = a.removedNodeKeys; + if (z.isArray(a)) + for (c = z.bb(a), d = 0; d < c; d++) e = z.Ya(a, d), g = this.ne(e), null !== g && this.Ex(g) + }; + M.prototype.toIncrementalJson = M.prototype.toIncrementalJSON = function(a, b) { + z.l(a, Rf, M, "toIncrementalJson:e"); + a.Dc !== Tf && z.k("Model.toIncrementalJson argument is not a Transaction ChangedEvent:" + a.toString()); + var c = a.object; + if (!(a.TE && c instanceof og)) return '{ "incremental": 0 }'; + void 0 === b && (b = this.constructor === M ? "go.Model" : this.constructor === V ? "go.GraphLinksModel" : this.constructor === ng ? "go.TreeModel" : z.kf(this)); + return '{ "class": ' + this.quote(b) + ', "incremental": 1' + this.Cn() + this.gB(c, "FinishedUndo" === + a.propertyName) + "}" + }; + M.prototype.toJson = M.prototype.toJSON = M.prototype.ZA = function(a) { + void 0 === a && (a = this.constructor === M ? "go.Model" : this.constructor === V ? "go.GraphLinksModel" : this.constructor === ng ? "go.TreeModel" : z.kf(this)); + return '{ "class": ' + this.quote(a) + this.Cn() + this.hB() + "}" + }; + M.prototype.applyIncrementalJson = M.prototype.applyIncrementalJSON = function(a) { + var b = null; + if ("string" === typeof a) + if (window.JSON && window.JSON.parse) try { + b = window.JSON.parse(a) + } catch (c) { + u && z.trace("JSON.parse error: " + c.toString()) + } else z.trace("WARNING: no JSON.parse available"); + else "object" === typeof a ? b = a : z.k("Unable to modify a Model from: " + a); + var d = b.incremental; + "number" !== typeof d && z.k("Unable to apply non-incremental changes to Model: " + a); + 0 !== d && (this.Wb("applyIncrementalJson"), this.EA(b), this.Jd("applyIncrementalJson")) + }; + M.fromJson = M.fromJSON = function(a, b) { + void 0 === b && (b = null); + null !== b && z.l(b, M, M, "fromJson:model"); + var c = null; + if ("string" === typeof a) + if (window.JSON && window.JSON.parse) try { + c = window.JSON.parse(a) + } catch (d) { + u && z.trace("JSON.parse error: " + d.toString()) + } else z.trace("WARNING: no JSON.parse available"); + else "object" === typeof a ? c = a : z.k("Unable to construct a Model from: " + a); + if (null === b) { + var e; + e = null; + var g = c["class"]; + if ("string" === typeof g) try { + var h = null; + 0 === g.indexOf("go.") ? (g = g.substr(3), h = aa[g]) : (h = aa[g], + void 0 === h && (h = window[g])); + "function" === typeof h && (e = new h) + } catch (k) {} + null === e || e instanceof M ? b = e : z.k("Unable to construct a Model of declared class: " + c["class"]) + } + null === b && (b = new V); + b.hu(c); + b.FA(c); + return b + }; + M.prototype.replaceJsonObjects = M.prototype.ku = function(a) { + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) { + var d = z.Ya(a, c); + z.Za(d) && z.LD(a, c, this.ku(d)) + } else if (z.Za(a)) { + for (c in a) + if (d = a[c], z.Za(d) && (d = this.ku(d), a[c] = d, "points" === c && Array.isArray(d))) { + for (var e = 0 === d.length % 2, g = 0; g < d.length; g++) + if ("number" !== typeof d[g]) { + e = !1; + break + } + if (e) { + e = new J(N); + for (g = 0; g < d.length / 2; g++) { + var h = new N(d[2 * g], d[2 * g + 1]); + e.add(h) + } + e.freeze(); + a[c] = e + } + } + if ("object" === typeof a) { + c = a; + d = a["class"]; + if ("NaN" === d) c = NaN; + else if ("Date" === + d) c = new Date(a.value); + else if ("go.Point" === d) c = new N(pg(a.x), pg(a.y)); + else if ("go.Size" === d) c = new Ea(pg(a.width), pg(a.height)); + else if ("go.Rect" === d) c = new w(pg(a.x), pg(a.y), pg(a.width), pg(a.height)); + else if ("go.Margin" === d) c = new Db(pg(a.top), pg(a.right), pg(a.bottom), pg(a.left)); + else if ("go.Spot" === d) c = "string" === typeof a["enum"] ? Ub(a["enum"]) : new Q(pg(a.x), pg(a.y), pg(a.offsetX), pg(a.offsetY)); + else if ("go.Brush" === d) { + if (c = new Da, c.type = Ja(Da, a.type), "string" === typeof a.color && (c.color = a.color), a.start instanceof Q && (c.start = a.start), a.end instanceof Q && (c.end = a.end), "number" === typeof a.startRadius && (c.wu = pg(a.startRadius)), "number" === typeof a.endRadius && (c.xt = pg(a.endRadius)), a = a.colorStops, z.Za(a)) + for (b in a) c.addColorStop(parseFloat(b), a[b]) + } else "go.Geometry" === d ? (b = null, b = "string" === typeof a.path ? sf(a.path) : new hf, b.type = Ja(hf, a.type), "number" === typeof a.startX && (b.Ha = pg(a.startX)), "number" === typeof a.startY && (b.Da = pg(a.startY)), "number" === typeof a.endX && (b.L = pg(a.endX)), "number" === typeof a.endY && (b.M = + pg(a.endY)), a.spot1 instanceof Q && (b.C = a.spot1), a.spot2 instanceof Q && (b.D = a.spot2), c = b) : "go.EnumValue" === d && (b = a.classType, 0 === b.indexOf("go.") && (b = b.substr(3)), c = Ja(aa[b], a.name)); + a = c + } + } + return a + }; + M.prototype.quote = function(a) { + for (var b = "", c = a.length, d = 0; d < c; d++) { + var e = a[d]; + if ('"' === e || "\\" === e) b += "\\" + e; + else if ("\b" === e) b += "\\b"; + else if ("\f" === e) b += "\\f"; + else if ("\n" === e) b += "\\n"; + else if ("\r" === e) b += "\\r"; + else if ("\t" === e) b += "\\t"; + else var g = a.charCodeAt(d), + b = 16 > g ? b + ("\\u000" + a.charCodeAt(d).toString(16)) : 32 > g ? b + ("\\u00" + a.charCodeAt(d).toString(16)) : 8232 === g ? b + "\\u2028" : 8233 === g ? b + "\\u2029" : b + e + } + return '"' + b + '"' + }; + M.prototype.writeJsonValue = M.prototype.Du = function(a) { + return void 0 === a ? "undefined" : null === a ? "null" : !0 === a ? "true" : !1 === a ? "false" : "string" === typeof a ? this.quote(a) : "number" === typeof a ? Infinity === a ? "9e9999" : -Infinity === a ? "-9e9999" : isNaN(a) ? '{"class":"NaN"}' : a.toString() : a instanceof Date ? '{"class":"Date", "value":"' + a.toJSON() + '"}' : a instanceof Number ? this.Du(a.valueOf()) : z.isArray(a) ? ag(this, a) : z.Za(a) ? Yf(this, a) : "function" === typeof a ? "null" : a.toString() + }; + + function ag(a, b, c) { + void 0 === c && (c = !1); + var d = z.bb(b); + if (0 >= d) return "[]"; + var e = new za; + e.add("[ "); + c && 1 < d && e.add("\n"); + for (var g = 0; g < d; g++) { + var h = z.Ya(b, g); + void 0 !== h && (0 < g && (e.add(","), c && e.add("\n")), e.add(a.Du(h))) + } + c && 1 < d && e.add("\n"); + e.add(" ]"); + return e.toString() + } + + function $f(a, b) { + return void 0 === b || "__gohashid" === a || "_" === a[0] || "function" === typeof b ? !0 : !1 + } + + function qg(a) { + return isNaN(a) ? "NaN" : Infinity === a ? "9e9999" : -Infinity === a ? "-9e9999" : a + } + + function Yf(a, b) { + var c = b; + if (c instanceof N) { + var d = c; + b = { + "class": "go.Point", + x: qg(d.x), + y: qg(d.y) + } + } else if (c instanceof Ea) { + var e = c; + b = { + "class": "go.Size", + width: qg(e.width), + height: qg(e.height) + } + } else if (c instanceof w) b = { + "class": "go.Rect", + x: qg(c.x), + y: qg(c.y), + width: qg(c.width), + height: qg(c.height) + }; + else if (c instanceof Db) b = { + "class": "go.Margin", + top: qg(c.top), + right: qg(c.right), + bottom: qg(c.bottom), + left: qg(c.left) + }; + else if (c instanceof Q) e = c, b = e.cd() ? { + "class": "go.Spot", + x: qg(e.x), + y: qg(e.y), + offsetX: qg(e.offsetX), + offsetY: qg(e.offsetY) + } : { + "class": "go.Spot", + "enum": e.toString() + }; + else if (c instanceof Da) { + b = { + "class": "go.Brush", + type: c.type.name + }; + if (c.type === rg) b.color = c.color; + else if (c.type === sg || c.type === yd) b.start = c.start, b.end = c.end, c.type === yd && (0 !== c.wu && (b.startRadius = qg(c.wu)), isNaN(c.xt) || (b.endRadius = qg(c.xt))); + if (null !== c.st) { + for (var g = {}, h = c.st.i; h.next();) g[h.key] = h.value; + b.colorStops = g + } + } else if (c instanceof hf) b = { + "class": "go.Geometry", + type: c.type.name + }, 0 !== c.Ha && (b.startX = qg(c.Ha)), 0 !== c.Da && (b.startY = + qg(c.Da)), 0 !== c.L && (b.endX = qg(c.L)), 0 !== c.M && (b.endY = qg(c.M)), c.C.N(Zb) || (b.spot1 = c.C), c.D.N(ic) || (b.spot2 = c.D), c.type === jf && (b.path = rf(c)); + else if (c instanceof Ba) b = { + "class": "go.EnumValue", + classType: z.kf(c.ze), + name: c.name + }; + else if (c instanceof O || c instanceof C || c instanceof tg || c instanceof M || c instanceof ug || c instanceof ra || c instanceof vg || c instanceof wa || c instanceof Wf || c instanceof og) return z.trace("ERROR: trying to convert a GraphObject or Diagram or Model or Tool or Layout or UndoManager into JSON text: " + + c.toString()), "{}"; + g = "{"; + c = !0; + for (d in b) + if (e = z.tb(b, d), !$f(d, e)) + if (c ? c = !1 : g += ", ", g += '"' + d + '":', "points" === d && e instanceof J && e.ba === N) { + h = e; + e = "["; + for (h = h.i; h.next();) { + var k = h.value; + 1 < e.length && (e += ","); + e += a.Du(k.x); + e += ","; + e += a.Du(k.y) + } + e += "]"; + g += e + } else g += a.Du(e); + return g + "}" + } + + function pg(a) { + return "number" === typeof a ? a : "NaN" === a ? NaN : "9e9999" === a ? Infinity : "-9e9999" === a ? -Infinity : parseFloat(a) + } + z.defineProperty(M, { + name: "name" + }, function() { + return this.Ub + }, function(a) { + var b = this.Ub; + b !== a && (z.g(a, "string", M, "name"), this.Ub = a, this.j("name", b, a)) + }); + z.defineProperty(M, { + Al: "dataFormat" + }, function() { + return this.Kq + }, function(a) { + var b = this.Kq; + b !== a && (z.g(a, "string", M, "dataFormat"), this.Kq = a, this.j("dataFormat", b, a)) + }); + z.defineProperty(M, { + jb: "isReadOnly" + }, function() { + return this.Gi + }, function(a) { + var b = this.Gi; + b !== a && (z.g(a, "boolean", M, "isReadOnly"), this.Gi = a, this.j("isReadOnly", b, a)) + }); + z.defineProperty(M, { + tk: "modelData" + }, function() { + return this.az + }, function(a) { + var b = this.az; + b !== a && (z.g(a, "object", M, "modelData"), this.az = a, this.j("modelData", b, a), this.Mb(a)) + }); + M.prototype.addChangedListener = M.prototype.Rm = function(a) { + z.g(a, "function", M, "addChangedListener:listener"); + null === this.Pj && (this.Pj = new J("function")); + this.Pj.add(a) + }; + M.prototype.removeChangedListener = M.prototype.iu = function(a) { + z.g(a, "function", M, "removeChangedListener:listener"); + null !== this.Pj && (this.Pj.remove(a), 0 === this.Pj.count && (this.Pj = null)) + }; + M.prototype.Kw = function(a) { + this.Bb || this.pa.DE(a); + if (null !== this.Pj) { + var b = this.Pj, + c = b.length; + if (1 === c) b = b.ea(0), b(a); + else if (0 !== c) + for (var d = b.jc(), e = 0; e < c; e++) b = d[e], b(a) + } + }; + M.prototype.raiseChangedEvent = M.prototype.Rc = function(a, b, c, d, e, g, h) { + wg(this, "", a, b, c, d, e, g, h) + }; + M.prototype.raiseChanged = M.prototype.j = function(a, b, c, d, e) { + wg(this, "", Sf, a, this, b, c, d, e) + }; + M.prototype.raiseDataChanged = M.prototype.DA = function(a, b, c, d, e, g) { + wg(this, "", Sf, b, a, c, d, e, g) + }; + + function wg(a, b, c, d, e, g, h, k, l) { + void 0 === k && (k = null); + void 0 === l && (l = null); + var m = new Rf; + m.ha = a; + m.Dc = c; + m.rf = b; + m.propertyName = d; + m.object = e; + m.oldValue = g; + m.Mg = k; + m.newValue = h; + m.Kg = l; + a.Kw(m) + } + z.defineProperty(M, { + pa: "undoManager" + }, function() { + return this.sz + }, function(a) { + var b = this.sz; + b !== a && (z.l(a, Wf, M, "undoManager"), null !== b && b.YI(this), this.sz = a, null !== a && a.PG(this)) + }); + z.defineProperty(M, { + Bb: "skipsUndoManager" + }, function() { + return this.Vi + }, function(a) { + z.g(a, "boolean", M, "skipsUndoManager"); + this.Vi = a + }); + M.prototype.Vm = function(a, b) { + if (null !== a && a.ha === this) + if (a.Dc === Sf) { + var c = a.object, + d = a.propertyName, + e = a.na(b); + z.Ra(c, d, e) + } else a.Dc === Uf ? "nodeDataArray" === a.rf ? (c = a.newValue, z.Za(c) && (d = this.pb(c), void 0 !== d && (b ? (z.hi(this.wf, a.Kg), this.vc.remove(d)) : (z.aj(this.wf, a.Kg, c), this.vc.add(d, c))))) : "" === a.rf ? (c = a.object, !z.isArray(c) && a.propertyName && (c = z.tb(a.object, a.propertyName)), z.isArray(c) && (d = a.newValue, e = a.Kg, b ? z.hi(c, e) : z.aj(c, e, d))) : z.k("unknown ChangedEvent.Insert object: " + a.toString()) : a.Dc === + Vf ? "nodeDataArray" === a.rf ? (c = a.oldValue, z.Za(c) && (d = this.pb(c), void 0 !== d && (b ? (z.aj(this.wf, a.Mg, c), this.vc.add(d, c)) : (z.hi(this.wf, a.Mg), this.vc.remove(d))))) : "" === a.rf ? (c = a.object, !z.isArray(c) && a.propertyName && (c = z.tb(a.object, a.propertyName)), z.isArray(c) && (d = a.oldValue, e = a.Mg, b ? z.aj(c, e, d) : z.hi(c, e))) : z.k("unknown ChangedEvent.Remove object: " + a.toString()) : a.Dc !== Tf && z.k("unknown ChangedEvent: " + a.toString()) + }; + M.prototype.startTransaction = M.prototype.Wb = function(a) { + return this.pa.Wb(a) + }; + M.prototype.commitTransaction = M.prototype.Jd = function(a) { + return this.pa.Jd(a) + }; + M.prototype.rollbackTransaction = M.prototype.Vp = function() { + return this.pa.Vp() + }; + M.prototype.updateTargetBindings = M.prototype.Mb = function(a, b) { + void 0 === b && (b = ""); + wg(this, "SourceChanged", Tf, b, a, null, null) + }; + z.defineProperty(M, { + qj: "nodeKeyProperty" + }, function() { + return this.Vj + }, function(a) { + var b = this.Vj; + b !== a && (xg(a, M, "nodeKeyProperty"), "" === a && z.k("Model.nodeKeyProperty may not be the empty string"), 0 < this.vc.count && z.k("Cannot set Model.nodeKeyProperty when there is existing node data"), this.Vj = a, this.j("nodeKeyProperty", b, a)) + }); + + function xg(a, b, c) { + "string" !== typeof a && "function" !== typeof a && z.ic(a, "string or function", b, c) + } + M.prototype.getKeyForNodeData = M.prototype.pb = function(a) { + if (null !== a) { + var b = this.Vj; + if ("" !== b && (b = z.tb(a, b), void 0 !== b)) { + if (yg(b)) return b; + z.k("Key value for node data " + a + " is not a number or a string: " + b) + } + } + }; + M.prototype.setKeyForNodeData = M.prototype.Mx = function(a, b) { + void 0 !== b && null !== b && yg(b) || z.ic(b, "number or string", M, "setKeyForNodeData:key"); + if (null !== a) { + var c = this.Vj; + if ("" !== c) + if (this.le(a)) { + var d = z.tb(a, c); + d !== b && null === this.ne(b) && (z.Ra(a, c, b), this.vc.remove(d), this.vc.add(b, a), wg(this, "nodeKey", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c), this.ju(d, b)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(M, { + OK: "makeUniqueKeyFunction" + }, function() { + return this.Ao + }, function(a) { + var b = this.Ao; + b !== a && (null !== a && z.g(a, "function", M, "makeUniqueKeyFunction"), this.Ao = a, this.j("makeUniqueKeyFunction", b, a)) + }); + + function yg(a) { + return "number" === typeof a || "string" === typeof a + } + M.prototype.containsNodeData = M.prototype.le = function(a) { + var b = this.pb(a); + return void 0 === b ? !1 : this.vc.na(b) === a + }; + M.prototype.findNodeDataForKey = M.prototype.ne = function(a) { + null === a && z.k("Model.findNodeDataForKey:key must not be null"); + return void 0 !== a && yg(a) ? this.vc.na(a) : null + }; + z.defineProperty(M, { + gg: "nodeDataArray" + }, function() { + return this.wf + }, function(a) { + var b = this.wf; + if (b !== a) { + z.nt(a, M, "nodeDataArray"); + this.vc.clear(); + this.cB(); + for (var c = z.bb(a), d = 0; d < c; d++) { + var e = z.Ya(a, d); + if (!z.Za(e)) { + z.k("Model.nodeDataArray must only contain Objects, not: " + e); + return + } + z.It(e) + } + this.wf = a; + for (var g = new J(Object), d = 0; d < c; d++) { + var e = z.Ya(a, d), + h = this.pb(e); + void 0 === h ? g.add(e) : null !== this.vc.na(h) ? g.add(e) : this.vc.add(h, e) + } + for (d = g.i; d.next();) e = d.value, this.oA(e), g = this.pb(e), void 0 !== g && + this.vc.add(g, e); + wg(this, "nodeDataArray", Sf, "nodeDataArray", this, b, a); + for (d = 0; d < c; d++) e = z.Ya(a, d), this.Up(e), this.Tp(e); + this.QD(); + z.gI(a) || (this.jb = !0) + } + }); + M.prototype.makeNodeDataKeyUnique = M.prototype.oA = function(a) { + if (null !== a) { + var b = this.Vj; + if ("" !== b) { + var c = this.pb(a); + if (void 0 === c || this.vc.contains(c)) { + var d = this.Ao; + if (null !== d && (c = d(this, a), void 0 !== c && null !== c && !this.vc.contains(c))) { + z.Ra(a, b, c); + return + } + if ("string" === typeof c) { + for (d = 2; this.vc.contains(c + d);) d++; + z.Ra(a, b, c + d) + } else if (void 0 === c || "number" === typeof c) { + for (d = -this.vc.count - 1; this.vc.contains(d);) d--; + z.Ra(a, b, d) + } else z.k("Model.getKeyForNodeData returned something other than a string or a number: " + + c) + } + } + } + }; + M.prototype.addNodeData = M.prototype.rl = function(a) { + null !== a && (z.It(a), zg(this, a, !0)) + }; + + function zg(a, b, c) { + var d = a.pb(b); + if (void 0 === d || a.vc.na(d) !== b) + if (a.oA(b), d = a.pb(b), void 0 === d) z.k("Model.makeNodeDataKeyUnique failed on " + b + ". Data not added to Model."); + else { + a.vc.add(d, b); + if (c) { + var e = z.bb(a.wf); + z.aj(a.wf, e, b) + } + wg(a, "nodeDataArray", Uf, "nodeDataArray", a, null, b, null, e); + a.Up(b); + a.Tp(b) + } + } + M.prototype.addNodeDataCollection = function(a) { + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) this.rl(z.Ya(a, c)); + else + for (a = a.i; a.next();) this.rl(a.value) + }; + M.prototype.removeNodeData = M.prototype.Ex = function(a) { + null !== a && Ag(this, a, !0) + }; + + function Ag(a, b, c) { + var d = a.pb(b); + if (void 0 !== d && a.vc.contains(d)) { + a.vc.remove(d); + if (c) { + var e = z.Dz(a.wf, b); + if (0 > e) return; + z.hi(a.wf, e) + } + wg(a, "nodeDataArray", Vf, "nodeDataArray", a, b, null, e, null); + a.Bu(b) + } + } + M.prototype.removeNodeDataCollection = function(a) { + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) this.Ex(z.Ya(a, c)); + else + for (a = a.i; a.next();) this.Ex(a.value) + }; + f = M.prototype; + f.ju = function(a, b) { + var c = Bg(this, a); + c instanceof K && this.ng.add(b, c) + }; + f.cB = function() {}; + f.Up = function() {}; + f.Tp = function() {}; + f.Bu = function() {}; + + function Cg(a, b, c) { + if (void 0 !== b) { + var d = a.ng.na(b); + null === d && (d = new K(Object), a.ng.add(b, d)); + d.add(c) + } + } + + function Dg(a, b, c) { + if (void 0 !== b) { + var d = a.ng.na(b); + d instanceof K && (void 0 === c || null === c ? a.ng.remove(b) : (d.remove(c), 0 === d.count && a.ng.remove(b))) + } + } + + function Bg(a, b) { + if (void 0 === b) return null; + var c = a.ng.na(b); + return c instanceof K ? c : null + } + M.prototype.clearUnresolvedReferences = M.prototype.QD = function(a) { + void 0 === a ? this.ng.clear() : this.ng.remove(a) + }; + z.defineProperty(M, { + fK: "copyNodeDataFunction" + }, function() { + return this.Rn + }, function(a) { + var b = this.Rn; + b !== a && (null !== a && z.g(a, "function", M, "copyNodeDataFunction"), this.Rn = a, this.j("copyNodeDataFunction", b, a)) + }); + z.defineProperty(M, { + Jz: "copiesArrays" + }, function() { + return this.Zu + }, function(a) { + var b = this.Zu; + b !== a && (null !== a && z.g(a, "boolean", M, "copiesArrays"), this.Zu = a, this.j("copiesArrays", b, a)) + }); + z.defineProperty(M, { + Iz: "copiesArrayObjects" + }, function() { + return this.Cq + }, function(a) { + var b = this.Cq; + b !== a && (null !== a && z.g(a, "boolean", M, "copiesArrayObjects"), this.Cq = a, this.j("copiesArrayObjects", b, a)) + }); + M.prototype.copyNodeData = function(a) { + if (null === a) return null; + var b = null, + b = this.Rn, + b = null !== b ? b(a, this) : Eg(this, a, !0); + z.Za(b) && z.kc(b); + return b + }; + + function Eg(a, b, c) { + if (a.Jz && Array.isArray(b)) { + var d = []; + for (c = 0; c < b.length; c++) { + var e = Eg(a, b[c], a.Iz); + d.push(e) + } + z.kc(d); + return d + } + if (c && z.Za(b)) { + c = (c = b.constructor) ? new c : {}; + for (d in b) + if ("__gohashid" !== d) { + var e = z.tb(b, d), + g; + g = e; + g instanceof O || g instanceof C || g instanceof tg || g instanceof Fg || g instanceof Gg || g instanceof ug || g instanceof ra || g instanceof vg || g instanceof Pf || g instanceof Qf ? ("_" !== d[0] && z.trace('Warning: found GraphObject or Diagram reference when copying model data on property "' + + d + '" of data object: ' + b.toString() + " \nModel data should not have any references to a Diagram or any part of a diagram, such as: " + g.toString()), g = !0) : g = g instanceof M || g instanceof Wf || g instanceof og || g instanceof Rf ? !0 : !1; + g || (e = Eg(a, e, !1)); + z.Ra(c, d, e) + } + z.kc(c); + return c + } + return b instanceof N ? b.copy() : b instanceof Ea ? b.copy() : b instanceof w ? b.copy() : b instanceof Q ? b.copy() : b instanceof Db ? b.copy() : b + } + z.defineProperty(M, { + RG: "afterCopyFunction" + }, function() { + return this.nq + }, function(a) { + var b = this.nq; + b !== a && (null !== a && z.g(a, "function", M, "afterCopyFunction"), this.nq = a, this.j("afterCopyFunction", b, a)) + }); + var Hg = !1; + M.prototype.setDataProperty = function(a, b, c) { + u && (z.g(a, "object", M, "setDataProperty:data"), z.g(b, "string", M, "setDataProperty:propname"), "" === b && z.k("Model.setDataProperty: property name must not be an empty string when setting " + a + " to " + c)); + if (this.le(a)) + if (b === this.qj) this.Mx(a, c); + else { + if (b === this.qn) { + this.Jx(a, c); + return + } + } + else !Hg && a instanceof O && (Hg = !0, z.trace('Model.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), z.trace(" Is that really your intent?")); + var d = z.tb(a, b); + d !== c && + (z.Ra(a, b, c), this.DA(a, b, d, c)) + }; + M.prototype.addArrayItem = function(a, b) { + this.cI(a, -1, b) + }; + M.prototype.insertArrayItem = M.prototype.cI = function(a, b, c) { + u && (z.nt(a, M, "insertArrayItem:arr"), z.p(b, M, "insertArrayItem:idx")); + a === this.wf && z.k("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"); + 0 > b && (b = z.bb(a)); + z.aj(a, b, c); + wg(this, "", Uf, "", a, null, c, null, b) + }; + M.prototype.removeArrayItem = function(a, b) { + void 0 === b && (b = -1); + u && (z.nt(a, M, "removeArrayItem:arr"), z.p(b, M, "removeArrayItem:idx")); + a === this.wf && z.k("Model.removeArrayItem should not be called on the Model.nodeDataArray"); - 1 === b && (b = z.bb(a) - 1); + var c = z.Ya(a, b); + z.hi(a, b); + wg(this, "", Vf, "", a, c, null, b, null) + }; + z.defineProperty(M, { + qn: "nodeCategoryProperty" + }, function() { + return this.xm + }, function(a) { + var b = this.xm; + b !== a && (xg(a, M, "nodeCategoryProperty"), this.xm = a, this.j("nodeCategoryProperty", b, a)) + }); + M.prototype.getCategoryForNodeData = M.prototype.$z = function(a) { + if (null === a) return ""; + var b = this.xm; + if ("" === b) return ""; + b = z.tb(a, b); + if (void 0 === b) return ""; + if ("string" === typeof b) return b; + z.k("getCategoryForNodeData found a non-string category for " + a + ": " + b); + return "" + }; + M.prototype.setCategoryForNodeData = M.prototype.Jx = function(a, b) { + z.g(b, "string", M, "setCategoryForNodeData:cat"); + if (null !== a) { + var c = this.xm; + if ("" !== c) + if (this.le(a)) { + var d = z.tb(a, c); + void 0 === d && (d = ""); + d !== b && (z.Ra(a, c, b), wg(this, "nodeCategory", Sf, c, a, d, b)) + } else z.Ra(a, c, b) + } + }; + + function V(a, b) { + 2 < arguments.length && z.k("GraphLinksModel constructor can only take two optional arguments, the Array of node data and the Array of link data."); + M.call(this); + this.vf = []; + this.sm = new K(Object); + this.hd = new na(null, Object); + this.dl = ""; + this.Mk = this.Qn = this.Bo = null; + this.Th = "from"; + this.Uh = "to"; + this.um = this.tm = ""; + this.rm = "category"; + this.ug = ""; + this.Eo = "isGroup"; + this.jh = "group"; + this.Dq = !1; + void 0 !== a && (this.gg = a); + void 0 !== b && (this.Jg = b) + } + z.Qa(V, M); + z.ia("GraphLinksModel", V); + V.prototype.cloneProtected = function(a) { + M.prototype.cloneProtected.call(this, a); + a.dl = this.dl; + a.Bo = this.Bo; + a.Qn = this.Qn; + a.Th = this.Th; + a.Uh = this.Uh; + a.tm = this.tm; + a.um = this.um; + a.rm = this.rm; + a.ug = this.ug; + a.Eo = this.Eo; + a.jh = this.jh; + a.Dq = this.Dq + }; + V.prototype.clear = V.prototype.clear = function() { + M.prototype.clear.call(this); + this.vf = []; + this.hd.clear(); + this.sm.clear() + }; + f = V.prototype; + f.toString = function(a) { + void 0 === a && (a = 0); + if (2 <= a) return this.ZA(); + var b = ("" !== this.name ? this.name : "") + " GraphLinksModel"; + if (0 < a) { + b += "\n node data:"; + a = this.gg; + for (var c = z.bb(a), d = 0, d = 0; d < c; d++) var e = z.Ya(a, d), + b = b + (" " + this.pb(e) + ":" + ka(e)); + b += "\n link data:"; + a = this.Jg; + c = z.bb(a); + for (d = 0; d < c; d++) e = z.Ya(a, d), b += " " + this.Ll(e) + "--\x3e" + this.Ml(e) + } + return b + }; + f.Cn = function() { + var a = M.prototype.Cn.call(this), + b = ""; + "category" !== this.Wt && "string" === typeof this.Wt && (b += ',\n "linkCategoryProperty": ' + this.quote(this.Wt)); + "" !== this.oj && "string" === typeof this.oj && (b += ',\n "linkKeyProperty": ' + this.quote(this.oj)); + "from" !== this.Ep && "string" === typeof this.Ep && (b += ',\n "linkFromKeyProperty": ' + this.quote(this.Ep)); + "to" !== this.Gp && "string" === typeof this.Gp && (b += ',\n "linkToKeyProperty": ' + this.quote(this.Gp)); + "" !== this.Xt && "string" === typeof this.Xt && (b += ',\n "linkFromPortIdProperty": ' + + this.quote(this.Xt)); + "" !== this.Zt && "string" === typeof this.Zt && (b += ',\n "linkToPortIdProperty": ' + this.quote(this.Zt)); + "" !== this.Yt && "string" === typeof this.Yt && (b += ',\n "linkLabelKeysProperty": ' + this.quote(this.Yt)); + "isGroup" !== this.eu && "string" === typeof this.eu && (b += ',\n "nodeIsGroupProperty": ' + this.quote(this.eu)); + "group" !== this.Pp && "string" === typeof this.Pp && (b += ',\n "nodeGroupKeyProperty": ' + this.quote(this.Pp)); + return a + b + }; + f.hu = function(a) { + M.prototype.hu.call(this, a); + a.linkKeyProperty && (this.oj = a.linkKeyProperty); + a.linkFromKeyProperty && (this.Ep = a.linkFromKeyProperty); + a.linkToKeyProperty && (this.Gp = a.linkToKeyProperty); + a.linkFromPortIdProperty && (this.Xt = a.linkFromPortIdProperty); + a.linkToPortIdProperty && (this.Zt = a.linkToPortIdProperty); + a.linkCategoryProperty && (this.Wt = a.linkCategoryProperty); + a.linkLabelKeysProperty && (this.Yt = a.linkLabelKeysProperty); + a.nodeIsGroupProperty && (this.eu = a.nodeIsGroupProperty); + a.nodeGroupKeyProperty && + (this.Pp = a.nodeGroupKeyProperty) + }; + f.hB = function() { + var a = M.prototype.hB.call(this), + b = ',\n "linkDataArray": ' + ag(this, this.Jg, !0); + return a + b + }; + f.FA = function(a) { + M.prototype.FA.call(this, a); + a = a.linkDataArray; + z.isArray(a) && (this.ku(a), this.Jg = a) + }; + f.iB = function(a) { + a instanceof V || z.k("Model.computeJsonDifference: newmodel must be a GraphLinksModel"); + "" === this.oj && z.k("GraphLinksModel.linkKeyProperty must not be an empty string for .computeJsonDifference() to succeed."); + var b = M.prototype.iB.call(this, a); + mg(this, a, "linkKeyProperty"); + mg(this, a, "linkFromKeyProperty"); + mg(this, a, "linkToKeyProperty"); + mg(this, a, "linkLabelKeysProperty"); + mg(this, a, "nodeIsGroupProperty"); + mg(this, a, "nodeGroupKeyProperty"); + for (var c = new K, d = new K, e = (new K).$c(this.hd.UE), + g = new na, h = a.Jg, k = 0; k < h.length; k++) { + var l = h[k], + m = a.lf(l); + if (void 0 !== m) { + e.remove(m); + var n = this.zt(m); + null === n ? (c.add(m), d.add(l)) : bg(this, n, l, g) || d.add(l) + } else this.nA(l), m = this.lf(l), c.add(m), d.add(l) + } + a = b; + 0 < c.count && (a += this.ay + ag(this, c.jc(), !0)); + 0 < d.count && (a += this.pB + ag(this, d.jc(), !0)); + 0 < e.count && (a += this.ey + ag(this, e.jc(), !0)); + return a + }; + f.ay = ',\n "insertedLinkKeys": '; + f.pB = ',\n "modifiedLinkData": '; + f.ey = ',\n "removedLinkKeys": '; + f.gB = function(a, b) { + "" === this.oj && z.k("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed."); + var c = M.prototype.gB.call(this, a, b), + d = this, + e = new K, + g = new K, + h = new K; + a.Yf.each(function(a) { + a.ha === d && ("linkDataArray" === a.rf ? a.Dc === Uf ? e.add(a.newValue) : a.Dc === Vf && h.add(a.oldValue) : d.sh(a.object) && g.add(a.object)) + }); + var k = new K; + e.each(function(a) { + k.add(d.lf(a)); + b || g.add(a) + }); + var l = new K; + h.each(function(a) { + l.add(d.lf(a)); + b && g.add(a) + }); + 0 < k.count && (c += (b ? this.ey : this.ay) + + ag(this, k.jc(), !0)); + 0 < g.count && (c += this.pB + ag(this, g.jc(), !0)); + 0 < l.count && (c += (b ? this.ay : this.ey) + ag(this, l.jc(), !0)); + return c + }; + f.EA = function(a) { + M.prototype.EA.call(this, a); + var b = a.insertedLinkKeys; + if (z.isArray(b)) + for (var c = z.bb(b), d = 0; d < c; d++) { + var e = z.Ya(b, d), + g = this.zt(e); + null === g && (g = this.Pw({}), this.JF(g, e), this.gt(g)) + } + b = a.modifiedLinkData; + if (z.isArray(b)) + for (c = z.bb(b), d = 0; d < c; d++) { + var h = z.Ya(b, d), + e = this.lf(h), + g = this.zt(e); + if (null !== g) + for (var k in h) "__gohashid" !== k && k !== this.oj && this.setDataProperty(g, k, h[k]) + } + a = a.removedLinkKeys; + if (z.isArray(a)) + for (c = z.bb(a), d = 0; d < c; d++) e = z.Ya(a, d), g = this.zt(e), null !== g && this.Dx(g) + }; + f.Vm = function(a, b) { + var c = null; + if (a.Dc === Uf) { + if ("linkDataArray" === a.rf ? c = this.vf : "linkLabelKeys" === a.rf && (c = this.qk(a.object)), z.isArray(c)) { + if (b) z.hi(c, a.Kg), c === this.vf && (c = this.lf(a.newValue), void 0 !== c && this.hd.remove(c)); + else if (z.aj(c, a.Kg, a.newValue), c === this.vf) { + var d = a.newValue, + c = this.lf(d); + void 0 !== c && this.hd.add(c, d) + } + return + } + } else if (a.Dc === Vf && ("linkDataArray" === a.rf ? c = this.vf : "linkLabelKeys" === a.rf && (c = this.qk(a.object)), z.isArray(c))) { + b ? (z.aj(c, a.Mg, a.oldValue), c === this.vf && (d = a.newValue, + c = this.lf(d), void 0 !== c && this.hd.add(c, d))) : (z.hi(c, a.Mg), c === this.vf && (c = this.lf(a.newValue), void 0 !== c && this.hd.remove(c))); + return + } + M.prototype.Vm.call(this, a, b) + }; + z.defineProperty(V, { + Cz: "archetypeNodeData" + }, function() { + return this.Mk + }, function(a) { + var b = this.Mk; + b !== a && (null !== a && z.l(a, Object, V, "archetypeNodeData"), this.Mk = a, this.j("archetypeNodeData", b, a)) + }); + V.prototype.pn = function(a) { + if (void 0 !== a) { + var b = this.Mk; + if (null !== b) { + var c = this.ne(a); + null === c && (c = this.copyNodeData(b), z.Ra(c, this.Vj, a), this.rl(c)) + } + return a + } + }; + z.defineProperty(V, { + Ep: "linkFromKeyProperty" + }, function() { + return this.Th + }, function(a) { + var b = this.Th; + b !== a && (xg(a, V, "linkFromKeyProperty"), this.Th = a, this.j("linkFromKeyProperty", b, a)) + }); + V.prototype.getFromKeyForLinkData = V.prototype.Ll = function(a) { + if (null !== a) { + var b = this.Th; + if ("" !== b && (b = z.tb(a, b), void 0 !== b)) { + if (yg(b)) return b; + z.k("FromKey value for link data " + a + " is not a number or a string: " + b) + } + } + }; + V.prototype.setFromKeyForLinkData = V.prototype.Kx = function(a, b) { + null === b && (b = void 0); + void 0 === b || yg(b) || z.ic(b, "number or string", V, "setFromKeyForLinkData:key"); + if (null !== a) { + var c = this.Th; + if ("" !== c) + if (b = this.pn(b), this.sh(a)) { + var d = z.tb(a, c); + d !== b && (Dg(this, d, a), z.Ra(a, c, b), null === this.ne(b) && Cg(this, b, a), wg(this, "linkFromKey", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(V, { + Gp: "linkToKeyProperty" + }, function() { + return this.Uh + }, function(a) { + var b = this.Uh; + b !== a && (xg(a, V, "linkToKeyProperty"), this.Uh = a, this.j("linkToKeyProperty", b, a)) + }); + V.prototype.getToKeyForLinkData = V.prototype.Ml = function(a) { + if (null !== a) { + var b = this.Uh; + if ("" !== b && (b = z.tb(a, b), void 0 !== b)) { + if (yg(b)) return b; + z.k("ToKey value for link data " + a + " is not a number or a string: " + b) + } + } + }; + V.prototype.setToKeyForLinkData = V.prototype.Ox = function(a, b) { + null === b && (b = void 0); + void 0 === b || yg(b) || z.ic(b, "number or string", V, "setToKeyForLinkData:key"); + if (null !== a) { + var c = this.Uh; + if ("" !== c) + if (b = this.pn(b), this.sh(a)) { + var d = z.tb(a, c); + d !== b && (Dg(this, d, a), z.Ra(a, c, b), null === this.ne(b) && Cg(this, b, a), wg(this, "linkToKey", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(V, { + Xt: "linkFromPortIdProperty" + }, function() { + return this.tm + }, function(a) { + var b = this.tm; + b !== a && (xg(a, V, "linkFromPortIdProperty"), this.tm = a, this.j("linkFromPortIdProperty", b, a)) + }); + V.prototype.getFromPortIdForLinkData = V.prototype.MH = function(a) { + if (null === a) return ""; + var b = this.tm; + if ("" === b) return ""; + a = z.tb(a, b); + return void 0 === a ? "" : a + }; + V.prototype.setFromPortIdForLinkData = V.prototype.PA = function(a, b) { + z.g(b, "string", V, "setFromPortIdForLinkData:portname"); + if (null !== a) { + var c = this.tm; + if ("" !== c) + if (this.sh(a)) { + var d = z.tb(a, c); + void 0 === d && (d = ""); + d !== b && (z.Ra(a, c, b), wg(this, "linkFromPortId", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(V, { + Zt: "linkToPortIdProperty" + }, function() { + return this.um + }, function(a) { + var b = this.um; + b !== a && (xg(a, V, "linkToPortIdProperty"), this.um = a, this.j("linkToPortIdProperty", b, a)) + }); + V.prototype.getToPortIdForLinkData = V.prototype.PH = function(a) { + if (null === a) return ""; + var b = this.um; + if ("" === b) return ""; + a = z.tb(a, b); + return void 0 === a ? "" : a + }; + V.prototype.setToPortIdForLinkData = V.prototype.SA = function(a, b) { + z.g(b, "string", V, "setToPortIdForLinkData:portname"); + if (null !== a) { + var c = this.um; + if ("" !== c) + if (this.sh(a)) { + var d = z.tb(a, c); + void 0 === d && (d = ""); + d !== b && (z.Ra(a, c, b), wg(this, "linkToPortId", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(V, { + Yt: "linkLabelKeysProperty" + }, function() { + return this.ug + }, function(a) { + var b = this.ug; + b !== a && (xg(a, V, "linkLabelKeysProperty"), this.ug = a, this.j("linkLabelKeysProperty", b, a)) + }); + V.prototype.getLabelKeysForLinkData = V.prototype.qk = function(a) { + if (null === a) return z.xj; + var b = this.ug; + if ("" === b) return z.xj; + a = z.tb(a, b); + return void 0 === a ? z.xj : a + }; + V.prototype.setLabelKeysForLinkData = V.prototype.KF = function(a, b) { + z.nt(b, V, "setLabelKeysForLinkData:arr"); + if (null !== a) { + var c = this.ug; + if ("" !== c) + if (this.sh(a)) { + var d = z.tb(a, c); + void 0 === d && (d = z.xj); + if (d !== b) { + for (var e = z.bb(d), g = 0; g < e; g++) { + var h = z.Ya(d, g); + Dg(this, h, a) + } + z.Ra(a, c, b); + e = z.bb(b); + for (g = 0; g < e; g++) h = z.Ya(b, g), null === this.ne(h) && Cg(this, h, a); + wg(this, "linkLabelKeys", Sf, c, a, d, b); + "string" === typeof c && this.Mb(a, c) + } + } else z.Ra(a, c, b) + } + }; + V.prototype.addLabelKeyForLinkData = V.prototype.zz = function(a, b) { + if (null !== b && void 0 !== b && (yg(b) || z.ic(b, "number or string", V, "addLabelKeyForLinkData:key"), null !== a)) { + var c = this.ug; + if ("" !== c) { + var d = z.tb(a, c); + void 0 === d ? (c = [], c.push(b), this.KF(a, c)) : z.isArray(d) ? 0 <= z.Dz(d, b) || (z.aj(d, Infinity, b), this.sh(a) && (null === this.ne(b) && Cg(this, b, a), wg(this, "linkLabelKeys", Uf, c, a, null, b))) : z.k(c + " property is not an Array; cannot addLabelKeyForLinkData: " + a) + } + } + }; + V.prototype.removeLabelKeyForLinkData = V.prototype.nF = function(a, b) { + if (null !== b && void 0 !== b && (yg(b) || z.ic(b, "number or string", V, "removeLabelKeyForLinkData:key"), null !== a)) { + var c = this.ug; + if ("" !== c) { + var d = z.tb(a, c); + if (z.isArray(d)) { + var e = z.Dz(d, b); + 0 > e || (z.hi(d, e), this.sh(a) && (Dg(this, b, a), wg(this, "linkLabelKeys", Vf, c, a, b, null))) + } else void 0 !== d && z.k(c + " property is not an Array; cannot removeLabelKeyforLinkData: " + a) + } + } + }; + z.defineProperty(V, { + Jg: "linkDataArray" + }, function() { + return this.vf + }, function(a) { + var b = this.vf; + if (b !== a) { + z.nt(a, V, "linkDataArray"); + this.hd.clear(); + for (var c = z.bb(a), d = 0; d < c; d++) { + var e = z.Ya(a, d); + if (!z.Za(e)) { + z.k("GraphLinksModel.linkDataArray must only contain Objects, not: " + e); + return + } + z.It(e) + } + this.vf = a; + if ("" !== this.oj) { + for (var g = new J(Object), d = 0; d < c; d++) { + var e = z.Ya(a, d), + h = this.lf(e); + void 0 === h ? g.add(e) : null !== this.hd.na(h) ? g.add(e) : this.hd.add(h, e) + } + for (d = g.i; d.next();) e = d.value, this.nA(e), g = this.lf(e), + void 0 !== g && this.hd.add(g, e) + } + g = new K(Object); + for (d = 0; d < c; d++) e = z.Ya(a, d), g.add(e); + this.sm = g; + wg(this, "linkDataArray", Sf, "linkDataArray", this, b, a); + for (d = 0; d < c; d++) e = z.Ya(a, d), Ug(this, e) + } + }); + z.defineProperty(V, { + oj: "linkKeyProperty" + }, function() { + return this.dl + }, function(a) { + var b = this.dl; + if (b !== a) { + xg(a, V, "linkKeyProperty"); + this.dl = a; + this.hd.clear(); + for (var c = z.bb(this.Jg), d = 0; d < c; d++) { + var e = z.Ya(this.Jg, d), + g = this.lf(e); + void 0 !== g && this.hd.add(g, e) + } + this.j("linkKeyProperty", b, a) + } + }); + V.prototype.getKeyForLinkData = V.prototype.lf = function(a) { + if (null !== a) { + var b = this.dl; + if ("" !== b && (b = z.tb(a, b), void 0 !== b)) { + if (yg(b)) return b; + z.k("Key value for link data " + a + " is not a number or a string: " + b) + } + } + }; + V.prototype.setKeyForLinkData = V.prototype.JF = function(a, b) { + void 0 !== b && null !== b && yg(b) || z.ic(b, "number or string", V, "setKeyForLinkData:key"); + if (null !== a) { + var c = this.dl; + if ("" !== c) + if (this.sh(a)) { + var d = z.tb(a, c); + d !== b && null === this.zt(b) && (z.Ra(a, c, b), this.hd.remove(d), this.hd.add(b, a), wg(this, "linkKey", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(V, { + PK: "makeUniqueLinkKeyFunction" + }, function() { + return this.Bo + }, function(a) { + var b = this.Bo; + b !== a && (null !== a && z.g(a, "function", V, "makeUniqueLinkKeyFunction"), this.Bo = a, this.j("makeUniqueLinkKeyFunction", b, a)) + }); + V.prototype.findLinkDataForKey = V.prototype.zt = function(a) { + null === a && z.k("GraphLinksModel.findLinkDataForKey:key must not be null"); + return void 0 !== a && yg(a) ? this.hd.na(a) : null + }; + V.prototype.makeLinkDataKeyUnique = V.prototype.nA = function(a) { + if (null !== a) { + var b = this.dl; + if ("" !== b) { + var c = this.lf(a); + if (void 0 === c || this.hd.contains(c)) { + var d = this.Bo; + if (null !== d && (c = d(this, a), void 0 !== c && null !== c && !this.hd.contains(c))) { + z.Ra(a, b, c); + return + } + if ("string" === typeof c) { + for (d = 2; this.hd.contains(c + d);) d++; + z.Ra(a, b, c + d) + } else if (void 0 === c || "number" === typeof c) { + for (d = -this.hd.count - 1; this.hd.contains(d);) d--; + z.Ra(a, b, d) + } else z.k("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: " + + c) + } + } + } + }; + V.prototype.containsLinkData = V.prototype.sh = function(a) { + return null === a ? !1 : this.sm.contains(a) + }; + V.prototype.addLinkData = V.prototype.gt = function(a) { + if (null !== a) { + if (void 0 === z.nd(a)) z.kc(a); + else if (this.sh(a)) return; + Vg(this, a, !0) + } + }; + + function Vg(a, b, c) { + if ("" !== a.oj) { + var d = a.lf(b); + if (void 0 !== d && a.hd.na(d) === b) return; + a.nA(b); + d = a.lf(b); + if (void 0 === d) { + z.k("GraphLinksModel.makeLinkDataKeyUnique failed on " + b + ". Data not added to model."); + return + } + a.hd.add(d, b) + } + a.sm.add(b); + if (c) { + var e = z.bb(a.vf); + z.aj(a.vf, e, b) + } + wg(a, "linkDataArray", Uf, "linkDataArray", a, null, b, null, e); + Ug(a, b) + } + V.prototype.addLinkDataCollection = function(a) { + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) this.gt(z.Ya(a, c)); + else + for (a = a.i; a.next();) this.gt(a.value) + }; + V.prototype.removeLinkData = V.prototype.Dx = function(a) { + null !== a && Wg(this, a, !0) + }; + + function Wg(a, b, c) { + a.sm.remove(b); + var d = a.lf(b); + void 0 !== d && a.hd.remove(d); + if (c) { + var e = a.vf.indexOf(b); + if (0 > e) return; + z.hi(a.vf, e) + } + wg(a, "linkDataArray", Vf, "linkDataArray", a, b, null, e, null); + c = a.Ll(b); + Dg(a, c, b); + c = a.Ml(b); + Dg(a, c, b); + d = a.qk(b); + if (z.isArray(d)) + for (var e = z.bb(d), g = 0; g < e; g++) c = z.Ya(d, g), Dg(a, c, b) + } + V.prototype.removeLinkDataCollection = function(a) { + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) this.Dx(z.Ya(a, c)); + else + for (a = a.i; a.next();) this.Dx(a.value) + }; + + function Ug(a, b) { + var c = a.Ll(b), + c = a.pn(c); + null === a.ne(c) && Cg(a, c, b); + c = a.Ml(b); + c = a.pn(c); + null === a.ne(c) && Cg(a, c, b); + var d = a.qk(b); + if (z.isArray(d)) + for (var e = z.bb(d), g = 0; g < e; g++) c = z.Ya(d, g), null === a.ne(c) && Cg(a, c, b) + } + z.defineProperty(V, { + eK: "copyLinkDataFunction" + }, function() { + return this.Qn + }, function(a) { + var b = this.Qn; + b !== a && (null !== a && z.g(a, "function", V, "copyLinkDataFunction"), this.Qn = a, this.j("copyLinkDataFunction", b, a)) + }); + V.prototype.copyLinkData = V.prototype.Pw = function(a) { + if (null === a) return null; + var b = null, + b = this.Qn, + b = null !== b ? b(a, this) : Eg(this, a, !0); + z.Za(b) && (z.kc(b), "" !== this.Th && z.Ra(b, this.Th, void 0), "" !== this.Uh && z.Ra(b, this.Uh, void 0), "" !== this.ug && z.Ra(b, this.ug, [])); + return b + }; + z.defineProperty(V, { + eu: "nodeIsGroupProperty" + }, function() { + return this.Eo + }, function(a) { + var b = this.Eo; + b !== a && (xg(a, V, "nodeIsGroupProperty"), this.Eo = a, this.j("nodeIsGroupProperty", b, a)) + }); + V.prototype.isGroupForNodeData = V.prototype.hA = function(a) { + if (null === a) return !1; + var b = this.Eo; + return "" === b ? !1 : z.tb(a, b) ? !0 : !1 + }; + z.defineProperty(V, { + Pp: "nodeGroupKeyProperty" + }, function() { + return this.jh + }, function(a) { + var b = this.jh; + b !== a && (xg(a, V, "nodeGroupKeyProperty"), this.jh = a, this.j("nodeGroupKeyProperty", b, a)) + }); + z.defineProperty(V, { + Zm: "copiesGroupKeyOfNodeData" + }, function() { + return this.Dq + }, function(a) { + this.Dq !== a && (z.g(a, "boolean", V, "copiesGroupKeyOfNodeData"), this.Dq = a) + }); + V.prototype.getGroupKeyForNodeData = V.prototype.fn = function(a) { + if (null !== a) { + var b = this.jh; + if ("" !== b && (b = z.tb(a, b), void 0 !== b)) { + if (yg(b)) return b; + z.k("GroupKey value for node data " + a + " is not a number or a string: " + b) + } + } + }; + V.prototype.setGroupKeyForNodeData = V.prototype.Lx = function(a, b) { + null === b && (b = void 0); + void 0 === b || yg(b) || z.ic(b, "number or string", V, "setGroupKeyForNodeData:key"); + if (null !== a) { + var c = this.jh; + if ("" !== c) + if (this.le(a)) { + var d = z.tb(a, c); + d !== b && (Dg(this, d, a), z.Ra(a, c, b), null === this.ne(b) && Cg(this, b, a), wg(this, "nodeGroupKey", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + V.prototype.copyNodeData = function(a) { + if (null === a) return null; + a = M.prototype.copyNodeData.call(this, a); + this.Zm || "" === this.jh || void 0 === z.tb(a, this.jh) || z.Ra(a, this.jh, void 0); + return a + }; + V.prototype.setDataProperty = function(a, b, c) { + u && (z.g(a, "object", V, "setDataProperty:data"), z.g(b, "string", V, "setDataProperty:propname"), "" === b && z.k("GraphLinksModel.setDataProperty: property name must not be an empty string when setting " + a + " to " + c)); + if (this.le(a)) + if (b === this.qj) this.Mx(a, c); + else { + if (b === this.qn) { + this.Jx(a, c); + return + } + if (b === this.Pp) { + this.Lx(a, c); + return + } + b === this.eu && z.k("GraphLinksModel.setDataProperty: property name must not be the nodeIsGroupProperty: " + b) + } + else if (this.sh(a)) { + if (b === + this.Ep) { + this.Kx(a, c); + return + } + if (b === this.Gp) { + this.Ox(a, c); + return + } + if (b === this.Xt) { + this.PA(a, c); + return + } + if (b === this.Zt) { + this.SA(a, c); + return + } + if (b === this.oj) { + this.JF(a, c); + return + } + if (b === this.Wt) { + this.IF(a, c); + return + } + if (b === this.Yt) { + this.KF(a, c); + return + } + } else !Hg && a instanceof O && (Hg = !0, z.trace('GraphLinksModel.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), z.trace(" Is that really your intent?")); + var d = z.tb(a, b); + d !== c && (z.Ra(a, b, c), this.DA(a, b, d, c)) + }; + f = V.prototype; + f.ju = function(a, b) { + M.prototype.ju.call(this, a, b); + for (var c = this.vc.i; c.next();) this.KA(c.value, a, b); + for (c = this.sm.i; c.next();) { + var d = c.value, + e = a, + g = b; + if (this.Ll(d) === e) { + var h = this.Th; + z.Ra(d, h, g); + wg(this, "linkFromKey", Sf, h, d, e, g); + "string" === typeof h && this.Mb(d, h) + } + this.Ml(d) === e && (h = this.Uh, z.Ra(d, h, g), wg(this, "linkToKey", Sf, h, d, e, g), "string" === typeof h && this.Mb(d, h)); + var k = this.qk(d); + if (z.isArray(k)) + for (var l = z.bb(k), h = this.ug, m = 0; m < l; m++) z.Ya(k, m) === e && (z.LD(k, m, g), wg(this, "linkLabelKeys", Uf, h, d, e, + g)) + } + }; + f.KA = function(a, b, c) { + if (this.fn(a) === b) { + var d = this.jh; + z.Ra(a, d, c); + wg(this, "nodeGroupKey", Sf, d, a, b, c); + "string" === typeof d && this.Mb(a, d) + } + }; + f.cB = function() { + M.prototype.cB.call(this); + for (var a = this.Jg, b = z.bb(a), c = 0; c < b; c++) { + var d = z.Ya(a, c); + Ug(this, d) + } + }; + f.Up = function(a) { + M.prototype.Up.call(this, a); + a = this.pb(a); + var b = Bg(this, a); + if (null !== b) { + for (var c = new J(Object), b = b.i; b.next();) { + var d = b.value; + if (this.le(d)) { + if (this.fn(d) === a) { + var e = this.jh; + wg(this, "nodeGroupKey", Sf, e, d, a, a); + "string" === typeof e && this.Mb(d, e); + c.add(d) + } + } else { + this.Ll(d) === a && (e = this.Th, wg(this, "linkFromKey", Sf, e, d, a, a), "string" === typeof e && this.Mb(d, e), c.add(d)); + this.Ml(d) === a && (e = this.Uh, wg(this, "linkToKey", Sf, e, d, a, a), "string" === typeof e && this.Mb(d, e), c.add(d)); + var g = this.qk(d); + if (z.isArray(g)) + for (var h = + z.bb(g), e = this.ug, k = 0; k < h; k++) z.Ya(g, k) === a && (wg(this, "linkLabelKeys", Uf, e, d, a, a), c.add(d)) + } + } + for (c = c.i; c.next();) Dg(this, a, c.value) + } + }; + f.Tp = function(a) { + M.prototype.Tp.call(this, a); + var b = this.fn(a); + null === this.ne(b) && Cg(this, b, a) + }; + f.Bu = function(a) { + M.prototype.Bu.call(this, a); + var b = this.fn(a); + Dg(this, b, a) + }; + z.defineProperty(V, { + Wt: "linkCategoryProperty" + }, function() { + return this.rm + }, function(a) { + var b = this.rm; + b !== a && (xg(a, V, "linkCategoryProperty"), this.rm = a, this.j("linkCategoryProperty", b, a)) + }); + V.prototype.getCategoryForLinkData = V.prototype.ax = function(a) { + if (null === a) return ""; + var b = this.rm; + if ("" === b) return ""; + b = z.tb(a, b); + if (void 0 === b) return ""; + if ("string" === typeof b) return b; + z.k("getCategoryForLinkData found a non-string category for " + a + ": " + b); + return "" + }; + V.prototype.setCategoryForLinkData = V.prototype.IF = function(a, b) { + z.g(b, "string", V, "setCategoryForLinkData:cat"); + if (null !== a) { + var c = this.rm; + if ("" !== c) + if (this.sh(a)) { + var d = z.tb(a, c); + void 0 === d && (d = ""); + d !== b && (z.Ra(a, c, b), wg(this, "linkCategory", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + + function ng(a) { + 1 < arguments.length && z.k("TreeModel constructor can only take one optional argument, the Array of node data."); + M.call(this); + this.kh = "parent"; + this.Eq = !1; + this.Am = "parentLinkCategory"; + void 0 !== a && (this.gg = a) + } + z.Qa(ng, M); + z.ia("TreeModel", ng); + ng.prototype.cloneProtected = function(a) { + M.prototype.cloneProtected.call(this, a); + a.kh = this.kh; + a.Eq = this.Eq; + a.Am = this.Am + }; + ng.prototype.toString = function(a) { + void 0 === a && (a = 0); + if (2 <= a) return this.ZA(); + var b = ("" !== this.name ? this.name : "") + " TreeModel"; + if (0 < a) { + b += "\n node data:"; + a = this.gg; + for (var c = z.bb(a), d = 0; d < c; d++) var e = z.Ya(a, d), + b = b + (" " + this.pb(e) + ":" + ka(e)) + } + return b + }; + ng.prototype.Cn = function() { + var a = M.prototype.Cn.call(this), + b = ""; + "parent" !== this.Qp && "string" === typeof this.Qp && (b += ',\n "nodeParentKeyProperty": ' + this.quote(this.Qp)); + return a + b + }; + ng.prototype.hu = function(a) { + M.prototype.hu.call(this, a); + a.nodeParentKeyProperty && (this.Qp = a.nodeParentKeyProperty) + }; + ng.prototype.pn = function(a) { + return a + }; + z.defineProperty(ng, { + Qp: "nodeParentKeyProperty" + }, function() { + return this.kh + }, function(a) { + var b = this.kh; + b !== a && (xg(a, ng, "nodeParentKeyProperty"), this.kh = a, this.j("nodeParentKeyProperty", b, a)) + }); + z.defineProperty(ng, { + $m: "copiesParentKeyOfNodeData" + }, function() { + return this.Eq + }, function(a) { + this.Eq !== a && (z.g(a, "boolean", ng, "copiesParentKeyOfNodeData"), this.Eq = a) + }); + ng.prototype.getParentKeyForNodeData = ng.prototype.gn = function(a) { + if (null !== a) { + var b = this.kh; + if ("" !== b && (b = z.tb(a, b), void 0 !== b)) { + if (yg(b)) return b; + z.k("ParentKey value for node data " + a + " is not a number or a string: " + b) + } + } + }; + ng.prototype.setParentKeyForNodeData = ng.prototype.Eh = function(a, b) { + null === b && (b = void 0); + void 0 === b || yg(b) || z.ic(b, "number or string", ng, "setParentKeyForNodeData:key"); + if (null !== a) { + var c = this.kh; + if ("" !== c) + if (b = this.pn(b), this.le(a)) { + var d = z.tb(a, c); + d !== b && (Dg(this, d, a), z.Ra(a, c, b), null === this.ne(b) && Cg(this, b, a), wg(this, "nodeParentKey", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + z.defineProperty(ng, { + kL: "parentLinkCategoryProperty" + }, function() { + return this.Am + }, function(a) { + var b = this.Am; + b !== a && (xg(a, ng, "parentLinkCategoryProperty"), this.Am = a, this.j("parentLinkCategoryProperty", b, a)) + }); + ng.prototype.getParentLinkCategoryForNodeData = ng.prototype.OH = function(a) { + if (null === a) return ""; + var b = this.Am; + if ("" === b) return ""; + b = z.tb(a, b); + if (void 0 === b) return ""; + if ("string" === typeof b) return b; + z.k("getParentLinkCategoryForNodeData found a non-string category for " + a + ": " + b); + return "" + }; + ng.prototype.setParentLinkCategoryForNodeData = ng.prototype.jJ = function(a, b) { + z.g(b, "string", ng, "setParentLinkCategoryForNodeData:cat"); + if (null !== a) { + var c = this.Am; + if ("" !== c) + if (this.le(a)) { + var d = z.tb(a, c); + void 0 === d && (d = ""); + d !== b && (z.Ra(a, c, b), wg(this, "parentLinkCategory", Sf, c, a, d, b), "string" === typeof c && this.Mb(a, c)) + } else z.Ra(a, c, b) + } + }; + ng.prototype.copyNodeData = function(a) { + if (null === a) return null; + a = M.prototype.copyNodeData.call(this, a); + this.$m || "" === this.kh || void 0 === z.tb(a, this.kh) || z.Ra(a, this.kh, void 0); + return a + }; + ng.prototype.setDataProperty = function(a, b, c) { + u && (z.g(a, "object", ng, "setDataProperty:data"), z.g(b, "string", ng, "setDataProperty:propname"), "" === b && z.k("TreeModel.setDataProperty: property name must not be an empty string when setting " + a + " to " + c)); + if (this.le(a)) + if (b === this.qj) this.Mx(a, c); + else { + if (b === this.qn) { + this.Jx(a, c); + return + } + if (b === this.Qp) { + this.Eh(a, c); + return + } + } + else !Hg && a instanceof O && (Hg = !0, z.trace('TreeModel.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), z.trace(" Is that really your intent?")); + var d = z.tb(a, b); + d !== c && (z.Ra(a, b, c), this.DA(a, b, d, c)) + }; + f = ng.prototype; + f.ju = function(a, b) { + M.prototype.ju.call(this, a, b); + for (var c = this.vc.i; c.next();) this.KA(c.value, a, b) + }; + f.KA = function(a, b, c) { + if (this.gn(a) === b) { + var d = this.kh; + z.Ra(a, d, c); + wg(this, "nodeParentKey", Sf, d, a, b, c); + "string" === typeof d && this.Mb(a, d) + } + }; + f.Up = function(a) { + M.prototype.Up.call(this, a); + a = this.pb(a); + var b = Bg(this, a); + if (null !== b) { + for (var c = new J(Object), b = b.i; b.next();) { + var d = b.value; + if (this.le(d) && this.gn(d) === a) { + var e = this.kh; + wg(this, "nodeParentKey", Sf, e, d, a, a); + "string" === typeof e && this.Mb(d, e); + c.add(d) + } + } + for (c = c.i; c.next();) Dg(this, a, c.value) + } + }; + f.Tp = function(a) { + M.prototype.Tp.call(this, a); + var b = this.gn(a), + b = this.pn(b); + null === this.ne(b) && Cg(this, b, a) + }; + f.Bu = function(a) { + M.prototype.Bu.call(this, a); + var b = this.gn(a); + Dg(this, b, a) + }; + + function Xg(a, b, c) { + z.kc(this); + this.G = !1; + void 0 === a ? a = "" : z.g(a, "string", Xg, "constructor:targetprop"); + void 0 === b ? b = a : z.g(b, "string", Xg, "constructor:sourceprop"); + void 0 === c ? c = null : null !== c && z.g(c, "function", Xg, "constructor:conv"); + this.fD = -1; + this.Ag = null; + this.Xo = a; + this.Wo = this.Ts = 0; + this.pw = null; + this.qr = !1; + this.No = b; + this.Bq = c; + this.Nr = Yg; + this.uq = null + } + z.ia("Binding", Xg); + Xg.prototype.copy = function() { + var a = new Xg; + a.Xo = this.Xo; + a.Ts = this.Ts; + a.Wo = this.Wo; + a.pw = this.pw; + a.qr = this.qr; + a.No = this.No; + a.Bq = this.Bq; + a.Nr = this.Nr; + a.uq = this.uq; + return a + }; + var Yg; + Xg.OneWay = Yg = z.s(Xg, "OneWay", 1); + var Zg; + Xg.TwoWay = Zg = z.s(Xg, "TwoWay", 2); + Xg.parseEnum = function(a, b) { + z.g(a, "function", Xg, "parseEnum:ctor"); + z.Ba(b, a, Xg, "parseEnum:defval"); + return function(c) { + c = Ja(a, c); + return null === c ? b : c + } + }; + var ka; + Xg.toString = ka = function(a) { + var b = a; + z.Za(a) && (a.text ? b = a.text : a.name ? b = a.name : void 0 !== a.key ? b = a.key : void 0 !== a.id ? b = a.id : a.constructor === Object && (a.Text ? b = a.Text : a.Name ? b = a.Name : void 0 !== a.Key ? b = a.Key : void 0 !== a.Id ? b = a.Id : void 0 !== a.ID && (b = a.ID))); + return void 0 === b ? "undefined" : null === b ? "null" : b.toString() + }; + Xg.prototype.toString = function() { + return "Binding(" + this.yu + ":" + this.OF + (-1 !== this.Wl ? " " + this.Wl : "") + " " + this.mode.name + ")" + }; + Xg.prototype.freeze = function() { + this.G = !0; + return this + }; + Xg.prototype.Wa = function() { + this.G = !1; + return this + }; + z.defineProperty(Xg, { + Wl: null + }, function() { + return this.fD + }, function(a) { + this.G && z.oa(this); + z.g(a, "number", Xg, "targetId"); + this.fD = a + }); + z.defineProperty(Xg, { + yu: "targetProperty" + }, function() { + return this.Xo + }, function(a) { + this.G && z.oa(this); + z.g(a, "string", Xg, "targetProperty"); + this.Xo = a + }); + z.defineProperty(Xg, { + yn: "sourceName" + }, function() { + return this.pw + }, function(a) { + this.G && z.oa(this); + null !== a && z.g(a, "string", Xg, "sourceName"); + this.pw = a; + null !== a && (this.qr = !1) + }); + z.defineProperty(Xg, { + St: "isToModel" + }, function() { + return this.qr + }, function(a) { + this.G && z.oa(this); + z.g(a, "boolean", Xg, "isToModel"); + this.qr = a + }); + z.defineProperty(Xg, { + OF: "sourceProperty" + }, function() { + return this.No + }, function(a) { + this.G && z.oa(this); + z.g(a, "string", Xg, "sourceProperty"); + this.No = a + }); + z.defineProperty(Xg, { + hH: "converter" + }, function() { + return this.Bq + }, function(a) { + this.G && z.oa(this); + null !== a && z.g(a, "function", Xg, "converter"); + this.Bq = a + }); + z.defineProperty(Xg, { + XG: "backConverter" + }, function() { + return this.uq + }, function(a) { + this.G && z.oa(this); + null !== a && z.g(a, "function", Xg, "backConverter"); + this.uq = a + }); + z.defineProperty(Xg, { + mode: "mode" + }, function() { + return this.Nr + }, function(a) { + this.G && z.oa(this); + z.Ba(a, Xg, Xg, "mode"); + this.Nr = a + }); + Xg.prototype.makeTwoWay = Xg.prototype.yI = function(a) { + void 0 === a && (a = null); + null !== a && z.g(a, "function", Xg, "makeTwoWay"); + this.mode = Zg; + this.XG = a; + return this + }; + Xg.prototype.ofObject = Xg.prototype.ux = function(a) { + void 0 === a && (a = ""); + u && z.g(a, "string", Xg, "ofObject:srcname"); + this.yn = a; + this.St = !1; + return this + }; + Xg.prototype.ofModel = function() { + this.yn = null; + this.St = !0; + return this + }; + Xg.prototype.ofData = function() { + this.yn = null; + this.St = !1; + return this + }; + + function $g(a, b, c) { + a = a.yn; + var d = null; + return d = null === a || "" === a ? b : "." === a ? c : ".." === a ? c.U : b.oe(a) + } + Xg.prototype.updateTarget = Xg.prototype.fG = function(a, b, c) { + var d = this.No; + if (void 0 === c || "" === d || d === c) { + c = this.Xo; + var e = this.Bq; + if (null === e && "" === c) z.trace("Binding error: target property is the empty string: " + this.toString()); + else { + u && "string" === typeof c && ("function" !== typeof a.setAttribute && 0 < c.length && "_" !== c[0] && !z.ex(a, c) ? z.trace("Binding error: undefined target property: " + c + " on " + a.toString()) : "name" === c && a instanceof O && z.trace("Binding error: cannot modify GraphObject.name on " + a.toString())); + var g = b; + "" !== d && (g = z.tb(b, d)); + if (void 0 !== g) + if (null === e) "" !== c && z.Ra(a, c, g); + else try { + if ("" !== c) { + var h = e(g, a); + u && void 0 === h && z.trace('Binding warning: conversion function returned undefined when setting target property "' + c + '" on ' + a.toString() + ", function is: " + e); + z.Ra(a, c, h) + } else e(g, a) + } catch (k) { + u && z.trace("Binding error: " + k.toString() + ' setting target property "' + c + '" on ' + a.toString() + " with conversion function: " + e) + } + } + } + }; + Xg.prototype.updateSource = Xg.prototype.Rx = function(a, b, c, d) { + void 0 === d && (d = null); + if (this.Nr === Zg) { + var e = this.Xo; + if (void 0 === c || e === c) { + c = this.No; + var g = this.uq; + if (null !== g || "" !== c) { + var h = a; + "" !== e && (h = z.tb(a, e)); + if (void 0 !== h) + if (a = null !== d ? d.ha : null, null === g) null !== a ? (u && a.qj === c && a.le(b) && z.trace("Binding error: cannot have TwoWay Binding on node data key property: " + this.toString()), a.setDataProperty(b, c, h)) : z.Ra(b, c, h); + else try { + if ("" !== c) { + var k = g(h, b, a); + null !== a ? (u && (a.qj === c && a.le(b) && z.trace("Binding error: cannot have TwoWay Binding on node data key property: " + + this.toString()), void 0 === k && z.trace('Binding warning: conversion function returned undefined when setting source property "' + c + '" on ' + b.toString() + ", function is: " + g)), a.setDataProperty(b, c, k)) : z.Ra(b, c, k) + } else g(h, b, a) + } catch (l) { + u && z.trace("Binding error: " + l.toString() + ' setting source property "' + c + '" on ' + b.toString() + " with conversion function: " + g) + } + } + } + } + }; + + function og() { + this.mG = (new J(Rf)).freeze(); + this.Ub = ""; + this.mC = !1 + } + z.ia("Transaction", og); + og.prototype.toString = function(a) { + var b = "Transaction: " + this.name + " " + this.Yf.count.toString() + (this.Nt ? "" : ", incomplete"); + if (void 0 !== a && 0 < a) { + a = this.Yf.count; + for (var c = 0; c < a; c++) { + var d = this.Yf.ea(c); + null !== d && (b += "\n " + d.toString()) + } + } + return b + }; + og.prototype.clear = og.prototype.clear = function() { + var a = this.Yf; + a.Wa(); + for (var b = a.count - 1; 0 <= b; b--) { + var c = a.ea(b); + null !== c && c.clear() + } + a.clear(); + a.freeze() + }; + og.prototype.canUndo = og.prototype.canUndo = function() { + return this.Nt + }; + og.prototype.undo = og.prototype.undo = function() { + if (this.canUndo()) + for (var a = this.Yf.count - 1; 0 <= a; a--) { + var b = this.Yf.ea(a); + null !== b && b.undo() + } + }; + og.prototype.canRedo = og.prototype.canRedo = function() { + return this.Nt + }; + og.prototype.redo = og.prototype.redo = function() { + if (this.canRedo()) + for (var a = this.Yf.count, b = 0; b < a; b++) { + var c = this.Yf.ea(b); + null !== c && c.redo() + } + }; + z.w(og, { + Yf: "changes" + }, function() { + return this.mG + }); + z.defineProperty(og, { + name: "name" + }, function() { + return this.Ub + }, function(a) { + this.Ub = a + }); + z.defineProperty(og, { + Nt: "isComplete" + }, function() { + return this.mC + }, function(a) { + this.mC = a + }); + + function Wf() { + this.bz = new K(M); + this.af = !1; + this.qG = (new J(og)).freeze(); + this.bh = -1; + this.BC = 999; + this.Hi = !1; + this.ev = null; + this.pl = 0; + this.oy = !1; + u && (this.oy = !0); + this.ih = (new J("string")).freeze(); + this.Do = new J("number"); + this.Ky = !0; + this.Wy = !1 + } + z.ia("UndoManager", Wf); + Wf.prototype.toString = function(a) { + for (var b = "UndoManager " + this.ij + "<" + this.history.count + "<=" + this.$E, b = b + "[", c = this.eF.count, d = 0; d < c; d++) 0 < d && (b += " "), b += this.eF.ea(d); + b += "]"; + if (void 0 !== a && 0 < a) + for (c = this.history.count, d = 0; d < c; d++) b += "\n " + this.history.ea(d).toString(a - 1); + return b + }; + Wf.prototype.clear = Wf.prototype.clear = function() { + var a = this.history; + a.Wa(); + for (var b = a.count - 1; 0 <= b; b--) { + var c = a.ea(b); + null !== c && c.clear() + } + a.clear(); + this.bh = -1; + a.freeze(); + this.Hi = !1; + this.ev = null; + this.pl = 0; + this.ih.Wa(); + this.ih.clear(); + this.ih.freeze(); + this.Do.clear() + }; + Wf.prototype.addModel = Wf.prototype.PG = function(a) { + this.bz.add(a) + }; + Wf.prototype.removeModel = Wf.prototype.YI = function(a) { + this.bz.remove(a) + }; + Wf.prototype.startTransaction = Wf.prototype.Wb = function(a) { + void 0 === a && (a = ""); + null === a && (a = ""); + if (this.qb) return !1; + !0 === this.Ky && (this.Ky = !1, this.pl++, this.kd("StartingFirstTransaction", a, this.dj), 0 < this.pl && this.pl--); + this.isEnabled && (this.ih.Wa(), this.ih.add(a), this.ih.freeze(), null === this.dj ? this.Do.add(0) : this.Do.add(this.dj.Yf.count)); + this.pl++; + var b = 1 === this.Gh; + b && this.kd("StartedTransaction", a, this.dj); + return b + }; + Wf.prototype.commitTransaction = Wf.prototype.Jd = function(a) { + void 0 === a && (a = ""); + return ah(this, !0, a) + }; + Wf.prototype.rollbackTransaction = Wf.prototype.Vp = function() { + return ah(this, !1, "") + }; + + function ah(a, b, c) { + if (a.qb) return !1; + a.Ez && 1 > a.Gh && z.trace("Ending transaction without having started a transaction: " + c); + var d = 1 === a.Gh; + d && b && a.isEnabled && a.kd("CommittingTransaction", c, a.dj); + var e = 0; + if (0 < a.Gh && (a.pl--, a.isEnabled)) { + var g = a.ih.count; + 0 < g && ("" === c && (c = a.ih.ea(0)), a.ih.Wa(), a.ih.dd(g - 1), a.ih.freeze()); + g = a.Do.count; + 0 < g && (e = a.Do.ea(g - 1), a.Do.dd(g - 1)) + } + g = a.dj; + if (d) { + if (b) { + a.Wy = !1; + if (a.isEnabled && null !== g) { + b = g; + b.Nt = !0; + b.name = c; + d = a.history; + d.Wa(); + for (e = d.count - 1; e > a.ij; e--) g = d.ea(e), null !== + g && g.clear(), d.dd(e), a.Wy = !0; + e = a.$E; + 0 === e && (e = 1); + 0 < e && d.count >= e && (g = d.ea(0), null !== g && g.clear(), d.dd(0), a.bh--); + d.add(b); + a.bh++; + d.freeze(); + g = b + } + a.kd("CommittedTransaction", c, g) + } else { + a.Hi = !0; + try { + a.isEnabled && null !== g && (g.Nt = !0, g.undo()) + } finally { + a.kd("RolledBackTransaction", c, g), a.Hi = !1 + } + null !== g && g.clear() + } + a.ev = null; + return !0 + } + if (a.isEnabled && !b && null !== g) { + a = e; + c = g.Yf; + for (b = c.count - 1; b >= a; b--) d = c.ea(b), null !== d && d.undo(), c.Wa(), c.dd(b); + c.freeze() + } + return !1 + } + Wf.prototype.canUndo = Wf.prototype.canUndo = function() { + if (!this.isEnabled || 0 < this.Gh || this.qb) return !1; + var a = this.aG; + return null !== a && a.canUndo() ? !0 : !1 + }; + Wf.prototype.undo = Wf.prototype.undo = function() { + if (this.canUndo()) { + var a = this.aG; + try { + this.kd("StartingUndo", "Undo", a), this.Hi = !0, this.bh--, a.undo() + } catch (b) { + z.trace("undo error: " + b.toString()) + } finally { + this.Hi = !1, this.kd("FinishedUndo", "Undo", a) + } + } + }; + Wf.prototype.canRedo = Wf.prototype.canRedo = function() { + if (!this.isEnabled || 0 < this.Gh || this.qb) return !1; + var a = this.$F; + return null !== a && a.canRedo() ? !0 : !1 + }; + Wf.prototype.redo = Wf.prototype.redo = function() { + if (this.canRedo()) { + var a = this.$F; + try { + this.kd("StartingRedo", "Redo", a), this.Hi = !0, this.bh++, a.redo() + } catch (b) { + z.trace("redo error: " + b.toString()) + } finally { + this.Hi = !1, this.kd("FinishedRedo", "Redo", a) + } + } + }; + Wf.prototype.kd = function(a, b, c) { + void 0 === c && (c = null); + var d = new Rf; + d.Dc = Tf; + d.propertyName = a; + d.object = c; + d.oldValue = b; + for (a = this.HI; a.next();) b = a.value, d.ha = b, b.Kw(d) + }; + Wf.prototype.handleChanged = Wf.prototype.DE = function(a) { + if (this.isEnabled && !this.qb && !this.skipsEvent(a)) { + var b = this.dj; + null === b && (this.ev = b = new og); + var c = a.copy(), + b = b.Yf; + b.Wa(); + b.add(c); + b.freeze(); + this.Ez && 0 >= this.Gh && !this.Ky && (a = a.h, null !== a && !1 === a.kn || z.trace("Change not within a transaction: " + c.toString())) + } + }; + Wf.prototype.skipsEvent = function(a) { + if (null === a || 0 > a.Dc.value) return !0; + a = a.object; + if (a instanceof O) { + if (a = a.layer, null !== a && a.Nc) return !0 + } else if (a instanceof tg && a.Nc) return !0; + return !1 + }; + z.w(Wf, { + HI: "models" + }, function() { + return this.bz.i + }); + z.defineProperty(Wf, { + isEnabled: "isEnabled" + }, function() { + return this.af + }, function(a) { + this.af = a + }); + z.w(Wf, { + aG: "transactionToUndo" + }, function() { + return 0 <= this.ij && this.ij <= this.history.count - 1 ? this.history.ea(this.ij) : null + }); + z.w(Wf, { + $F: "transactionToRedo" + }, function() { + return this.ij < this.history.count - 1 ? this.history.ea(this.ij + 1) : null + }); + z.w(Wf, { + qb: "isUndoingRedoing" + }, function() { + return this.Hi + }); + z.w(Wf, { + history: "history" + }, function() { + return this.qG + }); + z.defineProperty(Wf, { + $E: "maxHistoryLength" + }, function() { + return this.BC + }, function(a) { + this.BC = a + }); + z.w(Wf, { + ij: "historyIndex" + }, function() { + return this.bh + }); + z.w(Wf, { + dj: "currentTransaction" + }, function() { + return this.ev + }); + z.w(Wf, { + Gh: "transactionLevel" + }, function() { + return this.pl + }); + z.w(Wf, { + QE: "isInTransaction" + }, function() { + return 0 < this.pl + }); + z.defineProperty(Wf, { + Ez: "checksTransactionLevel" + }, function() { + return this.oy + }, function(a) { + this.oy = a + }); + z.w(Wf, { + eF: "nestedTransactionNames" + }, function() { + return this.ih + }); + + function ra() { + 0 < arguments.length && z.od(ra); + z.kc(this); + this.Z = null; + this.zB = !1; + this.TB = this.AB = !0; + this.CB = this.DB = this.UB = this.EB = !1; + this.hl = this.iy = null; + this.yD = 1.05; + this.RB = 1; + this.Xy = NaN; + this.yC = null; + this.xz = NaN; + this.wz = Jd; + this.Ui = null + } + z.ia("CommandHandler", ra); + var bh = null, + ch = ""; + ra.prototype.toString = function() { + return "CommandHandler" + }; + z.w(ra, { + h: "diagram" + }, function() { + return this.Z + }); + ra.prototype.Sc = function(a) { + u && null !== a && z.l(a, C, ra, "setDiagram"); + this.Z = a + }; + ra.prototype.doKeyDown = function() { + var a = this.h; + if (null !== a) { + var b = a.Q, + c = z.rk ? b.$t : b.control, + d = b.shift, + e = b.alt, + g = b.key; + !c || "C" !== g && "Insert" !== g ? c && "X" === g || d && "Del" === g ? this.canCutSelection() && this.cutSelection() : c && "V" === g || d && "Insert" === g ? this.canPasteSelection() && this.pasteSelection() : c && "Y" === g || e && d && "Backspace" === g ? this.canRedo() && this.redo() : c && "Z" === g || e && "Backspace" === g ? this.canUndo() && this.undo() : "Del" === g || "Backspace" === g ? this.canDeleteSelection() && this.deleteSelection() : c && "A" === g ? this.canSelectAll() && + this.selectAll() : "Esc" === g ? this.canStopCommand() && this.stopCommand() : "Up" === g ? a.ye && (c ? a.scroll("pixel", "up") : a.scroll("line", "up")) : "Down" === g ? a.ye && (c ? a.scroll("pixel", "down") : a.scroll("line", "down")) : "Left" === g ? a.xe && (c ? a.scroll("pixel", "left") : a.scroll("line", "left")) : "Right" === g ? a.xe && (c ? a.scroll("pixel", "right") : a.scroll("line", "right")) : "PageUp" === g ? d && a.xe ? a.scroll("page", "left") : a.ye && a.scroll("page", "up") : "PageDown" === g ? d && a.xe ? a.scroll("page", "right") : a.ye && a.scroll("page", "down") : "Home" === + g ? c && a.ye ? a.scroll("document", "up") : !c && a.xe && a.scroll("document", "left") : "End" === g ? c && a.ye ? a.scroll("document", "down") : !c && a.xe && a.scroll("document", "right") : " " === g ? this.canScrollToPart() && this.scrollToPart() : "Subtract" === g ? this.canDecreaseZoom() && this.decreaseZoom() : "Add" === g ? this.canIncreaseZoom() && this.increaseZoom() : c && "0" === g ? this.canResetZoom() && this.resetZoom() : d && "Z" === g ? this.canZoomToFit() && this.zoomToFit() : c && !d && "G" === g ? this.canGroupSelection() && this.groupSelection() : c && d && "G" === g ? this.canUngroupSelection() && + this.ungroupSelection() : b.event && 113 === b.event.which ? this.canEditTextBlock() && this.editTextBlock() : b.event && 93 === b.event.which ? this.canShowContextMenu() && this.showContextMenu() : b.bubbles = !0 : this.canCopySelection() && this.copySelection() + } + }; + ra.prototype.doKeyUp = function() { + var a = this.h; + null !== a && (a.Q.bubbles = !0) + }; + ra.prototype.stopCommand = function() { + var a = this.h; + if (null !== a) { + var b = a.eb; + b instanceof dh && a.xf && a.Mw(); + null !== b && b.doCancel() + } + }; + ra.prototype.canStopCommand = function() { + return !0 + }; + ra.prototype.selectAll = function() { + var a = this.h; + if (null !== a) { + a.ta(); + try { + a.gc = "wait"; + a.Ja("ChangingSelection"); + for (var b = a.ni; b.next();) b.value.kb = !0; + for (var c = a.Lg; c.next();) c.value.kb = !0; + for (var d = a.links; d.next();) d.value.kb = !0 + } finally { + a.Ja("ChangedSelection"), a.gc = "" + } + } + }; + ra.prototype.canSelectAll = function() { + var a = this.h; + return null !== a && a.xf + }; + ra.prototype.deleteSelection = function() { + var a = this.h; + if (null !== a && !a.Ja("SelectionDeleting", a.selection)) try { + a.gc = "wait"; + a.Wb("Delete"); + a.Ja("ChangingSelection"); + for (var b = new K(D), c = a.selection.i; c.next();) eh(b, c.value, !0, this.qH ? Infinity : 0, this.hE, function(a) { + return a.canDelete() + }); + a.JA(b, !0); + a.Ja("SelectionDeleted", b) + } finally { + a.Ja("ChangedSelection"), a.Jd("Delete"), a.gc = "" + } + }; + ra.prototype.canDeleteSelection = function() { + var a = this.h; + return null === a || a.jb || a.Ef || !a.Sm || 0 === a.selection.count ? !1 : !0 + }; + + function eh(a, b, c, d, e, g) { + void 0 === g && (g = null); + if (!(a.contains(b) || null !== g && !g(b) || b instanceof da)) + if (a.add(b), b instanceof E) { + if (c && b instanceof F) + for (var h = b.Hc; h.next();) eh(a, h.value, c, d, e, g); + if (e) + for (h = b.ee; h.next();) { + var k = h.value; + if (!a.contains(k)) { + var l = k.Y, + m = k.da; + null !== l && a.contains(l) && null !== m && a.contains(m) ? eh(a, k, c, d, e, g) : null !== l && null !== m || eh(a, k, c, d, e, g) + } + } + if (1 < d) + for (b = b.tE(); b.next();) eh(a, b.value, c, d - 1, e, g) + } else if (b instanceof G) + for (h = b.Hf; h.next();) eh(a, h.value, c, d, e, g) + } + ra.prototype.hp = function(a, b, c) { + var d = new na(D, D); + for (a = a.i; a.next();) fh(this, a.value, b, d, c); + if (null !== b) { + c = b.ha; + a = !1; + null !== b.hb.me && (a = b.hb.me.fj); + for (var e = new K(G), g = new na(G, G), h = d.i; h.next();) { + var k = h.value; + if (k instanceof G) { + var l = k; + a || null !== l.Y && null !== l.da || e.add(l) + } else if (c instanceof ng && k instanceof E && null !== k.data) { + var l = c, + m = k, + k = h.key, + n = k.Hl(); + null !== n && (n = d.na(n), null !== n ? (l.Eh(m.data, l.pb(n.data)), l = b.Zf(m.data), k = k.pp(), null !== k && null !== l && g.add(k, l)) : l.Eh(m.data, void 0)) + } + } + 0 < e.count && + b.JA(e, !1); + if (0 < g.count) + for (c = g.i; c.next();) d.add(c.key, c.value) + } + if (null !== b && (b = b.ha, c = b.RG, null !== c)) { + var p = new na; + d.each(function(a) { + null !== a.key.data && p.add(a.key.data, a.value.data) + }); + c(p, b, this.h.ha) + } + for (b = d.i; b.next();) b.value.Mb(); + return d + }; + + function fh(a, b, c, d, e) { + if (null === b || e && !b.canCopy()) return null; + if (d.contains(b)) return d.na(b); + var g = null, + h = b.data; + if (null !== h && null !== c) { + var k = c.ha; + b instanceof G ? k instanceof V && (h = k.Pw(h), z.Za(h) && (k.gt(h), g = c.Zf(h))) : (h = k.copyNodeData(h), z.Za(h) && (k.rl(h), g = c.uh(h))) + } else gh(b), g = b.copy(), null !== g && (null !== c ? c.add(g) : null !== h && a.iH && (k = a.h.ha, h = g instanceof G && k instanceof V ? k.Pw(h) : k.copyNodeData(h), z.Za(h) && (g.data = h))); + if (!(g instanceof D)) return null; + g.kb = !1; + g.wh = !1; + d.add(b, g); + if (b instanceof E) { + for (h = b.ee; h.next();) { + k = h.value; + if (k.Y === b) { + var l = d.na(k); + null !== l && (l.Y = g) + } + k.da === b && (l = d.na(k), null !== l && (l.da = g)) + } + if (b instanceof F && g instanceof F) + for (h = g, b = b.Hc; b.next();) k = fh(a, b.value, c, d, e), k instanceof G || null === k || (k.Va = h) + } else if (b instanceof G) + for (h = b.Y, null !== h && (h = d.na(h), null !== h && (g.Y = h)), h = b.da, null !== h && (h = d.na(h), null !== h && (g.da = h)), b = b.Hf; b.next();) h = fh(a, b.value, c, d, e), null !== h && (h.Nd = g); + return g + } + ra.prototype.copySelection = function() { + var a = this.h; + if (null !== a) { + for (var b = new K(D), a = a.selection.i; a.next();) eh(b, a.value, !0, this.lH ? Infinity : 0, this.jH, function(a) { + return a.canCopy() + }); + this.copyToClipboard(b) + } + }; + ra.prototype.canCopySelection = function() { + var a = this.h; + return null !== a && a.kk && a.Az && 0 !== a.selection.count ? !0 : !1 + }; + ra.prototype.cutSelection = function() { + this.copySelection(); + this.deleteSelection() + }; + ra.prototype.canCutSelection = function() { + var a = this.h; + return null !== a && !a.jb && !a.Ef && a.kk && a.Sm && a.Az && 0 !== a.selection.count ? !0 : !1 + }; + ra.prototype.copyToClipboard = function(a) { + var b = this.h; + if (null !== b) { + var c = null; + if (null === a) bh = null, ch = ""; + else { + var c = b.ha, + d = !1, + e = !1, + g = null; + try { + if (c instanceof ng) { + var h = c, + d = h.$m; + h.$m = this.ZD + } + c instanceof V && (h = c, e = h.Zm, h.Zm = this.YD); + g = b.hp(a, null, !0) + } finally { + c instanceof ng && (c.$m = d), c instanceof V && (c.Zm = e), c = new J(D), c.$c(g), bh = c, ch = b.ha.Al + } + } + b.Ja("ClipboardChanged", c) + } + }; + ra.prototype.pasteFromClipboard = function() { + var a = new K(D), + b = bh; + if (null === b) return a; + var c = this.h; + if (null === c || ch !== c.ha.Al) return a; + var d = c.ha, + e = !1, + g = !1, + h = null; + try { + if (d instanceof ng) { + var k = d, + e = k.$m; + k.$m = this.ZD + } + d instanceof V && (k = d, g = k.Zm, k.Zm = this.YD); + h = c.hp(b, c, !1) + } finally { + for (d instanceof ng && (d.$m = e), d instanceof V && (d.Zm = g), b = h.i; b.next();) c = b.value, d = b.key, c.location.F() || (d.location.F() ? c.location = d.location : !c.position.F() && d.position.F() && (c.position = d.position)), a.add(c) + } + return a + }; + ra.prototype.pasteSelection = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null !== b) try { + b.gc = "wait"; + b.Wb("Paste"); + b.Ja("ChangingSelection"); + var c = this.pasteFromClipboard(); + 0 < c.count && hh(b); + for (var d = c.i; d.next();) d.value.kb = !0; + b.Ja("ChangedSelection"); + if (null !== a) { + var e = b.computePartsBounds(b.selection); + if (e) { + var g = b.hb.me; + null === g && (g = new ih, g.Sc(b)); + var h = g.computeEffectiveCollection(b.selection); + g.moveParts(h, new N(a.x - e.ra, a.y - e.za), !1) + } + } + b.Ja("ClipboardPasted", c) + } finally { + b.Jd("Paste"), b.gc = + "" + } + }; + ra.prototype.canPasteSelection = function() { + var a = this.h; + return null === a || a.jb || a.Ef || !a.ap || !a.Az || null === bh || ch !== a.ha.Al ? !1 : !0 + }; + ra.prototype.undo = function() { + var a = this.h; + null !== a && a.pa.undo() + }; + ra.prototype.canUndo = function() { + var a = this.h; + return null === a || a.jb || a.Ef ? !1 : a.GD && a.pa.canUndo() + }; + ra.prototype.redo = function() { + var a = this.h; + null !== a && a.pa.redo() + }; + ra.prototype.canRedo = function() { + var a = this.h; + return null === a || a.jb || a.Ef ? !1 : a.GD && a.pa.canRedo() + }; + ra.prototype.decreaseZoom = function(a) { + void 0 === a && (a = 1 / this.Tx); + z.p(a, ra, "decreaseZoom:factor"); + var b = this.h; + null !== b && b.wl === jh && (a *= b.scale, a < b.yh || a > b.xh || (b.scale = a)) + }; + ra.prototype.canDecreaseZoom = function(a) { + void 0 === a && (a = 1 / this.Tx); + z.p(a, ra, "canDecreaseZoom:factor"); + var b = this.h; + if (null === b || b.wl !== jh) return !1; + a *= b.scale; + return a < b.yh || a > b.xh ? !1 : b.Jw + }; + ra.prototype.increaseZoom = function(a) { + void 0 === a && (a = this.Tx); + z.p(a, ra, "increaseZoom:factor"); + var b = this.h; + null !== b && b.wl === jh && (a *= b.scale, a < b.yh || a > b.xh || (b.scale = a)) + }; + ra.prototype.canIncreaseZoom = function(a) { + void 0 === a && (a = this.Tx); + z.p(a, ra, "canIncreaseZoom:factor"); + var b = this.h; + if (null === b || b.wl !== jh) return !1; + a *= b.scale; + return a < b.yh || a > b.xh ? !1 : b.Jw + }; + ra.prototype.resetZoom = function(a) { + void 0 === a && (a = this.Rw); + z.p(a, ra, "resetZoom:newscale"); + var b = this.h; + null === b || a < b.yh || a > b.xh || (b.scale = a) + }; + ra.prototype.canResetZoom = function(a) { + void 0 === a && (a = this.Rw); + z.p(a, ra, "canResetZoom:newscale"); + var b = this.h; + return null === b || a < b.yh || a > b.xh ? !1 : b.Jw + }; + ra.prototype.zoomToFit = function() { + var a = this.h; + if (null !== a) { + var b = a.scale, + c = a.position; + b === this.xz && !isNaN(this.Xy) && a.ad.N(this.wz) ? (a.scale = this.Xy, a.position = this.yC, this.xz = NaN, this.wz = Jd) : (this.Xy = b, this.yC = c.copy(), a.zoomToFit(), this.xz = a.scale, this.wz = a.ad.copy()) + } + }; + ra.prototype.canZoomToFit = function() { + var a = this.h; + return null === a ? !1 : a.Jw + }; + ra.prototype.scrollToPart = function(a) { + void 0 === a && (a = null); + null !== a && z.l(a, D, ra, "part"); + var b = this.h; + if (null !== b) { + if (null === a) { + try { + null !== this.Ui && (this.Ui.next() ? a = this.Ui.value : this.Ui = null) + } catch (c) { + this.Ui = null + } + null === a && (0 < b.hn.count ? this.Ui = b.hn.i : 0 < b.selection.count && (this.Ui = b.selection.i), null !== this.Ui && this.Ui.next() && (a = this.Ui.value)) + } + if (null !== a) { + var d = b.Ua; + d.sn("Scroll To Part"); + var e = b.position.copy(); + b.YG(a.W); + e.Mc(b.position) && d.oi() + } + } + }; + ra.prototype.canScrollToPart = function(a) { + void 0 === a && (a = null); + null !== a && z.l(a, D, ra, "part"); + a = this.h; + return null === a || 0 === a.selection.count && 0 === a.hn.count ? !1 : a.xe && a.ye + }; + ra.prototype.collapseTree = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null !== b) try { + b.Wb("Collapse Tree"); + b.Ua.sn("Collapse Tree"); + var c = new J(E); + if (null !== a && a.vd) a.collapseTree(), c.add(a); + else + for (var d = b.selection.i; d.next();) { + var e = d.value; + e instanceof E && (a = e, a.vd && (a.collapseTree(), c.add(a))) + } + b.Ja("TreeCollapsed", c) + } finally { + b.Jd("Collapse Tree") + } + }; + ra.prototype.canCollapseTree = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null === b || b.jb) return !1; + if (null !== a) { + if (!a.vd) return !1; + if (0 < a.$w().count) return !0 + } else + for (a = b.selection.i; a.next();) + if (b = a.value, b instanceof E && b.vd && 0 < b.$w().count) return !0; return !1 + }; + ra.prototype.expandTree = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null !== b) try { + b.Wb("Expand Tree"); + b.Ua.sn("Expand Tree"); + var c = new J(E); + if (null === a || a.vd) + for (var d = b.selection.i; d.next();) { + var e = d.value; + e instanceof E && (a = e, a.vd || (a.expandTree(), c.add(a))) + } else a.expandTree(), c.add(a); + b.Ja("TreeExpanded", c) + } finally { + b.Jd("Expand Tree") + } + }; + ra.prototype.canExpandTree = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null === b || b.jb) return !1; + if (null !== a) { + if (a.vd) return !1; + if (0 < a.$w().count) return !0 + } else + for (a = b.selection.i; a.next();) + if (b = a.value, b instanceof E && !b.vd && 0 < b.$w().count) return !0; return !1 + }; + ra.prototype.groupSelection = function() { + var a = this.h; + if (null !== a) { + var b = a.ha; + if (b instanceof V) { + var c = this.HD; + if (null !== c) { + var d = null; + try { + a.gc = "wait"; + a.Wb("Group"); + a.Ja("ChangingSelection"); + for (var e = new J(D), g = a.selection.i; g.next();) { + var h = g.value; + h.be() && h.canGroup() && e.add(h) + } + for (var k = new J(D), l = e.i; l.next();) { + for (var m = l.value, g = !1, n = e.i; n.next();) + if (m.li(n.value)) { + g = !0; + break + } + g || k.add(m) + } + if (0 < k.count) { + var p = k.first().Va; + if (null !== p) + for (; null !== p;) { + for (var e = !1, q = k.i; q.next();) + if (!q.value.li(p)) { + e = !0; + break + } + if (e) p = p.Va; + else break + } + if (c instanceof F) gh(c), d = c.copy(), null !== d && a.add(d); + else if (b.hA(c)) { + var r = b.copyNodeData(c); + z.Za(r) && (b.rl(r), d = a.Zw(r)) + } + if (null !== d) { + null !== p && this.isValidMember(p, d) && (d.Va = p); + for (var s = k.i; s.next();) { + var t = s.value; + this.isValidMember(d, t) && (t.Va = d) + } + a.select(d) + } + } + a.Ja("ChangedSelection"); + a.Ja("SelectionGrouped", d) + } finally { + a.Jd("Group"), a.gc = "" + } + } + } + } + }; + ra.prototype.canGroupSelection = function() { + var a = this.h; + if (null === a || a.jb || a.Ef || !a.ap || !a.Ew || !(a.ha instanceof V) || null === this.HD) return !1; + for (a = a.selection.i; a.next();) { + var b = a.value; + if (b.be() && b.canGroup()) return !0 + } + return !1 + }; + + function kh(a) { + var b = z.rb(); + for (a = a.i; a.next();) { + var c = a.value; + c instanceof G || b.push(c) + } + a = new K(D); + for (var c = b.length, d = 0; d < c; d++) { + for (var e = b[d], g = !0, h = 0; h < c; h++) + if (e.li(b[h])) { + g = !1; + break + } + g && a.add(e) + } + z.xa(b); + return a + } + ra.prototype.isValidMember = function(a, b) { + if (null === b || a === b || b instanceof G) return !1; + if (null !== a) { + if (a === b || a.li(b)) return !1; + var c = a.qA; + if (null !== c && !c(a, b) || null === a.data && null !== b.data || null !== a.data && null === b.data) return !1 + } + c = this.qA; + return null !== c ? c(a, b) : !0 + }; + ra.prototype.ungroupSelection = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null !== b) { + var c = b.ha; + if (c instanceof V) try { + b.gc = "wait"; + b.Wb("Ungroup"); + b.Ja("ChangingSelection"); + var d = new J(F); + if (null !== a) d.add(a); + else + for (var e = b.selection.i; e.next();) { + var g = e.value; + g instanceof F && (a = g, a.canUngroup() && d.add(a)) + } + if (0 < d.count) { + b.Mw(); + for (var h = d.i; h.next();) { + var k = h.value; + k.expandSubGraph(); + var l = k.Va, + m = null !== l && null !== l.data ? c.pb(l.data) : void 0, + n = new J(D); + n.$c(k.Hc); + for (var p = n.i; p.next();) { + var q = + p.value; + q.kb = !0; + if (!(q instanceof G)) { + var r = q.data; + null !== r ? c.Lx(r, m) : q.Va = l + } + } + b.remove(k) + } + } + b.Ja("ChangedSelection"); + b.Ja("SelectionUngrouped", d, n) + } finally { + b.Jd("Ungroup"), b.gc = "" + } + } + }; + ra.prototype.canUngroupSelection = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null === b || b.jb || b.Ef || !b.Sm || !b.Iw || !(b.ha instanceof V)) return !1; + if (null !== a) { + if (a.canUngroup()) return !0 + } else + for (a = b.selection.i; a.next();) + if (b = a.value, b instanceof F && b.canUngroup()) return !0; return !1 + }; + ra.prototype.addTopLevelParts = function(a, b) { + for (var c = !0, d = kh(a).i; d.next();) { + var e = d.value; + null !== e.Va && (!b || this.isValidMember(null, e) ? e.Va = null : c = !1) + } + return c + }; + ra.prototype.collapseSubGraph = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null !== b) try { + b.Wb("Collapse SubGraph"); + b.Ua.sn("Collapse SubGraph"); + var c = new J(F); + if (null !== a && a.re) a.collapseSubGraph(), c.add(a); + else + for (var d = b.selection.i; d.next();) { + var e = d.value; + e instanceof F && (a = e, a.re && (a.collapseSubGraph(), c.add(a))) + } + b.Ja("SubGraphCollapsed", c) + } finally { + b.Jd("Collapse SubGraph") + } + }; + ra.prototype.canCollapseSubGraph = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null === b || b.jb) return !1; + if (null !== a) return a.re ? !0 : !1; + for (a = b.selection.i; a.next();) + if (b = a.value, b instanceof F && b.re) return !0; + return !1 + }; + ra.prototype.expandSubGraph = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null !== b) try { + b.Wb("Expand SubGraph"); + b.Ua.sn("Expand SubGraph"); + var c = new J(F); + if (null === a || a.re) + for (var d = b.selection.i; d.next();) { + var e = d.value; + e instanceof F && (a = e, a.re || (a.expandSubGraph(), c.add(a))) + } else a.expandSubGraph(), c.add(a); + b.Ja("SubGraphExpanded", c) + } finally { + b.Jd("Expand SubGraph") + } + }; + ra.prototype.canExpandSubGraph = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null === b || b.jb) return !1; + if (null !== a) return a.re ? !1 : !0; + for (a = b.selection.i; a.next();) + if (b = a.value, b instanceof F && !b.re) return !0; + return !1 + }; + ra.prototype.editTextBlock = function(a) { + void 0 === a && (a = null); + null !== a && z.l(a, qa, ra, "editTextBlock"); + var b = this.h; + if (null !== b) { + var c = b.hb.XA; + if (null !== c) { + if (null === a) { + a = null; + for (var d = b.selection.i; d.next();) { + var e = d.value; + if (e.canEdit()) { + a = e; + break + } + } + if (null === a) return; + a = a.yt(function(a) { + return a instanceof qa && a.Sz + }) + } + null !== a && (b.eb = null, c.He = a, b.eb = c) + } + } + }; + ra.prototype.canEditTextBlock = function(a) { + void 0 === a && (a = null); + null !== a && z.l(a, qa, ra, "canEditTextBlock"); + var b = this.h; + if (null === b || b.jb || b.Ef || !b.Hw || null === b.hb.XA) return !1; + if (null !== a) { + if (a = a.ca, null !== a && a.canEdit()) return !0 + } else + for (b = b.selection.i; b.next();) + if (a = b.value, a.canEdit() && (a = a.yt(function(a) { + return a instanceof qa && a.Sz + }), null !== a)) return !0; return !1 + }; + ra.prototype.showContextMenu = function(a) { + var b = this.h; + if (null !== b) { + var c = b.hb.Hz; + if (null !== c && (void 0 === a && (a = 0 < b.selection.count ? b.selection.first() : b), a = c.findObjectWithContextMenu(a), null !== a)) { + var d = new Pf, + e = null; + a instanceof O ? e = a.fb(ec) : b.hI || (e = b.xb, e = new N(e.x + e.width / 2, e.y + e.height / 2)); + null !== e && (d.h = b, d.te = b.aB(e), d.ga = e, d.left = !1, d.right = !0, d.up = !0, b.Q = d); + b.eb = c; + uh(c, !1, a) + } + } + }; + ra.prototype.canShowContextMenu = function(a) { + var b = this.h; + if (null === b) return !1; + var c = b.hb.Hz; + if (null === c) return !1; + void 0 === a && (a = 0 < b.selection.count ? b.selection.first() : b); + return null === c.findObjectWithContextMenu(a) ? !1 : !0 + }; + z.defineProperty(ra, { + iH: "copiesClipboardData" + }, function() { + return this.zB + }, function(a) { + z.g(a, "boolean", ra, "copiesClipboardData"); + this.zB = a + }); + z.defineProperty(ra, { + jH: "copiesConnectedLinks" + }, function() { + return this.AB + }, function(a) { + z.g(a, "boolean", ra, "copiesConnectedLinks"); + this.AB = a + }); + z.defineProperty(ra, { + hE: "deletesConnectedLinks" + }, function() { + return this.TB + }, function(a) { + z.g(a, "boolean", ra, "deletesConnectedLinks"); + this.TB = a + }); + z.defineProperty(ra, { + lH: "copiesTree" + }, function() { + return this.EB + }, function(a) { + z.g(a, "boolean", ra, "copiesTree"); + this.EB = a + }); + z.defineProperty(ra, { + qH: "deletesTree" + }, function() { + return this.UB + }, function(a) { + z.g(a, "boolean", ra, "deletesTree"); + this.UB = a + }); + z.defineProperty(ra, { + ZD: "copiesParentKey" + }, function() { + return this.DB + }, function(a) { + z.g(a, "boolean", ra, "copiesParentKey"); + this.DB = a + }); + z.defineProperty(ra, { + YD: "copiesGroupKey" + }, function() { + return this.CB + }, function(a) { + z.g(a, "boolean", ra, "copiesGroupKey"); + this.CB = a + }); + z.defineProperty(ra, { + HD: "archetypeGroupData" + }, function() { + return this.iy + }, function(a) { + null !== a && z.l(a, Object, ra, "archetypeGroupData"); + var b = this.h; + null !== b && (b = b.ha, b instanceof V && (a instanceof F || b.hA(a) || z.k("CommandHandler.archetypeGroupData must be either a Group or a data object for which GraphLinksModel.isGroupForNodeData is true: " + a))); + this.iy = a + }); + z.defineProperty(ra, { + qA: "memberValidation" + }, function() { + return this.hl + }, function(a) { + null !== a && z.g(a, "function", ra, "memberValidation"); + this.hl = a + }); + z.defineProperty(ra, { + Rw: "defaultScale" + }, function() { + return this.RB + }, function(a) { + z.p(a, ra, "defaultScale"); + 0 < a || z.k("defaultScale must be larger than zero, not: " + a); + this.RB = a + }); + z.defineProperty(ra, { + Tx: "zoomFactor" + }, function() { + return this.yD + }, function(a) { + z.p(a, ra, "zoomFactor"); + 1 < a || z.k("zoomFactor must be larger than 1.0, not: " + a); + this.yD = a + }); + + function ug() { + 0 < arguments.length && z.od(ug); + z.kc(this); + this.Z = null; + this.Ub = ""; + this.af = !0; + this.kC = !1; + this.uD = null; + this.Aw = -1 + } + z.ia("Tool", ug); + ug.prototype.Sc = function(a) { + u && null !== a && z.l(a, C, ug, "setDiagram"); + this.Z = a + }; + ug.prototype.toString = function() { + return "" !== this.name ? this.name + " Tool" : z.kf(Object.getPrototypeOf(this)) + }; + ug.prototype.updateAdornments = function() {}; + ug.prototype.canStart = function() { + return this.isEnabled + }; + ug.prototype.doStart = function() {}; + ug.prototype.doActivate = function() { + this.ua = !0 + }; + ug.prototype.doDeactivate = function() { + this.ua = !1 + }; + ug.prototype.doStop = function() {}; + ug.prototype.doCancel = function() { + this.stopTool() + }; + ug.prototype.stopTool = function() { + var a = this.h; + null !== a && a.eb === this && (a.eb = null, a.gc = "") + }; + ug.prototype.doMouseDown = function() { + !this.ua && this.canStart() && this.doActivate() + }; + ug.prototype.doMouseMove = function() {}; + ug.prototype.doMouseUp = function() { + this.stopTool() + }; + ug.prototype.doMouseWheel = function() {}; + ug.prototype.canStartMultiTouch = function() { + return !0 + }; + ug.prototype.standardPinchZoomStart = function() { + var a = this.h; + if (null !== a) { + var b = a.Q.event, + c = null, + d = null; + if (void 0 !== b.targetTouches) { + if (2 > b.targetTouches.length) return; + c = b.targetTouches[0]; + d = b.targetTouches[1] + } else if (null !== a.Uf[0]) c = a.Uf[0], d = a.Uf[1]; + else return; + this.doCancel(); + if (a.sp("hasGestureZoom")) { + a.Ly = !0; + a.KC = a.scale; + var e = Bh(a), + g = c, + h = g.clientX - e.x, + c = g.clientY - e.y, + g = d, + d = g.clientX - e.x, + g = g.clientY - e.y; + z.A(e); + e = d - h; + c = g - c; + a.cD = Math.sqrt(e * e + c * c); + b.preventDefault(); + b.cancelBubble = !0 + } + } + }; + ug.prototype.standardPinchZoomMove = function() { + var a = this.h; + if (null !== a) { + var b = a.Q.event; + this.doCancel(); + var c = null, + d = null; + if (void 0 !== b.targetTouches) { + if (2 > b.targetTouches.length) return; + c = b.targetTouches[0]; + d = b.targetTouches[1] + } else if (null !== a.Uf[0]) c = a.Uf[0], d = a.Uf[1]; + else return; + if (a.sp("hasGestureZoom") && a.Ly) { + var e = Bh(a), + g = c, + c = g.clientX - e.x, + h = g.clientY - e.y, + g = d, + d = g.clientX - e.x, + g = g.clientY - e.y; + z.A(e); + var e = d - c, + k = g - h, + e = Math.sqrt(e * e + k * k) / a.cD, + c = new N((Math.min(d, c) + Math.max(d, c)) / 2, (Math.min(g, + h) + Math.max(g, h)) / 2), + h = a.KC * e, + d = a.wb; + h !== a.scale && d.canResetZoom(h) && (e = a.$l, a.$l = c, d.resetZoom(h), a.$l = e); + b.preventDefault(); + b.cancelBubble = !0 + } + } + }; + ug.prototype.doKeyDown = function() { + var a = this.h; + null !== a && "Esc" === a.Q.key && this.doCancel() + }; + ug.prototype.doKeyUp = function() {}; + ug.prototype.startTransaction = ug.prototype.Wb = function(a) { + void 0 === a && (a = this.name); + this.Mf = null; + var b = this.h; + return null === b ? !1 : b.Wb(a) + }; + ug.prototype.stopTransaction = ug.prototype.xk = function() { + var a = this.h; + return null === a ? !1 : null === this.Mf ? a.Vp() : a.Jd(this.Mf) + }; + ug.prototype.standardMouseSelect = function() { + var a = this.h; + if (null !== a && a.xf) { + var b = a.Q, + c = a.At(b.ga, !1); + if (null !== c) + if (z.rk ? b.$t : b.control) { + a.Ja("ChangingSelection"); + for (b = c; null !== b && !b.canSelect();) b = b.Va; + null !== b && (b.kb = !b.kb); + a.Ja("ChangedSelection") + } else if (b.shift) { + if (!c.kb) { + a.Ja("ChangingSelection"); + for (b = c; null !== b && !b.canSelect();) b = b.Va; + null !== b && (b.kb = !0); + a.Ja("ChangedSelection") + } + } else { + if (!c.kb) { + for (b = c; null !== b && !b.canSelect();) b = b.Va; + null !== b && a.select(b) + } + } else !b.left || (z.rk ? b.$t : b.control) || + b.shift || a.Mw() + } + }; + ug.prototype.standardMouseClick = function(a, b) { + void 0 === a && (a = null); + void 0 === b && (b = function(a) { + return !a.layer.Nc + }); + var c = this.h; + if (null === c) return !1; + var d = c.Q, + e = c.pe(d.ga, a, b); + d.Ge = e; + Ch(e, d, c); + return d.Gc + }; + + function Ch(a, b, c) { + b.Gc = !1; + var d = 0; + b.left ? d = 1 === b.Pe ? 1 : 2 === b.Pe ? 2 : 1 : b.right && 1 === b.Pe && (d = 3); + var e = ""; + if (null !== a) { + switch (d) { + case 1: + e = "ObjectSingleClicked"; + break; + case 2: + e = "ObjectDoubleClicked"; + break; + case 3: + e = "ObjectContextClicked" + } + 0 !== d && c.Ja(e, a) + } else { + switch (d) { + case 1: + e = "BackgroundSingleClicked"; + break; + case 2: + e = "BackgroundDoubleClicked"; + break; + case 3: + e = "BackgroundContextClicked" + } + 0 !== d && c.Ja(e) + } + if (null !== a) + for (; null !== a;) { + c = null; + switch (d) { + case 1: + c = a.click; + break; + case 2: + c = a.wt ? a.wt : a.click; + break; + case 3: + c = + a.Gz + } + if (null !== c && (c(b, a), b.Gc)) break; + a = a.U + } else { + a = null; + switch (d) { + case 1: + a = c.click; + break; + case 2: + a = c.wt ? c.wt : c.click; + break; + case 3: + a = c.Gz + } + null !== a && a(b) + } + } + ug.prototype.standardMouseOver = function() { + var a = this.h; + if (null !== a) { + var b = a.Q; + if (null !== b.h && !0 !== a.Ua.wc) { + var c = a.Bb; + a.Bb = !0; + var d = a.pe(b.ga, null, null); + b.Ge = d; + var e = !1; + if (d !== a.Sn) { + var g = a.Sn, + h = g; + a.Sn = d; + this.doCurrentObjectChanged(g, d); + for (b.Gc = !1; null !== g;) { + var k = g.bu; + if (null !== k) { + if (d === g) break; + if (null !== d && d.Pl(g)) break; + k(b, g, d); + e = !0; + if (b.Gc) break + } + g = g.U + } + g = h; + for (b.Gc = !1; null !== d;) { + k = d.au; + if (null !== k) { + if (g === d) break; + if (null !== g && g.Pl(d)) break; + k(b, d, g); + e = !0; + if (b.Gc) break + } + d = d.U + } + d = a.Sn + } + if (null !== d) { + g = + d; + for (k = ""; null !== g;) { + k = g.cursor; + if ("" !== k) break; + g = g.U + } + a.gc = k; + b.Gc = !1; + for (g = d; null !== g;) { + k = g.uA; + if (null !== k && (k(b, g), e = !0, b.Gc)) break; + g = g.U + } + } else a.gc = "", k = a.uA, null !== k && (k(b), e = !0); + e && a.Ce(); + a.Bb = c + } + } + }; + ug.prototype.doCurrentObjectChanged = function() {}; + ug.prototype.standardMouseWheel = function() { + var a = this.h; + if (null !== a) { + var b = a.Q, + c = b.Cl; + if (0 !== c && a.ad.F()) { + var d = a.wb, + e = a.hb.cu; + if ((e === Dh && !b.shift || e === Eh && b.control) && (0 < c ? d.canIncreaseZoom() : d.canDecreaseZoom())) e = a.$l, a.$l = b.te, 0 < c ? d.increaseZoom() : d.decreaseZoom(), a.$l = e, b.bubbles = !1; + else if (e === Dh && b.shift || e === Eh && !b.control) { + var d = a.position.copy(), + e = 0 < c ? c : -c, + g = b.event.deltaX, + h = b.event.deltaY; + void 0 === g || void 0 === h || 0 === g && 0 === h ? !b.shift && a.ye ? (g = a.ou, e = e / 40 * g, 0 < c ? a.scroll("pixel", "up", e) : + a.scroll("pixel", "down", e)) : b.shift && a.xe && (g = a.nu, e = e / 40 * g, 0 < c ? a.scroll("pixel", "left", e) : a.scroll("pixel", "right", e)) : (0 !== g && a.xe && (0 < g ? a.scroll("pixel", "left", -g) : a.scroll("pixel", "right", g)), 0 !== h && a.ye && (0 < h ? a.scroll("pixel", "up", -h) : a.scroll("pixel", "down", h))); + a.position.N(d) || (b.bubbles = !1) + } + } + } + }; + ug.prototype.standardWaitAfter = function(a, b) { + z.g(a, "number", ug, "standardWaitAfter:delay"); + this.cancelWaitAfter(); + var c = this, + d = b.copy(); + this.Aw = z.setTimeout(function() { + c.doWaitAfter(d) + }, a) + }; + ug.prototype.cancelWaitAfter = function() { + -1 !== this.Aw && z.clearTimeout(this.Aw); + this.Aw = -1 + }; + ug.prototype.doWaitAfter = function() {}; + ug.prototype.findToolHandleAt = function(a, b) { + var c = this.h; + if (null === c) return null; + c = c.pe(a, function(a) { + for (; null !== a && !(a.U instanceof da);) a = a.U; + return a + }); + return null === c ? null : c.U.nc === b ? c : null + }; + ug.prototype.isBeyondDragSize = function(a, b) { + var c = this.h; + if (null === c) return !1; + void 0 === a && (a = c.Fc.te); + void 0 === b && (b = c.Q.te); + var d = c.hb.uH, + e = d.width, + d = d.height; + c.Fc.lj && (e += 6, d += 6); + return Math.abs(b.x - a.x) > e || Math.abs(b.y - a.y) > d + }; + z.w(ug, { + h: "diagram" + }, function() { + return this.Z + }); + z.defineProperty(ug, { + name: "name" + }, function() { + return this.Ub + }, function(a) { + z.g(a, "string", ug, "name"); + this.Ub = a + }); + z.defineProperty(ug, { + isEnabled: "isEnabled" + }, function() { + return this.af + }, function(a) { + z.g(a, "boolean", ug, "isEnabled"); + this.af = a + }); + z.defineProperty(ug, { + ua: "isActive" + }, function() { + return this.kC + }, function(a) { + z.g(a, "boolean", ug, "isActive"); + this.kC = a + }); + z.defineProperty(ug, { + Mf: "transactionResult" + }, function() { + return this.uD + }, function(a) { + null !== a && z.g(a, "string", ug, "transactionResult"); + this.uD = a + }); + + function ih() { + 0 < arguments.length && z.od(ih); + ug.call(this); + this.name = "Dragging"; + this.BB = this.oC = !0; + this.jr = this.$B = !1; + this.tC = !0; + this.My = (new Ea(NaN, NaN)).freeze(); + this.Ny = Zb; + this.Oy = (new N(NaN, NaN)).freeze(); + this.ZB = !1; + this.XB = this.yB = this.YB = this.JB = this.Si = null; + this.Uq = this.rC = !1; + this.Qo = new N(NaN, NaN); + this.qw = new N; + this.tw = !1; + this.nC = !0; + this.ao = 100; + this.Bj = []; + this.pG = (new K(D)).freeze() + } + z.Qa(ih, ug); + z.ia("DraggingTool", ih); + z.defineProperty(ih, { + LE: "isCopyEnabled" + }, function() { + return this.oC + }, function(a) { + z.g(a, "boolean", ih, "isCopyEnabled"); + this.oC = a + }); + z.defineProperty(ih, { + kH: "copiesEffectiveCollection" + }, function() { + return this.BB + }, function(a) { + z.g(a, "boolean", ih, "copiesEffectiveCollection"); + this.BB = a + }); + z.defineProperty(ih, { + vH: "dragsTree" + }, function() { + return this.$B + }, function(a) { + z.g(a, "boolean", ih, "dragsTree"); + this.$B = a + }); + z.defineProperty(ih, { + ix: "isGridSnapEnabled" + }, function() { + return this.jr + }, function(a) { + z.g(a, "boolean", ih, "isGridSnapEnabled"); + this.jr = a + }); + z.defineProperty(ih, { + dI: "isComplexRoutingRealtime" + }, function() { + return this.nC + }, function(a) { + z.g(a, "boolean", ih, "isComplexRoutingRealtime"); + this.nC = a + }); + z.defineProperty(ih, { + fI: "isGridSnapRealtime" + }, function() { + return this.tC + }, function(a) { + z.g(a, "boolean", ih, "isGridSnapRealtime"); + this.tC = a + }); + z.defineProperty(ih, { + BE: "gridSnapCellSize" + }, function() { + return this.My + }, function(a) { + z.l(a, Ea, ih, "gridSnapCellSize"); + this.My.N(a) || (this.My = a = a.V()) + }); + z.defineProperty(ih, { + QH: "gridSnapCellSpot" + }, function() { + return this.Ny + }, function(a) { + z.l(a, Q, ih, "gridSnapCellSpot"); + this.Ny.N(a) || (this.Ny = a = a.V()) + }); + z.defineProperty(ih, { + RH: "gridSnapOrigin" + }, function() { + return this.Oy + }, function(a) { + z.l(a, N, ih, "gridSnapOrigin"); + this.Oy.N(a) || (this.Oy = a = a.V()) + }); + z.defineProperty(ih, { + fj: "dragsLink" + }, function() { + return this.ZB + }, function(a) { + z.g(a, "boolean", ih, "dragsLink"); + this.ZB = a + }); + z.defineProperty(ih, { + bn: "currentPart" + }, function() { + return this.JB + }, function(a) { + null !== a && z.l(a, D, ih, "currentPart"); + this.JB = a + }); + z.defineProperty(ih, { + oc: "copiedParts" + }, function() { + return this.yB + }, function(a) { + this.yB = a + }); + z.defineProperty(ih, { + hc: "draggedParts" + }, function() { + return this.YB + }, function(a) { + this.YB = a + }); + z.w(ih, { + uK: "draggingParts" + }, function() { + return null !== this.oc ? this.oc.uj() : null !== this.hc ? this.hc.uj() : this.pG + }); + z.defineProperty(ih, { + ld: "draggedLink" + }, function() { + return this.XB + }, function(a) { + null !== a && z.l(a, G, ih, "draggedLink"); + this.XB = a + }); + z.defineProperty(ih, { + hx: "isDragOutStarted" + }, function() { + return this.rC + }, function(a) { + this.rC = a + }); + z.defineProperty(ih, { + wk: "startPoint" + }, function() { + return this.qw + }, function(a) { + z.l(a, N, ih, "startPoint"); + this.qw.N(a) || (this.qw = a = a.V()) + }); + z.defineProperty(ih, { + cE: "delay" + }, function() { + return this.ao + }, function(a) { + z.g(a, "number", ih, "delay"); + this.ao = a + }); + ih.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a || a.jb && !a.kt || !a.ul && !a.kk && !a.kt || !a.xf) return !1; + var b = a.Q; + return !b.left || a.eb !== this && (!this.isBeyondDragSize() || b.lj && b.timestamp - a.Fc.timestamp < this.ao) ? !1 : null !== this.findDraggablePart() + }; + ih.prototype.findDraggablePart = function() { + var a = this.h; + if (null === a) return null; + a = a.At(a.Fc.ga, !1); + if (null === a) return null; + for (; null !== a && !a.canSelect();) a = a.Va; + return null !== a && (a.canMove() || a.canCopy()) ? a : null + }; + ih.prototype.standardMouseSelect = function() { + var a = this.h; + if (null !== a && a.xf) { + var b = a.At(a.Fc.ga, !1); + if (null !== b) { + for (; null !== b && !b.canSelect();) b = b.Va; + this.bn = b; + this.bn.kb || (a.Ja("ChangingSelection"), b = a.Q, (z.rk ? b.$t : b.control) || b.shift || hh(a), this.bn.kb = !0, a.Ja("ChangedSelection")) + } + } + }; + ih.prototype.doActivate = function() { + var a = this.h; + if (null !== a) { + null === this.bn && this.standardMouseSelect(); + var b = this.bn; + null !== b && (b.canMove() || b.canCopy()) && (this.ua = !0, this.Qo.set(a.position), Fh(this, a.selection), this.Bj.length = 0, this.hc = this.computeEffectiveCollection(a.selection), a.vu = !0, Gh(this, this.hc), this.Wb("Drag"), this.wk = a.Fc.ga, a.We = !0, a.kt && (this.hx = !0, this.Uq = !1, Hh = this, Ih = this.h, this.doSimulatedDragOut())) + } + }; + + function Fh(a, b) { + if (a.fj) { + var c = a.h; + null !== c && c.Tm && (c.ha instanceof V && 1 === b.count && b.first() instanceof G ? (a.ld = b.first(), a.ld.canRelinkFrom() && a.ld.canRelinkTo() && a.ld.pt(), a.Si = c.hb.kF, null === a.Si && (a.Si = new Jh, a.Si.Sc(c))) : (a.ld = null, a.Si = null)) + } + } + ih.prototype.computeEffectiveCollection = function(a) { + var b = null !== this.h && this.h.eb === this, + c = new na(D); + if (null === a) return c; + for (var d = a.i; d.next();) Kh(this, c, d.value, b); + if (null !== this.ld && this.fj) return c; + for (d = a.i; d.next();) a = d.value, a instanceof G && (b = a.Y, null === b || c.contains(b) ? (b = a.da, null === b || c.contains(b) || c.remove(a)) : c.remove(a)); + return c + }; + + function Lh(a) { + return void 0 === a ? new Mh(Id) : new Mh(a.copy()) + } + + function Kh(a, b, c, d) { + if (!b.contains(c) && (!d || c.canMove() || c.canCopy())) + if (c instanceof E) { + b.add(c, Lh(c.location)); + if (c instanceof F) + for (var e = c.Hc; e.next();) Kh(a, b, e.value, d); + for (e = c.ee; e.next();) { + var g = e.value; + if (!b.contains(g)) { + var h = g.Y, + k = g.da; + null !== h && b.contains(h) && null !== k && b.contains(k) && Kh(a, b, g, d) + } + } + if (a.vH) + for (c = c.tE(); c.next();) Kh(a, b, c.value, d) + } else if (c instanceof G) + for (g = c, b.add(g, Lh()), e = g.Hf; e.next();) Kh(a, b, e.value, d); + else c instanceof da || b.add(c, Lh(c.location)) + } + ih.prototype.doDeactivate = function() { + this.ua = !1; + var a = this.h; + null !== a && Nh(a); + Oh(this); + Ph(this, this.hc); + this.hc = this.bn = null; + this.Uq = this.hx = !1; + if (0 < Qh.count) { + for (var b = Qh.length, c = 0; c < b; c++) { + var d = Qh.ea(c); + Rh(d); + Sh(d); + Oh(d); + null !== d.h && Nh(d.h) + } + Qh.clear() + } + Rh(this); + this.Qo.n(NaN, NaN); + Hh = Ih = null; + Sh(this); + a.We = !1; + a.gc = ""; + a.vu = !1; + this.xk() + }; + + function Oh(a) { + var b = a.h; + if (null !== b) { + var c = b.Bb; + b.Bb = !0; + Th(a, b.Q, null); + b.Bb = c + } + a.Bj.length = 0 + } + + function Uh() { + var a = Hh; + Sh(a); + Vh(a); + var b = a.h; + null !== b && a.Qo.F() && (b.position = a.Qo); + null !== b && Nh(b) + } + ih.prototype.doCancel = function() { + Sh(this); + Vh(this); + var a = this.h; + null !== a && this.Qo.F() && (a.position = this.Qo); + this.stopTool() + }; + + function Gh(a, b) { + if (null !== b) { + a.tw = !0; + for (var c = b.i; c.next();) { + var d = c.key; + d instanceof G && (d.eq = !0) + } + } + } + + function Ph(a, b) { + if (null !== b) { + for (var c = b.i; c.next();) { + var d = c.key; + d instanceof G && (d.eq = !1, d.jj && Wh(d) && d.qc()) + } + a.tw = !1 + } + } + ih.prototype.doKeyDown = function() { + var a = this.h; + null !== a && (a = a.Q, null !== a && this.ua && ("Esc" === a.key ? this.doCancel() : this.doMouseMove())) + }; + ih.prototype.doKeyUp = function() { + var a = this.h; + null !== a && null !== a.Q && this.ua && this.doMouseMove() + }; + + function Xh(a, b) { + for (var c = Infinity, d = Infinity, e = -Infinity, g = -Infinity, h = a.i; h.next();) { + var k = h.value; + if (k.be() && k.isVisible()) { + var l = k.location, + k = l.x, + l = l.y; + isNaN(k) || isNaN(l) || (k < c && (c = k), l < d && (d = l), k > e && (e = k), l > g && (g = l)) + } + } + Infinity === c ? b.n(0, 0, 0, 0) : b.n(c, d, e - c, g - d) + } + + function Yh(a, b) { + if (null === a.oc) { + var c = a.h; + if (!(null === c || b && (c.jb || c.Ef)) && null !== a.hc) { + var d = c.pa; + d.isEnabled && d.QE ? null !== d.dj && 0 < d.dj.Yf.count && (c.pa.Vp(), c.Wb("Drag")) : Vh(a); + c.Bb = !b; + c.lq = !b; + a.wk = c.Fc.ga; + d = a.kH ? a.hc.uj() : c.selection; + d = c.hp(d, c, !0); + for (c = d.i; c.next();) c.value.location = c.key.location; + c = z.kg(); + Xh(d, c); + z.dc(c); + for (var c = new na(D), e = a.hc.i; e.next();) { + var g = e.key; + g.be() && g.canCopy() && (g = d.na(g), null !== g && (g.Bf(), c.add(g, Lh(g.location)))) + } + for (d = d.i; d.next();) e = d.value, e instanceof G && + e.canCopy() && c.add(e, Lh()); + a.oc = c; + Fh(a, c.uj()); + null !== a.ld && (c = a.ld, d = c.un, c.Rl(a.wk.x - (d.x + d.width / 2), a.wk.y - (d.y + d.height / 2))) + } + } + } + + function Sh(a) { + var b = a.h; + if (null !== b) { + if (null !== a.oc && (b.JA(a.oc.uj(), !1), a.oc = null, null !== a.hc)) + for (var c = a.hc.i; c.next();) c.key instanceof G && (c.value.point = new N(0, 0)); + b.Bb = !1; + b.lq = !1; + a.wk = b.Fc.ga + } + } + + function Rh(a) { + if (null !== a.ld) { + if (a.fj && null !== a.Si) { + var b = a.Si; + b.h.remove(b.Od); + b.h.remove(b.Pd) + } + a.ld = null; + a.Si = null + } + } + + function Zh(a, b, c) { + var d = a.h; + if (null !== d) { + var e = a.wk, + g = z.O(); + g.assign(d.Q.ga); + a.moveParts(b, g.xu(e), c); + z.A(g) + } + } + ih.prototype.moveParts = function(a, b, c) { + if (null !== a && (z.l(a, na, ih, "moveParts:parts"), 0 !== a.count)) { + var d = z.O(), + e = z.O(); + e.assign(b); + isNaN(e.x) && (e.x = 0); + isNaN(e.y) && (e.y = 0); + (b = this.tw) || Gh(this, a); + for (var g = new J($h), h = new J(Ya), k = a.i; k.next();) { + var l = k.key; + if (l.be()) { + var m = ai(this, l, a); + if (null !== m) g.add(new $h(l, k.value, m)); + else if (!c || l.canMove()) { + m = k.value.point; + d.assign(m); + var n = z.O(), + p = this.computeMove(l, d.add(e), a, n); + l.location = p; + k.value.LF = n.xu(m); + z.A(n) + } + } else k.key instanceof G && h.add(k.lb) + } + for (c = + g.i; c.next();) g = c.value, m = g.info.point, d.assign(m), g.Pc.location = d.add(g.SH.LF); + c = z.O(); + m = z.O(); + for (h = h.i; h.next();) + if (k = h.value, g = k.key, g instanceof G) + if (g.eq) l = g.Y, n = g.da, null !== this.ld && this.fj ? (k = k.value.point, a.add(g, Lh(e)), l = e.x - k.x, k = e.y - k.y, g.Rl(l, k)) : (null !== l && (c.assign(l.location), p = a.na(l), null !== p && c.xu(p.point)), null !== n && (m.assign(n.location), p = a.na(n), null !== p && m.xu(p.point)), null !== l && null !== n ? c.Mc(m) ? (k = k.value.point, l = d, l.assign(c), l.xu(k), a.add(g, Lh(c)), g.Rl(l.x, l.y)) : (g.eq = !1, + g.qc()) : (k = k.value.point, n = null !== l ? c : null !== n ? m : e, a.add(g, Lh(n)), l = n.x - k.x, k = n.y - k.y, g.Rl(l, k))); + else if (null === g.Y || null === g.da) k = k.value.point, a.add(g, Lh(e)), l = e.x - k.x, k = e.y - k.y, g.Rl(l, k); + z.A(d); + z.A(e); + z.A(c); + z.A(m); + b || Ph(this, a) + } + }; + + function ai(a, b, c) { + b = b.Va; + if (null !== b) { + a = ai(a, b, c); + if (null !== a) return a; + a = c.na(b); + if (null !== a) return a + } + return null + } + + function Vh(a) { + if (null !== a.hc) { + for (var b = a.h, c = a.hc.i; c.next();) { + var d = c.key; + d.be() && (d.location = c.value.point) + } + for (c = a.hc.i; c.next();) + if (d = c.key, d instanceof G && d.eq) { + var e = c.value.point; + a.hc.add(d, Lh()); + d.Rl(-e.x, -e.y) + } + b.bg() + } + } + ih.prototype.computeMove = function(a, b, c, d) { + void 0 === d && (d = new N); + d.assign(b); + if (null === a) return d; + void 0 === c && (c = null); + var e = b; + if (this.ix && (this.fI || null === c || this.h.Q.up) && (e = z.O(), c = e, c.assign(b), null !== a)) { + var g = this.h; + if (null !== g) { + var h = g.Gt, + k = this.BE, + g = k.width, + k = k.height, + l = this.RH, + m = l.x, + l = l.y, + n = this.QH; + if (null !== h) { + var p = h.bx; + isNaN(g) && (g = p.width); + isNaN(k) && (k = p.height); + h = h.AE; + isNaN(m) && (m = h.x); + isNaN(l) && (l = h.y) + } + h = z.Tb(0, 0); + h.tu(0, 0, g, k, n); + jb(b.x, b.y, m + h.x, l + h.y, g, k, c); + z.A(h) + } + } + c = null !== a.iE ? + a.iE(a, b, e) : e; + k = a.GI; + g = k.x; + isNaN(g) && (g = a.location.x); + k = k.y; + isNaN(k) && (k = a.location.y); + h = a.BI; + m = h.x; + isNaN(m) && (m = a.location.x); + h = h.y; + isNaN(h) && (h = a.location.y); + d.n(Math.max(g, Math.min(c.x, m)), Math.max(k, Math.min(c.y, h))); + e !== b && z.A(e); + return d + }; + + function bi(a, b) { + if (null === b) return !0; + var c = b.ca; + return null === c || c instanceof da || c.layer.Nc || a.hc && a.hc.contains(c) || a.oc && a.oc.contains(c) ? !0 : !1 + } + + function ci(a, b, c, d) { + var e = a.h; + if (null !== e) { + a.fj && (null !== a.ld && (a.ld.Y = null, a.ld.da = null), di(a, !1)); + var g = ei(e, b, null, function(b) { + return !bi(a, b) + }), + h = e.Q; + h.Ge = g; + var k = e.Bb, + l = !1; + try { + e.Bb = !0; + l = Th(a, h, g); + if (!a.ua && null === Hh) return; + if (null === g) { + var m = e.KI; + null !== m && (m(h), l = !0) + } + if (!a.ua && null === Hh) return; + a.doDragOver(b, g); + if (!a.ua && null === Hh) return + } finally { + e.Bb = k, l && e.bg() + }(e.xe || e.ye) && (c || d) && fi(e, h.te) + } + } + + function Th(a, b, c) { + var d = !1, + e = a.Bj.length, + g = 0 < e ? a.Bj[0] : null; + if (c === g) return !1; + b.Gc = !1; + for (var h = 0; h < e; h++) { + var k = a.Bj[h], + l = k.JI; + if (null !== l && (l(b, k, c), d = !0, b.Gc)) break + } + a.Bj.length = 0; + if (!a.ua && null === Hh || null === c) return d; + for (b.Gc = !1; null !== c;) a.Bj.push(c), c = gi(c); + e = a.Bj.length; + for (h = 0; h < e && (k = a.Bj[h], l = k.II, null === l || (l(b, k, g), d = !0, !b.Gc)); h++); + return d + } + + function gi(a) { + var b = a.U; + return null !== b ? b : a instanceof D && !(a instanceof F) && (a = a.Va, null !== a && a.UH) ? a : null + } + + function hi(a, b, c) { + var d = a.Si; + if (null === d) return null; + var e = a.h.dn(b, d.iF, function(a) { + return d.findValidLinkablePort(a, c) + }); + a = z.O(); + for (var g = Infinity, h = null, e = e.i; e.next();) { + var k = e.value; + if (null !== k.ca) { + var l = k.fb(ec, a), + l = b.Af(l); + l < g && (h = k, g = l) + } + } + z.A(a); + return h + } + + function di(a, b) { + var c = a.ld; + if (null !== c && !(2 > c.sa)) { + var d = a.h; + if (null !== d && !d.jb && (d = a.Si, null !== d)) { + var e = null, + g = null; + null === c.Y && (e = hi(a, c.m(0), !1), null !== e && (g = e.ca)); + var h = null, + k = null; + null === c.da && (h = hi(a, c.m(c.sa - 1), !0), null !== h && (k = h.ca)); + d.isValidLink(g, e, k, h) ? b ? (c.Vn = c.m(0).copy(), c.Zn = c.m(c.sa - 1).copy(), c.eq = !1, c.Y = g, null !== e && (c.$f = e.yd), c.da = k, null !== h && (c.Ug = h.yd)) : ii(d, g, e, k, h) : ii(d, null, null, null, null) + } + } + } + ih.prototype.doDragOver = function() {}; + + function ji(a, b) { + var c = a.h; + if (null !== c) { + a.fj && di(a, !0); + Oh(a); + var d = ei(c, b, null, function(b) { + return !bi(a, b) + }), + e = c.Q; + e.Ge = d; + if (null !== d) { + e.Gc = !1; + for (var g = d; null !== g;) { + var h = g.rA; + if (null !== h && (h(e, g), e.Gc)) break; + g = gi(g) + } + } else h = c.rA, null !== h && h(e); + if (a.ua || null !== Hh) + if (a.doDropOnto(b, d), a.ua || null !== Hh) + for (d = c.selection.i; d.next();) e = d.value, e instanceof E && ki(c, e.W) + } + } + ih.prototype.doDropOnto = function() {}; + ih.prototype.doMouseMove = function() { + if (this.ua) { + var a = this.h; + if (null !== a && null !== this.bn && null !== this.hc) { + var b = !1, + c = !1; + this.mayCopy() ? (b = !0, a.gc = "copy", Yh(this, !1), Gh(this, this.oc), Zh(this, this.oc, !1), Ph(this, this.oc)) : this.mayMove() ? (c = !0, a.gc = "default", Sh(this), Zh(this, this.hc, !0)) : this.mayDragOut() ? (a.gc = "no-drop", Yh(this, !1), Zh(this, this.oc, !1)) : Sh(this); + ci(this, a.Q.ga, c, b) + } + } + }; + ih.prototype.doMouseUp = function() { + if (this.ua) { + var a = this.h; + if (null !== a) { + var b = !1, + c = this.mayCopy(); + c && null !== this.oc ? (Sh(this), Yh(this, !0), Gh(this, this.oc), Zh(this, this.oc, !1), Ph(this, this.oc), null !== this.oc && a.FF(this.oc.uj())) : (b = !0, Sh(this), this.mayMove() && (Zh(this, this.hc, !0), ci(this, a.Q.ga, !0, !1))); + this.Uq = !0; + ji(this, a.Q.ga); + if (this.ua) { + this.oc = null; + if (b && null !== this.hc) + for (b = this.hc.i; b.next();) { + var d = b.key; + d instanceof E && (d = d.Va, null === d || null === d.placeholder || this.hc.contains(d) || d.VD && d.S()) + } + a.yc(); + Ph(this, this.hc); + this.Mf = c ? "Copy" : "Move"; + a.Ja(c ? "SelectionCopied" : "SelectionMoved", a.selection) + } + this.stopTool() + } + } + }; + ih.prototype.mayCopy = function() { + if (!this.LE) return !1; + var a = this.h; + if (null === a || a.jb || a.Ef || !a.ap || !a.kk || (z.rk ? !a.Q.alt : !a.Q.control)) return !1; + for (a = a.selection.i; a.next();) { + var b = a.value; + if (b.be() && b.canCopy()) return !0 + } + return null !== this.ld && this.fj && this.ld.canCopy() ? !0 : !1 + }; + ih.prototype.mayDragOut = function() { + if (!this.LE) return !1; + var a = this.h; + if (null === a || !a.kt || !a.kk || a.ul) return !1; + for (a = a.selection.i; a.next();) { + var b = a.value; + if (b.be() && b.canCopy()) return !0 + } + return null !== this.ld && this.fj && this.ld.canCopy() ? !0 : !1 + }; + ih.prototype.mayMove = function() { + var a = this.h; + if (null === a || a.jb || !a.ul) return !1; + for (a = a.selection.i; a.next();) { + var b = a.value; + if (b.be() && b.canMove()) return !0 + } + return null !== this.ld && this.fj && this.ld.canMove() ? !0 : !1 + }; + var Qh = new J(ih), + Hh = null, + Ih = null; + ih.prototype.mayDragIn = function() { + var a = this.h; + if (null === a || !a.FD || a.jb || a.Ef || !a.ap) return !1; + var b = Hh; + return null === b || b.h.ha.Al !== a.ha.Al ? !1 : !0 + }; + ih.prototype.doSimulatedDragEnter = function() { + if (this.mayDragIn()) { + var a = this.h; + a.Ua.oi(); + li(a); + a = Hh; + null !== a && (a.h.gc = "copy") + } + }; + ih.prototype.doSimulatedDragLeave = function() { + var a = Hh; + null !== a && a.doSimulatedDragOut(); + this.doCancel() + }; + ih.prototype.doSimulatedDragOver = function() { + var a = this.h; + if (null !== a) { + var b = Hh; + null !== b && null !== b.hc && this.mayDragIn() && (a.gc = "copy", mi(this, b.hc.uj(), !1), Zh(this, this.oc, !1), ci(this, a.Q.ga, !1, !0)) + } + }; + ih.prototype.doSimulatedDrop = function() { + var a = this.h; + if (null !== a) { + var b = Hh; + if (null !== b) { + var c = b.h; + b.Uq = !0; + Sh(this); + this.mayDragIn() && (this.Wb("Drop"), mi(this, b.hc.uj(), !0), Zh(this, this.oc, !1), null !== this.oc && a.FF(this.oc.uj()), ji(this, a.Q.ga), a.yc(), b = a.selection, null !== this.oc ? this.Mf = "ExternalCopy" : b = new K(D), this.oc = null, a.focus(), a.Ja("ExternalObjectsDropped", b, c), this.xk()) + } + } + }; + + function mi(a, b, c) { + if (null === a.oc) { + var d = a.h; + if (null !== d && !d.jb && !d.Ef) { + d.Bb = !c; + d.lq = !c; + a.wk = d.Q.ga; + d = d.hp(b, d, !0); + c = z.kg(); + Xh(b, c); + var e = c.x + c.width / 2, + g = c.y + c.height / 2; + z.dc(c); + var h = a.qw; + c = new na(D); + var k = z.O(); + for (b = b.i; b.next();) { + var l = b.value; + if (l.be() && l.canCopy()) { + var m = l.location, + l = d.na(l); + k.n(h.x - (e - m.x), h.y - (g - m.y)); + l.location = k; + l.Bf(); + c.add(l, Lh(k)) + } + } + z.A(k); + for (d = d.i; d.next();) e = d.value, e instanceof G && e.canCopy() && c.add(e, Lh()); + a.oc = c; + Fh(a, c.uj()); + null !== a.ld && (c = a.ld, d = c.un, c.Rl(a.wk.x - + (d.x + d.width / 2), a.wk.y - (d.y + d.height / 2))) + } + } + } + ih.prototype.doSimulatedDragOut = function() { + var a = this.h; + null !== a && (this.mayCopy() || this.mayMove() ? a.gc = "" : a.gc = "no-drop") + }; + + function Mh(a) { + this.point = a; + this.LF = Id + } + z.ia("DraggingInfo", Mh); + + function $h(a, b, c) { + this.Pc = a; + this.info = b; + this.SH = c + } + + function ni() { + 0 < arguments.length && z.od(ni); + ug.call(this); + this.UC = 100; + this.wC = !1; + var a = new G, + b = new X; + b.Ff = !0; + b.stroke = "blue"; + a.add(b); + b = new X; + b.fq = "Standard"; + b.fill = "blue"; + b.stroke = "blue"; + a.add(b); + a.If = "Tool"; + this.mD = a; + a = new E; + b = new X; + b.yd = ""; + b.Hb = "Rectangle"; + b.fill = null; + b.stroke = "magenta"; + b.ub = 2; + b.Aa = Qd; + a.add(b); + a.vk = !1; + a.If = "Tool"; + this.kD = a; + this.lD = b; + a = new E; + b = new X; + b.yd = ""; + b.Hb = "Rectangle"; + b.fill = null; + b.stroke = "magenta"; + b.ub = 2; + b.Aa = Qd; + a.add(b); + a.vk = !1; + a.If = "Tool"; + this.nD = a; + this.oD = b; + this.RC = this.QC = + this.MC = this.LC = this.NC = null; + this.sC = !0; + this.GG = new na(O, "boolean"); + this.VC = this.el = this.gD = null + } + z.Qa(ni, ug); + z.ia("LinkingBaseTool", ni); + ni.prototype.doStop = function() { + var a = this.h; + null !== a && Nh(a); + this.Qg = this.Pg = this.Og = this.Ng = this.sc = null; + this.Sx.clear(); + this.jg = null + }; + z.defineProperty(ni, { + iF: "portGravity" + }, function() { + return this.UC + }, function(a) { + z.g(a, "number", ni, "portGravity"); + 0 <= a && (this.UC = a) + }); + z.defineProperty(ni, { + Cp: "isUnconnectedLinkValid" + }, function() { + return this.wC + }, function(a) { + z.g(a, "boolean", ni, "isUnconnectedLinkValid"); + this.wC = a + }); + z.defineProperty(ni, { + Tg: "temporaryLink" + }, function() { + return this.mD + }, function(a) { + z.l(a, G, ni, "temporaryLink"); + this.mD = a + }); + z.defineProperty(ni, { + Od: "temporaryFromNode" + }, function() { + return this.kD + }, function(a) { + z.l(a, E, ni, "temporaryFromNode"); + this.kD = a + }); + z.defineProperty(ni, { + zn: "temporaryFromPort" + }, function() { + return this.lD + }, function(a) { + z.l(a, O, ni, "temporaryFromPort"); + this.lD = a + }); + z.defineProperty(ni, { + Pd: "temporaryToNode" + }, function() { + return this.nD + }, function(a) { + z.l(a, E, ni, "temporaryToNode"); + this.nD = a + }); + z.defineProperty(ni, { + An: "temporaryToPort" + }, function() { + return this.oD + }, function(a) { + z.l(a, O, ni, "temporaryToPort"); + this.oD = a + }); + z.defineProperty(ni, { + sc: "originalLink" + }, function() { + return this.NC + }, function(a) { + null !== a && z.l(a, G, ni, "originalLink"); + this.NC = a + }); + z.defineProperty(ni, { + Ng: "originalFromNode" + }, function() { + return this.LC + }, function(a) { + null !== a && z.l(a, E, ni, "originalFromNode"); + this.LC = a + }); + z.defineProperty(ni, { + Og: "originalFromPort" + }, function() { + return this.MC + }, function(a) { + null !== a && z.l(a, O, ni, "originalFromPort"); + this.MC = a + }); + z.defineProperty(ni, { + Pg: "originalToNode" + }, function() { + return this.QC + }, function(a) { + null !== a && z.l(a, E, ni, "originalToNode"); + this.QC = a + }); + z.defineProperty(ni, { + Qg: "originalToPort" + }, function() { + return this.RC + }, function(a) { + null !== a && z.l(a, O, ni, "originalToPort"); + this.RC = a + }); + z.defineProperty(ni, { + Md: "isForwards" + }, function() { + return this.sC + }, function(a) { + z.g(a, "boolean", ni, "isForwards"); + this.sC = a + }); + z.w(ni, { + Sx: "validPortsCache" + }, function() { + return this.GG + }); + z.defineProperty(ni, { + jg: "targetPort" + }, function() { + return this.gD + }, function(a) { + null !== a && z.l(a, O, ni, "targetPort"); + this.gD = a + }); + ni.prototype.copyPortProperties = function(a, b, c, d, e) { + if (null !== a && null !== b && null !== c && null !== d) { + d.Aa = b.W.size; + e ? (d.Eb = b.Eb, d.Yl = b.Yl) : (d.Db = b.Db, d.Il = b.Il); + c.of = ec; + var g = z.O(); + c.location = b.fb(ec, g); + z.A(g); + d.angle = b.Kl(); + null !== this.Ax && this.Ax(a, b, c, d, e) + } + }; + ni.prototype.setNoTargetPortProperties = function(a, b, c) { + null !== b && (b.Aa = Qd, b.Db = Yb, b.Eb = Yb); + null !== a && (a.location = this.h.Q.ga); + null !== this.Ax && this.Ax(null, null, a, b, c) + }; + ni.prototype.doMouseDown = function() { + this.ua && this.doMouseMove() + }; + ni.prototype.doMouseMove = function() { + if (this.ua) { + var a = this.h; + if (null !== a) { + this.jg = this.findTargetPort(this.Md); + if (null !== this.jg) { + var b = this.jg.ca; + if (b instanceof E) { + this.Md ? this.copyPortProperties(b, this.jg, this.Pd, this.An, !0) : this.copyPortProperties(b, this.jg, this.Od, this.zn, !1); + return + } + } + this.Md ? this.setNoTargetPortProperties(this.Pd, this.An, !0) : this.setNoTargetPortProperties(this.Od, this.zn, !1); + (a.xe || a.ye) && fi(a, a.Q.te) + } + } + }; + ni.prototype.findValidLinkablePort = function(a, b) { + if (null === a) return null; + var c = a.ca; + if (!(c instanceof E)) return null; + for (; null !== a;) { + var d = b ? a.TF : a.vE; + if (!0 === d && (null !== a.yd || a instanceof E) && (b ? this.isValidTo(c, a) : this.isValidFrom(c, a))) return a; + if (!1 === d) break; + a = a.U + } + return null + }; + ni.prototype.findTargetPort = function(a) { + var b = this.h, + c = b.Q.ga, + d = this.iF; + 0 >= d && (d = .1); + for (var e = this, g = b.dn(c, d, function(b) { + return e.findValidLinkablePort(b, a) + }, null, !0), d = Infinity, b = null, g = g.i; g.next();) { + var h = g.value, + k = h.ca; + if (k instanceof E) { + var l = h.fb(ec, z.O()), + m = c.x - l.x, + n = c.y - l.y; + z.A(l); + l = m * m + n * n; + l < d && (m = this.Sx.na(h), null !== m ? m && (b = h, d = l) : a && this.isValidLink(this.Ng, this.Og, k, h) || !a && this.isValidLink(k, h, this.Pg, this.Qg) ? (this.Sx.add(h, !0), b = h, d = l) : this.Sx.add(h, !1)) + } + } + return null !== b && (c = b.ca, + c instanceof E && (null === c.layer || c.layer.lt)) ? b : null + }; + ni.prototype.isValidFrom = function(a, b) { + if (null === a || null === b) return this.Cp; + if (this.h.eb === this && (null !== a.layer && !a.layer.lt || !0 !== b.vE)) return !1; + var c = b.Yz; + if (Infinity > c) { + if (null !== this.sc && a === this.Ng && b === this.Og) return !0; + var d = b.yd; + null === d && (d = ""); + if (a.Yw(d).count >= c) return !1 + } + return !0 + }; + ni.prototype.isValidTo = function(a, b) { + if (null === a || null === b) return this.Cp; + if (this.h.eb === this && (null !== a.layer && !a.layer.lt || !0 !== b.TF)) return !1; + var c = b.wJ; + if (Infinity > c) { + if (null !== this.sc && a === this.Pg && b === this.Qg) return !0; + var d = b.yd; + null === d && (d = ""); + if (a.Hg(d).count >= c) return !1 + } + return !0 + }; + ni.prototype.isInSameNode = function(a, b) { + if (null === a || null === b) return !1; + if (a === b) return !0; + var c = a.ca, + d = b.ca; + return null !== c && c === d + }; + ni.prototype.isLinked = function(a, b) { + if (null === a || null === b) return !1; + var c = a.ca; + if (!(c instanceof E)) return !1; + var d = a.yd; + null === d && (d = ""); + var e = b.ca; + if (!(e instanceof E)) return !1; + var g = b.yd; + null === g && (g = ""); + for (e = e.Hg(g); e.next();) + if (g = e.value, g.Y === c && g.$f === d) return !0; + return !1 + }; + ni.prototype.isValidLink = function(a, b, c, d) { + if (!this.isValidFrom(a, b) || !this.isValidTo(c, d) || !(null === b || null === d || (b.KH && d.vJ || !this.isInSameNode(b, d)) && (b.JH && d.uJ || !this.isLinked(b, d))) || null !== this.sc && (null !== a && this.isLabelDependentOnLink(a, this.sc) || null !== c && this.isLabelDependentOnLink(c, this.sc)) || null !== a && null !== c && (null === a.data && null !== c.data || null !== a.data && null === c.data) || !this.isValidCycle(a, c, this.sc)) return !1; + if (null !== a) { + var e = a.px; + if (null !== e && !e(a, b, c, d, this.sc)) return !1 + } + if (null !== + c && (e = c.px, null !== e && !e(a, b, c, d, this.sc))) return !1; + e = this.px; + return null !== e ? e(a, b, c, d, this.sc) : !0 + }; + ni.prototype.isLabelDependentOnLink = function(a, b) { + if (null === a) return !1; + var c = a.Nd; + if (null === c) return !1; + if (c === b) return !0; + var d = new K(E); + d.add(a); + return oi(this, c, b, d) + }; + + function oi(a, b, c, d) { + if (b === c) return !0; + var e = b.Y; + if (null !== e && e.Df && (d.add(e), oi(a, e.Nd, c, d))) return !0; + b = b.da; + return null !== b && b.Df && (d.add(b), oi(a, b.Nd, c, d)) ? !0 : !1 + } + ni.prototype.isValidCycle = function(a, b, c) { + void 0 === c && (c = null); + if (null === a || null === b) return this.Cp; + var d = this.h.CJ; + if (d !== yi) { + if (d === zi) { + if (null !== c && !c.Oc) return !0; + for (d = b.ee; d.next();) { + var e = d.value; + if (e !== c && e.Oc && e.da === b) return !1 + } + return !Ai(this, a, b, c, !0) + } + if (d === Bi) { + if (null !== c && !c.Oc) return !0; + for (d = a.ee; d.next();) + if (e = d.value, e !== c && e.Oc && e.Y === a) return !1; + return !Ai(this, a, b, c, !0) + } + if (d === Ci) return a === b ? a = !0 : (d = new K(E), d.add(b), a = Di(this, d, a, b, c)), !a; + if (d === Ei) return !Ai(this, a, b, c, !1); + if (d === + Fi) return a === b ? a = !0 : (d = new K(E), d.add(b), a = Gi(this, d, a, b, c)), !a + } + return !0 + }; + + function Ai(a, b, c, d, e) { + if (b === c) return !0; + if (null === b || null === c) return !1; + for (var g = b.ee; g.next();) { + var h = g.value; + if (h !== d && (!e || h.Oc) && h.da === b && (h = h.Y, h !== b && Ai(a, h, c, d, e))) return !0 + } + return !1 + } + + function Di(a, b, c, d, e) { + if (c === d) return !0; + if (null === c || null === d || b.contains(c)) return !1; + b.add(c); + for (var g = c.ee; g.next();) { + var h = g.value; + if (h !== e && h.da === c && (h = h.Y, h !== c && Di(a, b, h, d, e))) return !0 + } + return !1 + } + + function Gi(a, b, c, d, e) { + if (c === d) return !0; + if (null === c || null === d || b.contains(c)) return !1; + b.add(c); + for (var g = c.ee; g.next();) { + var h = g.value; + if (h !== e) { + var k = h.Y, + h = h.da, + k = k === c ? h : k; + if (k !== c && Gi(a, b, k, d, e)) return !0 + } + } + return !1 + } + z.defineProperty(ni, { + px: "linkValidation" + }, function() { + return this.el + }, function(a) { + null !== a && z.g(a, "function", ni, "linkValidation"); + this.el = a + }); + z.defineProperty(ni, { + Ax: "portTargeted" + }, function() { + return this.VC + }, function(a) { + null !== a && z.g(a, "function", ni, "portTargeted"); + this.VC = a + }); + + function ta() { + 0 < arguments.length && z.od(ta); + ni.call(this); + this.name = "Linking"; + this.ky = {}; + this.jy = null; + this.fa = Hi; + this.dD = null + } + z.Qa(ta, ni); + z.ia("LinkingTool", ta); + var Hi; + ta.Either = Hi = z.s(ta, "Either", 0); + var Ii; + ta.ForwardsOnly = Ii = z.s(ta, "ForwardsOnly", 0); + var Ji; + ta.BackwardsOnly = Ji = z.s(ta, "BackwardsOnly", 0); + z.defineProperty(ta, { + TG: "archetypeLinkData" + }, function() { + return this.ky + }, function(a) { + null !== a && z.l(a, Object, ta, "archetypeLinkData"); + a instanceof O && z.l(a, G, ta, "archetypeLinkData"); + this.ky = a + }); + z.defineProperty(ta, { + JD: "archetypeLabelNodeData" + }, function() { + return this.jy + }, function(a) { + null !== a && z.l(a, Object, ta, "archetypeLabelNodeData"); + a instanceof O && z.l(a, E, ta, "archetypeLabelNodeData"); + this.jy = a + }); + z.defineProperty(ta, { + direction: "direction" + }, function() { + return this.fa + }, function(a) { + z.Ba(a, ta, ta, "direction"); + this.fa = a + }); + z.defineProperty(ta, { + PF: "startObject" + }, function() { + return this.dD + }, function(a) { + null !== a && z.l(a, O, ta, "startObject"); + this.dD = a + }); + ta.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a || a.jb || a.Ef || !a.lt) return !1; + var b = a.ha; + return (b instanceof V || b instanceof ng) && a.Q.left && (a.eb === this || this.isBeyondDragSize()) ? null !== this.findLinkablePort() : !1 + }; + ta.prototype.findLinkablePort = function() { + var a = this.h; + if (null === a) return null; + var b = this.PF; + null === b && (b = a.pe(a.Fc.ga, null, null)); + if (null === b || !(b.ca instanceof E)) return null; + a = this.direction; + if (a === Hi || a === Ii) { + var c = this.findValidLinkablePort(b, !1); + if (null !== c) return this.Md = !0, c + } + if (a === Hi || a === Ji) + if (c = this.findValidLinkablePort(b, !0), null !== c) return this.Md = !1, c; + return null + }; + ta.prototype.doActivate = function() { + var a = this.h; + if (null !== a) { + var b = this.findLinkablePort(); + null !== b && (this.Wb(this.name), a.We = !0, a.gc = "pointer", this.Md ? (null === this.Pd || this.Pd.location.F() || (this.Pd.location = a.Q.ga), this.Og = b, b = this.Og.ca, b instanceof E && (this.Ng = b), this.copyPortProperties(this.Ng, this.Og, this.Od, this.zn, !1)) : (null === this.Od || this.Od.location.F() || (this.Od.location = a.Q.ga), this.Qg = b, b = this.Qg.ca, b instanceof E && (this.Pg = b), this.copyPortProperties(this.Pg, this.Qg, this.Pd, this.An, !0)), a.add(this.Od), a.add(this.Pd), null !== this.Tg && (null !== this.Od && (this.Tg.Y = this.Od), null !== this.Pd && (this.Tg.da = this.Pd), this.Tg.qc(), a.add(this.Tg)), this.ua = !0) + } + }; + ta.prototype.doDeactivate = function() { + this.ua = !1; + var a = this.h; + null !== a && (a.remove(this.Tg), a.remove(this.Od), a.remove(this.Pd), a.We = !1, a.gc = "", this.xk()) + }; + ta.prototype.doStop = function() { + ni.prototype.doStop.call(this); + this.PF = null + }; + ta.prototype.doMouseUp = function() { + if (this.ua) { + var a = this.h; + if (null === a) return; + var b = this.Mf = null, + c = null, + d = null, + e = null, + g = this.jg = this.findTargetPort(this.Md); + if (null !== g) { + var h = g.ca; + h instanceof E && (this.Md ? (null !== this.Ng && (b = this.Ng, c = this.Og), d = h, e = g) : (b = h, c = g, null !== this.Pg && (d = this.Pg, e = this.Qg))) + } else this.Md ? null !== this.Ng && this.Cp && (b = this.Ng, c = this.Og) : null !== this.Pg && this.Cp && (d = this.Pg, e = this.Qg); + null !== b || null !== d ? (h = this.insertLink(b, c, d, e), null !== h ? (null === g && (this.Md ? h.Zn = a.Q.ga.copy() : + h.Vn = a.Q.ga.copy()), a.xf && a.select(h), this.Mf = this.name, a.Ja("LinkDrawn", h)) : (a.ha.QD(), this.doNoLink(b, c, d, e))) : this.Md ? this.doNoLink(this.Ng, this.Og, null, null) : this.doNoLink(null, null, this.Pg, this.Qg) + } + this.stopTool() + }; + ta.prototype.insertLink = function(a, b, c, d) { + var e = this.h; + if (null === e) return null; + var g = e.ha; + if (g instanceof ng) { + var h = a; + b = c; + e.ce || (h = c, b = a); + if (null !== h && null !== b) return g.Eh(b.data, g.pb(h.data)), b.pp() + } else if (g instanceof V) + if (h = "", null !== a && (null === b && (b = a), h = b.yd, null === h && (h = "")), b = "", null !== c && (null === d && (d = c), b = d.yd, null === b && (b = "")), d = this.TG, d instanceof G) { + if (gh(d), g = d.copy(), null !== g) return g.Y = a, g.$f = h, g.da = c, g.Ug = b, e.add(g), a = this.JD, a instanceof E && (gh(a), a = a.copy(), null !== a && (a.Nd = g, e.add(a))), + g + } else if (null !== d && (d = g.Pw(d), z.Za(d))) return null !== a && g.Kx(d, g.pb(a.data)), g.PA(d, h), null !== c && g.Ox(d, g.pb(c.data)), g.SA(d, b), g.gt(d), a = this.JD, null === a || a instanceof E || (a = g.copyNodeData(a), z.Za(a) && (g.rl(a), a = g.pb(a), void 0 !== a && g.zz(d, a))), g = e.Zf(d); + return null + }; + ta.prototype.doNoLink = function() {}; + + function Jh() { + 0 < arguments.length && z.od(Jh); + ni.call(this); + this.name = "Relinking"; + var a = new X; + a.Hb = "Diamond"; + a.Aa = be; + a.fill = "lightblue"; + a.stroke = "dodgerblue"; + a.cursor = "pointer"; + a.De = 0; + this.eC = a; + a = new X; + a.Hb = "Diamond"; + a.Aa = be; + a.fill = "lightblue"; + a.stroke = "dodgerblue"; + a.cursor = "pointer"; + a.De = -1; + this.pD = a; + this.ac = null; + this.OC = new w + } + z.Qa(Jh, ni); + z.ia("RelinkingTool", Jh); + Jh.prototype.updateAdornments = function(a) { + if (null !== a && a instanceof G) { + var b = "RelinkFrom", + c = null; + if (a.kb && !this.h.jb) { + var d = a.vn; + null !== d && a.canRelinkFrom() && a.W.F() && a.isVisible() && d.W.F() && d.nj() && (c = a.lp(b), null === c && (c = this.makeAdornment(d, !1), null !== c && (c.nc = b), a.ql(b, c))) + } + null === c && a.rj(b); + b = "RelinkTo"; + c = null; + a.kb && !this.h.jb && (d = a.vn, null !== d && a.canRelinkTo() && a.W.F() && a.isVisible() && d.W.F() && d.nj() && (c = a.lp(b), null === c && (c = this.makeAdornment(d, !0), null !== c && (c.nc = b), a.ql(b, c)))); + null === c && + a.rj(b) + } + }; + Jh.prototype.makeAdornment = function(a, b) { + var c = new da; + c.type = Ki; + var d = b ? this.tJ : this.IH; + null !== d && c.add(d.copy()); + c.fc = a; + return c + }; + z.defineProperty(Jh, { + IH: "fromHandleArchetype" + }, function() { + return this.eC + }, function(a) { + null !== a && z.l(a, O, Jh, "fromHandleArchetype"); + this.eC = a + }); + z.defineProperty(Jh, { + tJ: "toHandleArchetype" + }, function() { + return this.pD + }, function(a) { + null !== a && z.l(a, O, Jh, "toHandleArchetype"); + this.pD = a + }); + z.w(Jh, { + handle: "handle" + }, function() { + return this.ac + }); + Jh.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a || a.jb || a.Ef || !a.Tm) return !1; + var b = a.ha; + if (!(b instanceof V || b instanceof ng) || !a.Q.left) return !1; + b = this.findToolHandleAt(a.Fc.ga, "RelinkFrom"); + null === b && (b = this.findToolHandleAt(a.Fc.ga, "RelinkTo")); + return null !== b + }; + Jh.prototype.doActivate = function() { + var a = this.h; + if (null !== a) { + if (null === this.sc) { + var b = this.findToolHandleAt(a.Fc.ga, "RelinkFrom"); + null === b && (b = this.findToolHandleAt(a.Fc.ga, "RelinkTo")); + if (null === b) return; + var c = b.ca; + if (!(c instanceof da && c.Wf instanceof G)) return; + this.ac = b; + this.Md = null === c || "RelinkTo" === c.nc; + this.sc = c.Wf + } + this.Wb(this.name); + a.We = !0; + a.gc = "pointer"; + this.Og = this.sc.md; + this.Ng = this.sc.Y; + this.Qg = this.sc.Qd; + this.Pg = this.sc.da; + this.OC.set(this.sc.W); + null !== this.sc && 0 < this.sc.sa && (null === + this.sc.Y && (null !== this.zn && (this.zn.Aa = Pd), null !== this.Od && (this.Od.location = this.sc.m(0))), null === this.sc.da && (null !== this.An && (this.An.Aa = Pd), null !== this.Pd && (this.Pd.location = this.sc.m(this.sc.sa - 1)))); + this.copyPortProperties(this.Ng, this.Og, this.Od, this.zn, !1); + this.copyPortProperties(this.Pg, this.Qg, this.Pd, this.An, !0); + a.add(this.Od); + a.add(this.Pd); + null !== this.Tg && (null !== this.Od && (this.Tg.Y = this.Od), null !== this.Pd && (this.Tg.da = this.Pd), this.copyLinkProperties(this.sc, this.Tg), this.Tg.qc(), a.add(this.Tg)); + this.ua = !0 + } + }; + Jh.prototype.copyLinkProperties = function(a, b) { + if (null !== a && null !== b) { + b.it = a.it; + b.Kz = a.Kz; + var c = a.Se; + if (c === Li || c === Mi) c = Ni; + b.Se = c; + b.Qw = a.Qw; + b.Gx = a.Gx; + b.cq = a.cq; + b.Db = a.Db; + b.Il = a.Il; + b.Et = a.Et; + b.Ft = a.Ft; + b.Eb = a.Eb; + b.Yl = a.Yl; + b.zu = a.zu; + b.Au = a.Au + } + }; + Jh.prototype.doDeactivate = function() { + this.ua = !1; + var a = this.h; + null !== a && (a.remove(this.Tg), a.remove(this.Od), a.remove(this.Pd), a.We = !1, a.gc = "", this.xk()) + }; + Jh.prototype.doStop = function() { + ni.prototype.doStop.call(this); + this.ac = null + }; + Jh.prototype.doMouseUp = function() { + if (this.ua) { + var a = this.h; + if (null === a) return; + this.Mf = null; + var b = this.Ng, + c = this.Og, + d = this.Pg, + e = this.Qg, + g = this.sc; + this.jg = this.findTargetPort(this.Md); + if (null !== this.jg) { + var h = this.jg.ca; + h instanceof E && (this.Md ? (d = h, e = this.jg) : (b = h, c = this.jg)) + } else this.Cp ? this.Md ? e = d = null : c = b = null : g = null; + null !== g ? (this.reconnectLink(g, this.Md ? d : b, this.Md ? e : c, this.Md), null === this.jg && (this.Md ? g.Zn = a.Q.ga.copy() : g.Vn = a.Q.ga.copy(), g.qc()), a.xf && (g.kb = !0), this.Mf = this.name, a.Ja("LinkRelinked", + g, this.Md ? this.Qg : this.Og)) : this.doNoRelink(this.sc, this.Md); + Oi(this.sc, this.OC) + } + this.stopTool() + }; + Jh.prototype.reconnectLink = function(a, b, c, d) { + if (null === this.h) return !1; + c = null !== c && null !== c.yd ? c.yd : ""; + d ? (a.da = b, a.Ug = c) : (a.Y = b, a.$f = c); + return !0 + }; + Jh.prototype.doNoRelink = function() {}; + + function ii(a, b, c, d, e) { + null !== b ? (a.copyPortProperties(b, c, a.Od, a.zn, !1), a.h.add(a.Od)) : a.h.remove(a.Od); + null !== d ? (a.copyPortProperties(d, e, a.Pd, a.An, !0), a.h.add(a.Pd)) : a.h.remove(a.Pd) + } + + function Pi() { + 0 < arguments.length && z.od(Pi); + ug.call(this); + this.name = "LinkReshaping"; + var a = new X; + a.Hb = "Rectangle"; + a.Aa = ae; + a.fill = "lightblue"; + a.stroke = "dodgerblue"; + this.Uk = a; + a = new X; + a.Hb = "Diamond"; + a.Aa = ae; + a.fill = "lightblue"; + a.stroke = "dodgerblue"; + this.CC = a; + this.WC = 3; + this.hy = this.ac = null; + this.PC = new N; + this.Vv = null + } + z.Qa(Pi, ug); + z.ia("LinkReshapingTool", Pi); + var Qi; + Pi.None = Qi = z.s(Pi, "None", 0); + var Ri; + Pi.Horizontal = Ri = z.s(Pi, "Horizontal", 1); + var Si; + Pi.Vertical = Si = z.s(Pi, "Vertical", 2); + var Ti; + Pi.All = Ti = z.s(Pi, "All", 3); + Pi.prototype.getReshapingBehavior = Pi.prototype.zE = function(a) { + return a && a.XC ? a.XC : Qi + }; + Pi.prototype.setReshapingBehavior = Pi.prototype.su = function(a, b) { + z.l(a, O, Pi, "setReshapingBehavior:obj"); + z.Ba(b, Pi, Pi, "setReshapingBehavior:behavior"); + a.XC = b + }; + Pi.prototype.updateAdornments = function(a) { + if (null !== a && a instanceof G) { + if (a.kb && !this.h.jb) { + var b = a.path; + if (null !== b && a.canReshape() && a.W.F() && a.isVisible() && b.W.F() && b.nj()) { + var c = a.lp(this.name); + if (null === c || c.wG !== a.sa || c.IG !== a.lu) c = this.makeAdornment(b), null !== c && (c.wG = a.sa, c.IG = a.lu, a.ql(this.name, c)); + if (null !== c) { + c.location = a.position; + return + } + } + } + a.rj(this.name) + } + }; + Pi.prototype.makeAdornment = function(a) { + var b = a.ca, + c = b.sa, + d = b.rc, + e = null; + if (null !== b.points && 1 < c) { + e = new da; + e.type = Ki; + var c = b.Bt, + g = b.ox, + h = d ? 1 : 0; + if (b.lu && b.Se !== Ui) + for (var k = c + h; k < g - h; k++) { + var l = this.makeResegmentHandle(a, k); + null !== l && (l.De = k, l.NA = .5, l.Yz = 999, e.add(l)) + } + for (k = c + 1; k < g; k++) + if (l = this.makeHandle(a, k), null !== l) { + l.De = k; + if (k !== c) + if (k === c + 1 && d) { + var h = b.m(c), + m = b.m(c + 1); + eb(h.x, m.x) && eb(h.y, m.y) && (m = b.m(c - 1)); + eb(h.x, m.x) ? (this.su(l, Si), l.cursor = "n-resize") : eb(h.y, m.y) && (this.su(l, Ri), l.cursor = "w-resize") + } else k === + g - 1 && d ? (h = b.m(g - 1), m = b.m(g), eb(h.x, m.x) && eb(h.y, m.y) && (h = b.m(g + 1)), eb(h.x, m.x) ? (this.su(l, Si), l.cursor = "n-resize") : eb(h.y, m.y) && (this.su(l, Ri), l.cursor = "w-resize")) : k !== g && (this.su(l, Ti), l.cursor = "move"); + e.add(l) + } + e.nc = this.name; + e.fc = a + } + return e + }; + Pi.prototype.makeHandle = function() { + var a = this.Ht; + return null === a ? null : a.copy() + }; + z.defineProperty(Pi, { + Ht: "handleArchetype" + }, function() { + return this.Uk + }, function(a) { + null !== a && z.l(a, O, Pi, "handleArchetype"); + this.Uk = a + }); + Pi.prototype.makeResegmentHandle = function() { + var a = this.FI; + return null === a ? null : a.copy() + }; + z.defineProperty(Pi, { + FI: "midHandleArchetype" + }, function() { + return this.CC + }, function(a) { + null !== a && z.l(a, O, Pi, "midHandleArchetype"); + this.CC = a + }); + z.w(Pi, { + handle: "handle" + }, function() { + return this.ac + }); + z.w(Pi, { + jt: "adornedLink" + }, function() { + return this.hy + }); + Pi.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + return null !== a && !a.jb && a.Fw && a.Q.left ? null !== this.findToolHandleAt(a.Fc.ga, this.name) : !1 + }; + Pi.prototype.doActivate = function() { + var a = this.h; + if (null !== a && (this.ac = this.findToolHandleAt(a.Fc.ga, this.name), null !== this.ac)) { + var b = this.ac.ca.Wf; + if (b instanceof G) { + this.hy = b; + a.We = !0; + this.Wb(this.name); + if (b.lu && 999 === this.ac.Yz) { + var c = b.points.copy(), + d = this.ac.fb(ec); + c.Ld(this.ac.De + 1, d); + b.rc && c.Ld(this.ac.De + 1, d); + b.points = c; + b.ae(); + this.ac = this.findToolHandleAt(a.Fc.ga, this.name); + if (null === this.ac) { + this.doDeactivate(); + return + } + } + this.PC = b.m(this.ac.De); + this.Vv = b.points.copy(); + this.ua = !0 + } + } + }; + Pi.prototype.doDeactivate = function() { + this.xk(); + this.hy = this.ac = null; + var a = this.h; + null !== a && (a.We = !1); + this.ua = !1 + }; + Pi.prototype.doCancel = function() { + var a = this.jt; + null !== a && (a.points = this.Vv); + this.stopTool() + }; + Pi.prototype.doMouseMove = function() { + var a = this.h; + this.ua && null !== a && (a = this.computeReshape(a.Q.ga), this.reshape(a)) + }; + Pi.prototype.doMouseUp = function() { + var a = this.h; + if (this.ua && null !== a) { + var b = this.computeReshape(a.Q.ga); + this.reshape(b); + b = this.jt; + if (null !== b && b.lu) { + var c = this.handle.De, + d = b.m(c - 1), + e = b.m(c), + g = b.m(c + 1); + if (b.rc) { + if (c > b.Bt + 1 && c < b.ox - 1) { + var h = b.m(c - 2); + if (Math.abs(d.x - e.x) < this.Ch && Math.abs(d.y - e.y) < this.Ch && (Vi(this, h, d, e, g, !0) || Vi(this, h, d, e, g, !1))) { + var k = b.points.copy(); + Vi(this, h, d, e, g, !0) ? (k.Rg(c - 2, new N(h.x, (g.y + h.y) / 2)), k.Rg(c + 1, new N(g.x, (g.y + h.y) / 2))) : (k.Rg(c - 2, new N((g.x + h.x) / 2, h.y)), k.Rg(c + 1, + new N((g.x + h.x) / 2, g.y))); + k.dd(c); + k.dd(c - 1); + b.points = k; + b.ae() + } else h = b.m(c + 2), Math.abs(e.x - g.x) < this.Ch && Math.abs(e.y - g.y) < this.Ch && (Vi(this, d, e, g, h, !0) || Vi(this, d, e, g, h, !1)) && (k = b.points.copy(), Vi(this, d, e, g, h, !0) ? (k.Rg(c - 1, new N(d.x, (d.y + h.y) / 2)), k.Rg(c + 2, new N(h.x, (d.y + h.y) / 2))) : (k.Rg(c - 1, new N((d.x + h.x) / 2, d.y)), k.Rg(c + 2, new N((d.x + h.x) / 2, h.y))), k.dd(c + 1), k.dd(c), b.points = k, b.ae()) + } + } else h = z.O(), ib(d.x, d.y, g.x, g.y, e.x, e.y, h) && h.Af(e) < this.Ch * this.Ch && (k = b.points.copy(), k.dd(c), b.points = k, b.ae()), + z.A(h) + } + a.yc(); + this.Mf = this.name; + a.Ja("LinkReshaped", this.jt, this.Vv) + } + this.stopTool() + }; + + function Vi(a, b, c, d, e, g) { + return g ? Math.abs(b.y - c.y) < a.Ch && Math.abs(c.y - d.y) < a.Ch && Math.abs(d.y - e.y) < a.Ch : Math.abs(b.x - c.x) < a.Ch && Math.abs(c.x - d.x) < a.Ch && Math.abs(d.x - e.x) < a.Ch + } + z.defineProperty(Pi, { + Ch: "resegmentingDistance" + }, function() { + return this.WC + }, function(a) { + z.g(a, "number", Pi, "resegmentingDistance"); + this.WC = a + }); + Pi.prototype.reshape = function(a) { + var b = this.jt; + b.Ul(); + var c = this.handle.De, + d = this.zE(this.handle); + if (b.rc) + if (c === b.Bt + 1) c = b.Bt + 1, d === Si ? (b.aa(c, b.m(c - 1).x, a.y), b.aa(c + 1, b.m(c + 2).x, a.y)) : d === Ri && (b.aa(c, a.x, b.m(c - 1).y), b.aa(c + 1, a.x, b.m(c + 2).y)); + else if (c === b.ox - 1) c = b.ox - 1, d === Si ? (b.aa(c - 1, b.m(c - 2).x, a.y), b.aa(c, b.m(c + 1).x, a.y)) : d === Ri && (b.aa(c - 1, a.x, b.m(c - 2).y), b.aa(c, a.x, b.m(c + 1).y)); + else { + var d = c, + e = b.m(d), + g = b.m(d - 1), + h = b.m(d + 1); + eb(g.x, e.x) && eb(e.y, h.y) ? (eb(g.x, b.m(d - 2).x) && !eb(g.y, b.m(d - 2).y) ? (b.B(d, + a.x, g.y), c++, d++) : b.aa(d - 1, a.x, g.y), eb(h.y, b.m(d + 2).y) && !eb(h.x, b.m(d + 2).x) ? b.B(d + 1, h.x, a.y) : b.aa(d + 1, h.x, a.y)) : eb(g.y, e.y) && eb(e.x, h.x) ? (eb(g.y, b.m(d - 2).y) && !eb(g.x, b.m(d - 2).x) ? (b.B(d, g.x, a.y), c++, d++) : b.aa(d - 1, g.x, a.y), eb(h.x, b.m(d + 2).x) && !eb(h.y, b.m(d + 2).y) ? b.B(d + 1, a.x, h.y) : b.aa(d + 1, a.x, h.y)) : eb(g.x, e.x) && eb(e.x, h.x) ? (eb(g.x, b.m(d - 2).x) && !eb(g.y, b.m(d - 2).y) ? (b.B(d, a.x, g.y), c++, d++) : b.aa(d - 1, a.x, g.y), eb(h.x, b.m(d + 2).x) && !eb(h.y, b.m(d + 2).y) ? b.B(d + 1, a.x, h.y) : b.aa(d + 1, a.x, h.y)) : eb(g.y, e.y) && eb(e.y, + h.y) && (eb(g.y, b.m(d - 2).y) && !eb(g.x, b.m(d - 2).x) ? (b.B(d, g.x, a.y), c++, d++) : b.aa(d - 1, g.x, a.y), eb(h.y, b.m(d + 2).y) && !eb(h.x, b.m(d + 2).x) ? b.B(d + 1, h.x, a.y) : b.aa(d + 1, h.x, a.y)); + b.aa(c, a.x, a.y) + } else b.aa(c, a.x, a.y), 1 === c && b.computeSpot(!0).Be() && (e = b.Y, g = b.md, null === e || e.isVisible() || (e = e.findVisibleNode(), e !== b.Y && (g = e.Gl(""))), d = g.fb(ec, z.O()), e = b.getLinkPointFromPoint(e, g, d, a, !0, z.O()), b.aa(0, e.x, e.y), z.A(d), z.A(e)), c === b.sa - 2 && b.computeSpot(!1).Be() && (c = b.da, e = b.Qd, null === c || c.isVisible() || (c = c.findVisibleNode(), + c !== b.da && (e = c.Gl(""))), d = e.fb(ec, z.O()), e = b.getLinkPointFromPoint(c, e, d, a, !1, z.O()), b.aa(b.sa - 1, e.x, e.y), z.A(d), z.A(e)); + b.cj() + }; + Pi.prototype.computeReshape = function(a) { + var b = this.jt, + c = this.handle.De; + switch (this.zE(this.handle)) { + case Ti: + return a; + case Si: + return b = b.m(c), new N(b.x, a.y); + case Ri: + return b = b.m(c), new N(a.x, b.y); + default: + case Qi: + return b.m(c) + } + }; + z.w(Pi, { + eL: "originalPoint" + }, function() { + return this.PC + }); + z.w(Pi, { + fL: "originalPoints" + }, function() { + return this.Vv + }); + + function Wi() { + 0 < arguments.length && z.od(Wi); + ug.call(this); + this.name = "Resizing"; + this.Tj = (new Ea(1, 1)).freeze(); + this.Rj = (new Ea(9999, 9999)).freeze(); + this.zj = (new Ea(NaN, NaN)).freeze(); + this.jr = !1; + this.Ib = null; + var a = new X; + a.jk = ec; + a.Hb = "Rectangle"; + a.Aa = ae; + a.fill = "lightblue"; + a.stroke = "dodgerblue"; + a.ub = 1; + a.cursor = "pointer"; + this.Uk = a; + this.ac = null; + this.Uv = new Ea; + this.fz = new N; + this.Jy = new Ea(0, 0); + this.Iy = new Ea(Infinity, Infinity); + this.Hy = new Ea(1, 1); + this.IC = !0 + } + z.Qa(Wi, ug); + z.ia("ResizingTool", Wi); + Wi.prototype.updateAdornments = function(a) { + if (!(null === a || a instanceof G)) { + if (a.kb && !this.h.jb) { + var b = a.vF; + if (null !== b && a.canResize() && a.W.F() && a.isVisible() && b.W.F() && b.nj()) { + var c = a.lp(this.name); + if (null === c || c.fc !== b) c = this.makeAdornment(b); + if (null !== c) { + var d = b.Kl(); + c.angle = d; + var e = b.fb(c.of, z.O()), + g = b.gj(); + c.location = e; + z.A(e); + e = c.placeholder; + if (null !== e) { + var b = b.Ga, + h = z.Xl(); + h.n(b.width * g, b.height * g); + e.Aa = h; + z.pk(h) + } + Xi(this, c, d); + a.ql(this.name, c); + return + } + } + } + a.rj(this.name) + } + }; + Wi.prototype.makeAdornment = function(a) { + var b = null, + b = a.ca.uF; + if (null === b) { + b = new da; + b.type = Yi; + b.of = ec; + var c = new Zi; + c.Ff = !0; + b.add(c); + b.add(this.makeHandle(a, Zb)); + b.add(this.makeHandle(a, cc)); + b.add(this.makeHandle(a, ic)); + b.add(this.makeHandle(a, gc)); + b.add(this.makeHandle(a, Zc)); + b.add(this.makeHandle(a, ad)); + b.add(this.makeHandle(a, bd)); + b.add(this.makeHandle(a, $c)) + } else if (gh(b), b = b.copy(), null === b) return null; + b.nc = this.name; + b.fc = a; + return b + }; + Wi.prototype.makeHandle = function(a, b) { + var c = this.Ht; + if (null === c) return null; + c = c.copy(); + c.alignment = b; + return c + }; + + function Xi(a, b, c) { + if (null !== b) + if (!b.alignment.bd() && "" !== b.cursor) a: { + a = b.alignment;a.Be() && (a = ec); + if (0 >= a.x) c = 0 >= a.y ? c + 225 : 1 <= a.y ? c + 135 : c + 180; + else if (1 <= a.x) 0 >= a.y ? c += 315 : 1 <= a.y && (c += 45); + else if (0 >= a.y) c += 270; + else if (1 <= a.y) c += 90; + else break a;0 > c ? c += 360 : 360 <= c && (c -= 360);b.cursor = 22.5 > c ? "e-resize" : 67.5 > c ? "se-resize" : 112.5 > c ? "s-resize" : 157.5 > c ? "sw-resize" : 202.5 > c ? "w-resize" : 247.5 > c ? "nw-resize" : 292.5 > c ? "n-resize" : 337.5 > c ? "ne-resize" : "e-resize" + } + else if (b instanceof I) + for (b = b.elements; b.next();) Xi(a, + b.value, c) + } + z.defineProperty(Wi, { + Ht: "handleArchetype" + }, function() { + return this.Uk + }, function(a) { + null !== a && z.l(a, O, Wi, "handleArchetype"); + this.Uk = a + }); + z.w(Wi, { + handle: "handle" + }, function() { + return this.ac + }); + z.defineProperty(Wi, { + fc: "adornedObject" + }, function() { + return this.Ib + }, function(a) { + null !== a && z.l(a, O, Wi, "adornedObject"); + this.Ib = a + }); + Wi.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + return null !== a && !a.jb && a.mt && a.Q.left ? null !== this.findToolHandleAt(a.Fc.ga, this.name) ? !0 : !1 : !1 + }; + Wi.prototype.doActivate = function() { + var a = this.h; + null !== a && (this.ac = this.findToolHandleAt(a.Fc.ga, this.name), null !== this.ac && (this.Ib = this.ac.ca.fc, this.fz.set(this.Ib.ca.location), this.Uv.set(this.Ib.Aa), this.Hy = this.computeCellSize(), this.Jy = this.computeMinSize(), this.Iy = this.computeMaxSize(), a.We = !0, this.IC = a.Ua.isEnabled, a.Ua.isEnabled = !1, this.Wb(this.name), this.ua = !0)) + }; + Wi.prototype.doDeactivate = function() { + var a = this.h; + null !== a && (this.xk(), this.Ib = this.ac = null, this.ua = a.We = !1, a.Ua.isEnabled = this.IC) + }; + Wi.prototype.doCancel = function() { + this.Ib.Aa = this.Uv; + this.Ib.ca.location = this.fz; + this.stopTool() + }; + Wi.prototype.doMouseMove = function() { + var a = this.h; + if (this.ua && null !== a) { + var b = this.Jy, + c = this.Iy, + d = this.Hy, + e = this.Ib.xE(a.Q.ga, z.O()), + g = $i; + this.Ib instanceof X && (g = aj(this.Ib)); + b = this.computeResize(e, this.ac.alignment, b, c, d, !(g === bj || g === cj || a.Q.shift)); + this.resize(b); + a.bg(); + z.A(e) + } + }; + Wi.prototype.doMouseUp = function() { + var a = this.h; + if (this.ua && null !== a) { + var b = this.Jy, + c = this.Iy, + d = this.Hy, + e = this.Ib.xE(a.Q.ga, z.O()), + g = $i; + this.Ib instanceof X && (g = aj(this.Ib)); + b = this.computeResize(e, this.ac.alignment, b, c, d, !(g === bj || g === cj || a.Q.shift)); + this.resize(b); + z.A(e); + a.yc(); + this.Mf = this.name; + a.Ja("PartResized", this.Ib, this.Uv) + } + this.stopTool() + }; + Wi.prototype.resize = function(a) { + if (null !== this.h) { + var b = this.fc, + c = b.ca, + d = b.Kl(), + e = b.gj(), + g = Math.PI * d / 180, + h = Math.cos(g), + g = Math.sin(g), + k = 0 < d && 180 > d ? 1 : 0, + l = 90 < d && 270 > d ? 1 : 0, + d = 180 < d && 360 > d ? 1 : 0, + m = b.Ga.width, + n = b.Ga.height; + b.Aa = a.size; + var p = c.position.copy(); + c.Bf(); + m = b.Ga.width - m; + n = b.Ga.height - n; + if (0 !== m || 0 !== n) 0 !== m && (p.x += e * ((a.x + m * l) * h - (a.y + n * k) * g)), 0 !== n && (p.y += e * ((a.x + m * d) * g + (a.y + n * l) * h)), c.move(p), c instanceof E && c.mf() + } + }; + Wi.prototype.computeResize = function(a, b, c, d, e, g) { + b.Be() && (b = ec); + var h = this.fc.Ga, + k = h.x, + l = h.y, + m = h.x + h.width, + n = h.y + h.height, + p = 1; + if (!g) { + var p = h.width, + q = h.height; + 0 >= p && (p = 1); + 0 >= q && (q = 1); + p = q / p + } + q = z.O(); + jb(a.x, a.y, k, l, e.width, e.height, q); + a = h.copy(); + 0 >= b.x ? 0 >= b.y ? (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = Math.max(m - a.x, c.width), a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), a.height = Math.max(n - a.y, c.height), g || (b = a.height / a.width, p < b ? (a.height = p * a.width, a.y = n - a.height) : (a.width = + a.height / p, a.x = m - a.width))) : 1 <= b.y ? (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = Math.max(m - a.x, c.width), a.height = Math.max(Math.min(q.y - l, d.height), c.height), g || (b = a.height / a.width, p < b ? a.height = p * a.width : (a.width = a.height / p, a.x = m - a.width))) : (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = m - a.x, g || (a.height = p * a.width, a.y = l + .5 * (n - l - a.height))) : 1 <= b.x ? 0 >= b.y ? (a.width = Math.max(Math.min(q.x - k, d.width), c.width), a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), + a.height = Math.max(n - a.y, c.height), g || (b = a.height / a.width, p < b ? (a.height = p * a.width, a.y = n - a.height) : a.width = a.height / p)) : 1 <= b.y ? (a.width = Math.max(Math.min(q.x - k, d.width), c.width), a.height = Math.max(Math.min(q.y - l, d.height), c.height), g || (b = a.height / a.width, p < b ? a.height = p * a.width : a.width = a.height / p)) : (a.width = Math.max(Math.min(q.x - k, d.width), c.width), g || (a.height = p * a.width, a.y = l + .5 * (n - l - a.height))) : 0 >= b.y ? (a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), a.height = n - a.y, g || (a.width = a.height / p, a.x = + k + .5 * (m - k - a.width))) : 1 <= b.y && (a.height = Math.max(Math.min(q.y - l, d.height), c.height), g || (a.width = a.height / p, a.x = k + .5 * (m - k - a.width))); + z.A(q); + return a + }; + Wi.prototype.computeMinSize = function() { + var a = this.fc.cg.copy(), + b = this.cg; + !isNaN(b.width) && b.width > a.width && (a.width = b.width); + !isNaN(b.height) && b.height > a.height && (a.height = b.height); + return a + }; + Wi.prototype.computeMaxSize = function() { + var a = this.fc.Xe.copy(), + b = this.Xe; + !isNaN(b.width) && b.width < a.width && (a.width = b.width); + !isNaN(b.height) && b.height < a.height && (a.height = b.height); + return a + }; + Wi.prototype.computeCellSize = function() { + var a = new Ea(NaN, NaN), + b = this.fc.ca; + if (null !== b) { + var c = b.ZI; + !isNaN(c.width) && 0 < c.width && (a.width = c.width); + !isNaN(c.height) && 0 < c.height && (a.height = c.height) + } + c = this.dp; + isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width); + isNaN(a.height) && !isNaN(c.height) && 0 < c.height && (a.height = c.height); + b = this.h; + (isNaN(a.width) || isNaN(a.height)) && b && (c = b.hb.me, null !== c && c.ix && (c = c.BE, isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width), isNaN(a.height) && !isNaN(c.height) && + 0 < c.height && (a.height = c.height)), b = b.Gt, null !== b && b.visible && this.ix && (c = b.bx, isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width), isNaN(a.height) && !isNaN(c.height) && 0 < c.height && (a.height = c.height))); + if (isNaN(a.width) || 0 === a.width || Infinity === a.width) a.width = 1; + if (isNaN(a.height) || 0 === a.height || Infinity === a.height) a.height = 1; + return a + }; + z.defineProperty(Wi, { + cg: "minSize" + }, function() { + return this.Tj + }, function(a) { + z.l(a, Ea, Wi, "minSize"); + if (!this.Tj.N(a)) { + var b = a.width; + isNaN(b) && (b = 0); + a = a.height; + isNaN(a) && (a = 0); + this.Tj.n(b, a) + } + }); + z.defineProperty(Wi, { + Xe: "maxSize" + }, function() { + return this.Rj + }, function(a) { + z.l(a, Ea, Wi, "maxSize"); + if (!this.Rj.N(a)) { + var b = a.width; + isNaN(b) && (b = Infinity); + a = a.height; + isNaN(a) && (a = Infinity); + this.Rj.n(b, a) + } + }); + z.defineProperty(Wi, { + dp: "cellSize" + }, function() { + return this.zj + }, function(a) { + z.l(a, Ea, Wi, "cellSize"); + this.zj.N(a) || this.zj.assign(a) + }); + z.defineProperty(Wi, { + ix: "isGridSnapEnabled" + }, function() { + return this.jr + }, function(a) { + z.g(a, "boolean", Wi, "isGridSnapEnabled"); + this.jr = a + }); + z.w(Wi, { + cL: "originalDesiredSize" + }, function() { + return this.Uv + }); + z.w(Wi, { + dL: "originalLocation" + }, function() { + return this.fz + }); + + function dj() { + 0 < arguments.length && z.od(dj); + ug.call(this); + this.name = "Rotating"; + this.bD = 45; + this.aD = 2; + this.Ib = null; + var a = new X; + a.Hb = "Ellipse"; + a.Aa = be; + a.fill = "lightblue"; + a.stroke = "dodgerblue"; + a.ub = 1; + a.cursor = "pointer"; + this.Uk = a; + this.ac = null; + this.Tv = 0; + this.YC = new N + } + z.Qa(dj, ug); + z.ia("RotatingTool", dj); + dj.prototype.updateAdornments = function(a) { + if (!(null === a || a instanceof G)) { + if (a.kb && !this.h.jb) { + var b = a.zF; + if (null !== b && a.canRotate() && a.W.F() && a.isVisible() && b.W.F() && b.nj()) { + var c = a.lp(this.name); + if (null === c || c.fc !== b) c = this.makeAdornment(b); + if (null !== c) { + c.angle = b.Kl(); + var d = null, + e = null; + b === a || b === a.Zb ? (d = a.Zb, e = a.of) : (d = b, e = ec); + for (var g = d.Ga, e = z.Tb(g.width * e.x + e.offsetX, g.height * e.y + e.offsetY); null !== d && d !== b;) d.transform.Cb(e), d = d.U; + var d = e.y, + g = Math.max(e.x - b.Ga.width, 0), + h = z.O(); + c.location = b.fb(new Q(1, + 0, 50 + g, d), h); + z.A(h); + z.A(e); + a.ql(this.name, c); + return + } + } + } + a.rj(this.name) + } + }; + dj.prototype.makeAdornment = function(a) { + var b = null, + b = a.ca.aJ; + if (null === b) { + b = new da; + b.type = ej; + b.of = ec; + var c = this.Ht; + null !== c && b.add(c.copy()) + } else if (gh(b), b = b.copy(), null === b) return null; + b.nc = this.name; + b.fc = a; + return b + }; + z.defineProperty(dj, { + Ht: "handleArchetype" + }, function() { + return this.Uk + }, function(a) { + null !== a && z.l(a, O, dj, "handleArchetype"); + this.Uk = a + }); + z.w(dj, { + handle: "handle" + }, function() { + return this.ac + }); + z.defineProperty(dj, { + fc: "adornedObject" + }, function() { + return this.Ib + }, function(a) { + null !== a && z.l(a, O, dj, "adornedObject"); + this.Ib = a + }); + dj.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + return null !== a && !a.jb && a.Gw && a.Q.left ? null !== this.findToolHandleAt(a.Fc.ga, this.name) ? !0 : !1 : !1 + }; + dj.prototype.doActivate = function() { + var a = this.h; + if (null !== a && (this.ac = this.findToolHandleAt(a.Fc.ga, this.name), null !== this.ac)) { + this.Ib = this.ac.ca.fc; + var b = this.Ib.ca, + c = b.Zb; + this.YC = this.Ib === b || this.Ib === c ? c.fb(b.of) : this.Ib.fb(ec); + this.Tv = this.Ib.angle; + a.We = !0; + a.Oz = !0; + this.Wb(this.name); + this.ua = !0 + } + }; + dj.prototype.doDeactivate = function() { + var a = this.h; + null !== a && (this.xk(), this.Ib = this.ac = null, this.ua = a.We = !1) + }; + dj.prototype.doCancel = function() { + var a = this.h; + null !== a && (a.Oz = !1); + this.rotate(this.Tv); + this.stopTool() + }; + dj.prototype.doMouseMove = function() { + var a = this.h; + this.ua && null !== a && (a = this.computeRotate(a.Q.ga), this.rotate(a)) + }; + dj.prototype.doMouseUp = function() { + var a = this.h; + if (this.ua && null !== a) { + a.Oz = !1; + var b = this.computeRotate(a.Q.ga); + this.rotate(b); + a.yc(); + this.Mf = this.name; + a.Ja("PartRotated", this.Ib, this.Tv) + } + this.stopTool() + }; + dj.prototype.rotate = function(a) { + u && z.p(a, dj, "rotate:newangle"); + null !== this.Ib && (this.Ib.angle = a) + }; + dj.prototype.computeRotate = function(a) { + a = this.YC.Ec(a); + var b = this.Ib.U; + null !== b && (a -= b.Kl(), 360 <= a ? a -= 360 : 0 > a && (a += 360)); + var b = Math.min(Math.abs(this.nJ), 180), + c = Math.min(Math.abs(this.mJ), b / 2); + !this.h.Q.shift && 0 < b && 0 < c && (a % b < c ? a = Math.floor(a / b) * b : a % b > b - c && (a = (Math.floor(a / b) + 1) * b)); + 360 <= a ? a -= 360 : 0 > a && (a += 360); + return a + }; + z.defineProperty(dj, { + nJ: "snapAngleMultiple" + }, function() { + return this.bD + }, function(a) { + z.g(a, "number", dj, "snapAngleMultiple"); + this.bD = a + }); + z.defineProperty(dj, { + mJ: "snapAngleEpsilon" + }, function() { + return this.aD + }, function(a) { + z.g(a, "number", dj, "snapAngleEpsilon"); + this.aD = a + }); + z.w(dj, { + bL: "originalAngle" + }, function() { + return this.Tv + }); + + function fj() { + 0 < arguments.length && z.od(fj); + ug.call(this); + this.name = "ClickSelecting" + } + z.Qa(fj, ug); + z.ia("ClickSelectingTool", fj); + fj.prototype.canStart = function() { + return !this.isEnabled || null === this.h || this.isBeyondDragSize() ? !1 : !0 + }; + fj.prototype.doMouseUp = function() { + this.ua && (this.standardMouseSelect(), !this.standardMouseClick() && this.h.Q.lj && this.h.hb.doToolTip()); + this.stopTool() + }; + + function gj() { + 0 < arguments.length && z.od(gj); + ug.call(this); + this.name = "Action"; + this.Fn = null + } + z.Qa(gj, ug); + z.ia("ActionTool", gj); + gj.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a) return !1; + var b = a.Q, + c = a.pe(b.ga, function(a) { + for (; null !== a.U && !a.Mt;) a = a.U; + return a + }); + if (null !== c) { + if (!c.Mt) return !1; + this.Fn = c; + a.Sn = a.pe(b.ga, null, null); + return !0 + } + return !1 + }; + gj.prototype.doMouseDown = function() { + if (this.ua) { + var a = this.h.Q, + b = this.Fn; + null !== b && (a.Ge = b, null !== b.AD && b.AD(a, b)) + } else this.canStart() && this.doActivate() + }; + gj.prototype.doMouseMove = function() { + if (this.ua) { + var a = this.h.Q, + b = this.Fn; + null !== b && (a.Ge = b, null !== b.BD && b.BD(a, b)) + } + }; + gj.prototype.doMouseUp = function() { + if (this.ua) { + var a = this.h, + b = a.Q, + c = this.Fn; + if (null === c) return; + b.Ge = c; + null !== c.CD && c.CD(b, c); + this.isBeyondDragSize() || Ch(c, b, a) + } + this.stopTool() + }; + gj.prototype.doCancel = function() { + var a = this.h; + if (null !== a) { + var a = a.Q, + b = this.Fn; + if (null === b) return; + a.Ge = b; + null !== b.zD && b.zD(a, b) + } + this.stopTool() + }; + gj.prototype.doStop = function() { + this.Fn = null + }; + + function va() { + 0 < arguments.length && z.od(va); + ug.call(this); + this.name = "ClickCreating"; + this.Mk = null; + this.qC = !0; + this.dC = new N(0, 0) + } + z.Qa(va, ug); + z.ia("ClickCreatingTool", va); + va.prototype.canStart = function() { + if (!this.isEnabled || null === this.Cz) return !1; + var a = this.h; + if (null === a || a.jb || a.Ef || !a.ap || !a.Q.left || this.isBeyondDragSize()) return !1; + if (this.eI) { + if (1 === a.Q.Pe && (this.dC = a.Q.te.copy()), 2 !== a.Q.Pe || this.isBeyondDragSize(this.dC)) return !1 + } else if (1 !== a.Q.Pe) return !1; + return a.eb !== this && null !== a.At(a.Q.ga, !0) ? !1 : !0 + }; + va.prototype.doMouseUp = function() { + var a = this.h; + this.ua && null !== a && this.insertPart(a.Q.ga); + this.stopTool() + }; + va.prototype.insertPart = function(a) { + var b = this.h; + if (null === b) return null; + var c = this.Cz; + if (null === c) return null; + this.Wb(this.name); + var d = null; + c instanceof D ? c.be() && (gh(c), d = c.copy(), null !== d && b.add(d)) : null !== c && (c = b.ha.copyNodeData(c), z.Za(c) && (b.ha.rl(c), d = b.uh(c))); + null !== d && (d.location = a, b.xf && b.select(d)); + b.yc(); + this.Mf = this.name; + b.Ja("PartCreated", d); + this.xk(); + return d + }; + z.defineProperty(va, { + Cz: "archetypeNodeData" + }, function() { + return this.Mk + }, function(a) { + null !== a && z.l(a, Object, va, "archetypeNodeData"); + this.Mk = a + }); + z.defineProperty(va, { + eI: "isDoubleClick" + }, function() { + return this.qC + }, function(a) { + z.g(a, "boolean", va, "isDoubleClick"); + this.qC = a + }); + + function hj(a, b, c) { + this.text = a; + this.TD = b; + this.visible = c + } + + function ij() { + 0 < arguments.length && z.od(ij); + ug.call(this); + this.name = "ContextMenu"; + this.IB = this.uy = this.FB = null; + this.GC = new N; + this.wy = this.$n = null; + jj(this) + } + z.Qa(ij, ug); + z.ia("ContextMenuTool", ij); + z.bE = !1; + z.qt = null; + z.rt = null; + + function jj(a) { + a.$n = new da; + a.qD = function() { + a.stopTool() + }; + if (!1 === z.bE) { + var b = z.createElement("div"), + c = z.createElement("div"); + b.style.cssText = "top: 0px;z-index:300;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px"; + c.style.cssText = "z-index:299;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);"; + var d = + z.createElement("style"); + window.document.getElementsByTagName("head")[0].appendChild(d); + d.sheet.insertRule(".defaultCXul { list-style: none; }", 0); + d.sheet.insertRule(".defaultCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }", 0); + d.sheet.insertRule(".defaultCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }", 0); + b.addEventListener("contextmenu", function(a) { + a.preventDefault(); + return !1 + }, !1); + b.addEventListener("selectstart", function(a) { + a.preventDefault(); + return !1 + }, !1); + c.addEventListener("contextmenu", function(a) { + a.preventDefault(); + return !1 + }, !1); + window.document.body && (window.document.body.appendChild(b), window.document.body.appendChild(c)); + z.rt = b; + z.qt = c; + z.bE = !0 + } + } + ij.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + return null === a || this.isBeyondDragSize() || !a.Q.right ? !1 : null !== this.$n && a.Q.lj || null !== this.findObjectWithContextMenu() ? !0 : !1 + }; + ij.prototype.doStart = function() { + var a = this.h; + null !== a && this.GC.set(a.Fc.ga) + }; + ij.prototype.doStop = function() { + this.hideDefaultContextMenu(); + this.hideContextMenu(); + this.Nz = null + }; + ij.prototype.findObjectWithContextMenu = function(a) { + void 0 === a && (a = null); + var b = this.h; + if (null === b) return null; + var c = b.Q, + d = null; + a instanceof C || (d = a instanceof O ? a : b.pe(c.ga, null, function(a) { + return !a.layer.Nc + })); + if (null !== d) { + for (a = d; null !== a;) { + if (null !== a.contextMenu) return a; + a = a.U + } + if (null !== this.$n && b.Q.lj) return d.ca + } else if (null !== b.contextMenu) return b; + return null + }; + ij.prototype.doActivate = function() {}; + ij.prototype.doMouseDown = function() { + ug.prototype.doMouseDown.call(this); + null !== this.h && this.h.hb.Ye.contains(this) && kj(this) + }; + ij.prototype.doMouseUp = function() { + kj(this) + }; + + function kj(a) { + var b = a.h; + if (null !== b) + if (!a.ua) a.canStart() && (uh(a, !0), a.ua || a.stopTool()); + else if (null !== a.yf) { + var c = b.pe(b.Q.ga, null, null); + null !== c && c.Pl(a.yf) && a.standardMouseClick(null, null); + a.stopTool(); + a.canStart() && (b.eb = a, a.doMouseUp()) + } + } + + function uh(a, b, c) { + void 0 === c && (c = null); + b && a.standardMouseSelect(); + a.standardMouseClick() || (a.ua = !0, null === c && (c = a.findObjectWithContextMenu()), null !== c ? (b = c.contextMenu, null !== b ? (a.Nz = c instanceof O ? c : null, a.showContextMenu(b, a.Nz)) : a.showDefaultContextMenu()) : a.showDefaultContextMenu()) + } + ij.prototype.doMouseMove = function() { + this.ua && this.h.hb.doMouseMove() + }; + ij.prototype.showContextMenu = function(a, b) { + z.l(a, da, ij, "showContextMenu:contextmenu"); + null !== b && z.l(b, O, ij, "showContextMenu:obj"); + var c = this.h; + if (null !== c) { + a !== this.yf && this.hideContextMenu(); + a.If = "Tool"; + a.vk = !1; + a.scale = 1 / c.scale; + a.nc = this.name; + null !== a.placeholder && (a.placeholder.scale = c.scale); + c.add(a); + if (null !== b) { + var c = null, + d = b.op(); + null !== d && (c = d.data); + a.fc = b; + a.data = c + } else a.data = c.ha; + a.Bf(); + this.positionContextMenu(a, b); + this.yf = a + } + }; + ij.prototype.positionContextMenu = function(a) { + if (null === a.placeholder) { + var b = this.h; + if (null !== b) { + var c = b.Q.ga.copy(), + d = a.Ia, + e = b.xb; + b.Q.lj && (c.x -= d.width); + c.x + d.width > e.right && (c.x -= d.width + 5); + c.x < e.x && (c.x = e.x); + c.y + d.height > e.bottom && (c.y -= d.height + 5); + c.y < e.y && (c.y = e.y); + a.position = c + } + } + }; + ij.prototype.hideContextMenu = function() { + var a = this.h; + null !== a && null !== this.yf && (a.remove(this.yf), null !== this.uy && this.uy.rj(this.yf.nc), this.yf.data = null, this.yf = this.yf.fc = null, this.standardMouseOver()) + }; + + function lj(a) { + if (null === a.h) return null; + a = new J(hj); + a.add(new hj("Copy", function(a) { + a.wb.copySelection() + }, function(a) { + return a.wb.canCopySelection() + })); + a.add(new hj("Cut", function(a) { + a.wb.cutSelection() + }, function(a) { + return a.wb.canCutSelection() + })); + a.add(new hj("Delete", function(a) { + a.wb.deleteSelection() + }, function(a) { + return a.wb.canDeleteSelection() + })); + a.add(new hj("Paste", function(a) { + a.wb.pasteSelection(a.Q.ga) + }, function(a) { + return a.wb.canPasteSelection() + })); + a.add(new hj("Select All", function(a) { + a.wb.selectAll() + }, + function(a) { + return a.wb.canSelectAll() + })); + a.add(new hj("Undo", function(a) { + a.wb.undo() + }, function(a) { + return a.wb.canUndo() + })); + a.add(new hj("Redo", function(a) { + a.wb.redo() + }, function(a) { + return a.wb.canRedo() + })); + a.add(new hj("Scroll To Part", function(a) { + a.wb.scrollToPart() + }, function(a) { + return a.wb.canScrollToPart() + })); + a.add(new hj("Zoom To Fit", function(a) { + a.wb.zoomToFit() + }, function(a) { + return a.wb.canZoomToFit() + })); + a.add(new hj("Reset Zoom", function(a) { + a.wb.resetZoom() + }, function(a) { + return a.wb.canResetZoom() + })); + a.add(new hj("Group Selection", function(a) { + a.wb.groupSelection() + }, function(a) { + return a.wb.canGroupSelection() + })); + a.add(new hj("Ungroup Selection", function(a) { + a.wb.ungroupSelection() + }, function(a) { + return a.wb.canUngroupSelection() + })); + a.add(new hj("Edit Text", function(a) { + a.wb.editTextBlock() + }, function(a) { + return a.wb.canEditTextBlock() + })); + return a + } + ij.prototype.showDefaultContextMenu = function() { + var a = this.h; + if (null !== a) { + null === this.wy && (this.wy = lj(this)); + this.$n !== this.yf && this.hideContextMenu(); + z.rt.innerHTML = ""; + z.qt.addEventListener("click", this.qD, !1); + var b = this, + c = z.createElement("ul"); + c.className = "defaultCXul"; + z.rt.appendChild(c); + c.innerHTML = ""; + for (var d = this.wy.i; d.next();) { + var e = d.value, + g = e.text, + h = e.visible; + if ("function" === typeof e.TD && ("function" !== typeof h || h(a))) { + h = z.createElement("li"); + h.className = "defaultCXli"; + var k = z.createElement("a"); + k.className = "defaultCXa"; + k.href = "#"; + k.nG = e.TD; + k.addEventListener("click", function(c) { + this.nG(a); + b.stopTool(); + c.preventDefault(); + return !1 + }, !1); + k.textContent = g; + h.appendChild(k); + c.appendChild(h) + } + } + z.rt.style.display = "block"; + z.qt.style.display = "block"; + this.yf = this.$n + } + }; + ij.prototype.hideDefaultContextMenu = function() { + null !== this.yf && this.yf === this.$n && (z.rt.style.display = "none", z.qt.style.display = "none", z.qt.removeEventListener("click", this.qD, !1), this.yf = null) + }; + z.defineProperty(ij, { + yf: "currentContextMenu" + }, function() { + return this.FB + }, function(a) { + null !== a && z.l(a, da, ij, "currentContextMenu"); + this.FB = a; + this.uy = null !== a ? a.Wf : null + }); + z.defineProperty(ij, { + Nz: "currentObject" + }, function() { + return this.IB + }, function(a) { + null !== a && z.l(a, O, ij, "currentObject"); + this.IB = a + }); + z.w(ij, { + XK: "mouseDownPoint" + }, function() { + return this.GC + }); + + function mj() { + 0 < arguments.length && z.od(mj); + ug.call(this); + this.name = "DragSelecting"; + this.ao = 175; + this.vC = !1; + var a = new D; + a.If = "Tool"; + a.vk = !1; + var b = new X; + b.name = "SHAPE"; + b.Hb = "Rectangle"; + b.fill = null; + b.stroke = "magenta"; + a.add(b); + this.em = a + } + z.Qa(mj, ug); + z.ia("DragSelectingTool", mj); + mj.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a || !a.xf) return !1; + var b = a.Q; + return !b.left || a.eb !== this && (!this.isBeyondDragSize() || b.timestamp - a.Fc.timestamp < this.cE || null !== a.At(b.ga, !0)) ? !1 : !0 + }; + mj.prototype.doActivate = function() { + var a = this.h; + null !== a && (this.ua = !0, a.We = !0, a.Bb = !0, a.add(this.qh), this.doMouseMove()) + }; + mj.prototype.doDeactivate = function() { + var a = this.h; + null !== a && (a.remove(this.qh), a.Bb = !1, this.ua = a.We = !1) + }; + mj.prototype.doMouseMove = function() { + if (null !== this.h && this.ua && null !== this.qh) { + var a = this.computeBoxBounds(), + b = this.qh.oe("SHAPE"); + null === b && (b = this.qh.gf()); + b.Aa = a.size; + this.qh.position = a.position + } + }; + mj.prototype.doMouseUp = function() { + if (this.ua) { + var a = this.h; + a.remove(this.qh); + try { + a.gc = "wait", this.selectInRect(this.computeBoxBounds()) + } finally { + a.gc = "" + } + } + this.stopTool() + }; + mj.prototype.computeBoxBounds = function() { + var a = this.h; + return null === a ? new w(0, 0, 0, 0) : new w(a.Fc.ga, a.Q.ga) + }; + mj.prototype.selectInRect = function(a) { + var b = this.h; + if (null !== b) { + var c = b.Q; + b.Ja("ChangingSelection"); + a = b.ok(a, null, function(a) { + return a instanceof D ? a.canSelect() : !1 + }, this.jI); + if (z.rk ? c.$t : c.control) + if (c.shift) + for (a = a.i; a.next();) c = a.value, c.kb && (c.kb = !1); + else + for (a = a.i; a.next();) c = a.value, c.kb = !c.kb; + else { + if (!c.shift) { + for (var c = new J(D), d = b.selection.i; d.next();) { + var e = d.value; + a.contains(e) || c.add(e) + } + for (c = c.i; c.next();) c.value.kb = !1 + } + for (a = a.i; a.next();) c = a.value, c.kb || (c.kb = !0) + } + b.Ja("ChangedSelection") + } + }; + z.defineProperty(mj, { + cE: "delay" + }, function() { + return this.ao + }, function(a) { + z.g(a, "number", mj, "delay"); + this.ao = a + }); + z.defineProperty(mj, { + jI: "isPartialInclusion" + }, function() { + return this.vC + }, function(a) { + z.g(a, "boolean", mj, "isPartialInclusion"); + this.vC = a + }); + z.defineProperty(mj, { + qh: "box" + }, function() { + return this.em + }, function(a) { + null !== a && z.l(a, D, mj, "box"); + this.em = a + }); + + function nj() { + 0 < arguments.length && z.od(nj); + ug.call(this); + this.name = "Panning"; + this.gz = new N; + this.yj = !1; + var a = this; + this.eD = function() { + window.document.removeEventListener("scroll", a.eD, !1); + a.stopTool() + } + } + z.Qa(nj, ug); + z.ia("PanningTool", nj); + nj.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + return null === a || !a.xe && !a.ye || !a.Q.left || a.eb !== this && !this.isBeyondDragSize() ? !1 : !0 + }; + nj.prototype.doActivate = function() { + var a = this.h; + null !== a && (this.yj ? (a.Q.bubbles = !0, window.document.addEventListener("scroll", this.eD, !1)) : (a.gc = "move", a.We = !0, this.gz = a.position.copy()), this.ua = !0) + }; + nj.prototype.doDeactivate = function() { + var a = this.h; + null !== a && (a.gc = "", this.ua = a.We = !1) + }; + nj.prototype.doCancel = function() { + var a = this.h; + null !== a && (a.position = this.gz, a.We = !1); + this.stopTool() + }; + nj.prototype.doMouseMove = function() { + this.move() + }; + nj.prototype.doMouseUp = function() { + this.move(); + this.stopTool() + }; + nj.prototype.move = function() { + var a = this.h; + if (this.ua && a) + if (this.yj) a.Q.bubbles = !0; + else { + var b = a.position, + c = a.Fc.ga, + d = a.Q.ga, + e = b.x + c.x - d.x, + c = b.y + c.y - d.y; + a.xe || (e = b.x); + a.ye || (c = b.y); + a.position = new N(e, c) + } + }; + z.defineProperty(nj, { + bubbles: "bubbles" + }, function() { + return this.yj + }, function(a) { + z.g(a, "boolean", nj, "bubbles"); + this.yj = a + }); + z.w(nj, { + gL: "originalPosition" + }, function() { + return this.gz + }); + + function oj() { + 0 < arguments.length && z.od(oj); + ug.call(this); + this.name = "TextEditing"; + this.LB = this.qz = this.iD = null; + this.Ro = pj; + this.nl = null; + this.nb = qj; + this.kl = null; + this.DC = 1; + this.ZC = !0; + var a = z.createElement("textarea"); + a.pC = !0; + this.SB = a; + a.addEventListener("input", function() { + var a = this.textEditingTool; + if (null !== a && void 0 !== a && null !== a.He) { + var c = a.iD; + c.text = this.value; + var d = this.sJ; + rj(c, a.He.Ev, Infinity); + this.style.width = 20 + c.Ia.width * d + "px"; + this.style.height = 10 + c.Ia.height * d + "px"; + this.rows = c.sI + } + }, !1); + a.addEventListener("keydown", + function(a) { + var c = a.which, + d = this.textEditingTool; + null !== d && void 0 !== d && null !== d.He && (13 === c ? (!1 === d.He.lx && a.preventDefault(), d.acceptText(sj)) : 9 === c ? (d.acceptText(tj), a.preventDefault()) : 27 === c && (d.doCancel(), null !== d.h && d.h.focus())) + }, !1); + a.addEventListener("focus", function(a) { + var c = this.textEditingTool; + null !== c && void 0 !== c && c.doFocus(a) + }, !1); + a.addEventListener("blur", function(a) { + var c = this.textEditingTool; + null !== c && void 0 !== c && c.doBlur(a) + }, !1) + } + z.ia("TextEditingTool", oj); + z.Qa(oj, ug); + var uj; + oj.LostFocus = uj = z.s(oj, "LostFocus", 0); + var Ej; + oj.MouseDown = Ej = z.s(oj, "MouseDown", 1); + var tj; + oj.Tab = tj = z.s(oj, "Tab", 2); + var sj; + oj.Enter = sj = z.s(oj, "Enter", 3); + oj.SingleClick = z.s(oj, "SingleClick", 0); + var pj; + oj.SingleClickSelected = pj = z.s(oj, "SingleClickSelected", 1); + var qj = z.s(oj, "StateNone", 0), + Fj = z.s(oj, "StateActive", 1), + Gj = z.s(oj, "StateEditing", 2), + Hj = z.s(oj, "StateEditing2", 3), + Ij = z.s(oj, "StateValidating", 4), + Jj = z.s(oj, "StateValidated", 5); + z.defineProperty(oj, { + He: "textBlock" + }, function() { + return this.qz + }, function(a) { + null !== a && z.l(a, qa, oj, "textBlock"); + this.qz = a + }); + z.defineProperty(oj, { + zf: "currentTextEditor" + }, function() { + return this.LB + }, function(a) { + this.LB = a + }); + z.defineProperty(oj, { + pH: "defaultTextEditor" + }, function() { + return this.SB + }, function(a) { + z.l(a, Element, oj, "defaultTextEditor"); + this.SB = a + }); + z.defineProperty(oj, { + VA: "starting" + }, function() { + return this.Ro + }, function(a) { + z.Ba(a, oj, oj, "starting"); + this.Ro = a + }); + oj.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a || a.jb || !a.Q.left || this.isBeyondDragSize()) return !1; + a = a.pe(a.Q.ga, null, function(a) { + return a instanceof qa + }); + if (null === a || !a.Sz || !a.ca.canEdit()) return !1; + a = a.ca; + return null === a || this.VA === pj && !a.kb ? !1 : !0 + }; + oj.prototype.doStart = function() { + this.ua || null === this.He || this.doActivate() + }; + oj.prototype.doActivate = function() { + if (!this.ua) { + var a = this.h; + if (null !== a) { + var b = this.He; + null === b && (b = a.pe(a.Q.ga, function(a) { + return a instanceof qa ? a : null + })); + if (null !== b && (this.He = b, null !== b.ca)) { + this.ua = !0; + this.nb = Fj; + var c = this.pH, + d = !1; + null !== b.SF && (c = b.SF); + null === c || c.pC || (d = !0); + this.iD = this.He.copy(); + var e = new w(this.He.fb(Zb), this.He.fb(ic)); + a.fJ(e); + if (c.pC) { + var g = b.fb(ec), + h = a.position, + k = a.scale, + l = b.gj() * k; + l < this.cF && (l = this.cF); + var e = b.Ga.width * l, + m = b.Ga.height * l, + n = (g.x - h.x) * k, + g = (g.y - h.y) * k; + c.value = + b.text; + a.Dl.style.font = b.font; + c.style.font = "inherit"; + c.style.fontSize = 100 * l + "%"; + c.style.lineHeight = "normal"; + c.style.width = e + 6 + "px"; + c.style.height = m + 2 + "px"; + c.style.left = (n - e / 2 | 0) - 1 + "px"; + c.style.top = (g - m / 2 | 0) - 1 + "px"; + c.style.textAlign = b.textAlign; + c.style.margin = "0"; + c.style.padding = "1px"; + c.style.border = "0"; + c.style.outline = "none"; + c.style["white-space"] = "pre-wrap"; + c.style.overflow = "hidden" + } + a.Dl.appendChild(c); + c.style.position = "absolute"; + c.style.zIndex = 100; + c.className = "start"; + c.textEditingTool = this; + c.sJ = + l; + if (d && "function" === typeof c.onActivate) c.onActivate(); + this.zf = c; + "function" === typeof c.focus && c.focus(); + "function" === typeof c.select && this.OA && (c.select(), c.setSelectionRange(0, 9999)) + } + } + } + }; + oj.prototype.doCancel = function() { + null !== this.kl && (this.zf.style.border = this.kl, this.kl = null); + this.stopTool() + }; + oj.prototype.doMouseUp = function() { + !this.ua && this.canStart() && this.doActivate() + }; + oj.prototype.doMouseDown = function() { + this.ua && this.acceptText(Ej) + }; + oj.prototype.acceptText = function(a) { + switch (a) { + case Ej: + if (this.nb === Jj || this.nb === Hj) "function" === typeof this.zf.focus && this.zf.focus(); + else if (this.nb === Fj || this.nb === Gj) this.nb = Ij, Kj(this); + break; + case uj: + case sj: + case tj: + if (sj === a && !0 === this.qz.lx) break; + if (this.nb === Fj || this.nb === Gj) this.nb = Ij, Kj(this) + } + }; + + function Kj(a) { + if (null !== a.He && null !== a.zf) { + var b = a.He, + c = a.He.text, + d = a.zf.value, + e = "", + e = "function" === typeof d ? d() : d; + if (!a.isValidText(a.He, c, e)) { + a.nb = Gj; + null !== b.Uz && b.Uz(a, c, e); + null === a.kl && (a.kl = a.zf.style.border, a.zf.style.border = "3px solid red"); + "function" === typeof a.zf.focus && a.zf.focus(); + return + } + a.Wb(a.name); + a.nb = Jj; + c !== e && (a.He.text = e); + a.Mf = a.name; + b = a.h; + null !== b && b.Ja("TextEdited", a.He, c); + a.xk(); + a.stopTool(); + null !== b && b.focus() + } + null !== a.kl && (a.zf.style.border = a.kl, a.kl = null) + } + oj.prototype.doDeactivate = function() { + var a = this.h; + if (null !== a) { + this.nb = qj; + this.He = null; + if (null !== this.zf) { + var b = this.zf; + if ("function" === typeof b.onDeactivate) b.onDeactivate(); + null !== b && a.Dl.removeChild(b) + } + this.ua = !1 + } + }; + oj.prototype.doFocus = function() { + var a = this.zf; + null !== a && (this.nb === Fj ? this.nb = Gj : this.nb === Jj ? this.nb = Hj : this.nb === Hj && (this.nb = Gj), "function" === typeof a.select && this.OA && (a.select(), a.setSelectionRange(0, 9999))) + }; + oj.prototype.doBlur = function() { + var a = this.zf; + null !== a && ("function" === typeof a.focus && a.focus(), "function" === typeof a.select && this.OA && (a.select(), a.setSelectionRange(0, 9999))) + }; + oj.prototype.isValidText = function(a, b, c) { + z.l(a, qa, oj, "isValidText:textblock"); + var d = this.YA; + if (null !== d && !d(a, b, c)) return !1; + d = a.YA; + return null === d || d(a, b, c) ? !0 : !1 + }; + z.defineProperty(oj, { + YA: "textValidation" + }, function() { + return this.nl + }, function(a) { + null !== a && z.g(a, "function", oj, "textValidation"); + this.nl = a + }); + z.defineProperty(oj, { + cF: "minimumEditorScale" + }, function() { + return this.DC + }, function(a) { + null !== a && z.g(a, "number", oj, "minimumEditorScale"); + this.DC = a + }); + z.defineProperty(oj, { + OA: "selectsTextOnActivate" + }, function() { + return this.ZC + }, function(a) { + null !== a && z.g(a, "boolean", oj, "selectsTextOnActivate"); + this.ZC = a + }); + + function dh() { + ug.call(this); + this.name = "ToolManager"; + this.sG = new J(ug); + this.tG = new J(ug); + this.uG = new J(ug); + this.hC = this.iC = 850; + this.WB = (new Ea(2, 2)).La(); + this.rD = 5E3; + this.HC = Eh; + this.fC = Lj; + this.dv = this.MB = null; + this.Nm = -1 + } + z.Qa(dh, ug); + z.ia("ToolManager", dh); + var Eh; + dh.WheelScroll = Eh = z.s(dh, "WheelScroll", 0); + var Dh; + dh.WheelZoom = Dh = z.s(dh, "WheelZoom", 1); + dh.WheelNone = z.s(dh, "WheelNone", 2); + var Lj; + dh.GestureZoom = Lj = z.s(dh, "GestureZoom", 3); + var Mj; + dh.GestureCancel = Mj = z.s(dh, "GestureCancel", 4); + var Nj; + dh.GestureNone = Nj = z.s(dh, "GestureNone", 5); + z.defineProperty(dh, { + cu: "mouseWheelBehavior" + }, function() { + return this.HC + }, function(a) { + z.Ba(a, dh, dh, "mouseWheelBehavior"); + this.HC = a + }); + z.defineProperty(dh, { + rp: "gestureBehavior" + }, function() { + return this.fC + }, function(a) { + z.Ba(a, dh, dh, "gestureBehavior"); + this.fC = a + }); + dh.prototype.initializeStandardTools = function() { + this.JG = new gj; + this.kF = new Jh; + this.vI = new Pi; + this.xF = new Wi; + this.cJ = new dj; + this.ZE = new ta; + this.me = new ih; + this.tH = new mj; + this.OI = new nj; + this.Hz = new ij; + this.XA = new oj; + this.ZG = new va; + this.$G = new fj + }; + dh.prototype.updateAdornments = function(a) { + var b = this.th; + if (null !== b && this.dv === a) { + var c = b.fc; + (null !== a ? c.ca === a : null === c) ? this.showToolTip(b, c): this.hideToolTip() + } + }; + dh.prototype.doMouseDown = function() { + var a = this.h; + if (null !== a) { + var b = a.Q; + b.lj && this.rp === Mj && (b.bubbles = !1); + if (b.Qt) { + if (this.rp === Nj) { + b.bubbles = !0; + return + } + if (this.rp === Mj) return; + if (a.eb.canStartMultiTouch()) { + a.eb.standardPinchZoomStart(); + return + } + } + var c = a.pa; + c.Ez && 0 !== c.Gh && z.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero"); + for (var c = this.Ye.length, d = 0; d < c; d++) { + var e = this.Ye.ea(d); + null === e.h && e.Sc(this.h); + if (e.canStart()) { + a.doFocus(); + a.eb = e; + a.eb === e && (e.ua || e.doActivate(), + e.doMouseDown()); + return + } + } + 1 === a.Q.button && (this.cu === Eh ? this.cu = Dh : this.cu === Dh && (this.cu = Eh)); + this.doActivate(); + this.standardWaitAfter(this.FE, b) + } + }; + dh.prototype.doMouseMove = function() { + var a = this.h; + if (null !== a) { + var b = a.Q; + if (b.Qt) { + if (this.rp === Nj) { + b.bubbles = !0; + return + } + if (this.rp === Mj) return; + if (a.eb.canStartMultiTouch()) { + a.eb.standardPinchZoomMove(); + return + } + } + if (this.ua) + for (var c = this.dg.length, d = 0; d < c; d++) { + var e = this.dg.ea(d); + null === e.h && e.Sc(this.h); + if (e.canStart()) { + a.doFocus(); + a.eb = e; + a.eb === e && (e.ua || e.doActivate(), e.doMouseMove()); + return + } + } + Oj(this, a); + null === b.event || "mousemove" !== b.event.type && b.event.cancelable || (b.bubbles = !0) + } + }; + + function Oj(a, b) { + a.standardMouseOver(); + a.isBeyondDragSize() && a.standardWaitAfter(a.ua ? a.FE : a.WH, b.Q) + } + dh.prototype.doCurrentObjectChanged = function(a, b) { + var c = this.th; + null === c || null !== b && (b === c || b.Pl(c)) || this.hideToolTip() + }; + dh.prototype.doWaitAfter = function(a) { + var b = this.h; + null !== b && b.Fb && (this.doMouseHover(), this.ua || this.doToolTip(), a.lj && !b.Q.Gc && (a = a.copy(), a.button = 2, a.buttons = 2, b.Q = a, b.Ss = !0, b.doMouseUp())) + }; + dh.prototype.doMouseHover = function() { + var a = this.h; + if (null !== a) { + var b = a.Q; + null === b.Ge && (b.Ge = a.pe(b.ga, null, null)); + var c = b.Ge; + if (null !== c) + for (b.Gc = !1; null !== c;) { + a = this.ua ? c.sA : c.tA; + if (null !== a && (a(b, c), b.Gc)) break; + c = c.U + } else a = this.ua ? a.sA : a.tA, null !== a && a(b) + } + }; + dh.prototype.doToolTip = function() { + var a = this.h; + if (null !== a) { + var b = a.Q; + null === b.Ge && (b.Ge = a.pe(b.ga, null, null)); + b = b.Ge; + if (null !== b) { + if (b !== this.th && !b.Pl(this.th)) { + for (; null !== b;) { + a = b.$A; + if (null !== a) { + this.showToolTip(a, b); + return + } + b = b.U + } + this.hideToolTip() + } + } else a = a.$A, null !== a ? this.showToolTip(a, null) : this.hideToolTip() + } + }; + dh.prototype.showToolTip = function(a, b) { + z.l(a, da, dh, "showToolTip:tooltip"); + null !== b && z.l(b, O, dh, "showToolTip:obj"); + var c = this.h; + if (null !== c) { + a !== this.th && this.hideToolTip(); + a.If = "Tool"; + a.vk = !1; + a.scale = 1 / c.scale; + a.nc = "ToolTip"; + null !== a.placeholder && (a.placeholder.scale = c.scale); + c.add(a); + if (null !== b) { + var c = null, + d = b.op(); + null !== d && (c = d.data); + a.fc = b; + a.data = c + } else a.data = c.ha; + a.Bf(); + this.positionToolTip(a, b); + this.th = a; - 1 !== this.Nm && (z.clearTimeout(this.Nm), this.Nm = -1); + c = this.xJ; + if (0 < c && Infinity !== c) { + var e = + this; + this.Nm = z.setTimeout(function() { + e.hideToolTip() + }, c) + } + } + }; + dh.prototype.positionToolTip = function(a) { + if (null === a.placeholder) { + var b = this.h; + if (null !== b) { + var c = b.Q.ga.copy(), + d = a.Ia, + e = b.xb; + b.Q.lj && (c.x -= d.width); + c.x + d.width > e.right && (c.x -= d.width + 5); + c.x < e.x && (c.x = e.x); + c.y = c.y + 20 + d.height > e.bottom ? c.y - (d.height + 5) : c.y + 20; + c.y < e.y && (c.y = e.y); + a.position = c + } + } + }; + dh.prototype.hideToolTip = function() { + -1 !== this.Nm && (z.clearTimeout(this.Nm), this.Nm = -1); + var a = this.h; + null !== a && null !== this.th && (a.remove(this.th), null !== this.dv && this.dv.rj(this.th.nc), this.th.data = null, this.th = this.th.fc = null) + }; + z.defineProperty(dh, { + th: "currentToolTip" + }, function() { + return this.MB + }, function(a) { + null !== a && z.l(a, da, dh, "currentToolTip"); + this.MB = a; + this.dv = null !== a ? a.Wf : null + }); + dh.prototype.doMouseUp = function() { + this.cancelWaitAfter(); + var a = this.h; + if (null !== a) { + if (this.ua) + for (var b = this.eg.length, c = 0; c < b; c++) { + var d = this.eg.ea(c); + null === d.h && d.Sc(this.h); + if (d.canStart()) { + a.doFocus(); + a.eb = d; + a.eb === d && (d.ua || d.doActivate(), d.doMouseUp()); + return + } + } + a.doFocus(); + this.doDeactivate() + } + }; + dh.prototype.doMouseWheel = function() { + this.standardMouseWheel() + }; + dh.prototype.doKeyDown = function() { + var a = this.h; + null !== a && a.wb.doKeyDown() + }; + dh.prototype.doKeyUp = function() { + var a = this.h; + null !== a && a.wb.doKeyUp() + }; + dh.prototype.doCancel = function() { + null !== Hh && Hh.doCancel(); + ug.prototype.doCancel.call(this) + }; + dh.prototype.findTool = function(a) { + z.g(a, "string", dh, "findTool:name"); + for (var b = this.Ye.length, c = 0; c < b; c++) { + var d = this.Ye.ea(c); + if (d.name === a) return d + } + b = this.dg.length; + for (c = 0; c < b; c++) + if (d = this.dg.ea(c), d.name === a) return d; + b = this.eg.length; + for (c = 0; c < b; c++) + if (d = this.eg.ea(c), d.name === a) return d; + return null + }; + dh.prototype.replaceTool = function(a, b) { + z.g(a, "string", dh, "replaceTool:name"); + null !== b && (z.l(b, ug, dh, "replaceTool:newtool"), b.h && b.h !== this.h && z.k("Cannot share tools between Diagrams: " + b.toString()), b.Sc(this.h)); + for (var c = this.Ye.length, d = 0; d < c; d++) { + var e = this.Ye.ea(d); + if (e.name === a) return null !== b ? this.Ye.Rg(d, b) : this.Ye.dd(d), e + } + c = this.dg.length; + for (d = 0; d < c; d++) + if (e = this.dg.ea(d), e.name === a) return null !== b ? this.dg.Rg(d, b) : this.dg.dd(d), e; + c = this.eg.length; + for (d = 0; d < c; d++) + if (e = this.eg.ea(d), e.name === + a) return null !== b ? this.eg.Rg(d, b) : this.eg.dd(d), e; + return null + }; + + function Pj(a, b, c, d) { + z.g(b, "string", dh, "replaceStandardTool:name"); + z.l(d, J, dh, "replaceStandardTool:list"); + null !== c && (z.l(c, ug, dh, "replaceStandardTool:newtool"), c.h && c.h !== a.h && z.k("Cannot share tools between Diagrams: " + c.toString()), c.name = b, c.Sc(a.h)); + a.findTool(b) ? a.replaceTool(b, c) : null !== c && d.add(c) + } + z.w(dh, { + Ye: "mouseDownTools" + }, function() { + return this.sG + }); + z.w(dh, { + dg: "mouseMoveTools" + }, function() { + return this.tG + }); + z.w(dh, { + eg: "mouseUpTools" + }, function() { + return this.uG + }); + z.defineProperty(dh, { + WH: "hoverDelay" + }, function() { + return this.iC + }, function(a) { + z.g(a, "number", dh, "hoverDelay"); + this.iC = a + }); + z.defineProperty(dh, { + FE: "holdDelay" + }, function() { + return this.hC + }, function(a) { + z.g(a, "number", dh, "holdDelay"); + this.hC = a + }); + z.defineProperty(dh, { + uH: "dragSize" + }, function() { + return this.WB + }, function(a) { + z.l(a, Ea, dh, "dragSize"); + this.WB = a.V() + }); + z.defineProperty(dh, { + xJ: "toolTipDuration" + }, function() { + return this.rD + }, function(a) { + z.g(a, "number", dh, "toolTipDuration"); + this.rD = a + }); + z.defineProperty(dh, { + JG: "actionTool" + }, function() { + return this.findTool("Action") + }, function(a) { + Pj(this, "Action", a, this.Ye) + }); + z.defineProperty(dh, { + kF: "relinkingTool" + }, function() { + return this.findTool("Relinking") + }, function(a) { + Pj(this, "Relinking", a, this.Ye) + }); + z.defineProperty(dh, { + vI: "linkReshapingTool" + }, function() { + return this.findTool("LinkReshaping") + }, function(a) { + Pj(this, "LinkReshaping", a, this.Ye) + }); + z.defineProperty(dh, { + xF: "resizingTool" + }, function() { + return this.findTool("Resizing") + }, function(a) { + Pj(this, "Resizing", a, this.Ye) + }); + z.defineProperty(dh, { + cJ: "rotatingTool" + }, function() { + return this.findTool("Rotating") + }, function(a) { + Pj(this, "Rotating", a, this.Ye) + }); + z.defineProperty(dh, { + ZE: "linkingTool" + }, function() { + return this.findTool("Linking") + }, function(a) { + Pj(this, "Linking", a, this.dg) + }); + z.defineProperty(dh, { + me: "draggingTool" + }, function() { + return this.findTool("Dragging") + }, function(a) { + Pj(this, "Dragging", a, this.dg) + }); + z.defineProperty(dh, { + tH: "dragSelectingTool" + }, function() { + return this.findTool("DragSelecting") + }, function(a) { + Pj(this, "DragSelecting", a, this.dg) + }); + z.defineProperty(dh, { + OI: "panningTool" + }, function() { + return this.findTool("Panning") + }, function(a) { + Pj(this, "Panning", a, this.dg) + }); + z.defineProperty(dh, { + Hz: "contextMenuTool" + }, function() { + return this.findTool("ContextMenu") + }, function(a) { + Pj(this, "ContextMenu", a, this.eg) + }); + z.defineProperty(dh, { + XA: "textEditingTool" + }, function() { + return this.findTool("TextEditing") + }, function(a) { + Pj(this, "TextEditing", a, this.eg) + }); + z.defineProperty(dh, { + ZG: "clickCreatingTool" + }, function() { + return this.findTool("ClickCreating") + }, function(a) { + Pj(this, "ClickCreating", a, this.eg) + }); + z.defineProperty(dh, { + $G: "clickSelectingTool" + }, function() { + return this.findTool("ClickSelecting") + }, function(a) { + Pj(this, "ClickSelecting", a, this.eg) + }); + + function Gg() { + this.NB = Qj; + this.Pq = this.Qq = this.Z = null; + this.Hn = this.Rq = this.Sq = 0; + this.cm = this.wc = this.to = this.Jj = !1; + this.Kj = this.af = !0; + this.cv = this.bv = this.HB = null; + this.GB = 0; + this.Ro = null; + this.Pu = new K("string"); + this.Ey = 600; + this.yG = new N(0, 0); + this.vB = this.uB = this.vD = !1; + this.ym = new na(O, Rj) + } + z.ia("AnimationManager", Gg); + Gg.prototype.Sc = function(a) { + this.Z = a + }; + + function Qj(a, b, c, d) { + a /= d / 2; + return 1 > a ? c / 2 * a * a + b : -c / 2 * (--a * (a - 2) - 1) + b + } + z.defineProperty(Gg, { + VA: "starting" + }, function() { + return this.Ro + }, function(a) { + this.Ro !== a && (null !== a && z.g(a, "function", Gg, "starting"), this.Ro = a) + }); + z.w(Gg, { + bK: "animationReasons" + }, function() { + return this.Pu + }); + Gg.prototype.prepareAutomaticAnimation = Gg.prototype.sn = function(a) { + if (this.af && (this.Kj || this.Z.kn)) { + this.Pu.add(a); + var b = this.VA; + if (null === b || b(this, a)) this.Jj && this.oi(), this.wc = !0, this.cm = !1 + } + }; + + function Sj(a) { + if (a.af && (a.Pu.clear(), a.wc)) + if (!a.cm) a.wc = !1; + else if (0 === a.Hn) { + var b = +new Date; + a.Hn = b; + requestAnimationFrame(function() { + if (!1 !== a.wc && !a.Jj && a.Hn === b) { + var c = a.Z; + c.hj("temporaryPixelRatio") && (c.ck = 1); + Tj(c); + a.wc = !1; + c.Ja("AnimationStarting"); + Uj(a, b) + } + }) + } + } + + function Vj(a, b, c, d, e, g) { + if (a.wc && (u && z.l(b, O, Gg, "addPropToAnimation:obj"), !("position" === c && d.N(e) || b instanceof D && !b.IE))) { + var h = a.ym; + if (h.contains(b)) { + b = h.na(b); + var k = b.start, + l = b.end; + void 0 === k[c] && (k[c] = Wj(d)); + b.Lz && void 0 !== l[c] ? b.Vz[c] = Wj(e) : (g || (b.Vz[c] = Wj(e)), l[c] = Wj(e)) + } else k = new ma, l = new ma, k[c] = Wj(d), l[c] = Wj(e), c = l, d = k.position, d instanceof N && !d.F() && a.Pu.contains("Expand SubGraph") && d.assign(c.position), h.add(b, new Rj(k, l, g)); + a.cm = !0 + } + } + + function Wj(a) { + return a instanceof N ? a.copy() : a instanceof Ea ? a.copy() : a + } + + function Uj(a, b) { + var c; + + function d() { + if (!1 !== g.Jj && g.Hn === b) { + var a = +new Date, + c = a > s ? m : a - r; + Xj(g); + Yj(g, e, q, h, c, m); + g.bv && g.bv(); + li(e); + Zj(g); + a > s ? ak(g) : requestAnimationFrame(d) + } + } + void 0 === c && (c = new ma); + var e = a.Z; + if (null !== e) { + a.Jj = !0; + var g = a, + h = c.AK || a.NB, + k = c.$K || null, + l = c.aL || null, + m = c.duration || a.Ey, + n = a.yG; + for (c = a.ym.i; c.next();) { + var p = c.value.start.position; + p instanceof N && (p.F() || p.assign(n)) + } + a.HB = h; + a.bv = k; + a.cv = l; + a.GB = m; + a.KB = a.ym; + var q = a.KB; + for (c = q.i; c.next();) k = c.value.end, k["position:placeholder"] && (l = + k["position:placeholder"], n = l.fb(Zb), n.x += l.padding.left, n.y += l.padding.top, k["position:placeholder"] = n); + Xj(a); + Yj(a, e, q, h, 0, m); + li(a.Z); + Zj(a); + var r = +new Date, + s = r + m; + g.Hn === b && requestAnimationFrame(function() { + d() + }) + } + } + var bk = { + opacity: function(a, b, c, d, e, g) { + a.opacity = d(e, b, c - b, g) + }, + position: function(a, b, c, d, e, g) { + e !== g ? a.Nx(d(e, b.x, c.x - b.x, g), d(e, b.y, c.y - b.y, g)) : a.position = new N(d(e, b.x, c.x - b.x, g), d(e, b.y, c.y - b.y, g)) + }, + "position:node": function(a, b, c, d, e, g) { + var h = a.W, + k = c.W; + c = k.x + k.width / 2 - h.width / 2; + h = k.y + k.height / 2 - h.height / 2; + e !== g ? a.Nx(d(e, b.x, c - b.x, g), d(e, b.y, h - b.y, g)) : a.position = new N(d(e, b.x, c - b.x, g), d(e, b.y, h - b.y, g)) + }, + "position:placeholder": function(a, b, c, d, e, g) { + e !== g ? a.Nx(d(e, b.x, c.x - b.x, g), d(e, b.y, c.y - b.y, g)) : + a.position = new N(d(e, b.x, c.x - b.x, g), d(e, b.y, c.y - b.y, g)) + }, + scale: function(a, b, c, d, e, g) { + a.scale = d(e, b, c - b, g) + }, + visible: function(a, b, c, d, e, g) { + a.visible = e !== g ? b : c + } + }; + + function Xj(a) { + if (!a.to) { + var b = a.Z; + a.vD = b.Bb; + a.uB = b.Ee; + a.vB = b.vu; + b.Bb = !0; + b.Ee = !0; + b.vu = !0; + a.to = !0 + } + } + + function Zj(a) { + var b = a.Z; + b.Bb = a.vD; + b.Ee = a.uB; + b.vu = a.vB; + a.to = !1 + } + + function Yj(a, b, c, d, e, g) { + for (c = c.i; c.next();) { + var h = c.key, + k = c.value, + l = k.start, + k = k.end, + m; + for (m in k) + if (("position" !== m || !k["position:placeholder"] && !k["position:node"]) && void 0 !== bk[m]) bk[m](h, l[m], k[m], d, e, g) + } + d = b.gA; + b.gA = !0; + m = a.NB; + 0 !== a.Sq && 0 !== a.Rq && (c = a.Sq, b.bc = m(e, c, a.Rq - c, g)); + null !== a.Qq && null !== a.Pq && (c = a.Qq, a = a.Pq, b.sb = new N(m(e, c.x, a.x - c.x, g), m(e, c.y, a.y - c.y, g))); + b.gA = d + } + Gg.prototype.stopAnimation = Gg.prototype.oi = function() { + !0 === this.wc && (this.wc = !1, this.cm && this.Z.Ce()); + this.Jj && this.af && ak(this) + }; + + function ak(a) { + a.Jj = !1; + a.Hn = 0; + a.cm = !1; + a.Qq = null; + a.Pq = null; + a.Sq = 0; + a.Rq = 0; + Xj(a); + for (var b = a.Z, c = a.HB, d = a.GB, e = a.KB.i; e.next();) { + var g = e.key, + h = e.value, + k = h.start, + l = h.end, + m = h.Vz, + n; + for (n in l) + if (void 0 !== bk[n]) { + var p = n; + !h.Lz || "position:node" !== p && "position:placeholder" !== p || (p = "position"); + bk[p](g, k[n], void 0 !== m[n] ? m[n] : h.Lz ? k[n] : l[n], c, d, d) + } + h.Cx && g.wd(!1) + } + for (c = a.Z.links; c.next();) d = c.value, null !== d.Ko && (d.points = d.Ko, d.Ko = null); + b.qx.clear(); + b.ck = null; + b.yc(); + b.bg(); + ck(b); + Zj(a); + a.ym = new na(O, Rj); + a.cv && + a.cv(); + a.cv = null; + a.bv = null; + b.Ja("AnimationFinished"); + b.Ce() + } + + function dk(a, b, c) { + var d = b.W, + e = c.W, + g = null; + c instanceof F && (g = c.placeholder); + null !== g ? (d = g.fb(Zb), d.x += g.padding.left, d.y += g.padding.top, Vj(a, b, "position", d, b.position, !1)) : Vj(a, b, "position", new N(e.x + e.width / 2 - d.width / 2, e.y + e.height / 2 - d.height / 2), b.position, !1); + Vj(a, b, "scale", .01, b.scale, !1); + if (b instanceof F) + for (b = b.Hc; b.next();) g = b.value, g instanceof E && dk(a, g, c) + } + + function ek(a, b, c) { + if (b.isVisible()) { + var d = null; + c instanceof F && (d = c.placeholder); + null !== d ? Vj(a, b, "position:placeholder", b.position, d, !0) : Vj(a, b, "position:node", b.position, c, !0); + Vj(a, b, "scale", b.scale, .01, !0); + a.wc && (d = a.ym, d.contains(b) && (d.na(b).Cx = !0)); + if (b instanceof F) + for (b = b.Hc; b.next();) d = b.value, d instanceof E && ek(a, d, c) + } + } + + function fk(a, b, c) { + a.wc && (null === a.Qq && b.F() && null === a.Pq && (a.Qq = b.copy()), a.Pq = c.copy(), a.cm = !0) + } + + function gk(a, b, c) { + a.wc && a.Z.kn && (0 === a.Sq && 0 === a.Rq && (a.Sq = b), a.Rq = c, a.cm = !0) + } + z.defineProperty(Gg, { + isEnabled: "isEnabled" + }, function() { + return this.af + }, function(a) { + z.g(a, "boolean", Gg, "isEnabled"); + this.af = a + }); + z.defineProperty(Gg, { + duration: "duration" + }, function() { + return this.Ey + }, function(a) { + z.g(a, "number", Gg, "duration"); + 1 > a && z.ka(a, ">= 1", Gg, "duration"); + this.Ey = a + }); + z.w(Gg, { + nf: "isAnimating" + }, function() { + return this.Jj + }); + z.w(Gg, { + kI: "isTicking" + }, function() { + return this.to + }); + z.defineProperty(Gg, { + RE: "isInitial" + }, function() { + return this.Kj + }, function(a) { + z.g(a, "boolean", Gg, "isInitial"); + this.Kj = a + }); + + function Rj(a, b, c) { + this.start = a; + this.end = b; + this.Vz = new ma; + this.Lz = c; + this.Cx = !1 + } + + function tg() { + 0 < arguments.length && z.od(tg); + z.kc(this); + this.Z = null; + this.mb = new J(D); + this.Ub = ""; + this.Xc = 1; + this.Vy = !1; + this.ml = this.vz = this.Jk = this.Ik = this.Hk = this.Gk = this.Ek = this.Fk = this.Dk = this.Lk = this.Ck = this.Kk = this.Bk = this.Ak = !0; + this.Qy = !1; + this.Wv = [] + } + z.ia("Layer", tg); + tg.prototype.Sc = function(a) { + this.Z = a + }; + tg.prototype.toString = function(a) { + void 0 === a && (a = 0); + var b = 'Layer "' + this.name + '"'; + if (0 >= a) return b; + for (var c = 0, d = 0, e = 0, g = 0, h = 0, k = this.mb.i; k.next();) { + var l = k.value; + l instanceof F ? e++ : l instanceof E ? d++ : l instanceof G ? g++ : l instanceof da ? h++ : c++ + } + k = ""; + 0 < c && (k += c + " Parts "); + 0 < d && (k += d + " Nodes "); + 0 < e && (k += e + " Groups "); + 0 < g && (k += g + " Links "); + 0 < h && (k += h + " Adornments "); + if (1 < a) + for (a = this.mb.i; a.next();) c = a.value, k += "\n " + c.toString(), d = c.data, null !== d && z.nd(d) && (k += " #" + z.nd(d)), c instanceof E ? k += " " + + ka(d) : c instanceof G && (k += " " + ka(c.Y) + " " + ka(c.da)); + return b + " " + this.mb.count + ": " + k + }; + tg.prototype.findObjectAt = tg.prototype.pe = function(a, b, c) { + void 0 === b && (b = null); + void 0 === c && (c = null); + if (!1 === this.ml) return null; + u && !a.F() && z.k("findObjectAt: Point must have a real value, not: " + a.toString()); + var d = !1; + this.h.xb.Ma(a) && (d = !0); + for (var e = z.O(), g = this.mb.o, h = g.length; h--;) { + var k = g[h]; + if ((!0 !== d || !1 !== hk(k)) && k.isVisible() && (e.assign(a), ub(e, k.ph), k = k.pe(e, b, c), null !== k && (null !== b && (k = b(k)), null !== k && (null === c || c(k))))) return z.A(e), k + } + z.A(e); + return null + }; + tg.prototype.findObjectsAt = tg.prototype.mp = function(a, b, c, d) { + void 0 === b && (b = null); + void 0 === c && (c = null); + d instanceof J || d instanceof K || (d = new K(O)); + if (!1 === this.ml) return d; + u && !a.F() && z.k("findObjectsAt: Point must have a real value, not: " + a.toString()); + var e = !1; + this.h.xb.Ma(a) && (e = !0); + for (var g = z.O(), h = this.mb.o, k = h.length; k--;) { + var l = h[k]; + !0 === e && !1 === hk(l) || !l.isVisible() || (g.assign(a), ub(g, l.ph), l.mp(g, b, c, d) && (null !== b && (l = b(l)), null === l || null !== c && !c(l) || d.add(l))) + } + z.A(g); + return d + }; + tg.prototype.findObjectsIn = tg.prototype.ok = function(a, b, c, d, e) { + void 0 === b && (b = null); + void 0 === c && (c = null); + void 0 === d && (d = !1); + e instanceof J || e instanceof K || (e = new K(O)); + if (!1 === this.ml) return e; + u && !a.F() && z.k("findObjectsIn: Rect must have a real value, not: " + a.toString()); + var g = !1; + this.h.xb.mk(a) && (g = !0); + for (var h = this.mb.o, k = h.length; k--;) { + var l = h[k]; + (!0 !== g || !1 !== hk(l)) && l.isVisible() && l.ok(a, b, c, d, e) && (null !== b && (l = b(l)), null === l || null !== c && !c(l) || e.add(l)) + } + return e + }; + tg.prototype.Wz = function(a, b, c, d, e, g, h) { + if (!1 === this.ml) return e; + for (var k = this.mb.o, l = k.length; l--;) { + var m = k[l]; + (!0 !== h || !1 !== hk(m)) && g(m) && m.isVisible() && m.ok(a, b, c, d, e) && (null !== b && (m = b(m)), null === m || null !== c && !c(m) || e.add(m)) + } + return e + }; + tg.prototype.findObjectsNear = tg.prototype.dn = function(a, b, c, d, e, g) { + void 0 === c && (c = null); + void 0 === d && (d = null); + void 0 === e && (e = !0); + if (!1 !== e && !0 !== e) { + if (e instanceof J || e instanceof K) g = e; + e = !0 + } + g instanceof J || g instanceof K || (g = new K(O)); + if (!1 === this.ml) return g; + u && !a.F() && z.k("findObjectsNear: Point must have a real value, not: " + a.toString()); + var h = !1; + this.h.xb.Ma(a) && (h = !0); + for (var k = z.O(), l = z.O(), m = this.mb.o, n = m.length; n--;) { + var p = m[n]; + !0 === h && !1 === hk(p) || !p.isVisible() || (k.assign(a), ub(k, p.ph), + l.n(a.x + b, a.y), ub(l, p.ph), p.dn(k, l, c, d, e, g) && (null !== c && (p = c(p)), null === p || null !== d && !d(p) || g.add(p))) + } + z.A(k); + z.A(l); + return g + }; + f = tg.prototype; + f.Jf = function(a, b) { + if (this.visible) { + var c; + c = void 0 === b ? a.xb : b; + for (var d = this.mb.o, e = d.length, g = 0; g < e; g++) { + var h = d[g]; + h.AC = g; + if (!(h instanceof G && !1 === h.Cg)) { + if (h instanceof da) { + var k = h; + if (null !== k.Wf) continue + } + if (Hb(h.W, c)) + for (h.Jf(!0), ik(h), h = h.Dw; h.next();) k = h.value, rj(k, Infinity, Infinity), k.Lc(), k.Jf(!0); + else h.Jf(!1), null !== h.Dw && 0 < h.Dw.count && ik(h) + } + } + } + }; + f.ff = function(a, b, c) { + if (this.visible && 0 !== this.Xc && (void 0 === c && (c = !0), c || !this.Nc)) { + c = this.mb.o; + var d = c.length; + if (0 !== d) { + 1 !== this.Xc && (a.globalAlpha = this.Xc); + var e = this.Wv; + e.length = 0; + for (var g = b.scale, h = 0; h < d; h++) { + var k = c[h]; + if (hk(k)) { + if (k instanceof G) { + var l = k; + l.rc && e.push(l); + if (!1 === l.Cg) continue + } + l = k.W; + 1 < l.width * g || 1 < l.height * g ? k.ff(a, b) : jk(k, a) + } + } + a.globalAlpha = 1 + } + } + }; + + function kk(a, b, c, d) { + if (a.visible && 0 !== a.Xc) { + 1 !== a.Xc && (b.globalAlpha = a.Xc); + var e = a.Wv; + e.length = 0; + var g = c.scale; + a = a.mb.o; + for (var h = a.length, k = d.length, l = 0; l < h; l++) { + var m = a[l]; + if (hk(m)) { + if (m instanceof G) { + var n = m; + n.rc && e.push(n); + if (!1 === n.Cg) continue + } + var n = lk(m, m.W), + p; + a: { + p = n; + for (var q = d, r = k, s = 2 / g, t = 4 / g, v = 0; v < r; v++) { + var x = q[v]; + if (0 !== x.width && 0 !== x.height && p.GE(x.x - s, x.y - s, x.width + t, x.height + t)) { + p = !0; + break a + } + } + p = !1 + } + p && (1 < n.width * g || 1 < n.height * g ? m.ff(b, c) : jk(m, b)) + } + } + b.globalAlpha = 1 + } + } + f.j = function(a, b, c, d, e) { + var g = this.h; + null !== g && g.Rc(Sf, a, this, b, c, d, e) + }; + f.xp = function(a, b, c) { + var d = this.mb; + b.Fv = this; + if (a >= d.count) a = d.count; + else if (d.ea(a) === b) return -1; + d.Ld(a, b); + b.Kt(c); + d = this.h; + null !== d && (c ? d.ta() : d.xp(b)); + mk(this, a, b); + return a + }; + f.Ve = function(a, b, c) { + if (!c && b.layer !== this && null !== b.layer) return b.layer.Ve(a, b, c); + var d = this.mb; + if (0 > a || a >= d.length) { + if (a = d.indexOf(b), 0 > a) return -1 + } else if (d.ea(a) !== b && (a = d.indexOf(b), 0 > a)) return -1; + b.Lt(c); + d.dd(a); + d = this.h; + null !== d && (c ? d.ta() : d.Ve(b)); + b.Fv = null; + return a + }; + + function mk(a, b, c) { + b = nk(a, b, c); + if (c instanceof F && null !== c && isNaN(c.En)) { + if (0 !== c.Hc.count) { + for (var d = -1, e = a.mb.o, g = e.length, h = 0; h < g; h++) { + var k = e[h]; + if (k === c && (b = h, 0 <= d)) break; + if (0 > d && k.Va === c && (d = h, 0 <= b)) break + }!(0 > d) && d < b && (e = a.mb, e.dd(b), e.Ld(d, c)) + } + c = c.Va; + null !== c && mk(a, -1, c) + } + } + + function nk(a, b, c) { + var d = c.En; + if (isNaN(d)) return b; + a = a.mb; + var e = a.count; + if (1 >= e) return b; + 0 > b && (b = a.indexOf(c)); + if (0 > b) return -1; + for (var g = b - 1, h = NaN; 0 <= g;) { + h = a.ea(g).En; + if (!isNaN(h)) break; + g-- + } + for (var k = b + 1, l = NaN; k < e;) { + l = a.ea(k).En; + if (!isNaN(l)) break; + k++ + } + if (!isNaN(h) && h > d) + for (;;) { + if (-1 === g || h <= d) { + g++; + if (g === b) break; + a.dd(b); + a.Ld(g, c); + return g + } + for (h = NaN; 0 <= --g && (h = a.ea(g).En, isNaN(h));); + } else if (!isNaN(l) && l < d) + for (;;) { + if (k === e || l >= d) { + k--; + if (k === b) break; + a.dd(b); + a.Ld(k, c); + return k + } + for (l = NaN; ++k < e && (l = a.ea(k).En, + isNaN(l));); + } + return b + } + f.clear = function() { + for (var a = this.mb.jc(), b = a.length, c = 0; c < b; c++) a[c].Jf(!1), this.Ve(-1, a[c], !1) + }; + z.w(tg, { + ni: "parts" + }, function() { + return this.mb.i + }); + z.w(tg, { + lL: "partsBackwards" + }, function() { + return this.mb.ln + }); + z.w(tg, { + h: "diagram" + }, function() { + return this.Z + }); + z.defineProperty(tg, { + name: "name" + }, function() { + return this.Ub + }, function(a) { + z.g(a, "string", tg, "name"); + var b = this.Ub; + if (b !== a) { + var c = this.h; + if (null !== c) + for ("" === b && z.k("Cannot rename default Layer to: " + a), c = c.mn; c.next();) c.value.name === a && z.k("Layer.name is already present in this diagram: " + a); + this.Ub = a; + this.j("name", b, a); + for (a = this.mb.i; a.next();) a.value.If = this.Ub + } + }); + z.defineProperty(tg, { + opacity: "opacity" + }, function() { + return this.Xc + }, function(a) { + var b = this.Xc; + b !== a && (z.g(a, "number", tg, "opacity"), (0 > a || 1 < a) && z.ka(a, "0 <= value <= 1", tg, "opacity"), this.Xc = a, this.j("opacity", b, a), a = this.h, null !== a && a.ta()) + }); + z.defineProperty(tg, { + Nc: "isTemporary" + }, function() { + return this.Vy + }, function(a) { + var b = this.Vy; + b !== a && (z.g(a, "boolean", tg, "isTemporary"), this.Vy = a, this.j("isTemporary", b, a)) + }); + z.defineProperty(tg, { + visible: "visible" + }, function() { + return this.vz + }, function(a) { + var b = this.vz; + if (b !== a) { + z.g(a, "boolean", tg, "visible"); + this.vz = a; + this.j("visible", b, a); + for (b = this.mb.i; b.next();) b.value.wd(a); + a = this.h; + null !== a && a.ta() + } + }); + z.defineProperty(tg, { + ig: "pickable" + }, function() { + return this.ml + }, function(a) { + var b = this.ml; + b !== a && (z.g(a, "boolean", tg, "pickable"), this.ml = a, this.j("pickable", b, a)) + }); + z.defineProperty(tg, { + JE: "isBoundsIncluded" + }, function() { + return this.Qy + }, function(a) { + this.Qy !== a && (this.Qy = a, null !== this.h && this.h.yc()) + }); + z.defineProperty(tg, { + kk: "allowCopy" + }, function() { + return this.Ak + }, function(a) { + var b = this.Ak; + b !== a && (z.g(a, "boolean", tg, "allowCopy"), this.Ak = a, this.j("allowCopy", b, a)) + }); + z.defineProperty(tg, { + Sm: "allowDelete" + }, function() { + return this.Bk + }, function(a) { + var b = this.Bk; + b !== a && (z.g(a, "boolean", tg, "allowDelete"), this.Bk = a, this.j("allowDelete", b, a)) + }); + z.defineProperty(tg, { + Hw: "allowTextEdit" + }, function() { + return this.Kk + }, function(a) { + var b = this.Kk; + b !== a && (z.g(a, "boolean", tg, "allowTextEdit"), this.Kk = a, this.j("allowTextEdit", b, a)) + }); + z.defineProperty(tg, { + Ew: "allowGroup" + }, function() { + return this.Ck + }, function(a) { + var b = this.Ck; + b !== a && (z.g(a, "boolean", tg, "allowGroup"), this.Ck = a, this.j("allowGroup", b, a)) + }); + z.defineProperty(tg, { + Iw: "allowUngroup" + }, function() { + return this.Lk + }, function(a) { + var b = this.Lk; + b !== a && (z.g(a, "boolean", tg, "allowUngroup"), this.Lk = a, this.j("allowUngroup", b, a)) + }); + z.defineProperty(tg, { + lt: "allowLink" + }, function() { + return this.Dk + }, function(a) { + var b = this.Dk; + b !== a && (z.g(a, "boolean", tg, "allowLink"), this.Dk = a, this.j("allowLink", b, a)) + }); + z.defineProperty(tg, { + Tm: "allowRelink" + }, function() { + return this.Fk + }, function(a) { + var b = this.Fk; + b !== a && (z.g(a, "boolean", tg, "allowRelink"), this.Fk = a, this.j("allowRelink", b, a)) + }); + z.defineProperty(tg, { + ul: "allowMove" + }, function() { + return this.Ek + }, function(a) { + var b = this.Ek; + b !== a && (z.g(a, "boolean", tg, "allowMove"), this.Ek = a, this.j("allowMove", b, a)) + }); + z.defineProperty(tg, { + Fw: "allowReshape" + }, function() { + return this.Gk + }, function(a) { + var b = this.Gk; + b !== a && (z.g(a, "boolean", tg, "allowReshape"), this.Gk = a, this.j("allowReshape", b, a)) + }); + z.defineProperty(tg, { + mt: "allowResize" + }, function() { + return this.Hk + }, function(a) { + var b = this.Hk; + b !== a && (z.g(a, "boolean", tg, "allowResize"), this.Hk = a, this.j("allowResize", b, a)) + }); + z.defineProperty(tg, { + Gw: "allowRotate" + }, function() { + return this.Ik + }, function(a) { + var b = this.Ik; + b !== a && (z.g(a, "boolean", tg, "allowRotate"), this.Ik = a, this.j("allowRotate", b, a)) + }); + z.defineProperty(tg, { + xf: "allowSelect" + }, function() { + return this.Jk + }, function(a) { + var b = this.Jk; + b !== a && (z.g(a, "boolean", tg, "allowSelect"), this.Jk = a, this.j("allowSelect", b, a)) + }); + + function C(a) { + function b() { + window.document.removeEventListener("DOMContentLoaded", b, !1); + ok(c) + } + 1 < arguments.length && z.k("Diagram constructor can only take one optional argument, the DIV HTML element or its id."); + z.kc(this); + pk = []; + this.Vc = !0; + this.sB = new Gg; + this.sB.Sc(this); + this.Gd = 17; + this.mr = !1; + this.hz = "default"; + var c = this; + null !== window.document.body ? ok(this) : window.document.addEventListener("DOMContentLoaded", b, !1); + this.Yb = new J(tg); + this.Ob = this.Jb = 0; + this.Xj = this.Pb = this.gd = this.Fb = null; + this.rF(); + this.qo = + null; + this.qF(); + this.sb = (new N(NaN, NaN)).freeze(); + this.bc = 1; + this.wv = (new N(NaN, NaN)).freeze(); + this.xv = NaN; + this.Nv = 1E-4; + this.Kv = 100; + this.Hd = new Fa; + this.Bw = (new N(NaN, NaN)).freeze(); + this.nv = (new w(NaN, NaN, NaN, NaN)).freeze(); + this.iw = (new Db(0, 0, 0, 0)).freeze(); + this.jw = qk; + this.fw = this.bw = null; + this.dm = jh; + this.Pn = Pc; + this.Xk = jh; + this.no = Pc; + this.yv = this.vv = Zb; + this.ue = !0; + this.gr = !1; + this.qg = new K(O); + this.Rk = new na(G, w); + this.bo = !0; + this.tB = 250; + this.In = -1; + this.Su = (new Db(16, 16, 16, 16)).freeze(); + this.gv = this.Vf = !1; + this.io = !0; + this.Ei = new Pf; + this.Zc = new Pf; + this.Qb = new Pf; + this.gh = this.ti = null; + this.Ss = !1; + this.zy = this.Ay = null; + rk(this); + this.Fo = new K(E); + this.ol = new K(F); + this.zo = new K(G); + this.mb = new K(D); + this.Cv = !0; + this.ww = sk; + this.lC = !1; + this.yw = yi; + this.vy = this.xy = this.rz = null; + this.av = ""; + this.Oq = "auto"; + this.yi = this.Wi = this.Mi = this.Qv = this.Ni = this.Oi = this.Pi = this.xi = this.Ci = this.ui = null; + this.cz = !1; + this.TC = {}; + this.aw = 0; + this.Uf = [null, null]; + this.qy = null; + this.lq = this.yy = this.lz = this.$C = this.Vi = !1; + this.xC = !0; + this.Sy = this.Vd = !1; + this.ie = null; + var d = this; + this.EC = function(a) { + if (a.ha === d.ha && d.$a) { + d.$a = !1; + try { + var b = a.Dc; + "" === a.rf && b === Sf && tk(d, a.object, a.propertyName) + } finally { + d.$a = !0 + } + } + }; + this.FC = function(a) { + uk(d, a) + }; + this.xD = !0; + this.bh = -2; + this.zi = new na(Object, D); + this.Qk = new na(Object, G); + this.nm = new na(Object, Array); + this.Go = new na("string", Array); + this.SC = new J(vk); + this.Gi = !1; + this.Bk = this.Ak = this.Hu = this.af = !0; + this.Ju = this.Iu = !1; + this.Ou = this.Mu = this.Jk = this.Ik = this.Hk = this.Gk = this.Ek = this.Fk = this.Dk = this.Lu = this.Lk = this.Ck = this.Kk = !0; + this.km = this.uC = !1; + this.Nu = this.Ku = this.tv = this.sv = !0; + this.lw = this.hw = 16; + this.iz = this.gw = !1; + this.xs = this.kw = null; + this.jz = this.kz = 0; + this.df = (new Db(5)).freeze(); + this.ow = (new K(D)).freeze(); + this.Lv = 999999999; + this.uv = (new K(D)).freeze(); + this.Yk = this.im = this.Ij = !0; + this.Vk = this.Hj = !1; + this.he = null; + this.Qu = !0; + this.eh = !1; + this.rG = new K(G); + this.jC = new K(wk); + this.Ed = null; + this.KC = 1; + this.Ly = !1; + this.cD = 0; + this.wD = (new w(NaN, NaN, NaN, NaN)).freeze(); + this.hv = (new w(NaN, NaN, NaN, NaN)).freeze(); + this.Xv = new K(xk); + yk(this); + this.Hv = this.pv = this.Rv = this.PB = this.OB = this.QB = this.Oj = this.Tk = this.Qi = null; + zk(this); + this.td = null; + this.ov = !1; + this.Sn = null; + this.hb = new dh; + this.hb.initializeStandardTools(); + this.eb = this.vt = this.hb; + this.wb = new ra; + this.ha = new V; + this.Vi = !0; + this.Sb = new vg; + this.Vi = !1; + this.aC = this.Cy = null; + this.jd = 1; + this.ck = null; + this.Wk = new Ak; + void 0 !== a && Bk(this, a); + this.bl = 1; + this.pm = 0; + this.zC = new N; + this.tD = 500; + this.Ru = new N; + this.Ks = null; + this.Vc = this.Zk = !1 + } + z.ia("Diagram", C); + + function zk(a) { + a.Qi = new na("string", D); + var b = new E, + c = new qa; + c.bind(new Xg("text", "", ka)); + b.add(c); + a.QB = b; + a.Qi.add("", b); + b = new E; + c = new qa; + c.stroke = "brown"; + c.bind(new Xg("text", "", ka)); + b.add(c); + a.Qi.add("Comment", b); + b = new E; + b.vk = !1; + b.ND = !1; + c = new X; + c.Hb = "Ellipse"; + c.fill = "black"; + c.stroke = null; + c.Aa = (new Ea(3, 3)).La(); + b.add(c); + a.Qi.add("LinkLabel", b); + a.Tk = new na("string", F); + b = new F; + b.Ix = "GROUPPANEL"; + b.type = Ck; + c = new qa; + c.font = "bold 12pt sans-serif"; + c.bind(new Xg("text", "", ka)); + b.add(c); + c = new I(Dk); + c.name = + "GROUPPANEL"; + var d = new X; + d.Hb = "Rectangle"; + d.fill = "rgba(128,128,128,0.2)"; + d.stroke = "black"; + c.add(d); + d = new Zi; + d.padding = (new Db(5, 5, 5, 5)).La(); + c.add(d); + b.add(c); + a.OB = b; + a.Tk.add("", b); + a.Oj = new na("string", G); + b = new G; + c = new X; + c.Ff = !0; + b.add(c); + c = new X; + c.fq = "Standard"; + c.fill = "black"; + c.stroke = null; + c.ub = 0; + b.add(c); + a.PB = b; + a.Oj.add("", b); + b = new G; + c = new X; + c.Ff = !0; + c.stroke = "brown"; + b.add(c); + a.Oj.add("Comment", b); + b = new da; + b.type = Dk; + c = new X; + c.fill = null; + c.stroke = "dodgerblue"; + c.ub = 3; + b.add(c); + c = new Zi; + c.margin = (new Db(1.5, + 1.5, 1.5, 1.5)).La(); + b.add(c); + a.Rv = b; + a.pv = b; + b = new da; + b.type = Ki; + c = new X; + c.Ff = !0; + c.fill = null; + c.stroke = "dodgerblue"; + c.ub = 3; + b.add(c); + a.Hv = b + } + + function ok(a) { + var b = z.createElement("p"); + b.style.width = "100%"; + b.style.height = "200px"; + b.style.boxSizing = "content-box"; + var c = z.createElement("div"); + c.style.position = "absolute"; + c.style.visibility = "hidden"; + c.style.width = "200px"; + c.style.height = "150px"; + c.style.overflow = "hidden"; + c.style.boxSizing = "content-box"; + c.appendChild(b); + window.document.body.appendChild(c); + var d = b.offsetWidth; + c.style.overflow = "scroll"; + b = b.offsetWidth; + d === b && (b = c.clientWidth); + window.document.body.removeChild(c); + c = d - b; + 0 !== c || z.PE || + (c = 11); + a.Gd = c; + c = z.createElement("div"); + c.dir = "rtl"; + c.style.cssText = "font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;"; + c.textContent = "A"; + window.document.body.appendChild(c); + d = "reverse"; + 0 < c.scrollLeft ? d = "default" : (c.scrollLeft = 1, 0 === c.scrollLeft && (d = "negative")); + window.document.body.removeChild(c); + a.hz = d + } + C.prototype.toString = function(a) { + void 0 === a && (a = 0); + var b = ""; + this.id && (b = this.id); + this.Dl && this.Dl.id && (b = this.Dl.id); + b = 'Diagram "' + b + '"'; + if (0 >= a) return b; + for (var c = this.Yb.i; c.next();) b += "\n " + c.value.toString(a - 1); + return b + }; + C.fromDiv = function(a) { + var b = a; + "string" === typeof a && (b = window.document.getElementById(a)); + return b instanceof HTMLDivElement && b.Z instanceof C ? b.Z : null + }; + z.defineProperty(C, { + Dl: "div" + }, function() { + return this.Pb + }, function(a) { + null !== a && z.l(a, HTMLDivElement, C, "div"); + if (this.Pb !== a) { + pk = []; + var b = this.Pb; + null !== b ? (b.Z = void 0, b.innerHTML = "", null !== this.Fb && (this.Fb.removeEventListener("touchstart", this.ZF, !1), this.Fb.removeEventListener("touchmove", this.YF, !1), this.Fb.removeEventListener("touchend", this.XF, !1), this.Fb.Kd.Z = null), b = this.hb, null !== b && (b.Ye.each(function(a) { + a.cancelWaitAfter() + }), b.dg.each(function(a) { + a.cancelWaitAfter() + }), b.eg.each(function(a) { + a.cancelWaitAfter() + })), + b.cancelWaitAfter(), this.eb.doCancel(), this.gd = this.Fb = null, window.removeEventListener("resize", this.hG, !1), window.removeEventListener("mousemove", this.Kp, !0), window.removeEventListener("mousedown", this.Jp, !0), window.removeEventListener("mouseup", this.Mp, !0), window.removeEventListener("mousewheel", this.zh, !0), window.removeEventListener("DOMMouseScroll", this.zh, !0), window.removeEventListener("mouseout", this.Lp, !0)) : this.eh = !1; + this.Pb = null; + if (null !== a) { + if (b = a.Z) b.Dl = null; + Bk(this, a); + this.Sp() + } + } + }); + + function Ek(a) { + var b = a.Fb; + b.addEventListener("touchstart", a.ZF, !1); + b.addEventListener("touchmove", a.YF, !1); + b.addEventListener("touchend", a.XF, !1); + b.addEventListener("mousemove", a.Kp, !1); + b.addEventListener("mousedown", a.Jp, !1); + b.addEventListener("mouseup", a.Mp, !1); + b.addEventListener("mousewheel", a.zh, !1); + b.addEventListener("DOMMouseScroll", a.zh, !1); + b.addEventListener("mouseout", a.Lp, !1); + b.addEventListener("keydown", a.oI, !1); + b.addEventListener("keyup", a.pI, !1); + b.addEventListener("selectstart", function(a) { + a.preventDefault(); + return !1 + }, !1); + b.addEventListener("contextmenu", function(a) { + a.preventDefault(); + return !1 + }, !1); + b.addEventListener("gesturechange", function(b) { + a.hb.rp === Mj && b.preventDefault() + }, !1); + b.addEventListener("pointerdown", a.QI, !1); + b.addEventListener("pointermove", a.SI, !1); + b.addEventListener("pointerleave", a.RI, !1); + window.addEventListener("resize", a.hG, !1) + } + C.prototype.computePixelRatio = function() { + return null !== this.ck ? this.ck : this.vG + }; + C.prototype.doMouseMove = function() { + this.eb.doMouseMove() + }; + C.prototype.doMouseDown = function() { + this.eb.doMouseDown() + }; + C.prototype.doMouseUp = function() { + this.eb.doMouseUp() + }; + C.prototype.doMouseWheel = function() { + this.eb.doMouseWheel() + }; + C.prototype.doKeyDown = function() { + this.eb.doKeyDown() + }; + C.prototype.doKeyUp = function() { + this.eb.doKeyUp() + }; + C.prototype.doFocus = function() { + this.focus() + }; + C.prototype.focus = C.prototype.focus = function() { + this.Fb && this.Fb.focus() + }; + + function Tj(a) { + if (null !== a.Fb) { + var b = a.Pb; + if (0 !== b.clientWidth && 0 !== b.clientHeight) { + var c = a.Vk ? a.Gd : 0, + d = a.Hj ? a.Gd : 0, + e = a.jd; + a.jd = a.computePixelRatio(); + a.jd !== e && (a.gr = !0, a.Ce()); + if (b.clientWidth !== a.Jb + c || b.clientHeight !== a.Ob + d) a.im = !0, a.ue = !0, b = a.Sb, null !== b && b.mx && a.wl === jh && b.I(), a.Vd || a.Ce() + } + } + } + + function yk(a) { + var b = new tg; + b.name = "Background"; + a.ft(b); + b = new tg; + b.name = ""; + a.ft(b); + b = new tg; + b.name = "Foreground"; + a.ft(b); + b = new tg; + b.name = "Adornment"; + b.Nc = !0; + a.ft(b); + b = new tg; + b.name = "Tool"; + b.Nc = !0; + b.JE = !0; + a.ft(b); + b = new tg; + b.name = "Grid"; + b.xf = !1; + b.ig = !1; + b.Nc = !0; + a.OG(b, a.Fl("Background")) + } + + function Fk(a) { + a.td = new I(Gk); + a.td.name = "GRID"; + var b = new X; + b.Hb = "LineH"; + b.stroke = "lightgray"; + b.ub = .5; + b.interval = 1; + a.td.add(b); + b = new X; + b.Hb = "LineH"; + b.stroke = "gray"; + b.ub = .5; + b.interval = 5; + a.td.add(b); + b = new X; + b.Hb = "LineH"; + b.stroke = "gray"; + b.ub = 1; + b.interval = 10; + a.td.add(b); + b = new X; + b.Hb = "LineV"; + b.stroke = "lightgray"; + b.ub = .5; + b.interval = 1; + a.td.add(b); + b = new X; + b.Hb = "LineV"; + b.stroke = "gray"; + b.ub = .5; + b.interval = 5; + a.td.add(b); + b = new X; + b.Hb = "LineV"; + b.stroke = "gray"; + b.ub = 1; + b.interval = 10; + a.td.add(b); + b = new D; + b.add(a.td); + b.If = "Grid"; + b.En = 0; + b.jx = !1; + b.IE = !1; + b.ig = !1; + b.sx = "GRID"; + a.add(b); + a.mb.remove(b); + a.td.visible = !1 + } + C.prototype.xG = function() { + this.Z.isEnabled ? this.Z.sH(this) : Hk(this.Z) + }; + C.prototype.JC = function(a) { + this.Z.isEnabled ? (this.Z.iz = !0, this.Z.kz = a.target.scrollTop, this.Z.jz = a.target.scrollLeft) : Hk(this.Z) + }; + C.prototype.diagramScroll = C.prototype.sH = function(a) { + if (this.iz && null !== this.Fb) { + this.gw = !0; + var b = this.ad, + c = this.xb, + d = b.width, + e = c.width, + g = b.height, + h = c.height, + k = b.right, + l = c.right, + m = b.bottom, + n = c.bottom, + p = b.x, + q = c.x, + b = b.y, + c = c.y, + r = this.scale, + s; + s = a.scrollLeft; + if (this.mr) switch (this.hz) { + case "negative": + s = s + a.scrollWidth - a.clientWidth; + break; + case "reverse": + s = a.scrollWidth - s - a.clientWidth + } + var t = s; + e < d || h < g ? (s = z.Tb(this.position.x, this.position.y), this.xe && this.jz !== t && (s.x = t / r + p, this.jz = t), this.ye && this.kz !== + a.scrollTop && (s.y = a.scrollTop / r + b, this.kz = a.scrollTop), this.position = s, z.A(s), this.im = this.gw = !1) : (s = z.O(), a.AG && this.xe && (p < q && (this.position = s.n(t + p, this.position.y)), k > l && (this.position = s.n(-(this.kw.scrollWidth - this.Jb) + t - this.Jb / r + k, this.position.y))), a.BG && this.ye && (b < c && (this.position = s.n(this.position.x, a.scrollTop + b)), m > n && (this.position = s.n(this.position.x, -(this.kw.scrollHeight - this.Ob) + a.scrollTop - this.Ob / r + m))), z.A(s), Ik(this), this.im = this.gw = !1, b = this.ad, c = this.xb, k = b.right, l = c.right, + m = b.bottom, n = c.bottom, p = b.x, q = c.x, b = b.y, c = c.y, e >= d && p >= q && k <= l && (this.xs.style.width = "1px"), h >= g && b >= c && m <= n && (this.xs.style.height = "1px")) + } + }; + C.prototype.computeBounds = C.prototype.rh = function() { + 0 < this.qg.count && Jk(this); + return Kk(this) + }; + + function Kk(a) { + if (a.uE.F()) { + var b = a.uE.copy(); + b.Cw(a.padding); + return b + } + for (var c = !0, d = a.Yb.o, e = d.length, g = 0; g < e; g++) { + var h = d[g]; + if (h.visible && (!h.Nc || h.JE)) + for (var h = h.mb.o, k = h.length, l = 0; l < k; l++) { + var m = h[l]; + m.jx && m.isVisible() && (m = m.W, m.F() && (c ? (c = !1, b = m.copy()) : b.qi(m))) + } + } + c && (b = new w(0, 0, 0, 0)); + b.Cw(a.padding); + return b + } + C.prototype.computePartsBounds = function(a) { + var b = null; + for (a = a.i; a.next();) { + var c = a.value; + c instanceof G || (c.Bf(), null === b ? b = c.W.copy() : b.qi(c.W)) + } + return null === b ? new w(NaN, NaN, 0, 0) : b + }; + + function Lk(a, b) { + if ((b || a.eh) && !a.Vc && null !== a.Fb && !a.Ua.nf && a.ad.F()) { + a.Vc = !0; + var c = a.dm; + b && a.Xk !== jh && (c = a.Xk); + var d = c !== jh ? Mk(a, c) : a.scale, + c = a.xb.copy(), + e = a.Jb / d, + g = a.Ob / d, + h = null, + k = a.Ua; + k.wc && (h = a.sb.copy()); + a.position.Wa(); + var l = a.Pn; + b && !l.cd() && a.no.cd() && (l = a.no); + Nk(a, a.sb, a.ad, e, g, l, b); + a.position.freeze(); + null !== h && fk(k, h, a.sb); + a.scale = d; + a.Vc = !1; + d = a.xb; + d.Mc(c) || a.fu(c, d) + } + } + + function Mk(a, b) { + var c = a.wb.Rw; + if (null === a.Fb) return c; + a.Ij && Ok(a, a.rh()); + var d = a.ad; + if (!d.F()) return c; + var e = d.width, + d = d.height, + g = a.Jb, + h = a.Ob, + k = g / e, + l = h / d; + return b === Pk ? (e = Math.min(l, k), e > c && (e = c), e < a.yh && (e = a.yh), e > a.xh && (e = a.xh), e) : b === Qk ? (e = l > k ? (h - a.Gd) / d : (g - a.Gd) / e, e > c && (e = c), e < a.yh && (e = a.yh), e > a.xh && (e = a.xh), e) : a.scale + } + C.prototype.zoomToFit = C.prototype.zoomToFit = function() { + this.scale = Mk(this, Pk) + }; + C.prototype.zoomToRect = function(a, b) { + void 0 === b && (b = Pk); + var c = a.width, + d = a.height; + if (!(0 === c || 0 === d || isNaN(c) && isNaN(d))) { + var e = 1; + if (b === Pk || b === Qk) + if (isNaN(c)) e = this.xb.height * this.scale / d; + else if (isNaN(d)) e = this.xb.width * this.scale / c; + else var e = this.Jb, + g = this.Ob, + e = b === Qk ? g / d > e / c ? (g - (this.Hj ? this.Gd : 0)) / d : (e - (this.Vk ? this.Gd : 0)) / c : Math.min(g / d, e / c); + this.scale = e; + this.position = new N(a.x, a.y) + } + }; + z.defineProperty(C, { + gA: null + }, function() { + return this.Vc + }, function(a) { + this.Vc = a + }); + C.prototype.alignDocument = function(a, b) { + this.Ij && Ok(this, this.rh()); + var c = this.ad, + d = this.xb; + this.position = new N(c.x + (a.x * c.width + a.offsetX) - (b.x * d.width - b.offsetX), c.y + (a.y * c.height + a.offsetY) - (b.y * d.height - b.offsetY)) + }; + + function Nk(a, b, c, d, e, g, h) { + var k = b.x, + l = b.y; + if (h || a.MA === qk) g.cd() && (d > c.width && (k = c.x + (g.x * c.width + g.offsetX) - (g.x * d - g.offsetX)), e > c.height && (l = c.y + (g.y * c.height + g.offsetY) - (g.y * e - g.offsetY))), g = a.BF, h = d - c.width, d < c.width + g.left + g.right ? (k = Math.min(k + d / 2, c.right + Math.max(h, g.right) - d / 2), k = Math.max(k, c.left - Math.max(h, g.left) + d / 2), k -= d / 2) : k > c.left ? k = c.left : k < c.right - d && (k = c.right - d), d = e - c.height, e < c.height + g.top + g.bottom ? (l = Math.min(l + e / 2, c.bottom + Math.max(d, g.bottom) - e / 2), l = Math.max(l, c.top - Math.max(d, + g.top) + e / 2), l -= e / 2) : l > c.top ? l = c.top : l < c.bottom - e && (l = c.bottom - e); + b.x = isFinite(k) ? k : -a.padding.left; + b.y = isFinite(l) ? l : -a.padding.top; + null !== a.jF && (a = a.jF(a, b), b.x = a.x, b.y = a.y) + } + C.prototype.findPartAt = C.prototype.At = function(a, b) { + var c = b ? ei(this, a, function(a) { + return a.ca + }, function(a) { + return a.canSelect() + }) : ei(this, a, function(a) { + return a.ca + }); + return c instanceof D ? c : null + }; + C.prototype.findObjectAt = C.prototype.pe = function(a, b, c) { + void 0 === b && (b = null); + void 0 === c && (c = null); + Jk(this); + for (var d = this.Yb.ln; d.next();) { + var e = d.value; + if (e.visible && (e = e.pe(a, b, c), null !== e)) return e + } + return null + }; + + function ei(a, b, c, d) { + void 0 === c && (c = null); + void 0 === d && (d = null); + Jk(a); + for (a = a.Yb.ln; a.next();) { + var e = a.value; + if (e.visible && !e.Nc && (e = e.pe(b, c, d), null !== e)) return e + } + return null + } + C.prototype.findObjectsAt = C.prototype.mp = function(a, b, c, d) { + void 0 === b && (b = null); + void 0 === c && (c = null); + d instanceof J || d instanceof K || (d = new K(O)); + Jk(this); + for (var e = this.Yb.ln; e.next();) { + var g = e.value; + g.visible && g.mp(a, b, c, d) + } + return d + }; + C.prototype.findObjectsIn = C.prototype.ok = function(a, b, c, d, e) { + void 0 === b && (b = null); + void 0 === c && (c = null); + void 0 === d && (d = !1); + e instanceof J || e instanceof K || (e = new K(O)); + Jk(this); + for (var g = this.Yb.ln; g.next();) { + var h = g.value; + h.visible && h.ok(a, b, c, d, e) + } + return e + }; + C.prototype.Wz = function(a, b, c, d, e, g) { + var h = new K(O); + Jk(this); + for (var k = this.Yb.ln; k.next();) { + var l = k.value; + l.visible && l.Wz(a, b, c, d, h, e, g) + } + return h + }; + C.prototype.findObjectsNear = C.prototype.dn = function(a, b, c, d, e, g) { + void 0 === c && (c = null); + void 0 === d && (d = null); + void 0 === e && (e = !0); + if (!1 !== e && !0 !== e) { + if (e instanceof J || e instanceof K) g = e; + e = !0 + } + g instanceof J || g instanceof K || (g = new K(O)); + Jk(this); + for (var h = this.Yb.ln; h.next();) { + var k = h.value; + k.visible && k.dn(a, b, c, d, e, g) + } + return g + }; + C.prototype.acceptEvent = function(a) { + var b = this.Zc; + this.Zc = this.Qb; + this.Qb = b; + Rk(this, this, a, b, a instanceof MouseEvent); + return b + }; + + function Rk(a, b, c, d, e) { + d.h = b; + d.event = c; + e ? Sk(a, c, d) : (d.te = b.Qb.te, d.ga = b.Qb.ga); + a = 0; + c.ctrlKey && (a += 1); + c.altKey && (a += 2); + c.shiftKey && (a += 4); + c.metaKey && (a += 8); + d.xd = a; + d.button = c.button; + c.buttons && (d.buttons = c.buttons); + z.rk && 0 === c.button && c.ctrlKey && (d.button = 2); + d.El = !1; + d.up = !1; + d.Pe = 1; + d.Cl = 0; + d.Gc = !1; + d.bubbles = !1; + d.timestamp = Date.now(); + d.Qt = !1; + d.Sg = c.target.Z ? c.target.Z : null; + d.Ge = null + } + + function Tk(a, b, c, d, e) { + d.h = a; + Sk(a, c, d); + d.xd = 0; + d.button = 0; + d.buttons = 1; + d.El = !0; + d.up = !1; + d.Pe = 1; + d.Cl = 0; + d.Gc = !1; + d.bubbles = !0; + d.event = b; + d.timestamp = Date.now(); + d.Qt = e; + d.Sg = b.target.Z ? b.target.Z : null; + d.Ge = null; + a.Ei = d.copy(); + Hh = null + } + + function Uk(a, b, c, d, e) { + var g = null; + d.h = a; + null !== c ? ((g = window.document.elementFromPoint(c.clientX, c.clientY)) && g.Z ? g = g.Z : (c = b.changedTouches[0], g = a), d.Sg = g, Sk(a, c, d)) : null !== a.Zc ? (d.ga = a.Zc.ga, d.te = a.Zc.te, d.Sg = a.Zc.Sg) : null !== a.Ei && (d.ga = a.Ei.ga, d.te = a.Ei.te, d.Sg = a.Ei.Sg); + d.xd = 0; + d.button = 0; + d.buttons = 1; + d.El = !1; + d.up = !1; + d.Pe = 1; + d.Cl = 0; + d.Gc = !1; + d.bubbles = !1; + d.event = b; + d.timestamp = Date.now(); + d.Qt = e; + d.Ge = null + } + + function ha(a, b, c) { + if (b.bubbles) return u && u.EE && z.trace("NOT handled " + c.type + " " + b.toString()), !0; + u && u.EE && z.trace("handled " + c.type + " " + a.eb.name + " " + b.toString()); + void 0 !== c.stopPropagation && c.stopPropagation(); + (void 0 === c.touches || 2 > c.touches.length) && c.preventDefault(); + c.cancelBubble = !0; + return !1 + } + C.prototype.oI = function(a) { + if (!this.Z.isEnabled) return !1; + var b = this.Z.Qb; + Rk(this.Z, this.Z, a, b, !1); + b.key = String.fromCharCode(a.which); + b.El = !0; + switch (a.which) { + case 8: + b.key = "Backspace"; + break; + case 33: + b.key = "PageUp"; + break; + case 34: + b.key = "PageDown"; + break; + case 35: + b.key = "End"; + break; + case 36: + b.key = "Home"; + break; + case 37: + b.key = "Left"; + break; + case 38: + b.key = "Up"; + break; + case 39: + b.key = "Right"; + break; + case 40: + b.key = "Down"; + break; + case 45: + b.key = "Insert"; + break; + case 46: + b.key = "Del"; + break; + case 48: + b.key = "0"; + break; + case 187: + case 61: + case 107: + b.key = + "Add"; + break; + case 189: + case 173: + case 109: + b.key = "Subtract"; + break; + case 27: + b.key = "Esc" + } + this.Z.doKeyDown(); + return 187 !== a.which && 189 !== a.which && 48 !== a.which && 107 !== a.which && 109 !== a.which && 61 !== a.which && 173 !== a.which || !0 !== a.ctrlKey ? ha(this.Z, b, a) : (a.cancelBubble = !0, a.preventDefault(), a.stopPropagation(), !1) + }; + C.prototype.pI = function(a) { + if (!this.Z.isEnabled) return !1; + var b = this.Z.Qb; + Rk(this.Z, this.Z, a, b, !1); + b.key = String.fromCharCode(a.which); + b.up = !0; + switch (a.which) { + case 8: + b.key = "Backspace"; + break; + case 33: + b.key = "PageUp"; + break; + case 34: + b.key = "PageDown"; + break; + case 35: + b.key = "End"; + break; + case 36: + b.key = "Home"; + break; + case 37: + b.key = "Left"; + break; + case 38: + b.key = "Up"; + break; + case 39: + b.key = "Right"; + break; + case 40: + b.key = "Down"; + break; + case 45: + b.key = "Insert"; + break; + case 46: + b.key = "Del"; + break; + case 93: + a.preventDefault() + } + this.Z.doKeyUp(); + return ha(this.Z, b, a) + }; + C.prototype.lo = function(a) { + var b = this.Fb; + if (null === b) return new N(0, 0); + var c = this.Jb, + d = this.Ob, + b = b.getBoundingClientRect(), + c = a.clientX - c / b.width * b.left; + a = a.clientY - d / b.height * b.top; + return null !== this.Hd ? (a = new N(c, a), ub(a, this.Hd), a) : new N(c, a) + }; + + function Sk(a, b, c) { + var d = a.Fb, + e = a.Jb, + g = a.Ob, + h = 0, + k = 0; + null !== d && (d = d.getBoundingClientRect(), h = b.clientX - e / d.width * d.left, k = b.clientY - g / d.height * d.top); + c.te.n(h, k); + null !== a.Hd ? (b = z.Tb(h, k), a.Hd.ki(b), c.ga.assign(b), z.A(b)) : c.ga.n(h, k) + } + C.prototype.invalidateDocumentBounds = C.prototype.yc = function() { + this.Ij || (this.Ij = !0, this.Ce(!0)) + }; + + function ck(a) { + a.Vd || Jk(a); + a.Ij && Ok(a, a.rh()) + } + C.prototype.redraw = C.prototype.Sp = function() { + this.Vc || this.Vd || (this.ta(), Vk(this), Ik(this), this.yc(), this.bg()) + }; + C.prototype.isUpdateRequested = function() { + return this.Vf + }; + C.prototype.delayInitialization = function(a) { + void 0 === a && (a = null); + var b = this.Ua, + c = b.isEnabled; + b.oi(); + b.isEnabled = !1; + li(this); + this.eh = !1; + b.isEnabled = c; + null !== a && z.setTimeout(a, 1) + }; + C.prototype.requestUpdate = C.prototype.Ce = function(a) { + void 0 === a && (a = !1); + if (!0 !== this.Vf && !(this.Vc || !1 === a && this.Vd)) { + this.Vf = !0; + var b = this; + requestAnimationFrame(function() { + b.Vf && b.bg() + }) + } + }; + C.prototype.maybeUpdate = C.prototype.bg = function() { + if (!this.io || this.Vf) this.io && (this.io = !1), li(this) + }; + + function Wk(a, b) { + a.Ua.nf || a.Vc || !a.im || Hk(a) || (b && Jk(a), Lk(a, !1)) + } + + function li(a) { + if (!a.Vd && (a.Vf = !1, null !== a.Pb)) { + a.Vd = !0; + var b = a.Ua, + c = a.SC; + if (!b.to && 0 !== c.length) { + for (var d = c.o, e = d.length, g = 0; g < e; g++) { + var h = d[g]; + Yk(h, !1); + h.S() + } + c.clear() + } + c = a.jC; + 0 < c.count && (c.each(function(a) { + a.dB() + }), c.clear()); + d = c = !1; + b.nf && (d = !0, c = a.Bb, a.Bb = !0); + b.wc || Tj(a); + Wk(a, !1); + null !== a.td && (a.td.visible && !a.ov && (hl(a), a.ov = !0), !a.td.visible && a.ov && (a.ov = !1)); + Jk(a); + e = !1; + if (!a.eh || a.Qu) a.eh ? il(a, !a.gv) : (a.Wb("Initial Layout"), !1 === b.isEnabled && b.oi(), il(a, !1)), e = !0; + a.gv = !1; + Jk(a); + a.lz || b.nf || + ck(a); + Wk(a, !0); + e && (a.eh || jl(a), a.Ja("LayoutCompleted")); + Jk(a); + e && !a.eh && (a.eh = !0, a.Jd("Initial Layout"), a.Bb || a.pa.clear(), z.setTimeout(function() { + a.mi = !1 + }, 1)); + kl(a); + Sj(b); + a.ff(); + d && (a.Bb = c); + a.Vd = !1 + } + } + z.w(C, { + kn: null + }, function() { + return this.eh + }); + + function jl(a) { + var b = a.Yb.o; + a.Jf(b, b.length, a); + a.Xk !== jh ? a.scale = Mk(a, a.Xk) : a.dm !== jh ? a.scale = Mk(a, a.dm) : (b = a.$H, isFinite(b) && 0 < b && (a.scale = b)); + b = a.ZH; + if (b.F()) a.position = b; + else { + b = z.O(); + b.ru(a.ad, a.YH); + var c = a.xb, + c = z.yk(0, 0, c.width, c.height), + d = z.O(); + d.ru(c, a.aI); + d.n(b.x - d.x, b.y - d.y); + a.position = d; + z.dc(c); + z.A(d); + z.A(b); + Wk(a, !0); + Lk(a, !0) + } + a.Ja("InitialLayoutCompleted"); + hl(a) + } + + function Jk(a) { + if ((a.Vd || !a.Ua.nf) && 0 !== a.qg.count) + for (var b = 0; 23 > b; b++) { + var c = a.qg.i; + if (null === c || 0 === a.qg.count) break; + a.qg = new K(O); + a.dB(c, a.qg); + u && 22 === b && z.trace("failure to validate parts") + } + } + C.prototype.dB = function(a, b) { + for (a.reset(); a.next();) { + var c = a.value; + !c.be() || c instanceof F || !c.isVisible() || (c.Ql() ? (rj(c, Infinity, Infinity), c.Lc()) : b.add(c)) + } + for (a.reset(); a.next();) c = a.value, c instanceof F && c.isVisible() && ll(this, c); + for (a.reset(); a.next();) c = a.value, c instanceof G && c.isVisible() && (c.Ql() ? (rj(c, Infinity, Infinity), c.Lc()) : b.add(c)); + for (a.reset(); a.next();) c = a.value, c instanceof da && c.isVisible() && (c.Ql() ? (rj(c, Infinity, Infinity), c.Lc()) : b.add(c)) + }; + + function ll(a, b) { + for (var c = z.rb(), d = z.rb(), e = b.Hc; e.next();) { + var g = e.value; + g.isVisible() && (g instanceof F ? (ml(g) || nl(g) || ol(g)) && ll(a, g) : g instanceof G ? g.Y === b || g.da === b ? d.push(g) : c.push(g) : (rj(g, Infinity, Infinity), g.Lc())) + } + for (var e = c.length, h = 0; h < e; h++) g = c[h], rj(g, Infinity, Infinity), g.Lc(); + z.xa(c); + rj(b, Infinity, Infinity); + b.Lc(); + e = d.length; + for (h = 0; h < e; h++) g = d[h], rj(g, Infinity, Infinity), g.Lc(); + z.xa(d) + } + C.prototype.Jf = function(a, b, c, d) { + var e = this.Ua; + if (this.Yk || e.nf) + for (e = 0; e < b; e++) a[e].Jf(c, d) + }; + C.prototype.ff = function(a, b) { + void 0 === a && (a = this.gd); + void 0 === b && (b = null); + null === this.Pb && z.k("No div specified"); + var c = this.Fb; + null === c && z.k("No canvas specified"); + var d = this.Ua; + if (!d.wc && (pl(this), "0" !== this.Pb.style.opacity)) { + var e = a !== this.gd, + g = this.Yb.o, + h = g.length, + k = this; + this.Jf(g, h, k); + if (e) ca(a, !0), Ik(this); + else if (!this.ue && null === b && !d.Jj) return; + var h = this.sb, + l = this.bc, + m = Math.round(h.x * l) / l, + n = Math.round(h.y * l) / l, + d = this.Hd; + d.reset(); + 1 !== l && d.scale(l); + 0 === h.x && 0 === h.y || d.translate(-m, -n); + l = + this.jd; + z.jn ? (c.width = c.width, ca(a, !0), a.scale(l, l)) : (a.setTransform(1, 0, 0, 1, 0, 0), a.scale(l, l), a.clearRect(0, 0, this.Jb, this.Ob)); + a.setTransform(1, 0, 0, 1, 0, 0); + a.scale(l, l); + a.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy); + u && u.bj && u.lE(this, a); + c = null !== b ? function(c) { + var d = a, + e = b; + if (c.visible && 0 !== c.Xc) { + var g = c.mb.o, + h = g.length; + if (0 !== h) { + 1 !== c.Xc && (d.globalAlpha = c.Xc); + c = c.Wv; + c.length = 0; + for (var l = k.scale, m = 0; m < h; m++) { + var n = g[m]; + if (hk(n) && !e.contains(n)) { + if (n instanceof G) { + var A = n; + A.rc && c.push(A); + if (!1 === A.Cg) continue + } + A = + n.W; + 1 < A.width * l || 1 < A.height * l ? n.ff(d, k) : jk(n, d) + } + } + d.globalAlpha = 1 + } + } + } : function(b) { + b.ff(a, k) + }; + ql(this, a); + h = g.length; + for (m = 0; m < h; m++) a.setTransform(1, 0, 0, 1, 0, 0), a.scale(l, l), a.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy), c(g[m]); + this.Wk ? this.Wk.Zl(this) && this.Dy() : this.lo = function() { + return new N(0, 0) + }; + u && (u.Rz || u.bj) && u.Qz(a, this, d); + e ? (ca(this.gd, !0), Ik(this)) : this.ue = this.Yk = !1 + } + }; + + function rl(a, b, c, d, e) { + null === a.Pb && z.k("No div specified"); + var g = a.Fb; + null === g && z.k("No canvas specified"); + if (!a.Ua.wc) { + var h = a.gd; + if (a.ue) { + pl(a); + var k = a.jd; + z.jn ? (g.width = g.width, ca(h, !0)) : (h.setTransform(1, 0, 0, 1, 0, 0), h.clearRect(0, 0, a.Jb * k, a.Ob * k)); + h.Jt = !1; + h.drawImage(a.Cy.Kd, 0 < d ? 0 : Math.round(-d), 0 < e ? 0 : Math.round(-e)); + e = a.sb; + var g = a.bc, + l = Math.round(e.x * g) / g, + m = Math.round(e.y * g) / g; + d = a.Hd; + d.reset(); + 1 !== g && d.scale(g); + 0 === e.x && 0 === e.y || d.translate(-l, -m); + h.save(); + h.beginPath(); + e = c.length; + for (g = 0; g < e; g++) l = + c[g], 0 !== l.width && 0 !== l.height && h.rect(Math.floor(l.x), Math.floor(l.y), Math.ceil(l.width), Math.ceil(l.height)); + h.clip(); + h.setTransform(1, 0, 0, 1, 0, 0); + h.scale(k, k); + h.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy); + u && u.bj && u.lE(a, h); + c = a.Yb.o; + e = c.length; + a.Jf(c, e, a); + ql(a, h); + for (g = 0; g < e; g++) kk(c[g], h, a, b); + h.restore(); + ca(h, !0); + u && (u.Rz || u.bj) && u.Qz(h, a, d); + a.Wk ? a.Wk.Zl(a) && a.Dy() : a.lo = function() { + return new N(0, 0) + }; + a.Yk = !1; + a.ue = !1; + a.HA() + } + } + } + + function sl(a, b, c, d, e, g, h, k, l, m) { + null === a.Pb && z.k("No div specified"); + null === a.Fb && z.k("No canvas specified"); + void 0 === h && (h = null); + void 0 === k && (k = null); + void 0 === l && (l = !1); + void 0 === m && (m = !1); + pl(a); + ca(a.gd, !0); + Ik(a); + a.Sy = !0; + var n = new w(g.x, g.y, d.width / e, d.height / e), + p = n.copy(); + p.Cw(c); + hl(a, p); + Jk(a); + var p = a.Yb.o, + q = p.length; + a.Jf(p, q, a, n); + n = a.jd; + b.setTransform(1, 0, 0, 1, 0, 0); + b.scale(n, n); + b.clearRect(0, 0, d.width, d.height); + null !== k && "" !== k && (b.fillStyle = k, b.fillRect(0, 0, d.width, d.height)); + d = z.Fh(); + d.reset(); + d.translate(c.left, c.top); + d.scale(e); + 0 === g.x && 0 === g.y || d.translate(-g.x, -g.y); + b.setTransform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy); + z.jf(d); + ql(a, b); + if (null !== h) { + var r = new K(O); + c = h.i; + for (c.reset(); c.next();) e = c.value, !1 === m && "Grid" === e.layer.name || null === e || r.add(e); + c = function(c) { + var d = l; + if (c.visible && 0 !== c.Xc && (void 0 === d && (d = !0), d || !c.Nc)) { + var d = c.mb.o, + e = d.length; + if (0 !== e) { + 1 !== c.Xc && (b.globalAlpha = c.Xc); + c = c.Wv; + c.length = 0; + for (var g = a.scale, h = 0; h < e; h++) { + var k = d[h]; + if (hk(k) && r.contains(k)) { + if (k instanceof G) { + var m = k; + m.rc && c.push(m); + if (!1 === m.Cg) continue + } + m = k.W; + 1 < m.width * g || 1 < m.height * g ? k.ff(b, a) : jk(k, b) + } + } + b.globalAlpha = 1 + } + } + } + } else if (!l && m) { + var s = a.Gt.ca, + t = s.layer; + c = function(c) { + c === t ? s.ff(b, a) : c.ff(b, a, l, m) + } + } else c = function(c) { + c.ff(b, a, l, m) + }; + for (e = 0; e < q; e++) c(p[e]); + a.Sy = !1; + a.Wk ? a.Wk.Zl(a) && a.Dy() : a.lo = function() { + return new N(0, 0) + }; + ca(a.gd, !0); + Ik(a); + a.Jf(p, q, a); + hl(a) + } + C.prototype.getRenderingHint = C.prototype.hj = function(a) { + return this.Xj[a] + }; + C.prototype.setRenderingHint = C.prototype.kJ = function(a, b) { + this.Xj[a] = b; + this.Sp() + }; + C.prototype.resetRenderingHints = C.prototype.rF = function() { + this.Xj = new ma; + this.Xj.drawShadows = !0; + this.Xj.textGreeking = !0; + this.Xj.viewportOptimizations = z.PE ? !1 : !0; + this.Xj.temporaryPixelRatio = !0; + this.Xj.pictureRatioOptimization = !0 + }; + + function ql(a, b) { + var c = a.Xj; + if (null !== c) { + if (void 0 !== c.imageSmoothingEnabled) { + var d = !!c.imageSmoothingEnabled; + b.Jt = d; + b.YK = d + } + c = c.defaultFont; + void 0 !== c && null !== c && (b.font = c) + } + } + C.prototype.getInputOption = C.prototype.sp = function(a) { + return this.qo[a] + }; + C.prototype.setInputOption = function(a, b) { + this.qo[a] = b + }; + C.prototype.resetInputOptions = C.prototype.qF = function() { + this.qo = new ma; + this.qo.extraTouchArea = 10; + this.qo.extraTouchThreshold = 10; + this.qo.hasGestureZoom = !0 + }; + C.prototype.setProperties = function(a) { + z.qu(this, a) + }; + + function kl(a) { + if (0 === a.pa.Gh && 0 !== a.Rk.count) { + for (; 0 < a.Rk.count;) { + var b = a.Rk; + a.Rk = new na(G, w); + for (b = b.i; b.next();) { + var c = b.key; + Oi(c, b.value); + c.Ae() + } + } + a.ta() + } + } + C.prototype.ta = function(a) { + void 0 === a && (a = null); + if (null === a) this.ue = !0, this.Ce(); + else { + var b = this.xb; + null !== a && a.F() && b.Ig(a) && (this.ue = !0, this.Ce()) + } + for (b = this.Xv.i; b.next();) b.value.ta(a) + }; + C.prototype.HE = function(a, b) { + if (!0 !== this.ue) { + this.ue = !0; + var c = !0 === this.hj("temporaryPixelRatio"); + if (!0 === this.hj("viewportOptimizations") && this.MA !== tl && this.BF.Vw(0, 0, 0, 0) && b.width === a.width && b.height === a.height) { + var d = this.scale, + e = z.kg(), + g = Math.max(a.x, b.x), + h = Math.max(a.y, b.y), + k = Math.min(a.x + a.width, b.x + b.width), + l = Math.min(a.y + a.height, b.y + b.height); + e.x = g; + e.y = h; + e.width = Math.max(0, k - g) * d; + e.height = Math.max(0, l - h) * d; + if (0 < e.width && 0 < e.height) { + if (!this.Vd && (this.Vf = !1, null !== this.Pb)) { + this.Vd = !0; + kl(this); + this.ad.F() || Ok(this, this.rh()); + var m = this.Fb; + if (null !== m) { + var n = this.jd, + h = this.Jb * n, + k = this.Ob * n, + g = this.scale * n, + d = Math.round(Math.round(b.x * g) - Math.round(a.x * g)), + g = Math.round(Math.round(b.y * g) - Math.round(a.y * g)), + l = this.Cy, + p = this.aC; + l.width !== h && (l.width = h); + l.height !== k && (l.height = k); + p.clearRect(0, 0, h, k); + var l = 190 * this.jd, + q = 70 * this.jd, + r = Math.max(d, 0), + s = Math.max(g, 0), + t = Math.floor(h - r), + v = Math.floor(k - s); + p.Jt = !1; + p.drawImage(m.Kd, r, s, t, v, 0, 0, t, v); + this.Wk.Zl(this) && p.clearRect(0, 0, l, q); + var m = z.rb(), + p = z.rb(), + v = Math.abs(d), + t = Math.abs(g), + x = 0 === r ? 0 : h - v, + r = z.Tb(x, 0), + v = z.Tb(v + x, k); + p.push(new w(Math.min(r.x, v.x), Math.min(r.y, v.y), Math.abs(r.x - v.x), Math.abs(r.y - v.y))); + var y = this.Hd; + y.reset(); + y.scale(n, n); + 1 !== this.bc && y.scale(this.bc); + n = this.sb; + (0 !== n.x || 0 !== n.y) && isFinite(n.x) && isFinite(n.y) && y.translate(-n.x, -n.y); + ub(r, y); + ub(v, y); + m.push(new w(Math.min(r.x, v.x), Math.min(r.y, v.y), Math.abs(r.x - v.x), Math.abs(r.y - v.y))); + x = 0 === s ? 0 : k - t; + r.n(0, x); + v.n(h, t + x); + p.push(new w(Math.min(r.x, v.x), Math.min(r.y, v.y), Math.abs(r.x - + v.x), Math.abs(r.y - v.y))); + ub(r, y); + ub(v, y); + m.push(new w(Math.min(r.x, v.x), Math.min(r.y, v.y), Math.abs(r.x - v.x), Math.abs(r.y - v.y))); + this.Wk.Zl(this) && (h = 0 < d ? 0 : -d, k = 0 < g ? 0 : -g, r.n(h, k), v.n(l + h, q + k), p.push(new w(Math.min(r.x, v.x), Math.min(r.y, v.y), Math.abs(r.x - v.x), Math.abs(r.y - v.y))), ub(r, y), ub(v, y), m.push(new w(Math.min(r.x, v.x), Math.min(r.y, v.y), Math.abs(r.x - v.x), Math.abs(r.y - v.y)))); + z.A(r); + z.A(v); + Wk(this, !1); + rl(this, m, p, d, g); + z.xa(m); + z.xa(p); + this.Vd = !1 + } + } + } else this.bg(); + z.dc(e); + c && (this.ck = 1, this.bg(), + this.ck = null, this.HA()) + } else c ? (this.ck = 1, this.bg(), this.ck = null, this.HA()) : this.bg() + } + }; + + function Vk(a) { + !1 === a.im && (a.im = !0) + } + + function Ik(a) { + !1 === a.Yk && (a.Yk = !0) + } + + function pl(a) { + !1 !== a.gr && (a.gr = !1, ul(a, a.Jb, a.Ob)) + } + + function ul(a, b, c) { + var d = a.Fb, + e = a.jd, + g = b * e, + e = c * e; + if (d.width !== g || d.height !== e) d.width = g, d.height = e, d.style.width = b + "px", d.style.height = c + "px", a.ue = !0, ca(a.gd, !0) + } + + function Bh(a) { + var b = a.Jb, + c = a.Ob; + a = a.Fb.getBoundingClientRect(); + return z.Tb(b / a.width * a.left, c / a.height * a.top) + } + + function Hk(a) { + var b = a.Fb; + if (null === b) return !0; + var c = a.Pb, + d = a.Jb, + e = a.Ob, + g = a.wD.copy(); + if (!g.F()) return !0; + var h = !1, + k = a.Vk ? a.Gd : 0, + l = a.Hj ? a.Gd : 0, + m = c.clientWidth || d + k, + c = c.clientHeight || e + l; + if (m !== d + k || c !== e + l) a.Vk = !1, a.Hj = !1, l = k = 0, a.Jb = m, a.Ob = c, h = a.gr = !0; + a.im = !1; + var n = a.xb, + p = a.ad, + m = p.width, + c = p.height, + q = n.width, + r = n.height, + s = p.x, + t = n.x, + v = p.right, + x = n.right + k, + y = p.y, + A = n.y, + p = p.bottom, + n = n.bottom + l, + B = "1px", + L = "1px", + H = a.scale; + a.MA === qk && m < q + k && c < r + l || (a.cA && a.xe && (B = 1, s + 1 < t && (B = Math.max((t - s) * H + a.Jb, B)), v > x + 1 && + (B = Math.max((v - x) * H + a.Jb, B)), q + k + 1 < m && (B = Math.max((m - q + k) * H + a.Jb, B)), B += "px"), a.dA && a.ye && (L = 1, y + 1 < A && (L = Math.max((A - y) * H + a.Ob, L)), p > n + 1 && (L = Math.max((p - n) * H + a.Ob, L)), r + l + 1 < c && (L = Math.max((c - r + l) * H + a.Ob, L)), L += "px")); + k = "1px" !== B; + l = "1px" !== L; + k && l || !k && !l || (l && (x -= a.Gd), k && (n -= a.Gd), a.cA && a.xe && (B = 1, s + 1 < t && (B = Math.max((t - s) * H + a.Jb, B)), v > x + 1 && (B = Math.max((v - x) * H + a.Jb, B)), q + 1 < m && (B = Math.max((m - q) * H + a.Jb, B)), B += "px"), k = "1px" !== B, l = k !== a.Hj ? a.Ob - a.Gd : a.Ob, a.dA && a.ye && (L = 1, y + 1 < A && (L = Math.max((A - y) * H + l, L)), + p > n + 1 && (L = Math.max((p - n) * H + l, L)), r + 1 < c && (L = Math.max((c - r) * H + l, L)), L += "px"), l = "1px" !== L); + if (a.gw && k === a.Hj && l === a.Vk) return d === a.Jb && e === a.Ob || a.bg(), !1; + k !== a.Hj && (a.Ob = "1px" === B ? a.Ob + a.Gd : Math.max(a.Ob - a.Gd, 1), h = !0); + a.Hj = k; + a.xs.style.width = B; + l !== a.Vk && (a.Jb = "1px" === L ? a.Jb + a.Gd : Math.max(a.Jb - a.Gd, 1), h = !0, a.mr && (k = z.O(), l ? (b.style.left = a.Gd + "px", a.position = k.n(a.sb.x + a.Gd / a.scale, a.sb.y)) : (b.style.left = "0px", a.position = k.n(a.sb.x - a.Gd / a.scale, a.sb.y)), z.A(k))); + a.Vk = l; + a.xs.style.height = L; + b = a.kw; + k = b.scrollLeft; + a.cA && a.xe && (q + 1 < m ? k = (a.position.x - s) * H : s + 1 < t ? k = b.scrollWidth - b.clientWidth : v > x + 1 && (k = a.position.x * H)); + if (a.mr) switch (a.hz) { + case "negative": + k = -(b.scrollWidth - k - b.clientWidth); + break; + case "reverse": + k = b.scrollWidth - k - b.clientWidth + } + b.scrollLeft = k; + a.dA && a.ye && (r + 1 < c ? b.scrollTop = (a.position.y - y) * H : y + 1 < A ? b.scrollTop = b.scrollHeight - b.clientHeight : p > n + 1 && (b.scrollTop = a.position.y * H)); + h && (a.gr = !0); + m = a.Jb; + c = a.Ob; + b.style.width = m + (a.Vk ? a.Gd : 0) + "px"; + b.style.height = c + (a.Hj ? a.Gd : 0) + "px"; + a.iz = !1; + return d !== m || e !== + c || a.Ua.wc ? (n = a.xb, a.fu(g, n, h), !1) : !0 + } + C.prototype.add = C.prototype.add = function(a) { + z.l(a, D, C, "add:part"); + var b = a.h; + if (b !== this) { + null !== b && z.k("Cannot add part " + a.toString() + " to " + this.toString() + ". It is already a part of " + b.toString()); + this.lq && (a.cl = "Tool"); + var c = a.If, + b = this.Fl(c); + null === b && (b = this.Fl("")); + null === b && z.k('Cannot add a Part when unable find a Layer named "' + c + '" and there is no default Layer'); + a.layer !== b && (c = b.xp(99999999, a, a.h === this), 0 <= c && this.Rc(Uf, "parts", b, null, a, null, c), b.Nc || this.yc(), a.I(vl), c = a.Ut, null !== + c && c(a, null, b)) + } + }; + C.prototype.xp = function(a) { + if (a instanceof E) { + if (this.Fo.add(a), a instanceof F) { + var b = a.Va; + null === b ? this.ol.add(a) : b.wm.add(a); + b = a.Sb; + null !== b && (b.h = this) + } + } else a instanceof G ? this.zo.add(a) : a instanceof da || this.mb.add(a); + var c = this; + wl(a, function(a) { + xl(c, a) + }); + a.Lb && a.S(); + b = a.data; + null !== b && (a instanceof da || (a instanceof G ? this.Qk.add(b, a) : this.zi.add(b, a)), wl(a, function(a) { + yl(c, a) + })); + !0 !== nl(a) && !0 !== ol(a) || this.qg.add(a); + zl(a, !0, this); + Al(a) ? (a.W.F() && this.ta(lk(a, a.W)), this.yc()) : a.isVisible() && + a.W.F() && this.ta(lk(a, a.W)); + this.Ce() + }; + C.prototype.Ve = function(a) { + a.pt(); + if (a instanceof E) { + if (this.Fo.remove(a), a instanceof F) { + var b = a.Va; + null === b ? this.ol.remove(a) : b.wm.remove(a); + b = a.Sb; + null !== b && (b.h = null) + } + } else a instanceof G ? this.zo.remove(a) : a instanceof da || this.mb.remove(a); + var c = this; + wl(a, function(a) { + Bl(c, a) + }); + b = a.data; + null !== b && (a instanceof da || (a instanceof G ? this.Qk.remove(b) : this.zi.remove(b)), wl(a, function(a) { + Cl(c, a) + })); + this.qg.remove(a); + Al(a) ? (a.W.F() && this.ta(lk(a, a.W)), this.yc()) : a.isVisible() && a.W.F() && this.ta(lk(a, + a.W)); + this.Ce() + }; + C.prototype.remove = C.prototype.remove = function(a) { + z.l(a, D, C, "remove:part"); + a.kb = !1; + a.wh = !1; + var b = a.layer; + if (null !== b && b.h === this) { + a.I(Dl); + a.cn(); + var c = b.Ve(-1, a, !1); + 0 <= c && this.Rc(Vf, "parts", b, a, null, c, null); + c = a.Ut; + null !== c && c(a, b, null) + } + }; + C.prototype.removeParts = C.prototype.JA = function(a, b) { + if (z.isArray(a)) + for (var c = z.bb(a), d = 0; d < c; d++) { + var e = z.Ya(a, d); + b && !e.canDelete() || this.remove(e) + } else + for (e = new K(D), e.$c(a), c = e.i; c.next();) e = c.value, b && !e.canDelete() || this.remove(e) + }; + C.prototype.copyParts = C.prototype.hp = function(a, b, c) { + return this.wb.hp(a, b, c) + }; + C.prototype.moveParts = C.prototype.moveParts = function(a, b, c) { + z.l(b, N, C, "moveParts:offset"); + var d = this.hb; + if (null !== d) { + d = d.me; + null === d && (d = new ih, d.Sc(this)); + var e = new na(D, Object); + if (null !== a) a = a.i; + else { + for (a = this.ni; a.next();) Kh(d, e, a.value, c); + for (a = this.Lg; a.next();) Kh(d, e, a.value, c); + a = this.links + } + for (; a.next();) Kh(d, e, a.value, c); + d.moveParts(e, b, c) + } + }; + + function El(a, b, c) { + z.l(b, tg, C, "addLayer:layer"); + null !== b.h && b.h !== a && z.k("Cannot share a Layer with another Diagram: " + b + " of " + b.h); + null === c ? null !== b.h && z.k("Cannot add an existing Layer to this Diagram again: " + b) : (z.l(c, tg, C, "addLayer:existingLayer"), c.h !== a && z.k("Existing Layer must be in this Diagram: " + c + " not in " + c.h), b === c && z.k("Cannot move a Layer before or after itself: " + b)); + if (b.h !== a) { + b = b.name; + a = a.Yb; + c = a.count; + for (var d = 0; d < c; d++) a.ea(d).name === b && z.k("Cannot add Layer with the name '" + + b + "'; a Layer with the same name is already present in this Diagram.") + } + } + C.prototype.addLayer = C.prototype.ft = function(a) { + El(this, a, null); + a.Sc(this); + var b = this.Yb, + c = b.count - 1; + if (!a.Nc) + for (; 0 <= c && b.ea(c).Nc;) c--; + b.Ld(c + 1, a); + null !== this.ie && this.Rc(Uf, "layers", this, null, a, null, c + 1); + this.ta(); + this.yc() + }; + C.prototype.addLayerBefore = C.prototype.OG = function(a, b) { + El(this, a, b); + a.Sc(this); + var c = this.Yb, + d = c.indexOf(a); + 0 <= d && (c.remove(a), null !== this.ie && this.Rc(Vf, "layers", this, a, null, d, null)); + for (var e = c.count, g = 0; g < e; g++) + if (c.ea(g) === b) { + c.Ld(g, a); + break + } + null !== this.ie && this.Rc(Uf, "layers", this, null, a, null, g); + this.ta(); + 0 > d && this.yc() + }; + C.prototype.addLayerAfter = function(a, b) { + El(this, a, b); + a.Sc(this); + var c = this.Yb, + d = c.indexOf(a); + 0 <= d && (c.remove(a), null !== this.ie && this.Rc(Vf, "layers", this, a, null, d, null)); + for (var e = c.count, g = 0; g < e; g++) + if (c.ea(g) === b) { + c.Ld(g + 1, a); + break + } + null !== this.ie && this.Rc(Uf, "layers", this, null, a, null, g + 1); + this.ta(); + 0 > d && this.yc() + }; + C.prototype.removeLayer = function(a) { + z.l(a, tg, C, "removeLayer:layer"); + a.h !== this && z.k("Cannot remove a Layer from another Diagram: " + a + " of " + a.h); + if ("" !== a.name) { + var b = this.Yb, + c = b.indexOf(a); + if (b.remove(a)) { + for (b = a.mb.copy().i; b.next();) { + var d = b.value, + e = d.If; + d.If = e !== a.name ? e : "" + } + null !== this.ie && this.Rc(Vf, "layers", this, a, null, c, null); + this.ta(); + this.yc() + } + } + }; + C.prototype.findLayer = C.prototype.Fl = function(a) { + for (var b = this.mn; b.next();) { + var c = b.value; + if (c.name === a) return c + } + return null + }; + C.prototype.addModelChangedListener = C.prototype.QG = function(a) { + z.g(a, "function", C, "addModelChangedListener:listener"); + null === this.gh && (this.gh = new J("function")); + this.gh.add(a); + this.ha.Rm(a) + }; + C.prototype.removeModelChangedListener = function(a) { + z.g(a, "function", C, "removeModelChangedListener:listener"); + null !== this.gh && (this.gh.remove(a), 0 === this.gh.count && (this.gh = null)); + this.ha.iu(a) + }; + C.prototype.addChangedListener = C.prototype.Rm = function(a) { + z.g(a, "function", C, "addChangedListener:listener"); + null === this.ti && (this.ti = new J("function")); + this.ti.add(a) + }; + C.prototype.removeChangedListener = C.prototype.iu = function(a) { + z.g(a, "function", C, "removeChangedListener:listener"); + null !== this.ti && (this.ti.remove(a), 0 === this.ti.count && (this.ti = null)) + }; + C.prototype.Kw = function(a) { + this.Bb || this.pa.DE(a); + a.Dc !== Tf && (this.mi = !0); + if (null !== this.ti) { + var b = this.ti, + c = b.length; + if (1 === c) b = b.ea(0), b(a); + else if (0 !== c) + for (var d = b.jc(), e = 0; e < c; e++) b = d[e], b(a) + } + }; + C.prototype.raiseChangedEvent = C.prototype.Rc = function(a, b, c, d, e, g, h) { + void 0 === g && (g = null); + void 0 === h && (h = null); + var k = new Rf; + k.h = this; + k.Dc = a; + k.propertyName = b; + k.object = c; + k.oldValue = d; + k.Mg = g; + k.newValue = e; + k.Kg = h; + this.Kw(k) + }; + C.prototype.raiseChanged = C.prototype.j = function(a, b, c, d, e) { + this.Rc(Sf, a, this, b, c, d, e) + }; + z.w(C, { + Ua: "animationManager" + }, function() { + return this.sB + }); + z.w(C, { + pa: "undoManager" + }, function() { + return this.ie.pa + }); + z.defineProperty(C, { + Bb: "skipsUndoManager" + }, function() { + return this.Vi + }, function(a) { + z.g(a, "boolean", C, "skipsUndoManager"); + this.Vi = a; + this.ie.Vi = a + }); + z.defineProperty(C, { + Oz: "delaysLayout" + }, function() { + return this.yy + }, function(a) { + this.yy = a + }); + C.prototype.Vm = function(a, b) { + if (null !== a && a.h === this) { + var c = this.Ee; + try { + this.Ee = !0; + var d = a.Dc, + e; + if (d === Sf) { + var g = a.object, + h = a.propertyName, + k = a.na(b); + z.Ra(g, h, k); + if (g instanceof O) { + var l, m = g.ca; + null !== m && m.ae() + } + this.mi = !0 + } else if (d === Uf) { + var n = a.object, + p = a.Kg, + g = a.newValue; + if (n instanceof I) + if ("number" === typeof p && g instanceof O) { + l = g; + var q = n; + b ? q.Ve(p) : q.Ld(p, l); + m = n.ca; + null !== m && m.ae() + } else { + if ("number" === typeof p && g instanceof Fg) { + var r = g, + q = n; + b ? r.qe ? q.pF(p) : q.lF(p) : (e = r.qe ? q.$d(r.index) : q.Zd(r.index), + e.tt(r)) + } + } + else if (n instanceof tg) { + var s = !0 === a.Mg; + if ("number" === typeof p && g instanceof D) { + var m = g, + t = n; + b ? (m.ae(), t.Ve(s ? p : -1, m, s)) : t.xp(p, m, s) + } + } else if (n instanceof C) { + if ("number" === typeof p && g instanceof tg) { + var v = g; + b ? this.Yb.dd(p) : (d = v, d.Sc(this), this.Yb.Ld(p, d)) + } + } else z.k("unknown ChangedEvent.Insert object: " + a.toString()); + this.mi = !0 + } else d === Vf ? (n = a.object, p = a.Mg, g = a.oldValue, n instanceof I ? "number" === typeof p && g instanceof O ? (q = n, b ? q.Ld(p, g) : q.Ve(p)) : "number" === typeof p && g instanceof Fg && (r = + g, q = n, b ? (e = r.qe ? q.$d(r.index) : q.Zd(r.index), e.tt(r)) : r.qe ? q.pF(p) : q.lF(p)) : n instanceof tg ? (s = !0 === a.Kg, "number" === typeof p && g instanceof D && (m = g, t = n, b ? t.xp(p, m, s) : (m.ae(), t.Ve(s ? p : -1, m, s)))) : n instanceof C ? "number" === typeof p && g instanceof tg && (v = g, b ? (d = v, d.Sc(this), this.Yb.Ld(p, d)) : this.Yb.dd(p)) : z.k("unknown ChangedEvent.Remove object: " + a.toString()), this.mi = !0) : d !== Tf && z.k("unknown ChangedEvent: " + a.toString()) + } finally { + this.Ee = c + } + } + }; + C.prototype.startTransaction = C.prototype.Wb = function(a) { + return this.pa.Wb(a) + }; + C.prototype.commitTransaction = C.prototype.Jd = function(a) { + return this.pa.Jd(a) + }; + C.prototype.rollbackTransaction = C.prototype.Vp = function() { + return this.pa.Vp() + }; + C.prototype.updateAllTargetBindings = C.prototype.eG = function(a) { + void 0 === a && (a = ""); + for (var b = this.ni; b.next();) b.value.Mb(a); + for (b = this.Lg; b.next();) b.value.Mb(a); + for (b = this.links; b.next();) b.value.Mb(a) + }; + C.prototype.updateAllRelationshipsFromData = C.prototype.BJ = function() { + if (0 < arguments.length) { + for (var a = this.ha, b = new K, c = a.gg, d = 0; d < c.length; d++) { + var e = c[d]; + b.add(e) + } + var g = []; + this.Lg.each(function(a) { + null === a.data || b.contains(a.data) || g.push(a.data) + }); + this.ni.each(function(a) { + null === a.data || b.contains(a.data) || g.push(a.data) + }); + g.forEach(function(b) { + Ag(a, b, !1) + }); + for (d = 0; d < c.length; d++) { + var e = c[d], + h = this.uh(e); + null === h && zg(a, e, !1) + } + if (a instanceof V) { + for (var k = new K, c = a.Jg, d = 0; d < c.length; d++) e = c[d], k.add(e); + var l = []; + this.links.each(function(a) { + null === a.data || k.contains(a.data) || l.push(a.data) + }); + l.forEach(function(b) { + Wg(a, b, !1) + }); + for (d = 0; d < c.length; d++) e = c[d], h = this.Zf(e), null === h && Vg(a, e, !1) + } + } + for (d = this.ni; d.next();) h = d.value, h.updateRelationshipsFromData(); + for (d = this.Lg; d.next();) d.value.updateRelationshipsFromData(); + for (d = this.links; d.next();) h = d.value, h.updateRelationshipsFromData() + }; + + function Fl(a, b, c) { + if (a.Vc || a.Vd) a.bc = c, c = a.Ua, c.wc && gk(c, b, a.bc); + else if (a.Vc = !0, null === a.Fb) a.bc = c; + else { + var d = a.xb.copy(), + e = a.Jb, + g = a.Ob; + d.width = a.Jb / b; + d.height = a.Ob / b; + var h = a.$l.x, + k = a.$l.y, + l = a.XD; + isNaN(h) && (l.kj() ? l.vp(qc) ? h = 0 : l.vp(sc) && (h = e - 1) : h = l.cd() ? l.x * (e - 1) : e / 2); + isNaN(k) && (l.kj() ? l.vp(pc) ? k = 0 : l.vp(tc) && (k = g - 1) : k = l.cd() ? l.y * (g - 1) : g / 2); + null !== a.AF && (c = a.AF(a, c)); + c < a.yh && (c = a.yh); + c > a.xh && (c = a.xh); + e = z.Tb(a.sb.x + h / b - h / c, a.sb.y + k / b - k / c); + a.position = e; + z.A(e); + a.bc = c; + a.fu(d, a.xb); + a.Vc = !1; + Lk(a, !1); + c = + a.Ua; + c.wc && gk(c, b, a.bc); + a.ta(); + Vk(a) + } + } + C.prototype.fu = function(a, b, c) { + if (!a.N(b)) { + void 0 === c && (c = !1); + c || Vk(this); + Ik(this); + var d = this.Sb; + null === d || !d.mx || this.wl !== jh || c || a.width === b.width && a.height === b.height || d.I(); + d = this.eb; + !0 === this.km && d instanceof dh && (this.Q.ga = this.cG(this.Q.te), Oj(d, this)); + this.Vc || this.HE(a, b); + hl(this); + this.Ja("ViewportBoundsChanged", c ? z.xj : null, a) + } + }; + + function hl(a, b) { + void 0 === b && (b = null); + var c = a.td; + if (null !== c && c.visible) { + for (var d = z.Xl(), e = 1, g = 1, h = c.va.o, k = h.length, l = 0; l < k; l++) { + var m = h[l], + n = m.interval; + 2 > n || (Gl(m.Hb) ? g = g * n / ff(g, n) : e = e * n / ff(e, n)) + } + h = c.bx; + d.n(g * h.width, e * h.height); + h = g = l = k = 0; + if (null !== b) k = b.width, l = b.height, g = b.x, h = b.y; + else { + e = z.kg(); + g = a.xb; + e.n(g.x, g.y, g.width, g.height); + for (h = a.Xv.i; h.next();) g = h.value.xb, g.F() && Ib(e, g.x, g.y, g.width, g.height); + if (!e.F()) { + z.dc(e); + return + } + k = e.width; + l = e.height; + g = e.x; + h = e.y; + z.dc(e) + } + c.width = k + 2 * d.width; + c.height = + l + 2 * d.height; + e = z.O(); + jb(g, h, 0, 0, d.width, d.height, e); + e.offset(-d.width, -d.height); + z.pk(d); + c.ca.location = e; + z.A(e) + } + } + C.prototype.clearSelection = C.prototype.Mw = function() { + var a = 0 < this.selection.count; + a && this.Ja("ChangingSelection"); + hh(this); + a && this.Ja("ChangedSelection") + }; + + function hh(a) { + a = a.selection; + if (0 < a.count) { + for (var b = a.jc(), c = b.length, d = 0; d < c; d++) b[d].kb = !1; + a.Wa(); + a.clear(); + a.freeze() + } + } + C.prototype.select = C.prototype.select = function(a) { + null !== a && (z.l(a, D, C, "select:part"), a.layer.h === this && (!a.kb || 1 < this.selection.count) && (this.Ja("ChangingSelection"), hh(this), a.kb = !0, this.Ja("ChangedSelection"))) + }; + C.prototype.selectCollection = C.prototype.FF = function(a) { + this.Ja("ChangingSelection"); + hh(this); + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) { + var d = z.Ya(a, c); + d instanceof D || z.k("Diagram.selectCollection given something that is not a Part: " + d); + d.kb = !0 + } else + for (a = a.i; a.next();) d = a.value, d instanceof D || z.k("Diagram.selectCollection given something that is not a Part: " + d), d.kb = !0; + this.Ja("ChangedSelection") + }; + C.prototype.clearHighlighteds = C.prototype.PD = function() { + var a = this.hn; + if (0 < a.count) { + for (var b = a.jc(), c = b.length, d = 0; d < c; d++) b[d].wh = !1; + a.Wa(); + a.clear(); + a.freeze() + } + }; + C.prototype.highlight = function(a) { + null !== a && a.layer.h === this && (z.l(a, D, C, "highlight:part"), !a.wh || 1 < this.hn.count) && (this.PD(), a.wh = !0) + }; + C.prototype.highlightCollection = function(a) { + this.PD(); + if (z.isArray(a)) + for (var b = z.bb(a), c = 0; c < b; c++) { + var d = z.Ya(a, c); + d instanceof D || z.k("Diagram.highlightCollection given something that is not a Part: " + d); + d.wh = !0 + } else + for (a = a.i; a.next();) d = a.value, d instanceof D || z.k("Diagram.highlightCollection given something that is not a Part: " + d), d.wh = !0 + }; + C.prototype.scroll = C.prototype.scroll = function(a, b, c) { + void 0 === c && (c = 1); + var d = "up" === b || "down" === b, + e = 0; + if ("pixel" === a) e = c; + else if ("line" === a) e = c * (d ? this.ou : this.nu); + else if ("page" === a) a = d ? this.xb.height : this.xb.width, a *= this.scale, 0 !== a && (e = Math.max(a - (d ? this.ou : this.nu), 0), e *= c); + else { + if ("document" === a) { + e = this.ad; + d = this.xb; + c = z.O(); + "up" === b ? this.position = c.n(d.x, e.y) : "left" === b ? this.position = c.n(e.x, d.y) : "down" === b ? this.position = c.n(d.x, e.bottom - d.height) : "right" === b && (this.position = c.n(e.right - d.width, + d.y)); + z.A(c); + return + } + z.k("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: " + a) + } + e /= this.scale; + c = this.position.copy(); + "up" === b ? c.y = this.position.y - e : "down" === b ? c.y = this.position.y + e : "left" === b ? c.x = this.position.x - e : "right" === b ? c.x = this.position.x + e : z.k("scrolling direction must be 'up', 'down', 'left', or 'right', not: " + b); + this.position = c + }; + C.prototype.scrollToRect = C.prototype.fJ = function(a) { + var b = this.xb; + b.mk(a) || (a = a.xl, a.x -= b.width / 2, a.y -= b.height / 2, this.position = a) + }; + C.prototype.centerRect = C.prototype.YG = function(a) { + var b = this.xb; + a = a.xl; + a.x -= b.width / 2; + a.y -= b.height / 2; + this.position = a + }; + C.prototype.transformDocToView = C.prototype.aB = function(a) { + var b = this.Hd; + b.reset(); + 1 !== this.bc && b.scale(this.bc); + var c = this.sb; + (0 !== c.x || 0 !== c.y) && isFinite(c.x) && isFinite(c.y) && b.translate(-c.x, -c.y); + return a.copy().transform(this.Hd) + }; + C.prototype.transformViewToDoc = C.prototype.cG = function(a) { + var b = this.Hd; + b.reset(); + 1 !== this.bc && b.scale(this.bc); + var c = this.sb; + (0 !== c.x || 0 !== c.y) && isFinite(c.x) && isFinite(c.y) && b.translate(-c.x, -c.y); + return ub(a.copy(), this.Hd) + }; + var jh; + C.None = jh = z.s(C, "None", 0); + var Pk; + C.Uniform = Pk = z.s(C, "Uniform", 1); + var Qk; + C.UniformToFill = Qk = z.s(C, "UniformToFill", 2); + var yi; + C.CycleAll = yi = z.s(C, "CycleAll", 10); + var Ci; + C.CycleNotDirected = Ci = z.s(C, "CycleNotDirected", 11); + var Ei; + C.CycleNotDirectedFast = Ei = z.s(C, "CycleNotDirectedFast", 12); + var Fi; + C.CycleNotUndirected = Fi = z.s(C, "CycleNotUndirected", 13); + var zi; + C.CycleDestinationTree = zi = z.s(C, "CycleDestinationTree", 14); + var Bi; + C.CycleSourceTree = Bi = z.s(C, "CycleSourceTree", 15); + var qk; + C.DocumentScroll = qk = z.s(C, "DocumentScroll", 1); + var tl; + C.InfiniteScroll = tl = z.s(C, "InfiniteScroll", 2); + var sk; + C.TreeParentCollapsed = sk = z.s(C, "TreeParentCollapsed", 1); + C.AllParentsCollapsed = z.s(C, "AllParentsCollapsed", 2); + z.defineProperty(C, { + CJ: "validCycle" + }, function() { + return this.yw + }, function(a) { + var b = this.yw; + b !== a && (z.Ba(a, C, C, "validCycle"), this.yw = a, this.j("validCycle", b, a)) + }); + z.w(C, { + mn: "layers" + }, function() { + return this.Yb.i + }); + z.defineProperty(C, { + Ef: "isModelReadOnly" + }, function() { + var a = this.ie; + return null === a ? !1 : a.jb + }, function(a) { + var b = this.ie; + null !== b && (b.jb = a) + }); + z.defineProperty(C, { + jb: "isReadOnly" + }, function() { + return this.Gi + }, function(a) { + var b = this.Gi; + b !== a && (z.g(a, "boolean", C, "isReadOnly"), this.Gi = a, this.j("isReadOnly", b, a)) + }); + z.defineProperty(C, { + isEnabled: "isEnabled" + }, function() { + return this.af + }, function(a) { + var b = this.af; + b !== a && (z.g(a, "boolean", C, "isEnabled"), this.af = a, this.j("isEnabled", b, a)) + }); + z.defineProperty(C, { + Az: "allowClipboard" + }, function() { + return this.Hu + }, function(a) { + var b = this.Hu; + b !== a && (z.g(a, "boolean", C, "allowClipboard"), this.Hu = a, this.j("allowClipboard", b, a)) + }); + z.defineProperty(C, { + kk: "allowCopy" + }, function() { + return this.Ak + }, function(a) { + var b = this.Ak; + b !== a && (z.g(a, "boolean", C, "allowCopy"), this.Ak = a, this.j("allowCopy", b, a)) + }); + z.defineProperty(C, { + Sm: "allowDelete" + }, function() { + return this.Bk + }, function(a) { + var b = this.Bk; + b !== a && (z.g(a, "boolean", C, "allowDelete"), this.Bk = a, this.j("allowDelete", b, a)) + }); + z.defineProperty(C, { + kt: "allowDragOut" + }, function() { + return this.Iu + }, function(a) { + var b = this.Iu; + b !== a && (z.g(a, "boolean", C, "allowDragOut"), this.Iu = a, this.j("allowDragOut", b, a)) + }); + z.defineProperty(C, { + FD: "allowDrop" + }, function() { + return this.Ju + }, function(a) { + var b = this.Ju; + b !== a && (z.g(a, "boolean", C, "allowDrop"), this.Ju = a, this.j("allowDrop", b, a)) + }); + z.defineProperty(C, { + Hw: "allowTextEdit" + }, function() { + return this.Kk + }, function(a) { + var b = this.Kk; + b !== a && (z.g(a, "boolean", C, "allowTextEdit"), this.Kk = a, this.j("allowTextEdit", b, a)) + }); + z.defineProperty(C, { + Ew: "allowGroup" + }, function() { + return this.Ck + }, function(a) { + var b = this.Ck; + b !== a && (z.g(a, "boolean", C, "allowGroup"), this.Ck = a, this.j("allowGroup", b, a)) + }); + z.defineProperty(C, { + Iw: "allowUngroup" + }, function() { + return this.Lk + }, function(a) { + var b = this.Lk; + b !== a && (z.g(a, "boolean", C, "allowUngroup"), this.Lk = a, this.j("allowUngroup", b, a)) + }); + z.defineProperty(C, { + ap: "allowInsert" + }, function() { + return this.Lu + }, function(a) { + var b = this.Lu; + b !== a && (z.g(a, "boolean", C, "allowInsert"), this.Lu = a, this.j("allowInsert", b, a)) + }); + z.defineProperty(C, { + lt: "allowLink" + }, function() { + return this.Dk + }, function(a) { + var b = this.Dk; + b !== a && (z.g(a, "boolean", C, "allowLink"), this.Dk = a, this.j("allowLink", b, a)) + }); + z.defineProperty(C, { + Tm: "allowRelink" + }, function() { + return this.Fk + }, function(a) { + var b = this.Fk; + b !== a && (z.g(a, "boolean", C, "allowRelink"), this.Fk = a, this.j("allowRelink", b, a)) + }); + z.defineProperty(C, { + ul: "allowMove" + }, function() { + return this.Ek + }, function(a) { + var b = this.Ek; + b !== a && (z.g(a, "boolean", C, "allowMove"), this.Ek = a, this.j("allowMove", b, a)) + }); + z.defineProperty(C, { + Fw: "allowReshape" + }, function() { + return this.Gk + }, function(a) { + var b = this.Gk; + b !== a && (z.g(a, "boolean", C, "allowReshape"), this.Gk = a, this.j("allowReshape", b, a)) + }); + z.defineProperty(C, { + mt: "allowResize" + }, function() { + return this.Hk + }, function(a) { + var b = this.Hk; + b !== a && (z.g(a, "boolean", C, "allowResize"), this.Hk = a, this.j("allowResize", b, a)) + }); + z.defineProperty(C, { + Gw: "allowRotate" + }, function() { + return this.Ik + }, function(a) { + var b = this.Ik; + b !== a && (z.g(a, "boolean", C, "allowRotate"), this.Ik = a, this.j("allowRotate", b, a)) + }); + z.defineProperty(C, { + xf: "allowSelect" + }, function() { + return this.Jk + }, function(a) { + var b = this.Jk; + b !== a && (z.g(a, "boolean", C, "allowSelect"), this.Jk = a, this.j("allowSelect", b, a)) + }); + z.defineProperty(C, { + GD: "allowUndo" + }, function() { + return this.Mu + }, function(a) { + var b = this.Mu; + b !== a && (z.g(a, "boolean", C, "allowUndo"), this.Mu = a, this.j("allowUndo", b, a)) + }); + z.defineProperty(C, { + Jw: "allowZoom" + }, function() { + return this.Ou + }, function(a) { + var b = this.Ou; + b !== a && (z.g(a, "boolean", C, "allowZoom"), this.Ou = a, this.j("allowZoom", b, a)) + }); + z.defineProperty(C, { + dA: "hasVerticalScrollbar" + }, function() { + return this.tv + }, function(a) { + var b = this.tv; + b !== a && (z.g(a, "boolean", C, "hasVerticalScrollbar"), this.tv = a, Vk(this), this.ta(), this.j("hasVerticalScrollbar", b, a), Lk(this, !1)) + }); + z.defineProperty(C, { + cA: "hasHorizontalScrollbar" + }, function() { + return this.sv + }, function(a) { + var b = this.sv; + b !== a && (z.g(a, "boolean", C, "hasHorizontalScrollbar"), this.sv = a, Vk(this), this.ta(), this.j("hasHorizontalScrollbar", b, a), Lk(this, !1)) + }); + z.defineProperty(C, { + xe: "allowHorizontalScroll" + }, function() { + return this.Ku + }, function(a) { + var b = this.Ku; + b !== a && (z.g(a, "boolean", C, "allowHorizontalScroll"), this.Ku = a, this.j("allowHorizontalScroll", b, a), Lk(this, !1)) + }); + z.defineProperty(C, { + ye: "allowVerticalScroll" + }, function() { + return this.Nu + }, function(a) { + var b = this.Nu; + b !== a && (z.g(a, "boolean", C, "allowVerticalScroll"), this.Nu = a, this.j("allowVerticalScroll", b, a), Lk(this, !1)) + }); + z.defineProperty(C, { + nu: "scrollHorizontalLineChange" + }, function() { + return this.hw + }, function(a) { + var b = this.hw; + b !== a && (z.g(a, "number", C, "scrollHorizontalLineChange"), 0 > a && z.ka(a, ">= 0", C, "scrollHorizontalLineChange"), this.hw = a, this.j("scrollHorizontalLineChange", b, a)) + }); + z.defineProperty(C, { + ou: "scrollVerticalLineChange" + }, function() { + return this.lw + }, function(a) { + var b = this.lw; + b !== a && (z.g(a, "number", C, "scrollVerticalLineChange"), 0 > a && z.ka(a, ">= 0", C, "scrollVerticalLineChange"), this.lw = a, this.j("scrollVerticalLineChange", b, a)) + }); + z.defineProperty(C, { + Q: "lastInput" + }, function() { + return this.Qb + }, function(a) { + u && z.l(a, Pf, C, "lastInput"); + this.Qb = a + }); + z.defineProperty(C, { + Fc: "firstInput" + }, function() { + return this.Ei + }, function(a) { + u && z.l(a, Pf, C, "firstInput"); + this.Ei = a + }); + z.defineProperty(C, { + gc: "currentCursor" + }, function() { + return this.av + }, function(a) { + "" === a && (a = this.Oq); + this.av !== a && (z.g(a, "string", C, "currentCursor"), null !== this.Fb && (this.av = a, this.Fb.style.cursor = a, this.Pb.style.cursor = a)) + }); + z.defineProperty(C, { + kK: "defaultCursor" + }, function() { + return this.Oq + }, function(a) { + "" === a && (a = "auto"); + var b = this.Oq; + b !== a && (z.g(a, "string", C, "defaultCursor"), this.Oq = a, this.j("defaultCursor", b, a)) + }); + z.defineProperty(C, { + click: "click" + }, function() { + return this.ui + }, function(a) { + var b = this.ui; + b !== a && (null !== a && z.g(a, "function", C, "click"), this.ui = a, this.j("click", b, a)) + }); + z.defineProperty(C, { + wt: "doubleClick" + }, function() { + return this.Ci + }, function(a) { + var b = this.Ci; + b !== a && (null !== a && z.g(a, "function", C, "doubleClick"), this.Ci = a, this.j("doubleClick", b, a)) + }); + z.defineProperty(C, { + Gz: "contextClick" + }, function() { + return this.xi + }, function(a) { + var b = this.xi; + b !== a && (null !== a && z.g(a, "function", C, "contextClick"), this.xi = a, this.j("contextClick", b, a)) + }); + z.defineProperty(C, { + uA: "mouseOver" + }, function() { + return this.Pi + }, function(a) { + var b = this.Pi; + b !== a && (null !== a && z.g(a, "function", C, "mouseOver"), this.Pi = a, this.j("mouseOver", b, a)) + }); + z.defineProperty(C, { + tA: "mouseHover" + }, function() { + return this.Oi + }, function(a) { + var b = this.Oi; + b !== a && (null !== a && z.g(a, "function", C, "mouseHover"), this.Oi = a, this.j("mouseHover", b, a)) + }); + z.defineProperty(C, { + sA: "mouseHold" + }, function() { + return this.Ni + }, function(a) { + var b = this.Ni; + b !== a && (null !== a && z.g(a, "function", C, "mouseHold"), this.Ni = a, this.j("mouseHold", b, a)) + }); + z.defineProperty(C, { + KI: "mouseDragOver" + }, function() { + return this.Qv + }, function(a) { + var b = this.Qv; + b !== a && (null !== a && z.g(a, "function", C, "mouseDragOver"), this.Qv = a, this.j("mouseDragOver", b, a)) + }); + z.defineProperty(C, { + rA: "mouseDrop" + }, function() { + return this.Mi + }, function(a) { + var b = this.Mi; + b !== a && (null !== a && z.g(a, "function", C, "mouseDrop"), this.Mi = a, this.j("mouseDrop", b, a)) + }); + z.defineProperty(C, { + $A: "toolTip" + }, function() { + return this.Wi + }, function(a) { + var b = this.Wi; + b !== a && (null !== a && z.l(a, da, C, "toolTip"), this.Wi = a, this.j("toolTip", b, a)) + }); + z.defineProperty(C, { + contextMenu: "contextMenu" + }, function() { + return this.yi + }, function(a) { + var b = this.yi; + b !== a && (null !== a && z.l(a, da, C, "contextMenu"), this.yi = a, this.j("contextMenu", b, a)) + }); + z.defineProperty(C, { + wb: "commandHandler" + }, function() { + return this.qy + }, function(a) { + var b = this.qy; + b !== a && (z.l(a, ra, C, "commandHandler"), null !== a.h && z.k("Cannot share CommandHandlers between Diagrams: " + a.toString()), null !== b && b.Sc(null), this.qy = a, a.Sc(this)) + }); + z.defineProperty(C, { + hb: "toolManager" + }, function() { + return this.rz + }, function(a) { + var b = this.rz; + b !== a && (z.l(a, dh, C, "toolManager"), null !== a.h && z.k("Cannot share ToolManagers between Diagrams: " + a.toString()), null !== b && b.Sc(null), this.rz = a, a.Sc(this)) + }); + z.defineProperty(C, { + vt: "defaultTool" + }, function() { + return this.xy + }, function(a) { + var b = this.xy; + b !== a && (z.l(a, ug, C, "defaultTool"), this.xy = a, this.eb === b && (this.eb = a)) + }); + z.defineProperty(C, { + eb: "currentTool" + }, function() { + return this.vy + }, function(a) { + var b = this.vy; + null !== b && (b.ua && b.doDeactivate(), b.cancelWaitAfter(), b.doStop()); + null === a && (a = this.vt); + null !== a && (z.l(a, ug, C, "currentTool"), this.vy = a, a.Sc(this), a.doStart()) + }); + z.w(C, { + selection: "selection" + }, function() { + return this.ow + }); + z.defineProperty(C, { + CI: "maxSelectionCount" + }, function() { + return this.Lv + }, function(a) { + var b = this.Lv; + if (b !== a) + if (z.g(a, "number", C, "maxSelectionCount"), 0 <= a && !isNaN(a)) { + if (this.Lv = a, this.j("maxSelectionCount", b, a), !this.pa.qb && (a = this.selection.count - a, 0 < a)) { + this.Ja("ChangingSelection"); + for (var b = this.selection.jc(), c = 0; c < a; c++) b[c].kb = !1; + this.Ja("ChangedSelection") + } + } else z.ka(a, ">= 0", C, "maxSelectionCount") + }); + z.defineProperty(C, { + MI: "nodeSelectionAdornmentTemplate" + }, function() { + return this.Rv + }, function(a) { + var b = this.Rv; + b !== a && (z.l(a, da, C, "nodeSelectionAdornmentTemplate"), this.Rv = a, this.j("nodeSelectionAdornmentTemplate", b, a)) + }); + z.defineProperty(C, { + TH: "groupSelectionAdornmentTemplate" + }, function() { + return this.pv + }, function(a) { + var b = this.pv; + b !== a && (z.l(a, da, C, "groupSelectionAdornmentTemplate"), this.pv = a, this.j("groupSelectionAdornmentTemplate", b, a)) + }); + z.defineProperty(C, { + wI: "linkSelectionAdornmentTemplate" + }, function() { + return this.Hv + }, function(a) { + var b = this.Hv; + b !== a && (z.l(a, da, C, "linkSelectionAdornmentTemplate"), this.Hv = a, this.j("linkSelectionAdornmentTemplate", b, a)) + }); + z.w(C, { + hn: "highlighteds" + }, function() { + return this.uv + }); + z.defineProperty(C, { + mi: "isModified" + }, function() { + var a = this.pa; + return a.isEnabled ? null !== a.dj ? !0 : this.Uy && this.bh !== a.ij : this.Uy + }, function(a) { + if (this.Uy !== a) { + z.g(a, "boolean", C, "isModified"); + this.Uy = a; + var b = this.pa; + !a && b.isEnabled && (this.bh = b.ij); + a || Hl(this) + } + }); + + function Hl(a) { + var b = a.mi; + a.xD !== b && (a.xD = b, a.Ja("Modified")) + } + z.defineProperty(C, { + ha: "model" + }, function() { + return this.ie + }, function(a) { + var b = this.ie; + if (b !== a) { + z.l(a, M, C, "model"); + this.eb.doCancel(); + null !== b && b.pa !== a.pa && b.pa.QE && z.k("Do not replace a Diagram.model while a transaction is in progress."); + this.Ua.oi(); + this.Mw(); + this.eh = !1; + this.io = !0; + this.bh = -2; + this.Vf = !1; + var c = this.Vd; + this.Vd = !0; + this.Ua.sn("Model"); + null !== b && (null !== this.gh && this.gh.each(function(a) { + b.iu(a) + }), b.iu(this.FC), b instanceof V && Il(this, b.Jg), Il(this, b.gg)); + this.ie = a; + a.Rm(this.EC); + Jl(this, + a.gg); + a instanceof V && Kl(this, a.Jg); + a.iu(this.EC); + a.Rm(this.FC); + null !== this.gh && this.gh.each(function(b) { + a.Rm(b) + }); + this.Vd = c; + this.Vc || this.ta(); + null !== b && (a.pa.isEnabled = b.pa.isEnabled) + } + }); + z.defineProperty(C, { + $a: null + }, function() { + return this.xC + }, function(a) { + this.xC = a + }); + z.w(C, { + qx: null + }, function() { + return this.rG + }); + + function uk(a, b) { + if (b.ha === a.ha) { + var c = b.Dc, + d = b.propertyName; + if (c === Tf && "S" === d[0]) + if ("StartingFirstTransaction" === d) c = a.hb, c.Ye.each(function(b) { + b.Sc(a) + }), c.dg.each(function(b) { + b.Sc(a) + }), c.eg.each(function(b) { + b.Sc(a) + }), a.Vd || a.eh || (a.gv = !0, a.io && (a.Vf = !0)); + else if ("StartingUndo" === d || "StartingRedo" === d) { + var e = a.Ua; + e.nf && !a.Bb && e.oi(); + a.Ja("ChangingSelection") + } else "StartedTransaction" === d && (e = a.Ua, e.nf && !a.Bb && e.oi()); + else if (a.$a) { + a.$a = !1; + try { + var g = b.rf; + if ("" !== g) + if (c === Sf) { + if ("linkFromKey" === g) { + var h = + b.object, + k = a.Zf(h); + if (null !== k) { + var l = b.newValue, + m = a.hf(l); + k.Y = m + } + } else if ("linkToKey" === g) h = b.object, k = a.Zf(h), null !== k && (l = b.newValue, m = a.hf(l), k.da = m); + else if ("linkFromPortId" === g) { + if (h = b.object, k = a.Zf(h), null !== k) { + var n = b.newValue; + "string" === typeof n && (k.$f = n) + } + } else if ("linkToPortId" === g) h = b.object, k = a.Zf(h), null !== k && (n = b.newValue, "string" === typeof n && (k.Ug = n)); + else if ("nodeGroupKey" === g) { + var h = b.object, + p = a.uh(h); + if (null !== p) { + var q = b.newValue; + if (void 0 !== q) { + var r = a.hf(q); + p.Va = r instanceof F ? r : + null + } else p.Va = null + } + } else if ("linkLabelKeys" === g) { + if (h = b.object, k = a.Zf(h), null !== k) { + var s = b.oldValue, + t = b.newValue; + if (z.isArray(s)) + for (var v = z.bb(s), x = 0; x < v; x++) { + var y = z.Ya(s, x), + m = a.hf(y); + null !== m && (m.Nd = null) + } + if (z.isArray(t)) + for (v = z.bb(t), x = 0; x < v; x++) y = z.Ya(t, x), m = a.hf(y), null !== m && (m.Nd = k) + } + } else if ("nodeParentKey" === g) { + var A = b.object, + B = a.hf(b.newValue), + L = a.Zw(A); + if (null !== L) { + var H = L.pp(); + null !== H ? null === B ? a.remove(H) : a.ce ? H.Y = B : H.da = B : Ll(a, B, L) + } + } else if ("parentLinkCategory" === g) { + var A = b.object, + L = + a.Zw(A), + U = b.newValue; + null !== L && "string" === typeof U && (H = L.pp(), null !== H && (H.nc = U)) + } else if ("nodeCategory" === g) { + var h = b.object, + ea = a.uh(h), + U = b.newValue; + null !== ea && "string" === typeof U && (ea.nc = U) + } else if ("linkCategory" === g) { + var h = b.object, + W = a.Zf(h), + U = b.newValue; + null !== W && "string" === typeof U && (W.nc = U) + } else if ("nodeDataArray" === g) { + var P = b.oldValue; + Il(a, P); + var ba = b.newValue; + Jl(a, ba) + } else "linkDataArray" === g && (P = b.oldValue, Il(a, P), ba = b.newValue, Kl(a, ba)); + a.mi = !0 + } else c === Uf ? (ba = b.newValue, "nodeDataArray" === + g && z.Za(ba) ? Ml(a, ba) : "linkDataArray" === g && z.Za(ba) ? Nl(a, ba) : "linkLabelKeys" === g && yg(ba) && (k = a.Zf(b.object), m = a.hf(ba), null !== k && null !== m && (m.Nd = k)), a.mi = !0) : c === Vf ? (P = b.oldValue, "nodeDataArray" === g && z.Za(P) ? Ol(a, P) : "linkDataArray" === g && z.Za(P) ? Ol(a, P) : "linkLabelKeys" === g && yg(P) && (m = a.hf(P), null !== m && (m.Nd = null)), a.mi = !0) : c === Tf && ("SourceChanged" === g ? null !== b.object ? tk(a, b.object, b.propertyName) : (a.BJ(), a.eG()) : "ModelDisplaced" === g && a.Sl()); + else if (c === Sf) { + var Oa = b.propertyName, + h = b.object; + if (h === a.ha) { + if ("nodeKeyProperty" === + Oa || "nodeCategoryProperty" === Oa || "linkFromKeyProperty" === Oa || "linkToKeyProperty" === Oa || "linkFromPortIdProperty" === Oa || "linkToPortIdProperty" === Oa || "linkLabelKeysProperty" === Oa || "nodeIsGroupProperty" === Oa || "nodeGroupKeyProperty" === Oa || "nodeParentKeyProperty" === Oa || "linkCategoryProperty" === Oa) a.pa.qb || a.Sl() + } else tk(a, h, Oa); + a.mi = !0 + } else if (c === Uf || c === Vf) Pl(a, b), a.mi = !0; + else if (c === Tf) { + if ("FinishedUndo" === d || "FinishedRedo" === d) a.pa.Hi = !0, a.Ja("ChangedSelection"), Jk(a), a.pa.Hi = !1; + e = a.Ua; + "RolledBackTransaction" === + d && e.oi(); + a.gv = !0; + a.bg(); + 0 === a.pa.Gh && Sj(e); + "CommittedTransaction" === d && a.pa.Wy && (a.bh = Math.min(a.bh, a.pa.ij - 1)); + var sa = b.TE; + sa && (Hl(a), a.qx.clear()); + !a.cz && sa && (a.cz = !0, z.setTimeout(function() { + a.eb.standardMouseOver(); + a.cz = !1 + }, 10)) + } + } finally { + a.$a = !0 + } + } + } + } + + function tk(a, b, c) { + if ("string" === typeof c) { + var d = a.uh(b); + if (null !== d) d.Mb(c), a.ha instanceof ng && (d = a.Zf(b), null !== d && d.Mb(c)); + else { + for (var d = null, e = a.nm.i; e.next();) { + for (var g = e.value, h = 0; h < g.length; h++) { + var k = g[h].EH(b); + null !== k && (null === d && (d = z.rb()), d.push(k)) + } + if (null !== d) break + } + if (null !== d) { + for (e = 0; e < d.length; e++) d[e].Mb(c); + z.xa(d) + } + } + b === a.ha.tk && a.eG(c) + } + } + z.defineProperty(C, { + Ee: "skipsModelSourceBindings" + }, function() { + return this.$C + }, function(a) { + this.$C = a + }); + z.defineProperty(C, { + vu: null + }, function() { + return this.lz + }, function(a) { + this.lz = a + }); + + function Pl(a, b) { + var c = b.Dc === Uf, + d = c ? b.Kg : b.Mg, + e = c ? b.newValue : b.oldValue, + g = a.nm.na(b.object); + if (Array.isArray(g)) + for (var h = 0; h < g.length; h++) { + var k = g[h]; + if (c) Ql(k, e, d); + else { + var l = d; + if (!(0 > l)) { + var m = l; + Rl(k) && m++; + k.Ve(m); + Sl(k, m, l) + } + } + } + } + + function yl(a, b) { + var c = b.Ii; + if (z.isArray(c)) { + var d = a.nm.na(c); + if (null === d) d = [], d.push(b), a.nm.add(c, d); + else { + for (c = 0; c < d.length; c++) + if (d[c] === b) return; + d.push(b) + } + } + } + + function Cl(a, b) { + var c = b.Ii; + if (z.isArray(c)) { + var d = a.nm.na(c); + if (null !== d) + for (var e = 0; e < d.length; e++) + if (d[e] === b) { + d.splice(e, 1); + 0 === d.length && a.nm.remove(c); + break + } + } + } + + function xl(a, b) { + for (var c = b.va.o, d = c.length, e = 0; e < d; e++) { + var g = c[e]; + g instanceof vk && Tl(a, g) + } + } + + function Tl(a, b) { + var c = b.element; + if (null !== c && c instanceof HTMLImageElement) { + var c = c.src, + d = a.Go.na(c); + if (null === d) d = [], d.push(b), a.Go.add(c, d); + else { + for (c = 0; c < d.length; c++) + if (d[c] === b) return; + d.push(b) + } + } + } + + function Bl(a, b) { + for (var c = b.va.o, d = c.length, e = 0; e < d; e++) { + var g = c[e]; + g instanceof vk && Ul(a, g) + } + } + + function Ul(a, b) { + var c = b.element; + if (null !== c && c instanceof HTMLImageElement) { + var c = c.src, + d = a.Go.na(c); + if (null !== d) + for (var e = 0; e < d.length; e++) + if (d[e] === b) { + d.splice(e, 1); + 0 === d.length && a.Go.remove(c); + break + } + } + } + C.prototype.clear = C.prototype.clear = function() { + var a = null; + null !== this.td && (a = this.td.ca); + this.ha.clear(); + for (var b = this.Yb.length, c = 0; c < b; c++) this.Yb.o[c].clear(); + this.qg.clear(); + this.Rk.clear(); + this.Fo.clear(); + this.ol.clear(); + this.zo.clear(); + this.mb.clear(); + this.zi.clear(); + this.Qk.clear(); + this.nm.clear(); + this.ow.Wa(); + this.ow.clear(); + this.ow.freeze(); + this.uv.Wa(); + this.uv.clear(); + this.uv.freeze(); + bh = this.Sn = null; + ch = ""; + this.hv = (new w(NaN, NaN, NaN, NaN)).freeze(); + null !== a && (this.add(a), this.mb.remove(a)); + this.ta() + }; + C.prototype.reset = C.prototype.reset = function() { + this.Vc = !0; + this.clear(); + this.Yb = new J(tg); + this.rF(); + this.qF(); + this.sb = (new N(NaN, NaN)).freeze(); + this.bc = 1; + this.wv = (new N(NaN, NaN)).freeze(); + this.xv = NaN; + this.Nv = 1E-4; + this.Kv = 100; + this.Bw = (new N(NaN, NaN)).freeze(); + this.nv = (new w(NaN, NaN, NaN, NaN)).freeze(); + this.iw = (new Db(0, 0, 0, 0)).freeze(); + this.jw = qk; + this.fw = this.bw = null; + this.dm = jh; + this.Pn = Pc; + this.Xk = jh; + this.no = Pc; + this.yv = this.vv = Zb; + this.tB = 250; + this.Su = (new Db(16, 16, 16, 16)).freeze(); + this.Cv = !0; + this.ww = sk; + this.yw = yi; + this.Oq = "auto"; + this.yi = this.Wi = this.Mi = this.Qv = this.Ni = this.Oi = this.Pi = this.xi = this.Ci = this.ui = null; + this.Gi = !1; + this.Bk = this.Ak = this.Hu = this.af = !0; + this.Ju = this.Iu = !1; + this.Nu = this.Ku = this.tv = this.sv = this.Ou = this.Mu = this.Jk = this.Ik = this.Hk = this.Gk = this.Ek = this.Fk = this.Dk = this.Lu = this.Lk = this.Ck = this.Kk = !0; + this.lw = this.hw = 16; + this.df = (new Db(5)).freeze(); + this.Lv = 999999999; + this.he = null; + zk(this); + this.td = null; + this.hb = new dh; + this.hb.initializeStandardTools(); + this.eb = this.vt = this.hb; + this.wb = new ra; + this.Vi = !0; + yk(this); + this.Sb = new vg; + this.Vi = !1; + this.ha = new V; + this.eh = !1; + this.io = !0; + this.Vc = this.Vf = !1; + this.ta(); + this.gh = this.ti = null; + rk(this); + this.av = "" + }; + C.prototype.rebuildParts = C.prototype.Sl = function() { + for (var a = this.zA.i; a.next();) { + var b = a.value, + c = a.key; + (!b.be() || b instanceof F) && z.k('Invalid node template in Diagram.nodeTemplateMap: template for "' + c + '" must be a Node or a simple Part, not a Group or Link: ' + b) + } + for (a = this.bA.i; a.next();) b = a.value, c = a.key, b instanceof F || z.k('Invalid group template in Diagram.groupTemplateMap: template for "' + c + '" must be a Group, not a normal Node or Link: ' + b); + for (a = this.lA.i; a.next();) b = a.value, c = a.key, b instanceof + G || z.k('Invalid link template in Diagram.linkTemplateMap: template for "' + c + '" must be a Link, not a normal Node or simple Part: ' + b); + a = z.rb(); + for (b = this.selection.i; b.next();)(c = b.value.data) && a.push(c); + for (var b = z.rb(), d = this.hn.i; d.next();)(c = d.value.data) && b.push(c); + c = z.rb(); + for (d = this.Lg.i; d.next();) { + var e = d.value; + null !== e.data && (c.push(e.data), c.push(e.location)) + } + for (d = this.links.i; d.next();) e = d.value, null !== e.data && (c.push(e.data), c.push(e.location)); + for (d = this.ni.i; d.next();) e = d.value, null !== + e.data && (c.push(e.data), c.push(e.location)); + d = this.ha; + d instanceof V && Il(this, d.Jg); + Il(this, d.gg); + Jl(this, d.gg); + d instanceof V && Kl(this, d.Jg); + for (d = 0; d < a.length; d++) e = this.uh(a[d]), null !== e && (e.kb = !0); + for (d = 0; d < b.length; d++) e = this.uh(b[d]), null !== e && (e.wh = !0); + for (d = 0; d < c.length; d += 2) e = this.uh(c[d]), null !== e && (e.location = c[d + 1]); + z.xa(a); + z.xa(b); + z.xa(c) + }; + + function Jl(a, b) { + if (null !== b) { + for (var c = a.ha, d = z.bb(b), e = 0; e < d; e++) { + var g = z.Ya(b, e); + c.le(g) ? Ml(a, g, !1) : c instanceof V && Nl(a, g) + } + if (c instanceof V || c instanceof ng) { + for (e = 0; e < d; e++) g = z.Ya(b, e), c.le(g) && Vl(a, g); + if (c instanceof V) + for (c = a.links; c.next();) Wl(c.value) + } + Xl(a, !1) + } + } + + function Ml(a, b, c) { + if (void 0 !== b && null !== b && !a.pa.qb && !a.zi.contains(b)) { + void 0 === c && (c = !0); + var d = a.$z(b), + e = Yl(a, b, d); + if (null !== e && (gh(e), e = e.copy(), null !== e)) { + var g = a.Ee; + a.Ee = !0; + e.si = d; + e.fe = b; + a.add(e); + e.fe = null; + e.data = b; + c && Vl(a, b); + a.Ee = g + } + } + } + C.prototype.$z = function(a) { + return this.ha.$z(a) + }; + var Zl = !1, + $l = !1; + + function Yl(a, b, c) { + var d = !1, + e = a.ha; + e instanceof V && (d = e.hA(b)); + d ? (b = a.bA.na(c), null === b && (b = a.bA.na(""), null === b && ($l || ($l = !0, z.trace('No Group template found for category "' + c + '"'), z.trace(" Using default group template")), b = a.OB))) : (b = a.zA.na(c), null === b && (b = a.zA.na(""), null === b && (Zl || (Zl = !0, z.trace('No Node template found for category "' + c + '"'), z.trace(" Using default node template")), b = a.QB))); + return b + } + + function Vl(a, b) { + var c = a.ha; + if (c instanceof V || c instanceof ng) { + var d = c.pb(b); + if (void 0 !== d) { + var e = Bg(c, d), + g = a.uh(b); + if (null !== e && null !== g) { + for (e = e.i; e.next();) { + var h = e.value; + if (c instanceof V) { + var k = c; + if (k.le(h)) { + if (g instanceof F && k.fn(h) === d) { + var l = g, + h = a.uh(h); + null !== h && (h.Va = l) + } + } else { + var m = a.Zf(h); + if (null !== m && g instanceof E && (l = g, k.Ll(h) === d && (m.Y = l), k.Ml(h) === d && (m.da = l), h = k.qk(h), z.isArray(h))) + for (k = 0; k < z.bb(h); k++) + if (z.Ya(h, k) === d) { + l.Nd = m; + break + } + } + } else c instanceof ng && (m = c, m.le(h) && g instanceof E && (l = g, m.gn(h) === d && (h = a.Zw(h), Ll(a, l, h)))) + } + Dg(c, d) + } + c instanceof V ? (c = c.fn(b), void 0 !== c && (c = a.hf(c), c instanceof F && (g.Va = c))) : c instanceof ng && (c = c.gn(b), void 0 !== c && g instanceof E && (l = g, g = a.hf(c), Ll(a, g, l))) + } + } + } + + function Ll(a, b, c) { + if (null !== b && null !== c) { + var d = a.hb.ZE, + e = b, + g = c; + if (a.ce) + for (b = g.ee; b.next();) { + if (b.value.da === g) return + } else + for (e = c, g = b, b = e.ee; b.next();) + if (b.value.Y === e) return; + if (null === d || !Ai(d, e, g, null, !0)) + if (d = a.ax(c.data), b = am(a, d), null !== b && (gh(b), b = b.copy(), null !== b)) { + var h = a.Ee; + a.Ee = !0; + b.si = d; + b.fe = c.data; + b.Y = e; + b.da = g; + a.add(b); + b.fe = null; + b.data = c.data; + a.Ee = h + } + } + } + + function Kl(a, b) { + if (null !== b) { + for (var c = z.bb(b), d = 0; d < c; d++) { + var e = z.Ya(b, d); + Nl(a, e) + } + Xl(a, !1) + } + } + + function Nl(a, b) { + if (void 0 !== b && null !== b && !a.pa.qb && !a.Qk.contains(b)) { + var c = a.ax(b), + d = am(a, c); + if (null !== d && (gh(d), d = d.copy(), null !== d)) { + var e = a.Ee; + a.Ee = !0; + d.si = c; + d.fe = b; + var c = a.ha, + g = c.MH(b); + "" !== g && (d.$f = g); + g = c.Ll(b); + void 0 !== g && (g = a.hf(g), g instanceof E && (d.Y = g)); + g = c.PH(b); + "" !== g && (d.Ug = g); + g = c.Ml(b); + void 0 !== g && (g = a.hf(g), g instanceof E && (d.da = g)); + c = c.qk(b); + if (z.isArray(c)) + for (var g = z.bb(c), h = 0; h < g; h++) { + var k = z.Ya(c, h), + k = a.hf(k); + null !== k && (k.Nd = d) + } + a.add(d); + d.fe = null; + d.data = b; + a.Ee = e + } + } + } + C.prototype.ax = function(a) { + var b = this.ha, + c = ""; + b instanceof V ? c = b.ax(a) : b instanceof ng && (c = b.OH(a)); + return c + }; + var bm = !1; + + function am(a, b) { + var c = a.lA.na(b); + null === c && (c = a.lA.na(""), null === c && (bm || (bm = !0, z.trace('No Link template found for category "' + b + '"'), z.trace(" Using default link template")), c = a.PB)); + return c + } + + function Il(a, b) { + for (var c = z.bb(b), d = 0; d < c; d++) { + var e = z.Ya(b, d); + Ol(a, e) + } + } + + function Ol(a, b) { + if (void 0 !== b && null !== b) { + var c = a.uh(b); + if (null !== c) { + c.kb = !1; + c.wh = !1; + var d = c.layer; + if (null !== d && d.h === a) { + var e = a.ha; + if (e instanceof V && c instanceof E) { + var g = c, + h = e.pb(g.data); + if (void 0 !== h) { + for (var k = g.ee; k.next();) Cg(e, h, k.value.data); + g.Df && (k = g.Nd, null !== k && Cg(e, h, k.data)); + if (g instanceof F) + for (g = g.Hc; g.next();) k = g.value.data, e.le(k) && Cg(e, h, k) + } + } else if (e instanceof ng && c instanceof E) { + g = c; + k = a.Zf(g.data); + if (null !== k) { + k.kb = !1; + k.wh = !1; + var l = k.layer; + if (null !== l) { + var m = l.Ve(-1, k, !1); + 0 <= m && a.Rc(Vf, "parts", l, k, null, m, null); + m = k.Ut; + null !== m && m(k, l, null) + } + } + k = a.ce; + for (g = g.ee; g.next();) l = g.value, l = (k ? l.da : l.Y).data, e.le(l) && Cg(e, h, l) + } + e = d.Ve(-1, c, !1); + 0 <= e && a.Rc(Vf, "parts", d, c, null, e, null); + e = c.Ut; + null !== e && e(c, d, null) + } + } + } + } + C.prototype.findPartForKey = C.prototype.HH = function(a) { + if (null === a || void 0 === a) return null; + a = this.ha.ne(a); + return null === a ? null : this.zi.na(a) + }; + C.prototype.findNodeForKey = C.prototype.hf = function(a) { + if (null === a || void 0 === a) return null; + a = this.ha.ne(a); + if (null === a) return null; + a = this.zi.na(a); + return a instanceof E ? a : null + }; + C.prototype.findPartForData = C.prototype.uh = function(a) { + if (null === a) return null; + var b = this.zi.na(a); + return null !== b ? b : b = this.Qk.na(a) + }; + C.prototype.findNodeForData = C.prototype.Zw = function(a) { + if (null === a) return null; + a = this.zi.na(a); + return a instanceof E ? a : null + }; + C.prototype.findLinkForData = C.prototype.Zf = function(a) { + return null === a ? null : this.Qk.na(a) + }; + C.prototype.findNodesByExample = function(a) { + for (var b = new K, c = this.Fo.i; c.next();) { + var d = c.value, + e = d.data; + if (null !== e) + for (var g = 0; g < arguments.length; g++) { + var h = arguments[g]; + if (z.Za(h) && cm(this, e, h)) { + b.add(d); + break + } + } + } + return b.i + }; + C.prototype.findLinksByExample = function(a) { + for (var b = new K, c = this.zo.i; c.next();) { + var d = c.value, + e = d.data; + if (null !== e) + for (var g = 0; g < arguments.length; g++) { + var h = arguments[g]; + if (z.Za(h) && cm(this, e, h)) { + b.add(d); + break + } + } + } + return b.i + }; + + function cm(a, b, c) { + for (var d in c) { + var e = b[d], + g = c[d]; + if (z.isArray(g)) { + if (!z.isArray(e) || e.length < g.length) return !1; + for (var h = 0; h < e.length; h++) { + var k = e[h], + l = g[h]; + if (void 0 !== l && !dm(a, k, l)) return !1 + } + } else if (!dm(a, e, g)) return !1 + } + return !0 + } + + function dm(a, b, c) { + if ("function" === typeof c) { + if (!c(b)) return !1 + } else if (c instanceof RegExp) { + if (!b || !c.test(b.toString())) return !1 + } else if (z.Za(b) && z.Za(c)) { + if (!cm(a, b, c)) return !1 + } else if (b !== c) return !1; + return !0 + } + z.defineProperty(C, { + ZK: "nodeTemplate" + }, function() { + return this.Qi.na("") + }, function(a) { + var b = this.Qi.na(""); + b !== a && (z.l(a, D, C, "nodeTemplate"), this.Qi.add("", a), this.j("nodeTemplate", b, a), this.pa.qb || this.Sl()) + }); + z.defineProperty(C, { + zA: "nodeTemplateMap" + }, function() { + return this.Qi + }, function(a) { + var b = this.Qi; + b !== a && (z.l(a, na, C, "nodeTemplateMap"), this.Qi = a, this.j("nodeTemplateMap", b, a), this.pa.qb || this.Sl()) + }); + z.defineProperty(C, { + BK: "groupTemplate" + }, function() { + return this.Tk.na("") + }, function(a) { + var b = this.Tk.na(""); + b !== a && (z.l(a, F, C, "groupTemplate"), this.Tk.add("", a), this.j("groupTemplate", b, a), this.pa.qb || this.Sl()) + }); + z.defineProperty(C, { + bA: "groupTemplateMap" + }, function() { + return this.Tk + }, function(a) { + var b = this.Tk; + b !== a && (z.l(a, na, C, "groupTemplateMap"), this.Tk = a, this.j("groupTemplateMap", b, a), this.pa.qb || this.Sl()) + }); + z.defineProperty(C, { + NK: "linkTemplate" + }, function() { + return this.Oj.na("") + }, function(a) { + var b = this.Oj.na(""); + b !== a && (z.l(a, G, C, "linkTemplate"), this.Oj.add("", a), this.j("linkTemplate", b, a), this.pa.qb || this.Sl()) + }); + z.defineProperty(C, { + lA: "linkTemplateMap" + }, function() { + return this.Oj + }, function(a) { + var b = this.Oj; + b !== a && (z.l(a, na, C, "linkTemplateMap"), this.Oj = a, this.j("linkTemplateMap", b, a), this.pa.qb || this.Sl()) + }); + z.defineProperty(C, { + hI: null + }, function() { + return this.km + }, function(a) { + this.km = a + }); + z.defineProperty(C, { + We: "isMouseCaptured" + }, function() { + return this.uC + }, function(a) { + var b = this.Fb; + null !== b && (a ? (this.Q.bubbles = !1, b.removeEventListener("mousemove", this.Kp, !1), b.removeEventListener("mousedown", this.Jp, !1), b.removeEventListener("mouseup", this.Mp, !1), b.removeEventListener("mousewheel", this.zh, !1), b.removeEventListener("DOMMouseScroll", this.zh, !1), b.removeEventListener("mouseout", this.Lp, !1), window.addEventListener("mousemove", this.Kp, !0), window.addEventListener("mousedown", this.Jp, !0), + window.addEventListener("mouseup", this.Mp, !0), window.addEventListener("mousewheel", this.zh, !0), window.addEventListener("DOMMouseScroll", this.zh, !0), window.addEventListener("mouseout", this.Lp, !0), window.addEventListener("selectstart", this.preventDefault, !1)) : (window.removeEventListener("mousemove", this.Kp, !0), window.removeEventListener("mousedown", this.Jp, !0), window.removeEventListener("mouseup", this.Mp, !0), window.removeEventListener("mousewheel", this.zh, !0), window.removeEventListener("DOMMouseScroll", + this.zh, !0), window.removeEventListener("mouseout", this.Lp, !0), window.removeEventListener("selectstart", this.preventDefault, !1), b.addEventListener("mousemove", this.Kp, !1), b.addEventListener("mousedown", this.Jp, !1), b.addEventListener("mouseup", this.Mp, !1), b.addEventListener("mousewheel", this.zh, !1), b.addEventListener("DOMMouseScroll", this.zh, !1), b.addEventListener("mouseout", this.Lp, !1)), this.uC = a) + }); + z.defineProperty(C, { + position: "position" + }, function() { + return this.sb + }, function(a) { + var b = this.sb; + if (!b.N(a)) { + z.l(a, N, C, "position"); + var c = this.xb.copy(); + a = a.copy(); + if (!this.Vc && null !== this.Fb) { + this.Vc = !0; + var d = this.scale; + Nk(this, a, this.ad, this.Jb / d, this.Ob / d, this.Pn, !1); + this.Vc = !1 + } + this.sb = a.V(); + a = this.Ua; + a.wc && fk(a, b, this.sb); + this.Vc || this.fu(c, this.xb) + } + }); + z.defineProperty(C, { + ZH: "initialPosition" + }, function() { + return this.wv + }, function(a) { + this.wv.N(a) || (z.l(a, N, C, "initialPosition"), this.wv = a.V()) + }); + z.defineProperty(C, { + $H: "initialScale" + }, function() { + return this.xv + }, function(a) { + this.xv !== a && (z.g(a, "number", C, "initialScale"), this.xv = a) + }); + z.defineProperty(C, { + Gt: "grid" + }, function() { + null === this.td && Fk(this); + return this.td + }, function(a) { + var b = this.td; + if (b !== a) { + null === b && (Fk(this), b = this.td); + z.l(a, I, C, "grid"); + a.type !== Gk && z.k("Diagram.grid must be a Panel of type Panel.Grid"); + var c = b.U; + null !== c && c.remove(b); + this.td = a; + a.name = "GRID"; + null !== c && c.add(a); + hl(this); + this.ta(); + this.j("grid", b, a) + } + }); + z.w(C, { + xb: "viewportBounds" + }, function() { + var a = this.wD; + if (null === this.Fb) return a; + var b = this.sb, + c = this.bc; + a.n(b.x, b.y, Math.max(this.Jb, 0) / c, Math.max(this.Ob, 0) / c); + return a + }); + z.defineProperty(C, { + uE: "fixedBounds" + }, function() { + return this.nv + }, function(a) { + var b = this.nv; + b.N(a) || (z.l(a, w, C, "fixedBounds"), (u && Infinity === a.width || -Infinity === a.width || Infinity === a.height || -Infinity === a.height) && z.k("fixedBounds width/height must not be Infinity"), this.nv = a = a.V(), this.yc(), this.j("fixedBounds", b, a)) + }); + z.defineProperty(C, { + BF: "scrollMargin" + }, function() { + return this.iw + }, function(a) { + "number" === typeof a ? a = new Db(a) : z.l(a, Db, C, "scrollMargin"); + var b = this.iw; + b.N(a) || (this.iw = a = a.V(), this.yc(), this.j("scrollMargin", b, a)) + }); + z.defineProperty(C, { + MA: "scrollMode" + }, function() { + return this.jw + }, function(a) { + var b = this.jw; + b !== a && (z.Ba(a, C, C, "scrollMode"), this.jw = a, a === qk && Lk(this, !1), this.j("scrollMode", b, a)) + }); + z.defineProperty(C, { + jF: "positionComputation" + }, function() { + return this.bw + }, function(a) { + var b = this.bw; + b !== a && (null !== a && z.g(a, "function", C, "positionComputation"), this.bw = a, Lk(this, !1), this.j("positionComputation", b, a)) + }); + z.defineProperty(C, { + AF: "scaleComputation" + }, function() { + return this.fw + }, function(a) { + var b = this.fw; + b !== a && (null !== a && z.g(a, "function", C, "scaleComputation"), this.fw = a, Fl(this, this.scale, this.scale), this.j("scaleComputation", b, a)) + }); + z.w(C, { + ad: "documentBounds" + }, function() { + return this.hv + }); + + function Ok(a, b) { + a.Ij = !1; + var c = a.hv; + c.N(b) || (b = b.V(), a.hv = b, Lk(a, !1), a.Ja("DocumentBoundsChanged", null, c.copy()), Vk(a)) + } + z.defineProperty(C, { + scale: "scale" + }, function() { + return this.bc + }, function(a) { + var b = this.bc; + z.p(a, C, "scale"); + b !== a && Fl(this, b, a) + }); + z.defineProperty(C, { + wl: "autoScale" + }, function() { + return this.dm + }, function(a) { + var b = this.dm; + b !== a && (z.Ba(a, C, C, "autoScale"), this.dm = a, this.j("autoScale", b, a), a !== jh && Lk(this, !1)) + }); + z.defineProperty(C, { + DK: "initialAutoScale" + }, function() { + return this.Xk + }, function(a) { + var b = this.Xk; + b !== a && (z.Ba(a, C, C, "initialAutoScale"), this.Xk = a, this.j("initialAutoScale", b, a)) + }); + z.defineProperty(C, { + aI: "initialViewportSpot" + }, function() { + return this.yv + }, function(a) { + var b = this.yv; + b !== a && (z.l(a, Q, C, "initialViewportSpot"), a.cd() || z.k("initialViewportSpot must be a specific Spot: " + a), this.yv = a, this.j("initialViewportSpot", b, a)) + }); + z.defineProperty(C, { + YH: "initialDocumentSpot" + }, function() { + return this.vv + }, function(a) { + var b = this.vv; + b !== a && (z.l(a, Q, C, "initialDocumentSpot"), a.cd() || z.k("initialViewportSpot must be a specific Spot: " + a), this.vv = a, this.j("initialDocumentSpot", b, a)) + }); + z.defineProperty(C, { + yh: "minScale" + }, function() { + return this.Nv + }, function(a) { + z.p(a, C, "minScale"); + var b = this.Nv; + b !== a && (0 < a ? (this.Nv = a, this.j("minScale", b, a), a > this.scale && (this.scale = a)) : z.ka(a, "> 0", C, "minScale")) + }); + z.defineProperty(C, { + xh: "maxScale" + }, function() { + return this.Kv + }, function(a) { + z.p(a, C, "maxScale"); + var b = this.Kv; + b !== a && (0 < a ? (this.Kv = a, this.j("maxScale", b, a), a < this.scale && (this.scale = a)) : z.ka(a, "> 0", C, "maxScale")) + }); + z.defineProperty(C, { + $l: "zoomPoint" + }, function() { + return this.Bw + }, function(a) { + this.Bw.N(a) || (z.l(a, N, C, "zoomPoint"), this.Bw = a = a.V()) + }); + z.defineProperty(C, { + XD: "contentAlignment" + }, function() { + return this.Pn + }, function(a) { + var b = this.Pn; + b.N(a) || (z.l(a, Q, C, "contentAlignment"), this.Pn = a = a.V(), this.j("contentAlignment", b, a), Lk(this, !1)) + }); + z.defineProperty(C, { + EK: "initialContentAlignment" + }, function() { + return this.no + }, function(a) { + var b = this.no; + b.N(a) || (z.l(a, Q, C, "initialContentAlignment"), this.no = a = a.V(), this.j("initialContentAlignment", b, a)) + }); + z.defineProperty(C, { + padding: "padding" + }, function() { + return this.df + }, function(a) { + "number" === typeof a ? a = new Db(a) : z.l(a, Db, C, "padding"); + var b = this.df; + b.N(a) || (this.df = a = a.V(), this.yc(), this.j("padding", b, a)) + }); + z.w(C, { + Lg: "nodes" + }, function() { + return this.Fo.i + }); + z.w(C, { + links: "links" + }, function() { + return this.zo.i + }); + z.w(C, { + ni: "parts" + }, function() { + return this.mb.i + }); + C.prototype.findTopLevelNodesAndLinks = function() { + for (var a = new K(D), b = this.Fo.i; b.next();) { + var c = b.value; + c.Bp && a.add(c) + } + for (b = this.zo.i; b.next();) c = b.value, c.Bp && a.add(c); + return a.i + }; + C.prototype.findTopLevelGroups = function() { + return this.ol.i + }; + z.defineProperty(C, { + Sb: "layout" + }, function() { + return this.he + }, function(a) { + var b = this.he; + b !== a && (z.l(a, vg, C, "layout"), null !== b && (b.h = null, b.group = null), this.he = a, a.h = this, a.group = null, this.Qu = !0, this.j("layout", b, a), this.Ce()) + }); + C.prototype.layoutDiagram = function(a) { + Jk(this); + a && Xl(this, !0); + il(this, !1) + }; + + function Xl(a, b) { + for (var c = a.ol.i; c.next();) em(a, c.value, b); + null !== a.Sb && (b ? a.Sb.Gf = !1 : a.Sb.I()) + } + + function em(a, b, c) { + if (null !== b) { + for (var d = b.wm.i; d.next();) em(a, d.value, c); + null !== b.Sb && (c ? b.Sb.Gf = !1 : b.Sb.I()) + } + } + + function il(a, b) { + if (!a.yy) { + var c = a.Sb, + d = a.$a; + a.$a = !0; + try { + a.Wb("Layout"); + var e = a.Ua; + 1 !== a.pa.Gh || e.nf || e.wc || e.sn("Layout"); + for (var g = a.ol.i; g.next();) fm(a, g.value, b); + c.Gf || b && !c.SE && 1 !== a.pa.Gh || (c.doLayout(a), Jk(a), c.Gf = !0) + } finally { + a.Jd("Layout"), a.Qu = !c.Gf, a.$a = d + } + } + } + + function fm(a, b, c) { + if (null !== b) { + for (var d = b.wm.i; d.next();) fm(a, d.value, c); + d = b.Sb; + null === d || d.Gf || c && !d.SE || (b.dz = !b.location.F(), d.doLayout(b), b.I(gm), d.Gf = !0, ll(a, b)) + } + } + z.defineProperty(C, { + ce: "isTreePathToChildren" + }, function() { + return this.Cv + }, function(a) { + var b = this.Cv; + if (b !== a && (z.g(a, "boolean", C, "isTreePathToChildren"), this.Cv = a, this.j("isTreePathToChildren", b, a), !this.pa.qb)) + for (a = this.Lg; a.next();) hm(a.value) + }); + C.prototype.findTreeRoots = function() { + for (var a = new J(E), b = this.Lg; b.next();) { + var c = b.value; + c.Bp && null === c.pp() && a.add(c) + } + return a.i + }; + z.defineProperty(C, { + bB: "treeCollapsePolicy" + }, function() { + return this.ww + }, function(a) { + var b = this.ww; + b !== a && (z.Ba(a, C, C, "treeCollapsePolicy"), this.ww = a, this.j("treeCollapsePolicy", b, a)) + }); + z.defineProperty(C, { + vh: null + }, function() { + return this.lC + }, function(a) { + this.lC = a + }); + + function rk(a) { + function b(a) { + var b = a.toLowerCase(), + h = new J("function"); + c.add(a, h); + c.add(b, h); + d.add(a, a); + d.add(b, a) + } + var c = new na("string", J), + d = new na("string", "string"); + b("AnimationStarting"); + b("AnimationFinished"); + b("BackgroundSingleClicked"); + b("BackgroundDoubleClicked"); + b("BackgroundContextClicked"); + b("ClipboardChanged"); + b("ClipboardPasted"); + b("DocumentBoundsChanged"); + b("ExternalObjectsDropped"); + b("InitialLayoutCompleted"); + b("LayoutCompleted"); + b("LinkDrawn"); + b("LinkRelinked"); + b("LinkReshaped"); + b("Modified"); + b("ObjectSingleClicked"); + b("ObjectDoubleClicked"); + b("ObjectContextClicked"); + b("PartCreated"); + b("PartResized"); + b("PartRotated"); + b("SelectionMoved"); + b("SelectionCopied"); + b("SelectionDeleting"); + b("SelectionDeleted"); + b("SelectionGrouped"); + b("SelectionUngrouped"); + b("ChangingSelection"); + b("ChangedSelection"); + b("SubGraphCollapsed"); + b("SubGraphExpanded"); + b("TextEdited"); + b("TreeCollapsed"); + b("TreeExpanded"); + b("ViewportBoundsChanged"); + a.Ay = c; + a.zy = d + } + + function Ia(a, b) { + var c = a.zy.na(b); + return null !== c ? c : a.zy.na(b.toLowerCase()) + } + + function im(a, b) { + var c = a.Ay.na(b); + if (null !== c) return c; + c = a.Ay.na(b.toLowerCase()); + if (null !== c) return c; + z.k("Unknown DiagramEvent name: " + b); + return null + } + C.prototype.addDiagramListener = C.prototype.yz = function(a, b) { + z.g(a, "string", C, "addDiagramListener:name"); + z.g(b, "function", C, "addDiagramListener:listener"); + var c = im(this, a); + null !== c && c.add(b) + }; + C.prototype.removeDiagramListener = C.prototype.mF = function(a, b) { + z.g(a, "string", C, "removeDiagramListener:name"); + z.g(b, "function", C, "addDiagramListener:listener"); + var c = im(this, a); + null !== c && c.remove(b) + }; + C.prototype.raiseDiagramEvent = C.prototype.Ja = function(a, b, c) { + u && z.g(a, "string", C, "raiseDiagramEvent:name"); + var d = im(this, a), + e = new Qf; + e.h = this; + e.name = Ia(this, a); + void 0 !== b && (e.WA = b); + void 0 !== c && (e.CA = c); + a = d.length; + if (1 === a) d = d.ea(0), d(e); + else if (0 !== a) + for (b = d.jc(), c = 0; c < a; c++) d = b[c], d(e); + return e.cancel + }; + + function ki(a, b) { + var c = !1; + a.xb.mk(b) && (c = !0); + c = a.Wz(b, function(a) { + return a.ca + }, function(a) { + return a instanceof G + }, !0, function(a) { + return a instanceof G + }, c); + if (0 !== c.count) + for (c = c.i; c.next();) { + var d = c.value; + d.jj && d.qc() + } + } + C.prototype.isUnoccupied = C.prototype.Dp = function(a, b) { + void 0 === b && (b = null); + return ja(this, !1, null, b).Dp(a.x, a.y, a.width, a.height) + }; + + function ja(a, b, c, d) { + null === a.Ed && (a.Ed = new jm); + if (a.Ed.yp || a.Ed.group !== c || a.Ed.UA !== d) { + if (null === c) { + b = a.Ij ? Kk(a) : a.ad.copy(); + b.ag(100, 100); + a.Ed.initialize(b); + b = z.kg(); + for (var e = a.Lg; e.next();) { + var g = e.value, + h = g.layer; + null !== h && h.visible && !h.Nc && km(a, g, d, b) + } + } else + for (c.W.F() || c.Bf(), b = c.W.copy(), b.ag(20, 20), a.Ed.initialize(b), b = z.kg(), e = c.Hc; e.next();) g = e.value, g instanceof E && km(a, g, d, b); + z.dc(b); + a.Ed.group = c; + a.Ed.UA = d; + a.Ed.yp = !1 + } else b && lm(a.Ed); + return a.Ed + } + + function km(a, b, c, d) { + if (b !== c) + if (b.isVisible() && b.canAvoid()) { + c = b.getAvoidableRect(d); + d = a.Ed.ep; + b = a.Ed.cp; + for (var e = c.x + c.width, g = c.y + c.height, h = c.x; h < e; h += d) { + for (var k = c.y; k < g; k += b) mm(a.Ed, h, k); + mm(a.Ed, h, g) + } + for (k = c.y; k < g; k += b) mm(a.Ed, e, k); + mm(a.Ed, e, g) + } else if (b instanceof F) + for (b = b.Hc; b.next();) e = b.value, e instanceof E && km(a, e, c, d) + } + + function nm(a, b) { + null === a.Ed || a.Ed.yp || null !== b && !b.canAvoid() || (a.Ed.yp = !0) + } + C.prototype.simulatedMouseMove = C.prototype.Px = function(a, b, c) { + if (null !== Hh) { + var d = Hh.h; + c instanceof C || (c = null); + var e = Ih; + c !== e && (null !== e && e !== d && null !== e.hb.me && (Nh(e), Hh.hx = !1, e.hb.me.doSimulatedDragLeave()), Ih = c, null !== c && c !== d && null !== c.hb.me && (Uh(), e = c.hb.me, Qh.contains(e) || Qh.add(e), c.hb.me.doSimulatedDragEnter())); + if (null === c || c === d || !c.FD || c.jb || !c.ap) return !1; + d = c.hb.me; + null !== d && (null !== a ? b = c.lo(a) : null === b && (b = new N), c.Qb.ga = b, c.Qb.El = !1, c.Qb.up = !1, d.doSimulatedDragOver()); + return !0 + } + return !1 + }; + C.prototype.simulatedMouseUp = C.prototype.MF = function(a, b, c, d) { + if (null !== Hh) { + null === d && (d = b); + b = Ih; + var e = Hh.h; + if (d !== b) { + if (null !== b && b !== e && null !== b.hb.me) return Nh(b), Hh.hx = !1, b.hb.me.doSimulatedDragLeave(), !1; + Ih = d; + null !== d && null !== d.hb.me && (Uh(), b = d.hb.me, Qh.contains(b) || Qh.add(b), d.hb.me.doSimulatedDragEnter()) + } + if (null === d) return Hh.doCancel(), !0; + if (d !== this) return null !== a && (c = d.lo(a)), d.Qb.ga = c, d.Qb.El = !1, d.Qb.up = !0, a = d.hb.me, null !== a && a.doSimulatedDrop(), a = Hh, null !== a && (d = a.mayCopy(), a.Mf = d ? "Copy" : + "Move", a.stopTool()), !0 + } + return !1 + }; + z.defineProperty(C, { + MD: "autoScrollRegion" + }, function() { + return this.Su + }, function(a) { + "number" === typeof a ? a = new Db(a) : z.l(a, Db, C, "autoScrollRegion"); + var b = this.Su; + b.N(a) || (this.Su = a = a.V(), this.yc(), this.j("autoScrollRegion", b, a)) + }); + + function fi(a, b) { + a.Ru.assign(b); + om(a, a.Ru).Mc(a.position) ? Nh(a) : pm(a) + } + + function pm(a) { + -1 === a.In && (a.In = z.setTimeout(function() { + if (-1 !== a.In) { + Nh(a); + var b = a.Q.event; + if (null !== b) { + var c = om(a, a.Ru); + c.Mc(a.position) || (a.position = c, a.Q.ga = a.cG(a.Ru), a.Px(b, null, b.target.Z) || a.doMouseMove(), a.Ij = !0, Ok(a, a.rh()), a.ue = !0, a.bg(), pm(a)) + } + } + }, a.tB)) + } + + function Nh(a) { + -1 !== a.In && (z.clearTimeout(a.In), a.In = -1) + } + + function om(a, b) { + var c = a.position, + d = a.MD; + if (0 >= d.top && 0 >= d.left && 0 >= d.right && 0 >= d.bottom) return c; + var e = a.xb, + g = a.scale, + e = z.yk(0, 0, e.width * g, e.height * g), + h = z.Tb(0, 0); + if (b.x >= e.x && b.x < e.x + d.left) { + var k = Math.max(a.nu, 1), + k = k | 0; + h.x -= k; + b.x < e.x + d.left / 2 && (h.x -= k); + b.x < e.x + d.left / 4 && (h.x -= 4 * k) + } else b.x <= e.x + e.width && b.x > e.x + e.width - d.right && (k = Math.max(a.nu, 1), k |= 0, h.x += k, b.x > e.x + e.width - d.right / 2 && (h.x += k), b.x > e.x + e.width - d.right / 4 && (h.x += 4 * k)); + b.y >= e.y && b.y < e.y + d.top ? (k = Math.max(a.ou, 1), k |= 0, h.y -= k, b.y < e.y + + d.top / 2 && (h.y -= k), b.y < e.y + d.top / 4 && (h.y -= 4 * k)) : b.y <= e.y + e.height && b.y > e.y + e.height - d.bottom && (k = Math.max(a.ou, 1), k |= 0, h.y += k, b.y > e.y + e.height - d.bottom / 2 && (h.y += k), b.y > e.y + e.height - d.bottom / 4 && (h.y += 4 * k)); + h.Mc(Id) || (c = new N(c.x + h.x / g, c.y + h.y / g)); + z.dc(e); + z.A(h); + return c + } + C.prototype.makeSVG = C.prototype.makeSvg = function(a) { + void 0 === a && (a = new ma); + a.context = "svg"; + a = qm(this, a); + return null !== a ? a.Vl : null + }; + C.prototype.makeImage = function(a) { + void 0 === a && (a = new ma); + var b = (a.document || document).createElement("img"); + b.src = this.xI(a); + return b + }; + C.prototype.makeImageData = C.prototype.xI = function(a) { + void 0 === a && (a = new ma); + var b = qm(this, a); + return null !== b ? b.toDataURL(a.type, a.details) : "" + }; + var rm = !1; + + function qm(a, b) { + a.Ua.oi(); + a.bg(); + if (null === a.Fb) return null; + "object" !== typeof b && z.k("properties argument must be an Object."); + var c = !1, + d = b.size || null, + e = b.scale || null; + void 0 !== b.scale && isNaN(b.scale) && (e = "NaN"); + var g = b.maxSize; + void 0 === b.maxSize && (c = !0, g = "svg" === b.context ? new Ea(Infinity, Infinity) : new Ea(2E3, 2E3)); + var h = b.position || null, + k = b.parts || null, + l = void 0 === b.padding ? 1 : b.padding, + m = b.background || null, + n = b.omitTemporary; + void 0 === n && (n = !0); + var p = b.document || document, + q = b.elementFinished || null, + r = + b.showTemporary; + void 0 === r && (r = !n); + n = b.showGrid; + void 0 === n && (n = r); + null !== d && isNaN(d.width) && isNaN(d.height) && (d = null); + "number" === typeof l ? l = new Db(l) : l instanceof Db || (l = new Db(0)); + l.left = Math.max(l.left, 0); + l.right = Math.max(l.right, 0); + l.top = Math.max(l.top, 0); + l.bottom = Math.max(l.bottom, 0); + a.bo = !1; + ca(a.gd, !0); + var s = new la(null, p), + t = s.yl, + v = s; + if (!(d || e || k || h)) return s.width = a.Jb + Math.ceil(l.left + l.right), s.height = a.Ob + Math.ceil(l.top + l.bottom), "svg" === b.context && (t = v = new ed(s.Kd, p, q), t instanceof ed && + (a.bo = !0)), sl(a, t, l, new Ea(s.width, s.height), a.bc, a.sb, k, m, r, n), a.bo = !0, v; + var x = a.wb.Rw, + y = new N(0, 0), + A = a.ad.copy(); + A.rJ(a.padding); + if (r) + for (var B = !0, B = a.Yb.o, L = B.length, H = 0; H < L; H++) { + var U = B[H]; + if (U.visible && U.Nc) + for (var ea = U.mb.o, U = ea.length, W = 0; W < U; W++) { + var P = ea[W]; + P.jx && P.isVisible() && (P = P.W, P.F() && A.qi(P)) + } + } + y.x = A.x; + y.y = A.y; + if (null !== k) { + var ba, B = !0, + ea = k.i; + for (ea.reset(); ea.next();) L = ea.value, L instanceof D && (P = L, U = P.layer, null !== U && !U.visible || null !== U && !r && U.Nc || !P.isVisible() || (P = P.W, P.F() && (B ? + (B = !1, ba = P.copy()) : ba.qi(P)))); + B && (ba = new w(0, 0, 0, 0)); + A.width = ba.width; + A.height = ba.height; + y.x = ba.x; + y.y = ba.y + } + null !== h && h.F() && (y = h, e || (e = x)); + B = ea = 0; + null !== l && (ea = l.left + l.right, B = l.top + l.bottom); + H = L = 0; + null !== d && (L = d.width, H = d.height, isFinite(L) && (L = Math.max(0, L - ea)), isFinite(H) && (H = Math.max(0, H - B))); + ba = h = 0; + null !== d && null !== e ? ("NaN" === e && (e = x), d.F() ? (h = L, ba = H) : isNaN(H) ? (h = L, ba = A.height * e) : (h = A.width * e, ba = H)) : null !== d ? d.F() ? (e = Math.min(L / A.width, H / A.height), h = L, ba = H) : isNaN(H) ? (e = L / A.width, h = L, ba = A.height * + e) : (e = H / A.height, h = A.width * e, ba = H) : null !== e ? "NaN" === e && g.F() ? (e = Math.min((g.width - ea) / A.width, (g.height - B) / A.height), e > x ? (e = x, h = A.width, ba = A.height) : (h = g.width, ba = g.height)) : (h = A.width * e, ba = A.height * e) : (e = x, h = A.width, ba = A.height); + null !== l ? (h += ea, ba += B) : l = new Db(0); + null !== g && (d = g.width, g = g.height, "svg" !== b.context && c && !rm && (h > d || ba > g) && (z.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. (" + Math.ceil(h) + "x" + Math.ceil(ba) + " vs 2000x2000) Consider increasing the max size."), + rm = !0), isNaN(d) && (d = 2E3), isNaN(g) && (g = 2E3), isFinite(d) && (h = Math.min(h, d)), isFinite(g) && (ba = Math.min(ba, g))); + s.width = Math.ceil(h); + s.height = Math.ceil(ba); + "svg" === b.context && (t = v = new ed(s.Kd, p, q), t instanceof ed && (a.bo = !0)); + sl(a, t, l, new Ea(Math.ceil(h), Math.ceil(ba)), e, y, k, m, r, n); + a.bo = !0; + return v + } + C.inherit = function(a, b) { + z.g(a, "function", C, "inherit"); + z.g(b, "function", C, "inherit"); + b.CG && z.k("Cannot inherit from " + z.kf(b)); + z.Qa(a, b) + }; + + function Ak() { + this.FG = "63ad05bbe23a1786468a4c741b6d2"; + this.og = this.FG === this._tk ? !0 : null + } + Ak.prototype.Zl = function(a) { + a.gd.setTransform(a.jd, 0, 0, a.jd, 0, 0); + if (null === this.og) a: { + var b = "f", + c = window[z.Fg("76a715b2f73f148a")][z.Fg("72ba13b5")];a = z.Fg; + if (window[a("7da7")] && window[a("7da7")][a("76a115b6ed251eaf4692")]) { + this.og = !0; + var d = window[a("7da7")][a("76a115b6ed251eaf4692")], + d = a(d).split(a("39e9")), + e = a(d[1]).split("."), + g = z[a("6cae19")].split("."); + if (e[0] > g[0] || e[0] === g[0] && e[1] >= g[1]) { + e = c[a("76ad18b4f73e")]; + for (g = c[a("73a612b6fb191d")](a("35e7")) + 2; g < e; g++) b += c[g]; + c = b[a("73a612b6fb191d")](a(d[2])); + 0 > c && a(d[2]) !== a("7da71ca0ad381e90") && (c = b[a("73a612b6fb191d")](a("76a715b2ef3e149757"))); + 0 > c && (c = b[a("73a612b6fb191d")](a("76a715b2ef3e149757"))); + this.og = !(0 <= c && c < b[a("73a612b6fb191d")](a("35"))) + } + } else { + if (a("77bb5bb2f32603de") === window[a("76a715b2f73f148a")][a("6aba19a7ec351488")]) try { + this.og = !window[a("4da118b7ec2108")]([a("5bb806bfea351a904a84515e1b6d38b6")])([a("49bc19a1e6")])([a("59bd04a1e6380fa5539b")])([a("7bb8069ae7")] === a(z.adym)); + if (!1 === this.og) break a; + this.og = !window[a("4da118b7ec2108")]([a("5bb806bfea351a904a84515e1b6d38b6")])([a("49bc19a1e6")])([a("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([a("7bb8069ae7")] === + a(z.adym)); + if (!1 === this.og) break a + } catch (h) {} + e = c[a("76ad18b4f73e")]; + for (g = c[a("73a612b6fb191d")](a("35e7")) + 2; g < e; g++) b += c[g]; + c = b[a("73a612b6fb191d")](a(z.adym)); + 0 > c && a(z.adym) !== a("7da71ca0ad381e90") && (c = b[a("73a612b6fb191d")](a("76a715b2ef3e149757"))); + if (this.og = !(0 <= c && c < b[a("73a612b6fb191d")](a("35")))) b = window.document[a("79ba13b2f7333e8846865a7d00")]("div"), c = a("34af05b5c137188f449950661a6d"), "." === c[0] && (c = c[a("69bd14a0f724128a44")](1)), b[a("79a417a0f0181a8946")] = c, window.document[a("78a712aa")] ? (window.document[a("78a712aa")][a("7bb806b6ed32388c4a875b")](b), + c = window[a("7dad0290ec3b0b91578e5b40007031bf")](b)[a("7dad0283f1390b81519f4645156528bf")](a("78a704b7e62456904c9b12701b6532a8")), window.document[a("78a712aa")][a("68ad1bbcf533388c4a875b")](b), c && -1 !== c.indexOf(a(z.bH)) && -1 !== c.indexOf(a(z.cH)) && (this.og = !1)) : (this.og = null, this.og = !1) + } + } + return 0 < this.og && this !== this.DG ? !0 : !1 + }; + Ak.prototype.t = function() { + this.DG = null + }; + + function Bk(a, b) { + void 0 !== b && null !== b || z.k("Diagram setup requires an argument DIV."); + null !== a.Pb && z.k("Diagram has already completed setup."); + "string" === typeof b ? a.Pb = window.document.getElementById(b) : b instanceof HTMLDivElement ? a.Pb = b : z.k("No DIV or DIV id supplied: " + b); + null === a.Pb && z.k("Invalid DIV id; could not get element with id: " + b); + void 0 !== a.Pb.Z && z.k("Invalid div id; div already has a Diagram associated with it."); + "static" === window.getComputedStyle(a.Pb, null).position && (a.Pb.style.position = + "relative"); + a.Pb.style["-webkit-tap-highlight-color"] = "rgba(255, 255, 255, 0)"; + a.Pb.style["-ms-touch-action"] = "none"; + a.Pb.innerHTML = ""; + a.Pb.Z = a; + var c = new la(a); + c.Kd.innerHTML = "This text is displayed if your browser does not support the Canvas HTML element."; + void 0 !== c.style && (c.style.position = "absolute", c.style.top = "0px", c.style.left = "0px", "rtl" === window.getComputedStyle(a.Pb, null).getPropertyValue("direction") && (a.mr = !0), c.style.zIndex = "2", c.style.DL = "none", c.style.webkitUserSelect = "none", c.style.MozUserSelect = + "none"); + a.Jb = a.Pb.clientWidth || 1; + a.Ob = a.Pb.clientHeight || 1; + a.Fb = c; + a.gd = c.yl; + var d = a.gd; + a.vG = (window.devicePixelRatio || 1) / (d.webkitBackingStorePixelRatio || d.mozBackingStorePixelRatio || d.msBackingStorePixelRatio || d.oBackingStorePixelRatio || d.backingStorePixelRatio || 1); + a.jd = a.computePixelRatio(); + ul(a, a.Jb, a.Ob); + a.Dy = d[z.Fg("7eba17a4ca3b1a8346")][z.Fg("78a118b7")](d, z.Zl, 4, 4); + a.Pb.insertBefore(c.Kd, a.Pb.firstChild); + c = new la(null); + c.width = 1; + c.height = 1; + a.Cy = c; + a.aC = c.yl; + var c = z.createElement("div"), + e = z.createElement("div"); + c.style.position = "absolute"; + c.style.overflow = "auto"; + c.style.width = a.Jb + "px"; + c.style.height = a.Ob + "px"; + c.style.zIndex = "1"; + e.style.position = "absolute"; + e.style.width = "1px"; + e.style.height = "1px"; + a.Pb.appendChild(c); + c.appendChild(e); + c.onscroll = a.xG; + c.onmousedown = a.JC; + c.ontouchstart = a.JC; + c.Z = a; + c.AG = !0; + c.BG = !0; + a.kw = c; + a.xs = e; + a.HA = z.aE(function() { + a.ck = null; + a.ta() + }, 300, !1); + a.hG = z.aE(function() { + Tj(a) + }, 250, !1); + a.preventDefault = function(a) { + a.preventDefault(); + return !1 + }; + a.Kp = function(b) { + if (a.isEnabled) { + a.km = !0; + var c = + a.Zc; + z.jn && c.lj ? (b.preventDefault(), b.simulated = !0, a.Ks = b) : (a.Zc = a.Qb, a.Qb = c, Rk(a, a, b, c, !0), a.Px(b, null, b.target.Z) || (a.doMouseMove(), a.eb.isBeyondDragSize() && (a.bl = 0), ha(a, c, b))) + } + }; + a.Jp = function(b) { + if (a.isEnabled) { + a.km = !0; + var c = a.Zc; + if (z.jn && null !== a.Ks) a.Ks = b, b.preventDefault(); + else if (z.jn && 400 > b.timeStamp - a.pm) b.preventDefault(); + else if (a.Zk) b.preventDefault(); + else { + a.Zc = a.Qb; + a.Qb = c; + Rk(a, a, b, c, !0); + c.El = !0; + c.Pe = b.detail; + if (z.NE || z.OE) b.timeStamp - a.pm < a.tD && !a.eb.isBeyondDragSize() ? a.bl++ : a.bl = 1, + a.pm = b.timeStamp, c.Pe = a.bl; + a.Ei = c; + !0 === c.Yq.simulated ? (b.preventDefault(), b.simulated = !0) : (u && u.fF && (window.fF = a.mp(c.ga)), Hh = null, a.doMouseDown(), a.Ei = a.Ei.copy(), 1 === b.button ? b.preventDefault() : ha(a, c, b)) + } + } + }; + a.Mp = function(b) { + if (a.isEnabled) + if (a.Zk && 2 === b.button) b.preventDefault(); + else if (a.Zk && 0 === b.button && (a.Zk = !1), a.Ss) b.preventDefault(); + else { + a.km = !0; + var c = a.Zc; + if (z.jn) { + if (400 > b.timeStamp - a.pm) { + b.preventDefault(); + return + } + a.pm = b.timeStamp + } + if (z.jn && null !== a.Ks) a.Ks = null, b.preventDefault(); + else { + a.Zc = + a.Qb; + a.Qb = c; + Rk(a, a, b, c, !0); + c.up = !0; + c.Pe = b.detail; + if (z.NE || z.OE) c.Pe = a.bl; + c.bubbles = b.bubbles; + b.target.Z && (c.Sg = b.target.Z); + a.MF(b, null, new N, c.Sg) || (a.doMouseUp(), Nh(a), ha(a, c, b)) + } + } + }; + a.zh = function(b) { + if (a.isEnabled) { + var c = a.Zc; + a.Zc = a.Qb; + a.Qb = c; + Rk(a, a, b, c, !0); + c.bubbles = !0; + c.Cl = void 0 !== b.wheelDelta ? b.wheelDelta : -40 * b.detail; + a.doMouseWheel(); + ha(a, c, b) + } + }; + a.Lp = function() { + if (a.isEnabled) { + a.km = !1; + var b = a.eb; + b.cancelWaitAfter(); + b instanceof dh && b.hideToolTip() + } + }; + a.ZF = function(b) { + if (a.isEnabled) { + a.Ss = !1; + a.Zk = !0; + var c = a.Zc; + a.Zc = a.Qb; + a.Qb = c; + Tk(a, b, b.targetTouches[0], c, 1 < b.touches.length); + a.doMouseDown(); + ha(a, c, b) + } + }; + a.YF = function(b) { + if (a.isEnabled) { + var c = a.Zc; + a.Zc = a.Qb; + a.Qb = c; + var d = null; + 0 < b.changedTouches.length ? d = b.changedTouches[0] : 0 < b.targetTouches.length && (d = b.targetTouches[0]); + Uk(a, b, d, c, 1 < b.touches.length); + a.Px(d ? d : b, null, c.Sg) || a.doMouseMove(); + ha(a, c, b) + } + }; + a.XF = function(b) { + if (a.isEnabled) + if (a.Ss) b.preventDefault(); + else { + var c = a.Zc; + a.Zc = a.Qb; + a.Qb = c; + if (1 < b.touches.length) a.sp("hasGestureZoom") && + (a.Ly = !1); + else { + var d = null, + e = null; + 0 < b.changedTouches.length ? e = b.changedTouches[0] : 0 < b.targetTouches.length && (e = b.targetTouches[0]); + c.h = a; + c.Pe = 1; + if (null !== e) { + d = window.document.elementFromPoint(e.clientX, e.clientY); + null !== d && d.Z instanceof C && d.Z !== a && Sk(d.Z, e, c); + Sk(a, b.changedTouches[0], c); + var m = e.screenX, + n = e.screenY, + p = a.zC; + b.timeStamp - a.pm < a.tD && !(25 < Math.abs(p.x - m) || 25 < Math.abs(p.y - n)) ? a.bl++ : a.bl = 1; + c.Pe = a.bl; + a.pm = b.timeStamp; + a.zC.n(m, n) + } + c.xd = 0; + c.button = 0; + c.buttons = 1; + c.El = !1; + c.up = !0; + c.Cl = 0; + c.Gc = !1; + c.bubbles = !1; + c.event = b; + c.timestamp = Date.now(); + c.Sg = null === d ? b.target.Z : d.Z ? d.Z : null; + c.Ge = null; + a.MF(e ? e : b, null, new N, c.Sg) || a.doMouseUp(); + ha(a, c, b); + a.Zk = !1 + } + } + }; + a.QI = function(b) { + if ("touch" === b.pointerType) { + var c = a.TC; + void 0 === c[b.pointerId] && (a.aw++, c[b.pointerId] = b); + a.Uf[0] = null; + a.Uf[1] = null; + for (var d in c) + if (null === a.Uf[0]) a.Uf[0] = c[d]; + else if (null === a.Uf[1]) { + a.Uf[1] = c[d]; + break + } + a.isEnabled && (a.Ss = !1, a.Zk = !0, c = a.Zc, a.Zc = a.Qb, a.Qb = c, Tk(a, b, b, c, 1 < a.aw), a.doMouseDown(), ha(a, c, b)) + } + }; + a.SI = function(b) { + if ("touch" === + b.pointerType && !(2 > a.aw)) { + var c = a.Uf; + c[0].pointerId === b.pointerId && (c[0] = b); + c[1].pointerId === b.pointerId && (c[1] = b); + a.isEnabled && (c = a.Zc, a.Zc = a.Qb, a.Qb = c, Uk(a, b, b, c, !0), a.Px(b, null, c.Sg) || (a.doMouseMove(), ha(a, c, b))) + } + }; + a.RI = function(b) { + if ("touch" === b.pointerType) { + var c = a.TC; + void 0 !== c[b.pointerId] && (a.aw--, delete c[b.pointerId], c = a.Uf, null !== c[0] && c[0].pointerId === b.pointerId && (c[0] = null), null !== c[1] && c[1].pointerId === b.pointerId && (c[1] = null)) + } + }; + ca(d, !0); + Ek(a) + } + + function sm(a) { + 1 < arguments.length && z.k("Palette constructor can only take one optional argument, the DIV HTML element or its id."); + C.call(this, a); + this.kt = !0; + this.ul = !1; + this.jb = !0; + this.XD = $b; + this.Sb = new tm + } + z.Qa(sm, C); + z.ia("Palette", sm); + + function xk(a) { + 1 < arguments.length && z.k("Overview constructor can only take one optional argument, the DIV HTML element or its id."); + C.call(this, a); + this.Ua.isEnabled = !1; + this.Vc = !0; + this.Wj = null; + this.kv = !0; + this.kJ("drawShadows", !1); + var b = new D, + c = new X; + c.stroke = "magenta"; + c.ub = 2; + c.fill = "transparent"; + c.name = "BOXSHAPE"; + b.vk = !0; + b.Ix = "BOXSHAPE"; + b.sx = "BOXSHAPE"; + b.wF = "BOXSHAPE"; + b.cursor = "move"; + b.add(c); + this.em = b; + c = new da; + c.type = Yi; + c.of = ec; + var d = new Zi; + d.Ff = !0; + c.add(d); + d = new X; + d.jk = ec; + d.Hb = "Rectangle"; + d.Aa = new Ea(64, + 64); + d.cursor = "se-resize"; + d.alignment = ic; + c.add(d); + b.uF = c; + this.Sm = this.kk = !1; + this.xf = this.mt = !0; + this.MD = 0; + this.oz = new la(null); + this.EG = this.oz.yl; + this.hb.me = new um; + this.hb.xF = new vm; + var e = this; + this.click = function() { + var a = e.Wj; + if (null !== a) { + var b = a.xb, + c = e.Q.ga; + a.position = new N(c.x - b.width / 2, c.y - b.height / 2) + } + }; + this.hF = function() { + wm(e) + }; + this.gF = function() { + null !== e.Wj && (e.yc(), e.ta()) + }; + this.wl = Pk; + this.Vc = !1 + } + z.Qa(xk, C); + z.ia("Overview", xk); + + function xm(a) { + a.Vc || a.Vd || !1 !== a.Vf || (a.Vf = !0, requestAnimationFrame(function() { + if (a.Vf && !a.Vd && (a.Vf = !1, null !== a.Pb)) { + a.Vd = !0; + Jk(a); + a.ad.F() || Ok(a, a.rh()); + null === a.Pb && z.k("No div specified"); + null === a.Fb && z.k("No canvas specified"); + if (a.ue) { + var b = a.Wj; + if (null !== b && !b.Ua.nf && !b.Ua.wc) { + var b = a.gd, + c = a.oz; + b.setTransform(1, 0, 0, 1, 0, 0); + b.clearRect(0, 0, a.Fb.width, a.Fb.height); + b.drawImage(c.Kd, 0, 0); + c = a.Hd; + c.reset(); + 1 !== a.scale && c.scale(a.scale); + 0 === a.position.x && 0 === a.position.y || c.translate(-a.position.x, -a.position.y); + b.scale(a.jd, a.jd); + b.transform(c.m11, c.m12, c.m21, c.m22, c.dx, c.dy); + for (var c = a.Yb.o, d = c.length, e = 0; e < d; e++) c[e].ff(b, a); + a.Yk = !1; + a.ue = !1 + } + } + a.Vd = !1 + } + })) + } + xk.prototype.computePixelRatio = function() { + return 1 + }; + xk.prototype.ff = function() { + null === this.Pb && z.k("No div specified"); + null === this.Fb && z.k("No canvas specified"); + if (this.ue) { + var a = this.Wj; + if (null !== a && !a.Ua.nf) { + pl(this); + var b = a.Gt; + (null !== b && b.visible && isNaN(b.width) || isNaN(b.height)) && hl(a); + var c = this.Fb, + b = this.gd, + d = this.oz, + e = this.EG; + d.width = c.width; + d.height = c.height; + ca(b, !0); + b.setTransform(1, 0, 0, 1, 0, 0); + b.clearRect(0, 0, c.width, c.height); + var g = this.Hd; + g.reset(); + 1 !== this.scale && g.scale(this.scale); + 0 === this.position.x && 0 === this.position.y || g.translate(-this.position.x, -this.position.y); + b.scale(this.jd, this.jd); + b.transform(g.m11, g.m12, g.m21, g.m22, g.dx, g.dy); + for (var h = this.kv, k = this.xb, l = a.Yb.o, m = l.length, a = 0; a < m; a++) { + var n = l[a], + p = b, + q = k, + r = h; + if (n.visible && 0 !== n.Xc && (void 0 === r && (r = !0), r || !n.Nc)) { + 1 !== n.Xc && (p.globalAlpha = n.Xc); + for (var r = this.scale, n = n.mb.o, s = n.length, t = 0; t < s; t++) { + var v = n[t], + x = v.W; + x.Ig(q) && (1 < x.width * r || 1 < x.height * r ? v.ff(p, this) : jk(v, p)) + } + p.globalAlpha = 1 + } + } + e.drawImage(c.Kd, 0, 0); + u && u.bj && (e.fillStyle = "red", e.fillRect(0, d.height / 2, d.width, 4)); + c = this.Yb.o; + d = c.length; + for (a = 0; a < d; a++) c[a].ff(b, this); + u && (u.Rz || u.bj) && u.Qz(b, this, g); + this.ue = this.Yk = !1 + } + } + }; + z.defineProperty(xk, { + BA: "observed" + }, function() { + return this.Wj + }, function(a) { + var b = this.Wj; + null !== a && z.l(a, C, xk, "observed"); + a instanceof xk && z.k("Overview.observed Diagram may not be an Overview itself: " + a); + b !== a && (null !== b && (this.remove(this.qh), b.mF("ViewportBoundsChanged", this.hF), b.mF("DocumentBoundsChanged", this.gF), b.Xv.remove(this)), this.Wj = a, null !== a && (a.yz("ViewportBoundsChanged", this.hF), a.yz("DocumentBoundsChanged", this.gF), a.Xv.add(this), this.add(this.qh), wm(this)), this.yc(), this.j("observed", + b, a)) + }); + z.defineProperty(xk, { + qh: "box" + }, function() { + return this.em + }, function(a) { + var b = this.em; + b !== a && (this.em = a, this.remove(b), this.add(this.em), wm(this), this.j("box", b, a)) + }); + z.defineProperty(xk, { + yK: "drawsTemporaryLayers" + }, function() { + return this.kv + }, function(a) { + this.kv !== a && (this.kv = a, this.Sp()) + }); + + function wm(a) { + var b = a.qh; + if (null !== b) { + var c = a.Wj; + if (null !== c) { + a.ue = !0; + var c = c.xb, + d = b.vn, + e = z.Xl(); + e.n(c.width, c.height); + d.Aa = e; + z.pk(e); + a = 2 / a.scale; + d instanceof X && (d.ub = a); + b.location = new N(c.x - a / 2, c.y - a / 2) + } + } + } + xk.prototype.rh = function() { + var a = this.Wj; + return null === a ? Jd : a.ad + }; + xk.prototype.HE = function() { + !0 !== this.ue && (this.ue = !0, xm(this)) + }; + xk.prototype.fu = function(a) { + this.Vc || (Ik(this), this.ta(), Vk(this), this.yc(), wm(this), this.Ja("ViewportBoundsChanged", null, a)) + }; + + function um() { + ih.call(this); + this.jl = null + } + z.Qa(um, ih); + um.prototype.canStart = function() { + if (!this.isEnabled) return !1; + var a = this.h; + if (null === a || !a.ul || !a.xf) return !1; + var b = a.BA; + if (null === b) return !1; + if (null === this.findDraggablePart()) { + var c = b.xb; + this.jl = new N(c.width / 2, c.height / 2); + a = a.Fc.ga; + b.position = new N(a.x - this.jl.x, a.y - this.jl.y) + } + return !0 + }; + um.prototype.doActivate = function() { + this.jl = null; + ih.prototype.doActivate.call(this) + }; + um.prototype.moveParts = function() { + var a = this.h, + b = a.BA; + if (null !== b) { + var c = a.qh; + if (null !== c) { + if (null === this.jl) { + var d = a.Fc.ga, + c = c.location; + this.jl = new N(d.x - c.x, d.y - c.y) + } + a = a.Q.ga; + b.position = new N(a.x - this.jl.x, a.y - this.jl.y) + } + } + }; + + function vm() { + Wi.call(this) + } + z.Qa(vm, Wi); + vm.prototype.resize = function(a) { + var b = this.h.BA; + if (null !== b) { + var c = b.xb.copy(); + b.position = a.position; + (c.width !== a.width || c.height !== a.height) && 0 < a.width && 0 < a.height && (b.scale = Math.min(c.width / a.width, c.height / a.height)) + } + }; + + function Da(a) { + 1 < arguments.length && z.k("Brush constructor can take at most one optional argument, the Brush type."); + z.kc(this); + this.G = !1; + void 0 === a ? (this.ba = rg, this.Mn = "black") : "string" === typeof a ? (this.ba = rg, u && !Ca(a) && z.k('Color "' + a + '" is not a valid color string for Brush constructor'), this.Mn = a) : (u && z.Ba(a, Da, Da, "constructor:type"), this.ba = a, this.Mn = "black"); + var b = this.ba; + b === sg ? (this.Po = $b, this.eo = hc) : this.eo = b === yd ? this.Po = ec : this.Po = Yb; + this.rw = 0; + this.lv = NaN; + this.ah = this.$v = this.$g = null; + this.ty = + this.On = 0 + } + z.ia("Brush", Da); + var rg; + Da.Solid = rg = z.s(Da, "Solid", 0); + var sg; + Da.Linear = sg = z.s(Da, "Linear", 1); + var yd; + Da.Radial = yd = z.s(Da, "Radial", 2); + var ym; + Da.Pattern = ym = z.s(Da, "Pattern", 4); + Da.prototype.copy = function() { + var a = new Da; + a.ba = this.ba; + a.Mn = this.Mn; + a.Po = this.Po.V(); + a.eo = this.eo.V(); + a.rw = this.rw; + a.lv = this.lv; + null !== this.$g && (a.$g = this.$g.copy()); + a.$v = this.$v; + return a + }; + Da.prototype.La = function() { + this.freeze(); + Object.freeze(this); + return this + }; + Da.prototype.freeze = function() { + this.G = !0; + null !== this.$g && this.$g.freeze(); + return this + }; + Da.prototype.Wa = function() { + Object.isFrozen(this) && z.k("cannot thaw constant: " + this); + this.G = !1; + null !== this.$g && this.$g.Wa(); + return this + }; + Da.prototype.toString = function() { + var a = "Brush("; + if (this.type === rg) a += this.color; + else if (a = this.type === sg ? a + "Linear " : this.type === yd ? a + "Radial " : this.type === ym ? a + "Pattern " : a + "(unknown) ", a += this.start + " " + this.end, null !== this.st) + for (var b = this.st.i; b.next();) a += " " + b.key + ":" + b.value; + return a + ")" + }; + Da.prototype.addColorStop = Da.prototype.addColorStop = function(a, b) { + this.G && z.oa(this); + ("number" !== typeof a || !isFinite(a) || 1 < a || 0 > a) && z.ka(a, "0 <= loc <= 1", Da, "addColorStop:loc"); + z.g(b, "string", Da, "addColorStop:color"); + u && !Ca(b) && z.k('Color "' + b + '" is not a valid color string for Brush.addColorStop'); + null === this.$g && (this.$g = new na("number", "string")); + this.$g.add(a, b); + this.ba === rg && (this.type = sg); + this.ah = null + }; + z.defineProperty(Da, { + type: "type" + }, function() { + return this.ba + }, function(a) { + this.G && z.oa(this, a); + z.Ba(a, Da, Da, "type"); + this.ba = a; + this.start.Be() && (a === sg ? this.start = $b : a === yd && (this.start = ec)); + this.end.Be() && (a === sg ? this.end = hc : a === yd && (this.end = ec)); + this.ah = null + }); + z.defineProperty(Da, { + color: "color" + }, function() { + return this.Mn + }, function(a) { + this.G && z.oa(this, a); + u && !Ca(a) && z.k('Color "' + a + '" is not a valid color string for Brush.color'); + this.Mn = a; + this.ah = null + }); + z.defineProperty(Da, { + start: "start" + }, function() { + return this.Po + }, function(a) { + this.G && z.oa(this, a); + z.l(a, Q, Da, "start"); + this.Po = a.V(); + this.ah = null + }); + z.defineProperty(Da, { + end: "end" + }, function() { + return this.eo + }, function(a) { + this.G && z.oa(this, a); + z.l(a, Q, Da, "end"); + this.eo = a.V(); + this.ah = null + }); + z.defineProperty(Da, { + wu: "startRadius" + }, function() { + return this.rw + }, function(a) { + this.G && z.oa(this, a); + z.p(a, Da, "startRadius"); + 0 > a && z.ka(a, ">= zero", Da, "startRadius"); + this.rw = a; + this.ah = null + }); + z.defineProperty(Da, { + xt: "endRadius" + }, function() { + return this.lv + }, function(a) { + this.G && z.oa(this, a); + z.p(a, Da, "endRadius"); + 0 > a && z.ka(a, ">= zero", Da, "endRadius"); + this.lv = a; + this.ah = null + }); + z.defineProperty(Da, { + st: "colorStops" + }, function() { + return this.$g + }, function(a) { + this.G && z.oa(this, a); + u && z.l(a, na, Da, "colorStops"); + this.$g = a; + this.ah = null + }); + z.defineProperty(Da, { + pattern: "pattern" + }, function() { + return this.$v + }, function(a) { + this.G && z.oa(this, a); + this.$v = a; + this.ah = null + }); + Da.randomColor = function(a, b) { + void 0 === a && (a = 128); + u && (z.p(a, Da, "randomColor:min"), (0 > a || 255 < a) && z.ka(a, "0 <= min <= 255", Da, "randomColor:min")); + void 0 === b && (b = Math.max(a, 255)); + u && (z.p(b, Da, "randomColor:max"), (b < a || 255 < b) && z.ka(b, "min <= max <= 255", Da, "randomColor:max")); + var c = Math.abs(b - a), + d = Math.floor(a + Math.random() * c).toString(16), + e = Math.floor(a + Math.random() * c).toString(16), + c = Math.floor(a + Math.random() * c).toString(16); + 2 > d.length && (d = "0" + d); + 2 > e.length && (e = "0" + e); + 2 > c.length && (c = "0" + c); + return "#" + + d + e + c + }; + var zm = (new la(null)).yl, + Ca; + Da.isValidColor = Ca = function(a) { + if ("black" === a) return !0; + if ("" === a) return !1; + u && z.g(a, "string", Da, "isValidColor"); + zm.fillStyle = "#000000"; + var b = zm.fillStyle; + zm.fillStyle = a; + if (zm.fillStyle !== b) return !0; + zm.fillStyle = "#FFFFFF"; + b = zm.fillStyle; + zm.fillStyle = a; + return zm.fillStyle !== b + }; + + function O() { + z.kc(this); + this.ja = 30723; + this.Xc = 1; + this.lh = null; + this.Ub = ""; + this.uc = this.Nb = null; + this.sb = (new N(NaN, NaN)).freeze(); + this.tf = fe; + this.Tj = Pd; + this.Rj = de; + this.Hd = new Fa; + this.zk = new Fa; + this.fl = new Fa; + this.bc = this.iv = 1; + this.bm = 0; + this.di = Am; + this.Er = Kd; + this.ud = (new w(NaN, NaN, NaN, NaN)).freeze(); + this.Xb = (new w(NaN, NaN, NaN, NaN)).freeze(); + this.Wc = (new w(0, 0, NaN, NaN)).freeze(); + this.Vs = this.Zq = this.la = this.fs = this.gs = null; + this.Ws = this.$q = Infinity; + this.oq = this.Ie = Pc; + this.us = 0; + this.Ti = 1; + this.wq = 0; + this.wi = + 1; + this.Os = null; + this.zs = -Infinity; + this.ys = 0; + this.As = Id; + this.Bs = Ni; + this.Hq = ""; + this.Ac = this.ma = null; + this.Jn = -1; + this.Bm = this.Js = this.vi = this.Pk = this.Oo = null + } + z.ii(O); + z.ia("GraphObject", O); + O.prototype.cloneProtected = function(a) { + a.ja = this.ja | 6144; + a.Xc = this.Xc; + a.Ub = this.Ub; + a.Nb = this.Nb; + a.uc = this.uc; + a.sb.assign(this.sb); + a.tf = this.tf.V(); + a.Tj = this.Tj.V(); + a.Rj = this.Rj.V(); + a.fl = this.fl.copy(); + a.bc = this.bc; + a.bm = this.bm; + a.di = this.di; + a.Er = this.Er.V(); + a.ud.assign(this.ud); + a.Xb.assign(this.Xb); + a.Wc.assign(this.Wc); + a.fs = this.fs; + null !== this.la && (a.la = this.la.copy()); + a.Zq = this.Zq; + a.Vs = this.Vs; + a.$q = this.$q; + a.Ws = this.Ws; + a.Ie = this.Ie.V(); + a.oq = this.oq.V(); + a.us = this.us; + a.Ti = this.Ti; + a.wq = this.wq; + a.wi = + this.wi; + a.Os = this.Os; + a.zs = this.zs; + a.ys = this.ys; + a.As = this.As.V(); + a.Bs = this.Bs; + a.Hq = this.Hq; + null !== this.ma && (a.ma = this.ma.copy()); + a.Ac = this.Ac; + a.Jn = this.Jn; + null !== this.Pk && (a.Pk = z.zl(this.Pk)); + null !== this.vi && (a.vi = this.vi.copy()); + a.Js = this.Js + }; + O.prototype.addCopyProperty = O.prototype.NG = function(a) { + var b = this.Pk; + if (z.isArray(b)) + for (var c = 0; c < b.length; c++) { + if (b[c] === a) return + } else this.Pk = b = []; + b.push(a) + }; + O.prototype.ji = function(a) { + a.gs = null; + a.Bm = null; + a.S() + }; + O.prototype.clone = function() { + var a = new this.constructor; + this.cloneProtected(a); + if (null !== this.Pk) + for (var b = 0; b < this.Pk.length; b++) { + var c = this.Pk[b]; + a[c] = this[c] + } + return a + }; + O.prototype.copy = function() { + return this.clone() + }; + O.prototype.toString = function() { + return z.kf(Object.getPrototypeOf(this)) + "#" + z.nd(this) + }; + var $i; + O.None = $i = z.s(O, "None", 0); + var Am; + O.Default = Am = z.s(O, "Default", 0); + var Bm; + O.Vertical = Bm = z.s(O, "Vertical", 4); + var Cm; + O.Horizontal = Cm = z.s(O, "Horizontal", 5); + var lf; + O.Fill = lf = z.s(O, "Fill", 3); + var bj; + O.Uniform = bj = z.s(O, "Uniform", 1); + var cj; + O.UniformToFill = cj = z.s(O, "UniformToFill", 2); + + function Dm(a) { + null === a.ma && (a.ma = new Em) + } + O.prototype.Ue = function() { + if (null === this.la) { + var a = new Fm; + a.Gj = Yb; + a.gk = Yb; + a.Ej = 10; + a.ek = 10; + a.Dj = Gm; + a.dk = Gm; + a.Fj = 0; + a.fk = 0; + this.la = a + } + }; + + function Hm(a, b, c, d, e, g, h) { + var k = .001, + l = g.length; + a.moveTo(b, c); + d -= b; + k = e - c; + 0 === d && (d = .001); + e = k / d; + for (var m = Math.sqrt(d * d + k * k), n = 0, p = !0, q = 0 === h ? !1 : !0; .1 <= m;) { + if (q) { + k = g[n++ % l]; + for (k -= h; 0 > k;) k += g[n++ % l], p = !p; + q = !1 + } else k = g[n++ % l]; + k > m && (k = m); + var r = Math.sqrt(k * k / (1 + e * e)); + 0 > d && (r = -r); + b += r; + c += e * r; + p ? a.lineTo(b, c) : a.moveTo(b, c); + m -= k; + p = !p + } + } + O.prototype.raiseChangedEvent = O.prototype.Rc = function(a, b, c, d, e, g, h) { + var k = this.ca; + null !== k && (k.tn(a, b, c, d, e, g, h), 0 !== (this.ja & 1024) && c === this && a === Sf && Im(this, k, b)) + }; + + function Im(a, b, c) { + var d = a.op(); + if (null !== d) + for (var e = a.Ac.i; e.next();) { + var g = e.value, + h = null; + if (null !== g.yn) { + h = $g(g, d, a); + if (null === h) continue; + g.Rx(a, h, c, null) + } else if (g.St) { + var k = b.h; + null === k || k.Ee || g.Rx(a, k.ha.tk, c, k) + } else { + var l = d.data; + if (null === l) continue; + k = b.h; + null === k || k.Ee || g.Rx(a, l, c, k) + } + null !== h && (k = d.Xw(g.Wl), null !== k && g.fG(k, h, c)) + } + } + O.prototype.Xw = function(a) { + return this.Jn === a ? this : null + }; + O.prototype.raiseChanged = O.prototype.j = function(a, b, c) { + this.Rc(Sf, a, this, b, c) + }; + + function Jm(a, b, c, d, e) { + var g = a.ud, + h = a.fl; + h.reset(); + Km(a, h, b, c, d, e); + a.fl = h; + g.x = b; + g.y = c; + g.width = d; + g.height = e; + h.Pt() || h.bG(g) + } + + function Lm(a, b, c, d) { + if (!1 === a.ig) return !1; + d.multiply(a.transform); + return c ? a.Ig(b, d) : a.Ym(b, d) + } + O.prototype.sE = function(a, b, c) { + if (!1 === this.ig) return !1; + var d = this.Ga; + b = a.Af(b); + var e = !1; + c && (e = vb(a.x, a.y, 0, 0, 0, d.height) < b || vb(a.x, a.y, 0, d.height, d.width, d.height) < b || vb(a.x, a.y, d.width, d.height, d.width, 0) < b || vb(a.x, a.y, d.width, 0, 0, 0) < b); + c || (e = vb(a.x, a.y, 0, 0, 0, d.height) < b && vb(a.x, a.y, 0, d.height, d.width, d.height) < b && vb(a.x, a.y, d.width, d.height, d.width, 0) < b && vb(a.x, a.y, d.width, 0, 0, 0) < b); + return e + }; + O.prototype.Vg = function() { + return !0 + }; + O.prototype.containsPoint = O.prototype.Ma = function(a) { + u && z.l(a, N, O, "containsPoint:p"); + var b = z.O(); + b.assign(a); + this.transform.Cb(b); + var c = this.W; + if (!c.F()) return z.A(b), !1; + var d = this.h; + if (null !== d && d.Zk) { + var e = d.sp("extraTouchThreshold"), + g = d.sp("extraTouchArea"), + h = g / 2, + k = this.Ga, + d = this.gj() * d.scale, + l = 1 / d; + if (k.width * d < e && k.height * d < e) return a = Jb(c.x - h * l, c.y - h * l, c.width + g * l, c.height + g * l, b.x, b.y), z.A(b), a + } + if (this instanceof da || this instanceof X ? Jb(c.x - 5, c.y - 5, c.width + 10, c.height + 10, b.x, b.y) : c.Ma(b)) return e = !1, e = this.vi && !this.vi.Ma(b) ? !1 : null !== this.uc && c.Ma(b) ? !0 : null !== this.Nb && this.Wc.Ma(a) ? !0 : this.lk(a), z.A(b), e; + z.A(b); + return !1 + }; + O.prototype.lk = function(a) { + var b = this.Ga; + return Jb(0, 0, b.width, b.height, a.x, a.y) + }; + O.prototype.containsRect = O.prototype.mk = function(a) { + u && z.l(a, w, O, "containsRect:r"); + if (0 === this.angle) return this.W.mk(a); + var b = this.Ga, + b = z.yk(0, 0, b.width, b.height), + c = this.transform, + d = !1, + e = z.Tb(a.x, a.y); + b.Ma(c.ki(e)) && (e.n(a.x, a.bottom), b.Ma(c.ki(e)) && (e.n(a.right, a.bottom), b.Ma(c.ki(e)) && (e.n(a.right, a.y), b.Ma(c.ki(e)) && (d = !0)))); + z.A(e); + z.dc(b); + return d + }; + O.prototype.containedInRect = O.prototype.Ym = function(a, b) { + u && z.l(a, w, O, "containedInRect:r"); + if (void 0 === b) return a.mk(this.W); + var c = this.Ga, + d = !1, + e = z.Tb(0, 0); + a.Ma(b.Cb(e)) && (e.n(0, c.height), a.Ma(b.Cb(e)) && (e.n(c.width, c.height), a.Ma(b.Cb(e)) && (e.n(c.width, 0), a.Ma(b.Cb(e)) && (d = !0)))); + z.A(e); + return d + }; + O.prototype.intersectsRect = O.prototype.Ig = function(a, b) { + u && z.l(a, w, O, "intersectsRect:r"); + if (void 0 === b && (b = this.transform, 0 === this.angle)) return a.Ig(this.W); + var c = this.Ga, + d = b, + e = z.Tb(0, 0), + g = z.Tb(0, c.height), + h = z.Tb(c.width, c.height), + k = z.Tb(c.width, 0), + l = !1; + if (a.Ma(d.Cb(e)) || a.Ma(d.Cb(g)) || a.Ma(d.Cb(h)) || a.Ma(d.Cb(k))) l = !0; + else { + var c = z.yk(0, 0, c.width, c.height), + m = z.Tb(a.x, a.y); + c.Ma(d.ki(m)) ? l = !0 : (m.n(a.x, a.bottom), c.Ma(d.ki(m)) ? l = !0 : (m.n(a.right, a.bottom), c.Ma(d.ki(m)) ? l = !0 : (m.n(a.right, a.y), c.Ma(d.ki(m)) && + (l = !0)))); + z.A(m); + z.dc(c); + !l && (Pe(a, e, g) || Pe(a, g, h) || Pe(a, h, k) || Pe(a, k, e)) && (l = !0) + } + z.A(e); + z.A(g); + z.A(h); + z.A(k); + return l + }; + O.prototype.getDocumentPoint = O.prototype.fb = function(a, b) { + void 0 === b && (b = new N); + a.Be() && z.k("getDocumentPoint:s Spot must be specific: " + a.toString()); + var c = this.Ga; + b.n(a.x * c.width + a.offsetX, a.y * c.height + a.offsetY); + this.ph.Cb(b); + return b + }; + O.prototype.getDocumentAngle = O.prototype.Kl = function() { + var a; + a = this.ph; + 1 === a.m11 && 0 === a.m12 ? a = 0 : (a = 180 * Math.atan2(a.m12, a.m11) / Math.PI, 0 > a && (a += 360)); + return a + }; + O.prototype.getDocumentScale = O.prototype.gj = function() { + if (0 !== (this.ja & 4096) === !1) return this.iv; + var a = this.bc; + return null !== this.U ? a * this.U.gj() : a + }; + O.prototype.getLocalPoint = O.prototype.xE = function(a, b) { + void 0 === b && (b = new N); + b.assign(a); + this.ph.ki(b); + return b + }; + O.prototype.getNearestIntersectionPoint = O.prototype.yE = function(a, b, c) { + return this.tp(a.x, a.y, b.x, b.y, c) + }; + f = O.prototype; + f.tp = function(a, b, c, d, e) { + var g = this.transform, + h = 1 / (g.m11 * g.m22 - g.m12 * g.m21), + k = g.m22 * h, + l = -g.m12 * h, + m = -g.m21 * h, + n = g.m11 * h, + p = h * (g.m21 * g.dy - g.m22 * g.dx), + q = h * (g.m12 * g.dx - g.m11 * g.dy); + if (null !== this.vl) return g = this.W, Ne(g.left, g.top, g.right, g.bottom, a, b, c, d, e); + h = a * k + b * m + p; + a = a * l + b * n + q; + b = c * k + d * m + p; + c = c * l + d * n + q; + e.n(0, 0); + d = this.Ga; + c = Ne(0, 0, d.width, d.height, h, a, b, c, e); + e.transform(g); + return c + }; + + function rj(a, b, c, d, e) { + if (!1 !== ml(a)) { + var g = a.margin, + h = g.right + g.left, + g = g.top + g.bottom; + b = Math.max(b - h, 0); + c = Math.max(c - g, 0); + e = e || 0; + d = Math.max((d || 0) - h, 0); + e = Math.max(e - g, 0); + var h = a.angle, + g = 0, + g = a.Aa, + k = 0; + a.ub && (k = a.ub); + 90 === h || 270 === h ? (b = isFinite(g.height) ? g.height + k : b, c = isFinite(g.width) ? g.width + k : c) : (b = isFinite(g.width) ? g.width + k : b, c = isFinite(g.height) ? g.height + k : c); + var g = d || 0, + k = e || 0, + l = a instanceof I; + switch (Mm(a, !0)) { + case $i: + k = g = 0; + l && (c = b = Infinity); + break; + case lf: + isFinite(b) && b > d && (g = b); + isFinite(c) && + c > e && (k = c); + break; + case Cm: + isFinite(b) && b > d && (g = b); + k = 0; + l && (c = Infinity); + break; + case Bm: + isFinite(c) && c > e && (k = c), g = 0, l && (b = Infinity) + } + var l = a.Xe, + m = a.cg; + g > l.width && m.width < l.width && (g = l.width); + k > l.height && m.height < l.height && (k = l.height); + d = Math.max(g / a.scale, m.width); + e = Math.max(k / a.scale, m.height); + l.width < d && (d = Math.min(m.width, d)); + l.height < e && (e = Math.min(m.height, e)); + b = Math.min(l.width, b); + c = Math.min(l.height, c); + b = Math.max(d, b); + c = Math.max(e, c); + if (90 === h || 270 === h) g = b, b = c, c = g, g = d, d = e, e = g; + a.ud.Wa(); + a.Ip(b, c, + d, e); + a.ud.freeze(); + a.ud.F() || z.k("Non-real measuredBounds has been set. Object " + a + ", measuredBounds: " + a.ud.toString()); + Yk(a, !1) + } + } + f.Lc = function(a, b, c, d, e) { + this.Fi(); + var g = z.kg(); + g.assign(this.Xb); + this.Xb.Wa(); + if (!1 === nl(this)) { + var h = this.Xb; + h.x = a; + h.y = b; + h.width = c; + h.height = d + } else this.$i(a, b, c, d); + this.Xb.freeze(); + this.vi = void 0 === e ? null : e; + c = !1; + void 0 !== e ? c = !0 : null !== this.U && (e = this.U.Wc, d = this.Ia, null !== this.vl && (d = this.Xb), c = b + d.height, d = a + d.width, c = !(0 <= a + .05 && d <= e.width + .05 && 0 <= b + .05 && c <= e.height + .05), this instanceof qa && (a = this.Wc, this.Jv > a.height || this.Nj.cf > a.width)) && (c = !0); + this.ja = c ? this.ja | 256 : this.ja & -257; + this.Xb.F() || + z.k("Non-real actualBounds has been set. Object " + this + ", actualBounds: " + this.Xb.toString()); + this.vx(g, this.Xb); + z.dc(g) + }; + f.$i = function() {}; + + function Nm(a, b, c, d, e) { + var g = a.W; + g.x = b; + g.y = c; + g.width = d; + g.height = e; + if (!a.Aa.F()) { + g = a.ud; + c = a.margin; + b = c.right + c.left; + var h = c.top + c.bottom; + c = g.width + b; + g = g.height + h; + d += b; + e += h; + b = Mm(a, !0); + c === d && g === e && (b = $i); + switch (b) { + case $i: + if (c > d || g > e) Yk(a, !0), rj(a, c > d ? d : c, g > e ? e : g); + break; + case lf: + Yk(a, !0); + rj(a, d, e, 0, 0); + break; + case Cm: + Yk(a, !0); + rj(a, d, g, 0, 0); + break; + case Bm: + Yk(a, !0), rj(a, c, e, 0, 0) + } + } + } + f.vx = function(a, b) { + Om(this, !1); + var c = this.ca; + if (null !== c && null !== c.h) { + var d = this.ca; + null !== d && (d.vn !== this && d.vF !== this && d.zF !== this || Pm(d, !0)); + this.ta(); + a.N(b) || (c.Nl(), this.Sv(c)) + } + }; + f.Sv = function(a) { + null !== this.yd && Pm(a, !0) + }; + z.defineProperty(O, { + bq: "shadowVisible" + }, function() { + return this.Js + }, function(a) { + var b = this.Js; + b !== a && (u && null !== a && z.g(a, "boolean", O, "shadowVisible"), this.Js = a, this.j("shadowVisible", b, a)) + }); + O.prototype.ff = function(a, b) { + if (this.visible) { + var c = this.Xb; + if (0 !== c.width && 0 !== c.height && !isNaN(c.x) && !isNaN(c.y)) { + var d = this.opacity, + e = 1; + if (1 !== d) { + if (0 === d) return; + e = a.globalAlpha; + a.globalAlpha = e * d + } + if (a instanceof ed) a: { + if (this.visible) { + var g = null, + h = a.nx; + if (this instanceof I && (this.type === Qm || this.type === Rm)) Sm(this, a, b); + else { + var k = this.Xb; + if (0 !== k.width && 0 !== k.height && !isNaN(k.x) && !isNaN(k.y)) { + var l = this.transform, + m = this.U; + 0 !== (this.ja & 4096) === !0 && Tm(this); + var c = 0 !== (this.ja & 256), + n = !1; + this instanceof + qa && (a.font = this.font); + if (c) { + n = m.Vg() ? m.Ga : m.W; + if (null !== this.vi) var p = this.vi, + q = p.x, + r = p.y, + s = p.width, + p = p.height; + else q = Math.max(k.x, n.x), r = Math.max(k.y, n.y), s = Math.min(k.right, n.right) - q, p = Math.min(k.bottom, n.bottom) - r; + if (q > k.width + k.x || k.x > n.width + n.x || r > k.height + k.y || k.y > n.height + n.y) break a; + n = !0; + qd(a, 1, 0, 0, 1, 0, 0); + a.save(); + a.beginPath(); + a.rect(q, r, s, p); + a.clip() + } + q = !1; + if (this instanceof D) { + var t = this, + q = !0; + if (!t.isVisible()) break a + } + a.ej.pf = [1, 0, 0, 1, 0, 0]; + r = !1; + q && this.sk && b.hj("drawShadows") && (s = this.Jm, + a.TA(s.x * b.scale * b.jd, s.y * b.scale * b.jd, t.zg), a.xn(), a.shadowColor = t.Im); + t = !1; + this.ca && b.hj("drawShadows") && (t = this.ca.sk); + !0 === this.bq ? (a.xn(), !1 === r && t && (qd(a, 1, 0, 0, 1, 0, 0), a.gb(), r = !0)) : !1 === this.bq && a.wn(); + null !== this.uc && (Um(this, a, this.uc, !0, !0), !1 === r && t && (qd(a, 1, 0, 0, 1, 0, 0), a.gb(), r = !0), this.uc instanceof Da && this.uc.type === yd ? (a.beginPath(), a.rect(k.x, k.y, k.width, k.height), a.Gg(this.uc)) : a.fillRect(k.x, k.y, k.width, k.height)); + this instanceof I ? qd(a, l.m11, l.m12, l.m21, l.m22, l.dx, l.dy) : a.ej.pf = [l.m11, l.m12, l.m21, l.m22, l.dx, l.dy]; + if (null !== this.Nb) { + !1 === r && t && (qd(a, 1, 0, 0, 1, 0, 0), a.gb(), r = !0); + var p = this.Ga, + l = k = 0, + s = p.width, + p = p.height, + v = 0; + this instanceof X && (p = this.ab.vb, k = p.x, l = p.y, s = p.width, p = p.height, v = this.Oe); + Um(this, a, this.Nb, !0, !1); + this.Nb instanceof Da && this.Nb.type === yd ? (a.beginPath(), a.rect(k - v / 2, l - v / 2, s + v, p + v), a.Gg(this.Nb)) : a.fillRect(k - v / 2, l - v / 2, s + v, p + v) + } + t && (null !== this.Nb || null !== this.uc || null !== m && 0 !== (m.ja & 512) || null !== m && (m.type === Dk || m.type === Yi) && m.gf() !== this) ? (Vm(this, !0), + null === this.bq && a.wn()) : Vm(this, !1); + this.nk(a, b); + t && 0 !== (this.ja & 512) === !0 && a.xn(); + q && t && a.wn(); + c && (a.restore(), n && a.Cf.pop()); + this instanceof I && (g = a.Cf.pop()); + !0 === r && a.Cf.pop(); + null !== a.nE && (null === g && (h === a.nx ? (qd(a, 1, 0, 0, 1, 0, 0), g = a.Cf.pop()) : g = a.nx), a.nE(this, g)) + } + } + } + } + else { + if (this instanceof I && (this.type === Qm || this.type === Rm)) { + Sm(this, a, b); + 1 !== d && (a.globalAlpha = e); + return + } + this instanceof G && this.on(!1); + u && u.bj && u.xH(a, this); + g = this.transform; + h = this.U; + 0 !== (this.ja & 4096) === !0 && Tm(this); + m = 0 !== (this.ja & + 256); + this instanceof qa && (a.font = this.font); + if (m) { + u && u.mE && z.trace("clip" + this.toString()); + n = h.Vg() ? h.Ga : h.W; + null !== this.vi ? (t = this.vi, k = t.x, l = t.y, q = t.width, t = t.height) : (k = Math.max(c.x, n.x), l = Math.max(c.y, n.y), q = Math.min(c.right, n.right) - k, t = Math.min(c.bottom, n.bottom) - l); + if (k > c.width + c.x || c.x > n.width + n.x || l > c.height + c.y || c.y > n.height + n.y) { + 1 !== d && (a.globalAlpha = e); + return + } + u && u.mE && u.zH(a, k, l, q, t); + a.save(); + a.beginPath(); + a.rect(k, l, q, t); + a.clip() + } + n = !1; + if (this instanceof D) { + n = !0; + if (!this.isVisible()) { + 1 !== + d && (a.globalAlpha = e); + return + } + this.sk && b.hj("drawShadows") && (k = this.Jm, a.TA(k.x * b.scale * b.jd, k.y * b.scale * b.jd, this.zg), a.xn(), a.shadowColor = this.Im) + } + k = !1; + this.ca && b.hj("drawShadows") && (k = this.ca.sk); + !0 === this.bq ? a.xn() : !1 === this.bq && a.wn(); + null !== this.uc && (Um(this, a, this.uc, !0, !0), this.uc instanceof Da && this.uc.type === yd ? (a.beginPath(), a.rect(c.x, c.y, c.width, c.height), a.Gg(this.uc)) : a.fillRect(c.x, c.y, c.width, c.height)); + g.Pt() || a.transform(g.m11, g.m12, g.m21, g.m22, g.dx, g.dy); + null !== this.Nb && (t = this.Ga, + l = c = 0, q = t.width, t = t.height, r = 0, this instanceof X && (t = this.ab.vb, c = t.x, l = t.y, q = t.width, t = t.height, r = this.Oe), Um(this, a, this.Nb, !0, !1), this.Nb instanceof Da && this.Nb.type === yd ? (a.beginPath(), a.rect(c - r / 2, l - r / 2, q + r, t + r), a.Gg(this.Nb)) : a.fillRect(c - r / 2, l - r / 2, q + r, t + r)); + u && u.bj && u.yH(a, this); + k && (null !== this.Nb || null !== this.uc || null !== h && 0 !== (h.ja & 512) || null !== h && (h.type === Dk || h.type === Yi) && h.gf() !== this) ? (Vm(this, !0), null === this.bq && a.wn()) : Vm(this, !1); + this.nk(a, b); + k && 0 !== (this.ja & 512) === !0 && a.xn(); + n && + k && a.wn(); + m ? (a.restore(), this instanceof I ? ca(a, !0) : ca(a, !1)) : g.Pt() || (h = 1 / (g.m11 * g.m22 - g.m12 * g.m21), a.transform(g.m22 * h, -g.m12 * h, -g.m21 * h, g.m11 * h, h * (g.m21 * g.dy - g.m22 * g.dx), h * (g.m12 * g.dx - g.m11 * g.dy))) + } + 1 !== d && (a.globalAlpha = e) + } + } + }; + + function Sm(a, b, c) { + var d = a.Xb; + 0 === d.width || 0 === d.height || isNaN(d.x) || isNaN(d.y) || (null !== a.uc && (Um(a, b, a.uc, !0, !0), a.uc instanceof Da && a.uc.type === yd ? (b.beginPath(), b.rect(d.x, d.y, d.width, d.height), b.Gg(a.uc)) : b.fillRect(d.x, d.y, d.width, d.height)), null !== a.Nb && (Um(a, b, a.Nb, !0, !1), a.Nb instanceof Da && a.Nb.type === yd ? (b.beginPath(), b.rect(d.x, d.y, d.width, d.height), b.Gg(a.Nb)) : b.fillRect(d.x, d.y, d.width, d.height)), a.nk(b, c)) + } + O.prototype.nk = function() {}; + + function Um(a, b, c, d, e) { + if (null !== c) { + var g = 1, + h = 1; + if ("string" === typeof c) d ? b.fillStyle = c : b.strokeStyle = c; + else if (c.type === rg) d ? b.fillStyle = c.color : b.strokeStyle = c.color; + else { + var k, h = a.Ga, + g = h.width, + h = h.height; + if (e) var l = a.W, + g = l.width, + h = l.height; + var m = b instanceof xd; + if (m && c.ah && (c.type === ym || c.On === g && c.ty === h)) k = c.ah; + else { + var n = l = 0, + p = 0, + q = 0, + r = 0, + s = 0, + s = r = 0; + e && (l = a.W, g = l.width, h = l.height, r = l.x, s = l.y); + l = c.start.x * g + c.start.offsetX; + n = c.start.y * h + c.start.offsetY; + p = c.end.x * g + c.end.offsetX; + q = c.end.y * h + c.end.offsetY; + l += r; + p += r; + n += s; + q += s; + if (c.type === sg) k = b.createLinearGradient(l, n, p, q); + else if (c.type === yd) s = isNaN(c.xt) ? Math.max(g, h) / 2 : c.xt, isNaN(c.wu) ? (r = 0, s = Math.max(g, h) / 2) : r = c.wu, k = b.createRadialGradient(l, n, r, p, q, s); + else if (c.type === ym) try { + k = b.createPattern(c.pattern, "repeat") + } catch (t) { + k = null + } else z.ic(c.type, "Brush type"); + if (c.type !== ym && (e = c.st, null !== e)) + for (e = e.i; e.next();) k.addColorStop(e.key, e.value); + if (m && (c.ah = k, null !== k && (c.On = g, c.ty = h), null === k && c.type === ym && -1 !== c.On)) { + c.On = -1; + var v = a.h; + null !== v && + -1 === c.On && z.setTimeout(function() { + v.Sp() + }, 600) + } + } + d ? b.fillStyle = k : b.strokeStyle = k + } + } + } + O.prototype.isContainedBy = O.prototype.Pl = function(a) { + if (a instanceof I) a: { + if (this !== a && null !== a) + for (var b = this.U; null !== b;) { + if (b === a) { + a = !0; + break a + } + b = b.U + } + a = !1 + } + else a = !1; + return a + }; + O.prototype.isVisibleObject = O.prototype.nj = function() { + if (!this.visible) return !1; + var a = this.U; + return null !== a ? a.nj() : !0 + }; + + function Tm(a) { + if (0 !== (a.ja & 2048) === !0) { + var b = a.Hd; + b.reset(); + if (!a.Xb.F() || !a.ud.F()) { + Wm(a, !1); + return + } + b.translate(a.Xb.x, a.Xb.y); + b.translate(-a.Ia.x, -a.Ia.y); + var c = a.Ga; + Km(a, b, c.x, c.y, c.width, c.height); + Wm(a, !1); + Xm(a, !0) + } + 0 !== (a.ja & 4096) === !0 && (b = a.U, null === b ? (a.zk.set(a.Hd), a.iv = a.scale, Xm(a, !1)) : null !== b.ph && (c = a.zk, c.reset(), b.Vg() ? c.multiply(b.zk) : null !== b.U && c.multiply(b.U.zk), c.multiply(a.Hd), a.iv = a.scale * b.iv, Xm(a, !1))) + } + + function Km(a, b, c, d, e, g) { + 1 !== a.scale && b.scale(a.scale); + if (0 !== a.angle) { + var h = ec; + a.of && a.of.cd() && (h = a.of); + var k = z.O(); + if (a instanceof D && a.Zb !== a) + for (c = a.Zb, d = c.Ga, k.tu(d.x, d.y, d.width, d.height, h), c.fl.Cb(k), k.offset(-c.Ia.x, -c.Ia.y), h = c.U; null !== h && h !== a;) h.fl.Cb(k), k.offset(-h.Ia.x, -h.Ia.y), h = h.U; + else k.tu(c, d, e, g, h); + b.rotate(a.angle, k.x, k.y); + z.A(k) + } + } + f = O.prototype; + f.S = function(a) { + void 0 === a && (a = !1); + if (!0 !== ml(this)) { + Yk(this, !0); + Om(this, !0); + var b = this.U; + null !== b ? a || b.S() : (a = this.h, null !== a && (a.qg.add(this), this instanceof E && (a.pa.qb || this.mf(), null !== this.Nd && Ym(this.Nd)), a.Ce(!0))); + if (this instanceof I) { + if (this.ba === Dk || this.ba === Ki) a = this.gf(), null !== a && a.S(!0); + a = this.va.o; + for (var b = a.length, c = 0; c < b; c++) { + var d = a[c]; + !0 !== ml(d) && (d.Aa.F() || (d instanceof Zi || d instanceof I || d instanceof qa || Mm(d, !1) !== $i) && d.S(!0)) + } + } + } + }; + f.Ap = function() { + !1 === ml(this) && (Yk(this, !0), Om(this, !0)) + }; + + function Ym(a) { + if (!1 === nl(a)) { + if (null !== a.U) a.U.S(); + else { + var b = a.h; + null !== b && (b.qg.add(a), a instanceof E && a.mf(), b.Ce()) + } + Om(a, !0) + } + } + f.Fi = function() { + 0 !== (this.ja & 2048) === !1 && (Wm(this, !0), Xm(this, !0)) + }; + f.eA = function() { + Xm(this, !0) + }; + f.ta = function() { + var a = this.ca; + null !== a && a.ta() + }; + + function Mm(a, b) { + var c = a.stretch, + d = a.U; + if (null !== d && d.ba === ga) return Zm(a, d.$d(a.Vb), d.Zd(a.column), b); + if (null !== d && d.ba === Dk && d.gf() === a) return $m(a, lf, b); + if (c === Am) { + if (null !== d) { + if (d.ba === Yi && d.gf() === a) return $m(a, lf, b); + c = d.Xd; + return c === Am ? $m(a, $i, b) : $m(a, c, b) + } + return $m(a, $i, b) + } + return $m(a, c, b) + } + + function Zm(a, b, c, d) { + var e = a.stretch; + if (e !== Am) return $m(a, e, d); + var g = e = null; + switch (b.stretch) { + case Bm: + g = !0; + break; + case lf: + g = !0 + } + switch (c.stretch) { + case Cm: + e = !0; + break; + case lf: + e = !0 + } + b = a.U.Xd; + null === e && (e = b === Cm || b === lf); + null === g && (g = b === Bm || b === lf); + return !0 === e && !0 === g ? $m(a, lf, d) : !0 === e ? $m(a, Cm, d) : !0 === g ? $m(a, Bm, d) : $m(a, $i, d) + } + + function $m(a, b, c) { + if (c) return b; + if (b === $i) return $i; + c = a.Aa; + if (c.F()) return $i; + a = a.angle; + if (!isNaN(c.width)) + if (90 !== a && 270 !== a) { + if (b === Cm) return $i; + if (b === lf) return Bm + } else { + if (b === Bm) return $i; + if (b === lf) return Cm + } + if (!isNaN(c.height)) + if (90 !== a && 270 !== a) { + if (b === Bm) return $i; + if (b === lf) return Cm + } else { + if (b === Cm) return $i; + if (b === lf) return Bm + } + return b + } + z.defineProperty(O, { + pu: "segmentOrientation" + }, function() { + return this.Bs + }, function(a) { + var b = this.Bs; + b !== a && (u && z.Ba(a, G, O, "segmentOrientation"), this.Bs = a, this.S(), this.j("segmentOrientation", b, a), a === Ni && (this.angle = 0)) + }); + z.defineProperty(O, { + De: "segmentIndex" + }, function() { + return this.zs + }, function(a) { + u && z.g(a, "number", O, "segmentIndex"); + a = Math.round(a); + var b = this.zs; + b !== a && (this.zs = a, this.S(), this.j("segmentIndex", b, a)) + }); + z.defineProperty(O, { + NA: "segmentFraction" + }, function() { + return this.ys + }, function(a) { + u && z.g(a, "number", O, "segmentFraction"); + isNaN(a) ? a = 0 : 0 > a ? a = 0 : 1 < a && (a = 1); + var b = this.ys; + b !== a && (this.ys = a, this.S(), this.j("segmentFraction", b, a)) + }); + z.defineProperty(O, { + EF: "segmentOffset" + }, function() { + return this.As + }, function(a) { + var b = this.As; + b.N(a) || (u && z.l(a, N, O, "segmentOffset"), this.As = a = a.V(), this.S(), this.j("segmentOffset", b, a)) + }); + z.defineProperty(O, { + stretch: "stretch" + }, function() { + return this.di + }, function(a) { + var b = this.di; + b !== a && (u && z.Ba(a, O, O, "stretch"), this.di = a, this.S(), this.j("stretch", b, a)) + }); + z.defineProperty(O, { + name: "name" + }, function() { + return this.Ub + }, function(a) { + var b = this.Ub; + b !== a && (u && z.g(a, "string", O, "name"), this.Ub = a, null !== this.ca && (this.ca.il = null), this.j("name", b, a)) + }); + z.defineProperty(O, { + opacity: "opacity" + }, function() { + return this.Xc + }, function(a) { + var b = this.Xc; + b !== a && (z.g(a, "number", O, "opacity"), (0 > a || 1 < a) && z.ka(a, "0 <= value <= 1", O, "opacity"), this.Xc = a, this.j("opacity", b, a), a = this.h, b = this.ca, null !== a && null !== b && a.ta(lk(b, b.W))) + }); + z.defineProperty(O, { + visible: "visible" + }, function() { + return 0 !== (this.ja & 1) + }, function(a) { + var b = 0 !== (this.ja & 1); + b !== a && (u && z.g(a, "boolean", O, "visible"), this.ja ^= 1, this.j("visible", b, a), b = this.U, null !== b ? b.S() : this instanceof D && this.wd(a), this.ta(), an(this)) + }); + z.defineProperty(O, { + ig: "pickable" + }, function() { + return 0 !== (this.ja & 2) + }, function(a) { + var b = 0 !== (this.ja & 2); + b !== a && (u && z.g(a, "boolean", O, "pickable"), this.ja ^= 2, this.j("pickable", b, a)) + }); + z.defineProperty(O, { + JH: "fromLinkableDuplicates" + }, function() { + return 0 !== (this.ja & 4) + }, function(a) { + var b = 0 !== (this.ja & 4); + b !== a && (u && z.g(a, "boolean", O, "fromLinkableDuplicates"), this.ja ^= 4, this.j("fromLinkableDuplicates", b, a)) + }); + z.defineProperty(O, { + KH: "fromLinkableSelfNode" + }, function() { + return 0 !== (this.ja & 8) + }, function(a) { + var b = 0 !== (this.ja & 8); + b !== a && (u && z.g(a, "boolean", O, "fromLinkableSelfNode"), this.ja ^= 8, this.j("fromLinkableSelfNode", b, a)) + }); + z.defineProperty(O, { + uJ: "toLinkableDuplicates" + }, function() { + return 0 !== (this.ja & 16) + }, function(a) { + var b = 0 !== (this.ja & 16); + b !== a && (u && z.g(a, "boolean", O, "toLinkableDuplicates"), this.ja ^= 16, this.j("toLinkableDuplicates", b, a)) + }); + z.defineProperty(O, { + vJ: "toLinkableSelfNode" + }, function() { + return 0 !== (this.ja & 32) + }, function(a) { + var b = 0 !== (this.ja & 32); + b !== a && (u && z.g(a, "boolean", O, "toLinkableSelfNode"), this.ja ^= 32, this.j("toLinkableSelfNode", b, a)) + }); + z.defineProperty(O, { + Ff: "isPanelMain" + }, function() { + return 0 !== (this.ja & 64) + }, function(a) { + var b = 0 !== (this.ja & 64); + b !== a && (u && z.g(a, "boolean", O, "isPanelMain"), this.ja ^= 64, this.S(), this.j("isPanelMain", b, a)) + }); + z.defineProperty(O, { + Mt: "isActionable" + }, function() { + return 0 !== (this.ja & 128) + }, function(a) { + var b = 0 !== (this.ja & 128); + b !== a && (u && z.g(a, "boolean", O, "isActionable"), this.ja ^= 128, this.j("isActionable", b, a)) + }); + z.defineProperty(O, { + vl: "areaBackground" + }, function() { + return this.uc + }, function(a) { + var b = this.uc; + b !== a && (u && null !== a && z.ot(a, "GraphObject.areaBackground"), a instanceof Da && a.freeze(), this.uc = a, this.ta(), this.j("areaBackground", b, a)) + }); + z.defineProperty(O, { + background: "background" + }, function() { + return this.Nb + }, function(a) { + var b = this.Nb; + b !== a && (u && null !== a && z.ot(a, "GraphObject.background"), a instanceof Da && a.freeze(), this.Nb = a, this.ta(), this.j("background", b, a)) + }); + + function Vm(a, b) { + a.ja = b ? a.ja | 512 : a.ja & -513 + } + + function bn(a, b) { + a.ja = b ? a.ja | 1024 : a.ja & -1025 + } + + function Wm(a, b) { + a.ja = b ? a.ja | 2048 : a.ja & -2049 + } + + function Xm(a, b) { + a.ja = b ? a.ja | 4096 : a.ja & -4097 + } + + function ml(a) { + return 0 !== (a.ja & 8192) + } + + function Yk(a, b) { + a.ja = b ? a.ja | 8192 : a.ja & -8193 + } + + function nl(a) { + return 0 !== (a.ja & 16384) + } + + function Om(a, b) { + a.ja = b ? a.ja | 16384 : a.ja & -16385 + } + z.w(O, { + ca: "part" + }, function() { + if (this instanceof D) return this; + if (null !== this.Bm) return this.Bm; + var a; + for (a = this.U; a;) { + if (a instanceof D) return this.Bm = a; + a = a.U + } + return null + }); + z.w(O, { + U: "panel" + }, function() { + return this.lh + }); + O.prototype.Tl = function(a) { + this.lh = a + }; + z.w(O, { + layer: "layer" + }, function() { + var a = this.ca; + return null !== a ? a.layer : null + }, { + configurable: !0 + }); + z.w(O, { + h: "diagram" + }, function() { + var a = this.ca; + return null !== a ? a.h : null + }, { + configurable: !0 + }); + z.defineProperty(O, { + position: "position" + }, function() { + return this.sb + }, function(a) { + var b = this.sb; + b.N(a) || (u && z.l(a, N, O, "position"), a = a.V(), this.RA(a, b) && this.j("position", b, a)) + }); + O.prototype.RA = function(a) { + this.sb = a; + Ym(this); + this.Fi(); + return !0 + }; + O.prototype.Nx = function(a, b) { + this.sb.n(a, b); + cn(this); + this.Fi() + }; + z.w(O, { + W: "actualBounds" + }, function() { + return this.Xb + }); + z.defineProperty(O, { + scale: "scale" + }, function() { + return this.bc + }, function(a) { + var b = this.bc; + b !== a && (u && z.p(a, O, "scale"), 0 >= a && z.k("GraphObject.scale for " + this + " must be greater than zero, not: " + a), this.bc = a, this.Fi(), this.S(), this.j("scale", b, a)) + }); + z.defineProperty(O, { + angle: "angle" + }, function() { + return this.bm + }, function(a) { + var b = this.bm; + b !== a && (u && z.p(a, O, "angle"), a %= 360, 0 > a && (a += 360), b !== a && (this.bm = a, this.S(), this.Fi(), this.j("angle", b, a))) + }); + z.defineProperty(O, { + Aa: "desiredSize" + }, function() { + return this.tf + }, function(a) { + var b = this.tf; + b.N(a) || (u && z.l(a, Ea, O, "desiredSize"), this.tf = a = a.V(), this.S(), this instanceof X && this.Ae(), this.j("desiredSize", b, a), a = this.ca, null !== a && 0 !== (this.ja & 1024) && (Im(this, a, "width"), Im(this, a, "height"))) + }); + z.defineProperty(O, { + width: "width" + }, function() { + return this.tf.width + }, function(a) { + if (this.tf.width !== a) { + u && z.g(a, "number", O, "width"); + var b = this.tf; + this.tf = a = (new Ea(a, this.tf.height)).freeze(); + this.S(); + this instanceof X && this.Ae(); + this.j("desiredSize", b, a); + b = this.ca; + null !== b && 0 !== (this.ja & 1024) && Im(this, b, "width") + } + }); + z.defineProperty(O, { + height: "height" + }, function() { + return this.tf.height + }, function(a) { + if (this.tf.height !== a) { + u && z.g(a, "number", O, "height"); + var b = this.tf; + this.tf = a = (new Ea(this.tf.width, a)).freeze(); + this.S(); + this instanceof X && this.Ae(); + this.j("desiredSize", b, a); + b = this.ca; + null !== b && 0 !== (this.ja & 1024) && Im(this, b, "height") + } + }); + z.defineProperty(O, { + cg: "minSize" + }, function() { + return this.Tj + }, function(a) { + var b = this.Tj; + b.N(a) || (u && z.l(a, Ea, O, "minSize"), a = a.copy(), isNaN(a.width) && (a.width = 0), isNaN(a.height) && (a.height = 0), a.freeze(), this.Tj = a, this.S(), this.j("minSize", b, a)) + }); + z.defineProperty(O, { + Xe: "maxSize" + }, function() { + return this.Rj + }, function(a) { + var b = this.Rj; + b.N(a) || (u && z.l(a, Ea, O, "maxSize"), a = a.copy(), isNaN(a.width) && (a.width = Infinity), isNaN(a.height) && (a.height = Infinity), a.freeze(), this.Rj = a, this.S(), this.j("maxSize", b, a)) + }); + z.w(O, { + Ia: "measuredBounds" + }, function() { + return this.ud + }); + z.w(O, { + Ga: "naturalBounds" + }, function() { + return this.Wc + }, { + configurable: !0 + }); + z.defineProperty(O, { + margin: "margin" + }, function() { + return this.Er + }, function(a) { + "number" === typeof a ? a = new Db(a) : u && z.l(a, Db, O, "margin"); + var b = this.Er; + b.N(a) || (this.Er = a = a.V(), this.S(), this.j("margin", b, a)) + }); + z.w(O, { + transform: null + }, function() { + 0 !== (this.ja & 2048) === !0 && Tm(this); + return this.Hd + }); + z.w(O, { + ph: null + }, function() { + 0 !== (this.ja & 4096) === !0 && Tm(this); + return this.zk + }); + z.defineProperty(O, { + alignment: "alignment" + }, function() { + return this.Ie + }, function(a) { + var b = this.Ie; + b.N(a) || (u && z.l(a, Q, O, "alignment"), a.Be() && !a.bd() && z.k("GraphObject.alignment for " + this + " must be a real Spot or Spot.Default, not: " + a), this.Ie = a = a.V(), Ym(this), this.j("alignment", b, a)) + }); + z.defineProperty(O, { + column: "column" + }, function() { + return this.wq + }, function(a) { + u && z.p(a, O, "column"); + a = Math.round(a); + var b = this.wq; + b !== a && (0 > a && z.ka(a, ">= 0", O, "column"), this.wq = a, this.S(), this.j("column", b, a)) + }); + z.defineProperty(O, { + eH: "columnSpan" + }, function() { + return this.wi + }, function(a) { + u && z.g(a, "number", O, "columnSpan"); + a = Math.round(a); + var b = this.wi; + b !== a && (1 > a && z.ka(a, ">= 1", O, "columnSpan"), this.wi = a, this.S(), this.j("columnSpan", b, a)) + }); + z.defineProperty(O, { + Vb: "row" + }, function() { + return this.us + }, function(a) { + u && z.p(a, O, "row"); + a = Math.round(a); + var b = this.us; + b !== a && (0 > a && z.ka(a, ">= 0", O, "row"), this.us = a, this.S(), this.j("row", b, a)) + }); + z.defineProperty(O, { + rowSpan: "rowSpan" + }, function() { + return this.Ti + }, function(a) { + u && z.g(a, "number", O, "rowSpan"); + a = Math.round(a); + var b = this.Ti; + b !== a && (1 > a && z.ka(a, ">= 1", O, "rowSpan"), this.Ti = a, this.S(), this.j("rowSpan", b, a)) + }); + z.defineProperty(O, { + Qx: "spanAllocation" + }, function() { + return this.Os + }, function(a) { + var b = this.Os; + b !== a && (null !== a && z.g(a, "function", O, "spanAllocation"), this.Os = a, this.j("spanAllocation", b, a)) + }); + z.defineProperty(O, { + jk: "alignmentFocus" + }, function() { + return this.oq + }, function(a) { + var b = this.oq; + b.N(a) || (u && z.l(a, Q, O, "alignmentFocus"), !a.Be() || a.bd() || a.N(Yb) && this instanceof E || z.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: " + a), this.oq = a = a.V(), this.S(), this.j("alignmentFocus", b, a)) + }); + z.defineProperty(O, { + yd: "portId" + }, function() { + return this.fs + }, function(a) { + var b = this.fs; + if (b !== a) { + u && null !== a && z.g(a, "string", O, "portId"); + var c = this.ca; + null === c || c instanceof E || (z.k("Cannot set portID on a Link: " + a), c = null); + null !== b && null !== c && dn(c, this); + this.fs = a; + if (null !== a && c) { + c.Ph = !0; + null === c.Dd && en(c); + var d = this.yd; + null !== d && c.Dd.add(d, this) + } + this.j("portId", b, a) + } + }); + + function an(a) { + var b = a.ca; + b instanceof E && (a = a.h, null === a || a.pa.qb || b.mf()) + } + z.defineProperty(O, { + Eb: "toSpot" + }, function() { + return null !== this.la ? this.la.gk : Yb + }, function(a) { + this.Ue(); + var b = this.la.gk; + b.N(a) || (u && z.l(a, Q, O, "toSpot"), a = a.V(), this.la.gk = a, this.j("toSpot", b, a), an(this)) + }); + z.defineProperty(O, { + Yl: "toEndSegmentLength" + }, function() { + return null !== this.la ? this.la.ek : 10 + }, function(a) { + this.Ue(); + var b = this.la.ek; + b !== a && (u && z.g(a, "number", O, "toEndSegmentLength"), 0 > a && z.ka(a, ">= 0", O, "toEndSegmentLength"), this.la.ek = a, this.j("toEndSegmentLength", b, a), an(this)) + }); + z.defineProperty(O, { + zu: "toEndSegmentDirection" + }, function() { + return null !== this.la ? this.la.dk : Gm + }, function(a) { + this.Ue(); + var b = this.la.dk; + b !== a && (u && z.Ba(a, E, O, "toEndSegmentDirection"), this.la.dk = a, this.j("toEndSegmentDirection", b, a), an(this)) + }); + z.defineProperty(O, { + Au: "toShortLength" + }, function() { + return null !== this.la ? this.la.fk : 0 + }, function(a) { + this.Ue(); + var b = this.la.fk; + b !== a && (u && z.g(a, "number", O, "toShortLength"), this.la.fk = a, this.j("toShortLength", b, a), an(this)) + }); + z.defineProperty(O, { + TF: "toLinkable" + }, function() { + return this.Vs + }, function(a) { + var b = this.Vs; + b !== a && (u && null !== a && z.g(a, "boolean", O, "toLinkable"), this.Vs = a, this.j("toLinkable", b, a)) + }); + z.defineProperty(O, { + wJ: "toMaxLinks" + }, function() { + return this.Ws + }, function(a) { + var b = this.Ws; + b !== a && (u && z.g(a, "number", O, "toMaxLinks"), 0 > a && z.ka(a, ">= 0", O, "toMaxLinks"), this.Ws = a, this.j("toMaxLinks", b, a)) + }); + z.defineProperty(O, { + Db: "fromSpot" + }, function() { + return null !== this.la ? this.la.Gj : Yb + }, function(a) { + this.Ue(); + var b = this.la.Gj; + b.N(a) || (u && z.l(a, Q, O, "fromSpot"), a = a.V(), this.la.Gj = a, this.j("fromSpot", b, a), an(this)) + }); + z.defineProperty(O, { + Il: "fromEndSegmentLength" + }, function() { + return null !== this.la ? this.la.Ej : 10 + }, function(a) { + this.Ue(); + var b = this.la.Ej; + b !== a && (u && z.g(a, "number", O, "fromEndSegmentLength"), 0 > a && z.ka(a, ">= 0", O, "fromEndSegmentLength"), this.la.Ej = a, this.j("fromEndSegmentLength", b, a), an(this)) + }); + z.defineProperty(O, { + Et: "fromEndSegmentDirection" + }, function() { + return null !== this.la ? this.la.Dj : Gm + }, function(a) { + this.Ue(); + var b = this.la.Dj; + b !== a && (u && z.Ba(a, E, O, "fromEndSegmentDirection"), this.la.Dj = a, this.j("fromEndSegmentDirection", b, a), an(this)) + }); + z.defineProperty(O, { + Ft: "fromShortLength" + }, function() { + return null !== this.la ? this.la.Fj : 0 + }, function(a) { + this.Ue(); + var b = this.la.Fj; + b !== a && (u && z.g(a, "number", O, "fromShortLength"), this.la.Fj = a, this.j("fromShortLength", b, a), an(this)) + }); + z.defineProperty(O, { + vE: "fromLinkable" + }, function() { + return this.Zq + }, function(a) { + var b = this.Zq; + b !== a && (u && null !== a && z.g(a, "boolean", O, "fromLinkable"), this.Zq = a, this.j("fromLinkable", b, a)) + }); + z.defineProperty(O, { + Yz: "fromMaxLinks" + }, function() { + return this.$q + }, function(a) { + var b = this.$q; + b !== a && (u && z.g(a, "number", O, "fromMaxLinks"), 0 > a && z.ka(a, ">= 0", O, "fromMaxLinks"), this.$q = a, this.j("fromMaxLinks", b, a)) + }); + z.defineProperty(O, { + cursor: "cursor" + }, function() { + return this.Hq + }, function(a) { + var b = this.Hq; + b !== a && (z.g(a, "string", O, "cursor"), this.Hq = a, this.j("cursor", b, a)) + }); + z.defineProperty(O, { + click: "click" + }, function() { + return null !== this.ma ? this.ma.ui : null + }, function(a) { + Dm(this); + var b = this.ma.ui; + b !== a && (null !== a && z.g(a, "function", O, "click"), this.ma.ui = a, this.j("click", b, a)) + }); + z.defineProperty(O, { + wt: "doubleClick" + }, function() { + return null !== this.ma ? this.ma.Ci : null + }, function(a) { + Dm(this); + var b = this.ma.Ci; + b !== a && (null !== a && z.g(a, "function", O, "doubleClick"), this.ma.Ci = a, this.j("doubleClick", b, a)) + }); + z.defineProperty(O, { + Gz: "contextClick" + }, function() { + return null !== this.ma ? this.ma.xi : null + }, function(a) { + Dm(this); + var b = this.ma.xi; + b !== a && (null !== a && z.g(a, "function", O, "contextClick"), this.ma.xi = a, this.j("contextClick", b, a)) + }); + z.defineProperty(O, { + au: "mouseEnter" + }, function() { + return null !== this.ma ? this.ma.Rr : null + }, function(a) { + Dm(this); + var b = this.ma.Rr; + b !== a && (null !== a && z.g(a, "function", O, "mouseEnter"), this.ma.Rr = a, this.j("mouseEnter", b, a)) + }); + z.defineProperty(O, { + bu: "mouseLeave" + }, function() { + return null !== this.ma ? this.ma.Sr : null + }, function(a) { + Dm(this); + var b = this.ma.Sr; + b !== a && (null !== a && z.g(a, "function", O, "mouseLeave"), this.ma.Sr = a, this.j("mouseLeave", b, a)) + }); + z.defineProperty(O, { + uA: "mouseOver" + }, function() { + return null !== this.ma ? this.ma.Pi : null + }, function(a) { + Dm(this); + var b = this.ma.Pi; + b !== a && (null !== a && z.g(a, "function", O, "mouseOver"), this.ma.Pi = a, this.j("mouseOver", b, a)) + }); + z.defineProperty(O, { + tA: "mouseHover" + }, function() { + return null !== this.ma ? this.ma.Oi : null + }, function(a) { + Dm(this); + var b = this.ma.Oi; + b !== a && (null !== a && z.g(a, "function", O, "mouseHover"), this.ma.Oi = a, this.j("mouseHover", b, a)) + }); + z.defineProperty(O, { + sA: "mouseHold" + }, function() { + return null !== this.ma ? this.ma.Ni : null + }, function(a) { + Dm(this); + var b = this.ma.Ni; + b !== a && (null !== a && z.g(a, "function", O, "mouseHold"), this.ma.Ni = a, this.j("mouseHold", b, a)) + }); + z.defineProperty(O, { + II: "mouseDragEnter" + }, function() { + return null !== this.ma ? this.ma.Pr : null + }, function(a) { + Dm(this); + var b = this.ma.Pr; + b !== a && (null !== a && z.g(a, "function", O, "mouseDragEnter"), this.ma.Pr = a, this.j("mouseDragEnter", b, a)) + }); + z.defineProperty(O, { + JI: "mouseDragLeave" + }, function() { + return null !== this.ma ? this.ma.Qr : null + }, function(a) { + Dm(this); + var b = this.ma.Qr; + b !== a && (null !== a && z.g(a, "function", O, "mouseDragLeave"), this.ma.Qr = a, this.j("mouseDragLeave", b, a)) + }); + z.defineProperty(O, { + rA: "mouseDrop" + }, function() { + return null !== this.ma ? this.ma.Mi : null + }, function(a) { + Dm(this); + var b = this.ma.Mi; + b !== a && (null !== a && z.g(a, "function", O, "mouseDrop"), this.ma.Mi = a, this.j("mouseDrop", b, a)) + }); + z.defineProperty(O, { + AD: "actionDown" + }, function() { + return null !== this.ma ? this.ma.iq : null + }, function(a) { + Dm(this); + var b = this.ma.iq; + b !== a && (null !== a && z.g(a, "function", O, "actionDown"), this.ma.iq = a, this.j("actionDown", b, a)) + }); + z.defineProperty(O, { + BD: "actionMove" + }, function() { + return null !== this.ma ? this.ma.jq : null + }, function(a) { + Dm(this); + var b = this.ma.jq; + b !== a && (null !== a && z.g(a, "function", O, "actionMove"), this.ma.jq = a, this.j("actionMove", b, a)) + }); + z.defineProperty(O, { + CD: "actionUp" + }, function() { + return null !== this.ma ? this.ma.kq : null + }, function(a) { + Dm(this); + var b = this.ma.kq; + b !== a && (null !== a && z.g(a, "function", O, "actionUp"), this.ma.kq = a, this.j("actionUp", b, a)) + }); + z.defineProperty(O, { + zD: "actionCancel" + }, function() { + return null !== this.ma ? this.ma.hq : null + }, function(a) { + Dm(this); + var b = this.ma.hq; + b !== a && (null !== a && z.g(a, "function", O, "actionCancel"), this.ma.hq = a, this.j("actionCancel", b, a)) + }); + z.defineProperty(O, { + $A: "toolTip" + }, function() { + return null !== this.ma ? this.ma.Wi : null + }, function(a) { + Dm(this); + var b = this.ma.Wi; + b !== a && (null !== a && z.l(a, da, O, "toolTip"), this.ma.Wi = a, this.j("toolTip", b, a)) + }); + z.defineProperty(O, { + contextMenu: "contextMenu" + }, function() { + return null !== this.ma ? this.ma.yi : null + }, function(a) { + Dm(this); + var b = this.ma.yi; + b !== a && (null !== a && z.l(a, da, O, "contextMenu"), this.ma.yi = a, this.j("contextMenu", b, a)) + }); + O.prototype.bind = O.prototype.bind = function(a) { + a.Ag = this; + var b = this.op(); + null !== b && fn(b) && z.k("Cannot add a Binding to a template that has already been copied: " + a); + null === this.Ac && (this.Ac = new J(Xg)); + this.Ac.add(a) + }; + O.prototype.findTemplateBinder = O.prototype.op = function() { + for (var a = this instanceof I ? this : this.U; null !== a;) { + if (null !== a.Nk) return a; + a = a.U + } + return null + }; + O.prototype.setProperties = function(a) { + z.qu(this, a) + }; + var gn; + O.make = gn = function(a, b) { + var c = arguments, + d = null, + e = null; + if ("function" === typeof a) e = a; + else if ("string" === typeof a) { + var g = hn.na(a); + "function" === typeof g ? (c = z.zl(arguments), d = g(c)) : e = aa[a] + } + null === d && (void 0 === e && (d = window.$, void 0 !== d && void 0 !== d.noop && z.k("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"), z.k("GraphObject.make failed to complete, it may be conflicting with another var.")), null !== e && e.constructor || z.k("GraphObject.make requires a class function or class name, not: " + + a), d = new e); + g = 1; + if (d instanceof C && 1 < c.length) { + var h = d, + e = c[1]; + if ("string" === typeof e || e instanceof HTMLDivElement) Bk(h, e), g++ + } + for (; g < c.length; g++) e = c[g], void 0 === e ? z.k("Undefined value at argument " + g + " for object being constructed by GraphObject.make: " + d) : jn(d, e); + return d + }; + + function jn(a, b) { + if ("string" === typeof b) + if (a instanceof qa) a.text = b; + else if (a instanceof X) a.Hb = b; + else if (a instanceof vk) a.source = b; + else if (a instanceof I) { + var c = Ja(I, b); + null !== c ? a.type = c : z.k("Unknown Panel type as an argument to GraphObject.make: " + b) + } else a instanceof Da ? (c = Ja(Da, b), null !== c ? a.type = c : z.k("Unknown Brush type as an argument to GraphObject.make: " + b)) : a instanceof hf ? (c = Ja(hf, b), null !== c ? a.type = c : z.k("Unknown Geometry type as an argument to GraphObject.make: " + b)) : a instanceof Of ? + (c = Ja(Of, b), null !== c ? a.type = c : z.k("Unknown PathSegment type as an argument to GraphObject.make: " + b)) : z.k("Unable to use a string as an argument to GraphObject.make: " + b); + else if (b instanceof O) c = b, a instanceof I || z.k("A GraphObject can only be added to a Panel, not to: " + a), a.add(c); + else if (b instanceof Fg) { + var d = b, + c = a, + e; + d.qe && c.getRowDefinition ? e = c.getRowDefinition(d.index) : !d.qe && c.getColumnDefinition ? e = c.getColumnDefinition(d.index) : z.k("A RowColumnDefinition can only be added to a Panel, not to: " + + a); + e.tt(d) + } else if (b instanceof Ba) a instanceof G && b.ze === G ? 2 === (b.value & 2) ? a.Gx = b : b === Ui || b === Mi || b === Li ? a.Se = b : b === kn || b === ln || b === mn ? a.it = b : b !== nn && b !== Ni && z.k("Unknown Link enum value for a Link property: " + b) : a instanceof I && b.ze === I ? a.type = b : a instanceof qa && b.ze === qa ? a.iG = b : a instanceof X && (b === $i || b === bj || b === cj || b === Am) ? a.Zz = b : a instanceof vk && (b === $i || b === bj || b === cj) ? a.XH = b : a instanceof O && b.ze === G ? (c = a, 0 === b.name.indexOf("Orient") ? c.pu = b : z.k("Unknown Link enum value for GraphObject.segmentOrientation property: " + + b)) : a instanceof O && b.ze === O ? a.stretch = b : a instanceof Fg && b.ze === Fg ? a.uu = b : a instanceof C && b.ze === C ? a.wl = b : a instanceof Da && b.ze === Da ? a.type = b : a instanceof hf && b.ze === hf ? a.type = b : a instanceof Of && b.ze === Of ? a.type = b : a instanceof Xg && b.ze === Xg ? a.mode = b : a instanceof Rf && b.ze === Rf ? a.Dc = b : a instanceof Y && b.ze === Y ? 0 === b.name.indexOf("Alignment") ? a.alignment = b : 0 === b.name.indexOf("Arrangement") ? a.Xf = b : 0 === b.name.indexOf("Compaction") ? a.compaction = b : 0 === b.name.indexOf("Path") ? a.path = b : 0 === b.name.indexOf("Sorting") ? + a.sorting = b : 0 === b.name.indexOf("Style") ? a.zJ = b : z.k("Unknown enum value: " + b) : a instanceof on && b.ze === on ? 0 === b.name.indexOf("Aggressive") ? a.SG = b : 0 === b.name.indexOf("Cycle") ? a.mH = b : 0 === b.name.indexOf("Init") ? a.bI = b : 0 === b.name.indexOf("Layer") ? a.qI = b : z.k("Unknown enum value: " + b) : a instanceof tm && b.ze === tm ? b === pn || b === qn || b === rn || b === sn ? a.sorting = b : b === tn || b === zn ? a.Xf = b : b === An || b === Bn ? a.alignment = b : z.k("Unknown enum value: " + b) : a instanceof Cn && b.ze === Cn ? b === Dn || b === En || b === Fn || b === Gn || b === Hn ? a.sorting = + b : b === In || b === Jn || b === Kn || b === Ln ? a.direction = b : b === Mn || b === Nn || b === On || b === Pn ? a.Xf = b : b === Qn || b === Rn ? a.tx = b : z.k("Unknown enum value: " + b) : z.k("No property to set for this enum value: " + b); + else if (b instanceof Xg) a instanceof O ? a.bind(b) : a instanceof Fg ? a.bind(b) : z.k("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: " + a); + else if (b instanceof kf) a instanceof hf ? a.cc.add(b) : z.k("A PathFigure can only be added to a Geometry, not to: " + a); + else if (b instanceof Of) a instanceof + kf ? a.Ab.add(b) : z.k("A PathSegment can only be added to a PathFigure, not to: " + a); + else if (b instanceof vg) a instanceof C ? a.Sb = b : a instanceof F ? a.Sb = b : z.k("A Layout can only be assigned to a Diagram or a Group, not to: " + a); + else if (Array.isArray(b)) + for (c = 0; c < b.length; c++) jn(a, b[c]); + else if ("object" === typeof b && null !== b) + if (a instanceof Da) { + e = new ma; + for (c in b) d = parseFloat(c), isNaN(d) ? e[c] = b[c] : a.addColorStop(d, b[c]); + z.qu(a, e) + } else if (a instanceof Fg) { + void 0 !== b.row ? (e = b.row, (void 0 === e || null === e || Infinity === + e || isNaN(e) || 0 > e) && z.k("Must specify non-negative integer row for RowColumnDefinition " + b + ", not: " + e), a.qe = !0, a.index = e) : void 0 !== b.column && (e = b.column, (void 0 === e || null === e || Infinity === e || isNaN(e) || 0 > e) && z.k("Must specify non-negative integer column for RowColumnDefinition " + b + ", not: " + e), a.qe = !1, a.index = e); + e = new ma; + for (c in b) "row" !== c && "column" !== c && (e[c] = b[c]); + z.qu(a, e) + } else z.qu(a, b); + else z.k('Unknown initializer "' + b + '" for object being constructed by GraphObject.make: ' + a) + } + var hn = new na("string", "function"); + O.getBuilders = function() { + var a = new na("string", "function"), + b; + for (b in hn) + if (b !== b.toLowerCase()) { + var c = hn[b]; + "function" === typeof c && a.add(b, c) + } + a.freeze(); + return a + }; + var Sn; + O.defineBuilder = Sn = function(a, b) { + z.g(a, "string", O, "defineBuilder:name"); + z.g(b, "function", O, "defineBuilder:func"); + var c = a.toLowerCase(); + "" !== a && "none" !== c && a !== c || z.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: " + a); + hn.add(a, b) + }; + var Tn; + O.takeBuilderArgument = Tn = function(a, b, c) { + void 0 === c && (c = null); + var d = a[1]; + if ("function" === typeof c ? c(d) : "string" === typeof d) return a.splice(1, 1), d; + if (void 0 === b) throw Error("no " + ("function" === typeof c ? "satisfactory" : "string") + " argument for GraphObject builder " + a[0]); + return b + }; + Sn("Button", function() { + var a = new Da(sg); + a.addColorStop(0, "white"); + a.addColorStop(1, "lightgray"); + var b = new Da(sg); + b.addColorStop(0, "white"); + b.addColorStop(1, "dodgerblue"); + a = gn(I, Dk, { + Mt: !0 + }, { + _buttonFillNormal: a, + _buttonStrokeNormal: "gray", + _buttonFillOver: b, + _buttonStrokeOver: "blue" + }, gn(X, { + name: "ButtonBorder", + Hb: "Rectangle", + C: new Q(0, 0, 2.761423749153968, 2.761423749153968), + D: new Q(1, 1, -2.761423749153968, -2.761423749153968), + fill: a, + stroke: "gray" + })); + a.au = function(a, b) { + var e = b.oe("ButtonBorder"); + if (e instanceof X) { + var g = b._buttonFillOver; + b._buttonFillNormal = e.fill; + e.fill = g; + g = b._buttonStrokeOver; + b._buttonStrokeNormal = e.stroke; + e.stroke = g + } + }; + a.bu = function(a, b) { + var e = b.oe("ButtonBorder"); + e instanceof X && (e.fill = b._buttonFillNormal, e.stroke = b._buttonStrokeNormal) + }; + return a + }); + Sn("TreeExpanderButton", function() { + var a = gn("Button", { + _treeExpandedFigure: "MinusLine", + _treeCollapsedFigure: "PlusLine" + }, gn(X, { + name: "ButtonIcon", + Hb: "MinusLine", + Aa: ae + }, (new Xg("figure", "isTreeExpanded", function(a, c) { + var d = c.U; + return a ? d._treeExpandedFigure : d._treeCollapsedFigure + })).ux()), { + visible: !1 + }, (new Xg("visible", "isTreeLeaf", function(a) { + return !a + })).ux()); + a.click = function(a, c) { + var d = c.ca; + d instanceof da && (d = d.Wf); + if (d instanceof E) { + var e = d.h; + if (null !== e) { + e = e.wb; + if (d.vd) { + if (!e.canCollapseTree(d)) return + } else if (!e.canExpandTree(d)) return; + a.Gc = !0; + d.vd ? e.collapseTree(d) : e.expandTree(d) + } + } + }; + return a + }); + Sn("SubGraphExpanderButton", function() { + var a = gn("Button", { + _subGraphExpandedFigure: "MinusLine", + _subGraphCollapsedFigure: "PlusLine" + }, gn(X, { + name: "ButtonIcon", + Hb: "MinusLine", + Aa: ae + }, (new Xg("figure", "isSubGraphExpanded", function(a, c) { + var d = c.U; + return a ? d._subGraphExpandedFigure : d._subGraphCollapsedFigure + })).ux())); + a.click = function(a, c) { + var d = c.ca; + d instanceof da && (d = d.Wf); + if (d instanceof F) { + var e = d.h; + if (null !== e) { + e = e.wb; + if (d.re) { + if (!e.canCollapseSubGraph(d)) return + } else if (!e.canExpandSubGraph(d)) return; + a.Gc = !0; + d.re ? e.collapseSubGraph(d) : e.expandSubGraph(d) + } + } + }; + return a + }); + Sn("ContextMenuButton", function() { + var a = gn("Button"); + a.stretch = Cm; + var b = a.oe("ButtonBorder"); + b instanceof X && (b.Hb = "Rectangle", b.C = new Q(0, 0, 2, 3), b.D = new Q(1, 1, -2, -2)); + return a + }); + Sn("PanelExpanderButton", function(a) { + var b = Tn(a, "COLLAPSIBLE"); + a = gn("Button", gn(X, "TriangleUp", { + Aa: new Ea(6, 4) + }, (new Xg("figure", "visible", function(a) { + return a ? "TriangleUp" : "TriangleDown" + })).ux(b))); + var c = a.oe("ButtonBorder"); + c instanceof X && (c.stroke = null, c.fill = "transparent"); + a.click = function(a, c) { + var g = c.h; + if (null !== g && !g.jb) { + var h = c.ca.oe(b); + null !== h && (g.Wb("Collapse/Expand Panel"), h.visible = !h.visible, g.Jd("Collapse/Expand Panel")) + } + }; + return a + }); + Sn("CheckBoxButton", function(a) { + var b = Tn(a); + a = gn("Button", { + "ButtonBorder.fill": "white", + "ButtonBorder.stroke": "gray", + width: 14, + height: 14 + }, gn(X, { + name: "ButtonIcon", + LH: "M0 4 L3 9 9 0", + ub: 2, + stretch: lf, + Zz: bj, + visible: !1 + }, "" !== b ? (new Xg("visible", b)).yI() : [])); + a.click = function(a, d) { + if (!(a.h.jb || "" !== b && a.h.ha.jb)) { + a.Gc = !0; + var e = d.oe("ButtonIcon"); + e.h.Wb("checkbox"); + e.visible = !e.visible; + "function" === typeof d._doClick && d._doClick(a, d); + e.h.Jd("checkbox") + } + }; + return a + }); + Sn("CheckBox", function(a) { + a = Tn(a); + a = gn("CheckBoxButton", a, { + name: "Button", + margin: new Db(0, 1, 0, 0) + }); + var b = gn(I, "Horizontal", a, { + Mt: !0, + margin: 1, + _buttonFillNormal: a._buttonFillNormal, + _buttonStrokeNormal: a._buttonStrokeNormal, + _buttonFillOver: a._buttonFillOver, + _buttonStrokeOver: a._buttonStrokeOver, + au: a.au, + bu: a.bu, + click: a.click, + _buttonClick: a.click + }); + a.au = null; + a.bu = null; + a.click = null; + return b + }); + + function Em() { + this.yi = this.Wi = this.hq = this.kq = this.jq = this.iq = this.Mi = this.Qr = this.Pr = this.Ni = this.Oi = this.Pi = this.Sr = this.Rr = this.xi = this.Ci = this.ui = null + } + Em.prototype.copy = function() { + var a = new Em; + a.ui = this.ui; + a.Ci = this.Ci; + a.xi = this.xi; + a.Rr = this.Rr; + a.Sr = this.Sr; + a.Pi = this.Pi; + a.Oi = this.Oi; + a.Ni = this.Ni; + a.Pr = this.Pr; + a.Qr = this.Qr; + a.Mi = this.Mi; + a.iq = this.iq; + a.jq = this.jq; + a.kq = this.kq; + a.hq = this.hq; + a.Wi = this.Wi; + a.yi = this.yi; + return a + }; + + function I(a) { + O.call(this); + void 0 === a ? 0 === arguments.length ? this.ba = ej : z.k("invalid argument to Panel constructor: undefined") : (z.Ba(a, I, I, "type"), this.ba = a); + this.va = new J(O); + this.df = Kd; + this.dh = !1; + this.ba === Gk && (this.dh = !0); + this.hr = !1; + this.Lq = Pc; + this.Bi = Am; + this.ba === ga && Un(this); + this.Zo = bj; + this.cr = ce; + this.dr = Id; + this.Nk = this.fe = null; + this.vr = NaN; + this.sg = this.Ii = null; + this.vo = "category"; + this.rg = null; + this.Yi = new w(NaN, NaN, NaN, NaN); + this.Lm = null; + this.Ph = !1; + this.vs = null + } + z.Qa(I, O); + z.ii(I); + z.ia("Panel", I); + + function Un(a) { + a.Aj = Kd; + a.Mh = 1; + a.Ai = null; + a.hm = null; + a.Lh = 1; + a.Kh = null; + a.gm = null; + a.Wd = []; + a.Sd = []; + a.Gm = Vn; + a.fm = Vn; + a.Xi = 0; + a.Ji = 0 + } + I.prototype.cloneProtected = function(a) { + O.prototype.cloneProtected.call(this, a); + a.ba = this.ba; + a.df = this.df.V(); + a.dh = this.dh; + a.hr = this.hr; + a.Lq = this.Lq.V(); + a.Bi = this.Bi; + if (a.ba === ga) { + a.Aj = this.Aj.V(); + a.Mh = this.Mh; + a.Ai = this.Ai; + a.hm = this.hm; + a.Lh = this.Lh; + a.Kh = this.Kh; + a.gm = this.gm; + var b = []; + if (0 < this.Wd.length) + for (var c = this.Wd, d = c.length, e = 0; e < d; e++) + if (void 0 !== c[e]) { + var g = c[e].copy(); + g.Tl(a); + b[e] = g + } + a.Wd = b; + b = []; + if (0 < this.Sd.length) + for (c = this.Sd, d = c.length, e = 0; e < d; e++) void 0 !== c[e] && (g = c[e].copy(), g.Tl(a), + b[e] = g); + a.Sd = b; + a.Gm = this.Gm; + a.fm = this.fm; + a.Xi = this.Xi; + a.Ji = this.Ji + } + a.Zo = this.Zo; + a.cr = this.cr.V(); + a.dr = this.dr.V(); + a.fe = this.fe; + a.Nk = this.Nk; + a.vr = this.vr; + a.Ii = this.Ii; + a.sg = this.sg; + a.vo = this.vo; + a.Yi.assign(this.Yi); + a.Ph = this.Ph; + null !== this.vs && (a.vs = this.vs) + }; + I.prototype.ji = function(a) { + O.prototype.ji.call(this, a); + a.va = this.va; + for (var b = a.va.o, c = b.length, d = 0; d < c; d++) b[d].lh = a; + a.Lm = null + }; + I.prototype.copy = function() { + var a = O.prototype.copy.call(this); + if (null !== a) { + for (var b = this.va.o, c = b.length, d = 0; d < c; d++) { + var e = b[d].copy(), + g = a; + e.Tl(g); + e.Bm = null; + var h = g.va, + k = h.count; + h.Ld(k, e); + h = g.ca; + if (null !== h) { + h.il = null; + null !== e.yd && h instanceof E && (h.Ph = !0); + var l = g.h; + null !== l && l.pa.qb || h.Rc(Uf, "elements", g, null, e, null, k) + } + } + return a + } + return null + }; + I.prototype.toString = function() { + return "Panel(" + this.type + ")#" + z.nd(this) + }; + var ej; + I.Position = ej = z.s(I, "Position", 0); + I.Horizontal = z.s(I, "Horizontal", 1); + var Ck; + I.Vertical = Ck = z.s(I, "Vertical", 2); + var Yi; + I.Spot = Yi = z.s(I, "Spot", 3); + var Dk; + I.Auto = Dk = z.s(I, "Auto", 4); + var ga; + I.Table = ga = z.s(I, "Table", 5); + I.Viewbox = z.s(I, "Viewbox", 6); + var Qm; + I.TableRow = Qm = z.s(I, "TableRow", 7); + var Rm; + I.TableColumn = Rm = z.s(I, "TableColumn", 8); + var Ki; + I.Link = Ki = z.s(I, "Link", 9); + var Gk; + I.Grid = Gk = z.s(I, "Grid", 10); + z.defineProperty(I, { + type: "type" + }, function() { + return this.ba + }, function(a) { + var b = this.ba; + b !== a && (u && z.Ba(a, I, I, "type"), b !== Qm && b !== Rm || z.k("Cannot change Panel.type when it is already a TableRow or a TableColumn: " + a), this.ba = a, this.ba === Gk ? this.dh = !0 : this.ba === ga && Un(this), this.S(), this.j("type", b, a)) + }); + z.w(I, { + elements: "elements" + }, function() { + return this.va.i + }); + z.w(I, { + Ga: "naturalBounds" + }, function() { + return this.Wc + }); + z.defineProperty(I, { + padding: "padding" + }, function() { + return this.df + }, function(a) { + "number" === typeof a ? (0 > a && z.ka(a, ">= 0", I, "padding"), a = new Db(a)) : (z.l(a, Db, I, "padding"), 0 > a.left && z.ka(a.left, ">= 0", I, "padding:value.left"), 0 > a.right && z.ka(a.right, ">= 0", I, "padding:value.right"), 0 > a.top && z.ka(a.top, ">= 0", I, "padding:value.top"), 0 > a.bottom && z.ka(a.bottom, ">= 0", I, "padding:value.bottom")); + var b = this.df; + b.N(a) || (this.df = a = a.V(), this.S(), this.j("padding", b, a)) + }); + z.defineProperty(I, { + Bl: "defaultAlignment" + }, function() { + return this.Lq + }, function(a) { + var b = this.Lq; + b.N(a) || (u && z.l(a, Q, I, "defaultAlignment"), this.Lq = a = a.V(), this.S(), this.j("defaultAlignment", b, a)) + }); + z.defineProperty(I, { + Xd: "defaultStretch" + }, function() { + return this.Bi + }, function(a) { + var b = this.Bi; + b !== a && (z.Ba(a, O, I, "defaultStretch"), this.Bi = a, this.S(), this.j("defaultStretch", b, a)) + }); + z.defineProperty(I, { + qK: "defaultSeparatorPadding" + }, function() { + return void 0 === this.Aj ? Kd : this.Aj + }, function(a) { + if (void 0 !== this.Aj) { + "number" === typeof a ? a = new Db(a) : u && z.l(a, Db, I, "defaultSeparatorPadding"); + var b = this.Aj; + b.N(a) || (this.Aj = a = a.V(), this.j("defaultSeparatorPadding", b, a)) + } + }); + z.defineProperty(I, { + oK: "defaultRowSeparatorStroke" + }, function() { + return void 0 === this.Ai ? null : this.Ai + }, function(a) { + var b = this.Ai; + b !== a && (null === a || "string" === typeof a || a instanceof Da) && (a instanceof Da && a.freeze(), this.Ai = a, this.j("defaultRowSeparatorStroke", b, a)) + }); + z.defineProperty(I, { + pK: "defaultRowSeparatorStrokeWidth" + }, function() { + return void 0 === this.Mh ? 1 : this.Mh + }, function(a) { + if (void 0 !== this.Mh) { + var b = this.Mh; + b !== a && isFinite(a) && 0 <= a && (this.Mh = a, this.j("defaultRowSeparatorStrokeWidth", b, a)) + } + }); + z.defineProperty(I, { + nK: "defaultRowSeparatorDashArray" + }, function() { + return void 0 === this.hm ? null : this.hm + }, function(a) { + if (void 0 !== this.hm) { + var b = this.hm; + if (b !== a) { + null === a || Array.isArray(a) || z.ic(a, "Array", I, "defaultRowSeparatorDashArray:value"); + if (null !== a) { + for (var c = a.length, d = 0, e = 0; e < c; e++) { + var g = a[e]; + "number" === typeof g && 0 <= g && isFinite(g) || z.k("defaultRowSeparatorDashArray value " + g + " at index " + e + " must be a positive number or zero."); + d += g + } + if (0 === d) { + if (null === b) return; + a = null + } + } + this.hm = a; + this.ta(); + this.j("defaultRowSeparatorDashArray", b, a) + } + } + }); + z.defineProperty(I, { + iK: "defaultColumnSeparatorStroke" + }, function() { + return void 0 === this.Kh ? null : this.Kh + }, function(a) { + if (void 0 !== this.Kh) { + var b = this.Kh; + b !== a && (null === a || "string" === typeof a || a instanceof Da) && (a instanceof Da && a.freeze(), this.Kh = a, this.j("defaultColumnSeparatorStroke", b, a)) + } + }); + z.defineProperty(I, { + jK: "defaultColumnSeparatorStrokeWidth" + }, function() { + return void 0 === this.Lh ? 1 : this.Lh + }, function(a) { + if (void 0 !== this.Lh) { + var b = this.Lh; + b !== a && isFinite(a) && 0 <= a && (this.Lh = a, this.j("defaultColumnSeparatorStrokeWidth", b, a)) + } + }); + z.defineProperty(I, { + hK: "defaultColumnSeparatorDashArray" + }, function() { + return void 0 === this.gm ? null : this.gm + }, function(a) { + if (void 0 !== this.gm) { + var b = this.gm; + if (b !== a) { + null === a || Array.isArray(a) || z.ic(a, "Array", I, "defaultColumnSeparatorDashArray:value"); + if (null !== a) { + for (var c = a.length, d = 0, e = 0; e < c; e++) { + var g = a[e]; + "number" === typeof g && 0 <= g && isFinite(g) || z.k("defaultColumnSeparatorDashArray value " + g + " at index " + e + " must be a positive number or zero."); + d += g + } + if (0 === d) { + if (null === b) return; + a = null + } + } + this.gm = + a; + this.ta(); + this.j("defaultColumnSeparatorDashArray", b, a) + } + } + }); + z.defineProperty(I, { + FL: "viewboxStretch" + }, function() { + return this.Zo + }, function(a) { + var b = this.Zo; + b !== a && (z.Ba(a, O, I, "viewboxStretch"), this.Zo = a, this.j("viewboxStretch", b, a)) + }); + z.defineProperty(I, { + bx: "gridCellSize" + }, function() { + return this.cr + }, function(a) { + var b = this.cr; + b.N(a) || (z.l(a, Ea, I, "gridCellSize"), a.F() && 0 !== a.width && 0 !== a.height || z.k("Invalid Panel.gridCellSize: " + a), this.cr = a.V(), null !== this.h && this === this.h.Gt && hl(this.h), this.ta(), this.j("gridCellSize", b, a)) + }); + z.defineProperty(I, { + AE: "gridOrigin" + }, function() { + return this.dr + }, function(a) { + var b = this.dr; + b.N(a) || (z.l(a, N, I, "gridOrigin"), a.F() || z.k("Invalid Panel.gridOrigin: " + a), this.dr = a.V(), null !== this.h && hl(this.h), this.ta(), this.j("gridOrigin", b, a)) + }); + f = I.prototype; + f.Sv = function(a) { + O.prototype.Sv.call(this, a); + for (var b = this.va.o, c = b.length, d = 0; d < c; d++) b[d].Sv(a) + }; + f.nk = function(a, b) { + if (this.ba === Gk) { + var c = this.gj() * b.scale; + 0 >= c && (c = 1); + var d = this.bx, + e = d.width, + d = d.height, + g = this.Ga, + h = g.width, + g = g.height, + k = Math.ceil(h / e), + l = Math.ceil(g / d), + m = this.AE; + a.save(); + a.beginPath(); + a.rect(0, 0, h, g); + a.clip(); + for (var n = [], p = this.va.o, q = p.length, r = 0; r < q; r++) { + var s = p[r], + t = []; + n.push(t); + if (s.visible) + for (var s = Gl(s.Hb), v = r + 1; v < q; v++) { + var x = p[v]; + x.visible && Gl(x.Hb) === s && (x = x.interval, 2 <= x && t.push(x)) + } + } + p = this.va.o; + q = p.length; + for (r = 0; r < q; r++) { + var y = p[r]; + if (y.visible && (t = y.interval, !(2 > + e * t * c))) { + var s = n[r], + v = !1, + A = !0, + B = y.QF; + null !== B && (v = !0, A = a.Tz(B, y.ve)); + if ("LineV" === y.Hb) { + a.lineWidth = y.ub; + Um(this, a, y.stroke, !1, !1); + a.beginPath(); + for (var L = x = Math.floor(-m.x / e); L <= x + k; L++) { + var H = L * e + m.x; + 0 <= H && H < h && Wn(L, t, s) && (v && !A ? Hm(a, H, 0, H, g, B, y.ve) : (a.moveTo(H, 0), a.lineTo(H, g))) + } + a.stroke() + } else if ("LineH" === y.Hb) { + a.lineWidth = y.ub; + Um(this, a, y.stroke, !1, !1); + a.beginPath(); + for (L = x = Math.floor(-m.y / d); L <= x + l; L++) H = L * d + m.y, 0 <= H && H <= g && Wn(L, t, s) && (v && !A ? Hm(a, 0, H, h, H, B, y.ve) : (a.moveTo(0, H), a.lineTo(h, H))); + a.stroke() + } else if ("BarV" === y.Hb) + for (Um(this, a, y.fill, !0, !1), y = y.width, isNaN(y) && (y = e), L = x = Math.floor(-m.x / e); L <= x + k; L++) H = L * e + m.x, 0 <= H && H < h && Wn(L, t, s) && a.fillRect(H, 0, y, g); + else if ("BarH" === y.Hb) + for (Um(this, a, y.fill, !0, !1), y = y.height, isNaN(y) && (y = d), L = x = Math.floor(-m.y / d); L <= x + l; L++) H = L * d + m.y, 0 <= H && H <= g && Wn(L, t, s) && a.fillRect(0, H, h, y); + v && a.Pz() + } + } + a.restore(); + ca(a, !1) + } else { + this.ba === ga && (a.lineCap = "butt", Xn(this, a, !0, this.Wd, !0), Xn(this, a, !1, this.Sd, !0), Yn(this, a, !0, this.Wd), Yn(this, a, !1, this.Sd), Xn(this, + a, !0, this.Wd, !1), Xn(this, a, !1, this.Sd, !1)); + (c = this.KE) && a.save(); + e = this.gf(); + d = this.va.o; + h = d.length; + for (g = 0; g < h; g++) k = d[g], c && k === e && (a.Nw = !0), k.ff(a, b), c && k === e && (a.Nw = !1); + c && (a.restore(), ca(a, !0)); + u && u.BH && this instanceof G && u.AH(a, b, this) + } + }; + + function Yn(a, b, c, d) { + for (var e = d.length, g = a.W, h = c ? a.$d(0) : a.Zd(0), k = 0; k < e; k++) { + var l = d[k]; + if (void 0 !== l && l !== h && 0 !== l.Oa) { + if (c) { + if (l.position > g.height) continue + } else if (l.position > g.width) continue; + var m = l.$p; + isNaN(m) && (m = c ? a.Mh : a.Lh); + var n = l.Zp; + null === n && (n = c ? a.Ai : a.Kh); + if (0 !== m && null !== n) { + Um(a, b, n, !1, !1); + var n = !1, + p = !0, + q = l.iJ; + null !== q && (n = !0, void 0 !== b.setLineDash ? (b.setLineDash(q), b.lineDashOffset = a.ve) : void 0 !== b.webkitLineDash ? (b.webkitLineDash = q, b.webkitLineDashOffset = a.ve) : void 0 !== b.mozDash ? + (b.mozDash = q, b.mozDashOffset = a.ve) : p = !1); + b.beginPath(); + var r = l.position + m; + c ? r > g.height && (m -= r - g.height) : r > g.width && (m -= r - g.width); + l = l.position + m / 2; + b.lineWidth = m; + r = a.padding; + c ? (l += r.top, m = r.left, r = g.width - r.right, n && !p ? Hm(b, m, l, r, l, q, 0) : (b.moveTo(m, l), b.lineTo(r, l))) : (l += r.left, m = r.top, r = g.height - r.bottom, n && !p ? Hm(b, l, m, l, r, q, 0) : (b.moveTo(l, m), b.lineTo(l, r))); + b.stroke(); + n && (void 0 !== b.setLineDash ? (b.setLineDash(z.xj), b.lineDashOffset = 0) : void 0 !== b.webkitLineDash ? (b.webkitLineDash = z.xj, b.webkitLineDashOffset = + 0) : void 0 !== b.mozDash && (b.mozDash = null, b.mozDashOffset = 0)) + } + } + } + } + + function Xn(a, b, c, d, e) { + for (var g = d.length, h = a.W, k = 0; k < g; k++) { + var l = d[k]; + if (void 0 !== l && null !== l.background && l.Mz !== e && 0 !== l.Oa) { + var m = c ? h.height : h.width; + if (!(l.position > m)) { + var n = l.Re(), + p = l.$p; + isNaN(p) && (p = c ? a.Mh : a.Lh); + var q = l.Zp; + null === q && (q = c ? a.Ai : a.Kh); + null === q && (p = 0); + n -= p; + p = l.position + p; + n += l.Oa; + p + n > m && (n = m - p); + 0 >= n || (m = a.padding, Um(a, b, l.background, !0, !1), c ? b.fillRect(m.left, p + m.top, h.width - (m.left + m.right), n) : b.fillRect(p + m.left, m.top, n, h.height - (m.top + m.bottom))) + } + } + } + } + + function Wn(a, b, c) { + if (0 !== a % b) return !1; + b = c.length; + for (var d = 0; d < b; d++) + if (0 === a % c[d]) return !1; + return !0 + } + + function Gl(a) { + return "LineV" === a || "BarV" === a + } + f.tp = function(a, b, c, d, e) { + var g = this.Vg(), + h = this.transform, + k = 1 / (h.m11 * h.m22 - h.m12 * h.m21), + l = h.m22 * k, + m = -h.m12 * k, + n = -h.m21 * k, + p = h.m11 * k, + q = k * (h.m21 * h.dy - h.m22 * h.dx), + r = k * (h.m12 * h.dx - h.m11 * h.dy); + if (null !== this.vl) return h = this.W, Ne(h.left, h.top, h.right, h.bottom, a, b, c, d, e); + if (null !== this.background) g = a * l + b * n + q, k = a * m + b * p + r, a = c * l + d * n + q, c = c * m + d * p + r, e.n(0, 0), d = this.Ga, c = Ne(0, 0, d.width, d.height, g, k, a, c, e), e.transform(h); + else { + g || (l = 1, n = m = 0, p = 1, r = q = 0); + k = a * l + b * n + q; + a = a * m + b * p + r; + l = c * l + d * n + q; + d = c * m + d * p + r; + e.n(l, d); + m = (l - + k) * (l - k) + (d - a) * (d - a); + c = !1; + p = this.va.o; + r = p.length; + n = z.O(); + for (q = 0; q < r; q++) b = p[q], b.visible && b.tp(k, a, l, d, n) && (c = !0, b = (k - n.x) * (k - n.x) + (a - n.y) * (a - n.y), b < m && (m = b, e.set(n))); + z.A(n); + g && e.transform(h) + } + return c + }; + f.S = function(a) { + O.prototype.S.call(this, a); + this.ba === Dk && (a = this.gf(), null !== a && a.S(!0)); + a = this.va.o; + for (var b = a.length, c = 0; c < b; c++) { + var d = a[c]; + !0 !== ml(d) && (d.Aa.F() || (d instanceof Zi || d instanceof I || d instanceof qa || Mm(d, !1) !== $i) && d.S(!0)) + } + }; + f.Ap = function() { + if (!1 === ml(this)) { + Yk(this, !0); + Om(this, !0); + for (var a = this.va.o, b = a.length, c = 0; c < b; c++) a[c].Ap() + } + }; + f.Fi = function() { + if (0 !== (this.ja & 2048) === !1) { + Wm(this, !0); + Xm(this, !0); + for (var a = this.va.o, b = a.length, c = 0; c < b; c++) a[c].eA() + } + }; + f.eA = function() { + Xm(this, !0); + for (var a = this.va.o, b = a.length, c = 0; c < b; c++) a[c].eA() + }; + f.Ip = function(a, b, c, d) { + var e = this.Yi; + e.width = 0; + e.height = 0; + var g = this.Aa, + h = this.cg; + void 0 === c && (c = h.width, d = h.height); + c = Math.max(c, h.width); + d = Math.max(d, h.height); + var k = this.Xe; + isNaN(g.width) || (a = Math.min(g.width, k.width)); + isNaN(g.height) || (b = Math.min(g.height, k.height)); + a = Math.max(c, a); + b = Math.max(d, b); + var l = this.padding; + a = Math.max(a - l.left - l.right, 0); + b = Math.max(b - l.top - l.bottom, 0); + var m = this.va.o; + if (0 !== m.length) { + var n = this.ba.Ub; + switch (n) { + case "Position": + var p = a, + q = b, + r = c, + s = d, + t = m.length; + e.x = 0; + e.y = + 0; + e.width = 0; + for (var v = e.height = 0; v < t; v++) { + var x = m[v]; + if (x.visible || x === this.Zb) { + var y = x.margin, + A = y.right + y.left, + B = y.top + y.bottom; + rj(x, p, q, r, s); + var L = x.Ia, + H = Math.max(L.width + A, 0), + U = Math.max(L.height + B, 0), + ea = x.position.x, + W = x.position.y; + isFinite(ea) || (ea = 0); + isFinite(W) || (W = 0); + if (x instanceof X) { + var P = x; + if (P.ME) var ba = P.ub / 2, + ea = ea - ba, + W = W - ba + } + Ib(e, ea, W, H, U) + } + } + break; + case "Vertical": + for (var Oa = a, sa = c, Na = m.length, ua = z.rb(), Ha = 0; Ha < Na; Ha++) { + var Aa = m[Ha]; + if (Aa.visible || Aa === this.Zb) { + var jc = Mm(Aa, !1); + if (jc !== + $i && jc !== Bm) ua.push(Aa); + else { + var zd = Aa.margin, + Ad = zd.right + zd.left, + Qe = zd.top + zd.bottom; + rj(Aa, Oa, Infinity, sa, 0); + var ac = Aa.Ia, + Ig = Math.max(ac.width + Ad, 0), + Bd = Math.max(ac.height + Qe, 0); + e.width = Math.max(e.width, Ig); + e.height += Bd + } + } + } + var sb = ua.length; + if (0 !== sb) { + this.Aa.width ? Oa = Math.min(this.Aa.width, this.Xe.width) : 0 !== e.width && (Oa = Math.min(e.width, this.Xe.width)); + for (Ha = 0; Ha < sb; Ha++) + if (Aa = ua[Ha], Aa.visible || Aa === this.Zb) zd = Aa.margin, Ad = zd.right + zd.left, Qe = zd.top + zd.bottom, rj(Aa, Oa, Infinity, sa, 0), ac = Aa.Ia, Ig = + Math.max(ac.width + Ad, 0), Bd = Math.max(ac.height + Qe, 0), e.width = Math.max(e.width, Ig), e.height += Bd; + z.xa(ua) + } + break; + case "Horizontal": + for (var gb = b, oa = d, pa = m.length, tb = z.rb(), Xa = 0; Xa < pa; Xa++) { + var Va = m[Xa]; + if (Va.visible || Va === this.Zb) { + var Ae = Mm(Va, !1); + if (Ae !== $i && Ae !== Cm) tb.push(Va); + else { + var Cd = Va.margin, + me = Cd.right + Cd.left, + Rd = Cd.top + Cd.bottom; + rj(Va, Infinity, gb, 0, oa); + var ne = Va.Ia, + Jg = Math.max(ne.width + me, 0), + fd = Math.max(ne.height + Rd, 0); + e.width += Jg; + e.height = Math.max(e.height, fd) + } + } + } + var pi = tb.length; + if (0 !== pi) { + this.Aa.height ? + gb = Math.min(this.Aa.height, this.Xe.height) : 0 !== e.height && (gb = Math.min(e.height, this.Xe.height)); + for (Xa = 0; Xa < pi; Xa++) + if (Va = tb[Xa], Va.visible || Va === this.Zb) Cd = Va.margin, me = Cd.right + Cd.left, Rd = Cd.top + Cd.bottom, rj(Va, Infinity, gb, 0, oa), ne = Va.Ia, Jg = Math.max(ne.width + me, 0), fd = Math.max(ne.height + Rd, 0), e.width += Jg, e.height = Math.max(e.height, fd); + z.xa(tb) + } + break; + case "Spot": + a: { + var Ab = a, + Qb = b, + gd = c, + lh = d, + Lb = m.length, + kb = this.gf(), + cb = kb.margin, + Re = 0, + Sd = 0, + Kg = cb.right + cb.left, + Lg = cb.top + cb.bottom;rj(kb, Ab, Qb, gd, lh); + var kc = + kb.Ia, + lc = kc.width, + oe = kc.height, + hd = Math.max(lc + Kg, 0), + nb = Math.max(oe + Lg, 0);e.x = -cb.left;e.y = -cb.top;e.width = hd;e.height = nb; + for (var Uc = 0; Uc < Lb; Uc++) { + var Qa = m[Uc]; + if (Qa !== kb && (Qa.visible || Qa === this.Zb)) { + cb = Qa.margin; + Re = cb.right + cb.left; + Sd = cb.top + cb.bottom; + rj(Qa, Ab, Qb, 0, 0); + var kc = Qa.Ia, + hd = Math.max(kc.width + Re, 0), + nb = Math.max(kc.height + Sd, 0), + ob = Qa.alignment; + ob.bd() && (ob = this.Bl); + ob.cd() || (ob = ec); + var yc = Qa.jk; + yc.bd() && (yc = ec); + Ib(e, ob.x * lc + ob.offsetX - (yc.x * kc.width - yc.offsetX) - cb.left, ob.y * oe + ob.offsetY - (yc.y * + kc.height - yc.offsetY) - cb.top, hd, nb) + } + } + var Dd = kb.stretch;Dd === Am && (Dd = Mm(kb, !1)); + switch (Dd) { + case $i: + break a; + case lf: + if (!isFinite(Ab) && !isFinite(Qb)) break a; + break; + case Cm: + if (!isFinite(Ab)) break a; + break; + case Bm: + if (!isFinite(Qb)) break a + } + kc = kb.Ia;lc = kc.width;oe = kc.height;hd = Math.max(lc + Kg, 0);nb = Math.max(oe + Lg, 0);cb = kb.margin;e.x = -cb.left;e.y = -cb.top;e.width = hd;e.height = nb; + for (Uc = 0; Uc < Lb; Uc++) Qa = m[Uc], + Qa === kb || !Qa.visible && Qa !== this.Zb || (cb = Qa.margin, Re = cb.right + cb.left, Sd = cb.top + cb.bottom, kc = Qa.Ia, hd = Math.max(kc.width + + Re, 0), nb = Math.max(kc.height + Sd, 0), ob = Qa.alignment, ob.bd() && (ob = this.Bl), ob.cd() || (ob = ec), yc = Qa.jk, yc.bd() && (yc = ec), Ib(e, ob.x * lc + ob.offsetX - (yc.x * kc.width - yc.offsetX) - cb.left, ob.y * oe + ob.offsetY - (yc.y * kc.height - yc.offsetY) - cb.top, hd, nb)) + } + break; + case "Auto": + var Mb = a, + pe = b, + tf = c, + Se = d, + Lf = m.length, + Fb = this.gf(), + Be = Fb.margin, + Rb = Be.right + Be.left, + Vb = Be.top + Be.bottom; + rj(Fb, Mb, pe, tf, Se); + var Nb = Fb.Ia, + Jc = 0; + if (Fb instanceof X) var lb = Fb, + Jc = lb.ub * lb.scale; + var Gb = Math.max(Nb.width + Rb, 0), + Ob = Math.max(Nb.height + Vb, 0), + Td = + Zn(Fb), + Mg = Td.x * Gb + Td.offsetX, + mh = Td.y * Ob + Td.offsetY, + Td = $n(Fb), + nh = Td.x * Gb + Td.offsetX, + Ce = Td.y * Ob + Td.offsetY, + Kc = Mb, + De = pe; + isFinite(Mb) && (Kc = Math.max(Math.abs(Mg - nh) - Jc, 0)); + isFinite(pe) && (De = Math.max(Math.abs(mh - Ce) - Jc, 0)); + var mc = z.Xl(); + mc.n(0, 0); + for (var Bb = 0; Bb < Lf; Bb++) { + var Cb = m[Bb]; + if (Cb !== Fb && (Cb.visible || Cb === this.Zb)) { + var Be = Cb.margin, + Lc = Be.right + Be.left, + Ng = Be.top + Be.bottom; + rj(Cb, Kc, De, 0, 0); + Nb = Cb.Ia; + Gb = Math.max(Nb.width + Lc, 0); + Ob = Math.max(Nb.height + Ng, 0); + mc.n(Math.max(Gb, mc.width), Math.max(Ob, mc.height)) + } + } + if (1 === + Lf) e.width = Gb, e.height = Ob, z.pk(mc); + else { + var Vc = Zn(Fb), + Wc = $n(Fb), + mb = 0, + Mc = 0; + Wc.x !== Vc.x && Wc.y !== Vc.y && (mb = mc.width / Math.abs(Wc.x - Vc.x), Mc = mc.height / Math.abs(Wc.y - Vc.y)); + z.pk(mc); + Jc = 0; + Fb instanceof X && (lb = Fb, Jc = lb.ub * lb.scale, aj(lb) === bj && (mb = Mc = Math.max(mb, Mc))); + var mb = mb + (Math.abs(Vc.offsetX) + Math.abs(Wc.offsetX) + Jc), + Mc = Mc + (Math.abs(Vc.offsetY) + Math.abs(Wc.offsetY) + Jc), + Ud = Fb.stretch; + Ud === Am && (Ud = Mm(Fb, !1)); + switch (Ud) { + case $i: + Se = tf = 0; + break; + case lf: + isFinite(Mb) && (mb = Mb); + isFinite(pe) && (Mc = pe); + break; + case Cm: + isFinite(Mb) && + (mb = Mb); + Se = 0; + break; + case Bm: + tf = 0, isFinite(pe) && (Mc = pe) + } + Fb instanceof X && !Fb.Aa.F() && (lb = Fb, lb.Yh ? lb.Nn = null : lb.ab = null); + Fb.Ap(); + rj(Fb, mb, Mc, tf, Se); + e.width = Fb.Ia.width + Rb; + e.height = Fb.Ia.height + Vb + } + break; + case "Table": + for (var Vd = a, uf = b, Og = c, vj = d, La = m.length, Te = z.rb(), qe = z.rb(), ia = 0; ia < La; ia++) { + var fa = m[ia], + id = fa instanceof I ? fa : null; + if (null === id || id.type !== Qm && id.type !== Rm || !fa.visible) Te.push(fa); + else { + u && (id.Aa.F() && z.k(id.toString() + " TableRow/TableColumn Panels cannot set a desiredSize: " + id.Aa.toString()), + id.cg.N(Pd) || z.k(id.toString() + " TableRow/TableColumn Panels cannot set a minSize: " + id.cg.toString()), id.Xe.N(de) || z.k(id.toString() + " TableRow/TableColumn Panels cannot set a maxSize: " + id.Xe.toString())); + qe.push(fa); + for (var oh = id.va.o, qi = oh.length, zc = 0; zc < qi; zc++) { + var ri = oh[zc]; + id.type === Qm ? ri.Vb = fa.Vb : id.type === Rm && (ri.column = fa.column); + Te.push(ri) + } + } + } + La = Te.length; + 0 === La && (this.$d(0), this.Zd(0)); + for (var bc = [], ia = 0; ia < La; ia++) fa = Te[ia], Yk(fa, !0), Om(fa, !0), bc[fa.Vb] || (bc[fa.Vb] = []), bc[fa.Vb][fa.column] || + (bc[fa.Vb][fa.column] = []), bc[fa.Vb][fa.column].push(fa); + z.xa(Te); + for (var ph = z.rb(), jd = z.rb(), Ee = z.rb(), Nc = { + count: 0 + }, kd = { + count: 0 + }, Ac = Vd, ld = uf, cg = this.Wd, La = cg.length, ia = 0; ia < La; ia++) { + var Z = cg[ia]; + void 0 !== Z && (Z.Oa = 0) + } + cg = this.Sd; + La = cg.length; + for (ia = 0; ia < La; ia++) Z = cg[ia], void 0 !== Z && (Z.Oa = 0); + for (var Fe = bc.length, Ue = 0, ia = 0; ia < Fe; ia++) bc[ia] && (Ue = Math.max(Ue, bc[ia].length)); + for (var si = Math.min(this.Xi, Fe - 1), ti = Math.min(this.Ji, Ue - 1), Oc = 0, Fe = bc.length, ia = 0; ia < Fe; ia++) + if (bc[ia]) + for (var Ue = bc[ia].length, + pb = this.$d(ia), zc = pb.Oa = 0; zc < Ue; zc++) + if (bc[ia][zc]) { + var qb = this.Zd(zc); + void 0 === ph[zc] && (qb.Oa = 0, ph[zc] = !0); + for (var Xk = bc[ia][zc], dg = Xk.length, Pg = 0; Pg < dg; Pg++) + if (fa = Xk[Pg], fa.visible || fa === this.Zb) { + var Qg = 1 < fa.Ti || 1 < fa.wi; + Qg && (ia < si || zc < ti || jd.push(fa)); + var Wb = fa.margin, + eg = Wb.right + Wb.left, + fg = Wb.top + Wb.bottom, + Xc = Zm(fa, pb, qb, !1), + Ge = fa.Aa, + un = !isNaN(Ge.height), + ui = !isNaN(Ge.width) && un; + Qg || Xc === $i || ui || ia < si || zc < ti || (void 0 !== Nc[zc] || Xc !== lf && Xc !== Cm || (Nc[zc] = -1, Nc.count++), void 0 !== kd[ia] || Xc !== lf && Xc !== + Bm || (kd[ia] = -1, kd.count++), Ee.push(fa)); + rj(fa, Infinity, Infinity, 0, 0); + if (!(ia < si || zc < ti)) { + var Ve = fa.Ia, + We = Math.max(Ve.width + eg, 0), + Ed = Math.max(Ve.height + fg, 0); + if (1 === fa.Ti && (Xc === $i || Xc === Cm)) { + var Z = this.$d(ia), + md = Z.Re(), + Oc = Math.max(Ed - Z.Oa, 0); + Oc + md > ld && (Oc = Math.max(ld - md, 0)); + var qh = 0 === Z.Oa; + Z.Oa += Oc; + ld = Math.max(ld - (Oc + (qh ? md : 0)), 0) + } + 1 !== fa.wi || Xc !== $i && Xc !== Bm || (Z = this.Zd(zc), md = Z.Re(), Oc = Math.max(We - Z.Oa, 0), Oc + md > Ac && (Oc = Math.max(Ac - md, 0)), qh = 0 === Z.Oa, Z.Oa += Oc, Ac = Math.max(Ac - (Oc + (qh ? md : 0)), 0)); + Qg && + fa.Ap() + } + } + } + z.xa(ph); + for (var Wd = 0, Xd = 0, La = this.gp, ia = 0; ia < La; ia++) { + var rh = this.Sd[ia]; + void 0 !== rh && (Wd += rh.Xa, 0 !== rh.Xa && (Wd += rh.Re())) + } + La = this.Yp; + for (ia = 0; ia < La; ia++) { + var sh = this.Wd[ia]; + void 0 !== sh && (Xd += sh.Xa, 0 !== sh.Xa && (Xd += sh.Re())) + } + for (var Ac = Math.max(Vd - Wd, 0), nd = ld = Math.max(uf - Xd, 0), Rg = Ac, La = Ee.length, ia = 0; ia < La; ia++) { + var fa = Ee[ia], + pb = this.$d(fa.Vb), + qb = this.Zd(fa.column), + vf = fa.Ia, + Wb = fa.margin, + eg = Wb.right + Wb.left, + fg = Wb.top + Wb.bottom; + Nc[fa.column] = 0 === qb.Oa && void 0 !== Nc[fa.column] ? Math.max(vf.width + + eg, Nc[fa.column]) : null; + kd[fa.Vb] = 0 === pb.Oa && void 0 !== kd[fa.Vb] ? Math.max(vf.height + fg, kd[fa.Vb]) : null + } + var nc = 0, + th = 0; + for (ia in kd) "count" !== ia && (nc += kd[ia]); + for (ia in Nc) "count" !== ia && (th += Nc[ia]); + for (var rb = z.Xl(), ia = 0; ia < La; ia++) + if (fa = Ee[ia], fa.visible || fa === this.Zb) { + var pb = this.$d(fa.Vb), + qb = this.Zd(fa.column), + He = 0; + isFinite(qb.width) ? He = qb.width : (He = isFinite(Ac) && null !== Nc[fa.column] ? 0 === th ? qb.Oa + Ac : Nc[fa.column] / th * Rg : null !== Nc[fa.column] ? Ac : qb.Oa || Ac, He = Math.max(0, He - qb.Re())); + var Mf = 0; + isFinite(pb.height) ? + Mf = pb.height : (Mf = isFinite(ld) && null !== kd[fa.Vb] ? 0 === nc ? pb.Oa + ld : kd[fa.Vb] / nc * nd : null !== kd[fa.Vb] ? ld : pb.Oa || ld, Mf = Math.max(0, Mf - pb.Re())); + rb.n(Math.max(qb.pj, Math.min(He, qb.qf)), Math.max(pb.pj, Math.min(Mf, pb.qf))); + Xc = Zm(fa, pb, qb, !1); + switch (Xc) { + case Cm: + rb.height = Math.max(rb.height, pb.Oa + ld); + break; + case Bm: + rb.width = Math.max(rb.width, qb.Oa + Ac) + } + Wb = fa.margin; + eg = Wb.right + Wb.left; + fg = Wb.top + Wb.bottom; + fa.Ap(); + rj(fa, rb.width, rb.height, qb.pj, pb.pj); + Ve = fa.Ia; + We = Math.max(Ve.width + eg, 0); + Ed = Math.max(Ve.height + fg, + 0); + isFinite(Ac) && (We = Math.min(We, rb.width)); + isFinite(ld) && (Ed = Math.min(Ed, rb.height)); + var wf = 0, + wf = pb.Oa; + pb.Oa = Math.max(pb.Oa, Ed); + Oc = pb.Oa - wf; + ld = Math.max(ld - Oc, 0); + wf = qb.Oa; + qb.Oa = Math.max(qb.Oa, We); + Oc = qb.Oa - wf; + Ac = Math.max(Ac - Oc, 0) + } + z.xa(Ee); + for (var Yd = z.Xl(), La = jd.length, ia = 0; ia < La; ia++) + if (fa = jd[ia], fa.visible || fa === this.Zb) { + pb = this.$d(fa.Vb); + qb = this.Zd(fa.column); + rb.n(Math.max(qb.pj, Math.min(Vd, qb.qf)), Math.max(pb.pj, Math.min(uf, pb.qf))); + Xc = Zm(fa, pb, qb, !1); + switch (Xc) { + case lf: + 0 !== qb.Oa && (rb.width = Math.min(rb.width, + qb.Oa)); + 0 !== pb.Oa && (rb.height = Math.min(rb.height, pb.Oa)); + break; + case Cm: + 0 !== qb.Oa && (rb.width = Math.min(rb.width, qb.Oa)); + break; + case Bm: + 0 !== pb.Oa && (rb.height = Math.min(rb.height, pb.Oa)) + } + isFinite(qb.width) && (rb.width = qb.width); + isFinite(pb.height) && (rb.height = pb.height); + Yd.n(0, 0); + for (var hb = 1; hb < fa.Ti && !(fa.Vb + hb >= this.Yp); hb++) Z = this.$d(fa.Vb + hb), Yd.height += Math.max(Z.pj, isNaN(Z.ef) ? Z.qf : Math.min(Z.ef, Z.qf)); + for (hb = 1; hb < fa.wi && !(fa.column + hb >= this.gp); hb++) Z = this.Zd(fa.column + hb), Yd.width += Math.max(Z.pj, + isNaN(Z.ef) ? Z.qf : Math.min(Z.ef, Z.qf)); + rb.width += Yd.width; + rb.height += Yd.height; + Wb = fa.margin; + eg = Wb.right + Wb.left; + fg = Wb.top + Wb.bottom; + rj(fa, rb.width, rb.height, Og, vj); + for (var Ve = fa.Ia, We = Math.max(Ve.width + eg, 0), Ed = Math.max(Ve.height + fg, 0), Sg = 0, hb = 0; hb < fa.Ti && !(fa.Vb + hb >= this.Yp); hb++) Z = this.$d(fa.Vb + hb), Sg += Z.total || 0; + if (Sg < Ed) { + var rc = Ed - Sg, + Bc = Ed - Sg; + if (null !== fa.Qx) + for (var Fd = fa.Qx, hb = 0; hb < fa.Ti && !(0 >= rc) && !(fa.Vb + hb >= this.Yp); hb++) { + var Z = this.$d(fa.Vb + hb), + Sb = Z.Xa || 0, + Zd = Fd(fa, Z, Bc); + u && "number" !== typeof Zd && + z.k(fa + " spanAllocation does not return a number: " + Zd); + Z.Oa = Math.min(Z.qf, Sb + Zd); + Z.Xa !== Sb && (rc -= Z.Xa - Sb) + } + for (; 0 < rc;) { + Sb = Z.Xa || 0; + isNaN(Z.height) && Z.qf > Sb && (Z.Oa = Math.min(Z.qf, Sb + rc), Z.Xa !== Sb && (rc -= Z.Xa - Sb)); + if (0 === Z.index) break; + Z = this.$d(Z.index - 1) + } + } + for (var Ie = 0, hb = 0; hb < fa.wi && !(fa.column + hb >= this.gp); hb++) Z = this.Zd(fa.column + hb), Ie += Z.total || 0; + if (Ie < We) { + rc = We - Ie; + Bc = We - Ie; + if (null !== fa.Qx) + for (Fd = fa.Qx, hb = 0; hb < fa.wi && !(0 >= rc) && !(fa.column + hb >= this.gp); hb++) Z = this.Zd(fa.column + hb), Sb = Z.Xa || 0, Zd = Fd(fa, + Z, Bc), u && "number" !== typeof Zd && z.k(fa + " spanAllocation does not return a number: " + Zd), Z.Oa = Math.min(Z.qf, Sb + Zd), Z.Xa !== Sb && (rc -= Z.Xa - Sb); + for (; 0 < rc;) { + Sb = Z.Xa || 0; + isNaN(Z.width) && Z.qf > Sb && (Z.Oa = Math.min(Z.qf, Sb + rc), Z.Xa !== Sb && (rc -= Z.Xa - Sb)); + if (0 === Z.index) break; + Z = this.Zd(Z.index - 1) + } + } + } + z.xa(jd); + z.pk(Yd); + z.pk(rb); + for (var gg = 0, hg = 0, Xc = Mm(this, !0), xf = this.Aa, wj = this.Xe, $d = Xd = Wd = 0, Yc = 0, La = this.gp, ia = 0; ia < La; ia++) void 0 !== this.Sd[ia] && (Z = this.Zd(ia), isFinite(Z.width) ? ($d += Z.width, $d += Z.Re()) : ao(Z) === bo ? ($d += + Z.Xa, $d += Z.Re()) : 0 !== Z.Xa && (Wd += Z.Xa, Wd += Z.Re())); + var gg = isFinite(xf.width) ? Math.min(xf.width, wj.width) : Xc !== $i && isFinite(Vd) ? Vd : Wd, + gg = Math.max(gg, this.cg.width), + gg = Math.max(gg - $d, 0), + vh = Math.max(gg / Wd, 1); + isFinite(vh) || (vh = 1); + for (ia = 0; ia < La; ia++) void 0 !== this.Sd[ia] && (Z = this.Zd(ia), isFinite(Z.width) || ao(Z) === bo || (Z.Oa = Z.Xa * vh), Z.position = e.width, 0 !== Z.Xa && (e.width += Z.Xa, e.width += Z.Re())); + La = this.Yp; + for (ia = 0; ia < La; ia++) void 0 !== this.Wd[ia] && (Z = this.$d(ia), isFinite(Z.height) ? (Yc += Z.height, Yc += Z.Re()) : + ao(Z) === bo ? (Yc += Z.Xa, Yc += Z.Re()) : 0 !== Z.Xa && (Xd += Z.Xa, 0 !== Z.Xa && (Xd += Z.Re()))); + var hg = isFinite(xf.height) ? Math.min(xf.height, wj.height) : Xc !== $i && isFinite(uf) ? uf : Xd, + hg = Math.max(hg, this.cg.height), + hg = Math.max(hg - Yc, 0), + wh = Math.max(hg / Xd, 1); + isFinite(wh) || (wh = 1); + for (ia = 0; ia < La; ia++) void 0 !== this.Wd[ia] && (Z = this.$d(ia), isFinite(Z.height) || ao(Z) === bo || (Z.Oa = Z.Xa * wh), Z.position = e.height, 0 !== Z.Xa && (e.height += Z.Xa, 0 !== Z.Xa && (e.height += Z.Re()))); + La = qe.length; + for (ia = 0; ia < La; ia++) { + var oc = qe[ia]; + oc.type === Qm ? (He = + e.width, Z = this.$d(oc.Vb), Mf = Z.Oa) : (Z = this.Zd(oc.column), He = Z.Oa, Mf = e.height); + oc.ud.n(0, 0, He, Mf); + Yk(oc, !1); + bc[oc.Vb] || (bc[oc.Vb] = []); + bc[oc.Vb][oc.column] || (bc[oc.Vb][oc.column] = []); + bc[oc.Vb][oc.column].push(oc) + } + z.xa(qe); + this.vs = bc; + break; + case "Viewbox": + var xh = a, + Zk = b, + Xq = c, + Yq = d; + 1 < m.length && z.k("Viewbox Panel cannot contain more than one GraphObject."); + var Xe = m[0]; + Xe.bc = 1; + Xe.Ap(); + rj(Xe, Infinity, Infinity, Xq, Yq); + var xj = Xe.Ia, + $k = Xe.margin, + Zq = $k.right + $k.left, + $q = $k.top + $k.bottom; + if (isFinite(xh) || isFinite(Zk)) { + var kt = + Xe.scale, + al = xj.width, + bl = xj.height, + ar = Math.max(xh - Zq, 0), + br = Math.max(Zk - $q, 0), + yj = 1; + this.Zo === bj ? 0 !== al && 0 !== bl && (yj = Math.min(ar / al, br / bl)) : 0 !== al && 0 !== bl && (yj = Math.max(ar / al, br / bl)); + 0 === yj && (yj = 1E-4); + Xe.bc *= yj; + kt !== Xe.scale && (Yk(Xe, !0), rj(Xe, Infinity, Infinity, Xq, Yq)) + } + xj = Xe.Ia; + e.width = isFinite(xh) ? xh : Math.max(xj.width + Zq, 0); + e.height = isFinite(Zk) ? Zk : Math.max(xj.height + $q, 0); + break; + case "Link": + var cr = m.length, + ig = this instanceof da ? this.Wf : this; + if (ig instanceof G) + if (0 === cr) { + var cl = this.Wc; + yb(cl, 0, 0); + var re = + this.Ia; + re.n(0, 0, 0, 0) + } else { + var dl = this instanceof da ? null : ig.path, + jg = ig.un, + Ye = this.Yi; + Ye.assign(jg); + Ye.x = 0; + var Tg = Ye.y = 0, + kg = ig.points, + Tg = void 0 !== this.sa ? this.sa : kg.count; + this instanceof da ? this.on(!1) : ig.on(!1); + var dr = jg.width, + er = jg.height; + this.Ki.n(jg.x, jg.y); + null === this.Zg && (this.Zg = new J(w)); + this.Zg.clear(); + null !== dl && (co(dl, dr, er, this), re = dl.Ia, Ye.qi(re), this.Zg.add(re)); + for (var vi = z.Fh(), zj = z.O(), lg = z.O(), vn = 0; vn < cr; vn++) { + var Xb = m[vn]; + if (Xb !== dl) + if (Xb.Ff && Xb instanceof X) co(Xb, dr, er, this), re = + Xb.Ia, Ye.qi(re), this.Zg.add(re); + else if (2 > Tg) rj(Xb, Infinity, Infinity), re = Xb.Ia, Ye.qi(re), this.Zg.add(re); + else { + var od = Xb.De, + gr = Xb.NA, + wn = Xb.jk; + wn.Be() && (wn = ec); + var Aj = Xb.pu, + lt = Xb.EF, + Bj = 0, + Cj = 0, + el = 0; + if (od < -Tg || od >= Tg) { + var hr = ig.bF, + wi = ig.aF; + Aj !== Ni && (el = ig.computeAngle(Xb, Aj, wi), Xb.bm = el); + Bj = hr.x - jg.x; + Cj = hr.y - jg.y + } else { + var Gd, Ze; + if (0 <= od) Gd = kg.ea(od), Ze = od < Tg - 1 ? kg.ea(od + 1) : Gd; + else { + var yh = Tg + od; + Gd = kg.ea(yh); + Ze = 0 < yh ? kg.ea(yh - 1) : Gd + } + if (Gd.Mc(Ze)) { + var zh, Ah; + 0 <= od ? (zh = 0 < od ? kg.ea(od - 1) : Gd, Ah = od < Tg - 2 ? kg.ea(od + + 2) : Ze) : (zh = yh < Tg - 1 ? kg.ea(yh + 1) : Gd, Ah = 1 < yh ? kg.ea(yh - 2) : Ze); + var ir = zh.Af(Gd), + jr = Ze.Af(Ah), + wi = ir > jr + 10 ? 0 <= od ? zh.Ec(Gd) : Gd.Ec(zh) : jr > ir + 10 ? 0 <= od ? Ze.Ec(Ah) : Ah.Ec(Ze) : 0 <= od ? zh.Ec(Ah) : Ah.Ec(zh) + } else wi = 0 <= od ? Gd.Ec(Ze) : Ze.Ec(Gd); + Aj !== Ni && (el = ig.computeAngle(Xb, Aj, wi), Xb.bm = el); + Bj = Gd.x + (Ze.x - Gd.x) * gr - jg.x; + Cj = Gd.y + (Ze.y - Gd.y) * gr - jg.y + } + rj(Xb, Infinity, Infinity); + var re = Xb.Ia, + cl = Xb.Ga, + Dj = 0; + Xb instanceof X && (Dj = Xb.ub); + var fl = cl.width + Dj, + xn = cl.height + Dj; + vi.reset(); + vi.translate(-re.x, -re.y); + vi.scale(Xb.scale, Xb.scale); + vi.rotate(Aj === Ni ? Xb.angle : wi, fl / 2, xn / 2); + var xi = new w(0, 0, fl, xn); + zj.ru(xi, wn); + vi.Cb(zj); + var mt = -zj.x + Dj / 2, + nt = -zj.y + Dj / 2; + lg.assign(lt); + isNaN(lg.x) && (lg.x = 0 <= od ? fl / 2 + 3 : -(fl / 2 + 3)); + isNaN(lg.y) && (lg.y = -(xn / 2 + 3)); + lg.rotate(wi); + Bj += lg.x; + Cj += lg.y; + xi.set(re); + xi.x = Bj + mt; + xi.y = Cj + nt; + this.Zg.add(xi); + Ye.qi(xi) + } + } + if (this.Ke) + for (var kr = this.Hf; kr.next();) rj(kr.value, Infinity, Infinity); + this.Yi = Ye; + var yn = this.Ki; + yn.n(yn.x + Ye.x, yn.y + Ye.y); + yb(e, Ye.width || 0, Ye.height || 0); + z.jf(vi); + z.A(zj); + z.A(lg) + } + break; + case "Grid": + break; + case "TableRow": + case "TableColumn": + z.k(this.toString() + " is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel."); + break; + default: + z.k("Unknown panel type: " + n) + } + } + var $e = e.width, + af = e.height, + gl = this.padding, + ot = gl.top + gl.bottom, + $e = $e + (gl.left + gl.right), + af = af + ot; + isFinite(g.width) && ($e = g.width); + isFinite(g.height) && (af = g.height); + $e = Math.min(k.width, $e); + af = Math.min(k.height, af); + $e = Math.max(h.width, $e); + af = Math.max(h.height, af); + $e = Math.max(c, $e); + af = Math.max(d, + af); + e.width = $e; + e.height = af; + yb(this.Wc, $e, af); + Jm(this, 0, 0, $e, af) + }; + I.prototype.findMainElement = I.prototype.gf = function() { + if (null === this.Lm) { + var a = this.va.o, + b = a.length; + if (0 === b) return null; + for (var c = 0; c < b; c++) { + var d = a[c]; + if (!0 === d.Ff) return this.Lm = d + } + this.Lm = a[0] + } + return this.Lm + }; + I.prototype.$i = function(a, b, c, d) { + var e = this.Yi, + g = this.va.o, + h = z.yk(0, 0, 0, 0); + if (0 === g.length) { + var k = this.W; + k.x = a; + k.y = b; + k.width = c; + k.height = d + } else { + if (!this.Aa.F()) { + var l = Mm(this, !0), + m = this.ud, + n = m.width, + p = m.height, + q = this.margin, + r = q.left + q.right, + s = q.top + q.bottom; + n === c && p === d && (l = $i); + switch (l) { + case $i: + if (n > c || p > d) this.S(), rj(this, n > c ? c : n, p > d ? d : p); + break; + case lf: + this.S(!0); + rj(this, c + r, d + s, 0, 0); + break; + case Cm: + this.S(!0); + rj(this, c + r, p + s, 0, 0); + break; + case Bm: + this.S(!0), rj(this, n + r, d + s, 0, 0) + } + } + k = this.W; + k.x = a; + k.y = b; + k.width = c; + k.height = d; + var t = this.ba.Ub; + switch (t) { + case "Position": + for (var v = g.length, x = e.x - this.padding.left, y = e.y - this.padding.top, A = 0; A < v; A++) { + var B = g[A], + L = B.Ia, + H = B.margin, + U = B.position.x, + ea = B.position.y; + h.x = isNaN(U) ? -x : U - x; + h.y = isNaN(ea) ? -y : ea - y; + if (B instanceof X) { + var W = B; + if (W.ME) { + var P = W.ub / 2; + h.x -= P; + h.y -= P + } + } + h.x += H.left; + h.y += H.top; + h.width = L.width; + h.height = L.height; + B.visible && B.Lc(h.x, h.y, h.width, h.height) + } + break; + case "Vertical": + for (var ba = g.length, Oa = this.padding.left, sa = this.padding.top, Na = 0; Na < ba; Na++) { + var ua = + Oa, + Ha = g[Na]; + if (Ha.visible) { + var Aa = Ha.Ia, + jc = Ha.margin, + zd = jc.left + jc.right, + Ad = Oa + this.padding.right, + Qe = Aa.width, + ac = Mm(Ha, !1); + if (isNaN(Ha.Aa.width) && ac === lf || ac === Cm) Qe = Math.max(e.width - zd - Ad, 0); + var Ig = Qe + zd + Ad, + Bd = Ha.alignment; + Bd.bd() && (Bd = this.Bl); + Bd.cd() || (Bd = ec); + Ha.Lc(ua + Bd.offsetX + jc.left + (e.width * Bd.x - Ig * Bd.x), sa + Bd.offsetY + jc.top, Qe, Aa.height); + sa += Aa.height + jc.bottom + jc.top + } + } + break; + case "Horizontal": + for (var sb = g.length, gb = this.padding.top, oa = this.padding.left, pa = 0; pa < sb; pa++) { + var tb = gb, + Xa = g[pa]; + if (Xa.visible) { + var Va = Xa.Ia, + Ae = Xa.margin, + Cd = Ae.top + Ae.bottom, + me = gb + this.padding.bottom, + Rd = Va.height, + ne = Mm(Xa, !1); + if (isNaN(Xa.Aa.height) && ne === lf || ne === Bm) Rd = Math.max(e.height - Cd - me, 0); + var Jg = Rd + Cd + me, + fd = Xa.alignment; + fd.bd() && (fd = this.Bl); + fd.cd() || (fd = ec); + Xa.Lc(oa + fd.offsetX + Ae.left, tb + fd.offsetY + Ae.top + (e.height * fd.y - Jg * fd.y), Va.width, Rd); + oa += Va.width + Ae.left + Ae.right + } + } + break; + case "Spot": + var pi = g.length, + Ab = this.gf(), + Qb = Ab.Ia, + gd = Qb.width, + lh = Qb.height, + Lb = this.padding, + kb = Lb.left, + cb = Lb.top; + h.x = kb - e.x; + h.y = cb - e.y; + Ab.Lc(h.x, h.y, gd, lh); + for (var Re = 0; Re < pi; Re++) { + var Sd = g[Re]; + if (Sd !== Ab) { + var Kg = Sd.Ia, + Lg = Kg.width, + kc = Kg.height, + lc = Sd.alignment; + lc.bd() && (lc = this.Bl); + lc.cd() || (lc = ec); + var oe = Sd.jk; + oe.bd() && (oe = ec); + h.x = lc.x * gd + lc.offsetX - (oe.x * Lg - oe.offsetX); + h.y = lc.y * lh + lc.offsetY - (oe.y * kc - oe.offsetY); + h.x -= e.x; + h.y -= e.y; + Sd.visible && Sd.Lc(kb + h.x, cb + h.y, Lg, kc) + } + } + break; + case "Auto": + var hd = g.length, + nb = this.gf(), + Uc = nb.Ia, + Qa = z.kg(); + Qa.n(0, 0, 1, 1); + var ob = nb.margin, + yc = ob.left, + Dd = ob.top, + Mb = this.padding, + pe = Mb.left, + tf = Mb.top; + h.x = yc; + h.y = Dd; + h.width = Uc.width; + h.height = Uc.height; + nb.Lc(pe + h.x, tf + h.y, h.width, h.height); + var Se = Zn(nb), + Lf = $n(nb), + Fb = 0 + Se.y * Uc.height + Se.offsetY, + Be = 0 + Lf.x * Uc.width + Lf.offsetX, + Rb = 0 + Lf.y * Uc.height + Lf.offsetY; + Qa.x = 0 + Se.x * Uc.width + Se.offsetX; + Qa.y = Fb; + Ib(Qa, Be, Rb, 0, 0); + Qa.x += yc + pe; + Qa.y += Dd + tf; + for (var Vb = 0; Vb < hd; Vb++) { + var Nb = g[Vb]; + if (Nb !== nb) { + var Jc = Nb.Ia, + ob = Nb.margin, + lb = Math.max(Jc.width + ob.right + ob.left, 0), + Gb = Math.max(Jc.height + ob.top + ob.bottom, 0), + Ob = Nb.alignment; + Ob.bd() && (Ob = this.Bl); + Ob.cd() || (Ob = ec); + h.x = + Qa.width * Ob.x + Ob.offsetX - lb * Ob.x + ob.left + Qa.x; + h.y = Qa.height * Ob.y + Ob.offsetY - Gb * Ob.y + ob.top + Qa.y; + h.width = Qa.width; + h.height = Qa.height; + Nb.visible && (Jb(Qa.x, Qa.y, Qa.width, Qa.height, h.x, h.y, Jc.width, Jc.height) ? Nb.Lc(h.x, h.y, Jc.width, Jc.height) : Nb.Lc(h.x, h.y, Jc.width, Jc.height, new w(Qa.x, Qa.y, Qa.width, Qa.height))) + } + } + z.dc(Qa); + break; + case "Table": + for (var Td = g.length, Mg = this.padding, mh = Mg.left, nh = Mg.top, Ce = this.vs, Kc = 0, De = 0, mc = Ce.length, Bb = 0, Cb = 0; Cb < mc; Cb++) Ce[Cb] && (Bb = Math.max(Bb, Ce[Cb].length)); + for (var Lc = + Math.min(this.Xi, mc - 1); Lc !== mc && (void 0 === this.Wd[Lc] || 0 === this.Wd[Lc].Xa);) Lc++; + for (var Lc = Math.min(Lc, mc - 1), Ng = -this.Wd[Lc].sb, Vc = Math.min(this.Ji, Bb - 1); Vc !== Bb && (void 0 === this.Sd[Vc] || 0 === this.Sd[Vc].Xa);) Vc++; + for (var Vc = Math.min(Vc, Bb - 1), Wc = -this.Sd[Vc].sb, mb = z.Xl(), Cb = 0; Cb < mc; Cb++) + if (Ce[Cb]) { + var Bb = Ce[Cb].length, + Mc = this.$d(Cb), + De = Mc.sb + Ng + nh; + 0 !== Mc.Xa && (De += Mc.UD()); + for (var Ud = 0; Ud < Bb; Ud++) + if (Ce[Cb][Ud]) { + var Vd = this.Zd(Ud), + Kc = Vd.sb + Wc + mh; + 0 !== Vd.Xa && (Kc += Vd.UD()); + for (var uf = Ce[Cb][Ud], Og = uf.length, + vj = 0; vj < Og; vj++) { + var La = uf[vj], + Te = La.Ia, + qe = La instanceof I ? La : null; + if (null === qe || qe.type !== Qm && qe.type !== Rm) { + mb.n(0, 0); + for (var ia = 1; ia < La.rowSpan && !(Cb + ia >= this.Yp); ia++) { + var fa = this.$d(Cb + ia); + mb.height += fa.total + } + for (ia = 1; ia < La.eH && !(Ud + ia >= this.gp); ia++) { + var id = this.Zd(Ud + ia); + mb.width += id.total + } + var oh = Vd.Xa + mb.width, + qi = Mc.Xa + mb.height; + h.x = Kc; + h.y = De; + h.width = oh; + h.height = qi; + var zc = Kc, + ri = De, + bc = oh, + ph = qi; + Kc + oh > e.width && (bc = Math.max(e.width - Kc, 0)); + De + qi > e.height && (ph = Math.max(e.height - De, 0)); + var jd = La.alignment, + Ee = 0, + Nc = 0, + kd = 0, + Ac = 0; + if (jd.bd()) { + jd = this.Bl; + jd.cd() || (jd = ec); + var Ee = jd.x, + Nc = jd.y, + kd = jd.offsetX, + Ac = jd.offsetY, + ld = Vd.alignment, + cg = Mc.alignment; + ld.cd() && (Ee = ld.x, kd = ld.offsetX); + cg.cd() && (Nc = cg.y, Ac = cg.offsetY) + } else Ee = jd.x, Nc = jd.y, kd = jd.offsetX, Ac = jd.offsetY; + if (isNaN(Ee) || isNaN(Nc)) Nc = Ee = .5, Ac = kd = 0; + var Z = Te.width, + Fe = Te.height, + Ue = La.margin, + si = Ue.left + Ue.right, + ti = Ue.top + Ue.bottom, + Oc = Zm(La, Mc, Vd, !1); + !isNaN(La.Aa.width) || Oc !== lf && Oc !== Cm || (Z = Math.max(oh - si, 0)); + !isNaN(La.Aa.height) || Oc !== lf && Oc !== Bm || (Fe = + Math.max(qi - ti, 0)); + var pb = La.Xe, + qb = La.cg, + Z = Math.min(pb.width, Z), + Fe = Math.min(pb.height, Fe), + Z = Math.max(qb.width, Z), + Fe = Math.max(qb.height, Fe), + Xk = Fe + ti; + h.x += h.width * Ee - (Z + si) * Ee + kd + Ue.left; + h.y += h.height * Nc - Xk * Nc + Ac + Ue.top; + La.visible && (Jb(zc, ri, bc, ph, h.x, h.y, Te.width, Te.height) ? La.Lc(h.x, h.y, Z, Fe) : La.Lc(h.x, h.y, Z, Fe, new w(zc, ri, bc, ph))) + } else { + La.Fi(); + La.Xb.Wa(); + var dg = La.Xb; + dg.x = qe.type === Qm ? mh : Kc; + dg.y = qe.type === Rm ? nh : De; + dg.width = Te.width; + dg.height = Te.height; + La.Xb.freeze(); + Om(La, !1) + } + } + } + } + z.pk(mb); + for (Cb = + 0; Cb < Td; Cb++) La = g[Cb], qe = La instanceof I ? La : null, null === qe || qe.type !== Qm && qe.type !== Rm || (dg = La.Xb, La.Wc.Wa(), La.Wc.n(0, 0, dg.width, dg.height), La.Wc.freeze()); + break; + case "Viewbox": + var Pg = g[0], + Qg = Pg.Ia, + Wb = Pg.margin, + eg = Wb.top + Wb.bottom, + fg = Math.max(Qg.width + (Wb.right + Wb.left), 0), + Xc = Math.max(Qg.height + eg, 0), + Ge = Pg.alignment; + Ge.bd() && (Ge = this.Bl); + Ge.cd() || (Ge = ec); + h.x = e.width * Ge.x - fg * Ge.x + Ge.offsetX; + h.y = e.height * Ge.y - Xc * Ge.y + Ge.offsetY; + h.width = Qg.width; + h.height = Qg.height; + Pg.Lc(h.x, h.y, h.width, h.height); + break; + case "Link": + var un = g.length, + ui = this instanceof da ? this.Wf : this; + if (ui instanceof G) { + var Ve = this instanceof da ? null : ui.path; + if (null !== this.Zg) { + var We = this.Zg.o, + Ed = 0; + if (null !== Ve && Ed < this.Zg.count) { + var md = We[Ed]; + Ed++; + Ve.Lc(md.x - this.Yi.x, md.y - this.Yi.y, md.width, md.height) + } + for (var qh = 0; qh < un; qh++) { + var Wd = g[qh]; + Wd !== Ve && Ed < this.Zg.count && (md = We[Ed], Ed++, Wd.Lc(md.x - this.Yi.x, md.y - this.Yi.y, md.width, md.height)) + } + } + var Xd = ui.points, + rh = Xd.count; + if (2 <= rh && this.Ke) + for (var sh = this.Hf; sh.next();) { + var nd = sh.value, + Rg = rh, + vf = Xd, + nc = nd.De, + th = nd.NA, + rb = nd.jk, + He = nd.pu, + Mf = nd.EF, + wf = 0, + Yd = 0, + hb = 0; + if (nc < -Rg || nc >= Rg) { + var Sg = this.bF, + rc = this.aF; + He !== Ni && (hb = this.computeAngle(nd, He, rc), nd.angle = hb); + wf = Sg.x; + Yd = Sg.y + } else { + var Bc = void 0, + Fd = void 0; + if (0 <= nc) Bc = vf.o[nc], Fd = nc < Rg - 1 ? vf.o[nc + 1] : Bc; + else var Sb = Rg + nc, + Bc = vf.o[Sb], + Fd = 0 < Sb ? vf.o[Sb - 1] : Bc; + if (Bc.Mc(Fd)) { + var Zd = void 0, + Ie = void 0; + 0 <= nc ? (Zd = 0 < nc ? vf.o[nc - 1] : Bc, Ie = nc < Rg - 2 ? vf.o[nc + 2] : Fd) : (Zd = Sb < Rg - 1 ? vf.o[Sb + 1] : Bc, Ie = 1 < Sb ? vf.o[Sb - 2] : Fd); + var gg = Zd.Af(Bc), + hg = Fd.Af(Ie), + rc = gg > hg + 10 ? 0 <= + nc ? Zd.Ec(Bc) : Bc.Ec(Zd) : hg > gg + 10 ? 0 <= nc ? Fd.Ec(Ie) : Ie.Ec(Fd) : 0 <= nc ? Zd.Ec(Ie) : Ie.Ec(Zd) + } else rc = 0 <= nc ? Bc.Ec(Fd) : Fd.Ec(Bc); + He !== Ni && (hb = this.computeAngle(nd, He, rc), nd.angle = hb); + wf = Bc.x + (Fd.x - Bc.x) * th; + Yd = Bc.y + (Fd.y - Bc.y) * th + } + if (rb.N(Yb)) nd.location = new N(wf, Yd); + else { + rb.Be() && (rb = ec); + var xf = z.Fh(); + xf.reset(); + xf.scale(nd.scale, nd.scale); + xf.rotate(nd.angle, 0, 0); + var wj = nd.Ga, + $d = z.yk(0, 0, wj.width, wj.height), + Yc = z.O(); + Yc.ru($d, rb); + xf.Cb(Yc); + var vh = -Yc.x, + wh = -Yc.y, + oc = Mf.copy(); + isNaN(oc.x) && (oc.x = 0 <= nc ? Yc.x + 3 : -(Yc.x + + 3)); + isNaN(oc.y) && (oc.y = -(Yc.y + 3)); + oc.rotate(rc); + wf += oc.x; + Yd += oc.y; + xf.bG($d); + var vh = vh + $d.x, + wh = wh + $d.y, + xh = z.Tb(wf + vh, Yd + wh); + nd.move(xh); + z.A(xh); + z.A(Yc); + z.dc($d); + z.jf(xf) + } + } + this instanceof da ? this.on(!1) : ui.on(!1) + } + break; + case "Grid": + break; + case "TableRow": + case "TableColumn": + z.k(this.toString() + " is not an element of a Table Panel.TableRow and TableColumn panels can only be elements of a Table Panel."); + break; + default: + z.k("Unknown panel type: " + t) + } + z.dc(h) + } + }; + I.prototype.lk = function(a) { + var b = this.Ga; + if (Jb(0, 0, b.width, b.height, a.x, a.y)) { + for (var b = this.va.o, c = b.length, d = z.Tb(0, 0); c--;) { + var e = b[c]; + if (e.visible || e === this.Zb) + if (ub(d.set(a), e.transform), e.Ma(d)) return z.A(d), !0 + } + z.A(d); + return null === this.Nb && null === this.uc ? !1 : !0 + } + return !1 + }; + I.prototype.Xw = function(a) { + if (this.Jn === a) return this; + for (var b = this.va.o, c = b.length, d = 0; d < c; d++) { + var e = b[d].Xw(a); + if (null !== e) return e + } + return null + }; + + function eo(a, b, c) { + c(a, b); + if (b instanceof I) { + b = b.va.o; + for (var d = b.length, e = 0; e < d; e++) eo(a, b[e], c) + } + } + + function wl(a, b) { + fo(a, a, b) + } + + function fo(a, b, c) { + c(b); + b = b.va.o; + for (var d = b.length, e = 0; e < d; e++) { + var g = b[e]; + g instanceof I && fo(a, g, c) + } + } + I.prototype.walkVisualTree = I.prototype.DJ = function(a) { + ho(this, this, a) + }; + + function ho(a, b, c) { + c(b); + if (b instanceof I) { + b = b.va.o; + for (var d = b.length, e = 0; e < d; e++) ho(a, b[e], c) + } + } + I.prototype.findInVisualTree = I.prototype.yt = function(a) { + return io(this, this, a) + }; + + function io(a, b, c) { + if (c(b)) return b; + if (b instanceof I) { + b = b.va.o; + for (var d = b.length, e = 0; e < d; e++) { + var g = io(a, b[e], c); + if (null !== g) return g + } + } + return null + } + I.prototype.findObject = I.prototype.oe = function(a) { + if (this.name === a) return this; + for (var b = this.va.o, c = b.length, d = 0; d < c; d++) { + var e = b[d]; + if (e.name === a) return e; + if (e instanceof I) + if (null === e.Ii && null === e.sg) { + if (e = e.oe(a), null !== e) return e + } else if (Rl(e) && (e = e.va.first(), null !== e && (e = e.oe(a), null !== e))) return e + } + return null + }; + + function jo(a) { + a = a.va.o; + for (var b = a.length, c = 0, d = 0; d < b; d++) { + var e = a[d]; + if (e instanceof I) c = Math.max(c, jo(e)); + else if (e instanceof X) { + a: { + if (!e.Yh) switch (e.fo) { + case "None": + case "Square": + case "Ellipse": + case "Circle": + case "LineH": + case "LineV": + case "FramedRectangle": + case "RoundedRectangle": + case "Line1": + case "Line2": + case "Border": + case "Cube1": + case "Cube2": + case "Junction": + case "Cylinder1": + case "Cylinder2": + case "Cylinder3": + case "Cylinder4": + case "PlusLine": + case "XLine": + case "ThinCross": + case "ThickCross": + e = + 0; + break a + } + e = e.Oe / 2 * e.Km * e.gj() + } + c = Math.max(c, e) + } + } + return c + } + f = I.prototype; + f.Vg = function() { + return !(this.type === Qm || this.type === Rm) + }; + f.pe = function(a, b, c) { + if (!1 === this.ig) return null; + void 0 === b && (b = null); + void 0 === c && (c = null); + if (nl(this)) return null; + var d = this.Ga, + e = 1 / this.gj(), + g = this.Vg(), + h = g ? a : ub(z.Tb(a.x, a.y), this.transform), + k = this.h, + l = 10, + m = 5; + null !== k && (l = k.sp("extraTouchArea"), m = l / 2); + if (Jb(-(m * e), -(m * e), d.width + l * e, d.height + l * e, h.x, h.y)) { + if (!this.dh) { + var e = this.va.o, + n = e.length, + k = z.O(), + m = (l = this.KE) ? this.gf() : null; + if (l && (m.Vg() ? ub(k.set(a), m.transform) : k.set(a), !m.Ma(k))) return z.A(k), g || z.A(h), null; + for (; n--;) { + var p = e[n]; + if (p.visible || + p === this.Zb) + if (p.Vg() ? ub(k.set(a), p.transform) : k.set(a), !l || p !== m) { + var q = null; + p instanceof I ? q = p.pe(k, b, c) : !0 === p.ig && p.Ma(k) && (q = p); + if (null !== q && (null !== b && (q = b(q)), null !== q && (null === c || c(q)))) return z.A(k), g || z.A(h), q + } + } + z.A(k) + } + if (null === this.background && null === this.vl) return g || z.A(h), null; + a = Jb(0, 0, d.width, d.height, h.x, h.y) ? this : null; + g || z.A(h); + return a + } + g || z.A(h); + return null + }; + f.mp = function(a, b, c, d) { + if (!1 === this.ig) return !1; + void 0 === b && (b = null); + void 0 === c && (c = null); + d instanceof J || d instanceof K || (d = new J(O)); + var e = this.Ga, + g = this.Vg(), + h = g ? a : ub(z.Tb(a.x, a.y), this.transform); + if (Jb(0, 0, e.width, e.height, h.x, h.y)) { + if (!this.dh) { + for (var e = this.va.o, k = e.length, l = z.O(); k--;) { + var m = e[k]; + if (m.visible || m === this.Zb) { + m.Vg() ? ub(l.set(a), m.transform) : l.set(a); + var n = m, + m = m instanceof I ? m : null; + (null !== m ? m.mp(l, b, c, d) : n.Ma(l)) && !1 !== n.ig && (null !== b && (n = b(n)), null === n || null !== c && !c(n) || d.add(n)) + } + } + z.A(l) + } + g || + z.A(h); + return null !== this.background || null !== this.vl + } + g || z.A(h); + return !1 + }; + f.ok = function(a, b, c, d, e, g) { + if (!1 === this.ig) return !1; + void 0 === b && (b = null); + void 0 === c && (c = null); + var h = g; + void 0 === g && (h = z.Fh(), h.reset()); + h.multiply(this.transform); + if (this.Ym(a, h)) return ko(this, b, c, e), void 0 === g && z.jf(h), !0; + if (this.Ig(a, h)) { + if (!this.dh) + for (var k = this.va.o, l = k.length; l--;) { + var m = k[l]; + if (m.visible || m === this.Zb) { + var n = m.W, + p = this.Ga; + if (!(n.x > p.width || n.y > p.height || 0 > n.x + n.width || 0 > n.y + n.height)) { + n = m; + m = m instanceof I ? m : null; + p = z.Fh(); + p.set(h); + if (null !== m ? m.ok(a, b, c, d, e, p) : Lm(n, a, d, p)) null !== + b && (n = b(n)), null === n || null !== c && !c(n) || e.add(n); + z.jf(p) + } + } + } + void 0 === g && z.jf(h); + return d + } + void 0 === g && z.jf(h); + return !1 + }; + + function ko(a, b, c, d) { + for (var e = a.va.o, g = e.length; g--;) { + var h = e[g]; + if (h.visible) { + var k = h.W, + l = a.Ga; + k.x > l.width || k.y > l.height || 0 > k.x + k.width || 0 > k.y + k.height || (h instanceof I && ko(h, b, c, d), null !== b && (h = b(h)), null === h || null !== c && !c(h) || d.add(h)) + } + } + } + f.dn = function(a, b, c, d, e, g) { + if (!1 === this.ig) return !1; + void 0 === c && (c = null); + void 0 === d && (d = null); + var h = this.Ga, + k = this.Vg(), + l = k ? a : ub(z.Tb(a.x, a.y), this.transform), + m = k ? b : ub(z.Tb(b.x, b.y), this.transform), + n = l.Af(m), + p = 0 < l.x && l.x < h.width && 0 < l.y && l.y < h.height || vb(l.x, l.y, 0, 0, 0, h.height) < n || vb(l.x, l.y, 0, h.height, h.width, h.height) < n || vb(l.x, l.y, h.width, h.height, h.width, 0) < n || vb(l.x, l.y, h.width, 0, 0, 0) < n, + h = 0 < l.x && l.x < h.width && 0 < l.y && l.y < h.height && vb(l.x, l.y, 0, 0, 0, h.height) < n && vb(l.x, l.y, 0, h.height, h.width, h.height) < + n && vb(l.x, l.y, h.width, h.height, h.width, 0) < n && vb(l.x, l.y, h.width, 0, 0, 0) < n; + k || (z.A(l), z.A(m)); + if (p) { + if (!this.dh) { + k = z.O(); + l = z.O(); + m = this.va.o; + for (n = m.length; n--;) { + var q = m[n]; + if (q.visible || q === this.Zb) { + var r = q.W, + s = this.Ga; + r.x > s.width || r.y > s.height || 0 > r.x + r.width || 0 > r.y + r.height || (q.Vg() ? (r = q.transform, ub(k.set(a), r), ub(l.set(b), r)) : (k.set(a), l.set(b)), r = q, q = q instanceof I ? q : null, null !== q ? !q.dn(k, l, c, d, e, g) : !r.sE(k, l, e)) || (null !== c && (r = c(r)), null === r || null !== d && !d(r) || g.add(r)) + } + } + z.A(k); + z.A(l) + } + return e ? + p : h + } + return !1 + }; + + function Zn(a) { + var b = a.C; + if (void 0 === b || b === Pc) b = null; + null === b && a instanceof X && (a = a.ab, null !== a && (b = a.C)); + null === b && (b = Zb); + return b + } + + function $n(a) { + var b = a.D; + if (void 0 === b || b === Pc) b = null; + null === b && a instanceof X && (a = a.ab, null !== a && (b = a.D)); + null === b && (b = ic); + return b + } + I.prototype.add = I.prototype.add = function(a) { + z.l(a, O, I, "add:element"); + this.Ld(this.va.count, a) + }; + I.prototype.elt = I.prototype.ea = function(a) { + return this.va.ea(a) + }; + I.prototype.insertAt = I.prototype.Ld = function(a, b) { + b instanceof D && z.k("Cannot add a Part to a Panel: " + b); + if (this === b || this.Pl(b)) this === b && z.k("Cannot make a Panel contain itself: " + this.toString()), z.k("Cannot make a Panel indirectly contain itself: " + this.toString() + " already contains " + b.toString()); + var c = b.U; + null !== c && c !== this && z.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: " + b.toString() + ", already contained by " + c.toString() + ", cannot be shared by this Panel: " + + this.toString()); + this.ba !== Gk || b instanceof X || z.k("Can only add Shapes to a Grid Panel, not: " + b); + b.Tl(this); + b.Bm = null; + if (null !== this.Tt) { + var d = b.data; + null !== d && "object" === typeof d && (null === this.rg && (this.rg = new na(Object, I)), this.rg.add(d, b)) + } + var e = this.va, + d = -1; + if (c === this) { + for (var g = -1, h = this.va.o, k = h.length, l = 0; l < k; l++) + if (h[l] === b) { + g = l; + break + } + if (-1 !== g) { + if (g === a || g + 1 >= e.count && a >= e.count) return; + e.dd(g); + d = g + } else z.k("element " + b.toString() + " has panel " + c.toString() + " but is not contained by it.") + } + if (0 > + a || a > e.count) a = e.count; + e.Ld(a, b); + this.S(); + b.S(); + null !== b.yd ? this.Ph = !0 : b instanceof I && !0 === b.Ph && (this.Ph = !0); + c = this.ca; + null !== c && (c.il = null, c.Qj = NaN, this.Ph && c instanceof E && (c.Ph = !0), c.Ph && (c.Dd = null), e = this.h, null !== e && e.pa.qb || (-1 !== d && c.Rc(Vf, "elements", this, b, null, d, null), c.Rc(Uf, "elements", this, null, b, null, a))) + }; + I.prototype.remove = I.prototype.remove = function(a) { + z.l(a, O, I, "remove:element"); + for (var b = this.va.o, c = b.length, d = -1, e = 0; e < c; e++) + if (b[e] === a) { + d = e; + break + } - 1 !== d && this.Ve(d) + }; + I.prototype.removeAt = I.prototype.dd = function(a) { + u && z.p(a, I, "removeAt:idx"); + 0 <= a && this.Ve(a) + }; + I.prototype.Ve = function(a) { + var b = this.va, + c = b.ea(a); + c.Bm = null; + c.Tl(null); + if (null !== this.rg) { + var d = c.data; + "object" === typeof d && this.rg.remove(d) + } + b.dd(a); + Yk(this, !1); + this.S(); + this.Lm === c && (this.Lm = null); + b = this.ca; + null !== b && (b.il = null, b.Qj = NaN, b.ae(), d = this.h, null !== d && d.pa.qb || b.Rc(Vf, "elements", this, c, null, a, null)) + }; + z.w(I, { + Yp: "rowCount" + }, function() { + return void 0 === this.Wd ? 0 : this.Wd.length + }); + I.prototype.getRowDefinition = I.prototype.$d = function(a) { + u && z.p(a, I, "getRowDefinition:idx"); + 0 > a && z.ka(a, ">= 0", I, "getRowDefinition:idx"); + a = Math.round(a); + var b = this.Wd; + if (void 0 === b[a]) { + var c = new Fg; + c.Tl(this); + c.qe = !0; + c.index = a; + b[a] = c + } + return b[a] + }; + I.prototype.removeRowDefinition = I.prototype.pF = function(a) { + u && z.p(a, I, "removeRowDefinition:idx"); + 0 > a && z.ka(a, ">= 0", I, "removeRowDefinition:idx"); + a = Math.round(a); + var b = this.Wd; + this.Rc(Vf, "coldefs", this, b[a], null, a, null); + b[a] && delete b[a]; + this.S() + }; + z.w(I, { + gp: "columnCount" + }, function() { + return void 0 === this.Sd ? 0 : this.Sd.length + }); + I.prototype.getColumnDefinition = I.prototype.Zd = function(a) { + u && z.p(a, I, "getColumnDefinition:idx"); + 0 > a && z.ka(a, ">= 0", I, "getColumnDefinition:idx"); + a = Math.round(a); + var b = this.Sd; + if (void 0 === b[a]) { + var c = new Fg; + c.Tl(this); + c.qe = !1; + c.index = a; + b[a] = c + } + return b[a] + }; + I.prototype.removeColumnDefinition = I.prototype.lF = function(a) { + u && z.p(a, I, "removeColumnDefinition:idx"); + 0 > a && z.ka(a, ">= 0", I, "removeColumnDefinition:idx"); + a = Math.round(a); + var b = this.Sd; + this.Rc(Vf, "coldefs", this, b[a], null, a, null); + b[a] && delete b[a]; + this.S() + }; + z.defineProperty(I, { + eJ: "rowSizing" + }, function() { + return void 0 === this.Gm ? Vn : this.Gm + }, function(a) { + if (void 0 !== this.Gm) { + var b = this.Gm; + b !== a && (a !== Vn && a !== bo && z.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: " + a), this.Gm = a, this.S(), this.j("rowSizing", b, a)) + } + }); + z.defineProperty(I, { + dH: "columnSizing" + }, function() { + return void 0 === this.fm ? Vn : this.fm + }, function(a) { + if (void 0 !== this.fm) { + var b = this.fm; + b !== a && (a !== Vn && a !== bo && z.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: " + a), this.fm = a, this.S(), this.j("columnSizing", b, a)) + } + }); + z.defineProperty(I, { + WF: "topIndex" + }, function() { + return void 0 === this.Xi ? 0 : this.Xi + }, function(a) { + if (void 0 !== this.Xi) { + var b = this.Xi; + b !== a && ((!isFinite(a) || 0 > a) && z.k("Panel.topIndex must be greater than zero and a real number, not: " + a), this.Xi = a, this.S(), this.j("topIndex", b, a)) + } + }); + z.defineProperty(I, { + XE: "leftIndex" + }, function() { + return void 0 === this.Ji ? 0 : this.Ji + }, function(a) { + if (void 0 !== this.Ji) { + var b = this.Ji; + b !== a && ((!isFinite(a) || 0 > a) && z.k("Panel.leftIndex must be greater than zero and a real number, not: " + a), this.Ji = a, this.S(), this.j("leftIndex", b, a)) + } + }); + I.prototype.findRowForLocalY = function(a) { + if (0 > a) return -1; + if (this.type !== ga) return NaN; + for (var b = 0, c = this.Wd, d = c.length, e = this.Xi; e < d; e++) { + var g = c[e]; + if (void 0 !== g && (b += g.total, a < b)) return e + } + return -1 + }; + I.prototype.findColumnForLocalX = function(a) { + if (0 > a) return -1; + if (this.type !== ga) return NaN; + for (var b = 0, c = this.Sd, d = c.length, e = this.Ji; e < d; e++) { + var g = c[e]; + if (void 0 !== g && (b += g.total, a < b)) return e + } + return -1 + }; + z.defineProperty(I, { + data: "data" + }, function() { + return this.fe + }, function(a) { + var b = this.fe; + if (b !== a) { + var c = this instanceof D && !(this instanceof da); + c && z.g(a, "object", I, "data"); + gh(this); + this.fe = a; + var d = this.h; + null !== d && (c ? this instanceof G ? (null !== b && d.Qk.remove(b), null !== a && d.Qk.add(a, this)) : this instanceof D && (null !== b && d.zi.remove(b), null !== a && d.zi.add(a, this)) : (c = this.U, null !== c && null !== c.rg && (null !== b && c.rg.remove(b), null !== a && c.rg.add(a, this)))); + this.j("data", b, a); + null !== d && d.pa.qb || null !== a && this.Mb() + } + }); + z.defineProperty(I, { + mI: "itemIndex" + }, function() { + return this.vr + }, function(a) { + var b = this.vr; + b !== a && (this.vr = a, this.j("itemIndex", b, a)) + }); + + function fn(a) { + a = a.Nk; + return null !== a && a.G + } + + function gh(a) { + var b = a.Nk; + if (null === b) null !== a.data && z.k("Template cannot have .data be non-null: " + a), a.Nk = b = new J(Xg); + else if (b.G) return; + var c = new J(O); + eo(a, a, function(a, d) { + var e = d.Ac; + if (null !== e) + for (bn(d, !1), e = e.i; e.next();) { + var g = e.value; + g.mode === Zg && bn(d, !0); + if (null !== g.yn) { + var h = $g(g, a, d); + null !== h && (c.add(h), null === h.Oo && (h.Oo = new J(Xg)), h.Oo.add(g)) + } + b.add(g) + } + if (d instanceof I && d.type === ga) { + if (0 < d.Wd.length) + for (e = d.Wd, g = e.length, h = 0; h < g; h++) { + var k = e[h]; + if (void 0 !== k && null !== k.Ac) + for (var l = k.Ac.i; l.next();) { + var v = + l.value; + v.Ag = k; + v.Ts = 2; + v.Wo = k.index; + b.add(v) + } + } + if (0 < d.Sd.length) + for (e = d.Sd, g = e.length, h = 0; h < g; h++) + if (k = e[h], void 0 !== k && null !== k.Ac) + for (l = k.Ac.i; l.next();) v = l.value, v.Ag = k, v.Ts = 1, v.Wo = k.index, b.add(v) + } + }); + for (var d = c.i; d.next();) { + var e = d.value; + if (null !== e.Oo) { + bn(e, !0); + for (var g = e.Oo.i; g.next();) { + var h = g.value; + null === e.Ac && (e.Ac = new J(Xg)); + e.Ac.add(h) + } + } + e.Oo = null + } + for (d = b.i; d.next();) + if (e = d.value, g = e.Ag, null !== g) { + e.Ag = null; + var k = e.yu, + l = k.indexOf("."); + 0 < l && g instanceof I && (h = k.substring(0, l), k = k.substr(l + + 1), l = g.oe(h), null !== l ? (g = l, e.yu = k) : z.trace('Warning: unable to find GraphObject named "' + h + '" for Binding: ' + e.toString())); + g instanceof Fg ? (e.Wl = z.nd(g.U), g.U.Jn = e.Wl) : (e.Wl = z.nd(g), g.Jn = e.Wl) + } + b.freeze(); + a instanceof D && (a.be() && (rj(a, Infinity, Infinity), a.Lc()), u && !lo && eo(a, a, function(a, c) { + if (c instanceof I && (c.type === Dk || c.type === Yi) && 1 >= c.elements.count && !(c instanceof D)) { + if (1 === c.elements.count) { + var d = null !== c.Tt; + if (!d) + for (var e = b.i; e.next();) + if ("itemArray" === e.value.yu) { + d = !0; + break + } + } + d || (z.trace("Auto or Spot Panel should not have zero or one elements: " + + c.toString() + " in " + a.toString()), lo = !0) + } + })) + } + var lo = !1; + I.prototype.copyTemplate = function() { + var a = this.copy(); + a.DJ(function(a) { + a instanceof I && (a.Nk = null, a.fe = null); + var c = a.Ac; + null !== c && (a.Ac = null, c.each(function(c) { + a.bind(c.copy()) + })) + }); + return a + }; + I.prototype.updateTargetBindings = I.prototype.Mb = function(a) { + var b = this.Nk; + if (null !== b) + for (void 0 === a && (a = ""), b = b.i; b.next();) { + var c = b.value, + d = c.OF; + if ("" === a || "" === d || d === a) + if (d = c.yu, null !== c.hH || "" !== d) { + var d = this.data, + e = c.yn; + if (null !== e) d = "" === e ? this : "." === e ? this : ".." === e ? this : this.oe(e); + else { + var g = this.h; + null !== g && c.St && (d = g.ha.tk) + } + if (null === d) u && z.trace("Binding error: missing GraphObject named " + e + " in " + this.toString()); + else { + var g = this, + h = c.Wl; + if (-1 !== h) { + if (g = this.Xw(h), null === g) continue + } else null !== + c.Ag && (g = c.Ag); + "." === e ? d = g : ".." === e && (d = g.U); + e = c.Ts; + if (0 !== e) { + if (!(g instanceof I)) continue; + h = g; + 1 === e ? g = h.Zd(c.Wo) : 2 === e && (g = h.$d(c.Wo)) + } + void 0 !== g && c.fG(g, d) + } + } + } + }; + z.defineProperty(I, { + Tt: "itemArray" + }, function() { + return this.Ii + }, function(a) { + var b = this.Ii; + if (b !== a) { + u && null !== a && !z.isArray(a) && z.k("Panel.itemArray must be an Array-like object or null, not: " + a); + var c = this.h; + null !== c && null !== b && Cl(c, this); + this.Ii = a; + null !== c && null !== a && yl(c, this); + this.j("itemArray", b, a); + null !== c && c.pa.qb || this.GA() + } + }); + + function Rl(a) { + return a.type === Yi || a.type === Dk || a.type === Ki || a.type === ga && 0 < a.va.length && (a = a.va.ea(0), a.Ff && a instanceof I && (a.type === Qm || a.type === Rm)) ? !0 : !1 + } + I.prototype.rebuildItemElements = I.prototype.GA = function() { + var a = 0; + for (Rl(this) && (a = 1); this.va.length > a;) this.Ve(this.va.length - 1); + a = this.Tt; + if (null !== a) + for (var b = z.bb(a), c = 0; c < b; c++) Ql(this, z.Ya(a, c), c) + }; + I.prototype.findItemPanelForData = I.prototype.EH = function(a) { + if (void 0 === a || null === a || null === this.rg) return null; + z.g(a, "object", I, "findItemPanelForData"); + return this.rg.na(a) + }; + + function Ql(a, b, c) { + if (!(void 0 === b || null === b || 0 > c)) { + var d; + d = mo(a, b); + var e = a.nI, + g = null; + null !== e && (g = e.na(d)); + null === g && (no || (no = !0, z.trace('No item template Panel found for category "' + d + '" on ' + a), z.trace(" Using default item template."), d = new I, e = new qa, e.bind(new Xg("text", "", ka)), d.add(e), oo = d), g = oo); + d = g; + null !== d && (gh(d), d = d.copy(), "object" === typeof b && (null === a.rg && (a.rg = new na(Object, I)), a.rg.add(b, d)), e = c, Rl(a) && e++, a.Ld(e, d), Sl(a, e, c), d.fe = null, d.data = b) + } + } + + function Sl(a, b, c) { + for (a = a.va; b < a.length;) { + var d = a.ea(b); + if (d instanceof I) { + var e = b, + g = c; + d.type === Qm ? d.Vb = e : d.type === Rm && (d.column = e); + d.mI = g + } + b++; + c++ + } + } + z.defineProperty(I, { + LK: "itemTemplate" + }, function() { + return null === this.sg ? null : this.sg.na("") + }, function(a) { + if (null === this.sg) { + if (null === a) return; + this.sg = new na("string", I) + } + var b = this.sg.na(""); + b !== a && (z.l(a, I, I, "itemTemplate"), (a instanceof D || a.Ff) && z.k("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: " + a), this.sg.add("", a), this.j("itemTemplate", b, a), a = this.h, null !== a && a.pa.qb || this.GA()) + }); + z.defineProperty(I, { + nI: "itemTemplateMap" + }, function() { + return this.sg + }, function(a) { + var b = this.sg; + if (b !== a) { + z.l(a, na, I, "itemTemplateMap"); + for (var c = a.i; c.next();) { + var d = c.value; + (d instanceof D || d.Ff) && z.k("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: " + d) + } + this.sg = a; + this.j("itemTemplateMap", b, a); + a = this.h; + null !== a && a.pa.qb || this.GA() + } + }); + z.defineProperty(I, { + KK: "itemCategoryProperty" + }, function() { + return this.vo + }, function(a) { + var b = this.vo; + b !== a && ("string" !== typeof a && "function" !== typeof a && z.ic(a, "string or function", I, "itemCategoryProperty"), this.vo = a, this.j("itemCategoryProperty", b, a)) + }); + + function mo(a, b) { + if (null === b) return ""; + var c = a.vo, + d = ""; + if ("function" === typeof c) d = c(b); + else if ("string" === typeof c && "object" === typeof b) { + if ("" === c) return ""; + d = z.tb(b, c) + } else return ""; + if (void 0 === d) return ""; + if ("string" === typeof d) return d; + z.k("Panel.getCategoryForItemData found a non-string category for " + b + ": " + d); + return "" + } + var no = !1, + oo = null; + z.defineProperty(I, { + FK: "isAtomic" + }, function() { + return this.dh + }, function(a) { + var b = this.dh; + b !== a && (z.g(a, "boolean", I, "isAtomic"), this.dh = a, this.j("isAtomic", b, a)) + }); + z.defineProperty(I, { + KE: "isClipping" + }, function() { + return this.hr + }, function(a) { + var b = this.hr; + b !== a && (z.g(a, "boolean", I, "isClipping"), this.hr = a, this.j("isClipping", b, a)) + }); + + function Fg() { + z.kc(this); + this.lh = null; + this.Bv = !0; + this.Uc = 0; + this.ef = NaN; + this.Uj = 0; + this.Sj = Infinity; + this.Ie = Pc; + this.sb = this.Xa = 0; + this.Ac = null; + this.Ls = po; + this.di = Am; + this.Fs = this.Yj = null; + this.Gs = NaN; + this.Nb = this.Wh = null; + this.Gq = !1 + } + z.ia("RowColumnDefinition", Fg); + Fg.prototype.copy = function() { + var a = new Fg; + a.Bv = this.Bv; + a.Uc = this.Uc; + a.ef = this.ef; + a.Uj = this.Uj; + a.Sj = this.Sj; + a.Ie = this.Ie; + a.Xa = this.Xa; + a.sb = this.sb; + a.di = this.di; + a.Ls = this.Ls; + a.Yj = null === this.Yj ? null : this.Yj.V(); + a.Fs = this.Fs; + a.Gs = this.Gs; + a.Wh = null; + null !== this.Wh && (a.Wh = z.zl(this.Wh)); + a.Nb = this.Nb; + a.Gq = this.Gq; + a.Ac = this.Ac; + return a + }; + Fg.prototype.tt = function(a) { + z.l(a, Fg, Fg, "copyFrom:pd"); + a.qe ? this.height = a.height : this.width = a.width; + this.pj = a.pj; + this.qf = a.qf; + this.alignment = a.alignment; + this.stretch = a.stretch; + this.uu = a.uu; + this.Yj = null === a.Yj ? null : a.Yj.V(); + this.Zp = a.Zp; + this.$p = a.$p; + this.Wh = null; + a.Wh && (this.Wh = z.zl(a.Wh)); + this.background = a.background; + this.Mz = a.Mz; + this.Ac = a.Ac + }; + Fg.prototype.toString = function() { + return "RowColumnDefinition " + (this.qe ? "(Row " : "(Column ") + this.index + ") #" + z.nd(this) + }; + var po; + Fg.Default = po = z.s(Fg, "Default", 0); + var bo; + Fg.None = bo = z.s(Fg, "None", 1); + var Vn; + Fg.ProportionalExtra = Vn = z.s(Fg, "ProportionalExtra", 2); + Fg.prototype.Tl = function(a) { + this.lh = a + }; + Fg.prototype.computeEffectiveSpacingTop = Fg.prototype.UD = function() { + var a = 0; + if (0 !== this.index) { + var b = this.lh, + c = this.Zp; + null === c && null !== b && (c = this.qe ? b.Ai : b.Kh); + null !== c && (a = this.$p, isNaN(a) && (a = null !== b ? this.qe ? b.Mh : b.Lh : 0)) + } + b = this.HF; + if (null === b) + if (b = this.lh, null !== b) b = b.Aj; + else return a; + return a + (this.qe ? b.top : b.left) + }; + Fg.prototype.computeEffectiveSpacing = Fg.prototype.Re = function() { + var a = 0; + if (0 !== this.index) { + var b = this.lh, + c = this.Zp; + null === c && null !== b && (c = this.qe ? b.Ai : b.Kh); + null !== c && (a = this.$p, isNaN(a) && (a = null !== b ? this.qe ? b.Mh : b.Lh : 0)) + } + b = this.HF; + if (null === b) + if (b = this.lh, null !== b) b = b.Aj; + else return a; + return a + (this.qe ? b.top + b.bottom : b.left + b.right) + }; + Fg.prototype.kd = function(a, b, c, d, e) { + var g = this.lh; + if (null !== g && (g.Rc(Sf, a, this, b, c, d, e), null !== this.Ac && (b = g.h, null !== b && !b.Ee && (g = g.op(), null !== g && (g = g.data, null !== g))))) + for (c = this.Ac.i; c.next();) c.value.Rx(this, g, a, b) + }; + z.w(Fg, { + U: "panel" + }, function() { + return this.lh + }); + z.defineProperty(Fg, { + qe: "isRow" + }, function() { + return this.Bv + }, function(a) { + this.Bv = a + }); + z.defineProperty(Fg, { + index: "index" + }, function() { + return this.Uc + }, function(a) { + this.Uc = a + }); + z.defineProperty(Fg, { + height: "height" + }, function() { + return this.ef + }, function(a) { + var b = this.ef; + b !== a && (u && z.g(a, "number", Fg, "height"), 0 > a && z.ka(a, ">= 0", Fg, "height"), this.ef = a, this.Oa = this.Xa, null !== this.U && this.U.S(), this.kd("height", b, a)) + }); + z.defineProperty(Fg, { + width: "width" + }, function() { + return this.ef + }, function(a) { + var b = this.ef; + b !== a && (u && z.g(a, "number", Fg, "width"), 0 > a && z.ka(a, ">= 0", Fg, "width"), this.ef = a, this.Oa = this.Xa, null !== this.U && this.U.S(), this.kd("width", b, a)) + }); + z.defineProperty(Fg, { + pj: "minimum" + }, function() { + return this.Uj + }, function(a) { + var b = this.Uj; + b !== a && (u && z.g(a, "number", Fg, "minimum"), (0 > a || !isFinite(a)) && z.ka(a, ">= 0", Fg, "minimum"), this.Uj = a, this.Oa = this.Xa, null !== this.U && this.U.S(), this.kd("minimum", b, a)) + }); + z.defineProperty(Fg, { + qf: "maximum" + }, function() { + return this.Sj + }, function(a) { + var b = this.Sj; + b !== a && (u && z.g(a, "number", Fg, "maximum"), 0 > a && z.ka(a, ">= 0", Fg, "maximum"), this.Sj = a, this.Oa = this.Xa, null !== this.U && this.U.S(), this.kd("maximum", b, a)) + }); + z.defineProperty(Fg, { + alignment: "alignment" + }, function() { + return this.Ie + }, function(a) { + var b = this.Ie; + b.N(a) || (u && z.l(a, Q, Fg, "alignment"), this.Ie = a.V(), null !== this.U && this.U.S(), this.kd("alignment", b, a)) + }); + z.defineProperty(Fg, { + stretch: "stretch" + }, function() { + return this.di + }, function(a) { + var b = this.di; + b !== a && (u && z.Ba(a, O, Fg, "stretch"), this.di = a, null !== this.U && this.U.S(), this.kd("stretch", b, a)) + }); + z.defineProperty(Fg, { + HF: "separatorPadding" + }, function() { + return this.Yj + }, function(a) { + "number" === typeof a ? a = new Db(a) : null !== a && u && z.l(a, Db, Fg, "separatorPadding"); + var b = this.Yj; + null !== a && null !== b && b.N(a) || (null !== a && (a = a.V()), this.Yj = a, null !== this.U && this.U.S(), this.kd("separatorPadding", b, a)) + }); + z.defineProperty(Fg, { + Zp: "separatorStroke" + }, function() { + return this.Fs + }, function(a) { + var b = this.Fs; + b !== a && (null === a || "string" === typeof a || a instanceof Da) && (a instanceof Da && a.freeze(), this.Fs = a, null !== this.U && this.U.S(), this.kd("separatorStroke", b, a)) + }); + z.defineProperty(Fg, { + $p: "separatorStrokeWidth" + }, function() { + return this.Gs + }, function(a) { + var b = this.Gs; + b !== a && (this.Gs = a, null !== this.U && this.U.S(), this.kd("separatorStrokeWidth", b, a)) + }); + z.defineProperty(Fg, { + iJ: "separatorDashArray" + }, function() { + return this.Wh + }, function(a) { + var b = this.Wh; + if (b !== a) { + null === a || Array.isArray(a) || z.ic(a, "Array", Fg, "separatorDashArray:value"); + if (null !== a) { + for (var c = a.length, d = 0, e = 0; e < c; e++) { + var g = a[e]; + "number" === typeof g && 0 <= g && isFinite(g) || z.k("separatorDashArray value " + g + " at index " + e + " must be a positive number or zero."); + d += g + } + if (0 === d) { + if (null === b) return; + a = null + } + } + this.Wh = a; + null !== this.U && this.U.ta(); + this.kd("separatorDashArray", b, a) + } + }); + z.defineProperty(Fg, { + background: "background" + }, function() { + return this.Nb + }, function(a) { + var b = this.Nb; + b !== a && (null === a || "string" === typeof a || a instanceof Da) && (a instanceof Da && a.freeze(), this.Nb = a, null !== this.U && this.U.ta(), this.kd("background", b, a)) + }); + z.defineProperty(Fg, { + Mz: "coversSeparators" + }, function() { + return this.Gq + }, function(a) { + var b = this.Gq; + b !== a && (z.g(a, "boolean", Fg, "coversSeparators"), this.Gq = a, null !== this.U && this.U.ta(), this.kd("coversSeparators", b, a)) + }); + z.defineProperty(Fg, { + uu: "sizing" + }, function() { + return this.Ls + }, function(a) { + var b = this.Ls; + b !== a && (u && z.Ba(a, Fg, Fg, "sizing"), this.Ls = a, null !== this.U && this.U.S(), this.kd("sizing", b, a)) + }); + + function ao(a) { + if (a.uu === po) { + var b = a.lh; + return a.qe ? b.eJ : b.dH + } + return a.uu + } + z.defineProperty(Fg, { + Oa: "actual" + }, function() { + return this.Xa + }, function(a) { + this.Xa = isNaN(this.ef) ? Math.max(Math.min(this.Sj, a), this.Uj) : Math.max(Math.min(this.Sj, this.ef), this.Uj) + }); + z.defineProperty(Fg, { + total: "total" + }, function() { + return this.Xa + this.Re() + }, function(a) { + this.Xa = isNaN(this.ef) ? Math.max(Math.min(this.Sj, a), this.Uj) : Math.max(Math.min(this.Sj, this.ef), this.Uj); + this.Xa = Math.max(0, this.Xa - this.Re()) + }); + z.defineProperty(Fg, { + position: "position" + }, function() { + return this.sb + }, function(a) { + this.sb = a + }); + Fg.prototype.bind = Fg.prototype.bind = function(a) { + a.Ag = this; + var b = this.U; + if (null !== b) { + var c = b.op(); + null !== c && fn(c) && z.k("Cannot add a Binding to a RowColumnDefinition that is already frozen: " + a + " on " + b) + } + null === this.Ac && (this.Ac = new J(Xg)); + this.Ac.add(a) + }; + + function X() { + O.call(this); + this.ab = null; + this.fo = "None"; + this.Yh = !1; + this.br = Am; + this.Nn = null; + this.Kc = this.Ad = "black"; + this.Oe = 1; + this.So = "butt"; + this.Uo = "miter"; + this.Km = 10; + this.To = null; + this.ve = 0; + this.ci = this.bi = Pc; + this.cs = this.bs = NaN; + this.ir = !1; + this.es = null; + this.ko = this.Yo = "None"; + this.fr = 1 + } + z.Qa(X, O); + z.ia("Shape", X); + X.prototype.cloneProtected = function(a) { + O.prototype.cloneProtected.call(this, a); + a.ab = this.ab; + a.fo = this.fo; + a.Yh = this.Yh; + a.br = this.br; + a.Nn = this.Nn; + a.Ad = this.Ad; + a.Kc = this.Kc; + a.Oe = this.Oe; + a.So = this.So; + a.Uo = this.Uo; + a.Km = this.Km; + null !== this.To && (a.To = z.zl(this.To)); + a.ve = this.ve; + a.bi = this.bi.V(); + a.ci = this.ci.V(); + a.bs = this.bs; + a.cs = this.cs; + a.ir = this.ir; + a.es = this.es; + a.Yo = this.Yo; + a.ko = this.ko; + a.fr = this.fr + }; + X.prototype.toString = function() { + return "Shape(" + ("None" !== this.Hb ? this.Hb : "None" !== this.fq ? this.fq : this.Xz) + ")#" + z.nd(this) + }; + + function qo(a, b, c, d) { + var e = c.length; + if (!(4 > e)) { + for (var g = d.Ia, h = Math.max(1, g.width), g = g.height, k = c[0], l = c[1], m = 0, n = 0, p = 0, q = 0, r = 0, s = 0, t = q = 0, v = z.rb(), x = 2; x < e; x += 2) m = c[x], n = c[x + 1], p = m - k, q = n - l, 0 === p && (p = .001), r = q / p, s = Math.atan2(q, p), q = Math.sqrt(p * p + q * q), v.push([p, s, r, q]), t += q, k = m, l = n; + k = c[0]; + l = c[1]; + p = d.Ia.width; + d instanceof X && (p -= d.ub); + 1 > p && (p = 1); + c = p; + for (var e = 0, m = c, n = h / 2, x = 0 === n ? !1 : !0, y = 0, q = v[y], p = q[0], s = q[1], r = q[2], q = q[3], A = 0; .1 <= t;) { + 0 === A && (x ? (m = c, e++, m -= n, t -= n, x = !1) : (m = c, e++), 0 === m && (m = 1)); + if (m > t) { + z.xa(v); + return + } + m > q ? (A = m - q, m = q) : A = 0; + var B = Math.sqrt(m * m / (1 + r * r)); + 0 > p && (B = -B); + k += B; + l += r * B; + a.translate(k, l); + a.rotate(s); + a.translate(-(h / 2), -(g / 2)); + 0 === A && d.nk(a, b); + a.translate(h / 2, g / 2); + a.rotate(-s); + a.translate(-k, -l); + t -= m; + q -= m; + if (0 !== A) { + y++; + if (y === v.length) { + z.xa(v); + return + } + q = v[y]; + p = q[0]; + s = q[1]; + r = q[2]; + q = q[3]; + m = A + } + } + z.xa(v) + } + } + X.prototype.nk = function(a, b) { + if (null !== this.Kc || null !== this.Ad) { + null !== this.Ad && Um(this, a, this.Ad, !0, !1); + null !== this.Kc && Um(this, a, this.Kc, !1, !1); + var c = this.Oe; + if (0 === c) { + var d = this.ca; + d instanceof da && d.type === Ki && "Selection" === d.nc && d.fc instanceof X && d.Wf.gf() === d.fc && (c = d.fc.ub) + } + a.lineWidth = c; + a.lineJoin = this.Uo; + a.lineCap = this.So; + a.miterLimit = this.Km; + var e = !1; + this.ca && b.hj("drawShadows") && (e = this.ca.sk); + var g = !0; + null !== this.Kc && null === this.Ad && (g = !1); + var d = !1, + h = !0, + k = this.QF; + null !== k && (d = !0, h = a.Tz(k, + this.ve)); + var l = this.ab; + if (null !== l) { + if (l.ba === mf) a.beginPath(), d && !h ? Hm(a, l.xc, l.Cc, l.zb, l.Gb, k, this.ve) : (a.moveTo(l.xc, l.Cc), a.lineTo(l.zb, l.Gb)), null !== this.Ad && a.Gg(this.Ad), 0 !== c && null !== this.Kc && a.tj(); + else if (l.ba === nf) { + var m = l.xc, + n = l.Cc, + p = l.zb, + q = l.Gb, + l = Math.min(m, p), + r = Math.min(n, q), + m = Math.abs(p - m), + n = Math.abs(q - n); + null !== this.Ad && (a.beginPath(), a.rect(l, r, m, n), a.Gg(this.Ad)); + if (null !== this.Kc) { + var s = p = 0, + t = 0; + g && e && (p = a.shadowOffsetX, s = a.shadowOffsetY, t = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = + 0, a.shadowBlur = 0); + d && !h ? (h = z.rb(), h.push(l), h.push(r), h.push(l + m), h.push(r), h.push(l + m), h.push(r + n), h.push(l), h.push(r + n), h.push(l), h.push(r), a.beginPath(), ro(a, h, k, this.ve), a.tj(), z.xa(h)) : 0 !== c && (a.beginPath(), a.rect(l, r, m, n), a.tj()); + g && e && (a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = t) + } + } else if (l.ba === of) m = l.xc, n = l.Cc, p = l.zb, q = l.Gb, l = Math.abs(p - m) / 2, r = Math.abs(q - n) / 2, m = Math.min(m, p) + l, n = Math.min(n, q) + r, a.beginPath(), a.moveTo(m, n - r), a.bezierCurveTo(m + Hd * l, n - r, m + l, n - Hd * r, m + l, n), a.bezierCurveTo(m + + l, n + Hd * r, m + Hd * l, n + r, m, n + r), a.bezierCurveTo(m - Hd * l, n + r, m - l, n + Hd * r, m - l, n), a.bezierCurveTo(m - l, n - Hd * r, m - Hd * l, n - r, m, n - r), a.closePath(), null !== this.Ad && a.Gg(this.Ad), d && !h && (h = z.rb(), we(m, n - r, m + Hd * l, n - r, m + l, n - Hd * r, m + l, n, .5, h), we(m + l, n, m + l, n + Hd * r, m + Hd * l, n + r, m, n + r, .5, h), we(m, n + r, m - Hd * l, n + r, m - l, n + Hd * r, m - l, n, .5, h), we(m - l, n, m - l, n - Hd * r, m - Hd * l, n - r, m, n - r, .5, h), a.beginPath(), ro(a, h, k, this.ve), z.xa(h)), 0 !== c && null !== this.Kc && (g && e ? (p = a.shadowOffsetX, s = a.shadowOffsetY, t = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = + 0, a.shadowBlur = 0, a.tj(), a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = t) : a.tj()); + else if (l.ba === jf) { + r = l.Cj; + n = r.length; + for (q = 0; q < n; q++) { + m = r.o[q]; + a.beginPath(); + a.moveTo(m.Ha, m.Da); + for (var p = m.Ab.o, s = p.length, v = null, t = 0; t < s; t++) { + var x = p[t]; + switch (x.ba) { + case Df: + a.moveTo(x.L, x.M); + break; + case qf: + a.lineTo(x.L, x.M); + break; + case Ef: + a.bezierCurveTo(x.Cd, x.Ne, x.mh, x.yg, x.zb, x.Gb); + break; + case Ff: + a.quadraticCurveTo(x.Cd, x.Ne, x.zb, x.Gb); + break; + case Gf: + if (x.radiusX === x.radiusY) v = Math.PI / 180, a.arc(x.Cd, x.Ne, x.radiusX, + x.Fe * v, (x.Fe + x.Lf) * v, 0 > x.Lf); + else { + var v = If(x, m), + y = v.length; + if (0 === y) { + a.lineTo(x.ra, x.za); + break + } + for (var A = 0; A < y; A++) { + var B = v[A]; + 0 === A && a.lineTo(B[0], B[1]); + a.bezierCurveTo(B[2], B[3], B[4], B[5], B[6], B[7]) + } + } + break; + case Hf: + A = y = 0; + if (null !== v && v.type === Gf) { + v = If(v, m); + B = v.length; + if (0 === B) { + a.lineTo(x.ra, x.za); + break + } + v = v[B - 1] || null; + null !== v && (y = v[6], A = v[7]) + } else y = null !== v ? v.L : m.Ha, A = null !== v ? v.M : m.Da; + v = Jf(x, m, y, A); + y = v.length; + if (0 === y) { + a.lineTo(x.ra, x.za); + break + } + for (A = 0; A < y; A++) B = v[A], a.bezierCurveTo(B[2], B[3], + B[4], B[5], B[6], B[7]); + break; + default: + z.k("Segment not of valid type: " + x.ba) + } + x.Rh && a.closePath(); + v = x + } + e ? (t = s = p = 0, m.so ? (!0 === m.jm && null !== this.Ad ? (a.Gg(this.Ad), g = !0) : g = !1, 0 !== c && null !== this.Kc && (g && (p = a.shadowOffsetX, s = a.shadowOffsetY, t = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), d && !h || a.tj(), g && (a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = t))) : (g && (p = a.shadowOffsetX, s = a.shadowOffsetY, t = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), !0 === m.jm && null !== this.Ad && + a.Gg(this.Ad), 0 !== c && null !== this.Kc && (d && !h || a.tj()), g && (a.shadowOffsetX = p, a.shadowOffsetY = s, a.shadowBlur = t))) : (!0 === m.jm && null !== this.Ad && a.Gg(this.Ad), 0 === c || null === this.Kc || d && !h || a.tj()) + } + if (d && !h) + for (c = g, g = l.Cj, h = g.length, l = 0; l < h; l++) { + r = g.o[l]; + a.beginPath(); + n = z.rb(); + n.push(r.Ha); + n.push(r.Da); + q = r.Ha; + m = r.Da; + p = q; + s = m; + t = r.Ab.o; + x = t.length; + for (v = 0; v < x; v++) { + y = t[v]; + switch (y.ba) { + case Df: + ro(a, n, k, this.ve); + n.length = 0; + n.push(y.L); + n.push(y.M); + q = y.L; + m = y.M; + p = q; + s = m; + break; + case qf: + n.push(y.L); + n.push(y.M); + q = y.L; + m = y.M; + break; + case Ef: + we(q, m, y.Cd, y.Ne, y.mh, y.yg, y.zb, y.Gb, .5, n); + q = y.L; + m = y.M; + break; + case Ff: + Je(q, m, y.Cd, y.Ne, y.zb, y.Gb, .5, n); + q = y.L; + m = y.M; + break; + case Gf: + A = If(y, r); + B = A.length; + if (0 === B) { + n.push(y.ra); + n.push(y.za); + q = y.ra; + m = y.za; + break + } + for (var L = 0; L < B; L++) { + var H = A[L]; + we(q, m, H[2], H[3], H[4], H[5], H[6], H[7], .5, n); + q = H[6]; + m = H[7] + } + break; + case Hf: + A = Jf(y, r, q, m); + B = A.length; + if (0 === B) { + n.push(y.ra); + n.push(y.za); + q = y.ra; + m = y.za; + break + } + for (L = 0; L < B; L++) H = A[L], we(q, m, H[2], H[3], H[4], H[5], H[6], H[7], .5, n), q = H[6], m = H[7]; + break; + default: + z.k("Segment not of valid type: " + + y.ba) + } + y.Rh && (n.push(p), n.push(s), ro(a, n, k, this.ve)) + } + ro(a, n, k, this.ve); + z.xa(n); + null !== this.Kc && (q = n = r = 0, c && e && (r = a.shadowOffsetX, n = a.shadowOffsetY, q = a.shadowBlur, a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), a.tj(), c && e && (a.shadowOffsetX = r, a.shadowOffsetY = n, a.shadowBlur = q)) + } + } + d && a.Pz(); + if (null !== this.xx) { + d = this.xx; + rj(d, Infinity, Infinity); + k = d.Ia; + d.Lc(0, 0, k.width, k.height); + c = this.Jl; + a.save(); + a.beginPath(); + k = z.rb(); + if (c.type === mf) k.push(c.Ha), k.push(c.Da), k.push(c.L), k.push(c.M), qo(a, b, k, d); + else if (c.type === + jf) + for (h = c.cc.i; h.next();) { + l = h.value; + k.length = 0; + k.push(l.Ha); + k.push(l.Da); + g = l.Ha; + r = l.Da; + n = g; + q = r; + m = l.Ab.o; + p = m.length; + for (s = 0; s < p; s++) { + t = m[s]; + switch (t.ba) { + case Df: + qo(a, b, k, d); + k.length = 0; + k.push(t.L); + k.push(t.M); + g = t.L; + r = t.M; + n = g; + q = r; + break; + case qf: + k.push(t.L); + k.push(t.M); + g = t.L; + r = t.M; + break; + case Ef: + we(g, r, t.Cd, t.Ne, t.mh, t.yg, t.zb, t.Gb, .5, k); + g = t.L; + r = t.M; + break; + case Ff: + Je(g, r, t.Cd, t.Ne, t.zb, t.Gb, .5, k); + g = t.L; + r = t.M; + break; + case Gf: + c = If(t, l); + e = c.length; + if (0 === e) { + k.push(t.ra); + k.push(t.za); + g = t.ra; + r = t.za; + break + } + for (x = + 0; x < e; x++) v = c[x], we(g, r, v[2], v[3], v[4], v[5], v[6], v[7], .5, k), g = v[6], r = v[7]; + break; + case Hf: + c = Jf(t, l, g, r); + e = c.length; + if (0 === e) { + k.push(t.ra); + k.push(t.za); + g = t.ra; + r = t.za; + break + } + for (x = 0; x < e; x++) v = c[x], we(g, r, v[2], v[3], v[4], v[5], v[6], v[7], .5, k), g = v[6], r = v[7]; + break; + default: + z.k("Segment not of valid type: " + t.ba) + } + t.Rh && (k.push(n), k.push(q), qo(a, b, k, d)) + } + qo(a, b, k, d) + } else if (c.type === nf) k.push(c.Ha), k.push(c.Da), k.push(c.L), k.push(c.Da), k.push(c.L), k.push(c.M), k.push(c.Ha), k.push(c.M), k.push(c.Ha), k.push(c.Da), + qo(a, b, k, d); + else if (c.type === of) { + h = new kf; + h.Ha = c.L; + h.Da = (c.Da + c.M) / 2; + g = new Of(Gf); + g.Fe = 0; + g.Lf = 360; + g.ra = (c.Ha + c.L) / 2; + g.za = (c.Da + c.M) / 2; + g.radiusX = Math.abs(c.Ha - c.L) / 2; + g.radiusY = Math.abs(c.Da - c.M) / 2; + h.add(g); + c = If(g, h); + e = c.length; + if (0 === e) k.push(g.ra), k.push(g.za); + else + for (g = h.Ha, r = h.Da, x = 0; x < e; x++) v = c[x], we(g, r, v[2], v[3], v[4], v[5], v[6], v[7], .5, k), g = v[6], r = v[7]; + qo(a, b, k, d) + } + z.xa(k); + a.restore(); + ca(a, !1) + } + } + } + }; + + function ro(a, b, c, d) { + var e = b.length; + if (!(4 > e)) { + var g = .001, + h = c.length, + k = b[0], + l = b[1]; + if (4 === e) Hm(a, k, l, b[2], b[3], c, d); + else { + a.moveTo(k, l); + for (var m = g = 0, n = 0, p = 0, q = 0, r = p = 0, s = z.rb(), t = 2; t < e; t += 2) g = b[t], m = b[t + 1], n = g - k, p = m - l, 0 === n && (n = .001), q = p / n, p = Math.sqrt(n * n + p * p), s.push([n, q, p]), r += p, k = g, l = m; + k = b[0]; + l = b[1]; + b = 0; + for (var e = !0, g = c[b % h], m = 0 !== d, t = 0, p = s[t], n = p[0], q = p[1], p = p[2], v = 0; .1 <= r;) { + 0 === v && (g = c[b % h], b++, m && (d %= g, g -= d, m = !1)); + g > r && (g = r); + g > p ? (v = g - p, g = p) : v = 0; + var x = Math.sqrt(g * g / (1 + q * q)); + 0 > n && (x = -x); + k += x; + l += + q * x; + e ? a.lineTo(k, l) : a.moveTo(k, l); + r -= g; + p -= g; + if (0 !== v) { + t++; + if (t === s.length) { + z.xa(s); + return + } + p = s[t]; + n = p[0]; + q = p[1]; + p = p[2]; + g = v + } else e = !e + } + z.xa(s) + } + } + } + X.prototype.getDocumentPoint = X.prototype.fb = function(a, b) { + void 0 === b && (b = new N); + a.Be() && z.k("getDocumentPoint Spot must be a real, specific Spot, not: " + a.toString()); + var c = this.Ga, + d = this.ub; + b.n(a.x * (c.width + d) - d / 2 + c.x + a.offsetX, a.y * (c.height + d) - d / 2 + c.y + a.offsetY); + this.ph.Cb(b); + return b + }; + X.prototype.lk = function(a, b) { + var c = this.ab; + if (null === c || null === this.fill && null === this.stroke) return !1; + var d = c.vb, + e = this.ub / 2; + c.type !== mf || b || (e += 2); + var g = z.kg(); + g.assign(d); + g.ag(e + 2, e + 2); + if (!g.Ma(a)) return z.dc(g), !1; + d = e + 1E-4; + if (c.type === mf) { + if (null === this.stroke) return !1; + d = (c.L - c.Ha) * (a.x - c.Ha) + (c.M - c.Da) * (a.y - c.Da); + if (0 > (c.Ha - c.L) * (a.x - c.L) + (c.Da - c.M) * (a.y - c.M) || 0 > d) return !1; + z.dc(g); + return te(c.Ha, c.Da, c.L, c.M, e, a.x, a.y) + } + if (c.type === nf) { + var h = c.Ha, + k = c.Da, + l = c.L, + m = c.M; + g.x = Math.min(h, l); + g.y = Math.min(k, + m); + g.width = Math.abs(l - h); + g.height = Math.abs(m - k); + if (null === this.fill) { + g.ag(-d, -d); + if (g.Ma(a)) return z.dc(g), !1; + g.ag(d, d) + } + null !== this.stroke && g.ag(e, e); + e = g.Ma(a); + z.dc(g); + return e + } + if (c.type === of) { + var h = c.Ha, + k = c.Da, + l = c.L, + m = c.M, + c = Math.min(h, l), + n = Math.min(k, m), + h = Math.abs(l - h) / 2, + k = Math.abs(m - k) / 2, + c = a.x - (c + h), + n = a.y - (n + k); + if (null === this.fill) { + h -= d; + k -= d; + if (0 >= h || 0 >= k || 1 >= c * c / (h * h) + n * n / (k * k)) return z.dc(g), !1; + h += d; + k += d + } + null !== this.stroke && (h += e, k += e); + z.dc(g); + return 0 >= h || 0 >= k ? !1 : 1 >= c * c / (h * h) + n * n / (k * k) + } + if (c.type === + jf) return z.dc(g), null === this.fill ? Nf(c, a.x, a.y, e) : c.Ma(a, e, 1 < this.ub, b); + z.k("Unknown Geometry type: " + c.type); + return !1 + }; + X.prototype.Ip = function(a, b, c, d) { + var e = this.Aa, + g = this.Oe; + a = Math.max(a, 0); + b = Math.max(b, 0); + var h; + if (this.Yh) h = this.Jl.vb; + else { + var k = this.Hb, + l = je[k]; + if (void 0 === l) { + var m = so[k]; + "string" === typeof m && (m = so[m]); + "function" === typeof m ? (l = m(null, 100, 100), je[k] = l) : z.k("Unsupported Figure: " + k) + } + h = l.vb + } + var k = h.width, + l = h.height, + m = h.width, + n = h.height; + switch (Mm(this, !0)) { + case $i: + d = c = 0; + break; + case lf: + m = Math.max(a - g, 0); + n = Math.max(b - g, 0); + break; + case Cm: + m = Math.max(a - g, 0); + d = 0; + break; + case Bm: + c = 0, n = Math.max(b - g, 0) + } + isFinite(e.width) && + (m = e.width); + isFinite(e.height) && (n = e.height); + e = this.Xe; + h = this.cg; + c = Math.max(c, h.width) - g; + d = Math.max(d, h.height) - g; + m = Math.min(e.width, m); + n = Math.min(e.height, n); + m = isFinite(m) ? Math.max(c, m) : Math.max(k, c); + n = isFinite(n) ? Math.max(d, n) : Math.max(l, d); + c = aj(this); + switch (c) { + case $i: + break; + case lf: + k = m; + l = n; + break; + case bj: + c = Math.min(m / k, n / l); + isFinite(c) || (c = 1); + k *= c; + l *= c; + break; + default: + z.k(c + " is not a valid geometryStretch.") + } + if (this.Yh) k = Math.max(k, .01), l = Math.max(l, .01), h = this.Jl, e = k, d = l, c = h.copy(), h = h.vb, e /= h.width, + d /= h.height, isFinite(e) || (e = 1), isFinite(d) || (d = 1), 1 === e && 1 === d || c.scale(e, d), this.ab = c; + else if (null === this.ab || this.ab.ro !== a - g || this.ab.po !== b - g) this.ab = X.makeGeometry(this, k, l); + h = this.ab.vb; + Infinity === a || Infinity === b ? Jm(this, h.x - g / 2, h.y - g / 2, 0 === a && 0 === k ? 0 : h.width + g, 0 === b && 0 === l ? 0 : h.height + g) : Jm(this, -(g / 2), -(g / 2), m + g, n + g) + }; + + function co(a, b, c, d) { + if (!1 !== ml(a)) { + a.ud.Wa(); + var e = a.Oe; + 0 === e && d instanceof da && d.type === Ki && d.fc instanceof X && (e = d.fc.ub); + e *= a.bc; + d instanceof G && null !== d.ab ? (b = d.ab.vb, Jm(a, b.x - e / 2, b.y - e / 2, b.width + e, b.height + e)) : Jm(a, -(e / 2), -(e / 2), b + e, c + e); + a.ud.freeze(); + a.ud.F() || z.k("Non-real measuredBounds has been set. Object " + a + ", measuredBounds: " + a.ud.toString()); + Yk(a, !1) + } + } + + function aj(a) { + var b = a.Zz; + return a.Yh ? b === Am ? lf : b : b === Am ? je[a.Hb].Xd : b + } + X.prototype.$i = function(a, b, c, d) { + Nm(this, a, b, c, d) + }; + X.prototype.getNearestIntersectionPoint = X.prototype.yE = function(a, b, c) { + return this.tp(a.x, a.y, b.x, b.y, c) + }; + X.prototype.tp = function(a, b, c, d, e) { + var g = this.transform, + h = 1 / (g.m11 * g.m22 - g.m12 * g.m21), + k = g.m22 * h, + l = -g.m12 * h, + m = -g.m21 * h, + n = g.m11 * h, + p = h * (g.m21 * g.dy - g.m22 * g.dx), + q = h * (g.m12 * g.dx - g.m11 * g.dy), + g = a * k + b * m + p, + h = a * l + b * n + q, + k = c * k + d * m + p, + l = c * l + d * n + q, + m = this.ub / 2, + p = this.ab; + null === p && (rj(this, Infinity, Infinity), p = this.ab); + q = p.vb; + n = !1; + if (p.type === mf) + if (1.5 >= this.ub) n = Me(p.xc, p.Cc, p.zb, p.Gb, g, h, k, l, e); + else { + var r = 0, + s = 0; + p.xc === p.zb ? (r = m, s = 0) : (b = (p.Gb - p.Cc) / (p.zb - p.xc), s = m / Math.sqrt(1 + b * b), r = s * b); + d = z.rb(); + b = new N; + Me(p.xc + + r, p.Cc + s, p.zb + r, p.Gb + s, g, h, k, l, b) && d.push(b); + b = new N; + Me(p.xc - r, p.Cc - s, p.zb - r, p.Gb - s, g, h, k, l, b) && d.push(b); + b = new N; + Me(p.xc + r, p.Cc + s, p.xc - r, p.Cc - s, g, h, k, l, b) && d.push(b); + b = new N; + Me(p.zb + r, p.Gb + s, p.zb - r, p.Gb - s, g, h, k, l, b) && d.push(b); + b = d.length; + if (0 === b) return z.xa(d), !1; + n = !0; + s = Infinity; + for (r = 0; r < b; r++) { + var k = d[r], + t = (k.x - g) * (k.x - g) + (k.y - h) * (k.y - h); + t < s && (s = t, e.x = k.x, e.y = k.y) + } + z.xa(d) + } + else if (p.type === nf) b = q.x - m, n = Ne(b, q.y - m, q.x + q.width + m, q.y + q.height + m, g, h, k, l, e); + else if (p.type === of) a: if (b = q.copy().ag(m, + m), 0 === b.width) n = Me(b.x, b.y, b.x, b.y + b.height, g, h, k, l, e); + else if (0 === b.height) n = Me(b.x, b.y, b.x + b.width, b.y, g, h, k, l, e); + else { + a = b.width / 2; + var v = b.height / 2; + d = b.x + a; + b = b.y + v; + c = 9999; + g !== k && (c = (h - l) / (g - k)); + if (9999 > Math.abs(c)) { + n = h - b - c * (g - d); + if (0 > a * a * c * c + v * v - n * n) { + e.x = NaN; + e.y = NaN; + n = !1; + break a + } + m = Math.sqrt(a * a * c * c + v * v - n * n); + k = (-(a * a * c * n) + a * v * m) / (v * v + a * a * c * c) + d; + a = (-(a * a * c * n) - a * v * m) / (v * v + a * a * c * c) + d; + l = c * (k - d) + n + b; + b = c * (a - d) + n + b; + d = Math.abs((g - k) * (g - k)) + Math.abs((h - l) * (h - l)); + h = Math.abs((g - a) * (g - a)) + Math.abs((h - b) * (h - + b)); + d < h ? (e.x = k, e.y = l) : (e.x = a, e.y = b) + } else { + k = v * v; + l = g - d; + k -= k / (a * a) * l * l; + if (0 > k) { + e.x = NaN; + e.y = NaN; + n = !1; + break a + } + m = Math.sqrt(k); + l = b + m; + b -= m; + d = Math.abs(l - h); + h = Math.abs(b - h); + d < h ? (e.x = g, e.y = l) : (e.x = g, e.y = b) + } + n = !0 + } else if (p.type === jf) { + var x = 0, + y = 0, + A = t = 0, + q = z.O(), + r = k - g, + s = l - h, + s = r * r + s * s; + e.x = k; + e.y = l; + for (r = 0; r < p.cc.count; r++) + for (var B = p.cc.o[r], L = B.Ab, x = B.Ha, y = B.Da, H = x, U = y, ea = 0; ea < L.count; ea++) { + var W = L.o[ea], + P = W.type, + t = W.L, + A = W.M, + ba = !1; + switch (P) { + case Df: + H = t; + U = A; + break; + case qf: + ba = to(x, y, t, A, g, h, k, l, q); + break; + case Ef: + var ba = + W.zc, + P = W.Qc, + Oa = W.Ah, + sa = W.Bh, + ba = Ke(x, y, ba, P, Oa, sa, t, A, g, h, k, l, .5, q); + break; + case Ff: + ba = (x + 2 * W.zc) / 3; + P = (y + 2 * W.Qc) / 3; + Oa = (2 * W.zc + t) / 3; + sa = (2 * W.zc + t) / 3; + ba = Ke(x, y, ba, P, Oa, sa, t, A, g, h, k, l, .5, q); + break; + case Gf: + case Hf: + P = W.type === Gf ? If(W, B) : Jf(W, B, x, y); + Oa = P.length; + if (0 === Oa) { + ba = to(x, y, W.ra, W.za, g, h, k, l, q); + break + } + for (A = 0; A < Oa; A++) v = P[A], 0 === A && to(x, y, v[0], v[1], g, h, k, l, q) && (t = uo(g, h, q, s, e), t < s && (s = t, n = !0)), Ke(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], g, h, k, l, .5, q) && (t = uo(g, h, q, s, e), t < s && (s = t, n = !0)); + t = v[6]; + A = v[7]; + break; + default: + z.k("Unknown Segment type: " + P) + } + x = t; + y = A; + ba && (t = uo(g, h, q, s, e), t < s && (s = t, n = !0)); + W.gx && (t = H, A = U, to(x, y, t, A, g, h, k, l, q) && (t = uo(g, h, q, s, e), t < s && (s = t, n = !0))) + } + g = c - a; + h = d - b; + b = Math.sqrt(g * g + h * h); + 0 !== b && (g /= b, h /= b); + e.x -= g * m; + e.y -= h * m; + z.A(q) + } else z.k("Unknown Geometry type: " + p.type); + if (!n) return !1; + this.transform.Cb(e); + return !0 + }; + + function uo(a, b, c, d, e) { + a = c.x - a; + b = c.y - b; + b = a * a + b * b; + return b < d ? (e.x = c.x, e.y = c.y, b) : d + } + + function to(a, b, c, d, e, g, h, k, l) { + var m = !1, + n = (e - h) * (b - d) - (g - k) * (a - c); + if (0 === n) return !1; + l.x = ((e * k - g * h) * (a - c) - (e - h) * (a * d - b * c)) / n; + l.y = ((e * k - g * h) * (b - d) - (g - k) * (a * d - b * c)) / n; + (a > c ? a - c : c - a) < (b > d ? b - d : d - b) ? (e = b < d ? b : d, a = b < d ? d : b, (l.y > e || td(l.y, e)) && (l.y < a || td(l.y, a)) && (m = !0)) : (e = a < c ? a : c, a = a < c ? c : a, (l.x > e || td(l.x, e)) && (l.x < a || td(l.x, a)) && (m = !0)); + return m + } + X.prototype.containedInRect = X.prototype.Ym = function(a, b) { + if (void 0 === b) return a.mk(this.W); + var c = this.ab; + null === c && (rj(this, Infinity, Infinity), c = this.ab); + var c = c.vb, + d = this.ub / 2, + e = !1, + g = z.O(); + g.n(c.x - d, c.y - d); + a.Ma(b.Cb(g)) && (g.n(c.x - d, c.bottom + d), a.Ma(b.Cb(g)) && (g.n(c.right + d, c.bottom + d), a.Ma(b.Cb(g)) && (g.n(c.right + d, c.y - d), a.Ma(b.Cb(g)) && (e = !0)))); + z.A(g); + return e + }; + X.prototype.intersectsRect = X.prototype.Ig = function(a, b) { + if (this.Ym(a, b) || void 0 === b && (b = this.transform, a.mk(this.W))) return !0; + var c = z.Fh(); + c.set(b); + c.fA(); + var d = a.left, + e = a.right, + g = a.top, + h = a.bottom, + k = z.O(); + k.n(d, g); + c.Cb(k); + if (this.lk(k, !0)) return z.A(k), !0; + k.n(e, g); + c.Cb(k); + if (this.lk(k, !0)) return z.A(k), !0; + k.n(d, h); + c.Cb(k); + if (this.lk(k, !0)) return z.A(k), !0; + k.n(e, h); + c.Cb(k); + if (this.lk(k, !0)) return z.A(k), !0; + var l = z.O(), + m = z.O(); + c.set(b); + c.vA(this.transform); + c.fA(); + l.x = e; + l.y = g; + l.transform(c); + k.x = d; + k.y = + g; + k.transform(c); + var n = !1; + vo(this, k, l, m) ? n = !0 : (k.x = e, k.y = h, k.transform(c), vo(this, k, l, m) ? n = !0 : (l.x = d, l.y = h, l.transform(c), vo(this, k, l, m) ? n = !0 : (k.x = d, k.y = g, k.transform(c), vo(this, k, l, m) && (n = !0)))); + z.A(k); + z.jf(c); + z.A(l); + z.A(m); + return n + }; + + function vo(a, b, c, d) { + if (!a.yE(b, c, d)) return !1; + a = b.x; + b = b.y; + var e = c.x; + c = c.y; + var g = d.x; + d = d.y; + if (a === e) { + var h = 0; + a = 0; + b < c ? (h = b, a = c) : (h = c, a = b); + return d >= h && d <= a + } + a < e ? (h = a, a = e) : h = e; + return g >= h && g <= a + } + X.prototype.sE = function(a, b, c) { + function d(a, b) { + for (var c = a.length, d = 0; d < c; d += 2) + if (b.kp(a[d], a[d + 1]) > e) return !0; + return !1 + } + if (c && null !== this.fill && this.lk(a, !0)) return !0; + var e = a.Af(b); + b = e; + 1.5 < this.ub && (e = this.ub / 2 + Math.sqrt(e), e *= e); + var g = this.ab; + if (null === g && (rj(this, Infinity, Infinity), g = this.ab, null === g)) return !1; + if (!c) { + var h = g.vb, + k = h.x, + l = h.y, + m = h.x + h.width, + h = h.y + h.height; + if (wb(a.x, a.y, k, l) <= e && wb(a.x, a.y, m, l) <= e && wb(a.x, a.y, k, h) <= e && wb(a.x, a.y, m, h) <= e) return !0 + } + k = g.xc; + l = g.Cc; + m = g.zb; + h = g.Gb; + if (g.type === + mf) { + if (c = vb(a.x, a.y, k, l, m, h), g = (k - m) * (a.x - m) + (l - h) * (a.y - h), c <= (0 <= (m - k) * (a.x - k) + (h - l) * (a.y - l) && 0 <= g ? e : b)) return !0 + } else { + if (g.type === nf) return b = !1, c && (b = vb(a.x, a.y, k, l, k, h) <= e || vb(a.x, a.y, k, l, m, l) <= e || vb(a.x, a.y, m, l, m, h) <= e || vb(a.x, a.y, k, h, m, h) <= e), b; + if (g.type === of) { + b = a.x - (k + m) / 2; + var g = a.y - (l + h) / 2, + n = Math.abs(m - k) / 2, + p = Math.abs(h - l) / 2; + if (0 === n || 0 === p) return c = vb(a.x, a.y, k, l, m, h), c <= e ? !0 : !1; + if (c) { + if (a = gf(n, p, b, g), a * a <= e) return !0 + } else return wb(b, g, -n, 0) >= e || wb(b, g, 0, -p) >= e || wb(b, g, 0, p) >= e || wb(b, g, n, 0) >= + e ? !1 : !0 + } else if (g.type === jf) { + h = g.vb; + k = h.x; + l = h.y; + m = h.x + h.width; + h = h.y + h.height; + if (a.x > m && a.x < k && a.y > h && a.y < l && vb(a.x, a.y, k, l, k, h) > e && vb(a.x, a.y, k, l, m, l) > e && vb(a.x, a.y, m, h, k, h) > e && vb(a.x, a.y, m, h, m, l) > e) return !1; + b = Math.sqrt(e); + if (c) { + if (null === this.fill ? Nf(g, a.x, a.y, b) : g.Ma(a, b, !0)) return !0 + } else { + c = g.cc; + for (b = 0; b < c.count; b++) { + k = c.o[b]; + n = k.Ha; + p = k.Da; + if (a.kp(n, p) > e) return !1; + l = k.Ab.o; + m = l.length; + for (h = 0; h < m; h++) { + var q = l[h]; + switch (q.type) { + case Df: + case qf: + n = q.L; + p = q.M; + if (a.kp(n, p) > e) return !1; + break; + case Ef: + g = z.rb(); + we(n, p, q.zc, q.Qc, q.Ah, q.Bh, q.L, q.M, .8, g); + n = d(g, a); + z.xa(g); + if (n) return !1; + n = q.L; + p = q.M; + if (a.kp(n, p) > e) return !1; + break; + case Ff: + g = z.rb(); + Je(n, p, q.zc, q.Qc, q.L, q.M, .8, g); + n = d(g, a); + z.xa(g); + if (n) return !1; + n = q.L; + p = q.M; + if (a.kp(n, p) > e) return !1; + break; + case Gf: + case Hf: + var r = q.type === Gf ? If(q, k) : Jf(q, k, n, p), + s = r.length; + if (0 === s) { + n = q.ra; + p = q.za; + if (a.kp(n, p) > e) return !1; + break + } + q = null; + g = z.rb(); + for (b = 0; b < s; b++) + if (q = r[b], g.length = 0, we(q[0], q[1], q[2], q[3], q[4], q[5], q[6], q[7], .8, g), d(g, a)) return z.xa(g), !1; + z.xa(g); + null !== q && (n = + q[6], p = q[7]); + break; + default: + z.k("Unknown Segment type: " + q.type) + } + } + } + return !0 + } + } + } + return !1 + }; + z.defineProperty(X, { + Jl: "geometry" + }, function() { + return this.ab ? this.ab : this.Nn + }, function(a) { + var b = this.ab; + if (b !== a) { + null !== a ? (u && z.l(a, hf, X, "geometry"), this.Nn = this.ab = a.freeze()) : this.Nn = this.ab = null; + var c = this.ca; + null !== c && (c.Qj = NaN); + this.Yh = !0; + this.S(); + this.j("geometry", b, a); + a = this.ca; + null !== a && 0 !== (this.ja & 1024) && Im(this, a, "geometryString") + } + }); + z.defineProperty(X, { + LH: "geometryString" + }, function() { + return null === this.Jl ? "" : this.Jl.toString() + }, function(a) { + a = sf(a); + var b = a.normalize(); + this.Jl = a; + this.position = a = z.Tb(-b.x, -b.y); + z.A(a) + }); + z.defineProperty(X, { + ME: "isGeometryPositioned" + }, function() { + return this.ir + }, function(a) { + u && z.g(a, "boolean", X, "isGeometryPositioned"); + var b = this.ir; + b !== a && (this.ir = a, this.S(), this.j("isGeometryPositioned", b, a)) + }); + X.prototype.Ae = function() { + this.ab = null; + this.S() + }; + z.defineProperty(X, { + fill: "fill" + }, function() { + return this.Ad + }, function(a) { + var b = this.Ad; + b !== a && (u && null !== a && z.ot(a, "Shape.fill"), a instanceof Da && a.freeze(), this.Ad = a, this.ta(), this.j("fill", b, a)) + }); + z.defineProperty(X, { + stroke: "stroke" + }, function() { + return this.Kc + }, function(a) { + var b = this.Kc; + b !== a && (u && null !== a && z.ot(a, "Shape.stroke"), a instanceof Da && a.freeze(), this.Kc = a, this.ta(), this.j("stroke", b, a)) + }); + z.defineProperty(X, { + ub: "strokeWidth" + }, function() { + return this.Oe + }, function(a) { + var b = this.Oe; + if (b !== a) + if (u && z.p(a, X, "strokeWidth"), 0 <= a) { + this.Oe = a; + this.S(); + var c = this.ca; + null !== c && (c.Qj = NaN); + this.j("strokeWidth", b, a) + } else z.ka(a, "value >= 0", X, "strokeWidth:value") + }); + z.defineProperty(X, { + wL: "strokeCap" + }, function() { + return this.So + }, function(a) { + var b = this.So; + b !== a && ("string" !== typeof a || "butt" !== a && "round" !== a && "square" !== a ? z.ka(a, '"butt", "round", or "square"', X, "strokeCap") : (this.So = a, this.ta(), this.j("strokeCap", b, a))) + }); + z.defineProperty(X, { + yL: "strokeJoin" + }, function() { + return this.Uo + }, function(a) { + var b = this.Uo; + b !== a && ("string" !== typeof a || "miter" !== a && "bevel" !== a && "round" !== a ? z.ka(a, '"miter", "bevel", or "round"', X, "strokeJoin") : (this.Uo = a, this.ta(), this.j("strokeJoin", b, a))) + }); + z.defineProperty(X, { + zL: "strokeMiterLimit" + }, function() { + return this.Km + }, function(a) { + var b = this.Km; + if (b !== a) + if (u && z.p(a, X, "strokeMiterLimit"), 1 <= a) { + this.Km = a; + this.ta(); + var c = this.ca; + null !== c && (c.Qj = NaN); + this.j("strokeMiterLimit", b, a) + } else z.ka(a, "value >= 1", X, "strokeWidth:value") + }); + z.defineProperty(X, { + QF: "strokeDashArray" + }, function() { + return this.To + }, function(a) { + var b = this.To; + if (b !== a) { + null === a || Array.isArray(a) || z.ic(a, "Array", X, "strokeDashArray:value"); + if (null !== a) { + for (var c = a.length, d = 0, e = 0; e < c; e++) { + var g = a[e]; + "number" === typeof g && 0 <= g && isFinite(g) || z.k("strokeDashArray:value " + g + " at index " + e + " must be a positive number or zero."); + d += g + } + if (0 === d) { + if (null === b) return; + a = null + } + } + this.To = a; + this.ta(); + this.j("strokeDashArray", b, a) + } + }); + z.defineProperty(X, { + xL: "strokeDashOffset" + }, function() { + return this.ve + }, function(a) { + var b = this.ve; + b !== a && (u && z.p(a, X, "strokeDashOffset"), 0 <= a && (this.ve = a, this.ta(), this.j("strokeDashOffset", b, a))) + }); + z.defineProperty(X, { + Hb: "figure" + }, function() { + return this.fo + }, function(a) { + var b = this.fo; + if (b !== a) { + u && z.g(a, "string", X, "figure"); + var c = so[a]; + "function" === typeof c ? c = a : (c = so[a.toLowerCase()]) || z.k("Unknown Shape.figure: " + a); + b !== c && (a = this.ca, null !== a && (a.Qj = NaN), this.fo = c, this.Yh = !1, this.Ae(), this.j("figure", b, c)) + } + }); + z.defineProperty(X, { + fq: "toArrow" + }, function() { + return this.Yo + }, function(a) { + var b = this.Yo; + !0 === a ? a = "Standard" : !1 === a && (a = ""); + if (b !== a) { + u && z.g(a, "string", X, "toArrow"); + var c = wo(a); + null === c ? z.k("Unknown Shape.toArrow: " + a) : b !== c && (this.Yo = c, this.Yh = !1, this.Ae(), xo(this), this.j("toArrow", b, c)) + } + }); + z.defineProperty(X, { + Xz: "fromArrow" + }, function() { + return this.ko + }, function(a) { + var b = this.ko; + !0 === a ? a = "Standard" : !1 === a && (a = ""); + if (b !== a) { + u && z.g(a, "string", X, "fromArrow"); + var c = wo(a); + null === c ? z.k("Unknown Shape.fromArrow: " + a) : b !== c && (this.ko = c, this.Yh = !1, this.Ae(), xo(this), this.j("fromArrow", b, c)) + } + }); + + function xo(a) { + var b = a.h; + null !== b && b.pa.qb || (a.pu = yo, "None" !== a.Yo ? (a.De = -1, a.jk = ad) : "None" !== a.ko && (a.De = 0, a.jk = new Q(1 - ad.x, ad.y))) + } + z.defineProperty(X, { + C: "spot1" + }, function() { + return this.bi + }, function(a) { + z.l(a, Q, X, "spot1"); + var b = this.bi; + b.N(a) || (this.bi = a = a.V(), this.S(), this.j("spot1", b, a)) + }); + z.defineProperty(X, { + D: "spot2" + }, function() { + return this.ci + }, function(a) { + z.l(a, Q, X, "spot2"); + var b = this.ci; + b.N(a) || (this.ci = a = a.V(), this.S(), this.j("spot2", b, a)) + }); + z.defineProperty(X, { + Ic: "parameter1" + }, function() { + return this.bs + }, function(a) { + var b = this.bs; + b !== a && (this.bs = a, this.Ae(), this.j("parameter1", b, a)) + }); + z.defineProperty(X, { + gu: "parameter2" + }, function() { + return this.cs + }, function(a) { + var b = this.cs; + b !== a && (this.cs = a, this.Ae(), this.j("parameter2", b, a)) + }); + z.w(X, { + Ga: "naturalBounds" + }, function() { + if (null !== this.ab) return this.Wc.assign(this.ab.vb), this.Wc; + var a = this.Aa; + return new w(0, 0, a.width, a.height) + }); + z.defineProperty(X, { + xx: "pathPattern" + }, function() { + return this.es + }, function(a) { + var b = this.es; + b !== a && (u && z.l(a, O, X, "pathPattern"), this.es = a, this.ta(), this.j("pathPattern", b, a)) + }); + z.defineProperty(X, { + mL: "pathObject" + }, function() { + return this.xx + }, function(a) { + this.xx = a + }); + z.defineProperty(X, { + Zz: "geometryStretch" + }, function() { + return this.br + }, function(a) { + var b = this.br; + b !== a && (z.Ba(a, O, X, "geometryStretch"), this.br = a, this.j("geometryStretch", b, a)) + }); + z.defineProperty(X, { + interval: "interval" + }, function() { + return this.fr + }, function(a) { + var b = this.fr; + u && z.p(a, X, "interval"); + a = Math.floor(a); + b !== a && 0 <= a && (this.fr = a, null !== this.h && hl(this.h), this.S(), this.j("interval", b, a)) + }); + X.makeGeometry = function(a, b, c) { + var d = a.Aa, + e = d.width, + d = d.height; + void 0 !== b && !isNaN(b) && isFinite(b) && (e = b); + void 0 !== c && !isNaN(c) && isFinite(c) && (d = c); + isFinite(e) || (e = 100); + isFinite(d) || (d = 100); + b = null; + "None" !== a.fq ? b = ke[a.fq] : "None" !== a.Xz ? b = ke[a.Xz] : (c = so[a.Hb], "string" === typeof c && (c = so[c]), void 0 === c && z.k("Unknown Shape.figure: " + a.Hb), b = c(a, e, d), b.ro = e, b.po = d); + null === b && (c = so.Rectangle, "function" === typeof c && (b = c(a, e, d))); + return b + }; + X.getFigureGenerators = function() { + var a = new na("string", "function"), + b; + for (b in so) + if (b !== b.toLowerCase()) { + var c = so[b]; + "function" === typeof c && a.add(b, c) + } + a.freeze(); + return a + }; + X.defineFigureGenerator = function(a, b) { + z.g(a, "string", X, "defineFigureGenerator:name"); + "string" === typeof b ? "" !== b && so[b] || z.k("Shape.defineFigureGenerator synonym must not be empty or None or not a defined figure name: " + b) : z.g(b, "function", X, "defineFigureGenerator:func"); + var c = a.toLowerCase(); + "" !== a && "none" !== c && a !== c || z.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: " + a); + so[a] = b; + so[c] = a + }; + X.getArrowheadGeometries = function() { + var a = new na("string", hf), + b; + for (b in ke) + if (b !== b.toLowerCase()) { + var c = ke[b]; + c instanceof hf && a.add(b, c) + } + a.freeze(); + return a + }; + X.defineArrowheadGeometry = function(a, b) { + z.g(a, "string", X, "defineArrowheadGeometry:name"); + var c = null; + "string" === typeof b ? (z.g(b, "string", X, "defineArrowheadGeometry:pathstr"), c = sf(b, !1)) : (z.l(b, hf, X, "defineArrowheadGeometry:pathstr"), c = b); + var d = a.toLowerCase(); + "" !== a && "none" !== d && a !== d || z.k("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: " + a); + ke[a] = c; + ke[d] = a + }; + + function qa() { + O.call(this); + this.we = ""; + this.Kc = "black"; + this.Nh = "13px sans-serif"; + this.Mm = "start"; + this.kr = !0; + this.lm = this.mm = !1; + this.ll = zo; + this.Qm = Ao; + this.Jv = this.Le = 0; + this.jo = this.Zy = this.$y = null; + this.Nj = new Bo; + this.Wq = !1; + this.uf = this.nl = this.Us = null; + this.ak = this.$j = 0; + this.Li = Infinity; + this.Ev = 0 + } + z.Qa(qa, O); + z.ia("TextBlock", qa); + var Co = new ma, + Do = 0, + Eo = new ma, + Fo = 0, + Go = "...", + Ho = "", + Io = (new la(null)).yl; + qa.getEllipsis = function() { + return Go + }; + qa.setEllipsis = function(a) { + Go = a; + Eo = new ma; + Fo = 0 + }; + qa.prototype.cloneProtected = function(a) { + O.prototype.cloneProtected.call(this, a); + a.we = this.we; + a.Kc = this.Kc; + a.Nh = this.Nh; + a.Mm = this.Mm; + a.kr = this.kr; + a.mm = this.mm; + a.lm = this.lm; + a.ll = this.ll; + a.Qm = this.Qm; + a.Le = this.Le; + a.Jv = this.Jv; + a.$y = this.$y; + a.Zy = this.Zy; + a.jo = this.jo; + a.Nj.tt(this.Nj); + a.Wq = this.Wq; + a.Us = this.Us; + a.nl = this.nl; + a.uf = this.uf; + a.$j = this.$j; + a.ak = this.ak; + a.Li = this.Li; + a.Ev = this.Ev + }; + qa.prototype.toString = function() { + return 22 < this.we.length ? 'TextBlock("' + this.we.substring(0, 20) + '"...)' : 'TextBlock("' + this.we + '")' + }; + var Jo; + qa.None = Jo = z.s(qa, "None", 0); + var Ko; + qa.WrapFit = Ko = z.s(qa, "WrapFit", 1); + var Ao; + qa.WrapDesiredSize = Ao = z.s(qa, "WrapDesiredSize", 2); + var zo; + qa.OverflowClip = zo = z.s(qa, "OverflowClip", 0); + var Lo; + qa.OverflowEllipsis = Lo = z.s(qa, "OverflowEllipsis", 1); + qa.prototype.S = function() { + O.prototype.S.call(this); + this.Zy = this.$y = null + }; + z.defineProperty(qa, { + font: "font" + }, function() { + return this.Nh + }, function(a) { + var b = this.Nh; + b !== a && (u && (z.g(a, "string", qa, "font"), Mo(a) || z.k('Not a valid font: "' + a + '"')), this.Nh = a, this.jo = null, this.S(), this.j("font", b, a)) + }); + var Mo; + qa.isValidFont = Mo = function(a) { + var b = Io.font; + if (a === b || "10px sans-serif" === a) return !0; + Io.font = "10px sans-serif"; + var c; + Io.font = a; + var d = Io.font; + if ("10px sans-serif" !== d) return Io.font = b, !0; + Io.font = "19px serif"; + c = Io.font; + Io.font = a; + d = Io.font; + Io.font = b; + return d !== c + }; + z.defineProperty(qa, { + text: "text" + }, function() { + return this.we + }, function(a) { + var b = this.we; + a = null !== a && void 0 !== a ? a.toString() : ""; + b !== a && (this.we = a, this.S(), this.j("text", b, a)) + }); + z.defineProperty(qa, { + textAlign: "textAlign" + }, function() { + return this.Mm + }, function(a) { + var b = this.Mm; + b !== a && (u && z.g(a, "string", qa, "textAlign"), "start" === a || "end" === a || "left" === a || "right" === a || "center" === a ? (this.Mm = a, this.ta(), this.j("textAlign", b, a)) : z.ka(a, '"start", "end", "left", "right", or "center"', qa, "textAlign")) + }); + z.w(qa, { + Ga: "naturalBounds" + }, function() { + if (!this.Wc.F()) { + var a = No(this, this.we, this.Nj, 999999).width, + b = Oo(this, a, this.Nj), + c = this.Aa; + isNaN(c.width) || (a = c.width); + isNaN(c.height) || (b = c.height); + yb(this.Wc, a, b) + } + return this.Wc + }); + z.defineProperty(qa, { + lx: "isMultiline" + }, function() { + return this.kr + }, function(a) { + var b = this.kr; + b !== a && (u && z.g(a, "boolean", qa, "isMultiline"), this.kr = a, this.S(), this.j("isMultiline", b, a)) + }); + z.defineProperty(qa, { + JK: "isUnderline" + }, function() { + return this.mm + }, function(a) { + var b = this.mm; + b !== a && (u && z.g(a, "boolean", qa, "isUnderline"), this.mm = a, this.ta(), this.j("isUnderline", b, a)) + }); + z.defineProperty(qa, { + IK: "isStrikethrough" + }, function() { + return this.lm + }, function(a) { + var b = this.lm; + b !== a && (u && z.g(a, "boolean", qa, "isStrikethrough"), this.lm = a, this.ta(), this.j("isStrikethrough", b, a)) + }); + z.defineProperty(qa, { + iG: "wrap" + }, function() { + return this.Qm + }, function(a) { + var b = this.Qm; + b !== a && (u && z.Ba(a, qa, qa, "wrap"), this.Qm = a, this.S(), this.j("wrap", b, a)) + }); + z.defineProperty(qa, { + overflow: "overflow" + }, function() { + return this.ll + }, function(a) { + var b = this.ll; + b !== a && (u && z.Ba(a, qa, qa, "overflow"), this.ll = a, this.S(), this.j("overflow", b, a)) + }); + z.defineProperty(qa, { + stroke: "stroke" + }, function() { + return this.Kc + }, function(a) { + var b = this.Kc; + b !== a && (u && null !== a && z.ot(a, "TextBlock.stroke"), a instanceof Da && a.freeze(), this.Kc = a, this.ta(), this.j("stroke", b, a)) + }); + z.w(qa, { + sI: "lineCount" + }, function() { + return this.Le + }); + z.defineProperty(qa, { + Sz: "editable" + }, function() { + return this.Wq + }, function(a) { + var b = this.Wq; + b !== a && (u && z.g(a, "boolean", qa, "editable"), this.Wq = a, this.j("editable", b, a)) + }); + z.defineProperty(qa, { + SF: "textEditor" + }, function() { + return this.Us + }, function(a) { + var b = this.Us; + b !== a && (a instanceof HTMLElement || z.k("textEditor must be an HTMLElement, not: " + a), this.Us = a, this.j("textEditor", b, a)) + }); + z.defineProperty(qa, { + Uz: "errorFunction" + }, function() { + return this.uf + }, function(a) { + var b = this.uf; + b !== a && (null !== a && z.g(a, "function", qa, "errorFunction"), this.uf = a, this.j("errorFunction", b, a)) + }); + qa.prototype.nk = function(a, b) { + if (null !== this.Kc && 0 !== this.we.length && null !== this.Nh) { + var c = this.Ga.width, + d = Po(this); + a.textAlign = this.Mm; + Um(this, a, this.Kc, !0, !1); + (this.mm || this.lm) && Um(this, a, this.Kc, !1, !1); + var e = this.Nj, + g = 0, + h = !1, + k = z.Tb(0, 0); + this.ph.Cb(k); + var l = z.Tb(0, d); + this.ph.Cb(l); + var m = k.Af(l); + z.A(k); + z.A(l); + k = b.scale; + 8 > m * k * k && (h = !0); + b.gd !== a && (h = !1); + !1 === b.hj("textGreeking") && (h = !1); + for (var m = b.mr, k = this.$j, l = this.ak, n = this.Le, p = 0; p < n; p++) { + var q = e.sf[p], + r = e.Je[p]; + q > c && (q = c); + var g = g + k, + s = r, + r = a, + t = g, + v = c, + x = d, + y = 0, + A = this.Mm; + "start" === A && (A = m ? "right" : "left"); + "end" === A && (A = m ? "left" : "right"); + h ? ("left" === A ? y = 0 : "right" === A ? y = v - q : "center" === A && (y = (v - q) / 2), r.fillRect(0 + y, t + .25 * x, q, 1)) : ("left" === A ? y = 0 : "right" === A ? y = v : "center" === A && (y = v / 2), r.fillText(s, 0 + y, t + x - .25 * x), s = x / 20 | 0, 0 === s && (s = 1), "right" === A ? y -= q : "center" === A && (y -= q / 2), this.mm && (r.beginPath(), r.lineWidth = s, r.moveTo(0 + y, t + x - .2 * x), r.lineTo(0 + y + q, t + x - .2 * x), r.stroke()), this.lm && (r.beginPath(), r.lineWidth = s, t = t + x - x / 2.2 | 0, 0 !== s % 2 && (t += .5), r.moveTo(0 + + y, t), r.lineTo(0 + y + q, t), r.stroke())); + g += d + l + } + } + }; + qa.prototype.Ip = function(a, b, c, d) { + this.Ev = a; + var e = this.Nj; + e.reset(); + var g = 0, + h = 0; + if (isNaN(this.Aa.width)) { + g = this.we.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); + if (0 === g.length) g = 0; + else if (this.lx) { + for (var k = h = 0, l = !1; !l;) { + var m = g.indexOf("\n", k); - 1 === m && (m = g.length, l = !0); + k = Qo(g.substr(k, m - k).replace(/^\s+|\s+$/g, ""), this.Nh); + k > h && (h = k); + k = m + 1 + } + g = h + } else h = g.indexOf("\n", 0), 0 <= h && (g = g.substr(0, h)), g = k = Qo(g, this.Nh); + g = Math.min(g, a / this.scale); + g = Math.max(8, g) + } else g = this.Aa.width; + null !== this.U && (g = Math.min(g, + this.U.Xe.width), g = Math.max(g, this.U.cg.width)); + h = Oo(this, g, e); + m = h = isNaN(this.Aa.height) ? Math.min(h, b / this.scale) : this.Aa.height; + if (0 !== e.cf && 1 !== e.Je.length && this.ll === Lo && (b = this.Nh, l = this.ll === Lo ? Ro(b) : 0, k = this.$j + this.ak, k = Math.max(0, Po(this) + k), m = Math.min(this.AI - 1, Math.max(Math.floor(m / k + .01) - 1, 0)), !(m + 1 >= e.Je.length))) { + k = e.Je[m]; + for (a = Math.max(1, a - l); Qo(k, b) > a && 1 < k.length;) k = k.substr(0, k.length - 1); + k += Go; + a = Qo(k, b); + e.Je[m] = k; + e.Je = e.Je.slice(0, m + 1); + e.sf[m] = a; + e.sf = e.sf.slice(0, m + 1); + e.Zi = e.Je.length; + e.cf = Math.max(e.cf, a); + this.Le = e.Zi + } + if (this.iG === Ko || isNaN(this.Aa.width)) g = e.cf, isNaN(this.Aa.width) && (g = Math.max(8, g)); + g = Math.max(c, g); + h = Math.max(d, h); + yb(this.Wc, g, h); + Jm(this, 0, 0, g, h) + }; + qa.prototype.$i = function(a, b, c, d) { + Nm(this, a, b, c, d) + }; + + function No(a, b, c, d) { + b = b.replace(/^\s+|\s+$/g, ""); + var e = 0, + g = 0, + h = 0, + k = a.Nh, + g = a.$j + a.ak, + l = Math.max(0, Po(a) + g), + h = a.ll === Lo ? Ro(k) : 0; + if (a.Le >= a.Li) return new Ea(0, l); + if (a.Qm === Jo) { + c.Zi = 1; + g = Qo(b, k); + if (0 === h || g <= d) return c.cf = g, c.sf.push(c.cf), c.Je.push(b), new Ea(g, l); + var m = So(b); + b = b.substr(m.length); + for (var n = So(b), g = Qo(m + n, k); 0 < n.length && g <= d;) m += n, b = b.substr(n.length), n = So(b), g = Qo((m + n).replace(/^\s+|\s+$/g, ""), k); + m += n.replace(/^\s+|\s+$/g, ""); + for (d = Math.max(1, d - h); Qo(m, k) > d && 1 < m.length;) m = m.substr(0, + m.length - 1); + m += Go; + h = Qo(m, k); + c.sf.push(h); + c.cf = h; + c.Je.push(m); + return new Ea(h, l) + } + var p = 0; + 0 === b.length && (p = 1, c.sf.push(0), c.Je.push(b)); + for (; 0 < b.length;) { + m = So(b); + for (b = b.substr(m.length); Qo(m, k) > d;) { + n = 1; + g = Qo(m.substr(0, n), k); + for (h = 0; g <= d;) n++, h = g, g = Qo(m.substr(0, n), k); + 1 === n ? (c.sf[a.Le + p] = g, e = Math.max(e, g)) : (c.sf[a.Le + p] = h, e = Math.max(e, h)); + n--; + 1 > n && (n = 1); + c.Je[a.Le + p] = m.substr(0, n); + p++; + m = m.substr(n); + if (a.Le + p > a.Li) break + } + n = So(b); + for (g = Qo(m + n, k); 0 < n.length && g <= d;) m += n, b = b.substr(n.length), n = So(b), g = Qo((m + + n).replace(/^\s+|\s+$/g, ""), k); + m = m.replace(/^\s+|\s+$/g, ""); + if ("" !== m && (0 === n.length ? (c.sf.push(g), e = Math.max(e, g)) : (h = Qo(m, k), c.sf.push(h), e = Math.max(e, h)), c.Je.push(m), p++, a.Le + p > a.Li)) break + } + c.Zi = Math.min(a.Li, p); + c.cf = Math.max(c.cf, e); + return new Ea(c.cf, l * c.Zi) + } + + function So(a) { + for (var b = a.length, c = 0; c < b && " " !== a.charAt(c);) c++; + for (; c < b && " " === a.charAt(c);) c++; + return c >= b ? a : a.substr(0, c) + } + + function Qo(a, b) { + Ho !== b && (Ho = Io.font = b); + return Io.measureText(a).width + } + + function Po(a) { + if (null !== a.jo) return a.jo; + var b = a.Nh; + Ho !== b && (Ho = Io.font = b); + var c = 0; + void 0 !== Co[b] && 5E3 > Do ? c = Co[b] : (c = 1.3 * Io.measureText("M").width, Co[b] = c, Do++); + return a.jo = c + } + + function Ro(a) { + Ho !== a && (Ho = Io.font = a); + var b = 0; + void 0 !== Eo[a] && 5E3 > Fo ? b = Eo[a] : (b = Io.measureText(Go).width, Eo[a] = b, Fo++); + return b + } + + function Oo(a, b, c) { + var d = a.we.replace(/\r\n/g, "\n").replace(/\r/g, "\n"), + e = a.$j + a.ak, + e = Math.max(0, Po(a) + e); + if (0 === d.length) return c.cf = 0, a.Le = 1, e; + if (!a.lx) { + var g = d.indexOf("\n", 0); + 0 <= g && (d = d.substr(0, g)) + } + for (var g = 0, h = a.Le = 0, k = -1, l = !1; !l;) k = d.indexOf("\n", h), -1 === k && (k = d.length, l = !0), h <= k && (h = d.substr(h, k - h), a.Qm !== Jo ? (c.Zi = 0, h = No(a, h, c, b), g += h.height, a.Le += c.Zi) : (No(a, h, c, b), g += e, a.Le++), a.Le === a.Li && (l = !0)), h = k + 1; + return a.Jv = g + } + z.defineProperty(qa, { + YA: "textValidation" + }, function() { + return this.nl + }, function(a) { + var b = this.nl; + b !== a && (null !== a && z.g(a, "function", qa, "textValidation"), this.nl = a, this.j("textValidation", b, a)) + }); + z.defineProperty(qa, { + tL: "spacingAbove" + }, function() { + return this.$j + }, function(a) { + var b = this.$j; + b !== a && (u && z.g(a, "number", qa, "spacingAbove"), this.$j = a, this.j("spacingAbove", b, a)) + }); + z.defineProperty(qa, { + uL: "spacingBelow" + }, function() { + return this.ak + }, function(a) { + var b = this.ak; + b !== a && (u && z.g(a, "number", qa, "spacingBelow"), this.ak = a, this.j("spacingBelow", b, a)) + }); + z.defineProperty(qa, { + AI: "maxLines" + }, function() { + return this.Li + }, function(a) { + var b = this.Li; + b !== a && (u && z.g(a, "number", qa, "maxLines"), a = Math.floor(a), 0 >= a && z.ka(a, "> 0", qa, "maxLines"), this.Li = a, this.j("maxLines", b, a), this.S()) + }); + z.w(qa, { + UK: "metrics" + }, function() { + return this.Nj + }); + + function Bo() { + this.cf = this.Zi = 0; + this.sf = []; + this.Je = [] + } + Bo.prototype.reset = function() { + this.cf = this.Zi = 0; + this.sf = []; + this.Je = [] + }; + Bo.prototype.tt = function(a) { + this.Zi = a.Zi; + this.cf = a.cf; + this.sf = z.zl(a.sf); + this.Je = z.zl(a.Je) + }; + z.w(Bo, { + cK: "arrSize" + }, function() { + return this.sf + }); + z.w(Bo, { + dK: "arrText" + }, function() { + return this.Je + }); + z.w(Bo, { + TK: "maxLineWidth" + }, function() { + return this.cf + }); + + function vk() { + O.call(this); + this.$e = null; + this.Ns = ""; + this.Zj = ge; + this.mo = lf; + this.Vo = this.bk = this.uf = null; + this.Ry = !1; + this.ho = !0; + this.Mo = null + } + z.Qa(vk, O); + z.ia("Picture", vk); + vk.prototype.cloneProtected = function(a) { + O.prototype.cloneProtected.call(this, a); + a.element = this.$e; + a.Ns = this.Ns; + a.Zj = this.Zj.V(); + a.mo = this.mo; + a.uf = this.uf; + a.bk = this.bk; + a.ho = this.ho; + a.Mo = this.Mo + }; + var To = new ma, + Uo = 0, + pk = []; + + function Vo() { + var a = pk; + if (0 === a.length) + for (var b = window.document.getElementsByTagName("canvas"), c = b.length, d = 0; d < c; d++) { + var e = b[d]; + e.parentElement && e.parentElement.Z && a.push(e.parentElement.Z) + } + return a + } + var Wo; + vk.clearCache = Wo = function(a) { + void 0 === a && (a = ""); + z.g(a, "string", vk, "clearCache:url"); + "" !== a ? To[a] && (delete To[a], Uo--) : (To = new ma, Uo = 0) + }; + vk.prototype.toString = function() { + return "Picture(" + this.source + ")#" + z.nd(this) + }; + z.defineProperty(vk, { + element: "element" + }, function() { + return this.$e + }, function(a) { + var b = this.$e; + if (b !== a) { + null === a || a instanceof HTMLImageElement || a instanceof HTMLVideoElement || a instanceof HTMLCanvasElement || z.k("Picture.element must be an instance of Image, Canvas, or Video, not: " + a); + this.Ry = a instanceof HTMLCanvasElement; + this.$e = a; + if (null !== a) + if (!0 === a.complete || void 0 === a.complete) a.rv instanceof Event && null !== this.uf && this.uf(this, a.rv), !0 === a.Ty && null !== this.bk && this.bk(this, null), a.Ty = !0, this.Aa.F() || + (Yk(this, !1), this.S()); + else { + var c = this; + a.gC || (a.addEventListener("load", function(b) { + Xo(a, b); + c.Aa.F() || (Yk(c, !1), c.S()) + }), a.addEventListener("error", function(b) { + Yo(a, b) + }), a.gC = !0) + } + this.j("element", b, a); + this.ta() + } + }); + z.defineProperty(vk, { + source: "source" + }, function() { + return this.Ns + }, function(a) { + var b = this.Ns; + if (b !== a) { + z.g(a, "string", vk, "source"); + this.Ns = a; + var c = To, + d = this.h; + if (void 0 !== c[a]) var e = c[a].bp[0].source; + else { + 30 < Uo && (Wo(), c = To); + var e = z.createElement("img"), + g = this; + e.addEventListener("load", function(a) { + Xo(e, a); + g.Aa.F() || (Yk(g, !1), g.S()) + }); + e.addEventListener("error", function(a) { + Yo(e, a) + }); + e.gC = !0; + e.src = a; + var h = this.Mo; + null !== h && (e.crossOrigin = h(this)); + c[a] = new Zo(e); + Uo++ + } + null !== d && Ul(d, this); + this.element = e; + null !== d && Tl(d, this); + this.S(); + this.ta(); + this.j("source", b, a) + } + }); + + function Xo(a, b) { + a.Ty = !0; + a.rv = !1; + for (var c = null, d = Vo(), e = d.length, g = 0; g < e; g++) { + var h = d[g], + k = h.Go.na(a.src); + if (null !== k) + for (e = k.length, g = 0; g < e; g++) c = k[g], h.SC.add(c), h.Ce(), null !== c.bk && c.bk(c, b) + } + } + + function Yo(a, b) { + a.rv = b; + for (var c = null, d = Vo(), e = d.length, g = 0; g < e; g++) + if (c = d[g].Go.na(a.src), null !== c) { + for (var e = c.length, h = z.rb(), g = 0; g < e; g++) h.push(c[g]); + for (g = 0; g < e; g++) c = h[g], null !== c.uf && c.uf(c, b); + z.xa(h) + } + } + z.defineProperty(vk, { + sL: "sourceCrossOrigin" + }, function() { + return this.Mo + }, function(a) { + if (this.Mo !== a && (null !== a && z.g(a, "function", vk, "sourceCrossOrigin"), this.Mo = a, null !== this.element)) { + var b = this.element.src; + null === a && "string" === typeof b ? this.element.crossOrigin = null : null !== a && (this.element.crossOrigin = a(this)) + } + }); + z.defineProperty(vk, { + sj: "sourceRect" + }, function() { + return this.Zj + }, function(a) { + var b = this.Zj; + b.N(a) || (z.l(a, w, vk, "sourceRect"), this.Zj = a = a.V(), this.ta(), this.j("sourceRect", b, a)) + }); + z.defineProperty(vk, { + XH: "imageStretch" + }, function() { + return this.mo + }, function(a) { + var b = this.mo; + b !== a && (z.Ba(a, O, vk, "imageStretch"), this.mo = a, this.ta(), this.j("imageStretch", b, a)) + }); + z.defineProperty(vk, { + Uz: "errorFunction" + }, function() { + return this.uf + }, function(a) { + var b = this.uf; + b !== a && (null !== a && z.g(a, "function", vk, "errorFunction"), this.uf = a, this.j("errorFunction", b, a)) + }); + z.defineProperty(vk, { + CL: "successFunction" + }, function() { + return this.bk + }, function(a) { + var b = this.bk; + b !== a && (null !== a && z.g(a, "function", vk, "successFunction"), this.bk = a, this.j("successFunction", b, a)) + }); + vk.prototype.nk = function(a, b) { + var c = this.$e; + if (null !== c) { + var d = c.src; + null !== d && "" !== d || z.k('Element has no source ("src") attribute: ' + c); + if (!(c.rv instanceof Event) && !0 === c.Ty) { + var d = this.Ga, + e = 0, + g = 0, + h = this.Ry, + k = h ? +c.width : c.naturalWidth, + h = h ? +c.height : c.naturalHeight; + void 0 === k && c.videoWidth && (k = c.videoWidth); + void 0 === h && c.videoHeight && (h = c.videoHeight); + k = k || d.width; + h = h || d.height; + if (0 !== k && 0 !== h) { + var l = k, + m = h; + this.sj.F() && (e = this.Zj.x, g = this.Zj.y, k = this.Zj.width, h = this.Zj.height); + var n = k, + p = h, + q = this.mo; + switch (q) { + case $i: + if (this.sj.F()) break; + e += Math.max((n - d.width) / 2, 0); + g += Math.max((p - d.height) / 2, 0); + k = Math.min(d.width, n); + h = Math.min(d.height, p); + break; + case lf: + n = d.width; + p = d.height; + break; + case bj: + case cj: + var r = 0; + q === bj ? (r = Math.min(d.height / p, d.width / n), n *= r, p *= r) : q === cj && (r = Math.max(d.height / p, d.width / n), n *= r, p *= r, e += (n - d.width) / 2 / n * k, g += (p - d.height) / 2 / p * h, k *= 1 / (n / d.width), h *= 1 / (p / d.height), n = d.width, p = d.height) + } + var q = this.gj() * b.scale, + s = k * h / (n * q * p * q), + r = To[this.source], + q = null; + if (void 0 !== r && 16 < s) { + 2 > r.bp.length && + ($o(r, 4, l, m), $o(r, 16, l, m)); + for (var l = r.bp, m = l.length, q = l[0], t = 0; t < m; t++) + if (l[t].Rp * l[t].Rp < s) q = l[t]; + else break + } + if (!b.bo) { + if (null === this.Vo) + if (null === this.$e) this.Vo = !1; + else { + l = (new la(null)).yl; + l.drawImage(this.$e, 0, 0); + try { + l.getImageData(0, 0, 1, 1).data[3] && (this.Vo = !1), this.Vo = !1 + } catch (v) { + this.Vo = !0 + } + } + if (this.Vo) return + } + if (b.hj("pictureRatioOptimization") && !b.Sy && void 0 !== r && null !== q && 1 !== q.Rp) { + a.save(); + r = q.Rp; + try { + a.drawImage(q.source, e / r, g / r, Math.min(q.source.width, k / r), Math.min(q.source.height, h / r), + Math.max((d.width - n) / 2, 0), Math.max((d.height - p) / 2, 0), Math.min(d.width, n), Math.min(d.height, p)) + } catch (x) { + u && this.ho && z.trace(x.toString()), this.ho = !1 + } + a.restore() + } else try { + a.drawImage(c, e, g, k, h, Math.max((d.width - n) / 2, 0), Math.max((d.height - p) / 2, 0), Math.min(d.width, n), Math.min(d.height, p)) + } catch (y) { + u && this.ho && z.trace(y.toString()), this.ho = !1 + } + } + } + } + }; + z.w(vk, { + Ga: "naturalBounds" + }, function() { + return this.Wc + }); + vk.prototype.Ip = function(a, b, c, d) { + var e = this.Aa, + g = Mm(this, !0), + h = this.$e, + k = this.Ry; + if (k || !this.Yy && h && h.complete) this.Yy = !0; + null === h && (isFinite(a) || (a = 0), isFinite(b) || (b = 0)); + isFinite(e.width) || g === lf || g === Cm ? (isFinite(a) || (a = this.sj.F() ? this.sj.width : k ? +h.width : h.naturalWidth), c = 0) : null !== h && !1 !== this.Yy && (a = this.sj.F() ? this.sj.width : k ? +h.width : h.naturalWidth); + isFinite(e.height) || g === lf || g === Bm ? (isFinite(b) || (b = this.sj.F() ? this.sj.height : k ? +h.height : h.naturalHeight), d = 0) : null !== h && !1 !== this.Yy && (b = + this.sj.F() ? this.sj.height : k ? +h.height : h.naturalHeight); + isFinite(e.width) && (a = e.width); + isFinite(e.height) && (b = e.height); + e = this.Xe; + g = this.cg; + c = Math.max(c, g.width); + d = Math.max(d, g.height); + a = Math.min(e.width, a); + b = Math.min(e.height, b); + a = Math.max(c, a); + b = Math.max(d, b); + null === h || h.complete || (isFinite(a) || (a = 0), isFinite(b) || (b = 0)); + yb(this.Wc, a, b); + Jm(this, 0, 0, a, b) + }; + vk.prototype.$i = function(a, b, c, d) { + Nm(this, a, b, c, d) + }; + + function Zo(a) { + this.bp = [new ap(a, 1)] + } + + function $o(a, b, c, d) { + var e = new la(null), + g = e.yl, + h = 1 / b; + e.width = c / b; + e.height = d / b; + b = new ap(e.Kd, b); + c = a.bp[a.bp.length - 1]; + g.setTransform(h * c.Rp, 0, 0, h * c.Rp, 0, 0); + g.drawImage(c.source, 0, 0); + a.bp.push(b) + } + + function ap(a, b) { + this.source = a; + this.Rp = b + } + + function Ga() { + this.q = new hf; + this.$b = null + } + f = Ga.prototype; + f.reset = function() { + this.q = new hf; + this.$b = null + }; + + function R(a, b, c, d, e, g) { + null === a.q && z.k("StreamGeometryContext has been closed"); + void 0 !== e && !0 === e ? (null === a.$b && z.k("Need to call beginFigure first"), d = new Of(Df), d.L = b, d.M = c, a.$b.Ab.add(d)) : (a.$b = new kf, a.$b.Ha = b, a.$b.Da = c, a.$b.Ot = d, a.q.cc.add(a.$b)); + void 0 !== g && (a.$b.so = g) + } + + function T(a) { + null === a.q && z.k("StreamGeometryContext has been closed"); + null === a.$b && z.k("Need to call beginFigure first"); + var b = a.$b.Ab.length; + 0 < b && a.$b.Ab.ea(b - 1).close() + } + + function Af(a) { + null === a.q && z.k("StreamGeometryContext has been closed"); + null === a.$b && z.k("Need to call beginFigure first"); + 0 < a.$b.Ab.length && (a.$b.Ot = !0) + } + f.gb = function(a) { + null === this.q && z.k("StreamGeometryContext has been closed"); + null === this.$b && z.k("Need to call beginFigure first"); + this.$b.sk = a + }; + f.moveTo = function(a, b, c) { + void 0 === c && (c = !1); + null === this.q && z.k("StreamGeometryContext has been closed"); + null === this.$b && z.k("Need to call beginFigure first"); + var d = new Of(Df); + d.L = a; + d.M = b; + c && d.close(); + this.$b.Ab.add(d) + }; + f.lineTo = function(a, b, c) { + void 0 === c && (c = !1); + null === this.q && z.k("StreamGeometryContext has been closed"); + null === this.$b && z.k("Need to call beginFigure first"); + var d = new Of(qf); + d.L = a; + d.M = b; + c && d.close(); + this.$b.Ab.add(d) + }; + + function S(a, b, c, d, e, g, h, k) { + void 0 === k && (k = !1); + null === a.q && z.k("StreamGeometryContext has been closed"); + null === a.$b && z.k("Need to call beginFigure first"); + var l = new Of(Ef); + l.zc = b; + l.Qc = c; + l.Ah = d; + l.Bh = e; + l.L = g; + l.M = h; + k && l.close(); + a.$b.Ab.add(l) + } + + function yf(a, b, c, d, e) { + var g; + void 0 === g && (g = !1); + null === a.q && z.k("StreamGeometryContext has been closed"); + null === a.$b && z.k("Need to call beginFigure first"); + var h = new Of(Ff); + h.zc = b; + h.Qc = c; + h.L = d; + h.M = e; + g && h.close(); + a.$b.Ab.add(h) + } + f.arcTo = function(a, b, c, d, e, g, h) { + void 0 === g && (g = 0); + void 0 === h && (h = !1); + null === this.q && z.k("StreamGeometryContext has been closed"); + null === this.$b && z.k("Need to call beginFigure first"); + var k = new Of(Gf); + k.Fe = a; + k.Lf = b; + k.ra = c; + k.za = d; + k.radiusX = e; + k.radiusY = 0 !== g ? g : e; + h && k.close(); + this.$b.Ab.add(k) + }; + + function zf(a, b, c, d, e, g, h, k) { + var l; + void 0 === l && (l = !1); + null === a.q && z.k("StreamGeometryContext has been closed"); + null === a.$b && z.k("Need to call beginFigure first"); + b = new Of(Hf, h, k, b, c, d, e, g); + l && b.close(); + a.$b.Ab.add(b) + } + + function bp(a) { + a = cp(a); + var b = z.rb(); + b[0] = a[0]; + for (var c = 1, d = 1; d < a.length;) b[c] = a[d], b[c + 1] = a[d], b[c + 2] = a[d + 1], d += 2, c += 3; + z.xa(a); + return b + } + + function cp(a) { + var b = dp(a), + c = z.rb(), + d = Math.floor(b.length / 2), + e = b.length - 1; + a = 0 === a % 2 ? 2 : 1; + for (var g = 0; g < e; g++) { + var h = b[g], + k = b[g + 1], + l = b[(d + g - 1) % e], + m = b[(d + g + a) % e]; + c[2 * g] = h; + c[2 * g + 1] = Oe(h.x, h.y, l.x, l.y, k.x, k.y, m.x, m.y, new N) + } + c[c.length] = c[0]; + z.xa(b); + return c + } + + function dp(a) { + for (var b = z.rb(), c = 1.5 * Math.PI, d = 0, e = 0; e < a; e++) d = 2 * Math.PI / a * e + c, b[e] = new N(.5 + .5 * Math.cos(d), .5 + .5 * Math.sin(d)); + b.push(b[0]); + return b + } + var so = { + None: "Rectangle", + Rectangle: function(a, b, c) { + a = new hf; + a.type = nf; + a.Ha = 0; + a.Da = 0; + a.L = b; + a.M = c; + return a + }, + Square: function(a, b, c) { + a = new hf; + a.Xd = bj; + a.type = nf; + a.Ha = 0; + a.Da = 0; + a.L = Math.min(b, c); + a.M = Math.min(b, c); + return a + }, + Ellipse: function(a, b, c) { + a = new hf; + a.type = of; + a.Ha = 0; + a.Da = 0; + a.L = b; + a.M = c; + a.C = he; + a.D = ie; + return a + }, + Circle: function(a, b, c) { + a = new hf; + a.Xd = bj; + a.type = of; + a.Ha = 0; + a.Da = 0; + a.L = Math.min(b, c); + a.M = Math.min(b, c); + a.C = he; + a.D = ie; + return a + }, + Connector: "Ellipse", + TriangleRight: function(a, b, c) { + a = new hf; + var d = new kf, + e = new Of; + e.L = b; + e.M = .5 * c; + d.Ab.add(e); + b = new Of; + b.L = 0; + b.M = c; + d.Ab.add(b.close()); + a.cc.add(d); + a.C = new Q(0, .25); + a.D = new Q(.5, .75); + return a + }, + TriangleDown: function(a, b, c) { + a = new hf; + var d = new kf, + e = new Of; + e.L = b; + e.M = 0; + d.Ab.add(e); + e = new Of; + e.L = .5 * b; + e.M = c; + d.Ab.add(e.close()); + a.cc.add(d); + a.C = new Q(.25, 0); + a.D = new Q(.75, .5); + return a + }, + TriangleLeft: function(a, b, c) { + a = new hf; + var d = new kf; + d.Ha = b; + d.Da = c; + var e = new Of; + e.L = 0; + e.M = .5 * c; + d.Ab.add(e); + c = new Of; + c.L = b; + c.M = 0; + d.Ab.add(c.close()); + a.cc.add(d); + a.C = new Q(.5, .25); + a.D = new Q(1, + .75); + return a + }, + TriangleUp: function(a, b, c) { + a = new hf; + var d = new kf; + d.Ha = b; + d.Da = c; + var e = new Of; + e.L = 0; + e.M = c; + d.Ab.add(e); + c = new Of; + c.L = .5 * b; + c.M = 0; + d.Ab.add(c.close()); + a.cc.add(d); + a.C = new Q(.25, .5); + a.D = new Q(.75, 1); + return a + }, + Line1: function(a, b, c) { + a = new hf; + a.type = mf; + a.Ha = 0; + a.Da = 0; + a.L = b; + a.M = c; + return a + }, + Line2: function(a, b, c) { + a = new hf; + a.type = mf; + a.Ha = b; + a.Da = 0; + a.L = 0; + a.M = c; + return a + }, + MinusLine: "LineH", + LineH: function(a, b, c) { + a = new hf; + a.type = mf; + a.Ha = 0; + a.Da = c / 2; + a.L = b; + a.M = c / 2; + return a + }, + LineV: function(a, b, c) { + a = new hf; + a.type = + mf; + a.Ha = b / 2; + a.Da = 0; + a.L = b / 2; + a.M = c; + return a + }, + BarH: "Rectangle", + BarV: "Rectangle", + Curve1: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + S(a, Hd * b, 0, 1 * b, (1 - Hd) * c, b, c); + b = a.q; + z.u(a); + return b + }, + Curve2: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + S(a, 0, Hd * c, (1 - Hd) * b, c, b, c); + b = a.q; + z.u(a); + return b + }, + Curve3: function(a, b, c) { + a = z.v(); + R(a, 1 * b, 0, !1); + S(a, 1 * b, Hd * c, Hd * b, 1 * c, 0, 1 * c); + b = a.q; + z.u(a); + return b + }, + Curve4: function(a, b, c) { + a = z.v(); + R(a, 1 * b, 0, !1); + S(a, (1 - Hd) * b, 0, 0, (1 - Hd) * c, 0, 1 * c); + b = a.q; + z.u(a); + return b + }, + Alternative: "Triangle", + Merge: "Triangle", + Triangle: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0 * c, !0); + a.lineTo(0 * b, 1 * c); + a.lineTo(1 * b, 1 * c, !0); + b = a.q; + b.C = new Q(.25, .5); + b.D = new Q(.75, 1); + z.u(a); + return b + }, + Decision: "Diamond", + Diamond: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !0); + a.lineTo(0, .5 * c); + a.lineTo(.5 * b, 1 * c); + a.lineTo(1 * b, .5 * c, !0); + b = a.q; + b.C = new Q(.25, .25); + b.D = new Q(.75, .75); + z.u(a); + return b + }, + Pentagon: function(a, b, c) { + var d = dp(5); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 5 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.2, .22); + b.D = new Q(.8, + .9); + z.u(a); + return b + }, + DataTransmission: "Hexagon", + Hexagon: function(a, b, c) { + var d = dp(6); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 6 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.07, .25); + b.D = new Q(.93, .75); + z.u(a); + return b + }, + Heptagon: function(a, b, c) { + var d = dp(7); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 7 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.2, .15); + b.D = new Q(.8, .85); + z.u(a); + return b + }, + Octagon: function(a, b, c) { + var d = dp(8); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 8 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.15, .15); + b.D = new Q(.85, .85); + z.u(a); + return b + }, + Nonagon: function(a, b, c) { + var d = dp(9); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 9 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.17, .13); + b.D = new Q(.82, .82); + z.u(a); + return b + }, + Decagon: function(a, b, c) { + var d = dp(10); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 10 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.16, .16); + b.D = new Q(.84, .84); + z.u(a); + return b + }, + Dodecagon: function(a, b, c) { + var d = dp(12); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 12 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.16, .16); + b.D = new Q(.84, .84); + z.u(a); + return b + }, + FivePointedStar: function(a, b, c) { + var d = cp(5); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 10 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.312, .383); + b.D = new Q(.693, .765); + z.u(a); + return b + }, + SixPointedStar: function(a, b, c) { + var d = cp(6); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 12 > e; e++) a.lineTo(d[e].x * + b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.17, .251); + b.D = new Q(.833, .755); + z.u(a); + return b + }, + SevenPointedStar: function(a, b, c) { + var d = cp(7); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 14 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.363, .361); + b.D = new Q(.641, .709); + z.u(a); + return b + }, + EightPointedStar: function(a, b, c) { + var d = cp(8); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 16 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.252, .255); + b.D = new Q(.75, .75); + z.u(a); + return b + }, + NinePointedStar: function(a, + b, c) { + var d = cp(9); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 18 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.355, .361); + b.D = new Q(.645, .651); + z.u(a); + return b + }, + TenPointedStar: function(a, b, c) { + var d = cp(10); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; 20 > e; e++) a.lineTo(d[e].x * b, d[e].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.281, .261); + b.D = new Q(.723, .748); + z.u(a); + return b + }, + FivePointedBurst: function(a, b, c) { + var d = bp(5); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; e < d.length; e += 3) S(a, d[e].x * + b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.312, .383); + b.D = new Q(.693, .765); + z.u(a); + return b + }, + SixPointedBurst: function(a, b, c) { + var d = bp(6); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; e < d.length; e += 3) S(a, d[e].x * b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.17, .251); + b.D = new Q(.833, .755); + z.u(a); + return b + }, + SevenPointedBurst: function(a, b, c) { + var d = bp(7); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; e < d.length; e += 3) S(a, d[e].x * + b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.363, .361); + b.D = new Q(.641, .709); + z.u(a); + return b + }, + EightPointedBurst: function(a, b, c) { + var d = bp(8); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; e < d.length; e += 3) S(a, d[e].x * b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.252, .255); + b.D = new Q(.75, .75); + z.u(a); + return b + }, + NinePointedBurst: function(a, b, c) { + var d = bp(9); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; e < d.length; e += 3) S(a, d[e].x * + b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.355, .361); + b.D = new Q(.645, .651); + z.u(a); + return b + }, + TenPointedBurst: function(a, b, c) { + var d = bp(10); + a = z.v(); + R(a, d[0].x * b, d[0].y * c, !0); + for (var e = 1; e < d.length; e += 3) S(a, d[e].x * b, d[e].y * c, d[e + 1].x * b, d[e + 1].y * c, d[e + 2].x * b, d[e + 2].y * c); + z.xa(d); + T(a); + b = a.q; + b.C = new Q(.281, .261); + b.D = new Q(.723, .748); + z.u(a); + return b + }, + Cloud: function(a, b, c) { + a = z.v(); + R(a, .08034461 * b, .1944299 * c, !0); + S(a, -.09239631 * b, .07836421 * c, .1406031 * b, -.0542823 * c, .2008615 * + b, .05349299 * c); + S(a, .2450511 * b, -.00697547 * c, .3776197 * b, -.01112067 * c, .4338609 * b, .074219 * c); + S(a, .4539471 * b, 0, .6066018 * b, -.02526587 * c, .6558228 * b, .07004196 * c); + S(a, .6914277 * b, -.01904177 * c, .8921095 * b, -.01220843 * c, .8921095 * b, .08370865 * c); + S(a, 1.036446 * b, .04105738 * c, 1.020377 * b, .3022052 * c, .9147671 * b, .3194596 * c); + S(a, 1.04448 * b, .360238 * c, .992256 * b, .5219009 * c, .9082935 * b, .562044 * c); + S(a, 1.032337 * b, .5771781 * c, 1.018411 * b, .8120651 * c, .9212406 * b, .8217117 * c); + S(a, 1.028411 * b, .9571472 * c, .8556702 * b, 1.052487 * c, .7592566 * b, .9156953 * + c); + S(a, .7431877 * b, 1.009325 * c, .5624123 * b, 1.021761 * c, .5101666 * b, .9310455 * c); + S(a, .4820677 * b, 1.031761 * c, .3030112 * b, 1.002796 * c, .2609328 * b, .9344623 * c); + S(a, .2329994 * b, 1.01518 * c, .03213784 * b, 1.01518 * c, .08034461 * b, .870098 * c); + S(a, -.02812061 * b, .9032597 * c, -.01205169 * b, .6835638 * c, .06829292 * b, .6545475 * c); + S(a, -.01812061 * b, .6089503 * c, -.00606892 * b, .4555777 * c, .06427569 * b, .4265613 * c); + S(a, -.01606892 * b, .3892545 * c, -.01205169 * b, .1944299 * c, .08034461 * b, .1944299 * c); + T(a); + b = a.q; + b.C = new Q(.1, .1); + b.D = new Q(.9, .9); + z.u(a); + return b + }, + Gate: "Crescent", + Crescent: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + S(a, 1 * b, 0, 1 * b, 1 * c, 0, 1 * c); + S(a, .5 * b, .75 * c, .5 * b, .25 * c, 0, 0); + T(a); + b = a.q; + b.C = new Q(.511, .19); + b.D = new Q(.776, .76); + z.u(a); + return b + }, + FramedRectangle: function(a, b, c) { + var d = z.v(), + e = a ? a.Ic : NaN; + a = a ? a.gu : NaN; + isNaN(e) && (e = .1); + isNaN(a) && (a = .1); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c, !0); + R(d, e * b, a * c, !1, !0); + d.lineTo(e * b, (1 - a) * c); + d.lineTo((1 - e) * b, (1 - a) * c); + d.lineTo((1 - e) * b, a * c, !0); + b = d.q; + b.C = new Q(e, a); + b.D = new Q(1 - e, 1 - a); + z.u(d); + return b + }, + Delay: "HalfEllipse", + HalfEllipse: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + S(a, Hd * b, 0, 1 * b, (.5 - Hd / 2) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + Hd / 2) * c, Hd * b, 1 * c, 0, 1 * c); + T(a); + b = a.q; + b.C = new Q(0, .2); + b.D = new Q(.75, .8); + z.u(a); + return b + }, + Heart: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 1 * c, !0); + S(a, .1 * b, .8 * c, 0, .5 * c, 0 * b, .3 * c); + S(a, 0 * b, 0, .45 * b, 0, .5 * b, .3 * c); + S(a, .55 * b, 0, 1 * b, 0, 1 * b, .3 * c); + S(a, b, .5 * c, .9 * b, .8 * c, .5 * b, 1 * c); + T(a); + b = a.q; + b.C = new Q(.15, .29); + b.D = new Q(.86, .68); + z.u(a); + return b + }, + Spade: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !0); + a.lineTo(.51 * b, .01 * c); + S(a, .6 * b, .2 * c, b, .25 * c, b, .5 * c); + S(a, b, .8 * c, .6 * b, .8 * c, .55 * b, .7 * c); + S(a, .5 * b, .75 * c, .55 * b, .95 * c, .75 * b, c); + a.lineTo(.25 * b, c); + S(a, .45 * b, .95 * c, .5 * b, .75 * c, .45 * b, .7 * c); + S(a, .4 * b, .8 * c, 0, .8 * c, 0, .5 * c); + S(a, 0, .25 * c, .4 * b, .2 * c, .49 * b, .01 * c); + T(a); + b = a.q; + b.C = new Q(.19, .26); + b.D = new Q(.8, .68); + z.u(a); + return b + }, + Club: function(a, b, c) { + a = z.v(); + R(a, .4 * b, .6 * c, !0); + S(a, .5 * b, .75 * c, .45 * b, .95 * c, .15 * b, 1 * c); + a.lineTo(.85 * b, c); + S(a, .55 * b, .95 * c, .5 * b, .75 * c, .6 * b, .6 * c); + var d = .2, + e = .3, + g = 0, + h = 4 * (Math.SQRT2 - 1) / 3 * d; + S(a, (.5 - d + e) * b, (.5 + h + g) * c, (.5 - h + e) * + b, (.5 + d + g) * c, (.5 + e) * b, (.5 + d + g) * c); + S(a, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + S(a, (.5 + d + e) * b, (.5 - h + g) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e + .05) * b, (.5 - h + g - .02) * c, .65 * b, .36771243 * c); + d = .2; + e = 0; + g = -.3; + h = 4 * (Math.SQRT2 - 1) / 3 * d; + S(a, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + S(a, (.5 + d + e) * b, (.5 - h + g) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e) * b, (.5 - h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - d + + e) * b, (.5 + h + g) * c, (.5 - h + e) * b, (.5 + d + g) * c, .35 * b, .36771243 * c); + d = .2; + e = -.3; + g = 0; + h = 4 * (Math.SQRT2 - 1) / 3 * d; + S(a, (.5 + d + e - .05) * b, (.5 - h + g - .02) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e) * b, (.5 - h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - d + e) * b, (.5 + h + g) * c, (.5 - h + e) * b, (.5 + d + g) * c, (.5 + e) * b, (.5 + d + g) * c); + S(a, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + d + e) * b, (.5 + h + g) * c, .4 * b, .6 * c); + T(a); + b = a.q; + b.C = new Q(.06, .39); + b.D = new Q(.93, .58); + z.u(a); + return b + }, + Ring: function(a, b, c) { + a = z.v(); + var d = 4 * (Math.SQRT2 - 1) / 3 * .5; + R(a, b, .5 * + c, !0); + S(a, b, (.5 - d) * c, (.5 + d) * b, 0, .5 * b, 0); + S(a, (.5 - d) * b, 0, 0, (.5 - d) * c, 0, .5 * c); + S(a, 0, (.5 + d) * c, (.5 - d) * b, c, .5 * b, c); + S(a, (.5 + d) * b, c, b, (.5 + d) * c, b, .5 * c); + d = 4 * (Math.SQRT2 - 1) / 3 * .4; + R(a, .5 * b, .1 * c, !0, !0); + S(a, (.5 + d) * b, .1 * c, .9 * b, (.5 - d) * c, .9 * b, .5 * c); + S(a, .9 * b, (.5 + d) * c, (.5 + d) * b, .9 * c, .5 * b, .9 * c); + S(a, (.5 - d) * b, .9 * c, .1 * b, (.5 + d) * c, .1 * b, .5 * c); + S(a, .1 * b, (.5 - d) * c, (.5 - d) * b, .1 * c, .5 * b, .1 * c); + b = a.q; + b.C = new Q(.146, .146); + b.D = new Q(.853, .853); + b.Xd = bj; + z.u(a); + return b + }, + YinYang: function(a, b, c) { + var d = .5; + a = z.v(); + d = .5; + R(a, .5 * b, 0, !0); + a.arcTo(270, + 180, .5 * b, .5 * b, .5 * b); + S(a, 1 * b, d * c, 0, d * c, d * b, 0, !0); + var d = .1, + e = .25; + R(a, (.5 + d) * b, e * c, !0, !0); + a.arcTo(0, -360, .5 * b, c * e, d * b); + T(a); + R(a, .5 * b, 0, !1); + a.arcTo(270, -180, .5 * b, .5 * b, .5 * b); + a.gb(!1); + e = .75; + R(a, (.5 + d) * b, e * c, !0); + a.arcTo(0, 360, .5 * b, c * e, d * b); + T(a); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + Peace: function(a, b, c) { + a = z.v(); + var d = 4 * (Math.SQRT2 - 1) / 3 * .5; + R(a, b, .5 * c, !0); + S(a, b, (.5 - d) * c, (.5 + d) * b, 0, .5 * b, 0); + S(a, (.5 - d) * b, 0, 0, (.5 - d) * c, 0, .5 * c); + S(a, 0, (.5 + d) * c, (.5 - d) * b, c, .5 * b, c); + S(a, (.5 + d) * b, c, b, (.5 + d) * c, b, .5 * c); + d = 4 * (Math.SQRT2 - 1) / 3 * .4; + R(a, .5 * b, .1 * c, !0, !0); + S(a, (.5 + d) * b, .1 * c, .9 * b, (.5 - d) * c, .9 * b, .5 * c); + S(a, .9 * b, (.5 + d) * c, (.5 + d) * b, .9 * c, .5 * b, .9 * c); + S(a, (.5 - d) * b, .9 * c, .1 * b, (.5 + d) * c, .1 * b, .5 * c); + S(a, .1 * b, (.5 - d) * c, (.5 - d) * b, .1 * c, .5 * b, .1 * c); + var d = .07, + e = 0, + g = -.707 * .11, + h = 4 * (Math.SQRT2 - 1) / 3 * d; + R(a, (.5 + d + e) * b, (.5 + g) * c, !0); + S(a, (.5 + d + e) * b, (.5 - h + g) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e) * b, (.5 - h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - d + e) * b, (.5 + h + g) * c, (.5 - h + e) * b, (.5 + d + g) * c, (.5 + e) * b, (.5 + d + g) * c); + S(a, (.5 + h + e) * b, (.5 + d + g) * + c, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + d = .07; + e = -.707 * .11; + g = .707 * .11; + h = 4 * (Math.SQRT2 - 1) / 3 * d; + R(a, (.5 + d + e) * b, (.5 + g) * c, !0); + S(a, (.5 + d + e) * b, (.5 - h + g) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e) * b, (.5 - h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - d + e) * b, (.5 + h + g) * c, (.5 - h + e) * b, (.5 + d + g) * c, (.5 + e) * b, (.5 + d + g) * c); + S(a, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + d = .07; + e = .707 * .11; + g = .707 * .11; + h = 4 * (Math.SQRT2 - 1) / 3 * d; + R(a, (.5 + d + e) * b, (.5 + g) * c, !0); + S(a, (.5 + d + e) * b, (.5 - h + + g) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e) * b, (.5 - h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - d + e) * b, (.5 + h + g) * c, (.5 - h + e) * b, (.5 + d + g) * c, (.5 + e) * b, (.5 + d + g) * c); + S(a, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + b = a.q; + b.C = new Q(.146, .146); + b.D = new Q(.853, .853); + b.Xd = bj; + z.u(a); + return b + }, + NotAllowed: function(a, b, c) { + var d = .5 * Hd, + e = .5; + a = z.v(); + R(a, .5 * b, (.5 - e) * c, !0); + S(a, (.5 - d) * b, (.5 - e) * c, (.5 - e) * b, (.5 - d) * c, (.5 - e) * b, .5 * c); + S(a, (.5 - e) * b, (.5 + d) * c, (.5 - d) * b, (.5 + e) * c, .5 * b, + (.5 + e) * c); + S(a, (.5 + d) * b, (.5 + e) * c, (.5 + e) * b, (.5 + d) * c, (.5 + e) * b, .5 * c); + S(a, (.5 + e) * b, (.5 - d) * c, (.5 + d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c); + var e = .4, + d = .4 * Hd, + g = z.O(), + h = z.O(), + k = z.O(), + l = z.O(); + xe(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .42, g, h, k, l, l); + var m = z.O(), + n = z.O(), + p = z.O(); + xe(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .58, l, l, p, m, n); + var q = z.O(), + r = z.O(), + s = z.O(); + xe(.5, .5 + e, .5 - d, .5 + e, .5 - e, .5 + d, .5 - e, .5, .42, q, r, s, l, l); + var t = z.O(), + v = z.O(), + x = z.O(); + xe(.5, .5 + e, .5 - d, .5 + e, .5 - e, .5 + d, .5 - e, .5, .58, l, l, x, t, v); + R(a, x.x * b, x.y * c, !0, !0); + S(a, t.x * b, + t.y * c, v.x * b, v.y * c, (.5 - e) * b, .5 * c); + S(a, (.5 - e) * b, (.5 - d) * c, (.5 - d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c); + S(a, g.x * b, g.y * c, h.x * b, h.y * c, k.x * b, k.y * c); + a.lineTo(x.x * b, x.y * c); + T(a); + R(a, s.x * b, s.y * c, !0, !0); + a.lineTo(p.x * b, p.y * c); + S(a, m.x * b, m.y * c, n.x * b, n.y * c, (.5 + e) * b, .5 * c); + S(a, (.5 + e) * b, (.5 + d) * c, (.5 + d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c); + S(a, q.x * b, q.y * c, r.x * b, r.y * c, s.x * b, s.y * c); + T(a); + z.A(g); + z.A(h); + z.A(k); + z.A(l); + z.A(m); + z.A(n); + z.A(p); + z.A(q); + z.A(r); + z.A(s); + z.A(t); + z.A(v); + z.A(x); + b = a.q; + z.u(a); + b.Xd = bj; + return b + }, + Fragile: function(a, b, c) { + a = z.v(); + R(a, + 0, 0, !0); + a.lineTo(.25 * b, 0); + a.lineTo(.2 * b, .15 * c); + a.lineTo(.3 * b, .25 * c); + a.lineTo(.29 * b, .33 * c); + a.lineTo(.35 * b, .25 * c); + a.lineTo(.3 * b, .15 * c); + a.lineTo(.4 * b, 0); + a.lineTo(1 * b, 0); + S(a, 1 * b, .25 * c, .75 * b, .5 * c, .55 * b, .5 * c); + a.lineTo(.55 * b, .9 * c); + a.lineTo(.7 * b, .9 * c); + a.lineTo(.7 * b, 1 * c); + a.lineTo(.3 * b, 1 * c); + a.lineTo(.3 * b, .9 * c); + a.lineTo(.45 * b, .9 * c); + a.lineTo(.45 * b, .5 * c); + S(a, .25 * b, .5 * c, 0, .25 * c, 0, 0); + T(a); + b = a.q; + b.C = new Q(.25, 0); + b.D = new Q(.75, .4); + z.u(a); + return b + }, + HourGlass: function(a, b, c) { + a = z.v(); + R(a, .65 * b, .5 * c, !0); + a.lineTo(1 * b, + 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(.35 * b, .5 * c); + a.lineTo(0, 0); + a.lineTo(1 * b, 0); + T(a); + b = a.q; + z.u(a); + return b + }, + Lightning: function(a, b, c) { + a = z.v(); + R(a, 0 * b, .55 * c, !0); + a.lineTo(.75 * b, 0); + a.lineTo(.25 * b, .45 * c); + a.lineTo(.9 * b, .48 * c); + a.lineTo(.4 * b, 1 * c); + a.lineTo(.65 * b, .55 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + Parallelogram1: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .1); + var d = z.v(); + R(d, a * b, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo((1 - a) * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + b = d.q; + b.C = new Q(a, 0); + b.D = new Q(1 - a, 1); + z.u(d); + return b + }, + Input: "Output", + Output: function(a, + b, c) { + a = z.v(); + R(a, 0, 1 * c, !0); + a.lineTo(.1 * b, 0); + a.lineTo(1 * b, 0); + a.lineTo(.9 * b, 1 * c); + T(a); + b = a.q; + b.C = new Q(.1, 0); + b.D = new Q(.9, 1); + z.u(a); + return b + }, + Parallelogram2: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .25); + var d = z.v(); + R(d, a * b, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo((1 - a) * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + b = d.q; + b.C = new Q(a, 0); + b.D = new Q(1 - a, 1); + z.u(d); + return b + }, + ThickCross: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .25); + var d = z.v(); + R(d, (.5 - a / 2) * b, 0, !0); + d.lineTo((.5 + a / 2) * b, 0); + d.lineTo((.5 + a / 2) * b, (.5 - a / 2) * c); + d.lineTo(1 * b, (.5 - + a / 2) * c); + d.lineTo(1 * b, (.5 + a / 2) * c); + d.lineTo((.5 + a / 2) * b, (.5 + a / 2) * c); + d.lineTo((.5 + a / 2) * b, 1 * c); + d.lineTo((.5 - a / 2) * b, 1 * c); + d.lineTo((.5 - a / 2) * b, (.5 + a / 2) * c); + d.lineTo(0, (.5 + a / 2) * c); + d.lineTo(0, (.5 - a / 2) * c); + d.lineTo((.5 - a / 2) * b, (.5 - a / 2) * c); + T(d); + b = d.q; + b.C = new Q(.5 - a / 2, .5 - a / 2); + b.D = new Q(.5 + a / 2, .5 + a / 2); + z.u(d); + return b + }, + ThickX: function(a, b, c) { + a = .25 / Math.SQRT2; + var d = z.v(); + R(d, .3 * b, 0, !0); + d.lineTo(.5 * b, .2 * c); + d.lineTo(.7 * b, 0); + d.lineTo(1 * b, .3 * c); + d.lineTo(.8 * b, .5 * c); + d.lineTo(1 * b, .7 * c); + d.lineTo(.7 * b, 1 * c); + d.lineTo(.5 * b, .8 * + c); + d.lineTo(.3 * b, 1 * c); + d.lineTo(0, .7 * c); + d.lineTo(.2 * b, .5 * c); + d.lineTo(0, .3 * c); + T(d); + b = d.q; + b.C = new Q(.5 - a, .5 - a); + b.D = new Q(.5 + a, .5 + a); + z.u(d); + return b + }, + ThinCross: function(a, b, c) { + var d = a ? a.Ic : NaN; + isNaN(d) && (d = .1); + a = z.v(); + R(a, (.5 - d / 2) * b, 0, !0); + a.lineTo((.5 + d / 2) * b, 0); + a.lineTo((.5 + d / 2) * b, (.5 - d / 2) * c); + a.lineTo(1 * b, (.5 - d / 2) * c); + a.lineTo(1 * b, (.5 + d / 2) * c); + a.lineTo((.5 + d / 2) * b, (.5 + d / 2) * c); + a.lineTo((.5 + d / 2) * b, 1 * c); + a.lineTo((.5 - d / 2) * b, 1 * c); + a.lineTo((.5 - d / 2) * b, (.5 + d / 2) * c); + a.lineTo(0, (.5 + d / 2) * c); + a.lineTo(0, (.5 - d / 2) * c); + a.lineTo((.5 - + d / 2) * b, (.5 - d / 2) * c); + T(a); + b = a.q; + z.u(a); + return b + }, + ThinX: function(a, b, c) { + a = z.v(); + R(a, .1 * b, 0, !0); + a.lineTo(.5 * b, .4 * c); + a.lineTo(.9 * b, 0); + a.lineTo(1 * b, .1 * c); + a.lineTo(.6 * b, .5 * c); + a.lineTo(1 * b, .9 * c); + a.lineTo(.9 * b, 1 * c); + a.lineTo(.5 * b, .6 * c); + a.lineTo(.1 * b, 1 * c); + a.lineTo(0, .9 * c); + a.lineTo(.4 * b, .5 * c); + a.lineTo(0, .1 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + RightTriangle: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + T(a); + b = a.q; + b.C = new Q(0, .5); + b.D = new Q(.5, 1); + z.u(a); + return b + }, + RoundedIBeam: function(a, b, c) { + a = + z.v(); + R(a, 0, 0, !0); + a.lineTo(1 * b, 0); + S(a, .5 * b, .25 * c, .5 * b, .75 * c, 1 * b, 1 * c); + a.lineTo(0, 1 * c); + S(a, .5 * b, .75 * c, .5 * b, .25 * c, 0, 0); + T(a); + b = a.q; + z.u(a); + return b + }, + RoundedRectangle: function(a, b, c) { + var d = a ? a.Ic : NaN; + isNaN(d) && (d = 5); + d = Math.min(d, b / 3); + d = Math.min(d, c / 3); + a = d * Hd; + var e = z.v(); + R(e, d, 0, !0); + e.lineTo(b - d, 0); + S(e, b - a, 0, b, a, b, d); + e.lineTo(b, c - d); + S(e, b, c - a, b - a, c, b - d, c); + e.lineTo(d, c); + S(e, a, c, 0, c - a, 0, c - d); + e.lineTo(0, d); + S(e, 0, a, a, 0, d, 0); + T(e); + b = e.q; + 1 < a ? (b.C = new Q(0, 0, a, a), b.D = new Q(1, 1, -a, -a)) : (b.C = Zb, b.D = ic); + z.u(e); + return b + }, + Border: function(a, b, c) { + var d = a ? a.Ic : NaN; + isNaN(d) && (d = 5); + d = Math.min(d, b / 3); + d = Math.min(d, c / 3); + a = z.v(); + R(a, d, 0, !0); + a.lineTo(b - d, 0); + S(a, b - 0, 0, b, 0, b, d); + a.lineTo(b, c - d); + S(a, b, c - 0, b - 0, c, b - d, c); + a.lineTo(d, c); + S(a, 0, c, 0, c - 0, 0, c - d); + a.lineTo(0, d); + S(a, 0, 0, 0, 0, d, 0); + T(a); + b = a.q; + b.C = Zb; + b.D = ic; + z.u(a); + return b + }, + SquareIBeam: function(a, b, c) { + var d = a ? a.Ic : NaN; + isNaN(d) && (d = .2); + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, d * c); + a.lineTo((.5 + d / 2) * b, d * c); + a.lineTo((.5 + d / 2) * b, (1 - d) * c); + a.lineTo(1 * b, (1 - d) * c); + a.lineTo(1 * b, 1 * + c); + a.lineTo(0, 1 * c); + a.lineTo(0, (1 - d) * c); + a.lineTo((.5 - d / 2) * b, (1 - d) * c); + a.lineTo((.5 - d / 2) * b, d * c); + a.lineTo(0, d * c); + T(a); + b = a.q; + z.u(a); + return b + }, + Trapezoid: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .2); + var d = z.v(); + R(d, a * b, 0, !0); + d.lineTo((1 - a) * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + b = d.q; + b.C = new Q(a, 0); + b.D = new Q(1 - a, 1); + z.u(d); + return b + }, + ManualLoop: "ManualOperation", + ManualOperation: function(a, b, c) { + var d = a ? a.Ic : NaN; + isNaN(d) && (d = 0); + a = z.v(); + R(a, d, 0, !0); + a.lineTo(0, 0); + a.lineTo(1 * b, 0); + a.lineTo(.9 * b, 1 * c); + a.lineTo(.1 * + b, 1 * c); + T(a); + b = a.q; + b.C = new Q(.1, 0); + b.D = new Q(.9, 1); + z.u(a); + return b + }, + GenderMale: function(a, b, c) { + a = z.v(); + var d = .4 * Hd, + e = .4, + g = z.O(), + h = z.O(), + k = z.O(), + l = z.O(); + R(a, (.5 - e) * b, .5 * c, !0); + S(a, (.5 - e) * b, (.5 - d) * c, (.5 - d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c); + xe(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .44, k, l, h, g, g); + S(a, k.x * b, k.y * c, l.x * b, l.y * c, h.x * b, h.y * c); + var m = z.Tb(h.x, h.y); + xe(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .56, g, g, h, k, l); + var n = z.Tb(h.x, h.y); + a.lineTo((.1 * m.x + .855) * b, .1 * m.y * c); + a.lineTo(.85 * b, .1 * m.y * c); + a.lineTo(.85 * b, 0); + a.lineTo(1 * + b, 0); + a.lineTo(1 * b, .15 * c); + a.lineTo((.1 * n.x + .9) * b, .15 * c); + a.lineTo((.1 * n.x + .9) * b, (.1 * n.y + .05 * .9) * c); + a.lineTo(n.x * b, n.y * c); + S(a, k.x * b, k.y * c, l.x * b, l.y * c, (.5 + e) * b, .5 * c); + S(a, (.5 + e) * b, (.5 + d) * c, (.5 + d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c); + S(a, (.5 - d) * b, (.5 + e) * c, (.5 - e) * b, (.5 + d) * c, (.5 - e) * b, .5 * c); + e = .35; + d = .35 * Hd; + R(a, .5 * b, (.5 - e) * c, !0, !0); + S(a, (.5 - d) * b, (.5 - e) * c, (.5 - e) * b, (.5 - d) * c, (.5 - e) * b, .5 * c); + S(a, (.5 - e) * b, (.5 + d) * c, (.5 - d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c); + S(a, (.5 + d) * b, (.5 + e) * c, (.5 + e) * b, (.5 + d) * c, (.5 + e) * b, .5 * c); + S(a, (.5 + e) * b, (.5 - d) * c, (.5 + + d) * b, (.5 - e) * c, .5 * b, (.5 - e) * c); + R(a, (.5 - e) * b, .5 * c, !0); + z.A(g); + z.A(h); + z.A(k); + z.A(l); + z.A(m); + z.A(n); + b = a.q; + b.C = new Q(.202, .257); + b.D = new Q(.692, .839); + b.Xd = bj; + z.u(a); + return b + }, + GenderFemale: function(a, b, c) { + a = z.v(); + var d = .375, + e = 0, + g = -.125, + h = 4 * (Math.SQRT2 - 1) / 3 * d; + R(a, (.525 + e) * b, (.5 + d + g) * c, !0); + S(a, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + S(a, (.5 + d + e) * b, (.5 - h + g) * c, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 - h + e) * b, (.5 - d + g) * c, (.5 - d + e) * b, (.5 - h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - d + e) * b, + (.5 + h + g) * c, (.5 - h + e) * b, (.5 + d + g) * c, (.475 + e) * b, (.5 + d + g) * c); + a.lineTo(.475 * b, .85 * c); + a.lineTo(.425 * b, .85 * c); + a.lineTo(.425 * b, .9 * c); + a.lineTo(.475 * b, .9 * c); + a.lineTo(.475 * b, 1 * c); + a.lineTo(.525 * b, 1 * c); + a.lineTo(.525 * b, .9 * c); + a.lineTo(.575 * b, .9 * c); + a.lineTo(.575 * b, .85 * c); + a.lineTo(.525 * b, .85 * c); + T(a); + d = .325; + e = 0; + g = -.125; + h = 4 * (Math.SQRT2 - 1) / 3 * d; + R(a, (.5 + d + e) * b, (.5 + g) * c, !0, !0); + S(a, (.5 + d + e) * b, (.5 + h + g) * c, (.5 + h + e) * b, (.5 + d + g) * c, (.5 + e) * b, (.5 + d + g) * c); + S(a, (.5 - h + e) * b, (.5 + d + g) * c, (.5 - d + e) * b, (.5 + h + g) * c, (.5 - d + e) * b, (.5 + g) * c); + S(a, (.5 - + d + e) * b, (.5 - h + g) * c, (.5 - h + e) * b, (.5 - d + g) * c, (.5 + e) * b, (.5 - d + g) * c); + S(a, (.5 + h + e) * b, (.5 - d + g) * c, (.5 + d + e) * b, (.5 - h + g) * c, (.5 + d + e) * b, (.5 + g) * c); + R(a, (.525 + e) * b, (.5 + d + g) * c, !0); + b = a.q; + b.C = new Q(.232, .136); + b.D = new Q(.782, .611); + b.Xd = bj; + z.u(a); + return b + }, + PlusLine: function(a, b, c) { + a = z.v(); + R(a, 0, .5 * c, !1); + a.lineTo(1 * b, .5 * c); + a.moveTo(.5 * b, 0); + a.lineTo(.5 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + XLine: function(a, b, c) { + a = z.v(); + R(a, 0, 1 * c, !1); + a.lineTo(1 * b, 0); + a.moveTo(0, 0); + a.lineTo(1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + AsteriskLine: function(a, b, c) { + a = + z.v(); + var d = .2 / Math.SQRT2; + R(a, d * b, (1 - d) * c, !1); + a.lineTo((1 - d) * b, d * c); + a.moveTo(d * b, d * c); + a.lineTo((1 - d) * b, (1 - d) * c); + a.moveTo(0 * b, .5 * c); + a.lineTo(1 * b, .5 * c); + a.moveTo(.5 * b, 0 * c); + a.lineTo(.5 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + CircleLine: function(a, b, c) { + var d = .5 * Hd; + a = z.v(); + R(a, 1 * b, .5 * c, !1); + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + b = a.q; + b.C = new Q(.146, .146); + b.D = new Q(.853, .853); + b.Xd = bj; + z.u(a); + return b + }, + Pie: function(a, + b, c) { + a = z.v(); + var d = 4 * (Math.SQRT2 - 1) / 3 * .5; + R(a, (.5 * Math.SQRT2 / 2 + .5) * b, (.5 - .5 * Math.SQRT2 / 2) * c, !0); + S(a, .7 * b, 0 * c, .5 * b, 0 * c, .5 * b, 0 * c); + S(a, (.5 - d + 0) * b, 0 * c, 0 * b, (.5 - d + 0) * c, 0 * b, .5 * c); + S(a, 0 * b, (.5 + d + 0) * c, (.5 - d + 0) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 + d + 0) * b, 1 * c, 1 * b, (.5 + d + 0) * c, 1 * b, .5 * c); + a.lineTo(.5 * b, .5 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + PiePiece: function(a, b, c) { + var d = Hd / Math.SQRT2 * .5, + e = Math.SQRT2 / 2, + g = 1 - Math.SQRT2 / 2; + a = z.v(); + R(a, b, c, !0); + S(a, b, (1 - d) * c, (e + d) * b, (g + d) * c, e * b, g * c); + a.lineTo(0, c); + T(a); + b = a.q; + z.u(a); + return b + }, + StopSign: function(a, + b, c) { + a = 1 / (Math.SQRT2 + 2); + var d = z.v(); + R(d, a * b, 0, !0); + d.lineTo((1 - a) * b, 0); + d.lineTo(1 * b, a * c); + d.lineTo(1 * b, (1 - a) * c); + d.lineTo((1 - a) * b, 1 * c); + d.lineTo(a * b, 1 * c); + d.lineTo(0, (1 - a) * c); + d.lineTo(0, a * c); + T(d); + b = d.q; + b.C = new Q(a / 2, a / 2); + b.D = new Q(1 - a / 2, 1 - a / 2); + z.u(d); + return b + }, + LogicImplies: function(a, b, c) { + var d = a ? a.Ic : NaN; + isNaN(d) && (d = .2); + a = z.v(); + R(a, (1 - d) * b, 0 * c, !1); + a.lineTo(1 * b, .5 * c); + a.lineTo((1 - d) * b, c); + a.moveTo(0, .5 * c); + a.lineTo(b, .5 * c); + b = a.q; + b.C = Zb; + b.D = new Q(.8, .5); + z.u(a); + return b + }, + LogicIff: function(a, b, c) { + var d = a ? a.Ic : + NaN; + isNaN(d) && (d = .2); + a = z.v(); + R(a, (1 - d) * b, 0 * c, !1); + a.lineTo(1 * b, .5 * c); + a.lineTo((1 - d) * b, c); + a.moveTo(0, .5 * c); + a.lineTo(b, .5 * c); + a.moveTo(d * b, 0); + a.lineTo(0, .5 * c); + a.lineTo(d * b, c); + b = a.q; + b.C = new Q(.2, 0); + b.D = new Q(.8, .5); + z.u(a); + return b + }, + LogicNot: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + LogicAnd: function(a, b, c) { + a = z.v(); + R(a, 0, 1 * c, !1); + a.lineTo(.5 * b, 0); + a.lineTo(1 * b, 1 * c); + b = a.q; + b.C = new Q(.25, .5); + b.D = new Q(.75, 1); + z.u(a); + return b + }, + LogicOr: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(.5 * b, 1 * c); + a.lineTo(1 * b, 0); + b = a.q; + b.C = new Q(.219, 0); + b.D = new Q(.78, .409); + z.u(a); + return b + }, + LogicXor: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !1); + a.lineTo(.5 * b, 1 * c); + a.moveTo(0, .5 * c); + a.lineTo(1 * b, .5 * c); + var d = .5 * Hd; + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + LogicTruth: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(1 * b, 0); + a.moveTo(.5 * b, 0); + a.lineTo(.5 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + LogicFalsity: function(a, b, c) { + a = z.v(); + R(a, 0, 1 * c, !1); + a.lineTo(1 * b, 1 * c); + a.moveTo(.5 * b, 1 * c); + a.lineTo(.5 * b, 0); + b = a.q; + z.u(a); + return b + }, + LogicThereExists: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, .5 * c); + a.lineTo(0, .5 * c); + a.moveTo(1 * b, .5 * c); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + b = a.q; + z.u(a); + return b + }, + LogicForAll: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(.5 * b, 1 * c); + a.lineTo(1 * b, 0); + a.moveTo(.25 * b, .5 * c); + a.lineTo(.75 * b, .5 * c); + b = a.q; + b.C = new Q(.25, 0); + b.D = new Q(.75, .5); + z.u(a); + return b + }, + LogicIsDefinedAs: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(b, 0); + a.moveTo(0, .5 * c); + a.lineTo(b, .5 * c); + a.moveTo(0, c); + a.lineTo(b, c); + b = a.q; + b.C = new Q(.01, .01); + b.D = new Q(.99, .49); + z.u(a); + return b + }, + LogicIntersect: function(a, b, c) { + var d = .5 * Hd; + a = z.v(); + R(a, 0, 1 * c, !1); + a.lineTo(0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + a.lineTo(1 * b, 1 * c); + b = a.q; + b.C = new Q(0, .5); + b.D = ic; + z.u(a); + return b + }, + LogicUnion: function(a, b, c) { + var d = .5 * Hd; + a = z.v(); + R(a, 1 * b, 0, !1); + a.lineTo(1 * b, .5 * c); + S(a, + 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + a.lineTo(0, 0); + b = a.q; + b.C = Zb; + b.D = new Q(1, .5); + z.u(a); + return b + }, + Arrow: function(a, b, c) { + var d = a ? a.Ic : NaN, + e = a ? a.gu : NaN; + isNaN(d) && (d = .3); + isNaN(e) && (e = .3); + a = z.v(); + R(a, 0, (.5 - e / 2) * c, !0); + a.lineTo((1 - d) * b, (.5 - e / 2) * c); + a.lineTo((1 - d) * b, 0); + a.lineTo(1 * b, .5 * c); + a.lineTo((1 - d) * b, 1 * c); + a.lineTo((1 - d) * b, (.5 + e / 2) * c); + a.lineTo(0, (.5 + e / 2) * c); + T(a); + b = a.q; + b.C = new Q(0, .5 - e / 2); + d = Oe(0, .5 + e / 2, 1, .5 + e / 2, 1 - d, 1, 1, .5, z.O()); + b.D = new Q(d.x, d.y); + z.A(d); + z.u(a); + return b + }, + ISOProcess: "Chevron", + Chevron: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(.5 * b, 0); + a.lineTo(1 * b, .5 * c); + a.lineTo(.5 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(.5 * b, .5 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + DoubleArrow: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(.3 * b, .214 * c); + a.lineTo(.3 * b, 0); + a.lineTo(1 * b, .5 * c); + a.lineTo(.3 * b, 1 * c); + a.lineTo(.3 * b, .786 * c); + a.lineTo(0, 1 * c); + T(a); + R(a, .3 * b, .214 * c, !1); + a.lineTo(.3 * b, .786 * c); + a.gb(!1); + b = a.q; + z.u(a); + return b + }, + DoubleEndArrow: function(a, b, c) { + a = z.v(); + R(a, 1 * b, .5 * c, !0); + a.lineTo(.7 * b, 1 * c); + a.lineTo(.7 * b, .7 * c); + a.lineTo(.3 * b, .7 * c); + a.lineTo(.3 * b, 1 * c); + a.lineTo(0, .5 * c); + a.lineTo(.3 * b, 0); + a.lineTo(.3 * b, .3 * c); + a.lineTo(.7 * b, .3 * c); + a.lineTo(.7 * b, 0); + T(a); + b = a.q; + c = Oe(0, .5, .3, 0, 0, .3, .3, .3, z.O()); + b.C = new Q(c.x, c.y); + c = Oe(.7, 1, 1, .5, .7, .7, 1, .7, c); + b.D = new Q(c.x, c.y); + z.A(c); + z.u(a); + return b + }, + IBeamArrow: function(a, b, c) { + a = z.v(); + R(a, 1 * b, .5 * c, !0); + a.lineTo(.7 * b, 1 * c); + a.lineTo(.7 * b, .7 * c); + a.lineTo(.2 * b, .7 * c); + a.lineTo(.2 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + a.lineTo(.2 * b, 0); + a.lineTo(.2 * b, .3 * c); + a.lineTo(.7 * b, .3 * c); + a.lineTo(.7 * b, 0); + T(a); + b = a.q; + b.C = new Q(0, .3); + c = Oe(.7, 1, 1, .5, .7, .7, 1, .7, z.O()); + b.D = new Q(c.x, c.y); + z.A(c); + z.u(a); + return b + }, + Pointer: function(a, b, c) { + a = z.v(); + R(a, 1 * b, .5 * c, !0); + a.lineTo(0, 1 * c); + a.lineTo(.2 * b, .5 * c); + a.lineTo(0, 0); + T(a); + b = a.q; + b.C = new Q(.2, .35); + c = Oe(.2, .65, 1, .65, 0, 1, 1, .5, z.O()); + b.D = new Q(c.x, c.y); + z.A(c); + z.u(a); + return b + }, + RoundedPointer: function(a, b, c) { + a = z.v(); + R(a, 1 * b, .5 * c, !0); + a.lineTo(0, 1 * c); + S(a, .5 * b, .75 * c, .5 * b, .25 * c, 0, 0); + T(a); + b = a.q; + b.C = new Q(.4, .35); + c = Oe(.2, .65, 1, .65, 0, 1, 1, .5, z.O()); + b.D = new Q(c.x, + c.y); + z.A(c); + z.u(a); + return b + }, + SplitEndArrow: function(a, b, c) { + a = z.v(); + R(a, 1 * b, .5 * c, !0); + a.lineTo(.7 * b, 1 * c); + a.lineTo(.7 * b, .7 * c); + a.lineTo(0, .7 * c); + a.lineTo(.2 * b, .5 * c); + a.lineTo(0, .3 * c); + a.lineTo(.7 * b, .3 * c); + a.lineTo(.7 * b, 0); + T(a); + b = a.q; + b.C = new Q(.2, .3); + c = Oe(.7, 1, 1, .5, .7, .7, 1, .7, z.O()); + b.D = new Q(c.x, c.y); + z.A(c); + z.u(a); + return b + }, + MessageToUser: "SquareArrow", + SquareArrow: function(a, b, c) { + a = z.v(); + R(a, 1 * b, .5 * c, !0); + a.lineTo(.7 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + a.lineTo(.7 * b, 0); + T(a); + b = a.q; + b.C = Zb; + b.D = new Q(.7, 1); + z.u(a); + return b + }, + Cone1: function(a, b, c) { + var d = .5 * Hd, + e = .1 * Hd; + a = z.v(); + R(a, 0, .9 * c, !0); + a.lineTo(.5 * b, 0); + a.lineTo(1 * b, .9 * c); + S(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c); + T(a); + b = a.q; + b.C = new Q(.25, .5); + b.D = new Q(.75, .97); + z.u(a); + return b + }, + Cone2: function(a, b, c) { + a = z.v(); + R(a, 0, .9 * c, !0); + S(a, (1 - .85 / .9) * b, 1 * c, .85 / .9 * b, 1 * c, 1 * b, .9 * c); + a.lineTo(.5 * b, 0); + a.lineTo(0, .9 * c); + T(a); + R(a, 0, .9 * c, !1); + S(a, (1 - .85 / .9) * b, .8 * c, .85 / .9 * b, .8 * c, 1 * b, .9 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, .5); + b.D = new Q(.75, .82); + z.u(a); + return b + }, + Cube1: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 1 * c, !0); + a.lineTo(1 * b, .85 * c); + a.lineTo(1 * b, .15 * c); + a.lineTo(.5 * b, 0 * c); + a.lineTo(0 * b, .15 * c); + a.lineTo(0 * b, .85 * c); + T(a); + R(a, .5 * b, 1 * c, !1); + a.lineTo(.5 * b, .3 * c); + a.lineTo(0, .15 * c); + a.moveTo(.5 * b, .3 * c); + a.lineTo(1 * b, .15 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .3); + b.D = new Q(.5, .85); + z.u(a); + return b + }, + Cube2: function(a, b, c) { + a = z.v(); + R(a, 0, .3 * c, !0); + a.lineTo(0 * b, 1 * c); + a.lineTo(.7 * b, c); + a.lineTo(1 * b, .7 * c); + a.lineTo(1 * b, 0 * c); + a.lineTo(.3 * b, 0 * c); + T(a); + R(a, 0, .3 * c, !1); + a.lineTo(.7 * b, .3 * c); + a.lineTo(1 * b, + 0 * c); + a.moveTo(.7 * b, .3 * c); + a.lineTo(.7 * b, 1 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .3); + b.D = new Q(.7, 1); + z.u(a); + return b + }, + MagneticData: "Cylinder1", + Cylinder1: function(a, b, c) { + var d = .5 * Hd, + e = .1 * Hd; + a = z.v(); + R(a, 0, .1 * c, !0); + S(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c); + a.lineTo(b, .9 * c); + S(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c); + a.lineTo(0, .1 * c); + R(a, 0, .1 * c, !1); + S(a, 0, (.1 + e) * c, (.5 - d) * b, .2 * c, .5 * b, .2 * c); + S(a, (.5 + d) * b, .2 * c, 1 * b, (.1 + e) * c, 1 * b, .1 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, + .2); + b.D = new Q(1, .9); + z.u(a); + return b + }, + Cylinder2: function(a, b, c) { + var d = .5 * Hd, + e = .1 * Hd; + a = z.v(); + R(a, 0, .9 * c, !0); + a.lineTo(0, .1 * c); + S(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c); + a.lineTo(1 * b, .9 * c); + S(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c); + R(a, 0, .9 * c, !1); + S(a, 0, (.9 - e) * c, (.5 - d) * b, .8 * c, .5 * b, .8 * c); + S(a, (.5 + d) * b, .8 * c, 1 * b, (.9 - e) * c, 1 * b, .9 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .1); + b.D = new Q(1, .8); + z.u(a); + return b + }, + Cylinder3: function(a, b, c) { + var d = .1 * Hd, + e = .5 * Hd; + a = z.v(); + R(a, .1 * b, 0, !0); + a.lineTo(.9 * b, 0); + S(a, (.9 + d) * b, 0, 1 * b, (.5 - e) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + e) * c, (.9 + d) * b, 1 * c, .9 * b, 1 * c); + a.lineTo(.1 * b, 1 * c); + S(a, (.1 - d) * b, 1 * c, 0, (.5 + e) * c, 0, .5 * c); + S(a, 0, (.5 - e) * c, (.1 - d) * b, 0, .1 * b, 0); + R(a, .1 * b, 0, !1); + S(a, (.1 + d) * b, 0, .2 * b, (.5 - e) * c, .2 * b, .5 * c); + S(a, .2 * b, (.5 + e) * c, (.1 + d) * b, 1 * c, .1 * b, 1 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.2, 0); + b.D = new Q(.9, 1); + z.u(a); + return b + }, + DirectData: "Cylinder4", + Cylinder4: function(a, b, c) { + var d = .1 * Hd, + e = .5 * Hd; + a = z.v(); + R(a, .9 * b, 0, !0); + S(a, (.9 + d) * b, 0, 1 * b, (.5 - e) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + + e) * c, (.9 + d) * b, 1 * c, .9 * b, 1 * c); + a.lineTo(.1 * b, 1 * c); + S(a, (.1 - d) * b, 1 * c, 0, (.5 + e) * c, 0, .5 * c); + S(a, 0, (.5 - e) * c, (.1 - d) * b, 0, .1 * b, 0); + a.lineTo(.9 * b, 0); + R(a, .9 * b, 0, !1); + S(a, (.9 - d) * b, 0, .8 * b, (.5 - e) * c, .8 * b, .5 * c); + S(a, .8 * b, (.5 + e) * c, (.9 - d) * b, 1 * c, .9 * b, 1 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.1, 0); + b.D = new Q(.8, 1); + z.u(a); + return b + }, + Prism1: function(a, b, c) { + a = z.v(); + R(a, .25 * b, .25 * c, !0); + a.lineTo(.75 * b, 0); + a.lineTo(b, .5 * c); + a.lineTo(.5 * b, c); + a.lineTo(0, c); + T(a); + R(a, .25 * b, .25 * c, !1); + a.lineTo(.5 * b, c); + a.gb(!1); + b = a.q; + b.C = new Q(.408, .172); + b.D = new Q(.833, + .662); + z.u(a); + return b + }, + Prism2: function(a, b, c) { + a = z.v(); + R(a, 0, .25 * c, !0); + a.lineTo(.75 * b, 0); + a.lineTo(1 * b, .25 * c); + a.lineTo(.75 * b, .75 * c); + a.lineTo(0, 1 * c); + T(a); + R(a, 0, c, !1); + a.lineTo(.25 * b, .5 * c); + a.lineTo(b, .25 * c); + a.moveTo(0, .25 * c); + a.lineTo(.25 * b, .5 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, .5); + b.D = new Q(.75, .75); + z.u(a); + return b + }, + Pyramid1: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !0); + a.lineTo(b, .75 * c); + a.lineTo(.5 * b, 1 * c); + a.lineTo(0, .75 * c); + T(a); + R(a, .5 * b, 0, !1); + a.lineTo(.5 * b, 1 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, .367); + b.D = new Q(.75, + .875); + z.u(a); + return b + }, + Pyramid2: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !0); + a.lineTo(b, .85 * c); + a.lineTo(.5 * b, 1 * c); + a.lineTo(0, .85 * c); + T(a); + R(a, .5 * b, 0, !1); + a.lineTo(.5 * b, .7 * c); + a.lineTo(0, .85 * c); + a.moveTo(.5 * b, .7 * c); + a.lineTo(1 * b, .85 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, .367); + b.D = new Q(.75, .875); + z.u(a); + return b + }, + Actor: function(a, b, c) { + var d = .2 * Hd, + e = .1 * Hd, + g = .5, + h = .1; + a = z.v(); + R(a, g * b, (h + .1) * c, !0); + S(a, (g - d) * b, (h + .1) * c, (g - .2) * b, (h + e) * c, (g - .2) * b, h * c); + S(a, (g - .2) * b, (h - e) * c, (g - d) * b, (h - .1) * c, g * b, (h - .1) * c); + S(a, (g + d) * b, (h - .1) * c, + (g + .2) * b, (h - e) * c, (g + .2) * b, h * c); + S(a, (g + .2) * b, (h + e) * c, (g + d) * b, (h + .1) * c, g * b, (h + .1) * c); + d = .05; + e = Hd * d; + R(a, .5 * b, .2 * c, !0); + a.lineTo(.95 * b, .2 * c); + g = .95; + h = .25; + S(a, (g + e) * b, (h - d) * c, (g + d) * b, (h - e) * c, (g + d) * b, h * c); + a.lineTo(1 * b, .6 * c); + a.lineTo(.85 * b, .6 * c); + a.lineTo(.85 * b, .35 * c); + d = .025; + e = Hd * d; + g = .825; + h = .35; + S(a, (g + d) * b, (h - e) * c, (g + e) * b, (h - d) * c, g * b, (h - d) * c); + S(a, (g - e) * b, (h - d) * c, (g - d) * b, (h - e) * c, (g - d) * b, h * c); + a.lineTo(.8 * b, 1 * c); + a.lineTo(.55 * b, 1 * c); + a.lineTo(.55 * b, .7 * c); + d = .05; + e = Hd * d; + g = .5; + h = .7; + S(a, (g + d) * b, (h - e) * c, (g + e) * b, (h - d) * c, + g * b, (h - d) * c); + S(a, (g - e) * b, (h - d) * c, (g - d) * b, (h - e) * c, (g - d) * b, h * c); + a.lineTo(.45 * b, 1 * c); + a.lineTo(.2 * b, 1 * c); + a.lineTo(.2 * b, .35 * c); + d = .025; + e = Hd * d; + g = .175; + h = .35; + S(a, (g + d) * b, (h - e) * c, (g + e) * b, (h - d) * c, g * b, (h - d) * c); + S(a, (g - e) * b, (h - d) * c, (g - d) * b, (h - e) * c, (g - d) * b, h * c); + a.lineTo(.15 * b, .6 * c); + a.lineTo(0 * b, .6 * c); + a.lineTo(0 * b, .25 * c); + d = .05; + e = Hd * d; + g = .05; + h = .25; + S(a, (g - d) * b, (h - e) * c, (g - e) * b, (h - d) * c, g * b, (h - d) * c); + a.lineTo(.5 * b, .2 * c); + b = a.q; + b.C = new Q(.2, .2); + b.D = new Q(.8, .65); + z.u(a); + return b + }, + Card: function(a, b, c) { + a = z.v(); + R(a, 1 * b, 0 * c, !0); + a.lineTo(1 * b, 1 * c); + a.lineTo(0 * b, 1 * c); + a.lineTo(0 * b, .2 * c); + a.lineTo(.2 * b, 0 * c); + T(a); + b = a.q; + b.C = new Q(0, .2); + b.D = ic; + z.u(a); + return b + }, + Collate: function(a, b, c) { + a = z.v(); + R(a, .5 * b, .5 * c, !0); + a.lineTo(0, 0); + a.lineTo(1 * b, 0); + a.lineTo(.5 * b, .5 * c); + R(a, .5 * b, .5 * c, !0); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(.5 * b, .5 * c); + b = a.q; + b.C = new Q(.25, 0); + b.D = new Q(.75, .25); + z.u(a); + return b + }, + CreateRequest: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .1); + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + R(d, 0, + a * c, !1); + d.lineTo(1 * b, a * c); + d.moveTo(0, (1 - a) * c); + d.lineTo(1 * b, (1 - a) * c); + d.gb(!1); + b = d.q; + b.C = new Q(0, a); + b.D = new Q(1, 1 - a); + z.u(d); + return b + }, + Database: function(a, b, c) { + a = z.v(); + var d = .5 * Hd, + e = .1 * Hd; + R(a, 1 * b, .1 * c, !0); + a.lineTo(1 * b, .9 * c); + S(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c); + a.lineTo(0, .1 * c); + S(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c); + R(a, 1 * b, .1 * c, !1); + S(a, 1 * b, (.1 + e) * c, (.5 + d) * b, .2 * c, .5 * b, .2 * c); + S(a, (.5 - d) * b, .2 * c, 0, (.1 + e) * c, 0, .1 * c); + a.moveTo(1 * b, .2 * c); + S(a, 1 * b, (.2 + e) * c, (.5 + d) * b, .3 * c, .5 * b, .3 * c); + S(a, (.5 - d) * b, .3 * c, 0, (.2 + e) * c, 0, .2 * c); + a.moveTo(1 * b, .3 * c); + S(a, 1 * b, (.3 + e) * c, (.5 + d) * b, .4 * c, .5 * b, .4 * c); + S(a, (.5 - d) * b, .4 * c, 0, (.3 + e) * c, 0, .3 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .4); + b.D = new Q(1, .9); + z.u(a); + return b + }, + StoredData: "DataStorage", + DataStorage: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(.75 * b, 0); + S(a, 1 * b, 0, 1 * b, 1 * c, .75 * b, 1 * c); + a.lineTo(0, 1 * c); + S(a, .25 * b, .9 * c, .25 * b, .1 * c, 0, 0); + T(a); + b = a.q; + b.C = new Q(.226, 0); + b.D = new Q(.81, 1); + z.u(a); + return b + }, + DiskStorage: function(a, b, c) { + a = + z.v(); + var d = .5 * Hd, + e = .1 * Hd; + R(a, 1 * b, .1 * c, !0); + a.lineTo(1 * b, .9 * c); + S(a, 1 * b, (.9 + e) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.9 + e) * c, 0, .9 * c); + a.lineTo(0, .1 * c); + S(a, 0, (.1 - e) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.1 - e) * c, 1 * b, .1 * c); + R(a, 1 * b, .1 * c, !1); + S(a, 1 * b, (.1 + e) * c, (.5 + d) * b, .2 * c, .5 * b, .2 * c); + S(a, (.5 - d) * b, .2 * c, 0, (.1 + e) * c, 0, .1 * c); + a.moveTo(1 * b, .2 * c); + S(a, 1 * b, (.2 + e) * c, (.5 + d) * b, .3 * c, .5 * b, .3 * c); + S(a, (.5 - d) * b, .3 * c, 0, (.2 + e) * c, 0, .2 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .3); + b.D = new Q(1, .9); + z.u(a); + return b + }, + Display: function(a, + b, c) { + a = z.v(); + R(a, .25 * b, 0, !0); + a.lineTo(.75 * b, 0); + S(a, 1 * b, 0, 1 * b, 1 * c, .75 * b, 1 * c); + a.lineTo(.25 * b, 1 * c); + a.lineTo(0, .5 * c); + T(a); + b = a.q; + b.C = new Q(.25, 0); + b.D = new Q(.75, 1); + z.u(a); + return b + }, + DividedEvent: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) ? a = .2 : .15 > a && (a = .15); + var d = z.v(), + e = .2 * Hd; + R(d, 0, .2 * c, !0); + S(d, 0, (.2 - e) * c, (.2 - e) * b, 0, .2 * b, 0); + d.lineTo(.8 * b, 0); + S(d, (.8 + e) * b, 0, 1 * b, (.2 - e) * c, 1 * b, .2 * c); + d.lineTo(1 * b, .8 * c); + S(d, 1 * b, (.8 + e) * c, (.8 + e) * b, 1 * c, .8 * b, 1 * c); + d.lineTo(.2 * b, 1 * c); + S(d, (.2 - e) * b, 1 * c, 0, (.8 + e) * c, 0, .8 * c); + d.lineTo(0, .2 * c); + R(d, 0, a * c, !1); + d.lineTo(1 * b, a * c); + d.gb(!1); + b = d.q; + b.C = new Q(0, a); + b.D = new Q(1, 1 - a); + z.u(d); + return b + }, + DividedProcess: function(a, b, c) { + a = a ? a.Ic : NaN; + if (isNaN(a) || .1 > a) a = .1; + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + R(d, 0, a * c, !1); + d.lineTo(1 * b, a * c); + d.gb(!1); + b = d.q; + b.C = new Q(0, a); + b.D = ic; + z.u(d); + return b + }, + Document: function(a, b, c) { + c /= .8; + a = z.v(); + R(a, 0, .7 * c, !0); + a.lineTo(0, 0); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, .7 * c); + S(a, .5 * b, .4 * c, .5 * b, 1 * c, 0, .7 * c); + T(a); + b = a.q; + b.C = Zb; + b.D = new Q(1, .6); + z.u(a); + return b + }, + ExternalOrganization: function(a, b, c) { + a = a ? a.Ic : NaN; + if (isNaN(a) || .2 > a) a = .2; + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + R(d, a * b, 0, !1); + d.lineTo(0, a * c); + d.moveTo(1 * b, a * c); + d.lineTo((1 - a) * b, 0); + d.moveTo(0, (1 - a) * c); + d.lineTo(a * b, 1 * c); + d.moveTo((1 - a) * b, 1 * c); + d.lineTo(1 * b, (1 - a) * c); + d.gb(!1); + b = d.q; + b.C = new Q(a / 2, a / 2); + b.D = new Q(1 - a / 2, 1 - a / 2); + z.u(d); + return b + }, + ExternalProcess: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !0); + a.lineTo(1 * b, .5 * c); + a.lineTo(.5 * b, 1 * c); + a.lineTo(0, .5 * c); + T(a); + R(a, .1 * b, .4 * c, !1); + a.lineTo(.1 * b, .6 * c); + a.moveTo(.9 * b, .6 * c); + a.lineTo(.9 * b, .4 * c); + a.moveTo(.6 * b, .1 * c); + a.lineTo(.4 * b, .1 * c); + a.moveTo(.4 * b, .9 * c); + a.lineTo(.6 * b, .9 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, .25); + b.D = new Q(.75, .75); + z.u(a); + return b + }, + File: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(.75 * b, 0); + a.lineTo(1 * b, .25 * c); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + T(a); + R(a, .75 * b, 0, !1); + a.lineTo(.75 * b, .25 * c); + a.lineTo(1 * b, .25 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .25); + b.D = ic; + z.u(a); + return b + }, + Interrupt: function(a, b, c) { + a = z.v(); + R(a, 1 * b, + .5 * c, !0); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + a.lineTo(1 * b, .5 * c); + R(a, 1 * b, .5 * c, !1); + a.lineTo(1 * b, 1 * c); + R(a, 1 * b, .5 * c, !1); + a.lineTo(1 * b, 0); + b = a.q; + b.C = new Q(0, .25); + b.D = new Q(.5, .75); + z.u(a); + return b + }, + InternalStorage: function(a, b, c) { + var d = a ? a.Ic : NaN; + a = a ? a.gu : NaN; + isNaN(d) && (d = .1); + isNaN(a) && (a = .1); + var e = z.v(); + R(e, 0, 0, !0); + e.lineTo(1 * b, 0); + e.lineTo(1 * b, 1 * c); + e.lineTo(0, 1 * c); + T(e); + R(e, d * b, 0, !1); + e.lineTo(d * b, 1 * c); + e.moveTo(0, a * c); + e.lineTo(1 * b, a * c); + e.gb(!1); + b = e.q; + b.C = new Q(d, a); + b.D = ic; + z.u(e); + return b + }, + Junction: function(a, b, + c) { + a = z.v(); + var d = 1 / Math.SQRT2, + e = (1 - 1 / Math.SQRT2) / 2, + g = .5 * Hd; + R(a, 1 * b, .5 * c, !0); + S(a, 1 * b, (.5 + g) * c, (.5 + g) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - g) * b, 1 * c, 0, (.5 + g) * c, 0, .5 * c); + S(a, 0, (.5 - g) * c, (.5 - g) * b, 0, .5 * b, 0); + S(a, (.5 + g) * b, 0, 1 * b, (.5 - g) * c, 1 * b, .5 * c); + R(a, (e + d) * b, (e + d) * c, !1); + a.lineTo(e * b, e * c); + a.moveTo(e * b, (e + d) * c); + a.lineTo((e + d) * b, e * c); + a.gb(!1); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + LinedDocument: function(a, b, c) { + c /= .8; + a = z.v(); + R(a, 0, .7 * c, !0); + a.lineTo(0, 0); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, .7 * c); + S(a, .5 * b, .4 * c, .5 * b, 1 * c, 0, .7 * c); + T(a); + R(a, .1 * + b, 0, !1); + a.lineTo(.1 * b, .75 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.1, 0); + b.D = new Q(1, .6); + z.u(a); + return b + }, + LoopLimit: function(a, b, c) { + a = z.v(); + R(a, 0, 1 * c, !0); + a.lineTo(0, .25 * c); + a.lineTo(.25 * b, 0); + a.lineTo(.75 * b, 0); + a.lineTo(1 * b, .25 * c); + a.lineTo(1 * b, 1 * c); + T(a); + b = a.q; + b.C = new Q(0, .25); + b.D = ic; + z.u(a); + return b + }, + SequentialData: "MagneticTape", + MagneticTape: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, .5 * b, 1 * c, !0); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + + d) * c, (.5 + d) * b, .9 * c, .6 * b, .9 * c); + a.lineTo(1 * b, .9 * c); + a.lineTo(1 * b, 1 * c); + a.lineTo(.5 * b, 1 * c); + b = a.q; + b.C = new Q(.15, .15); + b.D = new Q(.85, .8); + z.u(a); + return b + }, + ManualInput: function(a, b, c) { + a = z.v(); + R(a, 1 * b, 0, !0); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, .25 * c); + T(a); + b = a.q; + b.C = new Q(0, .25); + b.D = ic; + z.u(a); + return b + }, + MessageFromUser: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .7); + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(a * b, .5 * c); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + b = d.q; + b.C = Zb; + b.D = new Q(a, 1); + z.u(d); + return b + }, + MicroformProcessing: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .25); + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(.5 * b, a * c); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(.5 * b, (1 - a) * c); + d.lineTo(0, 1 * c); + T(d); + b = d.q; + b.C = new Q(0, a); + b.D = new Q(1, 1 - a); + z.u(d); + return b + }, + MicroformRecording: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(.75 * b, .25 * c); + a.lineTo(1 * b, .15 * c); + a.lineTo(1 * b, .85 * c); + a.lineTo(.75 * b, .75 * c); + a.lineTo(0, 1 * c); + T(a); + b = a.q; + b.C = new Q(0, .25); + b.D = new Q(1, .75); + z.u(a); + return b + }, + MultiDocument: function(a, b, c) { + c /= .8; + a = z.v(); + R(a, b, 0, !0); + a.lineTo(b, .5 * c); + S(a, .96 * b, .47 * c, .93 * b, .45 * c, .9 * b, .44 * c); + a.lineTo(.9 * b, .6 * c); + S(a, .86 * b, .57 * c, .83 * b, .55 * c, .8 * b, .54 * c); + a.lineTo(.8 * b, .7 * c); + S(a, .4 * b, .4 * c, .4 * b, 1 * c, 0, .7 * c); + a.lineTo(0, .2 * c); + a.lineTo(.1 * b, .2 * c); + a.lineTo(.1 * b, .1 * c); + a.lineTo(.2 * b, .1 * c); + a.lineTo(.2 * b, 0); + T(a); + R(a, .1 * b, .2 * c, !1); + a.lineTo(.8 * b, .2 * c); + a.lineTo(.8 * b, .54 * c); + a.moveTo(.2 * b, .1 * c); + a.lineTo(.9 * b, .1 * c); + a.lineTo(.9 * b, .44 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .25); + b.D = new Q(.8, .77); + z.u(a); + return b + }, + MultiProcess: function(a, b, c) { + a = z.v(); + R(a, .1 * b, .1 * c, !0); + a.lineTo(.2 * b, .1 * c); + a.lineTo(.2 * b, 0); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, .8 * c); + a.lineTo(.9 * b, .8 * c); + a.lineTo(.9 * b, .9 * c); + a.lineTo(.8 * b, .9 * c); + a.lineTo(.8 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, .2 * c); + a.lineTo(.1 * b, .2 * c); + T(a); + R(a, .2 * b, .1 * c, !1); + a.lineTo(.9 * b, .1 * c); + a.lineTo(.9 * b, .8 * c); + a.moveTo(.1 * b, .2 * c); + a.lineTo(.8 * b, .2 * c); + a.lineTo(.8 * b, .9 * c); + a.gb(!1); + b = a.q; + b.C = new Q(0, .2); + b.D = new Q(.8, 1); + z.u(a); + return b + }, + OfflineStorage: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .1); + var d = 1 - a, + e = z.v(); + R(e, 0, 0, !0); + e.lineTo(1 * + b, 0); + e.lineTo(.5 * b, 1 * c); + T(e); + R(e, .5 * a * b, a * c, !1); + e.lineTo((1 - .5 * a) * b, a * c); + e.gb(!1); + b = e.q; + b.C = new Q(d / 4 + .5 * a, a); + b.D = new Q(3 * d / 4 + .5 * a, a + .5 * d); + z.u(e); + return b + }, + OffPageConnector: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(.75 * b, 0); + a.lineTo(1 * b, .5 * c); + a.lineTo(.75 * b, 1 * c); + a.lineTo(0, 1 * c); + T(a); + b = a.q; + b.C = Zb; + b.D = new Q(.75, 1); + z.u(a); + return b + }, + Or: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, 1 * b, .5 * c, !0); + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, + (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + R(a, 1 * b, .5 * c, !1); + a.lineTo(0, .5 * c); + a.moveTo(.5 * b, 1 * c); + a.lineTo(.5 * b, 0); + a.gb(!1); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + PaperTape: function(a, b, c) { + c /= .8; + a = z.v(); + R(a, 0, .7 * c, !0); + a.lineTo(0, .3 * c); + S(a, .5 * b, .6 * c, .5 * b, 0, 1 * b, .3 * c); + a.lineTo(1 * b, .7 * c); + S(a, .5 * b, .4 * c, .5 * b, 1 * c, 0, .7 * c); + T(a); + b = a.q; + b.C = new Q(0, .49); + b.D = new Q(1, .75); + z.u(a); + return b + }, + PrimitiveFromCall: function(a, b, c) { + var d = a ? a.Ic : NaN; + a = a ? a.gu : NaN; + isNaN(d) && (d = .1); + isNaN(a) && (a = .3); + var e = z.v(); + R(e, 0, 0, !0); + e.lineTo(1 * b, 0); + e.lineTo((1 - + a) * b, .5 * c); + e.lineTo(1 * b, 1 * c); + e.lineTo(0, 1 * c); + T(e); + b = e.q; + b.C = new Q(d, 0); + b.D = new Q(1 - a, 1); + z.u(e); + return b + }, + PrimitiveToCall: function(a, b, c) { + var d = a ? a.Ic : NaN; + a = a ? a.gu : NaN; + isNaN(d) && (d = .1); + isNaN(a) && (a = .3); + var e = z.v(); + R(e, 0, 0, !0); + e.lineTo((1 - a) * b, 0); + e.lineTo(1 * b, .5 * c); + e.lineTo((1 - a) * b, 1 * c); + e.lineTo(0, 1 * c); + T(e); + b = e.q; + b.C = new Q(d, 0); + b.D = new Q(1 - a, 1); + z.u(e); + return b + }, + Subroutine: "Procedure", + Procedure: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .1); + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, + 1 * c); + T(d); + R(d, (1 - a) * b, 0, !1); + d.lineTo((1 - a) * b, 1 * c); + d.moveTo(a * b, 0); + d.lineTo(a * b, 1 * c); + d.gb(!1); + b = d.q; + b.C = new Q(a, 0); + b.D = new Q(1 - a, 1); + z.u(d); + return b + }, + Process: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .1); + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(0, 1 * c); + T(d); + R(d, a * b, 0, !1); + d.lineTo(a * b, 1 * c); + d.gb(!1); + b = d.q; + b.C = new Q(a, 0); + b.D = ic; + z.u(d); + return b + }, + Sort: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !0); + a.lineTo(1 * b, .5 * c); + a.lineTo(.5 * b, 1 * c); + a.lineTo(0, .5 * c); + T(a); + R(a, 0, .5 * c, !1); + a.lineTo(1 * b, .5 * + c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, .25); + b.D = new Q(.75, .5); + z.u(a); + return b + }, + Start: function(a, b, c) { + a = z.v(); + R(a, .25 * b, 0, !0); + R(a, .25 * b, 0, !0); + a.arcTo(270, 180, .75 * b, .5 * c, .25 * b, .5 * c); + a.arcTo(90, 180, .25 * b, .5 * c, .25 * b, .5 * c); + R(a, .25 * b, 0, !1); + a.lineTo(.25 * b, 1 * c); + a.moveTo(.75 * b, 0); + a.lineTo(.75 * b, 1 * c); + a.gb(!1); + b = a.q; + b.C = new Q(.25, 0); + b.D = new Q(.75, 1); + z.u(a); + return b + }, + Terminator: function(a, b, c) { + a = z.v(); + R(a, .25 * b, 0, !0); + a.arcTo(270, 180, .75 * b, .5 * c, .25 * b, .5 * c); + a.arcTo(90, 180, .25 * b, .5 * c, .25 * b, .5 * c); + b = a.q; + b.C = new Q(.23, 0); + b.D = new Q(.77, 1); + z.u(a); + return b + }, + TransmittalTape: function(a, b, c) { + a = a ? a.Ic : NaN; + isNaN(a) && (a = .1); + var d = z.v(); + R(d, 0, 0, !0); + d.lineTo(1 * b, 0); + d.lineTo(1 * b, 1 * c); + d.lineTo(.75 * b, (1 - a) * c); + d.lineTo(0, (1 - a) * c); + T(d); + b = d.q; + b.C = Zb; + b.D = new Q(1, 1 - a); + z.u(d); + return b + }, + AndGate: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, 0, 0, !0); + a.lineTo(.5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + a.lineTo(0, 1 * c); + T(a); + b = a.q; + b.C = Zb; + b.D = new Q(.55, 1); + z.u(a); + return b + }, + Buffer: function(a, b, c) { + a = z.v(); + R(a, + 0, 0, !0); + a.lineTo(1 * b, .5 * c); + a.lineTo(0, 1 * c); + T(a); + b = a.q; + b.C = new Q(0, .25); + b.D = new Q(.5, .75); + z.u(a); + return b + }, + Clock: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, 1 * b, .5 * c, !0); + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + R(a, 1 * b, .5 * c, !1); + a.lineTo(1 * b, .5 * c); + R(a, .8 * b, .75 * c, !1); + a.lineTo(.8 * b, .25 * c); + a.lineTo(.6 * b, .25 * c); + a.lineTo(.6 * b, .75 * c); + a.lineTo(.4 * b, .75 * c); + a.lineTo(.4 * b, .25 * c); + a.lineTo(.2 * b, .25 * c); + a.lineTo(.2 * + b, .75 * c); + a.gb(!1); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + Ground: function(a, b, c) { + a = z.v(); + R(a, .5 * b, 0, !1); + a.lineTo(.5 * b, .4 * c); + a.moveTo(.2 * b, .6 * c); + a.lineTo(.8 * b, .6 * c); + a.moveTo(.3 * b, .8 * c); + a.lineTo(.7 * b, .8 * c); + a.moveTo(.4 * b, 1 * c); + a.lineTo(.6 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + Inverter: function(a, b, c) { + a = z.v(); + var d = .1 * Hd; + R(a, .8 * b, .5 * c, !0); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + a.lineTo(.8 * b, .5 * c); + R(a, 1 * b, .5 * c, !0); + S(a, 1 * b, (.5 + d) * c, (.9 + d) * b, .6 * c, .9 * b, .6 * c); + S(a, (.9 - d) * b, .6 * c, .8 * b, (.5 + d) * c, .8 * b, .5 * c); + S(a, .8 * b, (.5 - d) * c, (.9 - d) * b, .4 * + c, .9 * b, .4 * c); + S(a, (.9 + d) * b, .4 * c, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + b = a.q; + b.C = new Q(0, .25); + b.D = new Q(.4, .75); + z.u(a); + return b + }, + NandGate: function(a, b, c) { + a = z.v(); + var d = .5 * Hd, + e = .4 * Hd, + g = .1 * Hd; + R(a, .8 * b, .5 * c, !0); + S(a, .8 * b, (.5 + e) * c, (.4 + d) * b, 1 * c, .4 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + a.lineTo(.4 * b, 0); + S(a, (.4 + d) * b, 0, .8 * b, (.5 - e) * c, .8 * b, .5 * c); + R(a, 1 * b, .5 * c, !0); + S(a, 1 * b, (.5 + g) * c, (.9 + g) * b, .6 * c, .9 * b, .6 * c); + S(a, (.9 - g) * b, .6 * c, .8 * b, (.5 + g) * c, .8 * b, .5 * c); + S(a, .8 * b, (.5 - g) * c, (.9 - g) * b, .4 * c, .9 * b, .4 * c); + S(a, (.9 + g) * b, .4 * c, 1 * b, (.5 - g) * c, 1 * b, .5 * + c); + b = a.q; + b.C = new Q(0, .05); + b.D = new Q(.55, .95); + z.u(a); + return b + }, + NorGate: function(a, b, c) { + a = z.v(); + var d = .5, + e = Hd * d, + g = 0, + h = .5; + R(a, .8 * b, .5 * c, !0); + S(a, .7 * b, (h + e) * c, (g + e) * b, (h + d) * c, 0, 1 * c); + S(a, .25 * b, .75 * c, .25 * b, .25 * c, 0, 0); + S(a, (g + e) * b, (h - d) * c, .7 * b, (h - e) * c, .8 * b, .5 * c); + d = .1; + e = .1 * Hd; + g = .9; + h = .5; + R(a, (g - d) * b, h * c, !0); + S(a, (g - d) * b, (h - e) * c, (g - e) * b, (h - d) * c, g * b, (h - d) * c); + S(a, (g + e) * b, (h - d) * c, (g + d) * b, (h - e) * c, (g + d) * b, h * c); + S(a, (g + d) * b, (h + e) * c, (g + e) * b, (h + d) * c, g * b, (h + d) * c); + S(a, (g - e) * b, (h + d) * c, (g - d) * b, (h + e) * c, (g - d) * b, h * c); + b = a.q; + b.C = + new Q(.2, .25); + b.D = new Q(.6, .75); + z.u(a); + return b + }, + OrGate: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, 0, 0, !0); + S(a, (0 + d + d) * b, 0 * c, .8 * b, (.5 - d) * c, 1 * b, .5 * c); + S(a, .8 * b, (.5 + d) * c, (0 + d + d) * b, 1 * c, 0, 1 * c); + S(a, .25 * b, .75 * c, .25 * b, .25 * c, 0, 0); + T(a); + b = a.q; + b.C = new Q(.2, .25); + b.D = new Q(.75, .75); + z.u(a); + return b + }, + XnorGate: function(a, b, c) { + a = z.v(); + var d = .5, + e = Hd * d, + g = .2, + h = .5; + R(a, .1 * b, 0, !1); + S(a, .35 * b, .25 * c, .35 * b, .75 * c, .1 * b, 1 * c); + R(a, .8 * b, .5 * c, !0); + S(a, .7 * b, (h + e) * c, (g + e) * b, (h + d) * c, .2 * b, 1 * c); + S(a, .45 * b, .75 * c, .45 * b, .25 * c, .2 * b, 0); + S(a, (g + e) * + b, (h - d) * c, .7 * b, (h - e) * c, .8 * b, .5 * c); + d = .1; + e = .1 * Hd; + g = .9; + h = .5; + R(a, (g - d) * b, h * c, !0); + S(a, (g - d) * b, (h - e) * c, (g - e) * b, (h - d) * c, g * b, (h - d) * c); + S(a, (g + e) * b, (h - d) * c, (g + d) * b, (h - e) * c, (g + d) * b, h * c); + S(a, (g + d) * b, (h + e) * c, (g + e) * b, (h + d) * c, g * b, (h + d) * c); + S(a, (g - e) * b, (h + d) * c, (g - d) * b, (h + e) * c, (g - d) * b, h * c); + b = a.q; + b.C = new Q(.4, .25); + b.D = new Q(.65, .75); + z.u(a); + return b + }, + XorGate: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, .1 * b, 0, !1); + S(a, .35 * b, .25 * c, .35 * b, .75 * c, .1 * b, 1 * c); + R(a, .2 * b, 0, !0); + S(a, (.2 + d) * b, 0 * c, .9 * b, (.5 - d) * c, 1 * b, .5 * c); + S(a, .9 * b, (.5 + d) * + c, (.2 + d) * b, 1 * c, .2 * b, 1 * c); + S(a, .45 * b, .75 * c, .45 * b, .25 * c, .2 * b, 0); + T(a); + b = a.q; + b.C = new Q(.4, .25); + b.D = new Q(.8, .75); + z.u(a); + return b + }, + Capacitor: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(0, 1 * c); + a.moveTo(1 * b, 0); + a.lineTo(1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + Resistor: function(a, b, c) { + a = z.v(); + R(a, 0, .5 * c, !1); + a.lineTo(.1 * b, 0); + a.lineTo(.2 * b, 1 * c); + a.lineTo(.3 * b, 0); + a.lineTo(.4 * b, 1 * c); + a.lineTo(.5 * b, 0); + a.lineTo(.6 * b, 1 * c); + a.lineTo(.7 * b, .5 * c); + b = a.q; + z.u(a); + return b + }, + Inductor: function(a, b, c) { + a = z.v(); + var d = .1 * Hd, + e = .1; + R(a, (e - .5 * + d) * b, c, !1); + S(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0); + e = .3; + S(a, (e + .1) * b, 0, (e + d) * b, c, e * b, c); + S(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0); + e = .5; + S(a, (e + .1) * b, 0, (e + d) * b, c, e * b, c); + S(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0); + e = .7; + S(a, (e + .1) * b, 0, (e + d) * b, c, e * b, c); + S(a, (e - d) * b, c, (e - .1) * b, 0, (e + .1) * b, 0); + e = .9; + S(a, (e + .1) * b, 0, (e + d) * b, c, (e + .5 * d) * b, c); + b = a.q; + z.u(a); + return b + }, + ACvoltageSource: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, 0 * b, .5 * c, !1); + S(a, 0 * b, (.5 - d) * c, (.5 - d) * b, 0 * c, .5 * b, 0 * c); + S(a, (.5 + d) * b, 0 * c, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + d) * + c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0 * b, (.5 + d) * c, 0 * b, .5 * c); + a.moveTo(.1 * b, .5 * c); + S(a, .5 * b, 0 * c, .5 * b, 1 * c, .9 * b, .5 * c); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + DCvoltageSource: function(a, b, c) { + a = z.v(); + R(a, 0, .75 * c, !1); + a.lineTo(0, .25 * c); + a.moveTo(1 * b, 0); + a.lineTo(1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + Diode: function(a, b, c) { + a = z.v(); + R(a, 1 * b, 0, !1); + a.lineTo(1 * b, .5 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + a.lineTo(1 * b, .5 * c); + a.lineTo(1 * b, 1 * c); + b = a.q; + b.C = new Q(0, .25); + b.D = new Q(.5, .75); + z.u(a); + return b + }, + Wifi: function(a, b, c) { + var d = b, + e = c; + b *= .38; + c *= .6; + a = z.v(); + var g = .8 * Hd, + h = .8, + k = 0, + l = .5, + d = (d - b) / 2, + e = (e - c) / 2; + R(a, k * b + d, (l + h) * c + e, !0); + S(a, (k - g) * b + d, (l + h) * c + e, (k - h) * b + d, (l + g) * c + e, (k - h) * b + d, l * c + e); + S(a, (k - h) * b + d, (l - g) * c + e, (k - g) * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e); + S(a, k * b + d, (l - h) * c + e, (k - h + .5 * g) * b + d, (l - g) * c + e, (k - h + .5 * g) * b + d, l * c + e); + S(a, (k - h + .5 * g) * b + d, (l + g) * c + e, k * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e); + T(a); + g = .4 * Hd; + h = .4; + k = .2; + l = .5; + R(a, k * b + d, (l + h) * c + e, !0); + S(a, (k - g) * b + d, (l + h) * c + e, (k - h) * b + d, (l + g) * c + e, (k - h) * b + d, l * c + e); + S(a, (k - h) * b + d, (l - g) * c + e, (k - g) * b + d, (l - h) * c + e, k * + b + d, (l - h) * c + e); + S(a, k * b + d, (l - h) * c + e, (k - h + .5 * g) * b + d, (l - g) * c + e, (k - h + .5 * g) * b + d, l * c + e); + S(a, (k - h + .5 * g) * b + d, (l + g) * c + e, k * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e); + T(a); + g = .2 * Hd; + h = .2; + l = k = .5; + R(a, (k - h) * b + d, l * c + e, !0); + S(a, (k - h) * b + d, (l - g) * c + e, (k - g) * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e); + S(a, (k + g) * b + d, (l - h) * c + e, (k + h) * b + d, (l - g) * c + e, (k + h) * b + d, l * c + e); + S(a, (k + h) * b + d, (l + g) * c + e, (k + g) * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e); + S(a, (k - g) * b + d, (l + h) * c + e, (k - h) * b + d, (l + g) * c + e, (k - h) * b + d, l * c + e); + g = .4 * Hd; + h = .4; + k = .8; + l = .5; + R(a, k * b + d, (l - h) * c + e, !0); + S(a, (k + g) * b + d, (l - + h) * c + e, (k + h) * b + d, (l - g) * c + e, (k + h) * b + d, l * c + e); + S(a, (k + h) * b + d, (l + g) * c + e, (k + g) * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e); + S(a, k * b + d, (l + h) * c + e, (k + h - .5 * g) * b + d, (l + g) * c + e, (k + h - .5 * g) * b + d, l * c + e); + S(a, (k + h - .5 * g) * b + d, (l - g) * c + e, k * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e); + T(a); + g = .8 * Hd; + h = .8; + k = 1; + l = .5; + R(a, k * b + d, (l - h) * c + e, !0); + S(a, (k + g) * b + d, (l - h) * c + e, (k + h) * b + d, (l - g) * c + e, (k + h) * b + d, l * c + e); + S(a, (k + h) * b + d, (l + g) * c + e, (k + g) * b + d, (l + h) * c + e, k * b + d, (l + h) * c + e); + S(a, k * b + d, (l + h) * c + e, (k + h - .5 * g) * b + d, (l + g) * c + e, (k + h - .5 * g) * b + d, l * c + e); + S(a, (k + h - .5 * g) * b + d, (l - g) * c + + e, k * b + d, (l - h) * c + e, k * b + d, (l - h) * c + e); + T(a); + b = a.q; + z.u(a); + return b + }, + Email: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !0); + a.lineTo(1 * b, 0); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, 0); + T(a); + R(a, 0, 0, !1); + a.lineTo(.5 * b, .6 * c); + a.lineTo(1 * b, 0); + a.moveTo(0, 1 * c); + a.lineTo(.45 * b, .54 * c); + a.moveTo(1 * b, 1 * c); + a.lineTo(.55 * b, .54 * c); + a.gb(!1); + b = a.q; + z.u(a); + return b + }, + Ethernet: function(a, b, c) { + a = z.v(); + R(a, .35 * b, 0, !0); + a.lineTo(.65 * b, 0); + a.lineTo(.65 * b, .4 * c); + a.lineTo(.35 * b, .4 * c); + a.lineTo(.35 * b, 0); + T(a); + R(a, .1 * b, 1 * c, !0, !0); + a.lineTo(.4 * b, 1 * c); + a.lineTo(.4 * b, .6 * c); + a.lineTo(.1 * b, .6 * c); + a.lineTo(.1 * b, 1 * c); + T(a); + R(a, .6 * b, 1 * c, !0, !0); + a.lineTo(.9 * b, 1 * c); + a.lineTo(.9 * b, .6 * c); + a.lineTo(.6 * b, .6 * c); + a.lineTo(.6 * b, 1 * c); + T(a); + R(a, 0, .5 * c, !1); + a.lineTo(1 * b, .5 * c); + a.moveTo(.5 * b, .5 * c); + a.lineTo(.5 * b, .4 * c); + a.moveTo(.75 * b, .5 * c); + a.lineTo(.75 * b, .6 * c); + a.moveTo(.25 * b, .5 * c); + a.lineTo(.25 * b, .6 * c); + a.gb(!1); + b = a.q; + z.u(a); + return b + }, + Power: function(a, b, c) { + a = z.v(); + var d = .4 * Hd, + e = .4, + g = z.O(), + h = z.O(), + k = z.O(), + l = z.O(); + xe(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .5, g, g, h, k, l); + var m = z.Tb(h.x, + h.y); + R(a, h.x * b, h.y * c, !0); + S(a, k.x * b, k.y * c, l.x * b, l.y * c, (.5 + e) * b, .5 * c); + S(a, (.5 + e) * b, (.5 + d) * c, (.5 + d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c); + S(a, (.5 - d) * b, (.5 + e) * c, (.5 - e) * b, (.5 + d) * c, (.5 - e) * b, .5 * c); + xe(.5 - e, .5, .5 - e, .5 - d, .5 - d, .5 - e, .5, .5 - e, .5, k, l, h, g, g); + S(a, k.x * b, k.y * c, l.x * b, l.y * c, h.x * b, h.y * c); + d = .3 * Hd; + e = .3; + xe(.5 - e, .5, .5 - e, .5 - d, .5 - d, .5 - e, .5, .5 - e, .5, k, l, h, g, g); + a.lineTo(h.x * b, h.y * c); + S(a, l.x * b, l.y * c, k.x * b, k.y * c, (.5 - e) * b, .5 * c); + S(a, (.5 - e) * b, (.5 + d) * c, (.5 - d) * b, (.5 + e) * c, .5 * b, (.5 + e) * c); + S(a, (.5 + d) * b, (.5 + e) * c, (.5 + e) * b, (.5 + d) * c, (.5 + + e) * b, .5 * c); + xe(.5, .5 - e, .5 + d, .5 - e, .5 + e, .5 - d, .5 + e, .5, .5, g, g, h, k, l); + S(a, l.x * b, l.y * c, k.x * b, k.y * c, h.x * b, h.y * c); + T(a); + R(a, .45 * b, 0, !0); + a.lineTo(.45 * b, .5 * c); + a.lineTo(.55 * b, .5 * c); + a.lineTo(.55 * b, 0); + T(a); + z.A(g); + z.A(h); + z.A(k); + z.A(l); + z.A(m); + b = a.q; + b.C = new Q(.25, .55); + b.D = new Q(.75, .8); + z.u(a); + return b + }, + Fallout: function(a, b, c) { + a = z.v(); + var d = .5 * Hd; + R(a, 0 * b, .5 * c, !0); + S(a, 0 * b, (.5 - d) * c, (.5 - d) * b, 0 * c, .5 * b, 0 * c); + S(a, (.5 + d) * b, 0 * c, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0 * b, (.5 + d) * c, 0 * b, + .5 * c); + var e = d = 0; + R(a, (.3 + d) * b, (.8 + e) * c, !0, !0); + a.lineTo((.5 + d) * b, (.5 + e) * c); + a.lineTo((.1 + d) * b, (.5 + e) * c); + a.lineTo((.3 + d) * b, (.8 + e) * c); + d = .4; + e = 0; + T(a); + R(a, (.3 + d) * b, (.8 + e) * c, !0, !0); + a.lineTo((.5 + d) * b, (.5 + e) * c); + a.lineTo((.1 + d) * b, (.5 + e) * c); + a.lineTo((.3 + d) * b, (.8 + e) * c); + d = .2; + e = -.3; + T(a); + R(a, (.3 + d) * b, (.8 + e) * c, !0, !0); + a.lineTo((.5 + d) * b, (.5 + e) * c); + a.lineTo((.1 + d) * b, (.5 + e) * c); + a.lineTo((.3 + d) * b, (.8 + e) * c); + T(a); + b = a.q; + b.Xd = bj; + z.u(a); + return b + }, + IrritationHazard: function(a, b, c) { + a = z.v(); + R(a, .2 * b, 0 * c, !0); + a.lineTo(.5 * b, .3 * c); + a.lineTo(.8 * + b, 0 * c); + a.lineTo(1 * b, .2 * c); + a.lineTo(.7 * b, .5 * c); + a.lineTo(1 * b, .8 * c); + a.lineTo(.8 * b, 1 * c); + a.lineTo(.5 * b, .7 * c); + a.lineTo(.2 * b, 1 * c); + a.lineTo(0 * b, .8 * c); + a.lineTo(.3 * b, .5 * c); + a.lineTo(0 * b, .2 * c); + T(a); + b = a.q; + b.C = new Q(.3, .3); + b.D = new Q(.7, .7); + z.u(a); + return b + }, + ElectricalHazard: function(a, b, c) { + a = z.v(); + R(a, .37 * b, 0 * c, !0); + a.lineTo(.5 * b, .11 * c); + a.lineTo(.77 * b, .04 * c); + a.lineTo(.33 * b, .49 * c); + a.lineTo(1 * b, .37 * c); + a.lineTo(.63 * b, .86 * c); + a.lineTo(.77 * b, .91 * c); + a.lineTo(.34 * b, 1 * c); + a.lineTo(.34 * b, .78 * c); + a.lineTo(.44 * b, .8 * c); + a.lineTo(.65 * + b, .56 * c); + a.lineTo(0 * b, .68 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + FireHazard: function(a, b, c) { + a = z.v(); + R(a, .1 * b, 1 * c, !0); + S(a, -.25 * b, .63 * c, .45 * b, .44 * c, .29 * b, 0 * c); + S(a, .48 * b, .17 * c, .54 * b, .35 * c, .51 * b, .42 * c); + S(a, .59 * b, .29 * c, .58 * b, .28 * c, .59 * b, .18 * c); + S(a, .8 * b, .34 * c, .88 * b, .43 * c, .75 * b, .6 * c); + S(a, .87 * b, .48 * c, .88 * b, .43 * c, .88 * b, .31 * c); + S(a, 1.17 * b, .76 * c, .82 * b, .8 * c, .9 * b, 1 * c); + T(a); + b = a.q; + b.C = new Q(.05, .645); + b.D = new Q(.884, .908); + z.u(a); + return b + }, + BpmnActivityLoop: function(a, b, c) { + a = z.v(); + var d = 4 * (Math.SQRT2 - 1) / 3 * .5; + R(a, .65 * b, 1 * c, !1); + S(a, (1 - d + 0) * b, 1 * c, 1 * b, (.5 + d + 0) * c, 1 * b, .5 * c); + S(a, 1 * b, (.5 - d + 0) * c, (.5 + d + 0) * b, 0 * c, .5 * b, 0 * c); + S(a, (.5 - d + 0) * b, 0 * c, 0 * b, (.5 - d + 0) * c, 0 * b, .5 * c); + S(a, 0 * b, (.5 + d + 0) * c, (.5 - d + 0) * b, 1 * c, .35 * b, .98 * c); + a.moveTo(.25 * b, .8 * c); + a.lineTo(.35 * b, 1 * c); + a.lineTo(.1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + BpmnActivityParallel: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(0, 1 * c); + a.moveTo(.5 * b, 0); + a.lineTo(.5 * b, 1 * c); + a.moveTo(1 * b, 0); + a.lineTo(1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + BpmnActivitySequential: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + a.lineTo(1 * + b, 0); + a.moveTo(0, .5 * c); + a.lineTo(1 * b, .5 * c); + a.moveTo(0, 1 * c); + a.lineTo(1 * b, 1 * c); + b = a.q; + z.u(a); + return b + }, + BpmnActivityAdHoc: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + R(a, 1 * b, 1 * c, !1); + R(a, 0, .5 * c, !1); + S(a, .2 * b, .35 * c, .3 * b, .35 * c, .5 * b, .5 * c); + S(a, .7 * b, .65 * c, .8 * b, .65 * c, 1 * b, .5 * c); + b = a.q; + z.u(a); + return b + }, + BpmnActivityCompensation: function(a, b, c) { + a = z.v(); + R(a, 0, .5 * c, !0); + a.lineTo(.5 * b, 0); + a.lineTo(.5 * b, .5 * c); + a.lineTo(1 * b, 1 * c); + a.lineTo(1 * b, 0); + a.lineTo(.5 * b, .5 * c); + a.lineTo(.5 * b, 1 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + BpmnTaskMessage: function(a, + b, c) { + a = z.v(); + R(a, 0, .2 * c, !0); + a.lineTo(1 * b, .2 * c); + a.lineTo(1 * b, .8 * c); + a.lineTo(0, .8 * c); + a.lineTo(0, .8 * c); + T(a); + R(a, 0, .2 * c, !1); + a.lineTo(.5 * b, .5 * c); + a.lineTo(1 * b, .2 * c); + a.gb(!1); + b = a.q; + z.u(a); + return b + }, + BpmnTaskScript: function(a, b, c) { + a = z.v(); + R(a, .7 * b, 1 * c, !0); + a.lineTo(.3 * b, 1 * c); + S(a, .6 * b, .5 * c, 0, .5 * c, .3 * b, 0); + a.lineTo(.7 * b, 0); + S(a, .4 * b, .5 * c, 1 * b, .5 * c, .7 * b, 1 * c); + T(a); + R(a, .45 * b, .73 * c, !1); + a.lineTo(.7 * b, .73 * c); + a.moveTo(.38 * b, .5 * c); + a.lineTo(.63 * b, .5 * c); + a.moveTo(.31 * b, .27 * c); + a.lineTo(.56 * b, .27 * c); + a.gb(!1); + b = a.q; + z.u(a); + return b + }, + BpmnTaskUser: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + R(a, .335 * b, (1 - .555) * c, !0); + a.lineTo(.335 * b, .595 * c); + a.lineTo(.665 * b, .595 * c); + a.lineTo(.665 * b, (1 - .555) * c); + S(a, .88 * b, .46 * c, .98 * b, .54 * c, 1 * b, .68 * c); + a.lineTo(1 * b, 1 * c); + a.lineTo(0, 1 * c); + a.lineTo(0, .68 * c); + S(a, .02 * b, .54 * c, .12 * b, .46 * c, .335 * b, (1 - .555) * c); + a.lineTo(.365 * b, .405 * c); + var d = .5 - .285, + e = Math.PI / 4, + g = 4 * (1 - Math.cos(e)) / (3 * Math.sin(e)), + e = g * d, + g = g * d; + S(a, (.5 - (e + d) / 2) * b, (d + (d + g) / 2) * c, (.5 - d) * b, (d + g) * c, (.5 - d) * b, d * c); + S(a, (.5 - d) * b, (d - g) * c, (.5 - e) * b, (d - d) * c, .5 * b, (d - d) * c); + S(a, (.5 + e) * b, (d - d) * c, (.5 + d) * b, (d - g) * c, (.5 + d) * b, d * c); + S(a, (.5 + d) * b, (d + g) * c, (.5 + (e + d) / 2) * b, (d + (d + g) / 2) * c, .635 * b, .405 * c); + a.lineTo(.635 * b, .405 * c); + a.lineTo(.665 * b, (1 - .555) * c); + a.lineTo(.665 * b, .595 * c); + a.lineTo(.335 * b, .595 * c); + R(a, .2 * b, 1 * c, !1); + a.lineTo(.2 * b, .8 * c); + R(a, .8 * b, 1 * c, !1); + a.lineTo(.8 * b, .8 * c); + b = a.q; + z.u(a); + return b + }, + BpmnEventConditional: function(a, b, c) { + a = z.v(); + R(a, .1 * b, 0, !0); + a.lineTo(.9 * b, 0); + a.lineTo(.9 * b, 1 * c); + a.lineTo(.1 * b, 1 * c); + T(a); + R(a, .2 * b, .2 * c, !1); + a.lineTo(.8 * b, .2 * c); + a.moveTo(.2 * b, .4 * c); + a.lineTo(.8 * + b, .4 * c); + a.moveTo(.2 * b, .6 * c); + a.lineTo(.8 * b, .6 * c); + a.moveTo(.2 * b, .8 * c); + a.lineTo(.8 * b, .8 * c); + a.gb(!1); + b = a.q; + z.u(a); + return b + }, + BpmnEventError: function(a, b, c) { + a = z.v(); + R(a, 0, 1 * c, !0); + a.lineTo(.33 * b, 0); + a.lineTo(.66 * b, .5 * c); + a.lineTo(1 * b, 0); + a.lineTo(.66 * b, 1 * c); + a.lineTo(.33 * b, .5 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + BpmnEventEscalation: function(a, b, c) { + a = z.v(); + R(a, 0, 0, !1); + R(a, 1 * b, 1 * c, !1); + R(a, .1 * b, 1 * c, !0); + a.lineTo(.5 * b, 0); + a.lineTo(.9 * b, 1 * c); + a.lineTo(.5 * b, .5 * c); + T(a); + b = a.q; + z.u(a); + return b + }, + BpmnEventTimer: function(a, b, c) { + a = + z.v(); + var d = .5 * Hd; + R(a, 1 * b, .5 * c, !0); + S(a, 1 * b, (.5 + d) * c, (.5 + d) * b, 1 * c, .5 * b, 1 * c); + S(a, (.5 - d) * b, 1 * c, 0, (.5 + d) * c, 0, .5 * c); + S(a, 0, (.5 - d) * c, (.5 - d) * b, 0, .5 * b, 0); + S(a, (.5 + d) * b, 0, 1 * b, (.5 - d) * c, 1 * b, .5 * c); + R(a, .5 * b, 0, !1); + a.lineTo(.5 * b, .15 * c); + a.moveTo(.5 * b, 1 * c); + a.lineTo(.5 * b, .85 * c); + a.moveTo(0, .5 * c); + a.lineTo(.15 * b, .5 * c); + a.moveTo(1 * b, .5 * c); + a.lineTo(.85 * b, .5 * c); + a.moveTo(.5 * b, .5 * c); + a.lineTo(.58 * b, .1 * c); + a.moveTo(.5 * b, .5 * c); + a.lineTo(.78 * b, .54 * c); + a.gb(!1); + b = a.q; + b.Xd = bj; + z.u(a); + return b + } + }, + ep; + for (ep in so) so[ep.toLowerCase()] = ep; + var fp = { + "": "", + Standard: "F1 m 0,0 l 8,4 -8,4 2,-4 z", + Backward: "F1 m 8,0 l -2,4 2,4 -8,-4 z", + Triangle: "F1 m 0,0 l 8,4.62 -8,4.62 z", + BackwardTriangle: "F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z", + Boomerang: "F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z", + BackwardBoomerang: "F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z", + SidewaysV: "m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z", + BackwardV: "m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z", + OpenTriangle: "m 0,0 l 8,4 -8,4", + BackwardOpenTriangle: "m 8,0 l -8,4 8,4", + OpenTriangleLine: "m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", + BackwardOpenTriangleLine: "m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8", + OpenTriangleTop: "m 0,0 l 8,4 m 0,4", + BackwardOpenTriangleTop: "m 8,0 l -8,4 m 0,4", + OpenTriangleBottom: "m 0,8 l 8,-4", + BackwardOpenTriangleBottom: "m 0,4 l 8,4", + HalfTriangleTop: "F1 m 0,0 l 0,4 8,0 z m 0,8", + BackwardHalfTriangleTop: "F1 m 8,0 l 0,4 -8,0 z m 0,8", + HalfTriangleBottom: "F1 m 0,4 l 0,4 8,-4 z", + BackwardHalfTriangleBottom: "F1 m 8,4 l 0,4 -8,-4 z", + ForwardSemiCircle: "m 4,0 b 270 180 0 4 4", + BackwardSemiCircle: "m 4,8 b 90 180 0 -4 4", + Feather: "m 0,0 l 3,4 -3,4", + BackwardFeather: "m 3,0 l -3,4 3,4", + DoubleFeathers: "m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4", + BackwardDoubleFeathers: "m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4", + TripleFeathers: "m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4", + BackwardTripleFeathers: "m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4", + ForwardSlash: "m 0,8 l 5,-8", + BackSlash: "m 0,0 l 5,8", + DoubleForwardSlash: "m 0,8 l 4,-8 m -2,8 l 4,-8", + DoubleBackSlash: "m 0,0 l 4,8 m -2,-8 l 4,8", + TripleForwardSlash: "m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", + TripleBackSlash: "m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8", + Fork: "m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4", + BackwardFork: "m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4", + LineFork: "m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4", + BackwardLineFork: "m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8", + CircleFork: "F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", + BackwardCircleFork: "F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3", + CircleLineFork: "F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", + BackwardCircleLineFork: "F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3", + Circle: "F1 m 8,4 b 0 360 -4 0 4 z", + Block: "F1 m 0,0 l 0,8 8,0 0,-8 z", + StretchedDiamond: "F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z", + Diamond: "F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z", + Chevron: "F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z", + StretchedChevron: "F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z", + NormalArrow: "F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z", + X: "m 0,0 l 8,8 m 0,-8 l -8,8", + TailedNormalArrow: "F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z", + DoubleTriangle: "F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z", + BigEndArrow: "F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z", + ConcaveTailArrow: "F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z", + RoundedTriangle: "F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z", + SimpleArrow: "F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z", + AccelerationArrow: "F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z", + BoxArrow: "F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z", + TriangleLine: "F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8", + CircleEndedArrow: "F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z", + DynamicWidthArrow: "F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z", + EquilibriumArrow: "m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3", + FastForward: "F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z", + Kite: "F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z", + HalfArrowTop: "F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8", + HalfArrowBottom: "F1 m 0,8 l 4,-4 4,0 -8,4 z", + OpposingDirectionDoubleArrow: "F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z", + PartialDoubleTriangle: "F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z", + LineCircle: "F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z", + DoubleLineCircle: "F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z", + TripleLineCircle: "F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z", + CircleLine: "F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8", + DiamondCircle: "F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z", + PlusCircle: "F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", + OpenRightTriangleTop: "m 8,0 l 0,4 -8,0 m 0,4", + OpenRightTriangleBottom: "m 8,8 l 0,-4 -8,0", + Line: "m 0,0 l 0,8", + DoubleLine: "m 0,0 l 0,8 m 2,0 l 0,-8", + TripleLine: "m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8", + PentagonArrow: "F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z" + }; + + function wo(a) { + if (null !== fp) { + for (var b in fp) { + var c = sf(fp[b], !1); + ke[b] = c; + b.toLowerCase() !== b && (ke[b.toLowerCase()] = b) + } + fp = null + } + b = ke[a]; + if (void 0 === b) { + b = a.toLowerCase(); + if ("none" === b) return "None"; + b = ke[b] + } + return "string" === typeof b ? b : b instanceof hf ? a : null + } + + function D(a) { + 0 === arguments.length ? I.call(this) : I.call(this, a); + this.T = 311807; + this.cl = this.si = ""; + this.ss = this.ps = this.Cs = this.xr = null; + this.Es = ""; + this.Wg = this.Ds = this.Hm = null; + this.rs = ""; + this.Io = null; + this.qs = fe; + this.ts = ""; + this.Jo = null; + this.we = ""; + this.Fv = this.Aq = this.Ok = null; + this.Ki = (new N(NaN, NaN)).freeze(); + this.Cr = ""; + this.gl = null; + this.Dr = Zb; + this.Mr = Nd; + this.Fr = Od; + this.Tq = null; + this.yr = gp; + this.Jm = Md; + this.Im = "gray"; + this.zg = 4; + this.AC = -1; + this.et = NaN; + this.oG = new w; + this.il = null; + this.Qj = NaN + } + z.Qa(D, I); + z.ia("Part", D); + D.prototype.cloneProtected = function(a) { + I.prototype.cloneProtected.call(this, a); + a.T = this.T & -4097 | 49152; + a.si = this.si; + a.cl = this.cl; + a.xr = this.xr; + a.Cs = this.Cs; + a.ps = this.ps; + a.ss = this.ss; + a.Es = this.Es; + a.Ds = this.Ds; + a.Wg = null; + a.rs = this.rs; + a.qs = this.qs.V(); + a.ts = this.ts; + a.we = this.we; + a.Aq = this.Aq; + a.Ki.assign(this.Ki); + a.Cr = this.Cr; + a.Dr = this.Dr.V(); + a.Mr = this.Mr.V(); + a.Fr = this.Fr.V(); + a.Tq = this.Tq; + a.yr = this.yr; + a.Jm = this.Jm.V(); + a.Im = this.Im; + a.zg = this.zg; + a.et = this.et + }; + D.prototype.ji = function(a) { + I.prototype.ji.call(this, a); + a.Nl(); + a.Hm = null; + a.Io = null; + a.Jo = null; + a.gl = null; + a.il = null + }; + D.prototype.toString = function() { + var a = z.kf(Object.getPrototypeOf(this)) + "#" + z.nd(this); + null !== this.data && (a += "(" + ka(this.data) + ")"); + return a + }; + D.LayoutNone = 0; + var vl; + D.LayoutAdded = vl = 1; + var Dl; + D.LayoutRemoved = Dl = 2; + D.LayoutShown = 4; + D.LayoutHidden = 8; + D.LayoutNodeSized = 16; + var gm; + D.LayoutGroupLayout = gm = 32; + D.LayoutNodeReplaced = 64; + var gp; + D.LayoutStandard = gp = vl | Dl | 28 | gm | 64; + D.LayoutAll = 16777215; + D.prototype.tn = function(a, b, c, d, e, g, h) { + var k = this.h; + null !== k && (a === Uf && "elements" === b ? e instanceof I ? wl(e, function(a) { + yl(k, a); + xl(k, a) + }) : e instanceof vk && Tl(k, e) : a === Vf && "elements" === b && (e instanceof I ? wl(e, function(a) { + Cl(k, a); + Bl(k, a) + }) : e instanceof vk && Ul(k, e)), k.Rc(a, b, c, d, e, g, h)) + }; + D.prototype.updateTargetBindings = D.prototype.Mb = function(a) { + I.prototype.Mb.call(this, a); + if (null !== this.data) { + a = this.va.o; + for (var b = a.length, c = 0; c < b; c++) { + var d = a[c]; + d instanceof I && wl(d, function(a) { + null !== a.data && a.Mb() + }) + } + } + }; + D.prototype.updateRelationshipsFromData = function() { + var a = this.data; + if (null !== a) { + var b = this.h; + if (null !== b) { + var c = b.ha; + if (c instanceof V) { + var d = c.fn(a), + b = b.HH(d), + e = this.Va; + b !== e && (b = null !== e ? c.pb(e.data) : void 0, e = c.Pp, "function" === typeof e ? e(a, b) : a[e] = b, c.Lx(a, d)) + } + } + } + }; + z.w(D, { + Dw: "adornments" + }, function() { + return null === this.Wg ? Pa : this.Wg.VE + }); + D.prototype.findAdornment = D.prototype.lp = function(a) { + u && z.g(a, "string", D, "findAdornment:category"); + var b = this.Wg; + return null === b ? null : b.na(a) + }; + D.prototype.addAdornment = D.prototype.ql = function(a, b) { + if (null !== b) { + u && (z.g(a, "string", D, "addAdornment:category"), z.l(b, da, D, "addAdornment:ad")); + var c = null, + d = this.Wg; + null !== d && (c = d.na(a)); + if (c !== b) { + if (null !== c) { + var e = c.h; + null !== e && e.remove(c) + } + null === d && (this.Wg = d = new na("string", da)); + b.si !== a && (b.nc = a); + d.add(a, b); + c = this.h; + null !== c && (c.add(b), b.data = this.data) + } + } + }; + D.prototype.removeAdornment = D.prototype.rj = function(a) { + u && z.g(a, "string", D, "removeAdornment:category"); + var b = this.Wg; + if (null !== b) { + var c = b.na(a); + if (null !== c) { + var d = c.h; + null !== d && d.remove(c) + } + b.remove(a); + 0 === b.count && (this.Wg = null) + } + }; + D.prototype.clearAdornments = D.prototype.pt = function() { + var a = this.Wg; + if (null !== a) { + for (var b = z.rb(), a = a.i; a.next();) b.push(a.key); + for (var a = b.length, c = 0; c < a; c++) this.rj(b[c]); + z.xa(b) + } + }; + D.prototype.updateAdornments = function() { + var a = this.h; + if (null !== a) { + a: { + if (this.kb && this.GF) { + var b = this.vn; + if (!(null !== b && this.W.F() && this.isVisible() && b.nj() && b.W.F())) break a; + var c = this.lp("Selection"); + if (null === c) { + c = this.gJ; + null === c && (c = this instanceof G ? a.wI : this instanceof F ? a.TH : a.MI); + if (!(c instanceof da)) break a; + gh(c); + c = c.copy(); + null !== c && (c.nc = "Selection", c.fc = b) + } + if (null !== c) { + var d = c.placeholder; + if (null !== d) { + var e = b.gj(), + g = 0; + b instanceof X && (g = b.ub); + var h = z.Xl(); + h.n((b.Ga.width + g) * e, (b.Ga.height + + g) * e); + d.Aa = h; + z.pk(h) + } + c.angle = b.Kl(); + c.type !== Ki && (d = z.O(), c.location = b.fb(Zb, d), z.A(d)); + this.ql("Selection", c); + break a + } + } + this.rj("Selection") + } + hp(this, a); + for (a = this.Dw; a.next();) b = a.value, + b.Mb(), + b.S() + } + }; + + function hp(a, b) { + b.hb.Ye.each(function(b) { + b.isEnabled && b.updateAdornments(a) + }); + b.hb.updateAdornments(a) + } + z.w(D, { + layer: "layer" + }, function() { + return this.Fv + }); + z.w(D, { + h: "diagram" + }, function() { + var a = this.Fv; + return null !== a ? a.h : null + }); + z.defineProperty(D, { + If: "layerName" + }, function() { + return this.cl + }, function(a) { + var b = this.cl; + if (b !== a) { + z.g(a, "string", D, "layerName"); + var c = this.h; + if (null === c || null !== c.Fl(a) && !c.lq) + if (this.cl = a, null !== c && c.yc(), this.j("layerName", b, a), b = this.layer, null !== b && b.name !== a && (c = b.h, null !== c && (a = c.Fl(a), null !== a && a !== b))) { + var d = b.Ve(-1, this, !0); + 0 <= d && c.Rc(Vf, "parts", b, this, null, d, !0); + b.visible !== a.visible && this.wd(a.visible); + d = a.xp(99999999, this, !0); + 0 <= d && c.Rc(Uf, "parts", a, null, this, !0, d); + d = this.Ut; + if (null !== + d) { + var e = c.$a; + c.$a = !0; + d(this, b, a); + c.$a = e + } + } + } + }); + z.defineProperty(D, { + Ut: "layerChanged" + }, function() { + return this.xr + }, function(a) { + var b = this.xr; + b !== a && (null !== a && z.g(a, "function", D, "layerChanged"), this.xr = a, this.j("layerChanged", b, a)) + }); + z.defineProperty(D, { + En: "zOrder" + }, function() { + return this.et + }, function(a) { + var b = this.et; + if (b !== a) { + z.g(a, "number", D, "zOrder"); + this.et = a; + var c = this.layer; + null !== c && mk(c, -1, this); + this.j("zOrder", b, a); + a = this.h; + null !== a && a.ta() + } + }); + D.prototype.invalidateAdornments = D.prototype.ae = function() { + var a = this.h; + null !== a && (Ik(a), 0 !== (this.T & 16384) !== !0 && (this.T |= 16384, a.Ce())) + }; + + function ik(a) { + 0 !== (a.T & 16384) !== !1 && (a.updateAdornments(), a.T &= -16385) + } + + function cn(a) { + if (!1 === ol(a)) { + var b = a.h; + null !== b && (b.qg.add(a), a instanceof E && !b.pa.qb && a.mf(), b.Ce()); + ip(a, !0); + a.Fi() + } + } + + function jp(a) { + if (!1 !== ol(a)) { + var b = a.position, + c = a.location; + c.F() && b.F() || kp(a, b, c); + var c = a.Xb, + d = c.copy(); + c.Wa(); + c.x = b.x; + c.y = b.y; + c.freeze(); + a.vx(d, c); + ip(a, !1) + } + } + z.w(D, { + Zb: "locationObject" + }, function() { + if (null === this.gl) { + var a = this.sx; + "" !== a ? (a = this.oe(a), this.gl = null !== a ? a : this) : this.gl = this instanceof da ? this.type !== Ki && null !== this.placeholder ? this.placeholder : this : this + } + return this.gl.visible ? this.gl : this + }); + z.defineProperty(D, { + GI: "minLocation" + }, function() { + return this.Mr + }, function(a) { + var b = this.Mr; + b.N(a) || (u && z.l(a, N, D, "minLocation"), this.Mr = a = a.V(), this.j("minLocation", b, a)) + }); + z.defineProperty(D, { + BI: "maxLocation" + }, function() { + return this.Fr + }, function(a) { + var b = this.Fr; + b.N(a) || (u && z.l(a, N, D, "maxLocation"), this.Fr = a = a.V(), this.j("maxLocation", b, a)) + }); + z.defineProperty(D, { + sx: "locationObjectName" + }, function() { + return this.Cr + }, function(a) { + var b = this.Cr; + b !== a && (u && z.g(a, "string", D, "locationObjectName"), this.Cr = a, this.gl = null, Ym(this), this.j("locationObjectName", b, a)) + }); + z.defineProperty(D, { + of: "locationSpot" + }, function() { + return this.Dr + }, function(a) { + var b = this.Dr; + b.N(a) || (u && (z.l(a, Q, D, "locationSpot"), a.cd() || z.k("Part.locationSpot must be a specific Spot value, not: " + a)), this.Dr = a = a.V(), Ym(this), this.j("locationSpot", b, a)) + }); + D.prototype.move = function(a) { + this.position = a + }; + D.prototype.moveTo = D.prototype.moveTo = function(a, b) { + var c = z.Tb(a, b); + this.move(c); + z.A(c) + }; + D.prototype.isVisible = function() { + if (!this.visible) return !1; + var a = this.layer; + if (null !== a && !a.visible) return !1; + a = this.h; + if (null !== a && (a = a.Ua, a.nf && (a = a.ym.na(this), null !== a && a.Cx))) return !0; + a = this.Va; + return null === a || a.re && a.isVisible() ? !0 : !1 + }; + D.prototype.wd = function(a) { + var b = this.h; + a ? (this.I(4), this.ae(), null !== b && b.qg.add(this)) : (this.I(8), this.pt()); + this.Nl(); + null !== b && (b.yc(), b.ta()) + }; + D.prototype.findObject = D.prototype.oe = function(a) { + if (this.name === a) return this; + var b = this.il; + null === b && (this.il = b = new ma); + if (void 0 !== b[a]) return b[a]; + for (var c = this.va.o, d = c.length, e = 0; e < d; e++) { + var g = c[e]; + if (g.name === a) return b[a] = g; + if (g instanceof I) + if (null === g.Ii && null === g.sg) { + if (g = g.oe(a), null !== g) return b[a] = g + } else if (Rl(g) && (g = g.va.first(), null !== g && g.name === a)) return b[a] = g + } + return b[a] = null + }; + + function lp(a, b, c, d) { + void 0 === d && (d = new N); + c = c.Be() ? ec : c; + var e = b.Ga; + d.n(e.width * c.x + c.offsetX, e.height * c.y + c.offsetY); + if (null === b || b === a) return d; + b.transform.Cb(d); + for (b = b.U; null !== b && b !== a;) b.transform.Cb(d), b = b.U; + a.fl.Cb(d); + d.offset(-a.ud.x, -a.ud.y); + return d + } + D.prototype.ensureBounds = D.prototype.Bf = function() { + rj(this, Infinity, Infinity); + this.Lc() + }; + + function lk(a, b) { + var c = a.oG, + d; + isNaN(a.Qj) && (a.Qj = jo(a)); + d = a.Qj; + var e = 2 * d; + if (!a.sk) return c.n(b.x - 1 - d, b.y - 1 - d, b.width + 2 + e, b.height + 2 + e), c; + d = b.x; + var e = b.y, + g = b.width, + h = b.height, + k = a.shadowBlur, + l = a.lJ, + g = g + k, + h = h + k; + d -= k / 2; + e -= k / 2; + 0 < l.x ? g += l.x : (d += l.x, g -= l.x); + 0 < l.y ? h += l.y : (e += l.y, h -= l.y); + c.n(d - 1, e - 1, g + 2, h + 2); + return c + } + D.prototype.Lc = function() { + this.Fi(); + if (!1 === nl(this)) jp(this); + else { + var a = this.Xb, + b = z.kg(); + b.assign(a); + a.Wa(); + var c = hk(this); + this.$i(0, 0, this.ud.width, this.ud.height); + var d = this.position; + kp(this, d, this.location); + a.x = d.x; + a.y = d.y; + a.freeze(); + this.vx(b, a); + Om(this, !1); + b.N(a) ? this.Jf(c) : !this.be() || eb(b.width, a.width) && eb(b.height, a.height) || 0 <= this.AC && this.I(16); + z.dc(b); + ip(this, !1) + } + }; + D.prototype.vx = function(a, b) { + var c = this.h; + if (null !== c) { + var d = !1; + if (!1 === c.Ij && a.F()) { + var e = c.ad, + g = c.padding, + h = e.x + g.left, + k = e.y + g.top, + l = e.width - 2 * g.right, + e = e.height - 2 * g.bottom; + a.x > h && a.y > k && a.right < l && a.bottom < e && b.x > h && b.y > k && b.right < l && b.bottom < e && (d = !0) + } + 0 !== (this.T & 65536) !== !0 && a.N(b) || zl(this, d, c); + c.ta(); + a.N(b) || this.Nl() + } + }; + z.defineProperty(D, { + location: "location" + }, function() { + return this.Ki + }, function(a) { + var b = this.Ki; + if (!b.N(a)) { + u && z.l(a, N, D, "location"); + a = a.V(); + var c; + c = a; + if (this instanceof G) c = !1; + else { + this.Ki = c; + if (!1 === nl(this)) { + cn(this); + var d = this.sb; + if (d.F()) { + var e = d.copy(); + d.n(d.x + (c.x - b.x), d.y + (c.y - b.y)); + mp(this, this.h, d, e); + this.j("position", e, d) + } + } + c = !0 + } + c && this.j("location", b, a) + } + }); + D.prototype.RA = function(a, b) { + if (this instanceof G || !a.F()) return !1; + var c = this.h; + if (null !== c && (mp(this, c, a, b), !0 === c.pa.qb)) return !0; + this.sb = a; + c = this.Ki; + if (c.F()) { + var d = c.copy(); + c.n(c.x + (a.x - b.x), c.y + (a.y - b.y)); + this.j("location", d, c) + }!1 === ol(this) && !1 === nl(this) && (cn(this), jp(this)); + return !0 + }; + + function mp(a, b, c, d) { + null === b || a instanceof da || (b = b.Ua, b.wc && Vj(b, a, "position", d.copy(), c.copy(), !1)) + } + D.prototype.Nx = function(a, b) { + var c = this.Ki, + d = this.sb; + ol(this) || nl(this) ? c.n(NaN, NaN) : c.n(c.x + a - d.x, c.y + b - d.y); + d.n(a, b); + cn(this) + }; + + function kp(a, b, c) { + var d = z.O(), + e = a.of, + g = a.Zb; + e.Be() && z.k("determineOffset: Part's locationSpot must be real: " + e.toString()); + var h = g.Ga, + k = g instanceof X ? g.ub : 0; + d.tu(0, 0, h.width + k, h.height + k, e); + if (g !== a) + for (d.offset(-k / 2, -k / 2), g.transform.Cb(d), e = g.U; null !== e && e !== a;) e.transform.Cb(d), e = e.U; + a.fl.Cb(d); + d.offset(-a.ud.x, -a.ud.y); + e = a.h; + c.F() ? (g = b.x, h = b.y, b.n(c.x - d.x, c.y - d.y), null !== e && (c = e.Ua, (k = c.Jj) || !c.wc || a instanceof da || Vj(c, a, "position", new N(g, h), b, !1), k || b.x === g && b.y === h || (k = e.Bb, e.Bb = !0, a.j("position", + new N(g, h), b), e.Bb = k))) : b.F() && (g = c.copy(), c.n(b.x + d.x, b.y + d.y), c.N(g) || null === e || (k = e.Bb, e.Bb = !0, a.j("location", g, c), e.Bb = k)); + z.A(d); + a.Fi() + } + + function zl(a, b, c) { + Pm(a, !1); + a instanceof E && nm(c, a); + a.layer.Nc || b || c.yc(); + b = a.Xb; + var d = c.xb; + d.F() ? (hk(a) ? Hb(b, d) || a.Jf(!1) : b.Ig(d) && a.Jf(!0), a.updateAdornments()) : c.Yk = !0 + } + D.prototype.Ql = function() { + return !0 + }; + + function jk(a, b) { + var c = a.Xb; + if (0 !== c.width && 0 !== c.height && !isNaN(c.x) && !isNaN(c.y) && a.isVisible()) { + var d = a.transform; + null !== a.uc && (Um(a, b, a.uc, !0, !0), b.fillRect(c.x, c.y, c.width, c.height)); + null === a.uc && null === a.Nb && (Um(a, b, "rgba(0,0,0,0.4)", !0, !1), b.fillRect(c.x, c.y, c.width, c.height)); + null !== a.Nb && (d.Pt() || b.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy), c = a.Ga, Um(a, b, a.Nb, !0, !1), b.fillRect(0, 0, c.width, c.height), d.Pt() || (c = 1 / (d.m11 * d.m22 - d.m12 * d.m21), b.transform(d.m22 * c, -d.m12 * c, -d.m21 * c, d.m11 * c, c * (d.m21 * + d.dy - d.m22 * d.dx), c * (d.m12 * d.dx - d.m11 * d.dy)))) + } + } + D.prototype.be = function() { + return !0 + }; + z.defineProperty(D, { + nc: "category" + }, function() { + return this.si + }, function(a) { + var b = this.si; + if (b !== a) { + z.g(a, "string", D, "category"); + var c = this.h, + d = this.data, + e = null; + if (null !== c && null !== d && !(this instanceof da)) { + var g = c.ha.pa; + g.isEnabled && !g.qb && (e = this.clone(), e.va.$c(this.va)) + } + this.si = a; + this.j("category", b, a); + null === c || null === d || this instanceof da ? (e = this.Wf, null !== e && (a = e.Wg, null !== a && a.remove(b), e.ql(this.nc, this))) : (g = c.ha, g.pa.qb || (this instanceof G ? (g instanceof V ? g.IF(d, a) : g instanceof ng && g.jJ(d, + a), c = am(c, a), null !== c && (gh(c), c = c.copy(), null !== c && np(this, c, b, a))) : (null !== g && g.Jx(d, a), c = Yl(c, d, a), null !== c && (gh(c), c = c.copy(), null === c || c instanceof G || (c.location = this.location, np(this, c, b, a)))), null !== e && (b = this.clone(), b.va.$c(this.va), this.j("self", e, b)))) + } + }); + z.defineProperty(D, { + self: "self" + }, function() { + return this + }, function(a) { + np(this, a, this.nc, a.nc) + }); + var op = !1; + + function np(a, b, c, d) { + b.constructor === a.constructor || op || (op = !0, z.trace('Should not change the class of the Part when changing category from "' + c + '" to "' + d + '"'), z.trace(" Old class: " + z.kf(a) + ", new class: " + z.kf(b) + ", part: " + a.toString())); + a.pt(); + var e = a.data; + c = a.If; + var g = a.kb, + h = a.wh, + k = !0, + l = !0, + m = !1; + if (a instanceof E) var n = a, + k = n.mj, + l = n.vd, + m = n.Cu; + b.ji(a); + b.cloneProtected(a); + a.si = d; + a.S(); + a.ta(); + b = a.h; + d = !0; + null !== b && (d = b.Bb, b.Bb = !0); + a.fe = e; + null !== e && a.Mb(); + null !== b && (b.Bb = d); + e = a.If; + e !== c && (a.cl = c, + a.If = e); + a instanceof E && (n = a, n.mj = k, n.vd = l, n.Cu = m, n.be() && n.I(64)); + a.kb = g; + a.wh = h + } + D.prototype.canCopy = function() { + if (!this.$D) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.kk) return !1; + a = a.h; + return null === a ? !0 : a.kk ? !0 : !1 + }; + D.prototype.canDelete = function() { + if (!this.dE) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Sm) return !1; + a = a.h; + return null === a ? !0 : a.Sm ? !0 : !1 + }; + D.prototype.canEdit = function() { + if (!this.RF) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Hw) return !1; + a = a.h; + return null === a ? !0 : a.Hw ? !0 : !1 + }; + D.prototype.canGroup = function() { + if (!this.CE) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Ew) return !1; + a = a.h; + return null === a ? !0 : a.Ew ? !0 : !1 + }; + D.prototype.canMove = function() { + if (!this.dF) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.ul) return !1; + a = a.h; + return null === a ? !0 : a.ul ? !0 : !1 + }; + D.prototype.canReshape = function() { + if (!this.sF) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Fw) return !1; + a = a.h; + return null === a ? !0 : a.Fw ? !0 : !1 + }; + D.prototype.canResize = function() { + if (!this.tF) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.mt) return !1; + a = a.h; + return null === a ? !0 : a.mt ? !0 : !1 + }; + D.prototype.canRotate = function() { + if (!this.yF) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Gw) return !1; + a = a.h; + return null === a ? !0 : a.Gw ? !0 : !1 + }; + D.prototype.canSelect = function() { + if (!this.vk) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.xf) return !1; + a = a.h; + return null === a ? !0 : a.xf ? !0 : !1 + }; + z.defineProperty(D, { + $D: "copyable" + }, function() { + return 0 !== (this.T & 1) + }, function(a) { + var b = 0 !== (this.T & 1); + b !== a && (u && z.g(a, "boolean", D, "copyable"), this.T ^= 1, this.j("copyable", b, a)) + }); + z.defineProperty(D, { + dE: "deletable" + }, function() { + return 0 !== (this.T & 2) + }, function(a) { + var b = 0 !== (this.T & 2); + b !== a && (u && z.g(a, "boolean", D, "deletable"), this.T ^= 2, this.j("deletable", b, a)) + }); + z.defineProperty(D, { + RF: "textEditable" + }, function() { + return 0 !== (this.T & 4) + }, function(a) { + var b = 0 !== (this.T & 4); + b !== a && (u && z.g(a, "boolean", D, "textEditable"), this.T ^= 4, this.j("textEditable", b, a), this.ae()) + }); + z.defineProperty(D, { + CE: "groupable" + }, function() { + return 0 !== (this.T & 8) + }, function(a) { + var b = 0 !== (this.T & 8); + b !== a && (u && z.g(a, "boolean", D, "groupable"), this.T ^= 8, this.j("groupable", b, a)) + }); + z.defineProperty(D, { + dF: "movable" + }, function() { + return 0 !== (this.T & 16) + }, function(a) { + var b = 0 !== (this.T & 16); + b !== a && (u && z.g(a, "boolean", D, "movable"), this.T ^= 16, this.j("movable", b, a)) + }); + z.defineProperty(D, { + GF: "selectionAdorned" + }, function() { + return 0 !== (this.T & 32) + }, function(a) { + var b = 0 !== (this.T & 32); + b !== a && (u && z.g(a, "boolean", D, "selectionAdorned"), this.T ^= 32, this.j("selectionAdorned", b, a), this.ae()) + }); + z.defineProperty(D, { + jx: "isInDocumentBounds" + }, function() { + return 0 !== (this.T & 64) + }, function(a) { + var b = 0 !== (this.T & 64); + if (b !== a) { + u && z.g(a, "boolean", D, "isInDocumentBounds"); + this.T ^= 64; + var c = this.h; + null !== c && c.yc(); + this.j("isInDocumentBounds", b, a) + } + }); + z.defineProperty(D, { + jA: "isLayoutPositioned" + }, function() { + return 0 !== (this.T & 128) + }, function(a) { + var b = 0 !== (this.T & 128); + b !== a && (u && z.g(a, "boolean", D, "isLayoutPositioned"), this.T ^= 128, this.j("isLayoutPositioned", b, a), this.I(a ? 4 : 8)) + }); + z.defineProperty(D, { + vk: "selectable" + }, function() { + return 0 !== (this.T & 256) + }, function(a) { + var b = 0 !== (this.T & 256); + b !== a && (u && z.g(a, "boolean", D, "selectable"), this.T ^= 256, this.j("selectable", b, a), this.ae()) + }); + z.defineProperty(D, { + sF: "reshapable" + }, function() { + return 0 !== (this.T & 512) + }, function(a) { + var b = 0 !== (this.T & 512); + b !== a && (u && z.g(a, "boolean", D, "reshapable"), this.T ^= 512, this.j("reshapable", b, a), this.ae()) + }); + z.defineProperty(D, { + tF: "resizable" + }, function() { + return 0 !== (this.T & 1024) + }, function(a) { + var b = 0 !== (this.T & 1024); + b !== a && (u && z.g(a, "boolean", D, "resizable"), this.T ^= 1024, this.j("resizable", b, a), this.ae()) + }); + z.defineProperty(D, { + yF: "rotatable" + }, function() { + return 0 !== (this.T & 2048) + }, function(a) { + var b = 0 !== (this.T & 2048); + b !== a && (u && z.g(a, "boolean", D, "rotatable"), this.T ^= 2048, this.j("rotatable", b, a), this.ae()) + }); + z.defineProperty(D, { + kb: "isSelected" + }, function() { + return 0 !== (this.T & 4096) + }, function(a) { + var b = 0 !== (this.T & 4096); + if (b !== a) { + u && z.g(a, "boolean", D, "isSelected"); + var c = this.h; + if (!a || this.canSelect() && !(null !== c && c.selection.count >= c.CI)) { + this.T ^= 4096; + var d = !1; + if (null !== c) { + d = c.Bb; + c.Bb = !0; + var e = c.selection; + e.Wa(); + a ? e.add(this) : e.remove(this); + e.freeze() + } + this.j("isSelected", b, a); + this.ae(); + a = this.hJ; + null !== a && a(this); + null !== c && (c.Ce(), c.Bb = d) + } + } + }); + z.defineProperty(D, { + wh: "isHighlighted" + }, function() { + return 0 !== (this.T & 524288) + }, function(a) { + var b = 0 !== (this.T & 524288); + if (b !== a) { + u && z.g(a, "boolean", D, "isHighlighted"); + this.T ^= 524288; + var c = this.h; + null !== c && (c = c.hn, c.Wa(), a ? c.add(this) : c.remove(this), c.freeze()); + this.j("isHighlighted", b, a); + this.ta() + } + }); + z.defineProperty(D, { + sk: "isShadowed" + }, function() { + return 0 !== (this.T & 8192) + }, function(a) { + var b = 0 !== (this.T & 8192); + b !== a && (u && z.g(a, "boolean", D, "isShadowed"), this.T ^= 8192, this.j("isShadowed", b, a), this.ta()) + }); + + function ol(a) { + return 0 !== (a.T & 32768) + } + + function ip(a, b) { + a.T = b ? a.T | 32768 : a.T & -32769 + } + + function Pm(a, b) { + a.T = b ? a.T | 65536 : a.T & -65537 + } + + function hk(a) { + return 0 !== (a.T & 131072) + } + D.prototype.Jf = function(a) { + this.T = a ? this.T | 131072 : this.T & -131073 + }; + + function pp(a, b) { + a.T = b ? a.T | 1048576 : a.T & -1048577 + } + z.defineProperty(D, { + IE: "isAnimated" + }, function() { + return 0 !== (this.T & 262144) + }, function(a) { + var b = 0 !== (this.T & 262144); + b !== a && (u && z.g(a, "boolean", D, "isAnimated"), this.T ^= 262144, this.j("isAnimated", b, a)) + }); + z.defineProperty(D, { + Ix: "selectionObjectName" + }, function() { + return this.Es + }, function(a) { + var b = this.Es; + b !== a && (u && z.g(a, "string", D, "selectionObjectName"), this.Es = a, this.Hm = null, this.j("selectionObjectName", b, a)) + }); + z.defineProperty(D, { + gJ: "selectionAdornmentTemplate" + }, function() { + return this.Cs + }, function(a) { + var b = this.Cs; + b !== a && (u && z.l(a, da, D, "selectionAdornmentTemplate"), this instanceof G && (a.type = Ki), this.Cs = a, this.j("selectionAdornmentTemplate", b, a)) + }); + z.w(D, { + vn: "selectionObject" + }, function() { + if (null === this.Hm) { + var a = this.Ix; + null !== a && "" !== a ? (a = this.oe(a), this.Hm = null !== a ? a : this) : this instanceof G ? (a = this.path, this.Hm = null !== a ? a : this) : this.Hm = this + } + return this.Hm + }); + z.defineProperty(D, { + hJ: "selectionChanged" + }, function() { + return this.Ds + }, function(a) { + var b = this.Ds; + b !== a && (null !== a && z.g(a, "function", D, "selectionChanged"), this.Ds = a, this.j("selectionChanged", b, a)) + }); + z.defineProperty(D, { + uF: "resizeAdornmentTemplate" + }, function() { + return this.ps + }, function(a) { + var b = this.ps; + b !== a && (u && z.l(a, da, D, "resizeAdornmentTemplate"), this.ps = a, this.j("resizeAdornmentTemplate", b, a)) + }); + z.defineProperty(D, { + wF: "resizeObjectName" + }, function() { + return this.rs + }, function(a) { + var b = this.rs; + b !== a && (u && z.g(a, "string", D, "resizeObjectName"), this.rs = a, this.Io = null, this.j("resizeObjectName", b, a)) + }); + z.w(D, { + vF: "resizeObject" + }, function() { + if (null === this.Io) { + var a = this.wF; + null !== a && "" !== a ? (a = this.oe(a), this.Io = null !== a ? a : this) : this.Io = this + } + return this.Io + }); + z.defineProperty(D, { + ZI: "resizeCellSize" + }, function() { + return this.qs + }, function(a) { + var b = this.qs; + b.N(a) || (u && z.l(a, Ea, D, "resizeCellSize"), this.qs = a = a.V(), this.j("resizeCellSize", b, a)) + }); + z.defineProperty(D, { + aJ: "rotateAdornmentTemplate" + }, function() { + return this.ss + }, function(a) { + var b = this.ss; + b !== a && (u && z.l(a, da, D, "rotateAdornmentTemplate"), this.ss = a, this.j("rotateAdornmentTemplate", b, a)) + }); + z.defineProperty(D, { + bJ: "rotateObjectName" + }, function() { + return this.ts + }, function(a) { + var b = this.ts; + b !== a && (u && z.g(a, "string", D, "rotateObjectName"), this.ts = a, this.Jo = null, this.j("rotateObjectName", b, a)) + }); + z.w(D, { + zF: "rotateObject" + }, function() { + if (null === this.Jo) { + var a = this.bJ; + null !== a && "" !== a ? (a = this.oe(a), this.Jo = null !== a ? a : this) : this.Jo = this + } + return this.Jo + }); + z.defineProperty(D, { + text: "text" + }, function() { + return this.we + }, function(a) { + var b = this.we; + b !== a && (u && z.g(a, "string", D, "text"), this.we = a, this.j("text", b, a)) + }); + z.defineProperty(D, { + Va: "containingGroup" + }, function() { + return this.Ok + }, function(a) { + if (this.be()) { + var b = this.Ok; + if (b !== a) { + u && null !== a && z.l(a, F, D, "containingGroup"); + null === a || this !== a && !a.li(this) || (this === a && z.k("Cannot make a Group a member of itself: " + this.toString()), z.k("Cannot make a Group indirectly contain itself: " + this.toString() + " already contains " + a.toString())); + this.I(Dl); + var c = this.h; + null !== b ? qp(b, this) : this instanceof F && null !== c && c.ol.remove(this); + this.Ok = a; + null !== a ? rp(a, this) : this instanceof + F && null !== c && c.ol.add(this); + this.I(vl); + if (null !== c) { + var d = this.data, + e = c.ha; + null !== d && e instanceof V && e.Lx(d, e.pb(null !== a ? a.data : null)) + } + d = this.WD; + null !== d && (e = !0, null !== c && (e = c.$a, c.$a = !0), d(this, b, a), null !== c && (c.$a = e)); + if (this instanceof F) + for (c = new K(D), eh(c, this, !0, 0, !0), c = c.i; c.next();) + if (d = c.value, d instanceof E) + for (d = d.ee; d.next();) Wl(d.value); + if (this instanceof E) + for (d = this.ee; d.next();) Wl(d.value); + this.j("containingGroup", b, a); + null !== a && (b = a.layer, null !== b && mk(b, -1, a)) + } + } else z.k("cannot set the Part.containingGroup of a Link or Adornment") + }); + f = D.prototype; + f.Nl = function() { + var a = this.Va; + null !== a && (a.S(), null !== a.Lb && a.Lb.S(), a.mf()) + }; + f.ta = function() { + var a = this.h; + null !== a && !nl(this) && !ol(this) && this.isVisible() && this.Xb.F() && a.ta(lk(this, this.Xb)) + }; + f.Kt = function(a) { + a || (a = this.Ok, null !== a && rp(a, this)) + }; + f.Lt = function(a) { + a || (a = this.Ok, null !== a && qp(a, this)) + }; + f.cn = function() { + var a = this.data; + if (null !== a) { + var b = this.h; + null !== b && (b = b.ha, null !== b && b.Ex(a)) + } + }; + z.defineProperty(D, { + WD: "containingGroupChanged" + }, function() { + return this.Aq + }, function(a) { + var b = this.Aq; + b !== a && (null !== a && z.g(a, "function", D, "containingGroupChanged"), this.Aq = a, this.j("containingGroupChanged", b, a)) + }); + D.prototype.findSubGraphLevel = function() { + return sp(this, this) + }; + + function sp(a, b) { + var c = b.Va; + return null !== c ? 1 + sp(a, c) : b instanceof E && (c = b.Nd, null !== c) ? sp(a, c) : 0 + } + D.prototype.findTopLevelPart = function() { + return tp(this, this) + }; + + function tp(a, b) { + var c = b.Va; + return null !== c ? tp(a, c) : b instanceof E && (c = b.Nd, null !== c) ? tp(a, c) : b + } + z.w(D, { + Bp: "isTopLevel" + }, function() { + return null !== this.Va || this instanceof E && this.Df ? !1 : !0 + }); + D.prototype.isMemberOf = D.prototype.li = function(a) { + return a instanceof F ? up(this, this, a) : !1 + }; + + function up(a, b, c) { + if (b === c || null === c) return !1; + var d = b.Va; + return null === d || d !== c && !up(a, d, c) ? b instanceof E && (b = b.Nd, null !== b) ? up(a, b, c) : !1 : !0 + } + D.prototype.findCommonContainingGroup = D.prototype.DH = function(a) { + if (null === a) return null; + u && z.l(a, D, D, "findCommonContainingGroup:other"); + if (this === a) return this.Va; + for (var b = this; null !== b;) b instanceof F && pp(b, !0), b = b.Va; + for (var c = null, b = a; null !== b;) { + if (0 !== (b.T & 1048576)) { + c = b; + break + } + b = b.Va + } + for (b = this; null !== b;) b instanceof F && pp(b, !1), b = b.Va; + return c + }; + z.defineProperty(D, { + rI: "layoutConditions" + }, function() { + return this.yr + }, function(a) { + var b = this.yr; + b !== a && (u && z.g(a, "number", D, "layoutConditions"), this.yr = a, this.j("layoutConditions", b, a)) + }); + D.prototype.canLayout = function() { + if (!this.jA || !this.isVisible()) return !1; + var a = this.layer; + return null !== a && a.Nc || this instanceof E && this.Df ? !1 : !0 + }; + D.prototype.invalidateLayout = D.prototype.I = function(a) { + void 0 === a && (a = 16777215); + var b; + this.jA && 0 !== (a & this.rI) ? (b = this.layer, null !== b && b.Nc || this instanceof E && this.Df ? b = !1 : (b = this.h, b = null !== b && b.pa.qb ? !1 : !0)) : b = !1; + if (b) + if (b = this.Ok, null !== b) { + var c = b.Sb; + null !== c ? c.I() : b.I(a) + } else a = this.h, null !== a && (c = a.Sb, null !== c && c.I()) + }; + + function Al(a) { + if (!a.isVisible()) return !1; + a = a.layer; + return null !== a && a.Nc ? !1 : !0 + } + z.defineProperty(D, { + iE: "dragComputation" + }, function() { + return this.Tq + }, function(a) { + var b = this.Tq; + b !== a && (null !== a && z.g(a, "function", D, "dragComputation"), this.Tq = a, this.j("dragComputation", b, a)) + }); + z.defineProperty(D, { + lJ: "shadowOffset" + }, function() { + return this.Jm + }, function(a) { + var b = this.Jm; + b.N(a) || (u && z.l(a, N, D, "shadowOffset"), this.Jm = a = a.V(), this.ta(), this.j("shadowOffset", b, a)) + }); + z.defineProperty(D, { + shadowColor: "shadowColor" + }, function() { + return this.Im + }, function(a) { + var b = this.Im; + b !== a && (u && z.g(a, "string", D, "shadowColor"), this.Im = a, this.ta(), this.j("shadowColor", b, a)) + }); + z.defineProperty(D, { + shadowBlur: "shadowBlur" + }, function() { + return this.zg + }, function(a) { + var b = this.zg; + b !== a && (u && z.g(a, "number", D, "shadowBlur"), this.zg = a, this.ta(), this.j("shadowBlur", b, a)) + }); + + function da(a) { + 0 === arguments.length ? D.call(this, ej) : D.call(this, a); + this.T &= -257; + this.cl = "Adornment"; + this.Lb = this.Zg = this.Ib = null + } + z.Qa(da, D); + z.ia("Adornment", da); + da.prototype.toString = function() { + var a = this.Wf; + return "Adornment(" + this.nc + ")" + (null !== a ? a.toString() : "") + }; + da.prototype.updateRelationshipsFromData = function() {}; + da.prototype.on = function(a) { + var b = this.fc.ca, + c = this.fc; + if (b instanceof G && c instanceof X) { + var d = b.path, + c = d.ab; + b.on(a); + c = d.ab; + a = this.va.o; + b = a.length; + for (d = 0; d < b; d++) { + var e = a[d]; + e.Ff && e instanceof X && (e.ab = c) + } + } + }; + z.w(da, { + placeholder: "placeholder" + }, function() { + return this.Lb + }); + z.defineProperty(da, { + fc: "adornedObject" + }, function() { + return this.Ib + }, function(a) { + u && null !== a && z.l(a, O, D, "adornedObject:value"); + var b = this.Wf, + c = null; + null !== a && (c = a.ca); + null === b || null !== a && b === c || b.rj(this.nc); + this.Ib = a; + null !== c && c.ql(this.nc, this) + }); + z.w(da, { + Wf: "adornedPart" + }, function() { + var a = this.Ib; + return null !== a ? a.ca : null + }); + da.prototype.Ql = function() { + var a = this.Ib; + if (null === a) return !0; + a = a.ca; + return null === a || !nl(a) + }; + da.prototype.be = function() { + return !1 + }; + z.w(da, { + Va: "containingGroup" + }, function() { + return null + }); + da.prototype.tn = function(a, b, c, d, e, g, h) { + if (a === Uf && "elements" === b) + if (e instanceof Zi) { + var k = e; + null === this.Lb ? this.Lb = k : this.Lb !== k && z.k("Cannot insert a second Placeholder into the visual tree of an Adornment.") + } else e instanceof I && (k = e.yt(function(a) { + return a instanceof Zi + }), k instanceof Zi && (null === this.Lb ? this.Lb = k : this.Lb !== k && z.k("Cannot insert a second Placeholder into the visual tree of an Adornment."))); + else a === Vf && "elements" === b && null !== this.Lb && (d === this.Lb ? this.Lb = null : d instanceof I && + this.Lb.Pl(d) && (this.Lb = null)); + D.prototype.tn.call(this, a, b, c, d, e, g, h) + }; + da.prototype.updateAdornments = function() {}; + da.prototype.cn = function() {}; + + function E(a) { + 0 === arguments.length ? D.call(this, ej) : D.call(this, a); + this.mc = new J(G); + this.wo = this.el = this.Ar = this.zr = null; + this.rr = !0; + this.bt = !1; + this.Ys = null; + this.sq = this.sr = !0; + this.tq = Ld; + this.Dd = this.Hh = null; + this.hs = vp; + this.hk = !1 + } + z.Qa(E, D); + z.ia("Node", E); + E.prototype.cloneProtected = function(a) { + D.prototype.cloneProtected.call(this, a); + a.zr = this.zr; + a.Ar = this.Ar; + a.el = this.el; + a.rr = this.rr; + a.bt = this.bt; + a.Ys = this.Ys; + a.sr = this.sr; + a.sq = this.sq; + a.tq = this.tq.V(); + a.hs = this.hs + }; + E.prototype.ji = function(a) { + D.prototype.ji.call(this, a); + a.mf(); + a.Hh = this.Hh; + a.Dd = null + }; + var wp; + E.DirectionDefault = wp = z.s(E, "DirectionDefault", 0); + E.DirectionAbsolute = z.s(E, "DirectionAbsolute", 1); + var xp; + E.DirectionRotatedNode = xp = z.s(E, "DirectionRotatedNode", 2); + var Gm; + E.DirectionRotatedNodeOrthogonal = Gm = z.s(E, "DirectionRotatedNodeOrthogonal", 3); + E.SpreadingNone = z.s(E, "SpreadingNone", 10); + var vp; + E.SpreadingEvenly = vp = z.s(E, "SpreadingEvenly", 11); + var yp; + E.SpreadingPacked = yp = z.s(E, "SpreadingPacked", 12); + + function zp(a, b) { + null !== b && (null === a.Hh && (a.Hh = new K(wk)), a.Hh.add(b)) + } + + function Ap(a, b, c, d) { + if (null === b || null === a.Hh) return null; + for (var e = a.Hh.i; e.next();) { + var g = e.value; + if (g.Op === a && g.du === b && g.yx === c && g.zx === d || g.Op === b && g.du === a && g.yx === d && g.zx === c) return g + } + return null + } + E.prototype.invalidateLinkBundle = function(a, b, c) { + if (void 0 === b || null === b) b = ""; + if (void 0 === c || null === c) c = ""; + a = Ap(this, a, b, c); + null !== a && a.zp() + }; + E.prototype.tn = function(a, b, c, d, e, g, h) { + a === Uf && "elements" === b ? this.Dd = null : a === Vf && "elements" === b && (null === this.h ? this.Dd = null : d instanceof O && eo(this, d, function(a, b) { + dn(a, b, !0) + })); + D.prototype.tn.call(this, a, b, c, d, e, g, h) + }; + E.prototype.invalidateConnectedLinks = E.prototype.mf = function(a) { + void 0 === a && (a = null); + for (var b = this.ee; b.next();) { + var c = b.value; + null !== a && a.contains(c) || (Bp(this, c.md), Bp(this, c.Qd), c.qc()) + } + }; + + function Bp(a, b) { + if (null !== b) { + var c = b.gs; + null !== c && c.zp(); + c = a.Va; + null === c || c.re || Bp(c, c.Gl("")) + } + } + E.prototype.Ql = function() { + return !0 + }; + z.defineProperty(E, { + TI: "portSpreading" + }, function() { + return this.hs + }, function(a) { + var b = this.hs; + b !== a && (u && z.Ba(a, E, E, "portSpreading"), this.hs = a, this.j("portSpreading", b, a), a = this.h, null !== a && a.pa.qb || this.mf()) + }); + z.defineProperty(E, { + ND: "avoidable" + }, function() { + return this.sq + }, function(a) { + var b = this.sq; + if (b !== a) { + u && z.g(a, "boolean", E, "avoidable"); + this.sq = a; + var c = this.h; + null !== c && nm(c, this); + this.j("avoidable", b, a) + } + }); + z.defineProperty(E, { + WG: "avoidableMargin" + }, function() { + return this.tq + }, function(a) { + "number" === typeof a ? a = new Db(a) : z.l(a, Db, E, "avoidableMargin"); + var b = this.tq; + if (!b.N(a)) { + this.tq = a = a.V(); + var c = this.h; + null !== c && nm(c, this); + this.j("avoidableMargin", b, a) + } + }); + E.prototype.canAvoid = function() { + return this.ND && !this.Df + }; + E.prototype.getAvoidableRect = function(a) { + a.set(this.W); + a.Cw(this.WG); + return a + }; + E.prototype.findVisibleNode = function() { + for (var a = this; null !== a && !a.isVisible();) a = a.Va; + return a + }; + E.prototype.isVisible = function() { + if (!D.prototype.isVisible.call(this)) return !1; + var a = !0, + b = !0, + c = this.h; + if (null !== c) { + a = c.Ua; + if (a.nf && (a = a.ym.na(this), null !== a && a.Cx)) return !0; + a = c.ce; + b = c.bB === sk + } + if (b) { + if (c = this.Hl(), null !== c && !c.vd) return !1 + } else if (c = a ? this.FH() : this.GH(), 0 < c.count && c.all(function(a) { + return !a.vd + })) return !1; + c = this.Nd; + return null !== c ? c.isVisible() : !0 + }; + E.prototype.wd = function(a) { + D.prototype.wd.call(this, a); + for (var b = this.ee; b.next();) b.value.wd(a) + }; + z.w(E, { + ee: "linksConnected" + }, function() { + return this.mc.i + }); + E.prototype.findLinksConnected = E.prototype.qE = function(a) { + void 0 === a && (a = null); + if (null === a) return this.mc.i; + u && z.g(a, "string", E, "findLinksConnected:pid"); + var b = new Ta(this.mc), + c = this; + b.rn = function(b) { + return b.Y === c && b.$f === a || b.da === c && b.Ug === a + }; + return b + }; + E.prototype.findLinksOutOf = E.prototype.Yw = function(a) { + void 0 === a && (a = null); + u && null !== a && z.g(a, "string", E, "findLinksOutOf:pid"); + var b = new Ta(this.mc), + c = this; + b.rn = function(b) { + return b.Y !== c ? !1 : null === a ? !0 : b.$f === a + }; + return b + }; + E.prototype.findLinksInto = E.prototype.Hg = function(a) { + void 0 === a && (a = null); + u && null !== a && z.g(a, "string", E, "findLinksInto:pid"); + var b = new Ta(this.mc), + c = this; + b.rn = function(b) { + return b.da !== c ? !1 : null === a ? !0 : b.Ug === a + }; + return b + }; + E.prototype.findNodesConnected = E.prototype.rE = function(a) { + void 0 === a && (a = null); + u && null !== a && z.g(a, "string", E, "findNodesConnected:pid"); + for (var b = null, c = null, d = this.mc.i; d.next();) { + var e = d.value; + if (e.Y === this) { + if (null === a || e.$f === a) e = e.da, null !== b ? b.add(e) : null !== c && c !== e ? (b = new K(E), b.add(c), b.add(e)) : c = e + } else e.da !== this || null !== a && e.Ug !== a || (e = e.Y, null !== b ? b.add(e) : null !== c && c !== e ? (b = new K(E), b.add(c), b.add(e)) : c = e) + } + return null !== b ? b.i : null !== c ? new Ra(c) : Pa + }; + E.prototype.findNodesOutOf = E.prototype.GH = function(a) { + void 0 === a && (a = null); + u && null !== a && z.g(a, "string", E, "findNodesOutOf:pid"); + for (var b = null, c = null, d = this.mc.i; d.next();) { + var e = d.value; + e.Y !== this || null !== a && e.$f !== a || (e = e.da, null !== b ? b.add(e) : null !== c && c !== e ? (b = new K(E), b.add(c), b.add(e)) : c = e) + } + return null !== b ? b.i : null !== c ? new Ra(c) : Pa + }; + E.prototype.findNodesInto = E.prototype.FH = function(a) { + void 0 === a && (a = null); + u && null !== a && z.g(a, "string", E, "findNodesInto:pid"); + for (var b = null, c = null, d = this.mc.i; d.next();) { + var e = d.value; + e.da !== this || null !== a && e.Ug !== a || (e = e.Y, null !== b ? b.add(e) : null !== c && c !== e ? (b = new K(E), b.add(c), b.add(e)) : c = e) + } + return null !== b ? b.i : null !== c ? new Ra(c) : Pa + }; + E.prototype.findLinksBetween = function(a, b, c) { + void 0 === b && (b = null); + void 0 === c && (c = null); + u && (z.l(a, E, E, "findLinksBetween:othernode"), null !== b && z.g(b, "string", E, "findLinksBetween:pid"), null !== c && z.g(c, "string", E, "findLinksBetween:otherpid")); + var d = new Ta(this.mc), + e = this; + d.rn = function(d) { + return (d.Y !== e || d.da !== a || null !== b && d.$f !== b || null !== c && d.Ug !== c) && (d.Y !== a || d.da !== e || null !== c && d.$f !== c || null !== b && d.Ug !== b) ? !1 : !0 + }; + return d + }; + E.prototype.findLinksTo = function(a, b, c) { + void 0 === b && (b = null); + void 0 === c && (c = null); + u && (z.l(a, E, E, "findLinksTo:othernode"), null !== b && z.g(b, "string", E, "findLinksTo:pid"), null !== c && z.g(c, "string", E, "findLinksTo:otherpid")); + var d = new Ta(this.mc), + e = this; + d.rn = function(d) { + return d.Y !== e || d.da !== a || null !== b && d.$f !== b || null !== c && d.Ug === c ? !1 : !0 + }; + return d + }; + z.defineProperty(E, { + tI: "linkConnected" + }, function() { + return this.zr + }, function(a) { + var b = this.zr; + b !== a && (null !== a && z.g(a, "function", E, "linkConnected"), this.zr = a, this.j("linkConnected", b, a)) + }); + z.defineProperty(E, { + uI: "linkDisconnected" + }, function() { + return this.Ar + }, function(a) { + var b = this.Ar; + b !== a && (null !== a && z.g(a, "function", E, "linkDisconnected"), this.Ar = a, this.j("linkDisconnected", b, a)) + }); + z.defineProperty(E, { + px: "linkValidation" + }, function() { + return this.el + }, function(a) { + var b = this.el; + b !== a && (null !== a && z.g(a, "function", E, "linkValidation"), this.el = a, this.j("linkValidation", b, a)) + }); + + function Cp(a, b, c) { + Bp(a, c); + if (!a.mc.contains(b)) { + a.mc.add(b); + var d = a.tI; + if (null !== d) { + var e = !0, + g = a.h; + null !== g && (e = g.$a, g.$a = !0); + d(a, b, c); + null !== g && (g.$a = e) + } + b.Oc && (c = b.Y, b = b.da, null !== c && null !== b && c !== b && (d = !0, g = a.h, null !== g && (d = g.ce), a = d ? b : c, e = d ? c : b, a.hk || (a.hk = e), !e.mj || null !== g && g.pa.qb || (d ? c === e && (e.mj = !1) : b === e && (e.mj = !1)))) + } + } + + function Dp(a, b, c) { + Bp(a, c); + if (a.mc.remove(b)) { + var d = a.uI, + e = a.h; + if (null !== d) { + var g = !0; + null !== e && (g = e.$a, e.$a = !0); + d(a, b, c); + null !== e && (e.$a = g) + } + b.Oc && (c = !0, null !== e && (c = e.ce), a = c ? b.da : b.Y, b = c ? b.Y : b.da, null !== a && (a.hk = !1), null === b || b.mj || (0 === b.mc.count ? (b.hk = null, null !== e && e.pa.qb || (b.mj = !0)) : hm(b))) + } + } + + function hm(a) { + a.hk = !1; + if (0 !== a.mc.count) { + var b = !0, + c = a.h; + if (null === c || !c.pa.qb) { + null !== c && (b = c.ce); + for (c = a.mc.i; c.next();) { + var d = c.value; + if (d.Oc) + if (b) { + if (d.Y === a) { + a.mj = !1; + return + } + } else if (d.da === a) { + a.mj = !1; + return + } + } + a.mj = !0 + } + } + } + E.prototype.updateRelationshipsFromData = function() { + D.prototype.updateRelationshipsFromData.call(this); + var a = this.data; + if (null !== a) { + var b = this.h; + if (null !== b) { + var c = b.ha; + if (c instanceof ng) { + var d = c.gn(a), + b = b.hf(d), + e = this.Hl(); + b !== e && (b = null !== e ? c.pb(e.data) : void 0, e = c.Qp, "function" === typeof e ? e(a, b) : a[e] = b, c.Eh(a, d)) + } + } + } + }; + E.prototype.Kt = function(a) { + D.prototype.Kt.call(this, a); + a || (hm(this), a = this.wo, null !== a && Ep(a, this)) + }; + E.prototype.Lt = function(a) { + D.prototype.Lt.call(this, a); + a || (a = this.wo, null !== a && null !== a.Ke && (a.Ke.remove(this), a.S())) + }; + E.prototype.cn = function() { + if (0 < this.mc.count) { + var a = this.h; + if (null !== a) + for (var b = a.wb.hE, c = this.mc.copy().i; c.next();) { + var d = c.value; + b ? a.remove(d) : (d.Y === this && (d.Y = null), d.da === this && (d.da = null)) + } + } + this.Nd = null; + D.prototype.cn.call(this) + }; + z.w(E, { + Df: "isLinkLabel" + }, function() { + return null !== this.wo + }); + z.defineProperty(E, { + Nd: "labeledLink" + }, function() { + return this.wo + }, function(a) { + var b = this.wo; + if (b !== a) { + u && null !== a && z.l(a, G, E, "labeledLink"); + var c = this.h, + d = this.data; + if (null !== b && (null !== b.Ke && (b.Ke.remove(this), b.S()), null !== c && null !== d && !c.pa.qb)) { + var e = b.data, + g = c.ha; + if (null !== e && g instanceof V) { + var h = g.pb(d); + void 0 !== h && g.nF(e, h) + } + } + this.wo = a; + null !== a && (Ep(a, this), null === c || null === d || c.pa.qb || (e = a.data, g = c.ha, null !== e && g instanceof V && (h = g.pb(d), void 0 !== h && g.zz(e, h)))); + Ym(this); + this.j("labeledLink", + b, a) + } + }); + E.prototype.findPort = E.prototype.Gl = function(a) { + u && z.g(a, "string", E, "findPort:pid"); + if (null === this.Dd) { + if ("" === a && !1 === this.Ph) return this; + en(this) + } + var b = this.Dd.na(a); + return null !== b || "" !== a && (b = this.Dd.na(""), null !== b) ? b : this + }; + z.w(E, { + port: "port" + }, function() { + return this.Gl("") + }); + z.w(E, { + ports: "ports" + }, function() { + null === this.Dd && en(this); + return this.Dd.VE + }); + + function en(a) { + null === a.Dd ? a.Dd = new na("string", O) : a.Dd.clear(); + eo(a, a, function(a, c) { + var d = c.yd; + null !== d && a.Dd.add(d, c) + }); + 0 === a.Dd.count && a.Dd.add("", a) + } + + function dn(a, b, c) { + var d = b.yd; + if (null !== d && (null !== a.Dd && a.Dd.remove(d), b = a.h, null !== b && c)) { + c = null; + for (d = a.qE(d); d.next();) a = d.value, null === c && (c = z.rb()), c.push(a); + if (null !== c) { + for (d = 0; d < c.length; d++) a = c[d], b.remove(a); + z.xa(c) + } + } + } + E.prototype.isInTreeOf = function(a) { + if (null === a || a === this) return !1; + var b = !0, + c = this.h; + null !== c && (b = c.ce); + c = this; + if (b) + for (; c !== a;) { + for (var b = null, d = c.mc.i; d.next();) { + var e = d.value; + if (e.Oc && (b = e.Y, b !== c && b !== this)) break + } + if (b === this || null === b || b === c) return !1; + c = b + } else + for (; c !== a;) { + b = null; + for (d = c.mc.i; d.next() && (e = d.value, !e.Oc || (b = e.da, b === c || b === this));); + if (b === this || null === b || b === c) return !1; + c = b + } + return !0 + }; + E.prototype.findTreeRoot = function() { + var a = !0, + b = this.h; + null !== b && (a = b.ce); + b = this; + if (a) + for (;;) { + for (var a = null, c = b.mc.i; c.next();) { + var d = c.value; + if (d.Oc && (a = d.Y, a !== b && a !== this)) break + } + if (a === this) return this; + if (null === a || a === b) return b; + b = a + } else + for (;;) { + a = null; + for (c = b.mc.i; c.next() && (d = c.value, !d.Oc || (a = d.da, a === b || a === this));); + if (a === this) return this; + if (null === a || a === b) return b; + b = a + } + }; + E.prototype.findCommonTreeParent = function(a) { + if (null === a) return null; + u && z.l(a, E, E, "findCommonTreeParent:other"); + if (this === a) return this; + for (var b = this; null !== b;) pp(b, !0), b = b.Hl(); + for (var c = null, b = a; null !== b;) { + if (0 !== (b.T & 1048576)) { + c = b; + break + } + b = b.Hl() + } + for (b = this; null !== b;) pp(b, !1), b = b.Hl(); + return c + }; + E.prototype.findTreeParentLink = E.prototype.pp = function() { + var a = !0, + b = this.h; + null !== b && (a = b.ce); + b = this.mc.i; + if (a) + for (; b.next();) { + if (a = b.value, a.Oc && a.Y !== this) return a + } else + for (; b.next();) + if (a = b.value, a.Oc && a.da !== this) return a; + return null + }; + E.prototype.findTreeParentNode = E.prototype.Hl = function() { + var a = this.hk; + if (null === a) return null; + if (a instanceof E) return a; + var b = !0, + a = this.h; + null !== a && (b = a.ce); + a = this.mc.i; + if (b) + for (; a.next();) { + if (b = a.value, b.Oc && (b = b.Y, b !== this)) return this.hk = b + } else + for (; a.next();) + if (b = a.value, b.Oc && (b = b.da, b !== this)) return this.hk = b; + return this.hk = null + }; + E.prototype.findTreeParentChain = function() { + function a(b, d) { + if (null !== b) { + d.add(b); + var e = b.pp(); + null !== e && (d.add(e), a(b.Hl(), d)) + } + } + var b = new K(D); + a(this, b); + return b + }; + E.prototype.findTreeLevel = function() { + return Fp(this, this) + }; + + function Fp(a, b) { + var c = b.Hl(); + return null === c ? 0 : 1 + Fp(a, c) + } + E.prototype.findTreeChildrenLinks = E.prototype.$w = function() { + var a = !0, + b = this.h; + null !== b && (a = b.ce); + if (a) { + var a = new Ta(this.mc), + c = this; + a.rn = function(a) { + return a.Oc && a.Y === c ? !0 : !1 + } + } else a = new Ta(this.mc), c = this, a.rn = function(a) { + return a.Oc && a.da === c ? !0 : !1 + }; + return a + }; + E.prototype.findTreeChildrenNodes = E.prototype.tE = function() { + var a = !0, + b = this.h; + null !== b && (a = b.ce); + var c = b = null, + d = this.mc.i; + if (a) + for (; d.next();) a = d.value, a.Oc && a.Y === this && (a = a.da, null !== b ? b.add(a) : null !== c && c !== a ? (b = new J(E), b.add(c), b.add(a)) : c = a); + else + for (; d.next();) a = d.value, a.Oc && a.da === this && (a = a.Y, null !== b ? b.add(a) : null !== c && c !== a ? (b = new J(E), b.add(c), b.add(a)) : c = a); + return null !== b ? b.i : null !== c ? new Ra(c) : Pa + }; + E.prototype.findTreeParts = function(a) { + void 0 === a && (a = Infinity); + z.g(a, "number", E, "collapseTree:level"); + var b = new K(D); + eh(b, this, !1, a, !0); + return b + }; + E.prototype.collapseTree = E.prototype.collapseTree = function(a) { + void 0 === a && (a = 1); + z.p(a, E, "collapseTree:level"); + 1 > a && (a = 1); + var b = this.h; + if (null !== b && !b.vh) { + b.vh = !0; + var c = new K(E); + c.add(this); + Gp(this, c, b.ce, a, b.Ua, this, b.bB === sk); + b.vh = !1 + } + }; + + function Gp(a, b, c, d, e, g, h) { + if (1 < d) + for (var k = c ? a.Yw() : a.Hg(); k.next();) { + var l = k.value; + l.Oc && (l = l.aA(a), null === l || l === a || b.contains(l) || (b.add(l), Gp(l, b, c, d - 1, e, g, h))) + } else Hp(a, b, c, e, g, h) + } + + function Hp(a, b, c, d, e, g) { + for (var h = e === a ? !0 : a.vd, k = c ? a.Yw() : a.Hg(); k.next();) { + var l = k.value; + l.Oc && (l = l.aA(a), null === l || l === a || b.contains(l) || (b.add(l), h && (g && ek(d, l, e), l.Nl(), l.wd(!1)), l.vd && (l.Cu = l.vd, Hp(l, b, c, d, e, g)))) + } + a.vd = !1 + } + E.prototype.expandTree = E.prototype.expandTree = function(a) { + void 0 === a && (a = 2); + z.p(a, E, "expandTree:level"); + 2 > a && (a = 2); + var b = this.h; + if (null !== b && !b.vh) { + b.vh = !0; + var c = new K(E); + c.add(this); + Ip(this, c, b.ce, a, b.Ua, this, b.bB === sk); + b.vh = !1 + } + }; + + function Ip(a, b, c, d, e, g, h) { + for (var k = g === a ? !1 : a.vd, l = c ? a.Yw() : a.Hg(); l.next();) { + var m = l.value; + m.Oc && (k || m.Cg || m.qc(), m = m.aA(a), null !== m && m !== a && !b.contains(m) && (b.add(m), k || (m.wd(!0), m.Nl(), h && dk(e, m, g)), 2 < d || m.Cu)) && (m.Cu = !1, Ip(m, b, c, d - 1, e, g, h)) + } + a.vd = !0 + } + z.defineProperty(E, { + vd: "isTreeExpanded" + }, function() { + return this.rr + }, function(a) { + var b = this.rr; + if (b !== a) { + u && z.g(a, "boolean", E, "isTreeExpanded"); + this.rr = a; + var c = this.h; + this.j("isTreeExpanded", b, a); + b = this.yJ; + if (null !== b) { + var d = !0; + null !== c && (d = c.$a, c.$a = !0); + b(this); + null !== c && (c.$a = d) + } + null !== c && c.pa.qb ? this.wd(a) : a ? this.expandTree() : this.collapseTree() + } + }); + z.defineProperty(E, { + Cu: "wasTreeExpanded" + }, function() { + return this.bt + }, function(a) { + var b = this.bt; + b !== a && (u && z.g(a, "boolean", E, "wasTreeExpanded"), this.bt = a, this.j("wasTreeExpanded", b, a)) + }); + z.defineProperty(E, { + yJ: "treeExpandedChanged" + }, function() { + return this.Ys + }, function(a) { + var b = this.Ys; + b !== a && (null !== a && z.g(a, "function", E, "treeExpandedChanged"), this.Ys = a, this.j("treeExpandedChanged", b, a)) + }); + z.defineProperty(E, { + mj: "isTreeLeaf" + }, function() { + return this.sr + }, function(a) { + var b = this.sr; + b !== a && (u && z.g(a, "boolean", E, "isTreeLeaf"), this.sr = a, this.j("isTreeLeaf", b, a)) + }); + + function G() { + D.call(this, Ki); + this.pg = null; + this.Oh = ""; + this.Bg = this.ar = null; + this.ei = ""; + this.Xs = null; + this.os = this.ns = this.ms = !1; + this.tr = !0; + this.mq = Ni; + this.Fq = 0; + this.Iq = Ni; + this.Jq = NaN; + this.Dm = nn; + this.Ms = .5; + this.Ke = null; + this.Yc = (new J(N)).freeze(); + this.Ko = this.Me = null; + this.Cg = !1; + this.cw = null; + this.mz = !1; + this.Zg = this.Zn = this.Vn = this.ri = this.Di = this.ab = null; + this.pz = new N; + this.jD = this.hD = null; + this.sy = !1; + this.la = null + } + z.Qa(G, D); + z.ia("Link", G); + G.prototype.cloneProtected = function(a) { + D.prototype.cloneProtected.call(this, a); + a.Oh = this.Oh; + a.ar = this.ar; + a.ei = this.ei; + a.Xs = this.Xs; + a.ms = this.ms; + a.ns = this.ns; + a.os = this.os; + a.tr = this.tr; + a.mq = this.mq; + a.Fq = this.Fq; + a.Iq = this.Iq; + a.Jq = this.Jq; + a.Dm = this.Dm; + a.Ms = this.Ms; + null !== this.la && (a.la = this.la.copy()) + }; + G.prototype.ji = function(a) { + D.prototype.ji.call(this, a); + this.Oh = a.Oh; + this.ei = a.ei; + a.Me = null; + a.qc(); + a.ri = this.ri + }; + var nn; + G.Normal = nn = z.s(G, "Normal", 1); + G.Orthogonal = z.s(G, "Orthogonal", 2); + G.AvoidsNodes = z.s(G, "AvoidsNodes", 6); + var Jp; + G.AvoidsNodesStraight = Jp = z.s(G, "AvoidsNodesStraight", 7); + var Ni; + G.None = Ni = z.s(G, "None", 0); + var Ui; + G.Bezier = Ui = z.s(G, "Bezier", 9); + var Mi; + G.JumpGap = Mi = z.s(G, "JumpGap", 10); + var Li; + G.JumpOver = Li = z.s(G, "JumpOver", 11); + var kn; + G.End = kn = z.s(G, "End", 17); + var ln; + G.Scale = ln = z.s(G, "Scale", 18); + var mn; + G.Stretch = mn = z.s(G, "Stretch", 19); + var yo; + G.OrientAlong = yo = z.s(G, "OrientAlong", 21); + var Kp; + G.OrientPlus90 = Kp = z.s(G, "OrientPlus90", 22); + var Lp; + G.OrientMinus90 = Lp = z.s(G, "OrientMinus90", 23); + var Mp; + G.OrientOpposite = Mp = z.s(G, "OrientOpposite", 24); + var Np; + G.OrientUpright = Np = z.s(G, "OrientUpright", 25); + var Op; + G.OrientPlus90Upright = Op = z.s(G, "OrientPlus90Upright", 26); + var Pp; + G.OrientMinus90Upright = Pp = z.s(G, "OrientMinus90Upright", 27); + var Qp; + G.OrientUpright45 = Qp = z.s(G, "OrientUpright45", 28); + G.prototype.Ue = function() { + null === this.la && (this.la = new Fm) + }; + G.prototype.Ql = function() { + var a = this.Y; + if (null !== a) { + var b = a.findVisibleNode(); + null !== b && (a = b); + if (nl(a) || ol(a)) return !1 + } + a = this.da; + return null !== a && (b = a.findVisibleNode(), null !== b && (a = b), nl(a) || ol(a)) ? !1 : !0 + }; + G.prototype.RA = function() { + return !1 + }; + G.prototype.be = function() { + return !1 + }; + G.prototype.computeAngle = function(a, b, c) { + a = 0; + switch (b) { + default: + case Ni: + a = 0; + break; + case yo: + a = c; + break; + case Kp: + a = c + 90; + break; + case Lp: + a = c - 90; + break; + case Mp: + a = c + 180; + break; + case Np: + a = df(c);90 < a && 270 > a && (a -= 180); + break; + case Op: + a = df(c + 90);90 < a && 270 > a && (a -= 180); + break; + case Pp: + a = df(c - 90);90 < a && 270 > a && (a -= 180); + break; + case Qp: + a = df(c); + if (45 < a && 135 > a || 225 < a && 315 > a) return 0;90 < a && 270 > a && (a -= 180) + } + return df(a) + }; + z.defineProperty(G, { + Y: "fromNode" + }, function() { + return this.pg + }, function(a) { + var b = this.pg; + if (b !== a) { + u && null !== a && z.l(a, E, G, "fromNode"); + var c = this.md; + null !== b && (this.Bg !== b && Dp(b, this, c), Rp(this), this.I(Dl)); + this.pg = a; + null !== a && this.wd(a.isVisible()); + this.Di = null; + this.qc(); + var d = this.h; + if (null !== d) { + var e = this.data, + g = d.ha; + if (null !== e) + if (g instanceof V) { + var h = null !== a ? a.data : null; + g.Kx(e, g.pb(h)) + } else g instanceof ng && (h = null !== a ? a.data : null, d.ce ? g.Eh(e, g.pb(h)) : (null !== b && g.Eh(b.data, void 0), g.Eh(h, g.pb(null !== + this.Bg ? this.Bg.data : null)))) + } + e = this.md; + g = this.wE; + null !== g && (h = !0, null !== d && (h = d.$a, d.$a = !0), g(this, c, e), null !== d && (d.$a = h)); + null !== a && (this.Bg !== a && Cp(a, this, e), Sp(this), this.I(vl)); + this.j("fromNode", b, a); + Wl(this) + } + }); + z.defineProperty(G, { + $f: "fromPortId" + }, function() { + return this.Oh + }, function(a) { + var b = this.Oh; + if (b !== a) { + u && z.g(a, "string", G, "fromPortId"); + var c = this.md; + null !== c && Bp(this.Y, c); + Rp(this); + this.Oh = a; + var d = this.md; + null !== d && Bp(this.Y, d); + var e = this.h; + if (null !== e) { + var g = this.data, + h = e.ha; + null !== g && h instanceof V && h.PA(g, a) + } + c !== d && (this.Di = null, this.qc(), g = this.wE, null !== g && (h = !0, null !== e && (h = e.$a, e.$a = !0), g(this, c, d), null !== e && (e.$a = h))); + Sp(this); + this.j("fromPortId", b, a) + } + }); + z.w(G, { + md: "fromPort" + }, function() { + var a = this.pg; + return null === a ? null : a.Gl(this.Oh) + }); + z.defineProperty(G, { + wE: "fromPortChanged" + }, function() { + return this.ar + }, function(a) { + var b = this.ar; + b !== a && (null !== a && z.g(a, "function", G, "fromPortChanged"), this.ar = a, this.j("fromPortChanged", b, a)) + }); + z.defineProperty(G, { + da: "toNode" + }, function() { + return this.Bg + }, function(a) { + var b = this.Bg; + if (b !== a) { + u && null !== a && z.l(a, E, G, "toNode"); + var c = this.Qd; + null !== b && (this.pg !== b && Dp(b, this, c), Rp(this), this.I(Dl)); + this.Bg = a; + null !== a && this.wd(a.isVisible()); + this.Di = null; + this.qc(); + var d = this.h; + if (null !== d) { + var e = this.data, + g = d.ha; + if (null !== e) + if (g instanceof V) { + var h = null !== a ? a.data : null; + g.Ox(e, g.pb(h)) + } else g instanceof ng && (h = null !== a ? a.data : null, d.ce ? (null !== b && g.Eh(b.data, void 0), g.Eh(h, g.pb(null !== this.pg ? this.pg.data : + null))) : g.Eh(e, g.pb(h))) + } + e = this.Qd; + g = this.UF; + null !== g && (h = !0, null !== d && (h = d.$a, d.$a = !0), g(this, c, e), null !== d && (d.$a = h)); + null !== a && (this.pg !== a && Cp(a, this, e), Sp(this), this.I(vl)); + this.j("toNode", b, a); + Wl(this) + } + }); + z.defineProperty(G, { + Ug: "toPortId" + }, function() { + return this.ei + }, function(a) { + var b = this.ei; + if (b !== a) { + u && z.g(a, "string", G, "toPortId"); + var c = this.Qd; + null !== c && Bp(this.da, c); + Rp(this); + this.ei = a; + var d = this.Qd; + null !== d && Bp(this.da, d); + var e = this.h; + if (null !== e) { + var g = this.data, + h = e.ha; + null !== g && h instanceof V && h.SA(g, a) + } + c !== d && (this.Di = null, this.qc(), g = this.UF, null !== g && (h = !0, null !== e && (h = e.$a, e.$a = !0), g(this, c, d), null !== e && (e.$a = h))); + Sp(this); + this.j("toPortId", b, a) + } + }); + z.w(G, { + Qd: "toPort" + }, function() { + var a = this.Bg; + return null === a ? null : a.Gl(this.ei) + }); + z.defineProperty(G, { + UF: "toPortChanged" + }, function() { + return this.Xs + }, function(a) { + var b = this.Xs; + b !== a && (null !== a && z.g(a, "function", G, "toPortChanged"), this.Xs = a, this.j("toPortChanged", b, a)) + }); + z.defineProperty(G, { + Db: "fromSpot" + }, function() { + return null !== this.la ? this.la.Gj : Pc + }, function(a) { + this.Ue(); + var b = this.la.Gj; + b.N(a) || (u && z.l(a, Q, G, "fromSpot"), a = a.V(), this.la.Gj = a, this.j("fromSpot", b, a), this.qc()) + }); + z.defineProperty(G, { + Il: "fromEndSegmentLength" + }, function() { + return null !== this.la ? this.la.Ej : NaN + }, function(a) { + this.Ue(); + var b = this.la.Ej; + b !== a && (u && z.g(a, "number", G, "fromEndSegmentLength"), 0 > a && z.ka(a, ">= 0", G, "fromEndSegmentLength"), this.la.Ej = a, this.j("fromEndSegmentLength", b, a), this.qc()) + }); + z.defineProperty(G, { + Et: "fromEndSegmentDirection" + }, function() { + return null !== this.la ? this.la.Dj : wp + }, function(a) { + this.Ue(); + var b = this.la.Dj; + b !== a && (u && z.Ba(a, E, G, "fromEndSegmentDirection"), this.la.Dj = a, this.j("fromEndSegmentDirection", b, a), this.qc()) + }); + z.defineProperty(G, { + Ft: "fromShortLength" + }, function() { + return null !== this.la ? this.la.Fj : NaN + }, function(a) { + this.Ue(); + var b = this.la.Fj; + b !== a && (u && z.g(a, "number", G, "fromShortLength"), this.la.Fj = a, this.j("fromShortLength", b, a), this.qc()) + }); + z.defineProperty(G, { + Eb: "toSpot" + }, function() { + return null !== this.la ? this.la.gk : Pc + }, function(a) { + this.Ue(); + var b = this.la.gk; + b.N(a) || (u && z.l(a, Q, G, "toSpot"), a = a.V(), this.la.gk = a, this.j("toSpot", b, a), this.qc()) + }); + z.defineProperty(G, { + Yl: "toEndSegmentLength" + }, function() { + return null !== this.la ? this.la.ek : NaN + }, function(a) { + this.Ue(); + var b = this.la.ek; + b !== a && (u && z.g(a, "number", G, "toEndSegmentLength"), 0 > a && z.ka(a, ">= 0", G, "toEndSegmentLength"), this.la.ek = a, this.j("toEndSegmentLength", b, a), this.qc()) + }); + z.defineProperty(G, { + zu: "toEndSegmentDirection" + }, function() { + return null !== this.la ? this.la.dk : wp + }, function(a) { + this.Ue(); + var b = this.la.dk; + b !== a && (u && z.Ba(a, E, G, "toEndSegmentDirection"), this.la.dk = a, this.j("toEndSegmentDirection", b, a), this.qc()) + }); + z.defineProperty(G, { + Au: "toShortLength" + }, function() { + return null !== this.la ? this.la.fk : NaN + }, function(a) { + this.Ue(); + var b = this.la.fk; + b !== a && (u && z.g(a, "number", G, "toShortLength"), this.la.fk = a, this.j("toShortLength", b, a), this.qc()) + }); + + function Wl(a) { + var b = a.Y, + c = a.da; + null !== b ? null !== c ? Tp(a, b.DH(c)) : Tp(a, null) : Tp(a, null) + } + + function Tp(a, b) { + var c = a.Ok; + if (c !== b) { + null !== c && qp(c, a); + a.Ok = b; + null !== b && rp(b, a); + var d = a.WD; + if (null !== d) { + var e = !0, + g = a.h; + null !== g && (e = g.$a, g.$a = !0); + d(a, c, b); + null !== g && (g.$a = e) + }!a.Cg || a.hD !== c && a.jD !== c || a.qc() + } + } + G.prototype.Nl = function() { + var a = this.Va; + null !== a && this.Y !== a && this.da !== a && a.Ow && D.prototype.Nl.call(this) + }; + G.prototype.getOtherNode = G.prototype.aA = function(a) { + u && z.l(a, E, G, "getOtherNode:node"); + var b = this.Y; + return a === b ? this.da : b + }; + G.prototype.getOtherPort = function(a) { + u && z.l(a, O, G, "getOtherPort:port"); + var b = this.md; + return a === b ? this.Qd : b + }; + z.w(G, { + HK: "isLabeledLink" + }, function() { + return null === this.Ke ? !1 : 0 < this.Ke.count + }); + z.w(G, { + Hf: "labelNodes" + }, function() { + return null === this.Ke ? Pa : this.Ke.i + }); + + function Ep(a, b) { + null === a.Ke && (a.Ke = new K(E)); + a.Ke.add(b); + a.S() + } + G.prototype.Kt = function(a) { + D.prototype.Kt.call(this, a); + Up(this) && Oi(this, this.W); + a || (a = this.pg, null !== a && Cp(a, this, this.md), a = this.Bg, null !== a && Cp(a, this, this.Qd), Sp(this)) + }; + G.prototype.Lt = function(a) { + D.prototype.Lt.call(this, a); + Up(this) && Oi(this, this.W); + a || (a = this.pg, null !== a && Dp(a, this, this.md), a = this.Bg, null !== a && Dp(a, this, this.Qd), Rp(this)) + }; + G.prototype.cn = function() { + this.Cg = !0; + if (null !== this.Ke) { + var a = this.h; + if (null !== a) + for (var b = this.Ke.copy().i; b.next();) a.remove(b.value) + } + b = this.data; + null !== b && (a = this.h, null !== a && (a = a.ha, a instanceof V ? a.Dx(b) : a instanceof ng && a.Eh(b, void 0))) + }; + G.prototype.updateRelationshipsFromData = function() { + var a = this.data; + if (null !== a) { + var b = this.h; + if (null !== b) { + var c = b.ha; + if (c instanceof V) { + var d = c.Ll(a), + e = b.hf(d), + g = this.Y; + e !== g && (e = null !== g ? c.pb(g.data) : void 0, g = c.Ep, "function" === typeof g ? g(a, e) : a[g] = e, c.Kx(a, d)); + d = c.Ml(a); + e = b.hf(d); + g = this.da; + e !== g && (e = null !== g ? c.pb(g.data) : void 0, g = c.Gp, "function" === typeof g ? g(a, e) : a[g] = e, c.Ox(a, d)); + var h = c.qk(a); + if (0 < h.length || 0 < this.Hf.count) { + if (1 === h.length && 1 === this.Hf.count && (b = h[0], d = this.Hf.first(), c.pb(d.data) === + b)) return; + var d = (new K).$c(h), + k = new K; + this.Hf.each(function(a) { + null !== a.data && (a = c.pb(a.data), void 0 !== a && k.add(a)) + }); + b = k.copy(); + b.IA(d); + d = d.copy(); + d.IA(k); + if (0 < b.count || 0 < d.count) h.length = 0, k.each(function(a) { + h.push(a) + }), b.each(function(b) { + c.nF(a, b) + }), d.each(function(b) { + c.zz(a, b) + }) + } + } + } + } + }; + G.prototype.move = function(a) { + var b = this.position, + c = b.x; + isNaN(c) && (c = 0); + b = b.y; + isNaN(b) && (b = 0); + c = a.x - c; + b = a.y - b; + D.prototype.move.call(this, a); + this.Rl(c, b); + for (a = this.Hf; a.next();) { + var d = a.value, + e = d.position; + d.moveTo(e.x + c, e.y + b) + } + }; + z.defineProperty(G, { + WI: "relinkableFrom" + }, function() { + return this.ms + }, function(a) { + var b = this.ms; + b !== a && (u && z.g(a, "boolean", G, "relinkableFrom"), this.ms = a, this.j("relinkableFrom", b, a), this.ae()) + }); + z.defineProperty(G, { + XI: "relinkableTo" + }, function() { + return this.ns + }, function(a) { + var b = this.ns; + b !== a && (u && z.g(a, "boolean", G, "relinkableTo"), this.ns = a, this.j("relinkableTo", b, a), this.ae()) + }); + G.prototype.canRelinkFrom = function() { + if (!this.WI) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Tm) return !1; + a = a.h; + return null === a || a.Tm ? !0 : !1 + }; + G.prototype.canRelinkTo = function() { + if (!this.XI) return !1; + var a = this.layer; + if (null === a) return !0; + if (!a.Tm) return !1; + a = a.h; + return null === a || a.Tm ? !0 : !1 + }; + z.defineProperty(G, { + lu: "resegmentable" + }, function() { + return this.os + }, function(a) { + var b = this.os; + b !== a && (u && z.g(a, "boolean", G, "resegmentable"), this.os = a, this.j("resegmentable", b, a), this.ae()) + }); + z.defineProperty(G, { + Oc: "isTreeLink" + }, function() { + return this.tr + }, function(a) { + var b = this.tr; + b !== a && (u && z.g(a, "boolean", G, "isTreeLink"), this.tr = a, this.j("isTreeLink", b, a), null !== this.Y && hm(this.Y), null !== this.da && hm(this.da)) + }); + z.w(G, { + path: "path" + }, function() { + var a = this.gf(); + return a instanceof X ? a : null + }); + z.w(G, { + un: "routeBounds" + }, function() { + this.Bn(); + var a = new w; + var b = Infinity, + c = Infinity, + d = this.sa; + if (0 === d) a.n(NaN, NaN, 0, 0); + else { + if (1 === d) d = this.m(0), b = Math.min(d.x, b), c = Math.min(d.y, c), a.n(d.x, d.y, 0, 0); + else if (2 === d) { + var e = this.m(0), + g = this.m(1), + b = Math.min(e.x, g.x), + c = Math.min(e.y, g.y); + a.n(e.x, e.y, 0, 0); + a.vj(g) + } else if (this.computeCurve() === Ui && 3 <= d && !this.rc) + if (e = this.m(0), b = e.x, c = e.y, a.n(b, c, 0, 0), 3 === d) d = this.m(1), b = Math.min(d.x, b), c = Math.min(d.y, c), g = this.m(2), b = Math.min(g.x, b), c = Math.min(g.y, c), ve(e.x, + e.y, d.x, d.y, d.x, d.y, g.x, g.y, .5, a); + else + for (var h = 3; h < d; h += 3) { + var k = this.m(h - 2); + h + 3 >= d && (h = d - 1); + var l = this.m(h - 1), + g = this.m(h); + ve(e.x, e.y, k.x, k.y, l.x, l.y, g.x, g.y, .5, a); + b = Math.min(g.x, b); + c = Math.min(g.y, c); + e = g + } else + for (e = this.m(0), g = this.m(1), b = Math.min(e.x, g.x), c = Math.min(e.y, g.y), a.n(e.x, e.y, 0, 0), a.vj(g), h = 2; h < d; h++) e = this.m(h), b = Math.min(e.x, b), c = Math.min(e.y, c), a.vj(e); + this.pz.n(b - a.x, c - a.y) + } + return this.cw = a + }); + z.w(G, { + bF: "midPoint" + }, function() { + this.Bn(); + return this.computeMidPoint(new N) + }); + G.prototype.computeMidPoint = function(a) { + var b = this.sa; + if (0 === b) return a.assign(ee), a; + if (1 === b) return a.assign(this.m(0)), a; + if (2 === b) { + var c = this.m(0), + d = this.m(1); + a.n((c.x + d.x) / 2, (c.y + d.y) / 2); + return a + } + if (this.computeCurve() === Ui && 3 <= b && !this.rc) { + if (3 === b) return this.m(1); + var c = (b - 1) / 3 | 0, + e = 3 * (c / 2 | 0); + if (1 === c % 2) { + var c = this.m(e), + d = this.m(e + 1), + g = this.m(e + 2), + e = this.m(e + 3), + b = d.x, + h = d.y, + d = g.x, + k = g.y, + g = (b + d) / 2, + l = (h + k) / 2, + h = ((c.y + h) / 2 + l) / 2, + k = (l + (k + e.y) / 2) / 2; + a.x = (((c.x + b) / 2 + g) / 2 + (g + (d + e.x) / 2) / 2) / 2; + a.y = (h + k) / 2 + } else a.assign(this.m(e)); + return a + } + e = 0; + g = z.rb(); + for (h = 0; h < b - 1; h++) c = 0, c = this.m(h), d = this.m(h + 1), td(c.x, d.x) ? (c = d.y - c.y, 0 > c && (c = -c)) : td(c.y, d.y) ? (c = d.x - c.x, 0 > c && (c = -c)) : c = Math.sqrt(c.Af(d)), g.push(c), e += c; + for (d = h = c = 0; c < e / 2 && h < b;) { + d = g[h]; + if (c + d > e / 2) break; + c += d; + h++ + } + z.xa(g); + b = this.m(h); + g = this.m(h + 1); + b.x === g.x ? b.y > g.y ? a.n(b.x, b.y - (e / 2 - c)) : a.n(b.x, b.y + (e / 2 - c)) : b.y === g.y ? b.x > g.x ? a.n(b.x - (e / 2 - c), b.y) : a.n(b.x + (e / 2 - c), b.y) : (c = (e / 2 - c) / d, a.n(b.x + c * (g.x - b.x), b.y + c * (g.y - b.y))); + return a + }; + z.w(G, { + aF: "midAngle" + }, function() { + this.Bn(); + return this.computeMidAngle() + }); + G.prototype.computeMidAngle = function() { + var a = this.sa; + if (2 > a) return NaN; + if (this.computeCurve() === Ui && 4 <= a && !this.rc) { + var b = (a - 1) / 3 | 0, + c = 3 * (b / 2 | 0); + if (1 === b % 2) { + var c = Math.floor(c), + b = this.m(c), + d = this.m(c + 1), + a = this.m(c + 2), + c = this.m(c + 3), + e = d.x, + d = d.y, + g = a.x, + a = a.y, + h = (e + g) / 2, + k = (d + a) / 2; + return xb(((b.x + e) / 2 + h) / 2, ((b.y + d) / 2 + k) / 2, (h + (g + c.x) / 2) / 2, (k + (a + c.y) / 2) / 2) + } + if (0 < c && c + 1 < a) return b = this.m(c - 1), d = this.m(c + 1), b.Ec(d) + } + c = a / 2 | 0; + if (0 === a % 2) return b = this.m(c - 1), d = this.m(c), 4 <= a && b.Mc(d) && (b = this.m(c - 2), a = this.m(c + 1), + c = b.Af(d), e = d.Af(a), !(c > e + 10)) ? e > c + 10 ? d.Ec(a) : b.Ec(a) : b.Ec(d); + b = this.m(c - 1); + d = this.m(c); + a = this.m(c + 1); + c = b.Af(d); + e = d.Af(a); + return c > e + 10 ? b.Ec(d) : e > c + 10 ? d.Ec(a) : b.Ec(a) + }; + z.defineProperty(G, { + points: "points" + }, function() { + return this.Yc + }, function(a) { + var b = this.Yc; + if (b !== a) { + var c = null; + if (Array.isArray(a)) { + var d = 0 === a.length % 2; + if (d) + for (var e = 0; e < a.length; e++) + if ("number" !== typeof a[e] || isNaN(a[e])) { + d = !1; + break + } + if (d) + for (c = new J(N), d = 0; d < a.length / 2; d++) e = (new N(a[2 * d], a[2 * d + 1])).freeze(), c.add(e); + else { + for (var g = !0, d = 0; d < a.length; d++) + if (e = a[d], !z.Za(e) || "number" !== typeof e.x || isNaN(e.x) || "number" !== typeof e.y || isNaN(e.y)) { + g = !1; + break + } + if (g) + for (c = new J(N), d = 0; d < a.length; d++) e = + a[d], c.add((new N(e.x, e.y)).freeze()); + else z.k("Link.points array must contain only an even number of numbers or objects with x and y properties, not: " + a) + } + } else if (a instanceof J) + for (c = a.copy(), a = c.i; a.next();) a.value.freeze(); + else z.k("Link.points value is not an instance of List or Array: " + a); + c.freeze(); + this.Yc = c; + this.Ae(); + this.S(); + Vp(this); + a = this.h; + null !== a && (a.kn || a.pa.qb || a.qx.add(this), a.Ua.wc && (this.Ko = c)); + this.j("points", b, c) + } + }); + z.w(G, { + sa: "pointsCount" + }, function() { + return this.Yc.count + }); + G.prototype.getPoint = G.prototype.m = function(a) { + return this.Yc.o[a] + }; + G.prototype.setPoint = G.prototype.Kf = function(a, b) { + u && (z.l(b, N, G, "setPoint"), b.F() || z.k("Link.setPoint called with a Point that does not have real numbers: " + b.toString())); + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.Rg(a, b) + }; + G.prototype.setPointAt = G.prototype.aa = function(a, b, c) { + u && (z.p(b, G, "setPointAt:x"), z.p(c, G, "setPointAt:y")); + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.Rg(a, new N(b, c)) + }; + G.prototype.insertPoint = function(a, b) { + u && (z.l(b, N, G, "insertPoint"), b.F() || z.k("Link.insertPoint called with a Point that does not have real numbers: " + b.toString())); + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.Ld(a, b) + }; + G.prototype.insertPointAt = G.prototype.B = function(a, b, c) { + u && (z.p(b, G, "insertPointAt:x"), z.p(c, G, "insertPointAt:y")); + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.Ld(a, new N(b, c)) + }; + G.prototype.addPoint = G.prototype.gi = function(a) { + u && (z.l(a, N, G, "addPoint"), a.F() || z.k("Link.addPoint called with a Point that does not have real numbers: " + a.toString())); + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.add(a) + }; + G.prototype.addPointAt = G.prototype.sl = function(a, b) { + u && (z.p(a, G, "insertPointAt:x"), z.p(b, G, "insertPointAt:y")); + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.add(new N(a, b)) + }; + G.prototype.removePoint = G.prototype.oF = function(a) { + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.dd(a) + }; + G.prototype.clearPoints = G.prototype.fp = function() { + null === this.Me && z.k("Call Link.startRoute before modifying the points of the route."); + this.Yc.clear() + }; + G.prototype.movePoints = G.prototype.Rl = function(a, b) { + for (var c = new J(N), d = this.Yc.i; d.next();) { + var e = d.value; + c.add((new N(e.x + a, e.y + b)).freeze()) + } + c.freeze(); + d = this.Yc; + this.Yc = c; + this.S(); + Vp(this); + e = this.h; + null !== e && e.Ua.wc && (this.Ko = c); + this.j("points", d, c) + }; + G.prototype.startRoute = G.prototype.Ul = function() { + null === this.Me && (this.Me = this.Yc, this.Yc = this.Yc.copy()) + }; + G.prototype.commitRoute = G.prototype.cj = function() { + if (null !== this.Me) { + for (var a = this.Me, b = this.Yc, c = Infinity, d = Infinity, e = a.o, g = e.length, h = 0; h < g; h++) var k = e[h], + c = Math.min(k.x, c), + d = Math.min(k.y, d); + for (var l = Infinity, m = Infinity, n = b.o, p = n.length, h = 0; h < p; h++) k = n[h], l = Math.min(k.x, l), m = Math.min(k.y, m), k.freeze(); + b.freeze(); + if (p === g) + for (h = 0; h < p; h++) { + if (g = e[h], k = n[h], g.x - c !== k.x - l || g.y - d !== k.y - m) { + this.S(); + this.Ae(); + break + } + } else this.S(), this.Ae(); + this.Me = null; + c = this.h; + null !== c && c.Ua.wc && (this.Ko = b); + Vp(this); + this.j("points", a, b) + } + }; + G.prototype.rollbackRoute = G.prototype.$I = function() { + null !== this.Me && (this.Yc = this.Me, this.Me = null) + }; + + function Vp(a) { + 0 === a.Yc.count ? a.Cg = !1 : (a.Cg = !0, a.Vn = a.m(0).copy(), a.Zn = a.m(a.sa - 1).copy(), Wp(a, !1)) + } + G.prototype.invalidateRoute = G.prototype.qc = function() { + if (!this.mz) { + var a = this.h; + a && (a.qx.contains(this) || a.pa.qb || a.Ua.kI && !a.Ua.nf) || (a = this.path, null !== a && (this.Cg = !1, this.S(), a.S())) + } + }; + z.defineProperty(G, { + eq: "suspendsRouting" + }, function() { + return this.mz + }, function(a) { + this.mz = a + }); + G.prototype.updateRoute = G.prototype.Bn = function() { + if (!this.Cg && !this.sy) { + var a = !0; + try { + this.sy = !0, this.Ul(), a = this.computePoints() + } finally { + this.sy = !1, a ? this.cj() : this.$I() + } + } + }; + G.prototype.computePoints = function() { + var a = this.h; + if (null === a) return !1; + var b = this.Y, + c = null; + null === b ? (a.Em || (a.dw = new X, a.dw.Aa = Pd, a.dw.ub = 0, a.Em = new E, a.Em.add(a.dw), a.Em.Bf()), this.Vn && (a.Em.position = a.Em.location = this.Vn, a.Em.Bf(), b = a.Em, c = a.dw)) : c = this.md; + if (null !== c && !b.isVisible()) { + var d = b.findVisibleNode(); + null !== d && d !== b ? (b = d, c = d.Gl("")) : b = d + } + this.hD = b; + if (null === b || !b.location.F()) return !1; + for (; !(null === c || c.W.F() && c.nj());) c = c.U; + if (null === c) return !1; + var d = this.da, + e = null; + null === d ? (a.Fm || (a.ew = + new X, a.ew.Aa = Pd, a.ew.ub = 0, a.Fm = new E, a.Fm.add(a.ew), a.Fm.Bf()), this.Zn && (a.Fm.position = a.Fm.location = this.Zn, a.Fm.Bf(), d = a.Fm, e = a.ew)) : e = this.Qd; + null === e || d.isVisible() || (a = d.findVisibleNode(), null !== a && a !== d ? (d = a, e = a.Gl("")) : d = a); + this.jD = d; + if (null === d || !d.location.F()) return !1; + for (; !(null === e || e.W.F() && e.nj());) e = e.U; + if (null === e) return !1; + var a = this.sa, + g = Xp(this, c), + h = Yp(this, e), + k = c === e && null !== c, + l = this.rc, + m = this.Se === Ui; + this.Di = k && !l ? m = !0 : !1; + var n = this.it === Ni || k; + if (l || g !== Yb || h !== Yb || k) { + m = this.jj; + n && (l && m || k) && this.fp(); + var p = k ? this.computeCurviness() : 0, + q = this.getLinkPoint(b, c, g, !0, l, d, e), + r = 0, + s = 0, + t = 0; + if (l || g !== Yb || k) { + var v = this.computeEndSegmentLength(b, c, g, !0), + t = this.getLinkDirection(b, c, q, g, !0, l, d, e); + k && (t -= l ? 90 : 30, 0 > p && (t -= 180)); + 0 > t ? t += 360 : 360 <= t && (t -= 360); + k && (v += Math.abs(p)); + 0 === t ? r = v : 90 === t ? s = v : 180 === t ? r = -v : 270 === t ? s = -v : (r = v * Math.cos(t * Math.PI / 180), s = v * Math.sin(t * Math.PI / 180)); + if (g.Be() && k) { + var x = c.fb(ec, z.O()), + y = z.Tb(x.x + 1E3 * r, x.y + 1E3 * s); + this.getLinkPointFromPoint(b, c, x, y, !0, q); + z.A(x); + z.A(y) + } + } + var v = this.getLinkPoint(d, e, h, !1, l, b, c), + A = 0, + B = 0, + L = 0; + if (l || h !== Yb || k) x = this.computeEndSegmentLength(d, e, h, !1), L = this.getLinkDirection(d, e, v, h, !1, l, b, c), k && (L += l ? 0 : 30, 0 > p && (L += 180)), 0 > L ? L += 360 : 360 <= L && (L -= 360), k && (x += Math.abs(p)), 0 === L ? A = x : 90 === L ? B = x : 180 === L ? A = -x : 270 === L ? B = -x : (A = x * Math.cos(L * Math.PI / 180), B = x * Math.sin(L * Math.PI / 180)), h.Be() && k && (x = e.fb(ec, z.O()), y = z.Tb(x.x + 1E3 * A, x.y + 1E3 * B), this.getLinkPointFromPoint(d, e, x, y, !1, v), z.A(x), z.A(y)); + e = q; + if (l || g !== Yb || k) e = new N(q.x + r, q.y + s); + c = v; + if (l || + h !== Yb || k) c = new N(v.x + A, v.y + B); + !n && !l && g === Yb && 3 < a && this.adjustPoints(0, q, a - 2, c) ? this.Kf(a - 1, v) : !n && !l && h === Yb && 3 < a && this.adjustPoints(1, e, a - 1, v) ? this.Kf(0, q) : !n && !l && 4 < a && this.adjustPoints(1, e, a - 2, c) ? (this.Kf(0, q), this.Kf(a - 1, v)) : !n && l && 6 <= a && !m && this.adjustPoints(1, e, a - 2, c) ? (this.Kf(0, q), this.Kf(a - 1, v)) : (this.fp(), this.gi(q), (l || g !== Yb || k) && this.gi(e), l && this.addOrthoPoints(e, t, c, L, b, d), (l || h !== Yb || k) && this.gi(c), this.gi(v)) + } else g = !1, !n && 3 <= a && (n = this.getLinkPoint(b, c, Yb, !0, !1, d, e), h = this.getLinkPoint(d, + e, Yb, !1, !1, b, c), g = this.adjustPoints(0, n, a - 1, h)) && (n = this.getLinkPoint(b, c, Yb, !0, !1, d, e), h = this.getLinkPoint(d, e, Yb, !1, !1, b, c), this.adjustPoints(0, n, a - 1, h)), g || (this.fp(), m ? (a = this.getLinkPoint(b, c, Yb, !0, !1, d, e), n = this.getLinkPoint(d, e, Yb, !1, !1, b, c), g = n.x - a.x, h = n.y - a.y, k = this.computeCurviness(), m = l = 0, q = a.x + g / 3, t = a.y + h / 3, r = q, s = t, eb(h, 0) ? s = 0 < g ? s - k : s + k : (l = -g / h, m = Math.sqrt(k * k / (l * l + 1)), 0 > k && (m = -m), r = (0 > h ? -1 : 1) * m + q, s = l * (r - q) + t), q = a.x + 2 * g / 3, t = a.y + 2 * h / 3, v = q, A = t, eb(h, 0) ? A = 0 < g ? A - k : A + k : (v = (0 > h ? -1 : 1) * m + q, A = l * + (v - q) + t), this.fp(), this.gi(a), this.sl(r, s), this.sl(v, A), this.gi(n), this.Kf(0, this.getLinkPoint(b, c, Yb, !0, !1, d, e)), this.Kf(3, this.getLinkPoint(d, e, Yb, !1, !1, b, c))) : (a = d, d = this.getLinkPoint(b, c, Yb, !0, !1, a, e), e = this.getLinkPoint(a, e, Yb, !1, !1, b, c), this.hasCurviness() ? (h = e.x - d.x, b = e.y - d.y, c = this.computeCurviness(), a = d.x + h / 2, n = d.y + b / 2, g = a, k = n, eb(b, 0) ? k = 0 < h ? k - c : k + c : (h = -h / b, g = Math.sqrt(c * c / (h * h + 1)), 0 > c && (g = -g), g = (0 > b ? -1 : 1) * g + a, k = h * (g - a) + n), this.gi(d), this.sl(g, k)) : this.gi(d), this.gi(e))); + return !0 + }; + + function Zp(a, b) { + Math.abs(b.x - a.x) > Math.abs(b.y - a.y) ? (b.x = b.x >= a.x ? a.x + 9E9 : a.x - 9E9, b.y = a.y) : (b.y = b.y >= a.y ? a.y + 9E9 : a.y - 9E9, b.x = a.x); + return b + } + G.prototype.getLinkPointFromPoint = function(a, b, c, d, e, g) { + void 0 === g && (g = new N); + if (null === a || null === b) return g.assign(c), g; + a.isVisible() || (e = a.findVisibleNode(), null !== e && e !== a && (b = e.port)); + var h = e = 0, + k = 0, + l = 0; + a = null; + e = b.U; + null === e || e.Vg() || (e = e.U); + if (null === e) e = d.x, h = d.y, k = c.x, l = c.y; + else { + a = e.ph; + e = 1 / (a.m11 * a.m22 - a.m12 * a.m21); + var k = a.m22 * e, + l = -a.m12 * e, + m = -a.m21 * e, + n = a.m11 * e, + p = e * (a.m21 * a.dy - a.m22 * a.dx), + q = e * (a.m12 * a.dx - a.m11 * a.dy); + e = d.x * k + d.y * m + p; + h = d.x * l + d.y * n + q; + k = c.x * k + c.y * m + p; + l = c.x * l + c.y * n + q + } + b.tp(e, h, k, l, + g); + null !== a && g.transform(a); + return g + }; + + function $p(a, b) { + var c = b.gs; + null === c && (c = new aq, c.port = b, c.Pc = b.ca, b.gs = c); + return bq(c, a) + } + G.prototype.getLinkPoint = function(a, b, c, d, e, g, h, k) { + void 0 === k && (k = new N); + if (c.cd()) return b.fb(c, k), k; + if (c.kj() && (c = $p(this, b), null !== c)) { + k.assign(c.Fp); + if (e && this.Gx === Jp) { + var l = $p(this, h); + if (null !== l && c.an < l.an) { + c = z.O(); + var l = z.O(), + m = new w(b.fb(Zb, c), b.fb(ic, l)), + n = this.computeSpot(!d); + a = this.getLinkPoint(g, h, n, !d, e, a, b, l); + a.x >= m.x && a.x <= m.x + m.width ? k.x = a.x : a.y >= m.y && a.y <= m.y + m.height && (k.y = a.y); + z.A(c); + z.A(l) + } + } + return k + } + g = b.fb(ec, z.O()); + l = c = null; + this.sa > (e ? 6 : 2) ? (l = d ? this.m(1) : this.m(this.sa - 2), e && + (l = Zp(g, l.copy()))) : (c = z.O(), l = h.fb(ec, c), e && (l = Zp(g, l)), z.A(c)); + this.getLinkPointFromPoint(a, b, g, l, d, k); + z.A(g); + return k + }; + G.prototype.getLinkDirection = function(a, b, c, d, e, g, h, k) { + a: if (d.cd()) c = d.x > d.y ? d.x > 1 - d.y ? 0 : d.x < 1 - d.y ? 270 : 315 : d.x < d.y ? d.x > 1 - d.y ? 90 : d.x < 1 - d.y ? 180 : 135 : .5 > d.x ? 225 : .5 < d.x ? 45 : 0; + else { + if (d.kj()) { + var l = $p(this, b); + if (null !== l) switch (l.se) { + case z.pd: + c = 270; + break a; + case z.Tc: + c = 180; + break a; + default: + case z.fd: + c = 0; + break a; + case z.ed: + c = 90; + break a + } + } + var l = b.fb(ec, z.O()), + m = null, + n = null; + this.sa > (g ? 6 : 2) ? (n = e ? this.m(1) : this.m(this.sa - 2), n = g ? Zp(l, n.copy()) : c) : (m = z.O(), n = k.fb(ec, m), z.A(m)); + c = 0; + c = Math.abs(n.x - l.x) > Math.abs(n.y - + l.y) ? n.x >= l.x ? 0 : 180 : n.y >= l.y ? 90 : 270; + z.A(l) + }d.Be() && h.li(a) && (c += 180, 360 <= c && (c -= 360));a = wp;a = e ? this.Et : this.zu;a === wp && (a = e ? b.Et : b.zu); + switch (a) { + case xp: + b = b.Kl(); + c += b; + 360 <= c && (c -= 360); + break; + case wp: + case Gm: + b = b.Kl(); + if (0 === b) break; + 45 <= b && 135 > b ? c += 90 : 135 <= b && 225 > b ? c += 180 : 225 <= b && 315 > b && (c += 270); + 360 <= c && (c -= 360) + } + return c + }; + G.prototype.computeEndSegmentLength = function(a, b, c, d) { + if (null !== b && c.kj() && (a = $p(this, b), null !== a)) return a.Uw; + a = NaN; + a = d ? this.Il : this.Yl; + null !== b && isNaN(a) && (a = d ? b.Il : b.Yl); + isNaN(a) && (a = 10); + return a + }; + G.prototype.computeSpot = function(a) { + return a ? Xp(this, this.md) : Yp(this, this.Qd) + }; + + function Xp(a, b) { + if (null === b) return ec; + var c = a.Db; + c.bd() && (void 0 === b && (b = a.md), null !== b && (c = b.Db)); + return c === Pc ? Yb : c + } + + function Yp(a, b) { + if (null === b) return ec; + var c = a.Eb; + c.bd() && (void 0 === b && (b = a.Qd), null !== b && (c = b.Eb)); + return c === Pc ? Yb : c + } + G.prototype.computeOtherPoint = function(a, b) { + var c = b.fb(ec), + d; + d = b.gs; + d = null !== d ? bq(d, this) : null; + null !== d && (c = d.Fp); + return c + }; + G.prototype.computeShortLength = function(a) { + return a ? cq(this) : dq(this) + }; + + function cq(a) { + var b = a.Ft; + isNaN(b) && (a = a.md, null !== a && (b = a.Ft)); + return isNaN(b) ? 0 : b + } + + function dq(a) { + var b = a.Au; + isNaN(b) && (a = a.Qd, null !== a && (b = a.Au)); + return isNaN(b) ? 0 : b + } + G.prototype.ok = function(a, b, c, d, e, g) { + if (!1 === this.ig) return !1; + void 0 === b && (b = null); + void 0 === c && (c = null); + var h = g; + void 0 === g && (h = z.Fh(), h.reset()); + h.multiply(this.transform); + if (this.Ym(a, h)) return ko(this, b, c, e), void 0 === g && z.jf(h), !0; + if (this.Ig(a, h)) { + var k = !1; + if (!this.dh) + for (var l = this.va.o, m = l.length; m--;) { + var n = l[m]; + if (n.visible || n === this.Zb) { + var p = n.W, + q = this.Ga; + if (!(p.x > q.width || p.y > q.height || 0 > p.x + p.width || 0 > p.y + p.height)) { + p = z.Fh(); + p.set(h); + if (n instanceof I) k = n.ok(a, b, c, d, e, p); + else if (this.path === + n) { + var k = n, + r = a, + s = d, + q = p; + if (!1 === k.ig) k = !1; + else if (q.multiply(k.transform), s) b: { + var t = r, + v = q; + if (k.Ym(t, v)) k = !0; + else { + if (void 0 === v && (v = k.transform, t.mk(k.W))) { + k = !0; + break b + } + var q = t.left, + r = t.right, + s = t.top, + t = t.bottom, + x = z.O(), + y = z.O(), + A = z.O(), + B = z.Fh(); + B.set(v); + B.vA(k.transform); + B.fA(); + y.x = r; + y.y = s; + y.transform(B); + x.x = q; + x.y = s; + x.transform(B); + v = !1; + vo(k, x, y, A) ? v = !0 : (x.x = r, x.y = t, x.transform(B), vo(k, x, y, A) ? v = !0 : (y.x = q, y.y = t, y.transform(B), vo(k, x, y, A) ? v = !0 : (x.x = q, x.y = s, x.transform(B), vo(k, x, y, A) && (v = !0)))); + z.jf(B); + z.A(x); + z.A(y); + z.A(A); + k = v + } + } + else k = k.Ym(r, q) + } else k = Lm(n, a, d, p); + k && (null !== b && (n = b(n)), n && (null === c || c(n)) && e.add(n)); + z.jf(p) + } + } + } + void 0 === g && z.jf(h); + return k || null !== this.background || null !== this.vl + } + void 0 === g && z.jf(h); + return !1 + }; + z.w(G, { + rc: "isOrthogonal" + }, function() { + return 2 === (this.Dm.value & 2) + }); + z.w(G, { + jj: "isAvoiding" + }, function() { + return 4 === (this.Dm.value & 4) + }); + G.prototype.computeCurve = function() { + if (null === this.Di) { + var a = this.md, + b = this.rc; + this.Di = null !== a && a === this.Qd && !b + } + return this.Di ? Ui : this.Se + }; + G.prototype.computeCorner = function() { + if (this.Se === Ui) return 0; + var a = this.Kz; + if (isNaN(a) || 0 > a) a = 10; + return a + }; + G.prototype.findMidLabel = function() { + for (var a = this.path, b = this.va.o, c = b.length, d = 0; d < c; d++) { + var e = b[d]; + if (e !== a && !e.Ff && (-Infinity === e.De || isNaN(e.De))) return e + } + for (a = this.Hf; a.next();) + if (b = a.value, -Infinity === b.De || isNaN(b.De)) return b; + return null + }; + G.prototype.computeSpacing = function() { + if (!this.isVisible()) return 0; + var a; + a = Math.max(14, this.computeThickness()); + var b = this.md, + c = this.Qd; + if (null !== b && null !== c) { + var d = this.findMidLabel(); + if (null !== d) { + var e = d.Ga, + g = d.margin, + h = isNaN(e.width) ? 30 : e.width * d.scale + g.left + g.right, + e = isNaN(e.height) ? 14 : e.height * d.scale + g.top + g.bottom, + d = d.pu; + d === yo || d === Np || d === Mp ? a = Math.max(a, e) : d === Lp || d === Pp || d === Kp || d === Op ? a = Math.max(a, h) : (b = b.fb(ec).Ec(c.fb(ec)) / 180 * Math.PI, a = Math.max(a, Math.abs(Math.sin(b) * h) + Math.abs(Math.cos(b) * + e) + 1)); + this.Se === Ui && (a *= 1.333) + } + } + return a + }; + G.prototype.arrangeBundledLinks = function(a, b) { + if (b) + for (var c = 0; c < a.length; c++) a[c].qc() + }; + G.prototype.computeCurviness = function() { + var a = this.Qw; + if (isNaN(a)) { + var a = 16, + b = this.ri; + if (null !== b) { + for (var c = z.rb(), d = 0, e = b.links, g = 0; g < e.length; g++) { + var h = e[g], + h = h.computeSpacing(); + c.push(h); + d += h + } + d = -d / 2; + for (g = 0; g < e.length; g++) { + h = e[g]; + if (h === this) { + a = d + c[g] / 2; + break + } + d += c[g] + } + b.Op === this.Y && (a = -a); + z.xa(c) + } + } + return a + }; + G.prototype.computeThickness = function() { + if (!this.isVisible()) return 0; + var a = this.path; + return null !== a ? Math.max(a.ub, 1) : 1 + }; + G.prototype.hasCurviness = function() { + return !isNaN(this.Qw) || null !== this.ri + }; + G.prototype.adjustPoints = function(a, b, c, d) { + var e = this.it; + if (this.rc) { + if (e === ln) return !1; + e === mn && (e = kn) + } + switch (e) { + case ln: + var g = this.m(a), + h = this.m(c); + if (!g.Mc(b) || !h.Mc(d)) { + var e = g.x, + g = g.y, + k = h.x - e, + l = h.y - g, + m = Math.sqrt(k * k + l * l); + if (!td(m, 0)) { + var n = 0; + td(k, 0) ? n = 0 > l ? -Math.PI / 2 : Math.PI / 2 : (n = Math.atan(l / Math.abs(k)), 0 > k && (n = Math.PI - n)); + var h = b.x, + p = b.y, + l = d.x - h, + q = d.y - p, + r = Math.sqrt(l * l + q * q), + k = 0; + td(l, 0) ? k = 0 > q ? -Math.PI / 2 : Math.PI / 2 : (k = Math.atan(q / Math.abs(l)), 0 > l && (k = Math.PI - k)); + m = r / m; + n = k - n; + this.Kf(a, b); + for (a += + 1; a < c; a++) b = this.m(a), k = b.x - e, l = b.y - g, b = Math.sqrt(k * k + l * l), td(b, 0) || (q = 0, td(k, 0) ? q = 0 > l ? -Math.PI / 2 : Math.PI / 2 : (q = Math.atan(l / Math.abs(k)), 0 > k && (q = Math.PI - q)), k = q + n, b *= m, this.aa(a, h + b * Math.cos(k), p + b * Math.sin(k))); + this.Kf(c, d) + } + } + return !0; + case mn: + g = this.m(a); + p = this.m(c); + if (!g.Mc(b) || !p.Mc(d)) { + var e = g.x, + g = g.y, + h = p.x, + p = p.y, + m = (h - e) * (h - e) + (p - g) * (p - g), + k = b.x, + n = b.y, + l = d.x, + q = d.y, + r = 0, + s = 1; + 0 !== l - k ? (r = (q - n) / (l - k), s = Math.sqrt(1 + 1 / (r * r))) : r = 9E9; + this.Kf(a, b); + for (a += 1; a < c; a++) { + b = this.m(a); + var t = b.x, + v = b.y, + x = .5; + 0 !== m && (x = + ((e - t) * (e - h) + (g - v) * (g - p)) / m); + var y = e + x * (h - e), + A = g + x * (p - g); + b = Math.sqrt((t - y) * (t - y) + (v - A) * (v - A)); + v < r * (t - y) + A && (b = -b); + 0 < r && (b = -b); + t = k + x * (l - k); + x = n + x * (q - n); + 0 !== r ? (b = t + b / s, this.aa(a, b, x - (b - t) / r)) : this.aa(a, t, x + b) + } + this.Kf(c, d) + } + return !0; + case kn: + return this.rc && (e = this.m(a), g = this.m(a + 1), h = this.m(a + 2), eb(e.y, g.y) ? eb(g.x, h.x) ? this.aa(a + 1, g.x, b.y) : eb(g.y, h.y) && this.aa(a + 1, b.x, g.y) : eb(e.x, g.x) && (eb(g.y, h.y) ? this.aa(a + 1, b.x, g.y) : eb(g.x, h.x) && this.aa(a + 1, g.x, b.y)), e = this.m(c), g = this.m(c - 1), h = this.m(c - 2), eb(e.y, + g.y) ? eb(g.x, h.x) ? this.aa(c - 1, g.x, d.y) : eb(g.y, h.y) && this.aa(c - 1, d.x, g.y) : eb(e.x, g.x) && (eb(g.y, h.y) ? this.aa(c - 1, d.x, g.y) : eb(g.x, h.x) && this.aa(c - 1, g.x, d.y))), this.Kf(a, b), this.Kf(c, d), !0; + default: + return !1 + } + }; + G.prototype.addOrthoPoints = function(a, b, c, d, e, g) { + b = -45 <= b && 45 > b ? 0 : 45 <= b && 135 > b ? 90 : 135 <= b && 225 > b ? 180 : 270; + d = -45 <= d && 45 > d ? 0 : 45 <= d && 135 > d ? 90 : 135 <= d && 225 > d ? 180 : 270; + var h = e.W.copy(), + k = g.W.copy(); + if (h.F() && k.F()) { + h.ag(8, 8); + k.ag(8, 8); + h.vj(a); + k.vj(c); + var l, m; + if (0 === b) + if (c.x > a.x || 270 === d && c.y < a.y && k.right > a.x || 90 === d && c.y > a.y && k.right > a.x) l = new N(c.x, a.y), m = new N(c.x, (a.y + c.y) / 2), 180 === d ? (l.x = this.computeMidOrthoPosition(a.x, c.x, !1), m.x = l.x, m.y = c.y) : 270 === d && c.y < a.y || 90 === d && c.y > a.y ? (l.x = a.x < k.left ? this.computeMidOrthoPosition(a.x, + k.left, !1) : a.x < k.right && (270 === d && a.y < k.top || 90 === d && a.y > k.bottom) ? this.computeMidOrthoPosition(a.x, c.x, !1) : k.right, m.x = l.x, m.y = c.y) : 0 === d && a.x < k.left && a.y > k.top && a.y < k.bottom && (l.x = a.x, l.y = a.y < c.y ? Math.min(c.y, k.top) : Math.max(c.y, k.bottom), m.y = l.y); + else { + l = new N(a.x, c.y); + m = new N((a.x + c.x) / 2, c.y); + if (180 === d || 90 === d && c.y < h.top || 270 === d && c.y > h.bottom) 180 === d && (k.Ma(a) || h.Ma(c)) ? l.y = this.computeMidOrthoPosition(a.y, c.y, !0) : c.y < a.y && (180 === d || 90 === d) ? l.y = this.computeMidOrthoPosition(h.top, Math.max(c.y, + k.bottom), !0) : c.y > a.y && (180 === d || 270 === d) && (l.y = this.computeMidOrthoPosition(h.bottom, Math.min(c.y, k.top), !0)), m.x = c.x, m.y = l.y; + if (l.y > h.top && l.y < h.bottom) + if (c.x >= h.left && c.x <= a.x || a.x <= k.right && a.x >= c.x) { + if (90 === d || 270 === d) l = new N(Math.max((a.x + c.x) / 2, a.x), a.y), m = new N(l.x, c.y) + } else l.y = 270 === d || (0 === d || 180 === d) && c.y < a.y ? Math.min(c.y, 0 === d ? h.top : Math.min(h.top, k.top)) : Math.max(c.y, 0 === d ? h.bottom : Math.max(h.bottom, k.bottom)), m.x = c.x, m.y = l.y + } + else if (180 === b) + if (c.x < a.x || 270 === d && c.y < a.y && k.left < a.x || + 90 === d && c.y > a.y && k.left < a.x) l = new N(c.x, a.y), m = new N(c.x, (a.y + c.y) / 2), 0 === d ? (l.x = this.computeMidOrthoPosition(a.x, c.x, !1), m.x = l.x, m.y = c.y) : 270 === d && c.y < a.y || 90 === d && c.y > a.y ? (l.x = a.x > k.right ? this.computeMidOrthoPosition(a.x, k.right, !1) : a.x > k.left && (270 === d && a.y < k.top || 90 === d && a.y > k.bottom) ? this.computeMidOrthoPosition(a.x, c.x, !1) : k.left, m.x = l.x, m.y = c.y) : 180 === d && a.x > k.right && a.y > k.top && a.y < k.bottom && (l.x = a.x, l.y = a.y < c.y ? Math.min(c.y, k.top) : Math.max(c.y, k.bottom), m.y = l.y); + else { + l = new N(a.x, c.y); + m = new N((a.x + + c.x) / 2, c.y); + if (0 === d || 90 === d && c.y < h.top || 270 === d && c.y > h.bottom) 0 === d && (k.Ma(a) || h.Ma(c)) ? l.y = this.computeMidOrthoPosition(a.y, c.y, !0) : c.y < a.y && (0 === d || 90 === d) ? l.y = this.computeMidOrthoPosition(h.top, Math.max(c.y, k.bottom), !0) : c.y > a.y && (0 === d || 270 === d) && (l.y = this.computeMidOrthoPosition(h.bottom, Math.min(c.y, k.top), !0)), m.x = c.x, m.y = l.y; + if (l.y > h.top && l.y < h.bottom) + if (c.x <= h.right && c.x >= a.x || a.x >= k.left && a.x <= c.x) { + if (90 === d || 270 === d) l = new N(Math.min((a.x + c.x) / 2, a.x), a.y), m = new N(l.x, c.y) + } else l.y = 270 === + d || (0 === d || 180 === d) && c.y < a.y ? Math.min(c.y, 180 === d ? h.top : Math.min(h.top, k.top)) : Math.max(c.y, 180 === d ? h.bottom : Math.max(h.bottom, k.bottom)), m.x = c.x, m.y = l.y + } + else if (90 === b) + if (c.y > a.y || 180 === d && c.x < a.x && k.bottom > a.y || 0 === d && c.x > a.x && k.bottom > a.y) l = new N(a.x, c.y), m = new N((a.x + c.x) / 2, c.y), 270 === d ? (l.y = this.computeMidOrthoPosition(a.y, c.y, !0), m.x = c.x, m.y = l.y) : 180 === d && c.x < a.x || 0 === d && c.x > a.x ? (l.y = a.y < k.top ? this.computeMidOrthoPosition(a.y, k.top, !0) : a.y < k.bottom && (180 === d && a.x < k.left || 0 === d && a.x > k.right) ? + this.computeMidOrthoPosition(a.y, c.y, !0) : k.bottom, m.x = c.x, m.y = l.y) : 90 === d && a.y < k.top && a.x > k.left && a.x < k.right && (l.x = a.x < c.x ? Math.min(c.x, k.left) : Math.max(c.x, k.right), l.y = a.y, m.x = l.x); + else { + l = new N(c.x, a.y); + m = new N(c.x, (a.y + c.y) / 2); + if (270 === d || 0 === d && c.x < h.left || 180 === d && c.x > h.right) 270 === d && (k.Ma(a) || h.Ma(c)) ? l.x = this.computeMidOrthoPosition(a.x, c.x, !1) : c.x < a.x && (270 === d || 0 === d) ? l.x = this.computeMidOrthoPosition(h.left, Math.max(c.x, k.right), !1) : c.x > a.x && (270 === d || 180 === d) && (l.x = this.computeMidOrthoPosition(h.right, + Math.min(c.x, k.left), !1)), m.x = l.x, m.y = c.y; + if (l.x > h.left && l.x < h.right) + if (c.y >= h.top && c.y <= a.y || a.y <= k.bottom && a.y >= c.y) { + if (0 === d || 180 === d) l = new N(a.x, Math.max((a.y + c.y) / 2, a.y)), m = new N(c.x, l.y) + } else l.x = 180 === d || (90 === d || 270 === d) && c.x < a.x ? Math.min(c.x, 90 === d ? h.left : Math.min(h.left, k.left)) : Math.max(c.x, 90 === d ? h.right : Math.max(h.right, k.right)), m.x = l.x, m.y = c.y + } + else if (c.y < a.y || 180 === d && c.x < a.x && k.top < a.y || 0 === d && c.x > a.x && k.top < a.y) l = new N(a.x, c.y), m = new N((a.x + c.x) / 2, c.y), 90 === d ? (l.y = this.computeMidOrthoPosition(a.y, + c.y, !0), m.x = c.x, m.y = l.y) : 180 === d && c.x < a.x || 0 === d && c.x >= a.x ? (l.y = a.y > k.bottom ? this.computeMidOrthoPosition(a.y, k.bottom, !0) : a.y > k.top && (180 === d && a.x < k.left || 0 === d && a.x > k.right) ? this.computeMidOrthoPosition(a.y, c.y, !0) : k.top, m.x = c.x, m.y = l.y) : 270 === d && a.y > k.bottom && a.x > k.left && a.x < k.right && (l.x = a.x < c.x ? Math.min(c.x, k.left) : Math.max(c.x, k.right), l.y = a.y, m.x = l.x); + else { + l = new N(c.x, a.y); + m = new N(c.x, (a.y + c.y) / 2); + if (90 === d || 0 === d && c.x < h.left || 180 === d && c.x > h.right) 90 === d && (k.Ma(a) || h.Ma(c)) ? l.x = this.computeMidOrthoPosition(a.x, + c.x, !1) : c.x < a.x && (90 === d || 0 === d) ? l.x = this.computeMidOrthoPosition(h.left, Math.max(c.x, k.right), !1) : c.x > a.x && (90 === d || 180 === d) && (l.x = this.computeMidOrthoPosition(h.right, Math.min(c.x, k.left), !1)), m.x = l.x, m.y = c.y; + if (l.x > h.left && l.x < h.right) + if (c.y <= h.bottom && c.y >= a.y || a.y >= k.top && a.y <= c.y) { + if (0 === d || 180 === d) l = new N(a.x, Math.min((a.y + c.y) / 2, a.y)), m = new N(c.x, l.y) + } else l.x = 180 === d || (90 === d || 270 === d) && c.x < a.x ? Math.min(c.x, 270 === d ? h.left : Math.min(h.left, k.left)) : Math.max(c.x, 270 === d ? h.right : Math.max(h.right, + k.right)), m.x = l.x, m.y = c.y + } + var n = l, + p = m; + if (this.jj) { + var q = this.h, + r; + (r = null === q) || (q.Ua.nf ? r = !1 : (r = q.eb, r = r instanceof ih ? !r.tw || r.dI : !0), r = !r); + if (r || h.Ma(c) && !g.li(e) || k.Ma(a) && !e.li(g) || e === g || this.layer.Nc) a = !1; + else if (e = ja(q, !0, this.Va, null), e.Dp(Math.min(a.x, n.x), Math.min(a.y, n.y), Math.abs(a.x - n.x), Math.abs(a.y - n.y)) && e.Dp(Math.min(n.x, p.x), Math.min(n.y, p.y), Math.abs(n.x - p.x), Math.abs(n.y - p.y)) && e.Dp(Math.min(p.x, c.x), Math.min(p.y, c.y), Math.abs(p.x - c.x), Math.abs(p.y - c.y))) a = !1; + else if (h = h.copy().qi(k), + h.ag(2 * e.ep, 2 * e.cp), eq(e, a, b, c, d, h), k = fq(e, c.x, c.y), e.abort || 999999 !== k || (lm(e), k = e.NF, h.ag(e.ep * k, e.cp * k), eq(e, a, b, c, d, h), k = fq(e, c.x, c.y)), e.abort || 999999 !== k || (lm(e), k = e.WE, h.ag(e.ep * k, e.cp * k), eq(e, a, b, c, d, h), k = fq(e, c.x, c.y)), !e.abort && 999999 === k && e.gG && (lm(e), eq(e, a, b, c, d, e.vb), k = fq(e, c.x, c.y)), !e.abort && 999999 > k && 0 !== fq(e, c.x, c.y)) { + gq(this, e, c.x, c.y, d, !0); + d = this.m(2); + if (4 > this.sa) 0 === b || 180 === b ? (d.x = a.x, d.y = c.y) : (d.x = c.x, d.y = a.y), this.aa(2, d.x, d.y), this.B(3, d.x, d.y); + else if (c = this.m(3), 0 === b || + 180 === b) eb(d.x, c.x) ? (b = 0 === b ? Math.max(d.x, a.x) : Math.min(d.x, a.x), this.aa(2, b, a.y), this.aa(3, b, c.y)) : eb(d.y, c.y) ? (Math.abs(a.y - d.y) <= e.cp / 2 && (this.aa(2, d.x, a.y), this.aa(3, c.x, a.y)), this.B(2, d.x, a.y)) : this.aa(2, a.x, d.y); + else if (90 === b || 270 === b) eb(d.y, c.y) ? (b = 90 === b ? Math.max(d.y, a.y) : Math.min(d.y, a.y), this.aa(2, a.x, b), this.aa(3, c.x, b)) : eb(d.x, c.x) ? (Math.abs(a.x - d.x) <= e.ep / 2 && (this.aa(2, a.x, d.y), this.aa(3, a.x, c.y)), this.B(2, a.x, d.y)) : this.aa(2, d.x, a.y); + a = !0 + } else a = !1 + } else a = !1; + a || (this.gi(l), this.gi(m)) + } + }; + G.prototype.computeMidOrthoPosition = function(a, b) { + if (this.hasCurviness()) { + var c = this.computeCurviness(); + return (a + b) / 2 + c + } + return (a + b) / 2 + }; + + function Wh(a) { + if (null === a.h || !a.jj) return !1; + var b = a.points.o, + c = b.length; + if (4 > c) return !1; + a = ja(a.h, !0, a.Va, null); + for (var d = 1; d < c - 2; d++) { + var e = b[d], + g = b[d + 1]; + if (!a.Dp(Math.min(e.x, g.x), Math.min(e.y, g.y), Math.abs(e.x - g.x), Math.abs(e.y - g.y))) return !0 + } + return !1 + } + + function gq(a, b, c, d, e, g) { + var h = b.ep, + k = b.cp, + l = fq(b, c, d), + m = c, + n = d; + for (0 === e ? m += h : 90 === e ? n += k : 180 === e ? m -= h : n -= k; 1 < l && fq(b, m, n) === l - 1;) c = m, d = n, 0 === e ? m += h : 90 === e ? n += k : 180 === e ? m -= h : n -= k, l -= 1; + if (g) { + if (1 < l) + if (180 === e || 0 === e) c = Math.floor(c / h) * h + h / 2; + else if (90 === e || 270 === e) d = Math.floor(d / k) * k + k / 2 + } else c = Math.floor(c / h) * h + h / 2, d = Math.floor(d / k) * k + k / 2; + 1 < l && (g = e, m = c, n = d, 0 === e ? (g = 90, n += k) : 90 === e ? (g = 180, m -= h) : 180 === e ? (g = 270, n -= k) : 270 === e && (g = 0, m += h), fq(b, m, n) === l - 1 ? gq(a, b, m, n, g, !1) : (m = c, n = d, 0 === e ? (g = 270, n -= k) : 90 === + e ? (g = 0, m += h) : 180 === e ? (g = 90, n += k) : 270 === e && (g = 180, m -= h), fq(b, m, n) === l - 1 && gq(a, b, m, n, g, !1))); + a.sl(c, d) + } + G.prototype.findClosestSegment = function(a) { + u && z.l(a, N, G, "findClosestSegment:p"); + var b = a.x; + a = a.y; + for (var c = this.m(0), d = this.m(1), e = vb(b, a, c.x, c.y, d.x, d.y), g = 0, h = 1; h < this.sa - 1; h++) { + var c = this.m(h + 1), + k = vb(b, a, d.x, d.y, c.x, c.y), + d = c; + k < e && (g = h, e = k) + } + return g + }; + G.prototype.invalidateGeometry = G.prototype.Ae = function() { + this.ab = null + }; + z.w(G, { + Jl: "geometry" + }, function() { + null === this.ab && (this.Bn(), this.ab = this.makeGeometry()); + return this.ab + }); + G.prototype.on = function(a) { + if (!a) { + if (!1 === this.Cg) return; + a = this.gf(); + if (null !== this.ab && (null === a || null !== a.Jl)) return + } + this.ab = this.makeGeometry(); + a = this.path; + if (null !== a) { + a.ab = this.ab; + for (var b = this.va.o, c = b.length, d = 0; d < c; d++) { + var e = b[d]; + e !== a && e.Ff && e instanceof X && (e.ab = this.ab) + } + } + }; + G.prototype.makeGeometry = function() { + var a = this.sa; + if (2 > a) { + var b = new hf(jf), + c = new kf(0, 0); + b.cc.add(c); + return b + } + var d = !1, + b = this.h; + null !== b && Up(this) && b.Rk.contains(this) && null !== this.cw && (d = !0); + var c = b = 0, + e = this.m(0).copy(), + g = e.copy(), + b = this.Yc.o, + h = this.computeCurve(); + if (h === Ui && 3 <= a && !td(this.cq, 0)) + if (3 === a) var k = this.m(1), + b = Math.min(e.x, k.x), + c = Math.min(e.y, k.y), + k = this.m(2), + b = Math.min(b, k.x), + c = Math.min(c, k.y); + else { + if (this.rc) + for (k = 0; k < a; k++) c = b[k], g.x = Math.min(c.x, g.x), g.y = Math.min(c.y, g.y); + else + for (k = + 3; k < a; k += 3) k + 3 >= a && (k = a - 1), b = this.m(k), g.x = Math.min(b.x, g.x), g.y = Math.min(b.y, g.y); + b = g.x; + c = g.y + } + else { + for (k = 0; k < a; k++) c = b[k], g.x = Math.min(c.x, g.x), g.y = Math.min(c.y, g.y); + b = g.x; + c = g.y + } + b -= this.pz.x; + c -= this.pz.y; + e.x -= b; + e.y -= c; + if (2 === a) { + var l = this.m(1).copy(); + l.x -= b; + l.y -= c; + 0 !== cq(this) && hq(this, e, !0, g); + 0 !== dq(this) && hq(this, l, !1, g); + b = new hf(mf); + b.Ha = e.x; + b.Da = e.y; + b.L = l.x; + b.M = l.y + } else { + l = z.v(); + 0 !== cq(this) && hq(this, e, !0, g); + R(l, e.x, e.y, !1, !1); + if (h === Ui && 3 <= a && !td(this.cq, 0)) + if (3 === a) k = this.m(1), a = k.x - b, d = k.y - + c, k = this.m(2).copy(), k.x -= b, k.y -= c, 0 !== dq(this) && hq(this, k, !1, g), S(l, a, d, a, d, k.x, k.y); + else if (this.rc) { + for (var g = new N(b, c), e = this.m(1).copy(), h = new N(b, c), a = new N(b, c), d = this.m(0), m = null, n = this.cq / 3, k = 1; k < this.sa - 1; k++) { + var m = this.m(k), + p = d, + q = m, + r = this.m(iq(this, m, k, !1)); + if (!td(p.x, q.x) || !td(q.x, r.x)) + if (!td(p.y, q.y) || !td(q.y, r.y)) { + var s = n, + t = h, + v = a; + isNaN(s) && (s = this.cq / 3); + var x = p.x, + p = p.y, + y = q.x, + q = q.y, + A = r.x, + r = r.y, + B = s * jq(x, p, y, q), + s = s * jq(y, q, A, r); + td(p, q) && td(y, A) && (y > x ? r > q ? (t.x = y - B, t.y = q - B, v.x = y + s, v.y = q + + s) : (t.x = y - B, t.y = q + B, v.x = y + s, v.y = q - s) : r > q ? (t.x = y + B, t.y = q - B, v.x = y - s, v.y = q + s) : (t.x = y + B, t.y = q + B, v.x = y - s, v.y = q - s)); + td(x, y) && td(q, r) && (q > p ? (A > y ? (t.x = y - B, t.y = q - B, v.x = y + s) : (t.x = y + B, t.y = q - B, v.x = y - s), v.y = q + s) : (A > y ? (t.x = y - B, t.y = q + B, v.x = y + s) : (t.x = y + B, t.y = q + B, v.x = y - s), v.y = q - s)); + if (td(x, y) && td(y, A) || td(p, q) && td(q, r)) x = .5 * (x + A), p = .5 * (p + r), t.x = x, t.y = p, v.x = x, v.y = p; + 1 === k ? (e.x = .5 * (d.x + m.x), e.y = .5 * (d.y + m.y)) : 2 === k && td(d.x, this.m(0).x) && td(d.y, this.m(0).y) && (e.x = .5 * (d.x + m.x), e.y = .5 * (d.y + m.y)); + S(l, e.x - b, e.y - c, h.x - b, h.y - + c, m.x - b, m.y - c); + g.set(h); + e.set(a); + d = m + } + } + k = d.x; + d = d.y; + g = this.m(this.sa - 1); + k = .5 * (k + g.x); + d = .5 * (d + g.y); + S(l, a.x - b, a.y - c, k - b, d - c, g.x - b, g.y - c) + } else + for (k = 3; k < a; k += 3) d = this.m(k - 2), k + 3 >= a && (k = a - 1), g = this.m(k - 1), e = this.m(k), k === a - 1 && 0 !== dq(this) && (e = e.copy(), hq(this, e, !1, Id)), S(l, d.x - b, d.y - c, g.x - b, g.y - c, e.x - b, e.y - c); + else { + g = z.O(); + g.assign(this.m(0)); + for (k = 1; k < a;) { + k = iq(this, g, k, 1 < k); + t = this.m(k); + if (k >= a - 1) { + g !== t && (0 !== dq(this) && (t = t.copy(), hq(this, t, !1, Id)), kq(this, l, -b, -c, g, t, d)); + break + } + k = iq(this, t, k + 1, k < a - 3); + e = + l; + h = -b; + m = -c; + n = g; + v = this.m(k); + x = g; + p = d; + eb(n.y, t.y) && eb(t.x, v.x) ? (s = this.computeCorner(), s = Math.min(s, Math.abs(t.x - n.x) / 2), s = y = Math.min(s, Math.abs(v.y - t.y) / 2), eb(s, 0) ? (kq(this, e, h, m, n, t, p), x.assign(t)) : (q = t.x, A = t.y, r = q, B = A, q = t.x > n.x ? t.x - s : t.x + s, B = v.y > t.y ? t.y + y : t.y - y, kq(this, e, h, m, n, new N(q, A), p), yf(e, t.x + h, t.y + m, r + h, B + m), x.n(r, B))) : eb(n.x, t.x) && eb(t.y, v.y) ? (s = this.computeCorner(), y = Math.min(s, Math.abs(t.y - n.y) / 2), y = s = Math.min(y, Math.abs(v.x - t.x) / 2), eb(s, 0) ? (kq(this, e, h, m, n, t, p), x.assign(t)) : (q = t.x, B = + A = t.y, A = t.y > n.y ? t.y - y : t.y + y, r = v.x > t.x ? t.x + s : t.x - s, kq(this, e, h, m, n, new N(q, A), p), yf(e, t.x + h, t.y + m, r + h, B + m), x.n(r, B))) : (kq(this, e, h, m, n, t, p), x.assign(t)) + } + z.A(g) + } + b = l.q; + z.u(l) + } + return b + }; + + function jq(a, b, c, d) { + a = c - a; + if (isNaN(a) || Infinity === a || -Infinity === a) return NaN; + 0 > a && (a = -a); + b = d - b; + if (isNaN(b) || Infinity === b || -Infinity === b) return NaN; + 0 > b && (b = -b); + return td(a, 0) ? b : td(b, 0) ? a : Math.sqrt(a * a + b * b) + } + + function hq(a, b, c, d) { + var e = a.sa; + if (!(2 > e)) + if (c) { + var g = a.m(1); + c = g.x - d.x; + d = g.y - d.y; + g = jq(b.x, b.y, c, d); + 0 !== g && (e = 2 === e ? .5 * g : g, a = cq(a), a > e && (a = e), c = a * (c - b.x) / g, a = a * (d - b.y) / g, b.x += c, b.y += a) + } else g = a.m(e - 2), c = g.x - d.x, d = g.y - d.y, g = jq(b.x, b.y, c, d), 0 !== g && (e = 2 === e ? .5 * g : g, a = dq(a), a > e && (a = e), c = a * (b.x - c) / g, a = a * (b.y - d) / g, b.x -= c, b.y -= a) + } + + function iq(a, b, c, d) { + for (var e = a.sa, g = b; td(b.x, g.x) && td(b.y, g.y);) { + if (c >= e) return e - 1; + g = a.m(c++) + } + if (!td(b.x, g.x) && !td(b.y, g.y)) return c - 1; + for (var h = g; td(b.x, g.x) && td(g.x, h.x) && (!d || (b.y >= g.y ? g.y >= h.y : g.y <= h.y)) || td(b.y, g.y) && td(g.y, h.y) && (!d || (b.x >= g.x ? g.x >= h.x : g.x <= h.x));) { + if (c >= e) return e - 1; + h = a.m(c++) + } + return c - 2 + } + + function kq(a, b, c, d, e, g, h) { + if (!h && Up(a)) { + h = []; + var k = 0; + a.isVisible() && (k = lq(a, e, g, h)); + var l = e.x, + l = e.y; + if (0 < k) + if (eb(e.y, g.y)) + if (e.x < g.x) + for (var m = 0; m < k;) { + var n = Math.max(e.x, Math.min(h[m++] - 5, g.x - 10)); + b.lineTo(n + c, g.y + d); + for (var l = n + c, p = Math.min(n + 10, g.x); m < k;) { + var q = h[m]; + if (q < p + 10) m++, p = Math.min(q + 5, g.x); + else break + } + q = (n + p) / 2 + c; + q = g.y - 10 + d; + n = p + c; + p = g.y + d; + a.Se === Mi ? R(b, n, p, !1, !1) : S(b, l, q, n, q, n, p) + } else + for (m = k - 1; 0 <= m;) { + n = Math.min(e.x, Math.max(h[m--] + 5, g.x + 10)); + b.lineTo(n + c, g.y + d); + l = n + c; + for (p = Math.max(n - + 10, g.x); 0 <= m;) + if (q = h[m], q > p - 10) m--, p = Math.max(q - 5, g.x); + else break; + q = g.y - 10 + d; + n = p + c; + p = g.y + d; + a.Se === Mi ? R(b, n, p, !1, !1) : S(b, l, q, n, q, n, p) + } else if (eb(e.x, g.x)) + if (e.y < g.y) + for (m = 0; m < k;) { + n = Math.max(e.y, Math.min(h[m++] - 5, g.y - 10)); + b.lineTo(g.x + c, n + d); + l = n + d; + for (p = Math.min(n + 10, g.y); m < k;) + if (q = h[m], q < p + 10) m++, p = Math.min(q + 5, g.y); + else break; + q = g.x - 10 + c; + n = g.x + c; + p += d; + a.Se === Mi ? R(b, n, p, !1, !1) : S(b, q, l, q, p, n, p) + } else + for (m = k - 1; 0 <= m;) { + n = Math.min(e.y, Math.max(h[m--] + 5, g.y + 10)); + b.lineTo(g.x + c, n + d); + l = n + d; + for (p = Math.max(n - + 10, g.y); 0 <= m;) + if (q = h[m], q > p - 10) m--, p = Math.max(q - 5, g.y); + else break; + q = g.x - 10 + c; + n = g.x + c; + p += d; + a.Se === Mi ? R(b, n, p, !1, !1) : S(b, q, l, q, p, n, p) + } + } + b.lineTo(g.x + c, g.y + d) + } + + function lq(a, b, c, d) { + var e = a.h; + if (null === e || b.N(c)) return 0; + for (e = e.mn; e.next();) { + var g = e.value; + if (null !== g && g.visible) + for (var g = g.mb.o, h = g.length, k = 0; k < h; k++) { + var l = g[k]; + if (l instanceof G) { + if (l === a) return 0 < d.length && d.sort(function(a, b) { + return a - b + }), d.length; + if (l.isVisible() && Up(l)) { + var m = l.un; + m.F() && a.un.Ig(m) && !a.usesSamePort(l) && (m = l.path, null !== m && m.nj() && mq(b, c, d, l)) + } + } + } + } + 0 < d.length && d.sort(function(a, b) { + return a - b + }); + return d.length + } + + function mq(a, b, c, d) { + for (var e = eb(a.y, b.y), g = d.sa, h = d.m(0), k = z.O(), l = 1; l < g; l++) { + var m = d.m(l); + if (l < g - 1) { + var n = d.m(l + 1); + if (h.y === m.y && m.y === n.y) { + if (m.x > h.x && n.x > m.x || m.x < h.x && n.x < m.x) m = n, l++ + } else h.x === m.x && m.x === n.x && (m.y > h.y && n.y > m.y || m.y < h.y && n.y < m.y) && (m = n, l++) + } + a: { + var n = k, + p = a.x, + q = a.y, + r = b.x, + s = b.y, + t = h.x, + h = h.y, + v = m.x, + x = m.y; + if (!eb(p, r)) { + if (eb(q, s) && eb(t, v) && Math.min(p, r) < t && Math.max(p, r) > t && Math.min(h, x) < q && Math.max(h, x) > q && !eb(h, x)) { + n.x = t; + n.y = q; + n = !0; + break a + } + } else if (!eb(q, s) && eb(h, x) && Math.min(q, s) < + h && Math.max(q, s) > h && Math.min(t, v) < p && Math.max(t, v) > p && !eb(t, v)) { + n.x = p; + n.y = h; + n = !0; + break a + } + n.x = 0;n.y = 0;n = !1 + } + n && (e ? c.push(k.x) : c.push(k.y)); + h = m + } + z.A(k) + } + z.w(G, { + Bt: "firstPickIndex" + }, function() { + return 2 >= this.sa ? 0 : this.rc || Xp(this) !== Yb ? 1 : 0 + }); + z.w(G, { + ox: "lastPickIndex" + }, function() { + var a = this.sa; + return 0 === a ? 0 : 2 >= a ? a - 1 : this.rc || Yp(this) !== Yb ? a - 2 : a - 1 + }); + + function Up(a) { + a = a.Se; + return a === Li || a === Mi + } + + function Wp(a, b) { + if (b || Up(a)) { + var c = a.h; + null === c || c.Rk.contains(a) || null === a.cw || c.Rk.add(a, a.cw) + } + } + + function Oi(a, b) { + var c = a.layer; + if (null !== c && c.visible && !c.Nc) { + var d = c.h; + if (null !== d) + for (var e = !1, d = d.mn; d.next();) { + var g = d.value; + if (g.visible) + if (g === c) + for (var e = !0, h = !1, g = g.mb.o, k = g.length, l = 0; l < k; l++) { + var m = g[l]; + m instanceof G && (m === a ? h = !0 : h && nq(a, m, b)) + } else if (e) + for (g = g.mb.o, k = g.length, l = 0; l < k; l++) m = g[l], m instanceof G && nq(a, m, b) + } + } + } + + function nq(a, b, c) { + if (null !== b && null !== b.ab && Up(b)) { + var d = b.un; + d.F() && (a.un.Ig(d) || c.Ig(d)) && (a.usesSamePort(b) || b.Ae()) + } + } + G.prototype.usesSamePort = function(a) { + var b = this.sa, + c = a.sa; + if (0 < b && 0 < c) { + var d = this.m(0), + e = a.m(0); + if (d.Mc(e)) return !0; + b = this.m(b - 1); + a = a.m(c - 1); + if (b.Mc(a) || d.Mc(a) || b.Mc(e)) return !0 + } else if (this.Y === a.Y || this.da === a.da || this.Y === a.da || this.da === a.Y) return !0; + return !1 + }; + G.prototype.isVisible = function() { + if (!D.prototype.isVisible.call(this)) return !1; + var a = this.Va, + b = !0, + c = this.h; + null !== c && (b = c.ce); + c = this.Y; + if (null !== c) { + if (this.Oc && b && !c.vd) return !1; + if (c === a) return !0; + c = c.findVisibleNode(); + if (null === c || c === a) return !1 + } + c = this.da; + if (null !== c) { + if (this.Oc && !b && !c.vd) return !1; + if (c === a) return !0; + b = c.findVisibleNode(); + if (null === b || b === a) return !1 + } + return !0 + }; + G.prototype.wd = function(a) { + D.prototype.wd.call(this, a); + null !== this.ri && this.ri.zp(); + if (null !== this.Ke) + for (var b = this.Ke.i; b.next();) b.value.wd(a) + }; + z.defineProperty(G, { + it: "adjusting" + }, function() { + return this.mq + }, function(a) { + var b = this.mq; + b !== a && (u && z.Ba(a, G, G, "adjusting"), this.mq = a, this.j("adjusting", b, a)) + }); + z.defineProperty(G, { + Kz: "corner" + }, function() { + return this.Fq + }, function(a) { + var b = this.Fq; + b !== a && (u && z.g(a, "number", G, "corner"), this.Fq = a, this.Ae(), this.j("corner", b, a)) + }); + z.defineProperty(G, { + Se: "curve" + }, function() { + return this.Iq + }, function(a) { + var b = this.Iq; + b !== a && (u && z.Ba(a, G, G, "curve"), this.Iq = a, this.qc(), this.Ae(), Wp(this, b === Mi || b === Li || a === Mi || a === Li), this.j("curve", b, a)) + }); + z.defineProperty(G, { + Qw: "curviness" + }, function() { + return this.Jq + }, function(a) { + var b = this.Jq; + b !== a && (u && z.g(a, "number", G, "curviness"), this.Jq = a, this.qc(), this.Ae(), this.j("curviness", b, a)) + }); + z.defineProperty(G, { + Gx: "routing" + }, function() { + return this.Dm + }, function(a) { + var b = this.Dm; + b !== a && (u && z.Ba(a, G, G, "routing"), this.Dm = a, this.Di = null, this.qc(), Wp(this, 2 === (b.value & 2) || 2 === (a.value & 2)), this.j("routing", b, a)) + }); + z.defineProperty(G, { + cq: "smoothness" + }, function() { + return this.Ms + }, function(a) { + var b = this.Ms; + b !== a && (u && z.g(a, "number", G, "smoothness"), this.Ms = a, this.Ae(), this.j("smoothness", b, a)) + }); + + function Sp(a) { + var b = a.pg; + if (null !== b) { + var c = a.Bg; + if (null !== c) { + var d = a.Oh; + a = a.ei; + for (var e = null, g = null, h = b.mc.o, k = h.length, l = 0; l < k; l++) { + var m = h[l]; + if (m.pg === b && m.Oh === d && m.Bg === c && m.ei === a || m.pg === c && m.Oh === a && m.Bg === b && m.ei === d) null === g ? g = m : (null === e && (e = [], e.push(g)), e.push(m)) + } + if (null !== e) { + g = Ap(b, c, d, a); + null === g && (g = new wk, g.Op = b, g.yx = d, g.du = c, g.zx = a, zp(b, g), zp(c, g)); + g.links = e; + for (l = 0; l < e.length; l++) m = e[l], m.ri = g; + g.zp() + } + } + } + } + + function Rp(a) { + var b = a.ri; + null !== b && (a.ri = null, a = b.links.indexOf(a), 0 <= a && (z.hi(b.links, a), b.zp())) + } + + function wk() { + z.kc(this); + this.zv = !1; + this.zx = this.du = this.yx = this.Op = null; + this.links = [] + } + wk.prototype.zp = function() { + if (!this.zv) { + var a = this.links; + 0 < a.length && (a = a[0].h, null !== a && a.jC.add(this)) + } + this.zv = !0 + }; + wk.prototype.dB = function() { + if (this.zv) { + this.zv = !1; + var a = this.links; + if (0 < a.length) { + var b = a[0], + c = b.h; + b.arrangeBundledLinks(a, null === c || c.kn); + 1 === a.length && (b.ri = null, a.length = 0) + } + 0 === a.length && (a = this.Op, null !== this && null !== a.Hh && a.Hh.remove(this), a = this.du, null !== this && null !== a.Hh && a.Hh.remove(this)) + } + }; + z.Yd(wk, { + Op: !0, + yx: !0, + du: !0, + zx: !0, + links: !0, + spacing: !0 + }); + + function jm() { + z.kc(this); + this.UA = this.group = null; + this.yp = !0; + this.abort = !1; + this.Tf = this.Sf = 1; + this.Hr = this.Gr = -1; + this.zd = this.Rd = 8; + this.lc = null; + this.gG = !1; + this.NF = 22; + this.WE = 111 + } + z.Yd(jm, { + group: !0, + UA: !0, + yp: !0, + abort: !0, + gG: !0, + NF: !0, + WE: !0 + }); + jm.prototype.initialize = function(a) { + if (!(0 >= a.width || 0 >= a.height)) { + var b = a.y, + c = a.x + a.width, + d = a.y + a.height; + this.Sf = Math.floor((a.x - this.Rd) / this.Rd) * this.Rd; + this.Tf = Math.floor((b - this.zd) / this.zd) * this.zd; + this.Gr = Math.ceil((c + 2 * this.Rd) / this.Rd) * this.Rd; + this.Hr = Math.ceil((d + 2 * this.zd) / this.zd) * this.zd; + a = 1 + (Math.ceil((this.Gr - this.Sf) / this.Rd) | 0); + b = 1 + (Math.ceil((this.Hr - this.Tf) / this.zd) | 0); + if (null === this.lc || this.Om < a - 1 || this.Pm < b - 1) { + c = []; + for (d = 0; d <= a; d++) { + for (var e = [], g = 0; g <= b; g++) e[g] = 0; + c[d] = e + } + this.lc = + c; + this.Om = a - 1; + this.Pm = b - 1 + } + if (null !== this.lc) + for (a = 0; a <= this.Om; a++) + for (b = 0; b <= this.Pm; b++) this.lc[a][b] = 999999 + } + }; + z.w(jm, { + vb: null + }, function() { + return new w(this.Sf, this.Tf, this.Gr - this.Sf, this.Hr - this.Tf) + }); + z.defineProperty(jm, { + ep: null + }, function() { + return this.Rd + }, function(a) { + 0 < a && a !== this.Rd && (this.Rd = a, this.initialize(this.vb)) + }); + z.defineProperty(jm, { + cp: null + }, function() { + return this.zd + }, function(a) { + 0 < a && a !== this.zd && (this.zd = a, this.initialize(this.vb)) + }); + + function oq(a, b, c) { + return a.Sf <= b && b <= a.Gr && a.Tf <= c && c <= a.Hr + } + + function fq(a, b, c) { + if (!oq(a, b, c)) return 0; + b -= a.Sf; + b /= a.Rd; + c -= a.Tf; + c /= a.zd; + return a.lc[b | 0][c | 0] + } + + function mm(a, b, c) { + oq(a, b, c) && (b -= a.Sf, b /= a.Rd, c -= a.Tf, c /= a.zd, a.lc[b | 0][c | 0] = 0) + } + + function lm(a) { + if (null !== a.lc) + for (var b = 0; b <= a.Om; b++) + for (var c = 0; c <= a.Pm; c++) 1 <= a.lc[b][c] && (a.lc[b][c] |= 999999) + } + jm.prototype.Dp = function(a, b, c, d) { + if (a > this.Gr || a + c < this.Sf || b > this.Hr || b + d < this.Tf) return !0; + a = (a - this.Sf) / this.Rd | 0; + b = (b - this.Tf) / this.zd | 0; + c = Math.max(0, c) / this.Rd + 1 | 0; + var e = Math.max(0, d) / this.zd + 1 | 0; + 0 > a && (c += a, a = 0); + 0 > b && (e += b, b = 0); + if (0 > c || 0 > e) return !0; + d = Math.min(a + c - 1, this.Om) | 0; + for (c = Math.min(b + e - 1, this.Pm) | 0; a <= d; a++) + for (e = b; e <= c; e++) + if (0 === this.lc[a][e]) return !1; + return !0 + }; + + function pq(a, b, c, d, e, g, h, k, l) { + if (!(b < g || b > h || c < k || c > l)) { + var m, n; + m = b | 0; + n = c | 0; + var p = a.lc[m][n]; + if (1 <= p && 999999 > p) + for (e ? n += d : m += d, p += 1; g <= m && m <= h && k <= n && n <= l && !(p >= a.lc[m][n]);) a.lc[m][n] = p, p += 1, e ? n += d : m += d; + m = e ? n : m; + if (e) + if (0 < d) + for (c += d; c < m; c += d) pq(a, b, c, 1, !e, g, h, k, l), pq(a, b, c, -1, !e, g, h, k, l); + else + for (c += d; c > m; c += d) pq(a, b, c, 1, !e, g, h, k, l), pq(a, b, c, -1, !e, g, h, k, l); + else if (0 < d) + for (b += d; b < m; b += d) pq(a, b, c, 1, !e, g, h, k, l), pq(a, b, c, -1, !e, g, h, k, l); + else + for (b += d; b > m; b += d) pq(a, b, c, 1, !e, g, h, k, l), pq(a, b, c, -1, !e, g, h, + k, l) + } + } + + function qq(a, b, c, d, e, g, h, k, l, m, n) { + for (var p = b | 0, q = c | 0, r = a.lc[p][q]; 0 === r && p > k && p < l && q > m && q < n;) + if (h ? q += g : p += g, r = a.lc[p][q], 1 >= Math.abs(p - d) && 1 >= Math.abs(q - e)) return a.abort = !0, 0; + p = b | 0; + q = c | 0; + r = a.lc[p][q]; + b = 1; + for (a.lc[p][q] = b; 0 === r && p > k && p < l && q > m && q < n;) h ? q += g : p += g, r = a.lc[p][q], a.lc[p][q] = b, b += 1; + return h ? q : p + } + + function eq(a, b, c, d, e, g) { + if (null !== a.lc) { + a.abort = !1; + var h = b.x, + k = b.y; + if (oq(a, h, k)) { + var h = h - a.Sf, + h = h / a.Rd, + k = k - a.Tf, + k = k / a.zd, + l = d.x, + m = d.y; + if (oq(a, l, m)) + if (l -= a.Sf, l /= a.Rd, m -= a.Tf, m /= a.zd, 1 >= Math.abs(h - l) && 1 >= Math.abs(k - m)) a.abort = !0; + else { + var n = g.x; + b = g.y; + d = g.x + g.width; + var p = g.y + g.height, + n = n - a.Sf, + n = n / a.Rd; + b -= a.Tf; + b /= a.zd; + d -= a.Sf; + d /= a.Rd; + p -= a.Tf; + p /= a.zd; + g = Math.max(0, Math.min(a.Om, n | 0)); + d = Math.min(a.Om, Math.max(0, d | 0)); + b = Math.max(0, Math.min(a.Pm, b | 0)); + var p = Math.min(a.Pm, Math.max(0, p | 0)), + h = h | 0, + k = k | 0, + l = l | 0, + m = m | 0, + n = h, + q = k, + r = 0 === c || 90 === c ? 1 : -1; + (c = 90 === c || 270 === c) ? q = qq(a, h, k, l, m, r, c, g, d, b, p): n = qq(a, h, k, l, m, r, c, g, d, b, p); + if (!a.abort) { + a: { + c = 0 === e || 90 === e ? 1 : -1;e = 90 === e || 270 === e; + for (var r = l | 0, s = m | 0, t = a.lc[r][s]; 0 === t && r > g && r < d && s > b && s < p;) + if (e ? s += c : r += c, t = a.lc[r][s], 1 >= Math.abs(r - h) && 1 >= Math.abs(s - k)) { + a.abort = !0; + break a + } + r = l | 0;s = m | 0;t = a.lc[r][s]; + for (a.lc[r][s] = 999999; 0 === t && r > g && r < d && s > b && s < p;) e ? s += c : r += c, + t = a.lc[r][s], + a.lc[r][s] = 999999 + } + a.abort || (pq(a, n, q, 1, !1, g, d, b, p), pq(a, n, q, -1, !1, g, d, b, p), pq(a, n, q, 1, !0, g, d, + b, p), pq(a, n, q, -1, !0, g, d, b, p)) + } + } + } + } + } + + function aq() { + z.kc(this); + this.port = this.Pc = null; + this.fg = []; + this.Np = !1 + } + z.Yd(aq, { + Pc: !0, + port: !0, + fg: !0, + Np: !0 + }); + aq.prototype.toString = function() { + for (var a = this.fg, b = this.Pc.toString() + " " + a.length.toString() + ":", c = 0; c < a.length; c++) { + var d = a[c]; + null !== d && (b += "\n " + d.toString()) + } + return b + }; + + function rq(a, b, c, d) { + b = b.offsetY; + switch (b) { + case z.ed: + return 90; + case z.Tc: + return 180; + case z.pd: + return 270; + case z.fd: + return 0 + } + switch (b) { + case z.ed | z.pd: + return 180 < c ? 270 : 90; + case z.Tc | z.fd: + return 90 < c && 270 >= c ? 180 : 0 + } + a = 180 * Math.atan2(a.height, a.width) / Math.PI; + switch (b) { + case z.Tc | z.pd: + return c > a && c <= 180 + a ? 180 : 270; + case z.pd | z.fd: + return c > 180 - a && c <= 360 - a ? 270 : 0; + case z.fd | z.ed: + return c > a && c <= 180 + a ? 90 : 0; + case z.ed | z.Tc: + return c > 180 - a && c <= 360 - a ? 180 : 90; + case z.Tc | z.pd | z.fd: + return 90 < c && c <= 180 + a ? 180 : c > 180 + a && c <= 360 - + a ? 270 : 0; + case z.pd | z.fd | z.ed: + return 180 < c && c <= 360 - a ? 270 : c > a && 180 >= c ? 90 : 0; + case z.fd | z.ed | z.Tc: + return c > a && c <= 180 - a ? 90 : c > 180 - a && 270 >= c ? 180 : 0; + case z.ed | z.Tc | z.pd: + return c > 180 - a && c <= 180 + a ? 180 : c > 180 + a ? 270 : 90 + } + d && b !== (z.Tc | z.pd | z.fd | z.ed) && (c -= 15, 0 > c && (c += 360)); + return c > a && c < 180 - a ? 90 : c >= 180 - a && c <= 180 + a ? 180 : c > 180 + a && c < 360 - a ? 270 : 0 + } + aq.prototype.zp = function() { + this.fg.length = 0 + }; + + function bq(a, b) { + var c = a.fg; + if (0 === c.length) { + a: if (!a.Np) { + c = a.Np; + a.Np = !0; + var d, e = null, + g = a.Pc, + g = g instanceof F ? g : null; + if (null === g || g.re) d = a.Pc.qE(a.port.yd); + else { + if (!g.W.F()) { + a.Np = c; + break a + } + e = g; + d = e.pE() + } + var h = a.fg.length = 0, + k = a.port.fb(Zb, z.O()), + l = a.port.fb(ic, z.O()), + g = z.yk(k.x, k.y, 0, 0); + g.vj(l); + z.A(k); + z.A(l); + k = z.Tb(g.x + g.width / 2, g.y + g.height / 2); + for (d = d.i; d.next();) + if (l = d.value, l.isVisible()) { + var m = Yb, + n = l.md === a.port || l.Y.li(e), + m = n ? Xp(l, a.port) : Yp(l, a.port); + if (m.kj() && (n = n ? l.Qd : l.md, null !== n)) { + var p = + n.ca; + if (null !== p) { + var n = l.computeOtherPoint(p, n), + p = k.Ec(n), + m = rq(g, m, p, l.rc), + q = 0; + 0 === m ? (q = z.fd, 180 < p && (p -= 360)) : q = 90 === m ? z.ed : 180 === m ? z.Tc : z.pd; + m = a.fg[h]; + void 0 === m ? (m = new sq(l, p, q), a.fg[h] = m) : (m.link = l, m.angle = p, m.se = q); + m.wx.set(n); + h++ + } + } + } + z.A(k); + a.fg.sort(aq.prototype.LI); + e = a.fg.length; + k = -1; + for (h = d = 0; h < e; h++) m = a.fg[h], void 0 !== m && (m.se !== k && (k = m.se, d = 0), m.wp = d, d++); + k = -1; + d = 0; + for (h = e - 1; 0 <= h; h--) m = a.fg[h], void 0 !== m && (m.se !== k && (k = m.se, d = m.wp + 1), m.an = d); + h = a.fg; + n = a.port; + e = a.Pc.TI; + k = z.O(); + d = z.O(); + l = z.O(); + m = z.O(); + n.fb(Zb, k); + n.fb(cc, d); + n.fb(ic, l); + n.fb(gc, m); + var r = q = p = n = 0; + if (e === yp) + for (var s = 0; s < h.length; s++) { + var t = h[s]; + if (null !== t) { + var v = t.link.computeThickness(); + switch (t.se) { + case z.ed: + q += v; + break; + case z.Tc: + r += v; + break; + case z.pd: + n += v; + break; + default: + case z.fd: + p += v + } + } + } + for (var x = 0, y = 0, A = 1, s = 0; s < h.length; s++) + if (t = h[s], null !== t) { + var B, L; + if (x !== t.se) { + x = t.se; + switch (x) { + case z.ed: + B = l; + L = m; + break; + case z.Tc: + B = m; + L = k; + break; + case z.pd: + B = k; + L = d; + break; + default: + case z.fd: + B = d, L = l + } + var H = L.x - B.x; + L = L.y - B.y; + switch (x) { + case z.ed: + q > + Math.abs(H) ? (A = Math.abs(H) / q, q = Math.abs(H)) : A = 1; + break; + case z.Tc: + r > Math.abs(L) ? (A = Math.abs(L) / r, r = Math.abs(L)) : A = 1; + break; + case z.pd: + n > Math.abs(H) ? (A = Math.abs(H) / n, n = Math.abs(H)) : A = 1; + break; + default: + case z.fd: + p > Math.abs(L) ? (A = Math.abs(L) / p, p = Math.abs(L)) : A = 1 + } + y = 0 + } + var U = t.Fp; + if (e === yp) { + v = t.link.computeThickness(); + v *= A; + U.set(B); + switch (x) { + case z.ed: + U.x = B.x + H / 2 + q / 2 - y - v / 2; + break; + case z.Tc: + U.y = B.y + L / 2 + r / 2 - y - v / 2; + break; + case z.pd: + U.x = B.x + H / 2 - n / 2 + y + v / 2; + break; + default: + case z.fd: + U.y = B.y + L / 2 - p / 2 + y + v / 2 + } + y += v + } else v = .5, + e === vp && (v = (t.wp + 1) / (t.an + 1)), U.x = B.x + H * v, U.y = B.y + L * v + } + z.A(k); + z.A(d); + z.A(l); + z.A(m); + B = a.fg; + for (H = 0; H < B.length; H++) L = B[H], null !== L && (L.Uw = a.computeEndSegmentLength(L)); + a.Np = c; + z.dc(g) + }c = a.fg + } + for (g = 0; g < c.length; g++) + if (B = c[g], null !== B && B.link === b) return B; + return null + } + aq.prototype.LI = function(a, b) { + return a === b ? 0 : null === a ? -1 : null === b ? 1 : a.se < b.se ? -1 : a.se > b.se ? 1 : a.angle < b.angle ? -1 : a.angle > b.angle ? 1 : 0 + }; + aq.prototype.computeEndSegmentLength = function(a) { + var b = a.link, + c = b.computeEndSegmentLength(this.Pc, this.port, Yb, b.md === this.port), + d = a.wp; + if (0 > d) return c; + var e = a.an; + if (1 >= e || !b.rc) return c; + var b = a.wx, + g = a.Fp; + if (a.se === z.Tc || a.se === z.ed) d = e - 1 - d; + return ((a = a.se === z.Tc || a.se === z.fd) ? b.y < g.y : b.x < g.x) ? c + 8 * d : (a ? b.y === g.y : b.x === g.x) ? c : c + 8 * (e - 1 - d) + }; + + function sq(a, b, c) { + this.link = a; + this.angle = b; + this.se = c; + this.wx = new N; + this.an = this.wp = 0; + this.Fp = new N; + this.Uw = 0 + } + z.Yd(sq, { + link: !0, + angle: !0, + se: !0, + wx: !0, + wp: !0, + an: !0, + Fp: !0, + Uw: !0 + }); + sq.prototype.toString = function() { + return this.link.toString() + " " + this.angle.toString() + " " + this.se.toString() + ":" + this.wp.toString() + "/" + this.an.toString() + " " + this.Fp.toString() + " " + this.Uw.toString() + " " + this.wx.toString() + }; + + function Fm() { + this.gk = this.Gj = Pc; + this.ek = this.Ej = NaN; + this.dk = this.Dj = wp; + this.fk = this.Fj = NaN + } + Fm.prototype.copy = function() { + var a = new Fm; + a.Gj = this.Gj.V(); + a.gk = this.gk.V(); + a.Ej = this.Ej; + a.ek = this.ek; + a.Dj = this.Dj; + a.dk = this.dk; + a.Fj = this.Fj; + a.fk = this.fk; + return a + }; + + function F(a) { + 0 === arguments.length ? E.call(this, ej) : E.call(this, a); + this.Jr = new K(D); + this.wm = new K(F); + this.hl = this.Kr = this.Ir = null; + this.$s = !1; + this.pr = !0; + this.at = !1; + this.Lb = this.Qs = null; + this.xq = !1; + this.yq = !0; + this.er = this.zq = !1; + this.he = new vg; + this.he.group = this; + this.dz = !1 + } + z.Qa(F, E); + z.ia("Group", F); + F.prototype.cloneProtected = function(a) { + E.prototype.cloneProtected.call(this, a); + a.Ir = this.Ir; + a.Kr = this.Kr; + a.hl = this.hl; + a.$s = this.$s; + a.pr = this.pr; + a.at = this.at; + a.Qs = this.Qs; + var b = a.yt(function(a) { + return a instanceof Zi + }); + a.Lb = b instanceof Zi ? b : null; + a.xq = this.xq; + a.yq = this.yq; + a.zq = this.zq; + a.er = this.er; + null !== this.he ? (a.he = this.he.copy(), a.he.group = a) : (null !== a.he && (a.he.group = null), a.he = null) + }; + F.prototype.ji = function(a) { + E.prototype.ji.call(this, a); + var b = a.np(); + for (a = a.Hc; a.next();) { + var c = a.value; + c.S(); + c.I(8); + c.pt(); + if (c instanceof E) c.mf(b); + else if (c instanceof G) + for (c = c.Hf; c.next();) c.value.mf(b) + } + }; + F.prototype.tn = function(a, b, c, d, e, g, h) { + if (a === Uf && "elements" === b) + if (e instanceof Zi) { + var k = e; + null === this.Lb ? this.Lb = k : this.Lb !== k && z.k("Cannot insert a second Placeholder into the visual tree of a Group.") + } else e instanceof I && (k = e.yt(function(a) { + return a instanceof Zi + }), k instanceof Zi && (null === this.Lb ? this.Lb = k : this.Lb !== k && z.k("Cannot insert a second Placeholder into the visual tree of a Group."))); + else a === Vf && "elements" === b && null !== this.Lb && (d === this.Lb ? this.Lb = null : d instanceof I && this.Lb.Pl(d) && + (this.Lb = null)); + E.prototype.tn.call(this, a, b, c, d, e, g, h) + }; + F.prototype.$i = function(a, b, c, d) { + this.gl = this.Lb; + I.prototype.$i.call(this, a, b, c, d) + }; + F.prototype.Ql = function() { + if (!E.prototype.Ql.call(this)) return !1; + for (var a = this.Hc; a.next();) { + var b = a.value; + if (b instanceof E) { + if (b.isVisible() && nl(b)) return !1 + } else if (b instanceof G && b.isVisible() && nl(b) && b.Y !== this && b.da !== this) return !1 + } + return !0 + }; + z.w(F, { + placeholder: "placeholder" + }, function() { + return this.Lb + }); + z.defineProperty(F, { + VD: "computesBoundsAfterDrag" + }, function() { + return this.xq + }, function(a) { + var b = this.xq; + b !== a && (z.g(a, "boolean", F, "computesBoundsAfterDrag"), this.xq = a, this.j("computesBoundsAfterDrag", b, a)) + }); + z.defineProperty(F, { + Ow: "computesBoundsIncludingLinks" + }, function() { + return this.yq + }, function(a) { + z.g(a, "boolean", F, "computesBoundsIncludingLinks"); + var b = this.yq; + b !== a && (this.yq = a, this.j("computesBoundsIncludingLinks", b, a)) + }); + z.defineProperty(F, { + gH: "computesBoundsIncludingLocation" + }, function() { + return this.zq + }, function(a) { + z.g(a, "boolean", F, "computesBoundsIncludingLocation"); + var b = this.zq; + b !== a && (this.zq = a, this.j("computesBoundsIncludingLocation", b, a)) + }); + z.defineProperty(F, { + UH: "handlesDragDropForMembers" + }, function() { + return this.er + }, function(a) { + z.g(a, "boolean", F, "handlesDragDropForMembers"); + var b = this.er; + b !== a && (this.er = a, this.j("handlesDragDropForMembers", b, a)) + }); + z.w(F, { + Hc: "memberParts" + }, function() { + return this.Jr.i + }); + + function rp(a, b) { + if (a.Jr.add(b)) { + b instanceof F && a.wm.add(b); + var c = a.DI; + if (null !== c) { + var d = !0, + e = a.h; + null !== e && (d = e.$a, e.$a = !0); + c(a, b); + null !== e && (e.$a = d) + } + a.isVisible() && a.re || b.wd(!1) + } + b instanceof G && !a.Ow || (c = a.Lb, null === c && (c = a), c.S()) + } + + function qp(a, b) { + if (a.Jr.remove(b)) { + b instanceof F && a.wm.remove(b); + var c = a.EI; + if (null !== c) { + var d = !0, + e = a.h; + null !== e && (d = e.$a, e.$a = !0); + c(a, b); + null !== e && (e.$a = d) + } + a.isVisible() && a.re || b.wd(!0) + } + b instanceof G && !a.Ow || (c = a.Lb, null === c && (c = a), c.S()) + } + F.prototype.cn = function() { + if (0 < this.Jr.count) { + var a = this.h; + if (null !== a) + for (var b = this.Jr.copy().i; b.next();) a.remove(b.value) + } + E.prototype.cn.call(this) + }; + z.defineProperty(F, { + Sb: "layout" + }, function() { + return this.he + }, function(a) { + var b = this.he; + b !== a && (null !== a && z.l(a, vg, F, "layout"), null !== b && (b.h = null, b.group = null), this.he = a, null !== a && (a.h = this.h, a.group = this), this.j("layout", b, a)) + }); + z.defineProperty(F, { + DI: "memberAdded" + }, function() { + return this.Ir + }, function(a) { + var b = this.Ir; + b !== a && (null !== a && z.g(a, "function", F, "memberAdded"), this.Ir = a, this.j("memberAdded", b, a)) + }); + z.defineProperty(F, { + EI: "memberRemoved" + }, function() { + return this.Kr + }, function(a) { + var b = this.Kr; + b !== a && (null !== a && z.g(a, "function", F, "memberRemoved"), this.Kr = a, this.j("memberRemoved", b, a)) + }); + z.defineProperty(F, { + qA: "memberValidation" + }, function() { + return this.hl + }, function(a) { + var b = this.hl; + b !== a && (null !== a && z.g(a, "function", F, "memberValidation"), this.hl = a, this.j("memberValidation", b, a)) + }); + F.prototype.canAddMembers = function(a) { + var b = this.h; + if (null === b) return !1; + b = b.wb; + for (a = kh(a).i; a.next();) + if (!b.isValidMember(this, a.value)) return !1; + return !0 + }; + F.prototype.addMembers = function(a, b) { + var c = this.h; + if (null === c) return !1; + for (var c = c.wb, d = !0, e = kh(a).i; e.next();) { + var g = e.value; + !b || c.isValidMember(this, g) ? g.Va = this : d = !1 + } + return d + }; + z.defineProperty(F, { + AJ: "ungroupable" + }, function() { + return this.$s + }, function(a) { + var b = this.$s; + b !== a && (z.g(a, "boolean", F, "ungroupable"), this.$s = a, this.j("ungroupable", b, a)) + }); + F.prototype.canUngroup = function() { + if (!this.AJ) return !1; + var a = this.layer; + if (null !== a && !a.Iw) return !1; + a = a.h; + return null === a || a.Iw ? !0 : !1 + }; + F.prototype.mf = function(a) { + void 0 === a && (a = null); + E.prototype.mf.call(this, a); + for (var b = this.pE(); b.next();) { + var c = b.value; + if (null === a || !a.contains(c)) { + var d = c.Y; + null !== d && d !== this && d.li(this) && !d.isVisible() ? c.qc() : (d = c.da, null !== d && d !== this && d.li(this) && !d.isVisible() && c.qc()) + } + } + }; + F.prototype.findExternalLinksConnected = F.prototype.pE = function() { + var a = this.np(); + a.add(this); + for (var b = new K(G), c = a.i; c.next();) { + var d = c.value; + if (d instanceof E) + for (d = d.ee; d.next();) { + var e = d.value; + a.contains(e) || b.add(e) + } + } + return b.i + }; + F.prototype.findExternalNodesConnected = function() { + var a = this.np(); + a.add(this); + for (var b = new K(E), c = a.i; c.next();) { + var d = c.value; + if (d instanceof E) + for (d = d.ee; d.next();) { + var e = d.value, + g = e.Y; + a.contains(g) && g !== this || b.add(g); + e = e.da; + a.contains(e) && e !== this || b.add(e) + } + } + return b.i + }; + F.prototype.findContainingGroupChain = function() { + function a(b, d) { + null !== b && (d.add(b), a(b.Va, d)) + } + var b = new K(D); + a(this, b); + return b + }; + F.prototype.findSubGraphParts = F.prototype.np = function() { + var a = new K(D); + eh(a, this, !0, 0, !0); + a.remove(this); + return a + }; + F.prototype.wd = function(a) { + E.prototype.wd.call(this, a); + for (var b = this.Hc; b.next();) b.value.wd(a) + }; + F.prototype.collapseSubGraph = F.prototype.collapseSubGraph = function() { + var a = this.h; + if (null !== a && !a.vh) { + a.vh = !0; + var b = this.np(); + tq(this, b, a.Ua, this); + a.vh = !1 + } + }; + + function tq(a, b, c, d) { + for (var e = a.Hc; e.next();) { + var g = e.value; + g.wd(!1); + if (g instanceof F) { + var h = g; + h.re && (h.fB = h.re, tq(h, b, c, d)) + } + if (g instanceof E) g.mf(b), ek(c, g, d); + else if (g instanceof G) + for (g = g.Hf; g.next();) g.value.mf(b) + } + a.re = !1 + } + F.prototype.expandSubGraph = F.prototype.expandSubGraph = function() { + var a = this.h; + if (null !== a && !a.vh) { + a.vh = !0; + var b = this.np(); + uq(this, b, a.Ua, this); + a.vh = !1 + } + }; + + function uq(a, b, c, d) { + for (var e = a.Hc; e.next();) { + var g = e.value; + g.wd(!0); + if (g instanceof F) { + var h = g; + h.fB && (h.fB = !1, uq(h, b, c, d)) + } + if (g instanceof E) g.mf(b), dk(c, g, d); + else if (g instanceof G) + for (g = g.Hf; g.next();) g.value.mf(b) + } + a.re = !0 + } + z.defineProperty(F, { + re: "isSubGraphExpanded" + }, function() { + return this.pr + }, function(a) { + var b = this.pr; + if (b !== a) { + z.g(a, "boolean", F, "isSubGraphExpanded"); + this.pr = a; + var c = this.h; + this.j("isSubGraphExpanded", b, a); + b = this.qJ; + if (null !== b) { + var d = !0; + null !== c && (d = c.$a, c.$a = !0); + b(this); + null !== c && (c.$a = d) + } + null !== c && c.pa.qb ? null !== this.Lb && this.Lb.S() : a ? this.expandSubGraph() : this.collapseSubGraph() + } + }); + z.defineProperty(F, { + fB: "wasSubGraphExpanded" + }, function() { + return this.at + }, function(a) { + var b = this.at; + b !== a && (z.g(a, "boolean", F, "wasSubGraphExpanded"), this.at = a, this.j("wasSubGraphExpanded", b, a)) + }); + z.defineProperty(F, { + qJ: "subGraphExpandedChanged" + }, function() { + return this.Qs + }, function(a) { + var b = this.Qs; + b !== a && (null !== a && z.g(a, "function", F, "subGraphExpandedChanged"), this.Qs = a, this.j("subGraphExpandedChanged", b, a)) + }); + F.prototype.move = function(a) { + var b = this.position, + c = b.x; + isNaN(c) && (c = 0); + b = b.y; + isNaN(b) && (b = 0); + var c = a.x - c, + b = a.y - b, + d = z.Tb(c, b); + E.prototype.move.call(this, a); + for (a = this.np().i; a.next();) { + var e = a.value; + if (!(e instanceof G || e instanceof E && e.Df)) { + var g = e.position, + h = e.location; + g.F() ? (d.x = g.x + c, d.y = g.y + b, e.position = d) : h.F() && (d.x = h.x + c, d.y = h.y + b, e.location = d) + } + } + for (a.reset(); a.next();) e = a.value, e instanceof G && (g = e.position, d.x = g.x + c, d.y = g.y + b, e.move(d)); + z.A(d) + }; + + function Zi() { + O.call(this); + this.df = Kd; + this.ws = new w(NaN, NaN, NaN, NaN) + } + z.Qa(Zi, O); + z.ia("Placeholder", Zi); + Zi.prototype.cloneProtected = function(a) { + O.prototype.cloneProtected.call(this, a); + a.df = this.df.V(); + a.ws = this.ws.copy() + }; + Zi.prototype.lk = function(a) { + if (null === this.background && null === this.vl) return !1; + var b = this.Ga; + return Jb(0, 0, b.width, b.height, a.x, a.y) + }; + Zi.prototype.Ip = function() { + var a = this.ca; + null !== a && (a instanceof F || a instanceof da) || z.k("Placeholder is not inside a Group or Adornment."); + if (a instanceof F) { + var b = this.computeBorder(this.ws), + c = this.Wc; + yb(c, b.width || 0, b.height || 0); + Jm(this, 0, 0, c.width, c.height); + for (var c = a.Hc, d = !1; c.next();) + if (c.value.isVisible()) { + d = !0; + break + }!d || isNaN(b.x) || isNaN(b.y) || (c = new N, c.ru(b, a.of), a.location = new N(c.x, c.y)) + } else { + var b = this.Aa, + c = this.Wc, + d = this.padding, + e = d.left + d.right, + g = d.top + d.bottom; + if (b.F()) yb(c, b.width + + e || 0, b.height + g || 0), Jm(this, -d.left, -d.top, c.width, c.height); + else { + var h = a.fc, + k = h.fb(Zb, z.O()), + b = z.yk(k.x, k.y, 0, 0); + b.vj(h.fb(ic, k)); + b.vj(h.fb(cc, k)); + b.vj(h.fb(gc, k)); + a.Ki.n(b.x, b.y); + yb(c, b.width + e || 0, b.height + g || 0); + Jm(this, -d.left, -d.top, c.width, c.height); + z.A(k); + z.dc(b) + } + } + }; + Zi.prototype.$i = function(a, b, c, d) { + var e = this.W; + e.x = a; + e.y = b; + e.width = c; + e.height = d + }; + Zi.prototype.computeBorder = function(a) { + var b = this.ca; + if (b instanceof F) { + var c = b; + if (c.VD && this.ws.F()) { + var d = c.h; + if (null !== d && (d = d.eb, d instanceof ih && !d.Uq && null !== d.hc && !d.hc.contains(c))) return a.assign(this.ws), a + } + } + var c = z.kg(), + d = this.computeMemberBounds(c), + e = this.padding; + a.n(d.x - e.left, d.y - e.top, d.width + e.left + e.right, d.height + e.top + e.bottom); + z.dc(c); + b instanceof F && (c = b, c.gH && c.location.F() && a.vj(c.location)); + return a + }; + Zi.prototype.computeMemberBounds = function(a) { + if (!(this.ca instanceof F)) return a.n(0, 0, 0, 0), a; + for (var b = this.ca, c = Infinity, d = Infinity, e = -Infinity, g = -Infinity, h = b.Hc; h.next();) { + var k = h.value; + if (k.isVisible()) { + if (k instanceof G) { + var l = k; + if (!b.Ow) continue; + if (ml(l)) continue; + if (l.Y === b || l.da === b) continue + } + k = k.W; + k.left < c && (c = k.left); + k.top < d && (d = k.top); + k.right > e && (e = k.right); + k.bottom > g && (g = k.bottom) + } + } + isFinite(c) && isFinite(d) ? a.n(c, d, e - c, g - d) : (b = b.location, c = this.padding, a.n(b.x + c.left, b.y + c.top, 0, 0)); + return a + }; + z.defineProperty(Zi, { + padding: "padding" + }, function() { + return this.df + }, function(a) { + "number" === typeof a ? ((isNaN(a) || 0 > a) && z.ka(a, ">= 0", Zi, "padding"), a = new Db(a)) : (z.l(a, Db, Zi, "padding"), (isNaN(a.left) || 0 > a.left) && z.ka(a.left, ">= 0", Zi, "padding:value.left"), (isNaN(a.right) || 0 > a.right) && z.ka(a.right, ">= 0", Zi, "padding:value.right"), (isNaN(a.top) || 0 > a.top) && z.ka(a.top, ">= 0", Zi, "padding:value.top"), (isNaN(a.bottom) || 0 > a.bottom) && z.ka(a.bottom, ">= 0", Zi, "padding:value.bottom")); + var b = this.df; + b.N(a) || (this.df = + a = a.V(), this.j("padding", b, a)) + }); + + function vg() { + 0 < arguments.length && z.od(vg); + z.kc(this); + this.Py = this.Z = null; + this.Kj = this.lr = !0; + this.ur = !1; + this.pq = (new N(0, 0)).freeze(); + this.nr = this.or = !0; + this.VB = ""; + this.uo = !1; + this.ez = null + } + z.ia("Layout", vg); + vg.prototype.cloneProtected = function(a) { + a.lr = this.lr; + a.Kj = this.Kj; + a.ur = this.ur; + a.pq.assign(this.pq); + a.or = this.or; + a.nr = this.nr; + a.VB = this.VB; + this.Kj || (a.uo = !0) + }; + vg.prototype.copy = function() { + var a = new this.constructor; + this.cloneProtected(a); + return a + }; + vg.prototype.toString = function() { + var a = z.kf(Object.getPrototypeOf(this)), + a = a + "("; + null !== this.group && (a += " in " + this.group); + null !== this.h && (a += " for " + this.h); + return a + ")" + }; + z.defineProperty(vg, { + h: "diagram" + }, function() { + return this.Z + }, function(a) { + null !== a && z.l(a, C, vg, "diagram"); + this.Z = a + }); + z.defineProperty(vg, { + group: "group" + }, function() { + return this.Py + }, function(a) { + this.Py !== a && (null !== a && z.l(a, F, vg, "group"), this.Py = a, null !== a && (this.Z = a.h)) + }); + z.defineProperty(vg, { + iI: "isOngoing" + }, function() { + return this.lr + }, function(a) { + this.lr !== a && (z.g(a, "boolean", vg, "isOngoing"), this.lr = a) + }); + z.defineProperty(vg, { + RE: "isInitial" + }, function() { + return this.Kj + }, function(a) { + z.g(a, "boolean", vg, "isInitial"); + this.Kj = a; + a || (this.uo = !0) + }); + z.defineProperty(vg, { + mx: "isViewportSized" + }, function() { + return this.ur + }, function(a) { + this.ur !== a && (z.g(a, "boolean", vg, "isViewportSized"), (this.ur = a) && this.I()) + }); + z.defineProperty(vg, { + Rt: "isRouting" + }, function() { + return this.or + }, function(a) { + this.or !== a && (z.g(a, "boolean", vg, "isRouting"), this.or = a) + }); + z.defineProperty(vg, { + SE: "isRealtime" + }, function() { + return this.nr + }, function(a) { + this.nr !== a && (z.g(a, "boolean", vg, "isRealtime"), this.nr = a) + }); + z.defineProperty(vg, { + Gf: "isValidLayout" + }, function() { + return this.uo + }, function(a) { + this.uo !== a && (z.g(a, "boolean", vg, "isValidLayout"), this.uo = a, a || (a = this.h, null !== a && (a.Qu = !0))) + }); + vg.prototype.invalidateLayout = vg.prototype.I = function() { + if (this.uo) { + var a = this.h; + if (null !== a && !a.pa.qb) { + var b = a.Ua; + !b.to && (b.nf && b.oi(), this.iI && a.kn || this.RE && !a.kn) && (this.Gf = !1, a.Ce()) + } + } + }; + z.defineProperty(vg, { + network: "network" + }, function() { + return this.ez + }, function(a) { + var b = this.ez; + b !== a && (null !== a && z.l(a, wa, vg, "network"), null !== b && (b.Sb = null), this.ez = a, null !== a && (a.Sb = this)) + }); + vg.prototype.createNetwork = function() { + return new wa + }; + vg.prototype.makeNetwork = function(a) { + var b = this.createNetwork(); + b.Sb = this; + a instanceof C ? (b.ik(a.Lg, !0), b.ik(a.links, !0)) : a instanceof F ? b.ik(a.Hc) : b.ik(a.i); + return b + }; + vg.prototype.updateParts = function() { + var a = this.h; + if (null === a && null !== this.network) + for (var b = this.network.vertexes.i; b.next();) { + var c = b.value.Pc; + if (null !== c && (a = c.h, null !== a)) break + } + this.Gf = !0; + try { + null !== a && a.Wb("Layout"), this.commitLayout() + } finally { + null !== a && a.Jd("Layout") + } + }; + vg.prototype.commitLayout = function() { + for (var a = this.network.vertexes.i; a.next();) a.value.commit(); + if (this.Rt) + for (a = this.network.edges.i; a.next();) a.value.commit() + }; + vg.prototype.doLayout = function(a) { + null === a && z.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); + var b = new K(D); + a instanceof C ? (vq(this, b, a.Lg, !0, this.wA, !0, !1, !0), vq(this, b, a.ni, !0, this.wA, !0, !1, !0)) : a instanceof F ? vq(this, b, a.Hc, !1, this.wA, !0, !1, !0) : b.$c(a.i); + var c = b.count; + if (0 < c) { + a = this.h; + null !== a && a.Wb("Layout"); + for (var c = Math.ceil(Math.sqrt(c)), d = this.je.x, e = d, g = this.je.y, h = 0, k = 0, b = b.i; b.next();) { + var l = b.value; + l.Bf(); + var m = l.Ia, + n = m.width, + m = m.height; + l.moveTo(e, g); + l.dz = !1; + e += Math.max(n, 50) + 20; + k = Math.max(k, Math.max(m, 50)); + h >= c - 1 ? (h = 0, e = d, g += k + 20, k = 0) : h++ + } + null !== a && a.Jd("Layout") + } + this.Gf = !0 + }; + vg.prototype.wA = function(a) { + return !a.location.F() || a instanceof F && a.dz ? !0 : !1 + }; + + function vq(a, b, c, d, e, g, h, k) { + for (c = c.i; c.next();) { + var l = c.value; + d && !l.Bp || null !== e && !e(l) || !l.canLayout() || (g && l instanceof E ? l.Df || (l instanceof F ? null === l.Sb ? vq(a, b, l.Hc, !1, e, g, h, k) : b.add(l) : b.add(l)) : h && l instanceof G ? b.add(l) : !k || !l.be() || l instanceof E || b.add(l)) + } + } + vg.prototype.collectParts = vg.prototype.aH = function(a) { + var b = new K(D); + a instanceof C ? (vq(this, b, a.Lg, !0, null, !0, !0, !0), vq(this, b, a.links, !0, null, !0, !0, !0), vq(this, b, a.ni, !0, null, !0, !0, !0)) : a instanceof F ? vq(this, b, a.Hc, !1, null, !0, !0, !0) : vq(this, b, a.i, !1, null, !0, !0, !0); + return b + }; + z.defineProperty(vg, { + je: "arrangementOrigin" + }, function() { + return this.pq + }, function(a) { + z.l(a, N, vg, "arrangementOrigin"); + this.pq.N(a) || (this.pq.assign(a), this.I()) + }); + vg.prototype.initialOrigin = function(a) { + var b = this.group; + if (null !== b) { + var c = b.position.copy(); + (isNaN(c.x) || isNaN(c.y)) && c.set(a); + b = b.placeholder; + null !== b && (c = b.fb(Zb), (isNaN(c.x) || isNaN(c.y)) && c.set(a), c.x += b.padding.left, c.y += b.padding.top); + return c + } + return a + }; + + function wa() { + z.kc(this); + this.he = null; + this.clear() + } + z.ia("LayoutNetwork", wa); + wa.prototype.clear = function() { + if (this.vertexes) + for (var a = this.vertexes.i; a.next();) { + var b = a.value; + b.clear(); + b.network = null + } + if (this.edges) + for (a = this.edges.i; a.next();) b = a.value, b.clear(), b.network = null; + this.vertexes = new K(xa); + this.edges = new K(ya); + this.AA = new na(E, xa); + this.mA = new na(G, ya) + }; + wa.prototype.toString = function(a) { + void 0 === a && (a = 0); + var b = "LayoutNetwork" + (null !== this.Sb ? "(" + this.Sb.toString() + ")" : ""); + if (0 >= a) return b; + b += " vertexes: " + this.vertexes.count + " edges: " + this.edges.count; + if (1 < a) { + for (var c = this.vertexes.i; c.next();) b += "\n " + c.value.toString(a - 1); + for (c = this.edges.i; c.next();) b += "\n " + c.value.toString(a - 1) + } + return b + }; + z.defineProperty(wa, { + Sb: "layout" + }, function() { + return this.he + }, function(a) { + u && null !== a && z.l(a, vg, wa, "layout"); + this.he = a + }); + wa.prototype.createVertex = function() { + return new xa + }; + wa.prototype.createEdge = function() { + return new ya + }; + wa.prototype.addParts = wa.prototype.ik = function(a, b, c) { + if (null !== a) { + void 0 === b && (b = !1); + z.g(b, "boolean", wa, "addParts:toplevelonly"); + void 0 === c && (c = null); + null === c && (c = function(a) { + if (a instanceof E) return !a.Df; + if (a instanceof G) { + var b = a.Y; + if (null === b || b.Df) return !1; + a = a.da; + return null === a || a.Df ? !1 : !0 + } + return !1 + }); + for (a = a.i; a.next();) { + var d = a.value; + if (d instanceof E && (!b || d.Bp) && d.canLayout() && c(d)) + if (d instanceof F && null === d.Sb) this.ik(d.Hc, !1); + else if (null === this.en(d)) { + var e = this.createVertex(); + e.Pc = d; + this.tl(e) + } + } + for (a.reset(); a.next();) + if (d = a.value, d instanceof G && (!b || d.Bp) && d.canLayout() && c(d) && null === this.Ww(d)) { + var g = d.Y, + e = d.da; + null !== g && null !== e && g !== e && (g = this.findGroupVertex(g), e = this.findGroupVertex(e), null !== g && null !== e && this.Hp(g, e, d)) + } + } + }; + wa.prototype.findGroupVertex = function(a) { + if (null === a) return null; + var b = a.findVisibleNode(); + if (null === b) return null; + a = this.en(b); + if (null !== a) return a; + for (b = b.Va; null !== b;) { + a = this.en(b); + if (null !== a) return a; + b = b.Va + } + return null + }; + wa.prototype.addVertex = wa.prototype.tl = function(a) { + if (null !== a) { + u && z.l(a, xa, wa, "addVertex:vertex"); + this.vertexes.add(a); + var b = a.Pc; + null !== b && this.AA.add(b, a); + a.network = this + } + }; + wa.prototype.addNode = wa.prototype.ht = function(a) { + if (null === a) return null; + u && z.l(a, E, wa, "addNode:node"); + var b = this.en(a); + null === b && (b = this.createVertex(), b.Pc = a, this.tl(b)); + return b + }; + wa.prototype.deleteVertex = wa.prototype.gE = function(a) { + if (null !== a && (u && z.l(a, xa, wa, "deleteVertex:vertex"), wq(this, a))) { + for (var b = a.Ze, c = b.count - 1; 0 <= c; c--) { + var d = b.ea(c); + this.ip(d) + } + b = a.Te; + for (c = b.count - 1; 0 <= c; c--) d = b.ea(c), this.ip(d) + } + }; + + function wq(a, b) { + if (null === b) return !1; + var c = a.vertexes.remove(b); + c && (a.AA.remove(b.Pc), b.network = null); + return c + } + wa.prototype.deleteNode = function(a) { + null !== a && (u && z.l(a, E, wa, "deleteNode:node"), a = this.en(a), null !== a && this.gE(a)) + }; + wa.prototype.findVertex = wa.prototype.en = function(a) { + if (null === a) return null; + u && z.l(a, E, wa, "findVertex:node"); + return this.AA.na(a) + }; + wa.prototype.addEdge = wa.prototype.$o = function(a) { + if (null !== a) { + u && z.l(a, ya, wa, "addEdge:edge"); + this.edges.add(a); + var b = a.link; + null !== b && null === this.Ww(b) && this.mA.add(b, a); + b = a.toVertex; + null !== b && b.ED(a); + b = a.fromVertex; + null !== b && b.DD(a); + a.network = this + } + }; + wa.prototype.addLink = function(a) { + if (null === a) return null; + u && z.l(a, G, wa, "addLink:link"); + var b = a.Y, + c = a.da, + d = this.Ww(a); + null === d ? (d = this.createEdge(), d.link = a, null !== b && (d.fromVertex = this.ht(b)), null !== c && (d.toVertex = this.ht(c)), this.$o(d)) : (d.fromVertex = null !== b ? this.ht(b) : null, d.toVertex = null !== c ? this.ht(c) : null); + return d + }; + wa.prototype.deleteEdge = wa.prototype.ip = function(a) { + if (null !== a) { + u && z.l(a, ya, wa, "deleteEdge:edge"); + var b = a.toVertex; + null !== b && b.fE(a); + b = a.fromVertex; + null !== b && b.eE(a); + xq(this, a) + } + }; + + function xq(a, b) { + null !== b && a.edges.remove(b) && (a.mA.remove(b.link), b.network = null) + } + wa.prototype.deleteLink = function(a) { + null !== a && (u && z.l(a, G, wa, "deleteLink:link"), a = this.Ww(a), null !== a && this.ip(a)) + }; + wa.prototype.findEdge = wa.prototype.Ww = function(a) { + if (null === a) return null; + u && z.l(a, G, wa, "findEdge:link"); + return this.mA.na(a) + }; + wa.prototype.linkVertexes = wa.prototype.Hp = function(a, b, c) { + if (null === a || null === b) return null; + u && (z.l(a, xa, wa, "linkVertexes:fromVertex"), z.l(b, xa, wa, "linkVertexes:toVertex"), null !== c && z.l(c, G, wa, "linkVertexes:link")); + if (a.network === this && b.network === this) { + var d = this.createEdge(); + d.link = c; + d.fromVertex = a; + d.toVertex = b; + this.$o(d); + return d + } + return null + }; + wa.prototype.reverseEdge = wa.prototype.Fx = function(a) { + if (null !== a) { + u && z.l(a, ya, wa, "reverseEdge:edge"); + var b = a.fromVertex, + c = a.toVertex; + null !== b && null !== c && (b.eE(a), c.fE(a), a.Fx(), b.ED(a), c.DD(a)) + } + }; + wa.prototype.deleteSelfEdges = wa.prototype.Sw = function() { + for (var a = z.rb(), b = this.edges.i; b.next();) { + var c = b.value; + c.fromVertex === c.toVertex && a.push(c) + } + b = a.length; + for (c = 0; c < b; c++) this.ip(a[c]); + z.xa(a) + }; + wa.prototype.deleteArtificialVertexes = function() { + for (var a = z.rb(), b = this.vertexes.i; b.next();) { + var c = b.value; + null === c.Pc && a.push(c) + } + c = a.length; + for (b = 0; b < c; b++) this.gE(a[b]); + c = z.rb(); + for (b = this.edges.i; b.next();) { + var d = b.value; + null === d.link && c.push(d) + } + d = c.length; + for (b = 0; b < d; b++) this.ip(c[b]); + z.xa(a); + z.xa(c) + }; + + function yq(a) { + for (var b = z.rb(), c = a.edges.i; c.next();) { + var d = c.value; + null !== d.fromVertex && null !== d.toVertex || b.push(d) + } + c = b.length; + for (d = 0; d < c; d++) a.ip(b[d]); + z.xa(b) + } + wa.prototype.splitIntoSubNetworks = wa.prototype.pJ = function() { + this.deleteArtificialVertexes(); + yq(this); + this.Sw(); + for (var a = new J(wa), b = !0; b;) + for (var b = !1, c = this.vertexes.i; c.next();) { + var d = c.value; + if (0 < d.Ze.count || 0 < d.Te.count) { + b = this.Sb.createNetwork(); + a.add(b); + zq(this, b, d); + b = !0; + break + } + } + a.sort(function(a, b) { + return null === a || null === b || a === b ? 0 : b.vertexes.count - a.vertexes.count + }); + return a + }; + + function zq(a, b, c) { + if (null !== c && c.network !== b) { + wq(a, c); + b.tl(c); + for (var d = c.tc; d.next();) { + var e = d.value; + e.network !== b && (xq(a, e), b.$o(e), zq(a, b, e.fromVertex)) + } + for (d = c.pc; d.next();) c = d.value, c.network !== b && (xq(a, c), b.$o(c), zq(a, b, c.toVertex)) + } + } + wa.prototype.findAllParts = function() { + for (var a = new K(D), b = this.vertexes.i; b.next();) a.add(b.value.Pc); + for (b = this.edges.i; b.next();) a.add(b.value.link); + return a + }; + + function xa() { + z.kc(this); + this.network = null; + this.P = (new w(0, 0, 10, 10)).freeze(); + this.R = (new N(5, 5)).freeze(); + this.clear() + } + z.ia("LayoutVertex", xa); + xa.prototype.clear = function() { + this.Bd = this.fe = null; + this.Ze = new J(ya); + this.Te = new J(ya) + }; + xa.prototype.toString = function(a) { + void 0 === a && (a = 0); + var b = "LayoutVertex#" + z.nd(this); + if (0 < a && (b += null !== this.Pc ? "(" + this.Pc.toString() + ")" : "", 1 < a)) { + a = ""; + for (var c = !0, d = this.Ze.i; d.next();) { + var e = d.value; + c ? c = !1 : a += ","; + a += e.toString(0) + } + e = ""; + c = !0; + for (d = this.Te.i; d.next();) { + var g = d.value; + c ? c = !1 : e += ","; + e += g.toString(0) + } + b += " sources: " + a + " destinations: " + e + } + return b + }; + z.defineProperty(xa, { + data: "data" + }, function() { + return this.fe + }, function(a) { + this.fe = a; + if (null !== a) { + var b = a.bounds; + a = b.x; + var c = b.y, + d = b.width, + b = b.height; + this.R.n(d / 2, b / 2); + this.P.n(a, c, d, b) + } + }); + z.defineProperty(xa, { + Pc: "node" + }, function() { + return this.Bd + }, function(a) { + if (this.Bd !== a) { + u && null !== a && z.l(a, E, xa, "node"); + this.Bd = a; + a.Bf(); + var b = a.W, + c = b.x, + d = b.y, + e = b.width, + b = b.height; + isNaN(c) && (c = 0); + isNaN(d) && (d = 0); + this.P.n(c, d, e, b); + if (!(a instanceof F) && (a = a.Zb.fb(ec), a.F())) { + this.R.n(a.x - c, a.y - d); + return + } + this.R.n(e / 2, b / 2) + } + }); + z.defineProperty(xa, { + vb: "bounds" + }, function() { + return this.P + }, function(a) { + this.P.N(a) || (u && z.l(a, w, xa, "bounds"), this.P.assign(a)) + }); + z.defineProperty(xa, { + focus: "focus" + }, function() { + return this.R + }, function(a) { + this.R.N(a) || (u && z.l(a, N, xa, "focus"), this.R.assign(a)) + }); + z.defineProperty(xa, { + ra: "centerX" + }, function() { + return this.P.x + this.R.x + }, function(a) { + var b = this.P; + b.x + this.R.x !== a && (u && z.p(a, xa, "centerX"), b.Wa(), b.x = a - this.R.x, b.freeze()) + }); + z.defineProperty(xa, { + za: "centerY" + }, function() { + return this.P.y + this.R.y + }, function(a) { + var b = this.P; + b.y + this.R.y !== a && (u && z.p(a, xa, "centerY"), b.Wa(), b.y = a - this.R.y, b.freeze()) + }); + z.defineProperty(xa, { + Ct: "focusX" + }, function() { + return this.R.x + }, function(a) { + var b = this.R; + b.x !== a && (b.Wa(), b.x = a, b.freeze()) + }); + z.defineProperty(xa, { + Dt: "focusY" + }, function() { + return this.R.y + }, function(a) { + var b = this.R; + b.y !== a && (b.Wa(), b.y = a, b.freeze()) + }); + z.defineProperty(xa, { + x: "x" + }, function() { + return this.P.x + }, function(a) { + var b = this.P; + b.x !== a && (b.Wa(), b.x = a, b.freeze()) + }); + z.defineProperty(xa, { + y: "y" + }, function() { + return this.P.y + }, function(a) { + var b = this.P; + b.y !== a && (b.Wa(), b.y = a, b.freeze()) + }); + z.defineProperty(xa, { + width: "width" + }, function() { + return this.P.width + }, function(a) { + var b = this.P; + b.width !== a && (b.Wa(), b.width = a, b.freeze()) + }); + z.defineProperty(xa, { + height: "height" + }, function() { + return this.P.height + }, function(a) { + var b = this.P; + b.height !== a && (b.Wa(), b.height = a, b.freeze()) + }); + xa.prototype.commit = function() { + var a = this.fe; + if (null !== a) { + var b = this.vb, + c = a.bounds; + z.Za(c) ? (c.x = b.x, c.y = b.y, c.width = b.width, c.height = b.height) : a.bounds = b.copy() + } else if (a = this.Pc, null !== a) { + b = this.vb; + if (!(a instanceof F)) { + var c = a.W, + d = a.Zb.fb(ec); + if (c.F() && d.F()) { + a.moveTo(b.x + this.Ct - (d.x - c.x), b.y + this.Dt - (d.y - c.y)); + return + } + } + a.moveTo(b.x, b.y) + } + }; + xa.prototype.addSourceEdge = xa.prototype.ED = function(a) { + null !== a && (u && z.l(a, ya, xa, "addSourceEdge:edge"), this.Ze.contains(a) || this.Ze.add(a)) + }; + xa.prototype.deleteSourceEdge = xa.prototype.fE = function(a) { + null !== a && (u && z.l(a, ya, xa, "deleteSourceEdge:edge"), this.Ze.remove(a)) + }; + xa.prototype.addDestinationEdge = xa.prototype.DD = function(a) { + null !== a && (u && z.l(a, ya, xa, "addDestinationEdge:edge"), this.Te.contains(a) || this.Te.add(a)) + }; + xa.prototype.deleteDestinationEdge = xa.prototype.eE = function(a) { + null !== a && (u && z.l(a, ya, xa, "deleteDestinationEdge:edge"), this.Te.remove(a)) + }; + z.w(xa, { + oJ: "sourceVertexes" + }, function() { + for (var a = new K(xa), b = this.tc; b.next();) a.add(b.value.fromVertex); + return a.i + }); + z.w(xa, { + rH: "destinationVertexes" + }, function() { + for (var a = new K(xa), b = this.pc; b.next();) a.add(b.value.toVertex); + return a.i + }); + z.w(xa, { + vertexes: "vertexes" + }, function() { + for (var a = new K(xa), b = this.tc; b.next();) a.add(b.value.fromVertex); + for (b = this.pc; b.next();) a.add(b.value.toVertex); + return a.i + }); + z.w(xa, { + tc: "sourceEdges" + }, function() { + return this.Ze.i + }); + z.w(xa, { + pc: "destinationEdges" + }, function() { + return this.Te.i + }); + z.w(xa, { + edges: "edges" + }, function() { + for (var a = new J(ya), b = this.tc; b.next();) a.add(b.value); + for (b = this.pc; b.next();) a.add(b.value); + return a.i + }); + z.w(xa, { + CH: "edgesCount" + }, function() { + return this.Ze.count + this.Te.count + }); + var Aq; + xa.standardComparer = Aq = function(a, b) { + u && z.l(a, xa, xa, "standardComparer:m"); + u && z.l(b, xa, xa, "standardComparer:n"); + var c = a.Bd, + d = b.Bd; + return c ? d ? (c = c.text, d = d.text, c < d ? -1 : c > d ? 1 : 0) : 1 : null !== d ? -1 : 0 + }; + xa.smartComparer = function(a, b) { + u && z.l(a, xa, xa, "smartComparer:m"); + u && z.l(b, xa, xa, "smartComparer:n"); + if (null !== a) { + if (null !== b) { + var c = a.Bd, + d = b.Bd; + if (null !== c) { + if (null !== d) { + for (var c = c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), d = d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), e = 0; e < c.length; e++) + if ("" !== d[e] && void 0 !== d[e]) { + var g = parseFloat(c[e]), + h = parseFloat(d[e]); + if (isNaN(g)) { + if (!isNaN(h)) return 1; + if (0 !== c[e].localeCompare(d[e])) return c[e].localeCompare(d[e]) + } else { + if (isNaN(h)) return -1; + if (0 !== g - h) return g - h + } + } else if ("" !== c[e]) return 1; + return "" !== d[e] && void 0 !== d[e] ? -1 : 0 + } + return 1 + } + return null !== d ? -1 : 0 + } + return 1 + } + return null !== b ? -1 : 0 + }; + + function ya() { + z.kc(this); + this.network = null; + this.clear() + } + z.ia("LayoutEdge", ya); + ya.prototype.clear = function() { + this.toVertex = this.fromVertex = this.link = this.data = null + }; + ya.prototype.toString = function(a) { + void 0 === a && (a = 0); + var b = "LayoutEdge#" + z.nd(this); + 0 < a && (b += null !== this.link ? "(" + this.link.toString() + ")" : "", 1 < a && (b += " " + (this.fromVertex ? this.fromVertex.toString() : "null") + " --\x3e " + (this.toVertex ? this.toVertex.toString() : "null"))); + return b + }; + ya.prototype.Fx = function() { + var a = this.fromVertex; + this.fromVertex = this.toVertex; + this.toVertex = a + }; + ya.prototype.commit = function() {}; + ya.prototype.getOtherVertex = ya.prototype.NH = function(a) { + u && z.l(a, xa, ya, "getOtherVertex:v"); + return this.toVertex === a ? this.fromVertex : this.fromVertex === a ? this.toVertex : null + }; + + function tm() { + 0 < arguments.length && z.od(tm); + vg.call(this); + this.mx = !0; + this.ct = this.dt = NaN; + this.zj = (new Ea(NaN, NaN)).freeze(); + this.ai = (new Ea(10, 10)).freeze(); + this.Ie = An; + this.qd = tn; + this.$h = pn; + this.Jh = Bq + } + z.Qa(tm, vg); + z.ia("GridLayout", tm); + tm.prototype.cloneProtected = function(a) { + vg.prototype.cloneProtected.call(this, a); + a.dt = this.dt; + a.ct = this.ct; + a.zj.assign(this.zj); + a.ai.assign(this.ai); + a.Ie = this.Ie; + a.qd = this.qd; + a.$h = this.$h; + a.Jh = this.Jh + }; + tm.prototype.doLayout = function(a) { + null === a && z.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); + this.je = this.initialOrigin(this.je); + var b = this.h; + a = this.aH(a); + for (var c = a.copy().i; c.next();) { + var d = c.value; + if (d instanceof G) { + var e = d; + if (null !== e.Y || null !== e.da) { + a.remove(e); + continue + } + } + d.Bf(); + if (d instanceof F) + for (d = d.Hc; d.next();) a.remove(d.value) + } + e = a.jc(); + if (0 !== e.length) { + switch (this.sorting) { + case sn: + e.reverse(); + break; + case pn: + e.sort(this.comparer); + break; + case qn: + e.sort(this.comparer), e.reverse() + } + var g = this.EJ; + isNaN(g) && (g = 0); + var h = this.jG, + h = isNaN(h) && null !== b ? Math.max(b.xb.width - b.padding.left - b.padding.right, 0) : Math.max(this.jG, 0); + 0 >= g && 0 >= h && (g = 1); + a = this.spacing.width; + isFinite(a) || (a = 0); + c = this.spacing.height; + isFinite(c) || (c = 0); + null !== b && b.Wb("Layout"); + d = []; + switch (this.alignment) { + case Bn: + var k = a, + l = c, + m = Math.max(this.dp.width, 1); + if (!isFinite(m)) + for (var n = m = 0; n < e.length; n++) var p = e[n], + q = p.Ia, + m = Math.max(m, q.width); + var m = Math.max(m + k, 1), + r = Math.max(this.dp.height, + 1); + if (!isFinite(r)) + for (n = r = 0; n < e.length; n++) p = e[n], q = p.Ia, r = Math.max(r, q.height); + for (var r = Math.max(r + l, 1), s = this.Xf, t = this.je.x, v = t, x = this.je.y, y = 0, A = 0, n = 0; n < e.length; n++) { + var p = e[n], + q = p.Ia, + B = Math.ceil((q.width + k) / m) * m, + L = Math.ceil((q.height + l) / r) * r, + H = 0; + switch (s) { + case zn: + H = Math.abs(v - q.width); + break; + default: + H = v + q.width + } + if (0 < g && y > g - 1 || 0 < h && 0 < y && H > h) d.push(new w(0, x, h + k, A)), y = 0, v = t, x += A, A = 0; + A = Math.max(A, L); + L = 0; + switch (s) { + case zn: + L = -q.width; + break; + default: + L = 0 + } + p.moveTo(v + L, x); + switch (s) { + case zn: + v -= B; + break; + default: + v += B + } + y++ + } + d.push(new w(0, x, h + k, A)); + break; + case An: + k = g; + l = a; + m = c; + n = Math.max(this.dp.width, 1); + p = x = B = 0; + q = z.O(); + for (g = 0; g < e.length; g++) r = e[g], s = r.Ia, t = lp(r, r.Zb, r.of, q), B = Math.max(B, t.x), x = Math.max(x, s.width - t.x), p = Math.max(p, t.y); + v = this.Xf; + switch (v) { + case zn: + B += l; + break; + default: + x += l + } + var n = isFinite(n) ? Math.max(n + l, 1) : Math.max(B + x, 1), + U = x = this.je.x, + y = this.je.y, + A = 0; + h >= B && (h -= B); + for (var B = L = 0, H = Math.max(this.dp.height, 1), ea = p = 0, W = !0, P = z.O(), g = 0; g < e.length; g++) { + r = e[g]; + s = r.Ia; + t = lp(r, r.Zb, r.of, q); + if (0 < A) switch (v) { + case zn: + U = + (U - x - (s.width - t.x)) / n; + U = td(Math.round(U), U) ? Math.round(U) : Math.floor(U); + U = U * n + x; + break; + default: + U = (U - x + t.x) / n, U = td(Math.round(U), U) ? Math.round(U) : Math.ceil(U), U = U * n + x + } else switch (v) { + case zn: + L = U + t.x + s.width; + break; + default: + L = U - t.x + } + var ba = 0; + switch (v) { + case zn: + ba = -(U + t.x) + L; + break; + default: + ba = U + s.width - t.x - L + } + if (0 < k && A > k - 1 || 0 < h && 0 < A && ba > h) { + d.push(new w(0, W ? y - p : y, h + l, ea + p + m)); + for (U = 0; U < A && g !== A; U++) { + var ba = e[g - A + U], + Oa = lp(ba, ba.Zb, ba.of, P); + ba.moveTo(ba.position.x, ba.position.y + p - Oa.y) + } + ea += m; + y = W ? y + ea : y + (ea + p); + A = ea = p = 0; + U = x; + W = !1 + } + U === x && (B = v === zn ? Math.max(B, s.width - t.x) : Math.min(B, -t.x)); + p = Math.max(p, t.y); + ea = Math.max(ea, s.height - t.y); + isFinite(H) && (ea = Math.max(ea, Math.max(s.height, H) - t.y)); + W ? r.moveTo(U - t.x, y - t.y) : r.moveTo(U - t.x, y); + switch (v) { + case zn: + U -= t.x + l; + break; + default: + U += s.width - t.x + l + } + A++ + } + d.push(new w(0, y, h + l, (W ? ea : ea + p) + m)); + for (U = 0; U < A && g !== A; U++) ba = e[g - A + U], Oa = lp(ba, ba.Zb, ba.of, q), ba.moveTo(ba.position.x, ba.position.y + p - Oa.y); + z.A(q); + z.A(P); + if (v === zn) + for (g = 0; g < d.length; g++) e = d[g], e.width += B, e.x -= B; + else + for (g = + 0; g < d.length; g++) e = d[g], e.x > B && (e.width += e.x - B, e.x = B) + } + for (k = g = h = e = 0; k < d.length; k++) l = d[k], e = Math.min(e, l.x), h = Math.min(h, l.y), g = Math.max(g, l.x + l.width); + this.Xf === zn ? this.commitLayers(d, new N(e + a / 2 - (g + e), h - c / 2)) : this.commitLayers(d, new N(e - a / 2, h - c / 2)); + null !== b && b.Jd("Layout"); + this.Gf = !0 + } + }; + tm.prototype.commitLayers = function() {}; + z.defineProperty(tm, { + jG: "wrappingWidth" + }, function() { + return this.dt + }, function(a) { + this.dt !== a && (z.g(a, "number", tm, "wrappingWidth"), 0 < a || isNaN(a)) && (this.dt = a, this.mx = isNaN(a), this.I()) + }); + z.defineProperty(tm, { + EJ: "wrappingColumn" + }, function() { + return this.ct + }, function(a) { + this.ct !== a && (z.g(a, "number", tm, "wrappingColumn"), 0 < a || isNaN(a)) && (this.ct = a, this.I()) + }); + z.defineProperty(tm, { + dp: "cellSize" + }, function() { + return this.zj + }, function(a) { + z.l(a, Ea, tm, "cellSize"); + this.zj.N(a) || (this.zj.assign(a), this.I()) + }); + z.defineProperty(tm, { + spacing: "spacing" + }, function() { + return this.ai + }, function(a) { + z.l(a, Ea, tm, "spacing"); + this.ai.N(a) || (this.ai.assign(a), this.I()) + }); + z.defineProperty(tm, { + alignment: "alignment" + }, function() { + return this.Ie + }, function(a) { + this.Ie !== a && (z.Ba(a, tm, tm, "alignment"), a === An || a === Bn) && (this.Ie = a, this.I()) + }); + z.defineProperty(tm, { + Xf: "arrangement" + }, function() { + return this.qd + }, function(a) { + this.qd !== a && (z.Ba(a, tm, tm, "arrangement"), a === tn || a === zn) && (this.qd = a, this.I()) + }); + z.defineProperty(tm, { + sorting: "sorting" + }, function() { + return this.$h + }, function(a) { + this.$h !== a && (z.Ba(a, tm, tm, "sorting"), a === rn || a === sn || a === pn || a === qn) && (this.$h = a, this.I()) + }); + z.defineProperty(tm, { + comparer: "comparer" + }, function() { + return this.Jh + }, function(a) { + this.Jh !== a && (z.g(a, "function", tm, "comparer"), this.Jh = a, this.I()) + }); + var Bq; + tm.standardComparer = Bq = function(a, b) { + u && z.l(a, D, tm, "standardComparer:a"); + u && z.l(b, D, tm, "standardComparer:b"); + var c = a.text, + d = b.text; + return c < d ? -1 : c > d ? 1 : 0 + }; + tm.smartComparer = function(a, b) { + u && z.l(a, D, tm, "standardComparer:a"); + u && z.l(b, D, tm, "standardComparer:b"); + if (null !== a) { + if (null !== b) { + for (var c = a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), d = b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), e = 0; e < c.length; e++) + if ("" !== d[e] && void 0 !== d[e]) { + var g = parseFloat(c[e]), + h = parseFloat(d[e]); + if (isNaN(g)) { + if (!isNaN(h)) return 1; + if (0 !== c[e].localeCompare(d[e])) return c[e].localeCompare(d[e]) + } else { + if (isNaN(h)) return -1; + if (0 !== g - h) return g - h + } + } else if ("" !== c[e]) return 1; + return "" !== d[e] && void 0 !== d[e] ? -1 : 0 + } + return 1 + } + return null !== b ? -1 : 0 + }; + var Bn; + tm.Position = Bn = z.s(tm, "Position", 0); + var An; + tm.Location = An = z.s(tm, "Location", 1); + var tn; + tm.LeftToRight = tn = z.s(tm, "LeftToRight", 2); + var zn; + tm.RightToLeft = zn = z.s(tm, "RightToLeft", 3); + var rn; + tm.Forward = rn = z.s(tm, "Forward", 4); + var sn; + tm.Reverse = sn = z.s(tm, "Reverse", 5); + var pn; + tm.Ascending = pn = z.s(tm, "Ascending", 6); + var qn; + tm.Descending = qn = z.s(tm, "Descending", 7); + + function Cn() { + 0 < arguments.length && z.od(Cn); + vg.call(this); + this.Gy = this.co = this.Ud = 0; + this.Vq = 360; + this.Fy = On; + this.Sk = 0; + this.cC = On; + this.Yu = this.Eg = this.sD = 0; + this.zw = new Cq; + this.$u = this.zm = 0; + this.zG = 600; + this.js = NaN; + this.rq = 1; + this.Ps = 0; + this.Rs = 360; + this.qd = On; + this.fa = Kn; + this.$h = Hn; + this.Jh = Aq; + this.ai = 6; + this.Yr = Rn + } + z.Qa(Cn, vg); + z.ia("CircularLayout", Cn); + Cn.prototype.cloneProtected = function(a) { + vg.prototype.cloneProtected.call(this, a); + a.js = this.js; + a.rq = this.rq; + a.Ps = this.Ps; + a.Rs = this.Rs; + a.qd = this.qd; + a.fa = this.fa; + a.$h = this.$h; + a.Jh = this.Jh; + a.ai = this.ai; + a.Yr = this.Yr + }; + Cn.prototype.createNetwork = function() { + return new Dq + }; + Cn.prototype.doLayout = function(a) { + null === a && z.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); + null === this.network && (this.network = this.makeNetwork(a)); + a = this.network.vertexes; + if (1 >= a.count) 1 === a.count && (a = a.first(), a.ra = 0, a.za = 0); + else { + var b = new J(Eq); + b.$c(a.i); + a = new J(Eq); + var c = new J(Eq), + d; + d = this.sort(b); + var e = this.Fy, + g = this.cC, + h = this.Ud, + k = this.co, + l = this.Gy, + m = this.Vq, + b = this.Sk, + n = this.sD, + p = this.Eg, + q = this.Yu, + e = this.Xf, + g = this.tx, + h = this.UI; + if (!isFinite(h) || + 0 >= h) h = NaN; + k = this.VG; + if (!isFinite(k) || 0 >= k) k = 1; + l = this.Fe; + isFinite(l) || (l = 0); + m = this.Lf; + if (!isFinite(m) || 360 < m || 1 > m) m = 360; + b = this.spacing; + isFinite(b) || (b = NaN); + e === Pn && g === Qn ? e = On : e === Pn && g !== Qn && (g = Qn, e = this.Xf); + if ((this.direction === In || this.direction === Jn) && this.sorting !== Hn) { + for (var r = 0; !(r >= d.length); r += 2) { + a.add(d.ea(r)); + if (r + 1 >= d.length) break; + c.add(d.ea(r + 1)) + } + this.direction === In ? (this.Xf === Pn && a.reverse(), d = new J(Eq), d.$c(a), d.$c(c)) : (this.Xf === Pn && c.reverse(), d = new J(Eq), d.$c(c), d.$c(a)) + } + for (var s = + d.length, t = n = 0, r = 0; r < d.length; r++) { + var p = l + m * t * (this.direction === Kn ? 1 : -1) / s, + v = d.ea(r).diameter; + isNaN(v) && (v = Fq(d.ea(r), p)); + 360 > m && (0 === r || r === d.length - 1) && (v /= 2); + n += v; + t++ + } + if (isNaN(h) || e === Pn) { + isNaN(b) && (b = 6); + if (e !== On && e !== Pn) { + v = -Infinity; + for (r = 0; r < s; r++) { + var q = d.ea(r), + x = d.ea(r === s - 1 ? 0 : r + 1); + isNaN(q.diameter) && Fq(q, 0); + isNaN(x.diameter) && Fq(x, 0); + v = Math.max(v, (q.diameter + x.diameter) / 2) + } + q = v + b; + e === Mn ? (p = 2 * Math.PI / s, h = (v + b) / p) : h = Gq(this, q * (360 <= m ? s : s - 1), k, l * Math.PI / 180, m * Math.PI / 180) + } else h = Gq(this, n + (360 <= + m ? s : s - 1) * (e !== Pn ? b : 1.6 * b), k, l * Math.PI / 180, m * Math.PI / 180); + p = h * k + } else if (p = h * k, t = Hq(this, h, p, l * Math.PI / 180, m * Math.PI / 180), isNaN(b)) { + if (e === On || e === Pn) b = (t - n) / (360 <= m ? s : s - 1) + } else if (e === On || e === Pn) r = (t - n) / (360 <= m ? s : s - 1), r < b ? (h = Gq(this, n + b * (360 <= m ? s : s - 1), k, l * Math.PI / 180, m * Math.PI / 180), p = h * k) : b = r; + else { + v = -Infinity; + for (r = 0; r < s; r++) q = d.ea(r), x = d.ea(r === s - 1 ? 0 : r + 1), isNaN(q.diameter) && Fq(q, 0), isNaN(x.diameter) && Fq(x, 0), v = Math.max(v, (q.diameter + x.diameter) / 2); + q = v + b; + r = Gq(this, q * (360 <= m ? s : s - 1), k, l * Math.PI / 180, + m * Math.PI / 180); + r > h ? (h = r, p = h * k) : q = t / (360 <= m ? s : s - 1) + } + this.Fy = e; + this.cC = g; + this.Ud = h; + this.co = k; + this.Gy = l; + this.Vq = m; + this.Sk = b; + this.sD = n; + this.Eg = p; + this.Yu = q; + b = d; + d = this.Fy; + e = this.Ud; + g = this.Gy; + k = this.Vq; + l = this.Sk; + m = this.Eg; + n = this.Yu; + if (this.direction !== In && this.direction !== Jn || d !== Pn) + if (this.direction === In || this.direction === Jn) { + h = 0; + switch (d) { + case Nn: + h = 180 * Iq(this, e, m, g, n) / Math.PI; + break; + case On: + n = b = 0; + h = a.first(); + null !== h && (b = Fq(h, Math.PI / 2)); + h = c.first(); + null !== h && (n = Fq(h, Math.PI / 2)); + h = 180 * Iq(this, e, m, g, l + (b + + n) / 2) / Math.PI; + break; + case Mn: + h = k / b.length + } + if (this.direction === In) { + switch (d) { + case Nn: + Jq(this, a, g, Ln); + break; + case On: + Kq(this, a, g, Ln); + break; + case Mn: + Lq(this, a, k / 2, g, Ln) + } + switch (d) { + case Nn: + Jq(this, c, g + h, Kn); + break; + case On: + Kq(this, c, g + h, Kn); + break; + case Mn: + Lq(this, c, k / 2, g + h, Kn) + } + } else { + switch (d) { + case Nn: + Jq(this, c, g, Ln); + break; + case On: + Kq(this, c, g, Ln); + break; + case Mn: + Lq(this, c, k / 2, g, Ln) + } + switch (d) { + case Nn: + Jq(this, a, g + h, Kn); + break; + case On: + Kq(this, a, g + h, Kn); + break; + case Mn: + Lq(this, a, k / 2, g + h, Kn) + } + } + } else switch (d) { + case Nn: + Jq(this, + b, g, this.direction); + break; + case On: + Kq(this, b, g, this.direction); + break; + case Mn: + Lq(this, b, k, g, this.direction); + break; + case Pn: + Mq(this, b, k, g, this.direction) + } else Mq(this, b, k, g - k / 2, Kn) + } + this.updateParts(); + this.network = null; + this.Gf = !0 + }; + + function Lq(a, b, c, d, e) { + var g = a.Vq, + h = a.Ud; + a = a.Eg; + d = d * Math.PI / 180; + c = c * Math.PI / 180; + for (var k = b.length, l = 0; l < k; l++) { + var m = d + (e === Kn ? l * c / (360 <= g ? k : k - 1) : -(l * c) / k), + n = b.ea(l), + p = h * Math.tan(m) / a, + p = Math.sqrt((h * h + a * a * p * p) / (1 + p * p)); + n.ra = p * Math.cos(m); + n.za = p * Math.sin(m); + n.actualAngle = 180 * m / Math.PI + } + } + + function Kq(a, b, c, d) { + var e = a.Ud, + g = a.Eg, + h = a.Sk; + c = c * Math.PI / 180; + for (var k = b.length, l = 0; l < k; l++) { + var m = b.ea(l), + n = b.ea(l === k - 1 ? 0 : l + 1), + p = g * Math.sin(c); + m.ra = e * Math.cos(c); + m.za = p; + m.actualAngle = 180 * c / Math.PI; + isNaN(m.diameter) && Fq(m, 0); + isNaN(n.diameter) && Fq(n, 0); + m = Iq(a, e, g, d === Kn ? c : -c, (m.diameter + n.diameter) / 2 + h); + c += d === Kn ? m : -m + } + } + + function Jq(a, b, c, d) { + var e = a.Ud, + g = a.Eg, + h = a.Yu; + c = c * Math.PI / 180; + for (var k = b.length, l = 0; l < k; l++) { + var m = b.ea(l); + m.ra = e * Math.cos(c); + m.za = g * Math.sin(c); + m.actualAngle = 180 * c / Math.PI; + m = Iq(a, e, g, d === Kn ? c : -c, h); + c += d === Kn ? m : -m + } + } + + function Mq(a, b, c, d, e) { + var g = a.$u, + g = a.Vq; + a.zm = 0; + a.zw = new Cq; + if (360 > c) { + for (g = d + (e === Kn ? g : -g); 0 > g;) g += 360; + g %= 360; + 180 < g && (g -= 360); + g *= Math.PI / 180; + a.$u = g; + Nq(a, b, c, d, e) + } else Oq(a, b, c, d, e); + a.zw.commit(b) + } + + function Oq(a, b, c, d, e) { + var g = a.Ud, + h = a.Sk, + k = a.co, + l = g * Math.cos(d * Math.PI / 180), + m = a.Eg * Math.sin(d * Math.PI / 180), + n = b.jc(); + if (3 === n.length) n[0].ra = g, n[0].za = 0, n[1].ra = n[0].ra - n[0].width / 2 - n[1].width / 2 - h, n[1].y = n[0].y, n[2].ra = (n[0].ra + n[1].ra) / 2, n[2].y = n[0].y - n[2].height - h; + else if (4 === n.length) n[0].ra = g, n[0].za = 0, n[2].ra = -n[0].ra, n[2].za = n[0].za, n[1].ra = 0, n[1].y = Math.min(n[0].y, n[2].y) - n[1].height - h, n[3].ra = 0, n[3].y = Math.max(n[0].y + n[0].height + h, n[2].y + n[2].height + h); + else { + for (var g = z.O(), p = 0; p < n.length; p++) { + n[p].ra = + l; + n[p].za = m; + if (p >= n.length - 1) break; + Pq(a, l, m, n, p, e, g) || Qq(a, l, m, n, p, e, g); + l = g.x; + m = g.y + } + z.A(g); + a.zm++; + if (!(23 < a.zm)) { + var l = n[0].ra, + m = n[0].za, + g = n[n.length - 1].ra, + p = n[n.length - 1].za, + q = Math.abs(l - g) - ((n[0].width + n[n.length - 1].width) / 2 + h), + r = Math.abs(m - p) - ((n[0].height + n[n.length - 1].height) / 2 + h), + h = 0; + 1 > Math.abs(r) ? Math.abs(l - g) < (n[0].width + n[n.length - 1].width) / 2 && (h = 0) : h = 0 < r ? r : 1 > Math.abs(q) ? 0 : q; + q = !1; + q = Math.abs(g) > Math.abs(p) ? 0 < g !== m > p : 0 < p !== l < g; + if (q = e === Kn ? q : !q) h = -Math.abs(h), h = Math.min(h, -n[n.length - 1].width), + h = Math.min(h, -n[n.length - 1].height); + a.zw.compare(h, n); + 1 < Math.abs(h) && (a.Ud = 8 > a.zm ? a.Ud - h / (2 * Math.PI) : 5 > n.length && 10 < h ? a.Ud / 2 : a.Ud - (0 < h ? 1.7 : -2.3), a.Eg = a.Ud * k, Oq(a, b, c, d, e)) + } + } + } + + function Nq(a, b, c, d, e) { + for (var g = a.Ud, h = a.Eg, k = a.co, l = g * Math.cos(d * Math.PI / 180), m = h * Math.sin(d * Math.PI / 180), n = z.O(), p = b.jc(), q = 0; q < p.length; q++) { + p[q].ra = l; + p[q].za = m; + if (q >= p.length - 1) break; + Pq(a, l, m, p, q, e, n) || Qq(a, l, m, p, q, e, n); + l = n.x; + m = n.y + } + z.A(n); + a.zm++; + if (!(23 < a.zm)) { + l = Math.atan2(m, l); + l = e === Kn ? a.$u - l : l - a.$u; + l = Math.abs(l) < Math.abs(l - 2 * Math.PI) ? l : l - 2 * Math.PI; + g = l * (g + h) / 2; + h = a.zw; + if (Math.abs(g) < Math.abs(h.qp)) + for (h.qp = g, h.Dn = [], h.gq = [], l = 0; l < p.length; l++) h.Dn[l] = p[l].vb.x, h.gq[l] = p[l].vb.y; + 1 < Math.abs(g) && + (a.Ud = 8 > a.zm ? a.Ud - g / (2 * Math.PI) : a.Ud - (0 < g ? 1.7 : -2.3), a.Eg = a.Ud * k, Nq(a, b, c, d, e)) + } + } + + function Pq(a, b, c, d, e, g, h) { + var k = a.Ud, + l = a.Eg, + m = 0, + n = 0; + a = (d[e].width + d[e + 1].width) / 2 + a.Sk; + var p = !1; + if (0 <= c !== (g === Kn)) { + if (m = b + a, m > k) { + m = b - a; + if (m < -k) return h.x = m, h.y = n, !1; + p = !0 + } + } else if (m = b - a, m < -k) { + m = b + a; + if (m > k) return h.x = m, h.y = n, !1; + p = !0 + } + n = Math.sqrt(1 - Math.min(1, m * m / (k * k))) * l; + 0 > c !== p && (n = -n); + if (Math.abs(c - n) > (d[e].height + d[e + 1].height) / 2) return h.x = m, h.y = n, !1; + h.x = m; + h.y = n; + return !0 + } + + function Qq(a, b, c, d, e, g, h) { + var k = a.Ud, + l = a.Eg, + m = 0, + n = 0; + a = (d[e].height + d[e + 1].height) / 2 + a.Sk; + d = !1; + if (0 <= b !== (g === Kn)) { + if (n = c - a, n < -l) { + n = c + a; + if (n > l) { + h.x = m; + h.y = n; + return + } + d = !0 + } + } else if (n = c + a, n > l) { + n = c - a; + if (n < -l) { + h.x = m; + h.y = n; + return + } + d = !0 + } + m = Math.sqrt(1 - Math.min(1, n * n / (l * l))) * k; + 0 > b !== d && (m = -m); + h.x = m; + h.y = n + } + Cn.prototype.commitLayout = function() { + this.commitNodes(); + this.Rt && this.commitLinks() + }; + Cn.prototype.commitNodes = function() { + for (var a = this.KG, b = this.network.vertexes.i; b.next();) { + var c = b.value; + c.x += a.x; + c.y += a.y; + c.commit() + } + }; + Cn.prototype.commitLinks = function() { + for (var a = this.network.edges.i; a.next();) a.value.commit() + }; + + function Hq(a, b, c, d, e) { + var g = a.zG; + if (.001 > Math.abs(a.co - 1)) return void 0 !== d && void 0 !== e ? e * b : 2 * Math.PI * b; + a = b > c ? Math.sqrt(b * b - c * c) / b : Math.sqrt(c * c - b * b) / c; + for (var h = 0, k = 0, k = void 0 !== d && void 0 !== e ? e / (g + 1) : Math.PI / (2 * (g + 1)), l = 0, m = 0; m <= g; m++) l = void 0 !== d && void 0 !== e ? d + m * e / g : m * Math.PI / (2 * g), l = Math.sin(l), h += Math.sqrt(1 - a * a * l * l) * k; + return void 0 !== d && void 0 !== e ? (b > c ? b : c) * h : 4 * (b > c ? b : c) * h + } + + function Gq(a, b, c, d, e) { + var g = 0, + g = void 0 !== d && void 0 !== e ? Hq(a, 1, c, d, e) : Hq(a, 1, c); + return b / g + } + + function Iq(a, b, c, d, e) { + if (.001 > Math.abs(a.co - 1)) return e / b; + var g = b > c ? Math.sqrt(b * b - c * c) / b : Math.sqrt(c * c - b * b) / c, + h = 0; + a = 2 * Math.PI / (700 * a.network.vertexes.count); + b > c && (d += Math.PI / 2); + for (var k = 0;; k++) { + var l = Math.sin(d + k * a), + h = h + (b > c ? b : c) * Math.sqrt(1 - g * g * l * l) * a; + if (h >= e) return k * a + } + } + Cn.prototype.sort = function(a) { + switch (this.sorting) { + case Fn: + break; + case Gn: + a.reverse(); + break; + case Dn: + a.sort(this.comparer); + break; + case En: + a.sort(this.comparer); + a.reverse(); + break; + case Hn: + for (var b = [], c = 0; c < a.length; c++) b.push(0); + for (var d = new J(Eq), c = 0; c < a.length; c++) { + var e = -1, + g = -1; + if (0 === c) + for (var h = 0; h < a.length; h++) { + var k = a.ea(h).CH; + k > e && (e = k, g = h) + } else + for (h = 0; h < a.length; h++) k = b[h], k > e && (e = k, g = h); + d.add(a.ea(g)); + b[g] = -1; + g = a.ea(g); + e = 0; + for (h = g.tc; h.next();) e = a.indexOf(h.value.fromVertex), 0 > e || 0 <= b[e] && + b[e]++; + for (g = g.pc; g.next();) e = a.indexOf(g.value.toVertex), 0 > e || 0 <= b[e] && b[e]++ + } + a = []; + for (b = 0; b < d.length; b++) { + h = d.ea(b); + a[b] = []; + for (var l = 0, c = h.pc; c.next();) l = d.indexOf(c.value.toVertex), l !== b && 0 > a[b].indexOf(l) && a[b].push(l); + for (c = h.tc; c.next();) l = d.indexOf(c.value.fromVertex), l !== b && 0 > a[b].indexOf(l) && a[b].push(l) + } + h = []; + for (b = 0; b < a.length; b++) h[b] = 0; + for (var c = [], k = [], m = [], e = [], g = new J(Eq), n = 0, b = 0; b < a.length; b++) { + var p = a[b].length; + if (1 === p) e.push(b); + else if (0 === p) g.add(d.ea(b)); + else { + if (0 === n) c.push(b); + else { + for (var q = Infinity, r = Infinity, s = -1, t = [], p = 0; p < c.length; p++) 0 > a[c[p]].indexOf(c[p === c.length - 1 ? 0 : p + 1]) && t.push(p === c.length - 1 ? 0 : p + 1); + if (0 === t.length) + for (p = 0; p < c.length; p++) t.push(p); + for (p = 0; p < t.length; p++) { + var v = t[p], + x, l = a[b]; + x = k; + for (var y = m, A = h, B = v, L = c, H = 0, U = 0; U < x.length; U++) { + var ea = A[x[U]], + W = A[y[U]], + P = 0, + ba = 0; + ea < W ? (P = ea, ba = W) : (P = W, ba = ea); + if (P < B && B <= ba) + for (ea = 0; ea < l.length; ea++) W = l[ea], 0 > L.indexOf(W) || P < A[W] && A[W] < ba || P === A[W] || ba === A[W] || H++; + else + for (ea = 0; ea < l.length; ea++) W = l[ea], 0 > L.indexOf(W) || + P < A[W] && A[W] < ba && P !== A[W] && ba !== A[W] && H++ + } + x = H; + for (A = y = 0; A < a[b].length; A++) l = c.indexOf(a[b][A]), 0 <= l && (l = Math.abs(v - (l >= v ? l + 1 : l)), y += l < c.length + 1 - l ? l : c.length + 1 - l); + for (A = 0; A < k.length; A++) l = h[k[A]], B = h[m[A]], l >= v && l++, B >= v && B++, l > B && (L = B, B = l, l = L), B - l < (c.length + 2) / 2 === (l < v && v <= B) && y++; + if (x < q || x === q && y < r) q = x, r = y, s = v + } + c.splice(s, 0, b); + for (p = 0; p < c.length; p++) h[c[p]] = p; + for (p = 0; p < a[b].length; p++) q = a[b][p], 0 <= c.indexOf(q) && (k.push(b), m.push(q)) + } + n++ + } + } + k = !1; + for (m = c.length;;) { + k = !0; + for (h = 0; h < e.length; h++) + if (b = e[h], + n = a[b][0], l = c.indexOf(n), 0 <= l) { + for (r = p = 0; r < a[n].length; r++) q = a[n][r], q = c.indexOf(q), 0 > q || q === l || (s = q > l ? q - l : l - q, p += q < l !== s > m - s ? 1 : -1); + c.splice(0 > p ? l : l + 1, 0, b); + e.splice(h, 1); + h-- + } else k = !1; + if (k) break; + else c.push(e[0]), e.splice(0, 1) + } + for (b = 0; b < c.length; b++) l = c[b], g.add(d.ea(l)); + return g; + default: + z.k("Invalid sorting type.") + } + return a + }; + z.defineProperty(Cn, { + UI: "radius" + }, function() { + return this.js + }, function(a) { + this.js !== a && (z.g(a, "number", Cn, "radius"), 0 < a || isNaN(a)) && (this.js = a, this.I()) + }); + z.defineProperty(Cn, { + VG: "aspectRatio" + }, function() { + return this.rq + }, function(a) { + this.rq !== a && (z.g(a, "number", Cn, "aspectRatio"), 0 < a && (this.rq = a, this.I())) + }); + z.defineProperty(Cn, { + Fe: "startAngle" + }, function() { + return this.Ps + }, function(a) { + this.Ps !== a && (z.g(a, "number", Cn, "startAngle"), this.Ps = a, this.I()) + }); + z.defineProperty(Cn, { + Lf: "sweepAngle" + }, function() { + return this.Rs + }, function(a) { + this.Rs !== a && (z.g(a, "number", Cn, "sweepAngle"), this.Rs = 0 < a && 360 >= a ? a : 360, this.I()) + }); + z.defineProperty(Cn, { + Xf: "arrangement" + }, function() { + return this.qd + }, function(a) { + this.qd !== a && (z.Ba(a, Cn, Cn, "arrangement"), a === Pn || a === On || a === Nn || a === Mn) && (this.qd = a, this.I()) + }); + z.defineProperty(Cn, { + direction: "direction" + }, function() { + return this.fa + }, function(a) { + this.fa !== a && (z.Ba(a, Cn, Cn, "direction"), a === Kn || a === Ln || a === In || a === Jn) && (this.fa = a, this.I()) + }); + z.defineProperty(Cn, { + sorting: "sorting" + }, function() { + return this.$h + }, function(a) { + this.$h !== a && (z.Ba(a, Cn, Cn, "sorting"), a === Fn || a === Gn || a === Dn || En || a === Hn) && (this.$h = a, this.I()) + }); + z.defineProperty(Cn, { + comparer: "comparer" + }, function() { + return this.Jh + }, function(a) { + this.Jh !== a && (z.g(a, "function", Cn, "comparer"), this.Jh = a, this.I()) + }); + z.defineProperty(Cn, { + spacing: "spacing" + }, function() { + return this.ai + }, function(a) { + this.ai !== a && (z.g(a, "number", Cn, "spacing"), this.ai = a, this.I()) + }); + z.defineProperty(Cn, { + tx: "nodeDiameterFormula" + }, function() { + return this.Yr + }, function(a) { + this.Yr !== a && (z.Ba(a, Cn, Cn, "nodeDiameterFormula"), a === Rn || a === Qn) && (this.Yr = a, this.I()) + }); + z.w(Cn, { + LG: "actualXRadius" + }, function() { + return this.Ud + }); + z.w(Cn, { + MG: "actualYRadius" + }, function() { + return this.Eg + }); + z.w(Cn, { + HJ: "actualSpacing" + }, function() { + return this.Sk + }); + z.w(Cn, { + KG: "actualCenter" + }, function() { + return isNaN(this.je.x) || isNaN(this.je.y) ? new N(0, 0) : new N(this.je.x + this.LG, this.je.y + this.MG) + }); + var On; + Cn.ConstantSpacing = On = z.s(Cn, "ConstantSpacing", 0); + var Nn; + Cn.ConstantDistance = Nn = z.s(Cn, "ConstantDistance", 1); + var Mn; + Cn.ConstantAngle = Mn = z.s(Cn, "ConstantAngle", 2); + var Pn; + Cn.Packed = Pn = z.s(Cn, "Packed", 3); + var Kn; + Cn.Clockwise = Kn = z.s(Cn, "Clockwise", 4); + var Ln; + Cn.Counterclockwise = Ln = z.s(Cn, "Counterclockwise", 5); + var In; + Cn.BidirectionalLeft = In = z.s(Cn, "BidirectionalLeft", 6); + var Jn; + Cn.BidirectionalRight = Jn = z.s(Cn, "BidirectionalRight", 7); + var Fn; + Cn.Forwards = Fn = z.s(Cn, "Forwards", 8); + var Gn; + Cn.Reverse = Gn = z.s(Cn, "Reverse", 9); + var Dn; + Cn.Ascending = Dn = z.s(Cn, "Ascending", 10); + var En; + Cn.Descending = En = z.s(Cn, "Descending", 11); + var Hn; + Cn.Optimized = Hn = z.s(Cn, "Optimized", 12); + var Rn; + Cn.Pythagorean = Rn = z.s(Cn, "Pythagorean", 13); + var Qn; + Cn.Circular = Qn = z.s(Cn, "Circular", 14); + + function Cq() { + this.qp = -Infinity; + this.gq = this.Dn = null + } + Cq.prototype.compare = function(a, b) { + if (0 < a && 0 > this.qp || Math.abs(a) < Math.abs(this.qp) && !(0 > a && 0 < this.qp)) { + this.qp = a; + this.Dn = []; + this.gq = []; + for (var c = 0; c < b.length; c++) this.Dn[c] = b[c].vb.x, this.gq[c] = b[c].vb.y + } + }; + Cq.prototype.commit = function(a) { + if (null !== this.Dn && null !== this.gq) + for (var b = 0; b < this.Dn.length; b++) { + var c = a.ea(b); + c.x = this.Dn[b]; + c.y = this.gq[b] + } + }; + + function Dq() { + wa.call(this) + } + z.Qa(Dq, wa); + z.ia("CircularNetwork", Dq); + Dq.prototype.createVertex = function() { + return new Eq + }; + Dq.prototype.createEdge = function() { + return new Rq + }; + + function Eq() { + xa.call(this); + this.actualAngle = this.diameter = NaN + } + z.Qa(Eq, xa); + z.ia("CircularVertex", Eq); + + function Fq(a, b) { + var c = a.network; + if (null === c) return NaN; + c = c.Sb; + if (null === c) return NaN; + if (c.Xf === Pn) + if (c.tx === Qn) a.diameter = Math.max(a.width, a.height); + else { + var c = Math.abs(Math.sin(b)), + d = Math.abs(Math.cos(b)); + if (0 === c) return a.width; + if (0 === d) return a.height; + a.diameter = Math.min(a.height / c, a.width / d) + } + else a.diameter = c.tx === Qn ? Math.max(a.width, a.height) : Math.sqrt(a.width * a.width + a.height * a.height); + return a.diameter + } + + function Rq() { + ya.call(this) + } + z.Qa(Rq, ya); + z.ia("CircularEdge", Rq); + + function Sq() { + 0 < arguments.length && z.od(Sq); + vg.call(this); + this.Dg = null; + this.wr = 0; + this.lg = (new Ea(100, 100)).freeze(); + this.qq = !1; + this.Zh = !0; + this.Ih = !1; + this.Co = 100; + this.Xq = 1; + this.Qh = 1E3; + this.ks = Math; + this.Yn = .05; + this.Xn = 50; + this.Un = 150; + this.Wn = 0; + this.Nq = 10; + this.Mq = 5 + } + z.Qa(Sq, vg); + z.ia("ForceDirectedLayout", Sq); + Sq.prototype.cloneProtected = function(a) { + vg.prototype.cloneProtected.call(this, a); + a.lg.assign(this.lg); + a.qq = this.qq; + a.Zh = this.Zh; + a.Ih = this.Ih; + a.Co = this.Co; + a.Xq = this.Xq; + a.Qh = this.Qh; + a.ks = this.ks; + a.Yn = this.Yn; + a.Xn = this.Xn; + a.Un = this.Un; + a.Wn = this.Wn; + a.Nq = this.Nq; + a.Mq = this.Mq + }; + Sq.prototype.createNetwork = function() { + return new Tq + }; + Sq.prototype.doLayout = function(a) { + null === a && z.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); + null === this.network && (this.network = this.makeNetwork(a)); + a = this.pA; + if (0 < this.network.vertexes.count) { + this.network.Sw(); + for (var b = this.network.vertexes.i; b.next();) { + var c = b.value; + c.charge = this.electricalCharge(c); + c.mass = this.gravitationalMass(c) + } + for (b = this.network.edges.i; b.next();) c = b.value, c.stiffness = this.springStiffness(c), c.length = this.springLength(c); + this.Bz(); + this.wr = 0; + if (this.needsClusterLayout()) { + b = this.network; + for (c = b.pJ().i; c.next();) { + this.network = c.value; + for (var d = this.network.vertexes.i; d.next();) { + var e = d.value; + e.hg = e.vertexes.count; + e.uk = 1; + e.Xm = null; + e.Dh = null + } + Uq(this, 0, a) + } + this.network = b; + c.reset(); + u && z.l(b, Tq, Sq, "arrangeConnectedGraphs:singletons"); + for (var d = this.KD, g = c.count, h = !0, k = e = 0, l = z.rb(), m = 0; m < g + b.vertexes.count + 2; m++) l[m] = null; + g = 0; + c.reset(); + for (var n = z.kg(); c.next();) + if (m = c.value, this.rh(m, n), h) h = !1, e = n.x + n.width / 2, k = n.y + n.height / + 2, l[0] = new N(n.x + n.width + d.width, n.y), l[1] = new N(n.x, n.y + n.height + d.height), g = 2; + else { + var p = Vq(l, g, e, k, n.width, n.height, d), + q = l[p], + r = new N(q.x + n.width + d.width, q.y), + s = new N(q.x, q.y + n.height + d.height); + p + 1 < g && l.splice(p + 1, 0, null); + l[p] = r; + l[p + 1] = s; + g++; + p = q.x - n.x; + q = q.y - n.y; + for (m = m.vertexes.i; m.next();) r = m.value, r.ra += p, r.za += q + } + z.dc(n); + for (m = b.vertexes.i; m.next();) h = m.value, n = h.vb, 2 > g ? (e = n.x + n.width / 2, k = n.y + n.height / 2, l[0] = new N(n.x + n.width + d.width, n.y), l[1] = new N(n.x, n.y + n.height + d.height), g = 2) : (p = Vq(l, g, + e, k, n.width, n.height, d), q = l[p], r = new N(q.x + n.width + d.width, q.y), s = new N(q.x, q.y + n.height + d.height), p + 1 < g && l.splice(p + 1, 0, null), l[p] = r, l[p + 1] = s, g++, h.ra = q.x + h.width / 2, h.za = q.y + h.height / 2); + z.xa(l); + for (c.reset(); c.next();) { + d = c.value; + for (e = d.vertexes.i; e.next();) b.tl(e.value); + for (d = d.edges.i; d.next();) b.$o(d.value) + } + } + Wq(this, a); + this.updateParts() + } + this.Co = a; + this.network = null; + this.Gf = !0 + }; + Sq.prototype.needsClusterLayout = function() { + if (3 > this.network.vertexes.count) return !1; + for (var a = 0, b = 0, c = this.network.vertexes.first().vb, d = this.network.vertexes.i; d.next();) { + if (d.value.vb.Ig(c) && (a++, 2 < a)) return !0; + if (10 < b) break; + b++ + } + return !1 + }; + Sq.prototype.rh = function(a, b) { + for (var c = !0, d = a.vertexes.i; d.next();) { + var e = d.value; + c ? (c = !1, b.set(e.vb)) : b.qi(e.vb) + } + return b + }; + + function fr(a, b, c) { + u && (z.p(b, Sq, "computeClusterLayoutIterations:level"), z.p(c, Sq, "computeClusterLayoutIterations:maxiter")); + return Math.max(Math.min(a.network.vertexes.count, c * (b + 1) / 11), 10) + } + + function Uq(a, b, c) { + u && (z.p(b, Sq, "layoutClusters:level"), z.p(c, Sq, "layoutClusters:maxiter")); + if (lr(a, b)) { + var d = a.Qh; + a.Qh *= 1 + 1 / (b + 1); + var e = mr(a, b), + g = Math.max(0, fr(a, b, c)); + a.pA += g; + Uq(a, b + 1, c); + Wq(a, g); + nr(a, e, b); + c = a.Dg; + null === c ? c = new J(or) : c.clear(); + c.$c(e.vertexes); + c.sort(function(a, b) { + return null === a || null === b || a === b ? 0 : b.hg - a.hg + }); + for (e = c.i; e.next();) pr(a, e.value, b); + a.Qh = d + } + } + + function lr(a, b) { + u && z.p(b, Sq, "hasClusters:level"); + if (10 < b || 3 > a.network.vertexes.count) return !1; + null === a.Dg ? a.Dg = new J(or) : a.Dg.clear(); + a.Dg.$c(a.network.vertexes); + var c = a.Dg; + c.sort(function(a, b) { + return null === a || null === b || a === b ? 0 : b.hg - a.hg + }); + for (var d = c.count - 1; 0 <= d && 1 >= c.ea(d).hg;) d--; + return 1 < c.count - d + } + + function mr(a, b) { + u && z.p(b, Sq, "pushSubNetwork:level"); + for (var c = a.network, d = new Tq, e = a.Dg.i; e.next();) { + var g = e.value; + if (1 < g.hg) { + d.tl(g); + var h = new qr; + h.Wx = g.hg; + h.Xx = g.width; + h.Vx = g.height; + h.jB = g.R.x; + h.kB = g.R.y; + null === g.Dh && (g.Dh = new J(qr)); + g.Dh.add(h); + g.LA = g.Dh.count - 1 + } else break + } + for (var k = c.edges.i; k.next();) + if (e = k.value, e.fromVertex.network === d && e.toVertex.network === d) d.$o(e); + else if (e.fromVertex.network === d) { + var l = e.fromVertex.Xm; + null === l && (l = new J(or), e.fromVertex.Xm = l); + l.add(e.toVertex); + e.fromVertex.hg--; + e.fromVertex.uk += e.toVertex.uk + } else e.toVertex.network === d && (l = e.toVertex.Xm, null === l && (l = new J(or), e.toVertex.Xm = l), l.add(e.fromVertex), e.toVertex.hg--, e.toVertex.uk += e.fromVertex.uk); + for (e = d.edges.i; e.next();) g = e.value, g.length *= Math.max(1, se((g.fromVertex.uk + g.toVertex.uk) / (4 * b + 1))); + for (e = d.vertexes.i; e.next();) + if (g = e.value, l = g.Xm, null !== l && 0 < l.count && (h = g.Dh.ea(g.Dh.count - 1), h = h.Wx - g.hg, !(0 >= h))) { + for (var m = 0, n = 0, p = l.count - h; p < l.count; p++) { + for (var q = l.ea(p), r = null, k = q.edges.i; k.next();) { + var s = + k.value; + if (s.NH(q) === g) { + r = s; + break + } + } + null !== r && (n += r.length, m += q.width * q.height) + } + l = g.ra; + k = g.za; + p = g.width; + q = g.height; + r = g.R; + s = p * q; + 1 > s && (s = 1); + m = se((m + s + n * n * 4 / (h * h)) / s); + h = (m - 1) * p / 2; + m = (m - 1) * q / 2; + g.vb = new w(l - r.x - h, k - r.y - m, p + 2 * h, q + 2 * m); + g.focus = new N(r.x + h, r.y + m) + } + a.network = d; + return c + } + + function nr(a, b, c) { + u && (z.l(b, Tq, Sq, "popNetwork:oldnet"), z.p(c, Sq, "popNetwork:level")); + for (c = a.network.vertexes.i; c.next();) { + var d = c.value; + d.network = b; + if (null !== d.Dh) { + var e = d.Dh.ea(d.LA); + d.hg = e.Wx; + var g = e.jB, + h = e.kB; + d.vb = new w(d.ra - g, d.za - h, e.Xx, e.Vx); + d.focus = new N(g, h); + d.LA-- + } + } + for (c = a.network.edges.i; c.next();) c.value.network = b; + a.network = b + } + + function pr(a, b, c) { + u && (z.l(b, or, Sq, "surroundNode:oldnet"), z.p(c, Sq, "surroundNode:level")); + var d = b.Xm; + if (null !== d && 0 !== d.count) { + c = b.ra; + var e = b.za, + g = b.width, + h = b.height; + null !== b.Dh && 0 < b.Dh.count && (h = b.Dh.ea(0), g = h.Xx, h = h.Vx); + for (var g = se(g * g + h * h) / 2, k = !1, l = h = 0, m = 0, n = b.vertexes.i; n.next();) { + var p = n.value; + 1 >= p.hg ? l++ : (k = !0, m++, h += Math.atan2(b.za - p.za, b.ra - p.ra)) + } + if (0 !== l) + for (0 < m && (h /= m), m = b = 0, b = k ? 2 * Math.PI / (l + 1) : 2 * Math.PI / l, 0 === l % 2 && (m = b / 2), 1 < d.count && d.sort(function(a, b) { + return null === a || null === b || a === + b ? 0 : b.width * b.height - a.width * a.height + }), k = 0 === l % 2 ? 0 : 1, d = d.i; d.next();) + if (l = d.value, !(1 < l.hg || a.isFixed(l))) { + n = null; + for (p = l.edges.i; p.next();) { + n = p.value; + break + } + var p = l.width, + q = l.height, + p = se(p * p + q * q) / 2, + n = g + n.length + p, + p = h + (b * (k / 2 >> 1) + m) * (0 === k % 2 ? 1 : -1); + l.ra = c + n * Math.cos(p); + l.za = e + n * Math.sin(p); + k++ + } + } + } + + function Vq(a, b, c, d, e, g, h) { + var k = 9E19, + l = -1, + m = 0; + a: for (; m < b; m++) { + var n = a[m], + p = n.x - c, + q = n.y - d, + p = p * p + q * q; + if (p < k) { + for (q = m - 1; 0 <= q; q--) + if (a[q].y > n.y && a[q].x - n.x < e + h.width) continue a; + for (q = m + 1; q < b; q++) + if (a[q].x > n.x && a[q].y - n.y < g + h.height) continue a; + l = m; + k = p + } + } + return l + } + Sq.prototype.Bz = function() { + if (this.comments) + for (var a = this.network.vertexes.i; a.next();) this.addComments(a.value) + }; + Sq.prototype.addComments = function(a) { + var b = a.Pc; + if (null !== b) + for (b = b.rE(); b.next();) { + var c = b.value; + if ("Comment" === c.nc && c.isVisible()) { + var d = this.network.en(c); + null === d && (d = this.network.ht(c)); + d.charge = this.nH; + for (var c = null, e = d.pc; e.next();) { + var g = e.value; + if (g.toVertex === a) { + c = g; + break + } + } + if (null === c) + for (e = d.tc; e.next();) + if (g = e.value, g.fromVertex === a) { + c = g; + break + } + null === c && (c = this.network.Hp(a, d, null)); + c.length = this.oH + } + } + }; + + function rr(a, b) { + u && (z.l(a, or, Sq, "getNodeDistance:vertexA"), z.l(b, or, Sq, "getNodeDistance:vertexB")); + var c = a.P, + d = c.x, + e = c.y, + g = c.width, + c = c.height, + h = b.P, + k = h.x, + l = h.y, + m = h.width, + h = h.height; + return d + g < k ? e > l + h ? (d = d + g - k, e = e - l - h, se(d * d + e * e)) : e + c < l ? (d = d + g - k, e = e + c - l, se(d * d + e * e)) : k - (d + g) : d > k + m ? e > l + h ? (d = d - k - m, e = e - l - h, se(d * d + e * e)) : e + c < l ? (d = d - k - m, e = e + c - l, se(d * d + e * e)) : d - (k + m) : e > l + h ? e - (l + h) : e + c < l ? l - (e + c) : .1 + } + + function Wq(a, b) { + u && z.p(b, Sq, "performIterations:num"); + a.Dg = null; + for (var c = a.wr + b; a.wr < c && (a.wr++, sr(a));); + a.Dg = null + } + + function sr(a) { + null === a.Dg && (a.Dg = new J(or), a.Dg.$c(a.network.vertexes)); + var b = a.Dg.o; + if (0 >= b.length) return !1; + var c = b[0]; + c.forceX = 0; + c.forceY = 0; + for (var d = c.ra, e = d, g = c.za, h = g, c = 1; c < b.length; c++) { + var k = b[c]; + k.forceX = 0; + k.forceY = 0; + var l = k.ra, + k = k.za, + d = Math.min(d, l), + e = Math.max(e, l), + g = Math.min(g, k), + h = Math.max(h, k) + }(g = e - d > h - g) ? b.sort(function(a, b) { + return null === a || null === b || a === b ? 0 : a.ra - b.ra + }): b.sort(function(a, b) { + return null === a || null === b || a === b ? 0 : a.za - b.za + }); + for (var h = a.Qh, m = 0, n = 0, p = 0, c = 0; c < b.length; c++) { + var k = + b[c], + l = k.P, + q = k.R, + d = l.x + q.x, + l = l.y + q.y, + n = k.charge * a.electricalFieldX(d, l), + p = k.charge * a.electricalFieldY(d, l), + n = n + k.mass * a.gravitationalFieldX(d, l), + p = p + k.mass * a.gravitationalFieldY(d, l); + k.forceX += n; + k.forceY += p; + for (q = c + 1; q < b.length; q++) + if (e = b[q], e !== k) { + var r = e.P, + n = e.R, + p = r.x + n.x, + r = r.y + n.y; + if (d - p > h || p - d > h) { + if (g) break + } else if (l - r > h || r - l > h) { + if (!g) break + } else { + var s = rr(k, e); + 1 > s ? (n = a.Bx, null === n && (a.Bx = n = new Ka(0)), m = n.random(), s = n.random(), d > p ? (n = Math.abs(e.P.right - k.P.x), n = (1 + n) * m) : d < p ? (n = Math.abs(e.P.x - k.P.right), + n = -(1 + n) * m) : (n = Math.max(e.width, k.width), n = (1 + n) * m - n / 2), l > r ? (p = Math.abs(e.P.bottom - k.P.y), p = (1 + p) * s) : d < p ? (p = Math.abs(e.P.y - k.P.bottom), p = -(1 + p) * s) : (p = Math.max(e.height, k.height), p = (1 + p) * s - p / 2)) : (m = -(k.charge * e.charge) / (s * s), n = (p - d) / s * m, p = (r - l) / s * m); + k.forceX += n; + k.forceY += p; + e.forceX -= n; + e.forceY -= p + } + } + } + for (c = a.network.edges.i; c.next();) g = c.value, k = g.fromVertex, e = g.toVertex, l = k.P, q = k.R, d = l.x + q.x, l = l.y + q.y, r = e.P, n = e.R, p = r.x + n.x, r = r.y + n.y, s = rr(k, e), 1 > s ? (n = a.Bx, null === n && (a.Bx = n = new Ka(0)), m = n.random(), s = + n.random(), n = (d > p ? 1 : -1) * (1 + (e.width > k.width) ? e.width : k.width) * m, p = (l > r ? 1 : -1) * (1 + (e.height > k.height) ? e.height : k.height) * s) : (m = g.stiffness * (s - g.length), n = (p - d) / s * m, p = (r - l) / s * m), k.forceX += n, k.forceY += p, e.forceX -= n, e.forceY -= p; + c = 0; + d = Math.max(a.Qh / 20, 50); + for (e = 0; e < b.length; e++) k = b[e], a.isFixed(k) ? a.moveFixedVertex(k) : (g = k.forceX, h = k.forceY, g < -d ? g = -d : g > d && (g = d), h < -d ? h = -d : h > d && (h = d), k.ra += g, k.za += h, c = Math.max(c, g * g + h * h)); + return c > a.oE * a.oE + } + Sq.prototype.moveFixedVertex = function() {}; + Sq.prototype.commitLayout = function() { + this.QA(); + this.commitNodes(); + this.Rt && this.commitLinks() + }; + Sq.prototype.QA = function() { + if (this.aq) + for (var a = this.network.edges.i; a.next();) { + var b = a.value.link; + null !== b && (b.Db = Pc, b.Eb = Pc) + } + }; + Sq.prototype.commitNodes = function() { + var a = 0, + b = 0; + if (this.UG) { + var c = z.kg(); + this.rh(this.network, c); + b = this.je; + a = b.x - c.x; + b = b.y - c.y; + z.dc(c) + } + for (var c = z.kg(), d = this.network.vertexes.i; d.next();) { + var e = d.value; + if (0 !== a || 0 !== b) c.assign(e.vb), c.x += a, c.y += b, e.vb = c; + e.commit() + } + z.dc(c) + }; + Sq.prototype.commitLinks = function() { + for (var a = this.network.edges.i; a.next();) a.value.commit() + }; + Sq.prototype.springStiffness = function(a) { + a = a.stiffness; + return isNaN(a) ? this.Yn : a + }; + Sq.prototype.springLength = function(a) { + a = a.length; + return isNaN(a) ? this.Xn : a + }; + Sq.prototype.electricalCharge = function(a) { + a = a.charge; + return isNaN(a) ? this.Un : a + }; + Sq.prototype.electricalFieldX = function() { + return 0 + }; + Sq.prototype.electricalFieldY = function() { + return 0 + }; + Sq.prototype.gravitationalMass = function(a) { + a = a.mass; + return isNaN(a) ? this.Wn : a + }; + Sq.prototype.gravitationalFieldX = function() { + return 0 + }; + Sq.prototype.gravitationalFieldY = function() { + return 0 + }; + Sq.prototype.isFixed = function(a) { + return a.isFixed + }; + z.w(Sq, { + gK: "currentIteration" + }, function() { + return this.wr + }); + z.defineProperty(Sq, { + KD: "arrangementSpacing" + }, function() { + return this.lg + }, function(a) { + z.l(a, Ea, Sq, "arrangementSpacing"); + this.lg.N(a) || (this.lg.assign(a), this.I()) + }); + z.defineProperty(Sq, { + UG: "arrangesToOrigin" + }, function() { + return this.qq + }, function(a) { + this.qq !== a && (z.g(a, "boolean", Sq, "arrangesToOrigin"), this.qq = a, this.I()) + }); + z.defineProperty(Sq, { + aq: "setsPortSpots" + }, function() { + return this.Zh + }, function(a) { + this.Zh !== a && (z.g(a, "boolean", Sq, "setsPortSpots"), this.Zh = a, this.I()) + }); + z.defineProperty(Sq, { + comments: "comments" + }, function() { + return this.Ih + }, function(a) { + this.Ih !== a && (z.g(a, "boolean", Sq, "comments"), this.Ih = a, this.I()) + }); + z.defineProperty(Sq, { + pA: "maxIterations" + }, function() { + return this.Co + }, function(a) { + this.Co !== a && (z.g(a, "number", Sq, "maxIterations"), 0 <= a && (this.Co = a, this.I())) + }); + z.defineProperty(Sq, { + oE: "epsilonDistance" + }, function() { + return this.Xq + }, function(a) { + this.Xq !== a && (z.g(a, "number", Sq, "epsilonDistance"), 0 < a && (this.Xq = a, this.I())) + }); + z.defineProperty(Sq, { + CK: "infinityDistance" + }, function() { + return this.Qh + }, function(a) { + this.Qh !== a && (z.g(a, "number", Sq, "infinityDistance"), 1 < a && (this.Qh = a, this.I())) + }); + z.defineProperty(Sq, { + Bx: "randomNumberGenerator" + }, function() { + return this.ks + }, function(a) { + this.ks !== a && (null !== a && "function" !== typeof a.random && z.k('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: ' + a), this.ks = a) + }); + z.defineProperty(Sq, { + sK: "defaultSpringStiffness" + }, function() { + return this.Yn + }, function(a) { + this.Yn !== a && (z.g(a, "number", Sq, "defaultSpringStiffness"), this.Yn = a, this.I()) + }); + z.defineProperty(Sq, { + rK: "defaultSpringLength" + }, function() { + return this.Xn + }, function(a) { + this.Xn !== a && (z.g(a, "number", Sq, "defaultSpringLength"), this.Xn = a, this.I()) + }); + z.defineProperty(Sq, { + lK: "defaultElectricalCharge" + }, function() { + return this.Un + }, function(a) { + this.Un !== a && (z.g(a, "number", Sq, "defaultElectricalCharge"), this.Un = a, this.I()) + }); + z.defineProperty(Sq, { + mK: "defaultGravitationalMass" + }, function() { + return this.Wn + }, function(a) { + this.Wn !== a && (z.g(a, "number", Sq, "defaultGravitationalMass"), this.Wn = a, this.I()) + }); + z.defineProperty(Sq, { + oH: "defaultCommentSpringLength" + }, function() { + return this.Nq + }, function(a) { + this.Nq !== a && (z.g(a, "number", Sq, "defaultCommentSpringLength"), this.Nq = a, this.I()) + }); + z.defineProperty(Sq, { + nH: "defaultCommentElectricalCharge" + }, function() { + return this.Mq + }, function(a) { + this.Mq !== a && (z.g(a, "number", Sq, "defaultCommentElectricalCharge"), this.Mq = a, this.I()) + }); + + function qr() { + this.kB = this.jB = this.Vx = this.Xx = this.Wx = 0 + } + + function Tq() { + wa.call(this) + } + z.Qa(Tq, wa); + z.ia("ForceDirectedNetwork", Tq); + Tq.prototype.createVertex = function() { + return new or + }; + Tq.prototype.createEdge = function() { + return new tr + }; + + function or() { + xa.call(this); + this.isFixed = !1; + this.mass = this.charge = NaN; + this.uk = this.hg = this.forceY = this.forceX = 0; + this.Dh = this.Xm = null; + this.LA = 0 + } + z.Qa(or, xa); + z.ia("ForceDirectedVertex", or); + + function tr() { + ya.call(this); + this.length = this.stiffness = NaN + } + z.Qa(tr, ya); + z.ia("ForceDirectedEdge", tr); + + function on() { + 0 < arguments.length && z.od(on); + vg.call(this); + this.Td = this.qm = 25; + this.fa = 0; + this.Tn = ur; + this.yo = vr; + this.oo = wr; + this.om = 4; + this.Gn = xr; + this.Ri = yr; + this.Zh = !0; + this.Br = 4; + this.Kb = this.Iv = this.yb = -1; + this.Rf = this.Lr = 0; + this.Rb = this.Pf = this.Qf = this.tg = this.ge = null; + this.Ur = 0; + this.Tr = this.vm = null; + this.vg = 0; + this.Vr = null; + this.hh = []; + this.hh.length = 100 + } + z.Qa(on, vg); + z.ia("LayeredDigraphLayout", on); + on.prototype.cloneProtected = function(a) { + vg.prototype.cloneProtected.call(this, a); + a.qm = this.qm; + a.Td = this.Td; + a.fa = this.fa; + a.Tn = this.Tn; + a.yo = this.yo; + a.oo = this.oo; + a.om = this.om; + a.Gn = this.Gn; + a.Ri = this.Ri; + a.Zh = this.Zh; + a.Br = this.Br + }; + on.prototype.createNetwork = function() { + return new zr + }; + on.prototype.doLayout = function(a) { + null === a && z.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); + null === this.network && (this.network = this.makeNetwork(a)); + this.je = this.initialOrigin(this.je); + this.Iv = -1; + this.Rf = this.Lr = 0; + this.Vr = this.Tr = this.vm = null; + for (a = 0; a < this.hh.length; a++) this.hh[a] = null; + if (0 < this.network.vertexes.count) { + this.network.Sw(); + for (a = this.network.edges.i; a.next();) a.value.rev = !1; + switch (this.Tn) { + default: + case Ar: + var b = 0, + c = this.network.vertexes.count - + 1;a = [];a.length = c + 1; + for (var d = this.network.vertexes.i; d.next();) d.value.valid = !0; + for (; null !== Br(this.network);) { + for (d = Cr(this.network); null !== d;) a[c] = d, c--, d.valid = !1, d = Cr(this.network); + for (d = Dr(this.network); null !== d;) a[b] = d, b++, d.valid = !1, d = Dr(this.network); + for (var d = null, e = 0, g = this.network.vertexes.i; g.next();) { + var h = g.value; + if (h.valid) { + for (var k = 0, l = h.pc; l.next();) l.value.toVertex.valid && k++; + for (var l = 0, m = h.tc; m.next();) m.value.fromVertex.valid && l++; + if (null === d || e < k - l) d = h, e = k - l + } + } + null !== d && (a[b] = + d, b++, d.valid = !1) + } + for (b = 0; b < this.network.vertexes.count; b++) a[b].index = b; + for (a = this.network.edges.i; a.next();) b = a.value, + b.fromVertex.index > b.toVertex.index && (this.network.Fx(b), b.rev = !0); + break; + case ur: + for (b = this.network.vertexes.i; b.next();) a = b.value, a.jp = -1, a.finish = -1; + for (a = this.network.edges.i; a.next();) a.value.forest = !1;this.Ur = 0; + for (b.reset(); b.next();) c = b.value, + 0 === c.tc.count && Er(this, c); + for (b.reset(); b.next();) c = b.value, + -1 === c.jp && Er(this, c); + for (a.reset(); a.next();) b = a.value, + b.forest || (c = b.fromVertex, + d = c.finish, e = b.toVertex, g = e.finish, e.jp < c.jp && d < g && (this.network.Fx(b), b.rev = !0)) + } + for (a = this.network.vertexes.i; a.next();) a.value.layer = -1; + this.yb = -1; + this.assignLayers(); + for (a.reset(); a.next();) this.yb = Math.max(this.yb, a.value.layer); + a = []; + for (c = this.network.edges.i; c.next();) b = c.value, b.valid = !1, a.push(b); + for (c = 0; c < a.length; c++) + if (b = a[c], !b.valid && (null !== b.fromVertex.Bd && null !== b.toVertex.Bd || b.fromVertex.layer !== b.toVertex.layer)) { + l = h = k = g = 0; + e = b.fromVertex; + d = b.toVertex; + if (null !== b.link) { + k = b.link; + if (null === k) continue; + var n = e.Bd, + g = d.Bd; + if (null === n || null === g) continue; + var p = k.Y, + h = k.da, + q = k.md, + l = k.Qd; + b.rev && (k = p, m = q, p = h, q = l, h = k, l = m); + var r = e.R, + k = b.toVertex.R, + s = b.rev ? d.P : e.P, + m = z.O(); + s.F() ? (lp(p, q, ec, m), m.F() || m.assign(r)) : m.assign(r); + n !== p && s.F() && p.isVisible() && (n = e.P, n.F() && (m.x += s.x - n.x, m.y += s.y - n.y)); + p = b.rev ? e.P : d.P; + n = z.O(); + p.F() ? (lp(h, l, ec, n), n.F() || n.assign(k)) : n.assign(k); + g !== h && p.F() && h.isVisible() && (g = d.P, g.F() && (n.x += p.x - g.x, n.y += p.y - g.y)); + 90 === this.fa || 270 === this.fa ? (g = Math.round((m.x - + r.x) / this.Td), h = m.x, k = Math.round((n.x - k.x) / this.Td), l = n.x) : (g = Math.round((m.y - r.y) / this.Td), h = m.y, k = Math.round((n.y - k.y) / this.Td), l = n.y); + z.A(m); + z.A(n); + b.portFromColOffset = g; + b.portFromPos = h; + b.portToColOffset = k; + b.portToPos = l + } else b.portFromColOffset = 0, b.portFromPos = 0, b.portToColOffset = 0, b.portToPos = 0; + m = e.layer; + r = d.layer; + a: if (n = b, p = 0, s = n.link, null !== s) { + var t = s.md, + v = s.Qd; + if (null !== t && null !== v) { + var x = s.Y, + q = s.da; + if (null !== x && null !== q) { + var y = t.Db, + A = v.Eb; + this.aq || (s.Db.bd() || (y = s.Db), s.Eb.bd() || (A = s.Eb)); + var B = s.rc, + L = Fr(this, !0); + if (y.bd() || y === Yb) y = L; + var H = Fr(this, !1); + if (A.bd() || A === Yb) A = H; + if (y.kj() && y.vp(H) && A.kj() && A.vp(L)) { + p = 0; + break a + } + L = s.getLinkPoint(x, t, y, !0, B, q, v, z.O()); + y = s.getLinkDirection(x, t, L, y, !0, B, q, v); + z.A(L); + y === Gr(this, n, !0) ? p += 1 : this.aq && null !== x && 1 === x.ports.count && n.rev && (p += 1); + y = s.getLinkPoint(q, v, A, !1, B, x, t, z.O()); + s = s.getLinkDirection(q, v, y, A, !1, B, x, t); + z.A(y); + s === Gr(this, n, !1) ? p += 2 : this.aq && null !== q && 1 === q.ports.count && n.rev && (p += 2) + } + } + } + n = 1 === p || 3 === p ? !0 : !1; + if (p = 2 === p || 3 === p ? !0 : !1) q = + this.network.createVertex(), q.Bd = null, q.Um = 1, q.layer = m, q.near = e, this.network.tl(q), e = this.network.Hp(e, q, b.link), e.valid = !1, e.rev = b.rev, e.portFromColOffset = g, e.portToColOffset = 0, e.portFromPos = h, e.portToPos = 0, e = q; + s = 1; + n && s--; + if (m - r > s && 0 < m) { + b.valid = !1; + q = this.network.createVertex(); + q.Bd = null; + q.Um = 2; + q.layer = m - 1; + this.network.tl(q); + e = this.network.Hp(e, q, b.link); + e.valid = !0; + e.rev = b.rev; + e.portFromColOffset = p ? 0 : g; + e.portToColOffset = 0; + e.portFromPos = p ? 0 : h; + e.portToPos = 0; + e = q; + for (m--; m - r > s && 0 < m;) q = this.network.createVertex(), + q.Bd = null, q.Um = 3, q.layer = m - 1, this.network.tl(q), e = this.network.Hp(e, q, b.link), e.valid = !0, e.rev = b.rev, e.portFromColOffset = 0, e.portToColOffset = 0, e.portFromPos = 0, e.portToPos = 0, e = q, m--; + e = this.network.Hp(q, d, b.link); + e.valid = !n; + n && (q.near = d); + e.rev = b.rev; + e.portFromColOffset = 0; + e.portToColOffset = k; + e.portFromPos = 0; + e.portToPos = l + } else b.valid = !0 + } + b = this.ge = []; + for (c = 0; c <= this.yb; c++) b[c] = 0; + for (a = this.network.vertexes.i; a.next();) c = a.value, c.index = -1; + this.initializeIndices(); + this.Iv = -1; + for (c = this.Rf = this.Lr = 0; c <= + this.yb; c++) b[c] > b[this.Rf] && (this.Iv = b[c] - 1, this.Rf = c), b[c] < b[this.Lr] && (this.Lr = c); + this.Vr = []; + for (c = 0; c < b.length; c++) this.Vr[c] = []; + for (a.reset(); a.next();) b = a.value, c = this.Vr[b.layer], c[b.index] = b; + this.Kb = -1; + for (a = 0; a <= this.yb; a++) { + b = Hr(this, a); + c = 0; + d = this.ge[a]; + for (e = 0; e < d; e++) g = b[e], c += this.nodeMinColumnSpace(g, !0), g.column = c, c += 1, c += this.nodeMinColumnSpace(g, !1); + this.Kb = Math.max(this.Kb, c - 1); + Ir(this, a, b) + } + this.reduceCrossings(); + this.straightenAndPack(); + this.updateParts() + } + this.network = null; + this.Gf = !0 + }; + on.prototype.linkMinLength = function() { + return 1 + }; + + function Jr(a) { + var b = a.fromVertex.Bd; + a = a.toVertex.Bd; + return null === b && null === a ? 8 : null === b || null === a ? 4 : 1 + } + on.prototype.nodeMinLayerSpace = function(a, b) { + return null === a.Bd ? 0 : 90 === this.fa || 270 === this.fa ? b ? a.R.y + 10 : a.P.height - a.R.y + 10 : b ? a.R.x + 10 : a.P.width - a.R.x + 10 + }; + on.prototype.nodeMinColumnSpace = function(a, b) { + if (null === a.Bd) return 0; + var c = b ? a.yA : a.xA; + if (null !== c) return c; + c = this.fa; + return 90 === c || 270 === c ? b ? a.yA = a.R.x / this.Td + 1 | 0 : a.xA = (a.P.width - a.R.x) / this.Td + 1 | 0 : b ? a.yA = a.R.y / this.Td + 1 | 0 : a.xA = (a.P.height - a.R.y) / this.Td + 1 | 0 + }; + + function Kr(a) { + null === a.vm && (a.vm = []); + for (var b = 0, c = a.network.vertexes.i; c.next();) { + var d = c.value; + a.vm[b] = d.layer; + b++; + a.vm[b] = d.column; + b++; + a.vm[b] = d.index; + b++ + } + return a.vm + } + + function Lr(a, b) { + for (var c = 0, d = a.network.vertexes.i; d.next();) { + var e = d.value; + e.layer = b[c]; + c++; + e.column = b[c]; + c++; + e.index = b[c]; + c++ + } + } + + function Mr(a, b, c) { + u && (z.p(b, on, "crossingMatrix:unfixedLayer"), z.p(c, on, "crossingMatrix:direction")); + var d = Hr(a, b), + e = a.ge[b]; + if (null === a.Tr || a.Tr.length < e * e) a.Tr = []; + for (var g = a.Tr, h = 0; h < e; h++) { + var k = 0, + l = d[h], + m = l.near, + n = 0; + if (null !== m && m.layer === l.layer) + if (n = m.index, n > h) + for (var p = h + 1; p < n; p++) l = d[p], l.near === m && l.Um === m.Um || k++; + else + for (p = h - 1; p > n; p--) l = d[p], l.near === m && l.Um === m.Um || k++; + var m = 0, + q, r = q = p = l = 0, + s, t = 0, + v = 0; + s = 0; + var x; + if (0 <= c) + for (n = d[h].Ze, m = 0; m < n.count; m++) + if (q = n.o[m], q.valid && q.fromVertex.layer !== + b) + for (l = q.fromVertex.index, p = q.portToPos, q = q.portFromPos, r = m + 1; r < n.count; r++) s = n.o[r], s.valid && s.fromVertex.layer !== b && (t = s.fromVertex.index, v = s.portToPos, s = s.portFromPos, p < v && (l > t || l === t && q > s) && k++, v < p && (t > l || t === l && s > q) && k++); + if (0 >= c) + for (n = d[h].Te, m = 0; m < n.count; m++) + if (q = n.o[m], q.valid && q.toVertex.layer !== b) + for (l = q.toVertex.index, p = q.portToPos, q = q.portFromPos, r = m + 1; r < n.count; r++) s = n.o[r], s.valid && s.toVertex.layer !== b && (t = s.toVertex.index, v = s.portToPos, s = s.portFromPos, q < s && (l > t || l === t && p > v) && k++, + s < q && (t > l || t === l && v > p) && k++); + g[h * e + h] = k; + for (n = h + 1; n < e; n++) { + var y = 0, + A = 0; + if (0 <= c) + for (k = d[h].Ze, x = d[n].Ze, m = 0; m < k.count; m++) + if (q = k.o[m], q.valid && q.fromVertex.layer !== b) + for (l = q.fromVertex.index, q = q.portFromPos, r = 0; r < x.count; r++) s = x.o[r], s.valid && s.fromVertex.layer !== b && (t = s.fromVertex.index, s = s.portFromPos, (l < t || l === t && q < s) && A++, (t < l || t === l && s < q) && y++); + if (0 >= c) + for (k = d[h].Te, x = d[n].Te, m = 0; m < k.count; m++) + if (q = k.o[m], q.valid && q.toVertex.layer !== b) + for (l = q.toVertex.index, p = q.portToPos, r = 0; r < x.count; r++) s = x.o[r], + s.valid && s.toVertex.layer !== b && (t = s.toVertex.index, v = s.portToPos, (l < t || l === t && p < v) && A++, (t < l || t === l && v < p) && y++); + g[h * e + n] = y; + g[n * e + h] = A + } + } + Ir(a, b, d); + return g + } + on.prototype.countCrossings = function() { + for (var a = 0, b = 0; b <= this.yb; b++) + for (var c = Mr(this, b, 1), d = this.ge[b], e = 0; e < d; e++) + for (var g = e; g < d; g++) a += c[e * d + g]; + return a + }; + + function Nr(a) { + for (var b = 0, c = 0; c <= a.yb; c++) { + for (var d = a, e = c, g = Hr(d, e), h = d.ge[e], k = 0, l = 0; l < h; l++) { + var m = null, + m = g[l].Te, + n, p = 0, + q = 0; + if (null !== m) + for (var r = 0; r < m.count; r++) n = m.o[r], n.valid && n.toVertex.layer !== e && (p = n.fromVertex.column + n.portFromColOffset, q = n.toVertex.column + n.portToColOffset, k += (Math.abs(p - q) + 1) * Jr(n)) + } + Ir(d, e, g); + b += k + } + return b + } + on.prototype.normalize = function() { + var a = Infinity; + this.Kb = -1; + for (var b = this.network.vertexes.i; b.next();) { + var c = b.value, + a = Math.min(a, c.column - this.nodeMinColumnSpace(c, !0)); + this.Kb = Math.max(this.Kb, c.column + this.nodeMinColumnSpace(c, !1)) + } + for (b.reset(); b.next();) b.value.column -= a; + this.Kb -= a + }; + + function Or(a, b, c) { + u && (z.p(b, on, "barycenters:unfixedLayer"), z.p(c, on, "barycenters:direction")); + for (var d = Hr(a, b), e = a.ge[b], g = [], h = 0; h < e; h++) { + var k = d[h], + l = null; + 0 >= c && (l = k.Ze); + var m = null; + 0 <= c && (m = k.Te); + var n = 0, + p = 0, + q = k.near; + null !== q && q.layer === k.layer && (n += q.column - 1, p++); + if (null !== l) + for (q = 0; q < l.count; q++) { + var k = l.o[q], + r = k.fromVertex; + k.valid && !k.rev && r.layer !== b && (n += r.column, p++) + } + if (null !== m) + for (l = 0; l < m.count; l++) k = m.o[l], q = k.toVertex, k.valid && !k.rev && q.layer !== b && (n += q.column, p++); + g[h] = 0 === p ? -1 : n / + p + } + Ir(a, b, d); + return g + } + + function Pr(a, b, c) { + u && (z.p(b, on, "medians:unfixedLayer"), z.p(c, on, "medians:direction")); + for (var d = Hr(a, b), e = a.ge[b], g = [], h = 0; h < e; h++) { + var k = d[h], + l = null; + 0 >= c && (l = k.Ze); + var m = null; + 0 <= c && (m = k.Te); + var n = 0, + p = [], + q = k.near; + null !== q && q.layer === k.layer && (p[n] = q.column - 1, n++); + if (null !== l) + for (q = 0; q < l.count; q++) { + var k = l.o[q], + r = k.fromVertex; + k.valid && !k.rev && r.layer !== b && (p[n] = r.column + k.portFromColOffset, n++) + } + if (null !== m) + for (l = 0; l < m.count; l++) k = m.o[l], q = k.toVertex, k.valid && !k.rev && q.layer !== b && (p[n] = q.column + k.portToColOffset, + n++); + 0 === n ? g[h] = -1 : (p.sort(function(a, b) { + return a - b + }), m = n >> 1, g[h] = n & 1 ? p[m] : p[m - 1] + p[m] >> 1) + } + Ir(a, b, d); + return g + } + + function Qr(a, b, c, d, e, g) { + if (b.component === d) { + b.component = c; + var h = 0, + k = 0; + if (e) + for (var l = b.pc; l.next();) { + var k = l.value, + m = k.toVertex, + h = b.layer - m.layer, + k = a.linkMinLength(k); + h === k && Qr(a, m, c, d, e, g) + } + if (g) + for (l = b.tc; l.next();) k = l.value, m = k.fromVertex, h = m.layer - b.layer, k = a.linkMinLength(k), h === k && Qr(a, m, c, d, e, g) + } + } + + function Rr(a, b, c, d, e, g) { + if (b.component === d) { + b.component = c; + if (e) + for (var h = b.pc; h.next();) Rr(a, h.value.toVertex, c, d, e, g); + if (g) + for (b = b.tc; b.next();) Rr(a, b.value.fromVertex, c, d, e, g) + } + } + + function Br(a) { + for (a = a.vertexes.i; a.next();) { + var b = a.value; + if (b.valid) return b + } + return null + } + + function Cr(a) { + for (a = a.vertexes.i; a.next();) { + var b = a.value; + if (b.valid) { + for (var c = !0, d = b.pc; d.next();) + if (d.value.toVertex.valid) { + c = !1; + break + } + if (c) return b + } + } + return null + } + + function Dr(a) { + for (a = a.vertexes.i; a.next();) { + var b = a.value; + if (b.valid) { + for (var c = !0, d = b.tc; d.next();) + if (d.value.fromVertex.valid) { + c = !1; + break + } + if (c) return b + } + } + return null + } + + function Er(a, b) { + b.jp = a.Ur; + a.Ur++; + for (var c = b.pc; c.next();) { + var d = c.value, + e = d.toVertex; - 1 === e.jp && (d.forest = !0, Er(a, e)) + } + b.finish = a.Ur; + a.Ur++ + } + on.prototype.assignLayers = function() { + switch (this.yo) { + case Sr: + Tr(this); + break; + case Ur: + for (var a = 0, b = this.network.vertexes.i; b.next();) a = Vr(this, b.value), this.yb = Math.max(a, this.yb); + for (b.reset(); b.next();) a = b.value, a.layer = this.yb - a.layer; + break; + default: + case vr: + Tr(this); + for (b = this.network.vertexes.i; b.next();) b.value.valid = !1; + for (b.reset(); b.next();) a = b.value, 0 === a.tc.count && Wr(this, a); + a = Infinity; + for (b.reset(); b.next();) a = Math.min(a, b.value.layer); + this.yb = -1; + for (b.reset(); b.next();) { + var c = b.value; + c.layer -= + a; + this.yb = Math.max(this.yb, c.layer) + } + } + }; + + function Tr(a) { + for (var b = a.network.vertexes.i; b.next();) { + var c = Xr(a, b.value); + a.yb = Math.max(c, a.yb) + } + } + + function Xr(a, b) { + var c = 0; + if (-1 === b.layer) { + for (var d = b.pc; d.next();) var e = d.value, + g = e.toVertex, + e = a.linkMinLength(e), + c = Math.max(c, Xr(a, g) + e); + b.layer = c + } else c = b.layer; + return c + } + + function Vr(a, b) { + var c = 0; + if (-1 === b.layer) { + for (var d = b.tc; d.next();) var e = d.value, + g = e.fromVertex, + e = a.linkMinLength(e), + c = Math.max(c, Vr(a, g) + e); + b.layer = c + } else c = b.layer; + return c + } + + function Wr(a, b) { + if (!b.valid) { + b.valid = !0; + for (var c = b.pc; c.next();) Wr(a, c.value.toVertex); + for (c = a.network.vertexes.i; c.next();) c.value.component = -1; + for (var d = b.Ze.o, e = d.length, g = 0; g < e; g++) { + var h = d[g], + k = a.linkMinLength(h); + h.fromVertex.layer - h.toVertex.layer > k && Qr(a, h.fromVertex, 0, -1, !0, !1) + } + for (Qr(a, b, 1, -1, !0, !0); 0 !== b.component;) { + for (var k = 0, d = Infinity, l = 0, m = null, n = a.network.vertexes.i; n.next();) { + var p = n.value; + if (1 === p.component) { + for (var q = 0, r = !1, s = p.Ze.o, e = s.length, g = 0; g < e; g++) { + var h = s[g], + t = h.fromVertex, + q = q + 1; + 1 !== t.component && (k += 1, t = t.layer - p.layer, h = a.linkMinLength(h), d = Math.min(d, t - h)) + } + h = p.Te.o; + e = h.length; + for (g = 0; g < e; g++) s = h[g].toVertex, q -= 1, 1 !== s.component ? k -= 1 : r = !0; + (null === m || q < l) && !r && (m = p, l = q) + } + } + if (0 < k) { + for (c.reset(); c.next();) e = c.value, 1 === e.component && (e.layer += d); + b.component = 0 + } else m.component = 0 + } + for (c = a.network.vertexes.i; c.next();) c.value.component = -1; + for (Qr(a, b, 1, -1, !0, !1); 0 !== b.component;) { + g = 0; + e = Infinity; + d = 0; + k = null; + for (l = a.network.vertexes.i; l.next();) + if (m = l.value, 1 === m.component) { + n = + 0; + p = !1; + h = m.Ze.o; + q = h.length; + for (r = 0; r < q; r++) s = h[r].fromVertex, n += 1, 1 !== s.component ? g += 1 : p = !0; + h = m.Te.o; + q = h.length; + for (r = 0; r < q; r++) s = h[r], t = s.toVertex, n -= 1, 1 !== t.component && (g -= 1, t = m.layer - t.layer, s = a.linkMinLength(s), e = Math.min(e, t - s)); + (null === k || n > d) && !p && (k = m, d = n) + } + if (0 > g) { + for (c.reset(); c.next();) g = c.value, 1 === g.component && (g.layer -= e); + b.component = 0 + } else k.component = 0 + } + } + } + + function Gr(a, b, c) { + return 90 === a.fa ? c && !b.rev || !c && b.rev ? 270 : 90 : 180 === a.fa ? c && !b.rev || !c && b.rev ? 0 : 180 : 270 === a.fa ? c && !b.rev || !c && b.rev ? 90 : 270 : c && !b.rev || !c && b.rev ? 180 : 0 + } + on.prototype.initializeIndices = function() { + switch (this.oo) { + default: + case Yr: + for (var a = this.network.vertexes.i; a.next();) { + var b = a.value, + c = b.layer; + b.index = this.ge[c]; + this.ge[c]++ + } + break; + case wr: + a = this.network.vertexes.i; + for (b = this.yb; 0 <= b; b--) + for (a.reset(); a.next();) c = a.value, c.layer === b && -1 === c.index && Zr(this, c); + break; + case $r: + for (a = this.network.vertexes.i, b = 0; b <= this.yb; b++) + for (a.reset(); a.next();) c = a.value, c.layer === b && -1 === c.index && as(this, c) + } + }; + + function Zr(a, b) { + var c = b.layer; + b.index = a.ge[c]; + a.ge[c]++; + for (var c = b.Te.jc(), d = !0; d;) + for (var d = !1, e = 0; e < c.length - 1; e++) { + var g = c[e], + h = c[e + 1]; + g.portFromColOffset > h.portFromColOffset && (d = !0, c[e] = h, c[e + 1] = g) + } + for (e = 0; e < c.length; e++) d = c[e], d.valid && (d = d.toVertex, -1 === d.index && Zr(a, d)) + } + + function as(a, b) { + var c = b.layer; + b.index = a.ge[c]; + a.ge[c]++; + for (var c = b.Ze.jc(), d = !0, e = 0; d;) + for (d = !1, e = 0; e < c.length - 1; e++) { + var g = c[e], + h = c[e + 1]; + g.portToColOffset > h.portToColOffset && (d = !0, c[e] = h, c[e + 1] = g) + } + for (e = 0; e < c.length; e++) d = c[e], d.valid && (d = d.fromVertex, -1 === d.index && as(a, d)) + } + on.prototype.reduceCrossings = function() { + for (var a = this.countCrossings(), b = Kr(this), c = 0, d = 0, e = 0, c = 0; c < this.om; c++) { + for (d = 0; d <= this.yb; d++) bs(this, d, 1), cs(this, d, 1); + e = this.countCrossings(); + e < a && (a = e, b = Kr(this)); + for (d = this.yb; 0 <= d; d--) bs(this, d, -1), cs(this, d, -1); + e = this.countCrossings(); + e < a && (a = e, b = Kr(this)) + } + Lr(this, b); + for (c = 0; c < this.om; c++) { + for (d = 0; d <= this.yb; d++) bs(this, d, 0), cs(this, d, 0); + e = this.countCrossings(); + e < a && (a = e, b = Kr(this)); + for (d = this.yb; 0 <= d; d--) bs(this, d, 0), cs(this, d, 0); + e = this.countCrossings(); + e < a && (a = e, b = Kr(this)) + } + Lr(this, b); + var g = !1, + h = c = 0, + k = 0, + d = 0; + switch (this.Gn) { + case ds: + break; + case es: + for (k = a + 1; + (d = this.countCrossings()) < k;) + for (k = d, c = this.yb; 0 <= c; c--) + for (h = 0; h <= c; h++) { + for (g = !0; g;) + for (g = !1, d = c; d >= h; d--) g = cs(this, d, -1) || g; + e = this.countCrossings(); + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = c; d >= h; d--) g = cs(this, d, 1) || g; + e = this.countCrossings(); + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = h; d <= c; d++) g = cs(this, d, 1) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, + d = h; d <= c; d++) g = cs(this, d, -1) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = c; d >= h; d--) g = cs(this, d, 0) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = h; d <= c; d++) g = cs(this, d, 0) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)) + } + break; + default: + case xr: + for (c = this.yb, h = 0, k = a + 1; + (d = this.countCrossings()) < k;) { + k = d; + for (g = !0; g;) + for (g = !1, d = c; d >= h; d--) g = cs(this, d, -1) || g; + e = this.countCrossings(); + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = c; d >= h; d--) g = cs(this, d, 1) || g; + e = this.countCrossings(); + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = h; d <= c; d++) g = cs(this, d, 1) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = h; d <= c; d++) g = cs(this, d, -1) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = c; d >= h; d--) g = cs(this, d, 0) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)); + for (g = !0; g;) + for (g = !1, d = h; d <= c; d++) g = cs(this, d, 0) || g; + e >= a ? Lr(this, b) : (a = e, b = Kr(this)) + } + } + Lr(this, b) + }; + + function bs(a, b, c) { + u && (z.p(b, on, "medianBarycenterCrossingReduction:unfixedLayer"), z.p(c, on, "medianBarycenterCrossingReduction:direction")); + var d = 0, + e = Hr(a, b), + g = a.ge[b], + h = Pr(a, b, c); + c = Or(a, b, c); + for (d = 0; d < g; d++) - 1 === c[d] && (c[d] = e[d].column), -1 === h[d] && (h[d] = e[d].column); + for (var k = !0, l; k;) + for (k = !1, d = 0; d < g - 1; d++) + if (h[d + 1] < h[d] || h[d + 1] === h[d] && c[d + 1] < c[d]) k = !0, l = h[d], h[d] = h[d + 1], h[d + 1] = l, l = c[d], c[d] = c[d + 1], c[d + 1] = l, l = e[d], e[d] = e[d + 1], e[d + 1] = l; + for (d = h = 0; d < g; d++) l = e[d], l.index = d, h += a.nodeMinColumnSpace(l, !0), l.column = h, h += 1, h += a.nodeMinColumnSpace(l, !1); + Ir(a, b, e) + } + + function cs(a, b, c) { + var d = Hr(a, b), + e = a.ge[b]; + c = Mr(a, b, c); + var g = 0, + h; + h = []; + for (g = 0; g < e; g++) h[g] = -1; + var k; + k = []; + for (g = 0; g < e; g++) k[g] = -1; + for (var l = !1, m = !0; m;) + for (m = !1, g = 0; g < e - 1; g++) { + var n = c[d[g].index * e + d[g + 1].index], + p = c[d[g + 1].index * e + d[g].index], + q = 0, + r = 0, + s = d[g].column, + t = d[g + 1].column, + v = a.nodeMinColumnSpace(d[g], !0), + x = a.nodeMinColumnSpace(d[g], !1), + y = a.nodeMinColumnSpace(d[g + 1], !0), + A = a.nodeMinColumnSpace(d[g + 1], !1), + v = s - v + y, + x = t - x + A, + y = y = 0, + B = d[g].tc.i; + for (B.reset(); B.next();) + if (A = B.value, A.valid && A.fromVertex.layer === + b) { + A = A.fromVertex; + for (y = 0; d[y] !== A;) y++; + y < g && (q += 2 * (g - y), r += 2 * (g + 1 - y)); + y === g + 1 && (q += 1); + y > g + 1 && (q += 4 * (y - g), r += 4 * (y - (g + 1))) + } + B = d[g].pc.i; + for (B.reset(); B.next();) + if (A = B.value, A.valid && A.toVertex.layer === b) { + A = A.toVertex; + for (y = 0; d[y] !== A;) y++; + y === g + 1 && (r += 1) + } + B = d[g + 1].tc.i; + for (B.reset(); B.next();) + if (A = B.value, A.valid && A.fromVertex.layer === b) { + A = A.fromVertex; + for (y = 0; d[y] !== A;) y++; + y < g && (q += 2 * (g + 1 - y), r += 2 * (g - y)); + y === g && (r += 1); + y > g + 1 && (q += 4 * (y - (g + 1)), r += 4 * (y - g)) + } + B = d[g + 1].pc.i; + for (B.reset(); B.next();) + if (A = B.value, + A.valid && A.toVertex.layer === b) { + A = A.toVertex; + for (y = 0; d[y] !== A;) y++; + y === g && (q += 1) + } + var y = A = 0, + B = h[d[g].index], + L = k[d[g].index], + H = h[d[g + 1].index], + U = k[d[g + 1].index]; - 1 !== B && (A += Math.abs(B - s), y += Math.abs(B - x)); - 1 !== L && (A += Math.abs(L - s), y += Math.abs(L - x)); - 1 !== H && (A += Math.abs(H - t), y += Math.abs(H - v)); - 1 !== U && (A += Math.abs(U - t), y += Math.abs(U - v)); + if (r < q - .5 || r === q && p < n - .5 || r === q && p === n && y < A - .5) m = l = !0, d[g].column = x, d[g + 1].column = v, n = d[g], d[g] = d[g + 1], d[g + 1] = n + } + for (g = 0; g < e; g++) d[g].index = g; + Ir(a, b, d); + return l + } + on.prototype.straightenAndPack = function() { + var a = 0, + b = !1, + c = 0 !== (this.Ri & fs), + a = this.Ri === yr; + 1E3 < this.network.edges.count && !a && (c = !1); + if (c) { + b = []; + for (a = a = 0; a <= this.yb; a++) b[a] = 0; + for (var d = 0, e = this.network.vertexes.i; e.next();) { + var g = e.value, + a = g.layer, + d = g.column, + g = this.nodeMinColumnSpace(g, !1); + b[a] = Math.max(b[a], d + g) + } + for (e.reset(); e.next();) g = e.value, a = g.layer, d = g.column, g.column = (8 * (this.Kb - b[a]) >> 1) + 8 * d; + this.Kb *= 8 + } + if (0 !== (this.Ri & gs)) + for (b = !0; b;) { + b = !1; + for (a = this.Rf + 1; a <= this.yb; a++) b = hs(this, a, 1) || b; + for (a = this.Rf - 1; 0 <= a; a--) b = hs(this, a, -1) || b; + b = hs(this, this.Rf, 0) || b + } + if (0 !== (this.Ri & is)) { + for (a = this.Rf + 1; a <= this.yb; a++) js(this, a, 1); + for (a = this.Rf - 1; 0 <= a; a--) js(this, a, -1); + js(this, this.Rf, 0) + } + c && (ks(this, -1), ks(this, 1)); + if (0 !== (this.Ri & gs)) + for (b = !0; b;) { + b = !1; + b = hs(this, this.Rf, 0) || b; + for (a = this.Rf + 1; a <= this.yb; a++) b = hs(this, a, 0) || b; + for (a = this.Rf - 1; 0 <= a; a--) b = hs(this, a, 0) || b + } + }; + + function hs(a, b, c) { + u && (z.p(b, on, "bendStraighten:unfixedLayer"), z.p(c, on, "bendStraighten:direction")); + for (var d = !1; ls(a, b, c);) d = !0; + return d + } + + function ls(a, b, c) { + u && (z.p(b, on, "shiftbendStraighten:unfixedLayer"), z.p(c, on, "shiftbendStraighten:direction")); + var d = 0, + e = Hr(a, b), + g = a.ge[b], + h = Or(a, b, -1); + if (0 < c) + for (d = 0; d < g; d++) h[d] = -1; + var k = Or(a, b, 1); + if (0 > c) + for (d = 0; d < g; d++) k[d] = -1; + for (var l = !1, m = !0; m;) + for (m = !1, d = 0; d < g; d++) { + var n = e[d].column, + p = a.nodeMinColumnSpace(e[d], !0), + q = a.nodeMinColumnSpace(e[d], !1), + r = 0, + r = 0 > d - 1 || n - e[d - 1].column - 1 > p + a.nodeMinColumnSpace(e[d - 1], !1) ? n - 1 : n, + p = 0, + p = d + 1 >= g || e[d + 1].column - n - 1 > q + a.nodeMinColumnSpace(e[d + 1], !0) ? n + 1 : n, + s = q = + 0, + t = 0, + v = 0, + x = 0, + y = 0; + if (0 >= c) + for (var A = e[d].tc.i; A.next();) { + var B = A.value; + B.valid && B.fromVertex.layer !== b && (v = Jr(B), x = B.portFromColOffset, y = B.portToColOffset, B = B.fromVertex.column, q += (Math.abs(n + y - (B + x)) + 1) * v, s += (Math.abs(r + y - (B + x)) + 1) * v, t += (Math.abs(p + y - (B + x)) + 1) * v) + } + if (0 <= c) + for (A = e[d].pc.i; A.next();) B = A.value, B.valid && B.toVertex.layer !== b && (v = Jr(B), x = B.portFromColOffset, y = B.portToColOffset, B = B.toVertex.column, q += (Math.abs(n + x - (B + y)) + 1) * v, s += (Math.abs(r + x - (B + y)) + 1) * v, t += (Math.abs(p + x - (B + y)) + 1) * v); + y = + x = v = 0; + A = h[e[d].index]; + B = k[e[d].index]; - 1 !== A && (v += Math.abs(A - n), x += Math.abs(A - r), y += Math.abs(A - p)); - 1 !== B && (v += Math.abs(B - n), x += Math.abs(B - r), y += Math.abs(B - p)); + if (s < q || s === q && x < v) m = l = !0, e[d].column = r; + else if (t < q || t === q && y < v) m = l = !0, e[d].column = p + } + Ir(a, b, e); + a.normalize(); + return l + } + + function js(a, b, c) { + u && (z.p(b, on, "medianStraighten:unfixedLayer"), z.p(c, on, "medianStraighten:direction")); + var d = 0, + e = Hr(a, b), + g = a.ge[b], + h = Pr(a, b, c); + c = []; + for (d = 0; d < g; d++) c[d] = h[d]; + for (h = !0; h;) + for (h = !1, d = 0; d < g; d++) { + var k = e[d].column, + l = a.nodeMinColumnSpace(e[d], !0), + m = a.nodeMinColumnSpace(e[d], !1), + n = 0, + p = 0, + q = 0, + q = p = 0; - 1 === c[d] ? 0 === d && d === g - 1 ? n = k : 0 === d ? (p = e[d + 1].column, n = p - k === m + a.nodeMinColumnSpace(e[d + 1], !0) ? k - 1 : k) : d === g - 1 ? (q = e[d - 1].column, n = k - q === l + a.nodeMinColumnSpace(e[d - 1], !1) ? k + 1 : k) : (q = e[d - 1].column, + q = q + a.nodeMinColumnSpace(e[d - 1], !1) + l + 1, p = e[d + 1].column, p = p - a.nodeMinColumnSpace(e[d + 1], !0) - m - 1, n = (q + p) / 2 | 0) : 0 === d && d === g - 1 ? n = c[d] : 0 === d ? (p = e[d + 1].column, p = p - a.nodeMinColumnSpace(e[d + 1], !0) - m - 1, n = Math.min(c[d], p)) : d === g - 1 ? (q = e[d - 1].column, q = q + a.nodeMinColumnSpace(e[d - 1], !1) + l + 1, n = Math.max(c[d], q)) : (q = e[d - 1].column, q = q + a.nodeMinColumnSpace(e[d - 1], !1) + l + 1, p = e[d + 1].column, p = p - a.nodeMinColumnSpace(e[d + 1], !0) - m - 1, q < c[d] && c[d] < p ? n = c[d] : q >= c[d] ? n = q : p <= c[d] && (n = p)); + n !== k && (h = !0, e[d].column = n) + } + Ir(a, b, e); + a.normalize() + } + + function ms(a, b) { + u && (z.p(b, on, "packAux:column"), z.p(1, on, "packAux:direction")); + for (var c = !0, d = a.network.vertexes.i; d.next();) { + var e = d.value, + g = a.nodeMinColumnSpace(e, !0), + h = a.nodeMinColumnSpace(e, !1); + if (e.column - g <= b && e.column + h >= b) { + c = !1; + break + } + } + e = !1; + if (c) + for (d.reset(); d.next();) c = d.value, c.column > b && (c.column -= 1, e = !0); + return e + } + + function ns(a, b) { + u && (z.p(b, on, "tightPackAux:column"), z.p(1, on, "tightPackAux:direction")); + for (var c = b, c = b + 1, d = 0, e = [], g = [], d = 0; d <= a.yb; d++) e[d] = !1, g[d] = !1; + for (var h = a.network.vertexes.i; h.next();) { + var d = h.value, + k = d.column - a.nodeMinColumnSpace(d, !0), + l = d.column + a.nodeMinColumnSpace(d, !1); + k <= b && l >= b && (e[d.layer] = !0); + k <= c && l >= c && (g[d.layer] = !0) + } + k = !0; + c = !1; + for (d = 0; d <= a.yb; d++) k = k && !(e[d] && g[d]); + if (k) + for (h.reset(); h.next();) e = h.value, e.column > b && (e.column -= 1, c = !0); + return c + } + + function ks(a, b) { + u && z.p(b, on, "componentPack:direction"); + for (var c = 0; c <= a.Kb; c++) + for (; ms(a, c);); + a.normalize(); + for (c = 0; c < a.Kb; c++) + for (; ns(a, c);); + a.normalize(); + var c = 0, + d, e = 0, + g = 0, + h = 0; + if (0 < b) + for (c = 0; c <= a.Kb; c++) + for (d = Kr(a), e = Nr(a), g = e + 1; e < g;) g = e, os(a, c, 1), h = Nr(a), h > e ? Lr(a, d) : h < e && (e = h, d = Kr(a)); + if (0 > b) + for (c = a.Kb; 0 <= c; c--) + for (d = Kr(a), e = Nr(a), g = e + 1; e < g;) g = e, os(a, c, -1), h = Nr(a), h > e ? Lr(a, d) : h < e && (e = h, d = Kr(a)); + a.normalize() + } + + function os(a, b, c) { + a.vg = 0; + for (var d = a.network.vertexes.i; d.next();) d.value.component = -1; + if (0 < c) + for (d.reset(); d.next();) { + var e = d.value; + e.column - a.nodeMinColumnSpace(e, !0) <= b && (e.component = a.vg) + } + if (0 > c) + for (d.reset(); d.next();) e = d.value, e.column + a.nodeMinColumnSpace(e, !1) >= b && (e.component = a.vg); + a.vg++; + for (d.reset(); d.next();) b = d.value, -1 === b.component && (Rr(a, b, a.vg, -1, !0, !0), a.vg++); + var g = 0; + b = []; + for (g = 0; g < a.vg * a.vg; g++) b[g] = !1; + e = []; + for (g = 0; g < (a.yb + 1) * (a.Kb + 1); g++) e[g] = -1; + for (d.reset(); d.next();) + for (var g = + d.value, h = g.layer, k = Math.max(0, g.column - a.nodeMinColumnSpace(g, !0)), l = Math.min(a.Kb, g.column + a.nodeMinColumnSpace(g, !1)); k <= l; k++) e[h * (a.Kb + 1) + k] = g.component; + for (g = 0; g <= a.yb; g++) { + if (0 < c) + for (k = 0; k < a.Kb; k++) - 1 !== e[g * (a.Kb + 1) + k] && -1 !== e[g * (a.Kb + 1) + k + 1] && e[g * (a.Kb + 1) + k] !== e[g * (a.Kb + 1) + k + 1] && (b[e[g * (a.Kb + 1) + k] * a.vg + e[g * (a.Kb + 1) + k + 1]] = !0); + if (0 > c) + for (k = a.Kb; 0 < k; k--) - 1 !== e[g * (a.Kb + 1) + k] && -1 !== e[g * (a.Kb + 1) + k - 1] && e[g * (a.Kb + 1) + k] !== e[g * (a.Kb + 1) + k - 1] && (b[e[g * (a.Kb + 1) + k] * a.vg + e[g * (a.Kb + 1) + k - 1]] = !0) + } + e = []; + for (g = + 0; g < a.vg; g++) e[g] = !0; + h = new J("number"); + h.add(0); + for (l = 0; 0 !== h.count;) + if (l = h.o[h.count - 1], h.dd(h.count - 1), e[l]) + for (e[l] = !1, g = 0; g < a.vg; g++) b[l * a.vg + g] && h.Ld(0, g); + if (0 < c) + for (d.reset(); d.next();) a = d.value, e[a.component] && (a.column -= 1); + if (0 > c) + for (d.reset(); d.next();) c = d.value, e[c.component] && (c.column += 1) + } + on.prototype.commitLayout = function() { + if (this.aq) + for (var a = Fr(this, !0), b = Fr(this, !1), c = this.network.edges.i; c.next();) { + var d = c.value.link; + null !== d && (d.Db = a, d.Eb = b) + } + this.commitNodes(); + this.Fz(); + this.Rt && this.commitLinks() + }; + + function Fr(a, b) { + return 270 === a.fa ? b ? Zc : bd : 90 === a.fa ? b ? bd : Zc : 180 === a.fa ? b ? $c : ad : b ? ad : $c + } + on.prototype.commitNodes = function() { + this.tg = []; + this.Qf = []; + this.Pf = []; + this.Rb = []; + for (var a = 0; a <= this.yb; a++) this.tg[a] = 0, this.Qf[a] = 0, this.Pf[a] = 0, this.Rb[a] = 0; + for (a = this.network.vertexes.i; a.next();) { + var b = a.value, + c = b.layer; + this.tg[c] = Math.max(this.tg[c], this.nodeMinLayerSpace(b, !0)); + this.Qf[c] = Math.max(this.Qf[c], this.nodeMinLayerSpace(b, !1)) + } + for (var b = 0, d = this.qm, c = 0; c <= this.yb; c++) { + var e = d; + 0 >= this.tg[c] + this.Qf[c] && (e = 0); + 0 < c && (b += e / 2); + 90 === this.fa || 0 === this.fa ? (b += this.Qf[c], this.Pf[c] = b, b += this.tg[c]) : + (b += this.tg[c], this.Pf[c] = b, b += this.Qf[c]); + c < this.yb && (b += e / 2); + this.Rb[c] = b + } + d = b; + b = this.je.copy(); + null !== this.group && (270 === this.direction || 90 === this.direction ? b.y -= 10 : b.x -= 10, 270 === this.direction || 90 === this.direction ? b.x -= this.SD / 2 : b.y -= this.SD / 2); + for (c = 0; c <= this.yb; c++) 270 === this.fa ? this.Pf[c] = b.y + this.Pf[c] : 90 === this.fa ? (this.Pf[c] = b.y + d - this.Pf[c], this.Rb[c] = d - this.Rb[c]) : 180 === this.fa ? this.Pf[c] = b.x + this.Pf[c] : (this.Pf[c] = b.x + d - this.Pf[c], this.Rb[c] = d - this.Rb[c]); + for (a.reset(); a.next();) { + var c = + a.value, + d = c.layer, + e = c.column | 0, + g = 0, + h = 0; + 270 === this.fa || 90 === this.fa ? (g = b.x + this.Td * e, h = this.Pf[d]) : (g = this.Pf[d], h = b.y + this.Td * e); + c.ra = g; + c.za = h; + c.commit() + } + }; + on.prototype.Fz = function() { + for (var a = 0, b = this.qm, c = 0; c <= this.yb; c++) a += this.tg[c], a += this.Qf[c]; + for (var a = a + this.yb * b, b = [], c = this.Td * this.Kb, d = this.zI; 0 <= d; d--) 270 === this.fa ? 0 === d ? b.push(new w(0, 0, c, Math.abs(this.Rb[0]))) : b.push(new w(0, this.Rb[d - 1], c, Math.abs(this.Rb[d - 1] - this.Rb[d]))) : 90 === this.fa ? 0 === d ? b.push(new w(0, this.Rb[0], c, Math.abs(this.Rb[0] - a))) : b.push(new w(0, this.Rb[d], c, Math.abs(this.Rb[d - 1] - this.Rb[d]))) : 180 === this.fa ? 0 === d ? b.push(new w(0, 0, Math.abs(this.Rb[0]), c)) : b.push(new w(this.Rb[d - + 1], 0, Math.abs(this.Rb[d - 1] - this.Rb[d]), c)) : 0 === d ? b.push(new w(this.Rb[0], 0, Math.abs(this.Rb[0] - a), c)) : b.push(new w(this.Rb[d], 0, Math.abs(this.Rb[d - 1] - this.Rb[d]), c)); + this.commitLayers(b, Id) + }; + on.prototype.commitLayers = function() {}; + on.prototype.commitLinks = function() { + for (var a = this.network.edges.i, b; a.next();) b = a.value.link, null !== b && (b.Ul(), b.fp(), b.cj()); + for (a.reset(); a.next();) b = a.value.link, null !== b && b.Bn(); + for (a.reset(); a.next();) { + var c = a.value; + b = c.link; + if (null !== b) { + b.Ul(); + var d = b, + e = d.Y, + g = d.da, + h = d.md, + k = d.Qd; + if (c.valid) { + if (b.Se === Ui && 4 === b.sa) { + if (c.rev) var l = e, + e = g, + g = l, + m = h, + h = k, + k = m; + if (c.fromVertex.column === c.toVertex.column) { + var n = b.getLinkPoint(e, h, b.computeSpot(!0), !0, !1, g, k), + p = b.getLinkPoint(g, k, b.computeSpot(!1), !1, !1, + e, h); + n.F() || n.set(e.W.xl); + p.F() || p.set(g.W.xl); + b.fp(); + b.sl(n.x, n.y); + b.sl((2 * n.x + p.x) / 3, (2 * n.y + p.y) / 3); + b.sl((n.x + 2 * p.x) / 3, (n.y + 2 * p.y) / 3); + b.sl(p.x, p.y) + } else { + var q = !1, + r = !1; + null !== h && b.computeSpot(!0) === Yb && (q = !0); + null !== k && b.computeSpot(!1) === Yb && (r = !0); + if (q || r) { + var s = b.m(0).x, + t = b.m(0).y, + v = b.m(1).x, + x = b.m(1).y, + y = b.m(2).x, + A = b.m(2).y, + B = b.m(3).x, + L = b.m(3).y; + if (q) { + 90 === this.fa || 270 === this.fa ? (v = s, x = (t + L) / 2) : (v = (s + B) / 2, x = t); + b.aa(1, v, x); + var H = b.getLinkPoint(e, h, b.computeSpot(!0), !0, !1, g, k); + H.F() || H.set(e.W.xl); + b.aa(0, H.x, H.y) + } + r && (90 === this.fa || 270 === this.fa ? (y = B, A = (t + L) / 2) : (y = (s + B) / 2, A = L), b.aa(2, y, A), H = b.getLinkPoint(g, k, b.computeSpot(!1), !1, !1, e, h), H.F() || H.set(g.W.xl), b.aa(3, H.x, H.y)) + } + } + } + b.cj() + } else if (c.fromVertex.layer === c.toVertex.layer) b.cj(); + else { + var U = !1, + ea = !1, + W = 0, + P = b.Bt + 1; + if (b.rc) ea = !0, W = b.sa, 4 < W && b.points.removeRange(2, W - 3); + else if (b.Se === Ui) U = !0, W = b.sa, 4 < W && b.points.removeRange(2, W - 3), P = 2; + else { + var W = b.sa, + ba = b.computeSpot(!0) === Yb, + Oa = b.computeSpot(!1) === Yb; + 2 < W && ba && Oa ? b.points.removeRange(1, W - + 2) : 3 < W && ba && !Oa ? b.points.removeRange(1, W - 3) : 3 < W && !ba && Oa ? b.points.removeRange(2, W - 2) : 4 < W && !ba && !Oa && b.points.removeRange(2, W - 3) + } + var sa = c.fromVertex, + Na = c.toVertex, + ua, Ha; + if (c.rev) { + for (var Aa = 0; null !== Na && sa !== Na;) { + Ha = ua = null; + for (var jc = Na.tc.i; jc.next();) { + var zd = jc.value; + if (zd.link === c.link && (ua = zd.fromVertex, Ha = zd.toVertex, null === ua.Bd)) break + } + if (ua !== sa) + if (sb = b.m(P - 1).x, gb = b.m(P - 1).y, oa = ua.ra, pa = ua.za, ea) 180 === this.fa || 0 === this.fa ? 2 === P ? (b.B(P++, sb, gb), b.B(P++, sb, pa)) : (Ae = null !== Ha ? Ha.za : gb, Ae !== pa && + (tb = this.Rb[ua.layer - 1], b.B(P++, tb, gb), b.B(P++, tb, pa))) : 2 === P ? (b.B(P++, sb, gb), b.B(P++, oa, gb)) : (Cd = null !== Ha ? Ha.ra : sb, Cd !== oa && (tb = this.Rb[ua.layer - 1], b.B(P++, sb, tb), b.B(P++, oa, tb))); + else if (2 === P) + if (Xa = Math.max(10, this.tg[Na.layer]), Va = Math.max(10, this.Qf[Na.layer]), U) 180 === this.fa ? oa <= Na.P.x ? (Aa = Na.P.x, b.B(P++, Aa - Xa, pa), b.B(P++, Aa, pa), b.B(P++, Aa + Va, pa)) : (b.B(P++, oa - Xa, pa), b.B(P++, oa, pa), b.B(P++, oa + Va, pa)) : 90 === this.fa ? pa >= Na.P.bottom ? (Aa = Na.P.y + Na.P.height, b.B(P++, oa, Aa + Va), b.B(P++, oa, Aa), b.B(P++, + oa, Aa - Xa)) : (b.B(P++, oa, pa + Va), b.B(P++, oa, pa), b.B(P++, oa, pa - Xa)) : 270 === this.fa ? pa <= Na.P.y ? (Aa = Na.P.y, b.B(P++, oa, Aa - Xa), b.B(P++, oa, Aa), b.B(P++, oa, Aa + Va)) : (b.B(P++, oa, pa - Xa), b.B(P++, oa, pa), b.B(P++, oa, pa + Va)) : 0 === this.fa && (oa >= Na.P.right ? (Aa = Na.P.x + Na.P.width, b.B(P++, Aa + Va, pa), b.B(P++, Aa, pa), b.B(P++, Aa - Xa, pa)) : (b.B(P++, oa + Va, pa), b.B(P++, oa, pa), b.B(P++, oa - Xa, pa))); + else { + b.B(P++, sb, gb); + var Ad = 0; + if (180 === this.fa || 0 === this.fa) { + if (180 === this.fa ? oa >= Na.P.right : oa <= Na.P.x) Ad = (0 === this.fa ? -Xa : Va) / 2; + b.B(P++, sb + + Ad, pa) + } else { + if (270 === this.fa ? pa >= Na.P.bottom : pa <= Na.P.y) Ad = (90 === this.fa ? -Xa : Va) / 2; + b.B(P++, oa, gb + Ad) + } + b.B(P++, oa, pa) + } + else Xa = Math.max(10, this.tg[ua.layer]), Va = Math.max(10, this.Qf[ua.layer]), 180 === this.fa ? (U && b.B(P++, oa - Xa, pa), b.B(P++, oa, pa), U && b.B(P++, oa + Va, pa)) : 90 === this.fa ? (U && b.B(P++, oa, pa + Va), b.B(P++, oa, pa), U && b.B(P++, oa, pa - Xa)) : 270 === this.fa ? (U && b.B(P++, oa, pa - Xa), b.B(P++, oa, pa), U && b.B(P++, oa, pa + Va)) : (U && b.B(P++, oa + Va, pa), b.B(P++, oa, pa), U && b.B(P++, oa - Xa, pa)); + Na = ua + } + if (null === k || b.computeSpot(!1) !== + Yb || ea) + if (sb = b.m(P - 1).x, gb = b.m(P - 1).y, oa = b.m(P).x, pa = b.m(P).y, ea) { + var Qe = this.Qf[sa.layer], + ac = 0; + 180 === this.fa || 0 === this.fa ? (ac = gb, ac >= sa.P.y && ac <= sa.P.bottom && (180 === this.fa ? oa >= sa.P.x : oa <= sa.P.right) && (Aa = sa.ra + (180 === this.fa ? -Qe : Qe), ac = ac < sa.P.y + sa.P.height / 2 ? sa.P.y - this.Td / 2 : sa.P.bottom + this.Td / 2, b.B(P++, Aa, gb), b.B(P++, Aa, ac)), b.B(P++, oa, ac)) : (ac = sb, ac >= sa.P.x && ac <= sa.P.right && (270 === this.fa ? pa >= sa.P.y : pa <= sa.P.bottom) && (Aa = sa.za + (270 === this.fa ? -Qe : Qe), ac = ac < sa.P.x + sa.P.width / 2 ? sa.P.x - this.Td / + 2 : sa.P.right + this.Td / 2, b.B(P++, sb, Aa), b.B(P++, ac, Aa)), b.B(P++, ac, pa)); + b.B(P++, oa, pa) + } else if (U) Xa = Math.max(10, this.tg[sa.layer]), Va = Math.max(10, this.Qf[sa.layer]), 180 === this.fa && oa >= sa.P.x ? (Aa = sa.P.x + sa.P.width, b.aa(P - 2, Aa, gb), b.aa(P - 1, Aa + Va, gb)) : 90 === this.fa && pa <= sa.P.bottom ? (Aa = sa.P.y, b.aa(P - 2, sb, Aa), b.aa(P - 1, sb, Aa - Xa)) : 270 === this.fa && pa >= sa.P.y ? (Aa = sa.P.y + sa.P.height, b.aa(P - 2, sb, Aa), b.aa(P - 1, sb, Aa + Va)) : 0 === this.fa && oa <= sa.P.right && (Aa = sa.P.x, b.aa(P - 2, Aa, gb), b.aa(P - 1, Aa - Xa, gb)); + else { + Xa = Math.max(10, + this.tg[sa.layer]); + Va = Math.max(10, this.Qf[sa.layer]); + Ad = 0; + if (180 === this.fa || 0 === this.fa) { + if (180 === this.fa ? oa <= sa.P.x : oa >= sa.P.right) Ad = (0 === this.fa ? Va : -Xa) / 2; + b.B(P++, oa + Ad, gb) + } else { + if (270 === this.fa ? pa <= sa.P.y : pa >= sa.P.bottom) Ad = (90 === this.fa ? Va : -Xa) / 2; + b.B(P++, sb, pa + Ad) + } + b.B(P++, oa, pa) + } + } else { + for (; null !== sa && sa !== Na;) { + Ha = ua = null; + for (var Ig = sa.pc.i; Ig.next();) { + var Bd = Ig.value; + if (Bd.link === c.link && (ua = Bd.toVertex, Ha = Bd.fromVertex, null !== Ha.Bd && (Ha = null), null === ua.Bd)) break + } + var sb = 0, + gb = 0, + oa = 0, + pa = 0, + tb = 0, + Xa = 0, + Va = 0; + if (ua !== Na) + if (sb = b.m(P - 1).x, gb = b.m(P - 1).y, oa = ua.ra, pa = ua.za, ea) + if (180 === this.fa || 0 === this.fa) { + var Ae = null !== Ha ? Ha.za : gb; + Ae !== pa && (tb = this.Rb[ua.layer], 2 === P && (tb = 0 === this.fa ? Math.max(tb, sb) : Math.min(tb, sb)), b.B(P++, tb, gb), b.B(P++, tb, pa)) + } else { + var Cd = null !== Ha ? Ha.ra : sb; + Cd !== oa && (tb = this.Rb[ua.layer], 2 === P && (tb = 90 === this.fa ? Math.max(tb, gb) : Math.min(tb, gb)), b.B(P++, sb, tb), b.B(P++, oa, tb)) + } + else Xa = Math.max(10, this.tg[ua.layer]), Va = Math.max(10, this.Qf[ua.layer]), 180 === this.fa ? (b.B(P++, oa + Va, pa), + U && b.B(P++, oa, pa), b.B(P++, oa - Xa, pa)) : 90 === this.fa ? (b.B(P++, oa, pa - Xa), U && b.B(P++, oa, pa), b.B(P++, oa, pa + Va)) : 270 === this.fa ? (b.B(P++, oa, pa + Va), U && b.B(P++, oa, pa), b.B(P++, oa, pa - Xa)) : (b.B(P++, oa - Xa, pa), U && b.B(P++, oa, pa), b.B(P++, oa + Va, pa)); + sa = ua + } + ea && (sb = b.m(P - 1).x, gb = b.m(P - 1).y, oa = b.m(P).x, pa = b.m(P).y, 180 === this.fa || 0 === this.fa ? gb !== pa && (tb = 0 === this.fa ? Math.min(Math.max((oa + sb) / 2, this.Rb[Na.layer]), oa) : Math.max(Math.min((oa + sb) / 2, this.Rb[Na.layer]), oa), b.B(P++, tb, gb), b.B(P++, tb, pa)) : sb !== oa && (tb = 90 === this.fa ? + Math.min(Math.max((pa + gb) / 2, this.Rb[Na.layer]), pa) : Math.max(Math.min((pa + gb) / 2, this.Rb[Na.layer]), pa), b.B(P++, sb, tb), b.B(P++, oa, tb))) + } + if (null !== d && U) { + if (null !== h) { + if (b.computeSpot(!0) === Yb) { + var me = b.m(0), + Rd = b.m(2); + me.N(Rd) || b.aa(1, (me.x + Rd.x) / 2, (me.y + Rd.y) / 2) + } + H = b.getLinkPoint(e, h, Yb, !0, !1, g, k); + H.F() || H.set(e.W.xl); + b.aa(0, H.x, H.y) + } + null !== k && (b.computeSpot(!1) === Yb && (me = b.m(b.sa - 1), Rd = b.m(b.sa - 3), me.N(Rd) || b.aa(b.sa - 2, (me.x + Rd.x) / 2, (me.y + Rd.y) / 2)), H = b.getLinkPoint(g, k, Yb, !1, !1, e, h), H.F() || H.set(g.W.xl), + b.aa(b.sa - 1, H.x, H.y)) + } + b.cj(); + c.commit() + } + } + } + for (var ne = new J(G), Jg = this.network.edges.i; Jg.next();) { + var fd = Jg.value.link; + null !== fd && fd.rc && !ne.contains(fd) && ne.add(fd) + } + if (0 < ne.count) + if (90 === this.fa || 270 === this.fa) { + for (var pi = 0, Ab = new J(ps), Qb, gd, lh = ne.i; lh.next();) { + var Lb = lh.value; + if (null !== Lb && Lb.rc) + for (var kb = 2; kb < Lb.sa - 3; kb++) + if (Qb = Lb.m(kb), gd = Lb.m(kb + 1), qs(Qb.y, gd.y) && !qs(Qb.x, gd.x)) { + var cb = new ps; + cb.layer = Math.floor(Qb.y / 2); + var Re = Lb.m(0), + Sd = Lb.m(Lb.sa - 1); + cb.first = Re.x * Re.x + Re.y; + cb.de = Sd.x * Sd.x + + Sd.y; + cb.Qe = Math.min(Qb.x, gd.x); + cb.ke = Math.max(Qb.x, gd.x); + cb.index = kb; + cb.link = Lb; + if (kb + 2 < Lb.sa) { + var Kg = Lb.m(kb - 1), + Lg = Lb.m(kb + 2), + kc = 0; + Kg.y < Qb.y ? kc = Lg.y < Qb.y ? 3 : Qb.x < gd.x ? 2 : 1 : Kg.y > Qb.y && (kc = Lg.y > Qb.y ? 0 : gd.x < Qb.x ? 2 : 1); + cb.pi = kc + } + Ab.add(cb) + } + } + if (1 < Ab.count) { + Ab.sort(this.DF); + for (var lc = 0; lc < Ab.count;) { + for (var oe = Ab.o[lc].layer, hd = lc + 1; hd < Ab.count && Ab.o[hd].layer === oe;) hd++; + if (1 < hd - lc) + for (var nb = lc; nb < hd;) { + for (var Uc = Ab.o[nb].ke, Qa = lc + 1; Qa < hd && Ab.o[Qa].Qe < Uc;) Uc = Math.max(Uc, Ab.o[Qa].ke), Qa++; + var ob = Qa - nb; + if (1 < + ob) { + Ab.dq(this.Hx, nb, nb + ob); + for (var yc = 1, Dd = Ab.o[nb].de, kb = nb; kb < Qa; kb++) { + var Mb = Ab.o[kb]; + Mb.de !== Dd && (yc++, Dd = Mb.de) + } + Ab.dq(this.CF, nb, nb + ob); + for (var pe = 1, Dd = Ab.o[nb].first, kb = nb; kb < Qa; kb++) Mb = Ab.o[kb], Mb.first !== Dd && (pe++, Dd = Mb.first); + var tf = !0, + Se = pe; + yc < pe ? (tf = !1, Se = yc, Dd = Ab.o[nb].de, Ab.dq(this.Hx, nb, nb + ob)) : Dd = Ab.o[nb].first; + for (var Lf = 0, kb = nb; kb < Qa; kb++) { + Mb = Ab.o[kb]; + (tf ? Mb.first : Mb.de) !== Dd && (Lf++, Dd = tf ? Mb.first : Mb.de); + Lb = Mb.link; + Qb = Lb.m(Mb.index); + gd = Lb.m(Mb.index + 1); + var Fb = this.YE * (Lf - (Se - 1) / + 2); + if (!Lb.jj || rs(Qb.x, Qb.y + Fb, gd.x, gd.y + Fb)) pi++, Lb.Ul(), Lb.aa(Mb.index, Qb.x, Qb.y + Fb), Lb.aa(Mb.index + 1, gd.x, gd.y + Fb), Lb.cj() + } + } + nb = Qa + } + lc = hd + } + } + } else { + for (var Be = 0, Rb = new J(ps), Vb, Nb, Jc = ne.i; Jc.next();) { + var lb = Jc.value; + if (null !== lb && lb.rc) + for (var Gb = 2; Gb < lb.sa - 3; Gb++) + if (Vb = lb.m(Gb), Nb = lb.m(Gb + 1), qs(Vb.x, Nb.x) && !qs(Vb.y, Nb.y)) { + var Ob = new ps; + Ob.layer = Math.floor(Vb.x / 2); + var Td = lb.m(0), + Mg = lb.m(lb.sa - 1); + Ob.first = Td.x + Td.y * Td.y; + Ob.de = Mg.x + Mg.y * Mg.y; + Ob.Qe = Math.min(Vb.y, Nb.y); + Ob.ke = Math.max(Vb.y, Nb.y); + Ob.index = + Gb; + Ob.link = lb; + if (Gb + 2 < lb.sa) { + var mh = lb.m(Gb - 1), + nh = lb.m(Gb + 2), + Ce = 0; + mh.x < Vb.x ? Ce = nh.x < Vb.x ? 3 : Vb.y < Nb.y ? 2 : 1 : mh.x > Vb.x && (Ce = nh.x > Vb.x ? 0 : Nb.y < Vb.y ? 2 : 1); + Ob.pi = Ce + } + Rb.add(Ob) + } + } + if (1 < Rb.count) { + Rb.sort(this.DF); + for (var Kc = 0; Kc < Rb.count;) { + for (var De = Rb.o[Kc].layer, mc = Kc + 1; mc < Rb.count && Rb.o[mc].layer === De;) mc++; + if (1 < mc - Kc) + for (var Bb = Kc; Bb < mc;) { + for (var Cb = Rb.o[Bb].ke, Lc = Kc + 1; Lc < mc && Rb.o[Lc].Qe < Cb;) Cb = Math.max(Cb, Rb.o[Lc].ke), Lc++; + var Ng = Lc - Bb; + if (1 < Ng) { + Rb.dq(this.Hx, Bb, Bb + Ng); + for (var Vc = 1, Wc = Rb.o[Bb].de, Gb = Bb; Gb < + Lc; Gb++) { + var mb = Rb.o[Gb]; + mb.de !== Wc && (Vc++, Wc = mb.de) + } + Rb.dq(this.CF, Bb, Bb + Ng); + for (var Mc = 1, Wc = Rb.o[Bb].first, Gb = Bb; Gb < Lc; Gb++) mb = Rb.o[Gb], mb.first !== Wc && (Mc++, Wc = mb.first); + var Ud = !0, + Vd = Mc; + Vc < Mc ? (Ud = !1, Vd = Vc, Wc = Rb.o[Bb].de, Rb.dq(this.Hx, Bb, Bb + Ng)) : Wc = Rb.o[Bb].first; + for (var uf = 0, Gb = Bb; Gb < Lc; Gb++) { + mb = Rb.o[Gb]; + (Ud ? mb.first : mb.de) !== Wc && (uf++, Wc = Ud ? mb.first : mb.de); + lb = mb.link; + Vb = lb.m(mb.index); + Nb = lb.m(mb.index + 1); + var Og = this.YE * (uf - (Vd - 1) / 2); + if (!lb.jj || rs(Vb.x + Og, Vb.y, Nb.x + Og, Nb.y)) Be++, lb.Ul(), lb.aa(mb.index, + Vb.x + Og, Vb.y), lb.aa(mb.index + 1, Nb.x + Og, Nb.y), lb.cj() + } + } + Bb = Lc + } + Kc = mc + } + } + } + }; + on.prototype.DF = function(a, b) { + return a instanceof ps && b instanceof ps && a !== b ? a.layer < b.layer ? -1 : a.layer > b.layer ? 1 : a.Qe < b.Qe ? -1 : a.Qe > b.Qe ? 1 : a.ke < b.ke ? -1 : a.ke > b.ke ? 1 : 0 : 0 + }; + on.prototype.CF = function(a, b) { + return a instanceof ps && b instanceof ps && a !== b ? a.first < b.first ? -1 : a.first > b.first || a.pi < b.pi ? 1 : a.pi > b.pi || a.Qe < b.Qe ? -1 : a.Qe > b.Qe ? 1 : a.ke < b.ke ? -1 : a.ke > b.ke ? 1 : 0 : 0 + }; + on.prototype.Hx = function(a, b) { + return a instanceof ps && b instanceof ps && a !== b ? a.de < b.de ? -1 : a.de > b.de || a.pi < b.pi ? 1 : a.pi > b.pi || a.Qe < b.Qe ? -1 : a.Qe > b.Qe ? 1 : a.ke < b.ke ? -1 : a.ke > b.ke ? 1 : 0 : 0 + }; + + function qs(a, b) { + u && (z.p(a, on, "isApprox:a"), z.p(b, on, "isApprox:b")); + var c = a - b; + return -1 < c && 1 > c + } + + function rs(a, b, c, d) { + u && (z.p(a, on, "isUnoccupied2:px"), z.p(b, on, "isUnoccupied2:py"), z.p(c, on, "isUnoccupied2:qx"), z.p(d, on, "isUnoccupied2:qy")); + return !0 + } + + function Hr(a, b) { + var c, d = a.ge[b]; + if (d >= a.hh.length) { + c = []; + for (var e = 0; e < a.hh.length; e++) c[e] = a.hh[e]; + a.hh = c + } + void 0 === a.hh[d] || null === a.hh[d] ? c = [] : (c = a.hh[d], a.hh[d] = null); + d = a.Vr[b]; + for (e = 0; e < d.length; e++) { + var g = d[e]; + c[g.index] = g + } + return c + } + + function Ir(a, b, c) { + a.hh[a.ge[b]] = c + } + z.defineProperty(on, { + layerSpacing: "layerSpacing" + }, function() { + return this.qm + }, function(a) { + this.qm !== a && (z.g(a, "number", on, "layerSpacing"), 0 <= a && (this.qm = a, this.I())) + }); + z.defineProperty(on, { + SD: "columnSpacing" + }, function() { + return this.Td + }, function(a) { + this.Td !== a && (z.g(a, "number", on, "columnSpacing"), 0 < a && (this.Td = a, this.I())) + }); + z.defineProperty(on, { + direction: "direction" + }, function() { + return this.fa + }, function(a) { + this.fa !== a && (z.g(a, "number", on, "direction"), 0 === a || 90 === a || 180 === a || 270 === a ? (this.fa = a, this.I()) : z.k("LayeredDigraphLayout.direction must be 0, 90, 180, or 270")) + }); + z.defineProperty(on, { + angle: "angle" + }, function() { + return this.direction + }, function(a) { + this.direction = a + }); + z.defineProperty(on, { + mH: "cycleRemoveOption" + }, function() { + return this.Tn + }, function(a) { + this.Tn !== a && (z.Ba(a, on, on, "cycleRemoveOption"), a === Ar || a === ur) && (this.Tn = a, this.I()) + }); + z.defineProperty(on, { + qI: "layeringOption" + }, function() { + return this.yo + }, function(a) { + this.yo !== a && (z.Ba(a, on, on, "layeringOption"), a === vr || a === Sr || a === Ur) && (this.yo = a, this.I()) + }); + z.defineProperty(on, { + bI: "initializeOption" + }, function() { + return this.oo + }, function(a) { + this.oo !== a && (z.Ba(a, on, on, "initializeOption"), a === wr || a === $r || a === Yr) && (this.oo = a, this.I()) + }); + z.defineProperty(on, { + MK: "iterations" + }, function() { + return this.om + }, function(a) { + this.om !== a && (z.p(a, zr, "iterations"), 0 <= a && (this.om = a, this.I())) + }); + z.defineProperty(on, { + SG: "aggressiveOption" + }, function() { + return this.Gn + }, function(a) { + this.Gn !== a && (z.Ba(a, on, on, "aggressiveOption"), a === ds || a === xr || a === es) && (this.Gn = a, this.I()) + }); + z.defineProperty(on, { + hL: "packOption" + }, function() { + return this.Ri + }, function(a) { + this.Ri !== a && (z.g(a, "number", on, "packOption"), 0 <= a && 8 > a && (this.Ri = a, this.I())) + }); + z.defineProperty(on, { + aq: "setsPortSpots" + }, function() { + return this.Zh + }, function(a) { + this.Zh !== a && (z.g(a, "boolean", on, "setsPortSpots"), this.Zh = a, this.I()) + }); + z.defineProperty(on, { + YE: "linkSpacing" + }, function() { + return this.Br + }, function(a) { + this.Br !== a && (z.g(a, "number", on, "linkSpacing"), 0 <= a && (this.Br = a, this.I())) + }); + z.w(on, { + zI: "maxLayer" + }, function() { + return this.yb + }); + z.w(on, { + RK: "maxIndex" + }, function() { + return this.Iv + }); + z.w(on, { + QK: "maxColumn" + }, function() { + return this.Kb + }); + z.w(on, { + WK: "minIndexLayer" + }, function() { + return this.Lr + }); + z.w(on, { + SK: "maxIndexLayer" + }, function() { + return this.Rf + }); + var ur; + on.CycleDepthFirst = ur = z.s(on, "CycleDepthFirst", 0); + var Ar; + on.CycleGreedy = Ar = z.s(on, "CycleGreedy", 1); + var vr; + on.LayerOptimalLinkLength = vr = z.s(on, "LayerOptimalLinkLength", 0); + var Sr; + on.LayerLongestPathSink = Sr = z.s(on, "LayerLongestPathSink", 1); + var Ur; + on.LayerLongestPathSource = Ur = z.s(on, "LayerLongestPathSource", 2); + var wr; + on.InitDepthFirstOut = wr = z.s(on, "InitDepthFirstOut", 0); + var $r; + on.InitDepthFirstIn = $r = z.s(on, "InitDepthFirstIn", 1); + var Yr; + on.InitNaive = Yr = z.s(on, "InitNaive", 2); + var ds; + on.AggressiveNone = ds = z.s(on, "AggressiveNone", 0); + var xr; + on.AggressiveLess = xr = z.s(on, "AggressiveLess", 1); + var es; + on.AggressiveMore = es = z.s(on, "AggressiveMore", 2); + on.PackNone = 0; + var fs; + on.PackExpand = fs = 1; + var gs; + on.PackStraighten = gs = 2; + var is; + on.PackMedian = is = 4; + var yr; + on.PackAll = yr = 7; + + function ps() { + this.index = this.ke = this.Qe = this.de = this.first = this.layer = 0; + this.link = null; + this.pi = 0 + } + z.Yd(ps, { + layer: !0, + first: !0, + de: !0, + Qe: !0, + ke: !0, + index: !0, + link: !0, + pi: !0 + }); + + function zr() { + wa.call(this) + } + z.Qa(zr, wa); + z.ia("LayeredDigraphNetwork", zr); + zr.prototype.createVertex = function() { + return new ss + }; + zr.prototype.createEdge = function() { + return new ts + }; + + function ss() { + xa.call(this); + this.index = this.column = this.layer = -1; + this.component = NaN; + this.near = null; + this.valid = !1; + this.finish = this.jp = NaN; + this.Um = 0; + this.xA = this.yA = null + } + z.Qa(ss, xa); + z.ia("LayeredDigraphVertex", ss); + + function ts() { + ya.call(this); + this.forest = this.rev = this.valid = !1; + this.portToPos = this.portFromPos = NaN; + this.portToColOffset = this.portFromColOffset = 0 + } + z.Qa(ts, ya); + z.ia("LayeredDigraphEdge", ts); + + function Y() { + 0 < arguments.length && z.od(Y); + vg.call(this); + this.Fd = new K(Object); + this.ds = us; + this.Of = vs; + this.Zs = ws; + this.Gv = xs; + this.rB = null; + this.Ih = !0; + this.qd = ys; + this.lg = (new Ea(10, 10)).freeze(); + this.wa = new zs; + this.ya = new zs; + this.nz = [] + } + z.Qa(Y, vg); + z.ia("TreeLayout", Y); + Y.prototype.cloneProtected = function(a) { + vg.prototype.cloneProtected.call(this, a); + a.ds = this.ds; + a.Zs = this.Zs; + a.Gv = this.Gv; + a.Ih = this.Ih; + a.qd = this.qd; + a.lg.assign(this.lg); + a.wa.copyInheritedPropertiesFrom(this.wa); + a.ya.copyInheritedPropertiesFrom(this.ya) + }; + Y.prototype.createNetwork = function() { + return new As + }; + Y.prototype.makeNetwork = function(a) { + function b(a) { + if (a instanceof E) return !a.Df && "Comment" !== a.nc; + if (a instanceof G) { + var b = a.Y; + if (null === b || b.Df || "Comment" === b.nc) return !1; + a = a.da; + return null === a || a.Df || "Comment" === a.nc ? !1 : !0 + } + return !1 + } + var c = this.createNetwork(); + c.Sb = this; + a instanceof C ? (c.ik(a.Lg, !0, b), c.ik(a.links, !0, b)) : a instanceof F ? c.ik(a.Hc, !1, b) : c.ik(a.i, !1, b); + return c + }; + Y.prototype.doLayout = function(a) { + null === a && z.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); + null === this.network && (this.network = this.makeNetwork(a)); + this.Xf !== Bs && (this.je = this.initialOrigin(this.je)); + var b = this.h; + null === b && a instanceof C && (b = a); + this.Of = this.path === us && null !== b ? b.ce ? vs : Cs : this.path === us ? vs : this.path; + if (0 < this.network.vertexes.count) { + this.network.Sw(); + for (a = this.network.vertexes.i; a.next();) b = a.value, b.initialized = !1, b.level = + 0, b.parent = null, b.children = []; + if (0 < this.Fd.count) { + a = new K(zs); + for (b = this.Fd.i; b.next();) { + var c = b.value; + c instanceof E ? (c = this.network.en(c), null !== c && a.add(c)) : c instanceof zs && a.add(c) + } + this.Fd = a + } + 0 === this.Fd.count && this.findRoots(); + for (a = this.Fd.copy().i; a.next();) b = a.value, b.initialized || (b.initialized = !0, Ds(this, b)); + for (a = this.Fd.i; a.next();) b = a.value, b instanceof zs && Es(this, b); + for (a = this.Fd.i; a.next();) b = a.value, b instanceof zs && Fs(this, b); + for (a = this.Fd.i; a.next();) b = a.value, b instanceof zs && + Gs(this, b); + this.Bz(); + if (this.kA === Hs) { + c = []; + for (a = this.network.vertexes.i; a.next();) { + var d = a.value, + b = d.parent; + null === b && (b = d); + var b = 0 === b.angle || 180 === b.angle, + e = c[d.level]; + void 0 === e && (e = 0); + c[d.level] = Math.max(e, b ? d.width : d.height) + } + for (d = 0; d < c.length; d++) void 0 === c[d] && (c[d] = 0); + this.rB = c; + for (a = this.network.vertexes.i; a.next();) d = a.value, b = d.parent, null === b && (b = d), 0 === b.angle || 180 === b.angle ? (180 === b.angle && (d.Ct += c[d.level] - d.width), d.width = c[d.level]) : (270 === b.angle && (d.Dt += c[d.level] - d.height), d.height = + c[d.level]) + } else if (this.kA === Is) + for (a = this.network.vertexes.i; a.next();) { + c = a.value; + b = 0 === c.angle || 180 === c.angle; + e = -1; + for (d = 0; d < c.children.length; d++) var g = c.children[d], + e = Math.max(e, b ? g.width : g.height); + if (0 <= e) + for (d = 0; d < c.children.length; d++) g = c.children[d], b ? (180 === c.angle && (g.Ct += e - g.width), g.width = e) : (270 === c.angle && (g.Dt += e - g.height), g.height = e) + } + for (a = this.Fd.i; a.next();) b = a.value, b instanceof zs && this.layoutTree(b); + this.arrangeTrees(); + this.updateParts() + } + this.network = null; + this.Fd = new K(Object); + this.Gf = !0 + }; + Y.prototype.findRoots = function() { + for (var a = this.network.vertexes.i; a.next();) { + var b = a.value; + switch (this.Of) { + case vs: + 0 === b.tc.count && this.Fd.add(b); + break; + case Cs: + 0 === b.pc.count && this.Fd.add(b); + break; + default: + z.k("Unhandled path value " + this.Of.toString()) + } + } + if (0 === this.Fd.count) { + for (var a = 999999, b = null, c = this.network.vertexes.i; c.next();) { + var d = c.value; + switch (this.Of) { + case vs: + d.tc.count < a && (a = d.tc.count, b = d); + break; + case Cs: + d.pc.count < a && (a = d.pc.count, b = d); + break; + default: + z.k("Unhandled path value " + this.Of.toString()) + } + } + null !== + b && this.Fd.add(b) + } + }; + + function Ds(a, b) { + if (null !== b) { + u && z.l(b, zs, Y, "walkTree:v"); + switch (a.Of) { + case vs: + if (0 < b.pc.count) { + for (var c = new J(zs), d = b.rH; d.next();) { + var e = d.value; + Js(a, b, e) && c.add(e) + } + 0 < c.count && (b.children = c.jc()) + } + break; + case Cs: + if (0 < b.tc.count) { + c = new J(zs); + for (d = b.oJ; d.next();) e = d.value, Js(a, b, e) && c.add(e); + 0 < c.count && (b.children = c.jc()) + } + break; + default: + z.k("Unhandled path value" + a.Of.toString()) + } + c = b.children; + d = c.length; + for (e = 0; e < d; e++) { + var g = c[e]; + g.initialized = !0; + g.level = b.level + 1; + g.parent = b; + a.Fd.remove(g) + } + for (e = 0; e < + d; e++) g = c[e], Ds(a, g) + } + } + + function Js(a, b, c) { + u && z.l(b, zs, Y, "walkOK:v"); + u && z.l(c, zs, Y, "walkOK:c"); + if (c.initialized) { + var d; + if (null === b) d = !1; + else { + u && z.l(c, zs, Y, "isAncestor:a"); + u && z.l(b, zs, Y, "isAncestor:b"); + for (d = b.parent; null !== d && d !== c;) d = d.parent; + d = d === c + } + if (d || c.level > b.level) return !1; + a.removeChild(c.parent, c) + } + return !0 + } + Y.prototype.removeChild = function(a, b) { + if (null !== a && null !== b) { + u && z.l(a, zs, Y, "removeChild:p"); + u && z.l(b, zs, Y, "removeChild:c"); + for (var c = a.children, d = 0, e = 0; e < c.length; e++) c[e] === b && d++; + if (0 < d) { + for (var d = Array(c.length - d), g = 0, e = 0; e < c.length; e++) c[e] !== b && (d[g++] = c[e]); + a.children = d + } + } + }; + + function Es(a, b) { + if (null !== b) { + u && z.l(b, zs, Y, "initializeTree:v"); + a.initializeTreeVertexValues(b); + b.alignment === Ks && a.sortTreeVertexChildren(b); + for (var c = 0, d = b.Wm, e = 0, g = b.children, h = g.length, k = 0; k < h; k++) { + var l = g[k]; + Es(a, l); + c += l.descendantCount + 1; + d = Math.max(d, l.maxChildrenCount); + e = Math.max(e, l.maxGenerationCount) + } + b.descendantCount = c; + b.maxChildrenCount = d; + b.maxGenerationCount = 0 < d ? e + 1 : 0 + } + } + + function Ls(a, b) { + u && z.l(b, zs, Y, "mom:v"); + switch (a.Zs) { + default: + case ws: + return null !== b.parent ? b.parent : a.wa; + case Ms: + return null === b.parent ? a.wa : null === b.parent.parent ? a.ya : b.parent; + case Ns: + return null !== b.parent ? null !== b.parent.parent ? b.parent.parent : a.ya : a.wa; + case Os: + var c = !0; + if (0 === b.Wm) c = !1; + else + for (var d = b.children, e = d.length, g = 0; g < e; g++) + if (0 < d[g].Wm) { + c = !1; + break + } return c && null !== b.parent ? a.ya : null !== b.parent ? b.parent : a.wa + } + } + Y.prototype.initializeTreeVertexValues = function(a) { + u && z.l(a, zs, Y, "initializeTreeVertexValues:v"); + var b = Ls(this, a); + a.copyInheritedPropertiesFrom(b); + if (null !== a.parent && a.parent.alignment === Ks) { + for (var b = a.angle, c = a.parent.children, d = 0; d < c.length && a !== c[d];) d++; + 0 === d % 2 ? d !== c.length - 1 && (b = 90 === b ? 180 : 180 === b ? 270 : 270 === b ? 180 : 270) : b = 90 === b ? 0 : 180 === b ? 90 : 270 === b ? 0 : 90; + a.angle = b + } + a.initialized = !0 + }; + + function Fs(a, b) { + if (null !== b) { + u && z.l(b, zs, Y, "assignTree:v"); + a.assignTreeVertexValues(b); + for (var c = b.children, d = c.length, e = 0; e < d; e++) Fs(a, c[e]) + } + } + Y.prototype.assignTreeVertexValues = function() {}; + + function Gs(a, b) { + if (null !== b) { + u && z.l(b, zs, Y, "sortTree:v"); + b.alignment !== Ks && a.sortTreeVertexChildren(b); + for (var c = b.children, d = c.length, e = 0; e < d; e++) Gs(a, c[e]) + } + } + Y.prototype.sortTreeVertexChildren = function(a) { + u && z.l(a, zs, Y, "sortTreeVertexChildren:v"); + switch (a.sorting) { + case Ps: + break; + case Qs: + a.children.reverse(); + break; + case Rs: + a.children.sort(a.comparer); + break; + case Ss: + a.children.sort(a.comparer); + a.children.reverse(); + break; + default: + z.k("Unhandled sorting value " + a.sorting.toString()) + } + }; + Y.prototype.Bz = function() { + if (this.comments) + for (var a = this.network.vertexes.i; a.next();) this.addComments(a.value) + }; + Y.prototype.addComments = function(a) { + u && z.l(a, zs, Y, "addComments:v"); + var b = a.angle, + c = a.parent, + d = 0, + e = Ts, + e = !1; + null !== c && (d = c.angle, e = c.alignment, e = Us(e)); + var b = 90 === b || 270 === b, + d = 90 === d || 270 === d, + c = 0 === a.Wm, + g = 0, + h = 0, + k = 0, + l = a.commentSpacing; + if (null !== a.Pc) + for (var m = a.Pc.rE(); m.next();) { + var n = m.value; + "Comment" === n.nc && n.canLayout() && (null === a.comments && (a.comments = []), a.comments.push(n), n.Bf(), n = n.Ia, b && !c || !e && !d && c || e && d && c ? (g = Math.max(g, n.width), h += n.height + Math.abs(k)) : (g += n.width + Math.abs(k), h = Math.max(h, + n.height)), k = l) + } + null !== a.comments && (b && !c || !e && !d && c || e && d && c ? (g += Math.abs(a.commentMargin), h = Math.max(0, h - a.height)) : (h += Math.abs(a.commentMargin), g = Math.max(0, g - a.width)), e = z.yk(0, 0, a.P.width + g, a.P.height + h), a.vb = e, z.dc(e)) + }; + + function Us(a) { + return a === Vs || a === Ks || a === Ws || a === Xs + } + + function Ys(a) { + return a === Vs || a === Ks + } + + function Zs(a) { + u && z.l(a, zs, Y, "isLeftSideBus:v"); + var b = a.parent; + if (null !== b) { + var c = b.alignment; + if (Us(c)) { + if (Ys(c)) { + b = b.children; + for (c = 0; c < b.length && a !== b[c];) c++; + return 0 === c % 2 + } + if (c === Ws) return !0 + } + } + return !1 + } + Y.prototype.layoutComments = function(a) { + u && z.l(a, zs, Y, "layoutComments:v"); + if (null !== a.comments) { + var b = a.Pc.Ia, + c = a.parent, + d = a.angle, + e = 0, + g = Ts, + g = !1; + null !== c && (e = c.angle, g = c.alignment, g = Us(g)); + for (var c = 90 === d || 270 === d, d = 90 === e || 270 === e, h = 0 === a.Wm, k = Zs(a), l = 0, m = a.comments, n = m.length, p = z.O(), q = 0; q < n; q++) { + var r = m[q], + s = r.Ia; + if (c && !h || !g && !d && h || g && d && h) { + if (135 < e && !g || d && k) + if (0 <= a.commentMargin) + for (p.n(a.P.x - a.commentMargin - s.width, a.P.y + l), r.move(p), r = r.Hg(); r.next();) { + var t = r.value; + t.Db = $c; + t.Eb = ad + } else + for (p.n(a.P.x + + 2 * a.R.x - a.commentMargin, a.P.y + l), r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = ad, t.Eb = $c; + else if (0 <= a.commentMargin) + for (p.n(a.P.x + 2 * a.R.x + a.commentMargin, a.P.y + l), r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = ad, t.Eb = $c; + else + for (p.n(a.P.x + a.commentMargin - s.width, a.P.y + l), r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = $c, t.Eb = ad; + l = 0 <= a.commentSpacing ? l + (s.height + a.commentSpacing) : l + (a.commentSpacing - s.height) + } else { + if (135 < e && !g || !d && k) + if (0 <= a.commentMargin) + for (p.n(a.P.x + l, a.P.y - a.commentMargin - s.height), + r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = Zc, t.Eb = bd; + else + for (p.n(a.P.x + l, a.P.y + 2 * a.R.y - a.commentMargin), r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = bd, t.Eb = Zc; + else if (0 <= a.commentMargin) + for (p.n(a.P.x + l, a.P.y + 2 * a.R.y + a.commentMargin), r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = bd, t.Eb = Zc; + else + for (p.n(a.P.x + l, a.P.y + a.commentMargin - s.height), r.move(p), r = r.Hg(); r.next();) t = r.value, t.Db = Zc, t.Eb = bd; + l = 0 <= a.commentSpacing ? l + (s.width + a.commentSpacing) : l + (a.commentSpacing - s.width) + } + } + z.A(p); + b = l - a.commentSpacing - + (c ? b.height : b.width); + if (this.Of === vs) + for (e = a.pc; e.next();) a = e.value.link, null === a || a.jj || (a.Il = 0 < b ? b : NaN); + else + for (e = a.tc; e.next();) a = e.value.link, null === a || a.jj || (a.Yl = 0 < b ? b : NaN) + } + }; + Y.prototype.layoutTree = function(a) { + if (null !== a) { + u && z.l(a, zs, Y, "layoutTree:v"); + for (var b = a.children, c = b.length, d = 0; d < c; d++) this.layoutTree(b[d]); + switch (a.compaction) { + case $s: + at(this, a); + break; + case bt: + if (a.alignment === Ks) at(this, a); + else if (u && z.l(a, zs, Y, "layoutTreeBlock:v"), 0 === a.Wm) { + var d = a.parent, + b = !1, + c = 0, + e = Ts; + null !== d && (c = d.angle, e = d.alignment, b = Us(e)); + d = Zs(a); + a.qa.n(0, 0); + a.ob.n(a.width, a.height); + null === a.parent || null === a.comments || (180 !== c && 270 !== c || b) && !d ? a.Ta.n(0, 0) : 180 === c && !b || (90 === c || 270 === + c) && d ? a.Ta.n(a.width - 2 * a.R.x, 0) : a.Ta.n(0, a.height - 2 * a.R.y); + a.Vt = null; + a.mu = null + } else { + for (var g = ct(a), b = 90 === g || 270 === g, h = 0, k = a.children, l = k.length, m = 0; m < l; m++) var n = k[m], + h = Math.max(h, b ? n.ob.width : n.ob.height); + var p = a.alignment, + d = p === dt, + q = p === et, + r = Us(p), + s = Math.max(0, a.breadthLimit), + c = ft(a), + t = a.nodeSpacing, + v = gt(a), + x = a.rowSpacing, + y = 0; + if (d || q || a.Wp || a.Xp && 1 === a.maxGenerationCount) y = Math.max(0, a.rowIndent); + var d = a.width, + e = a.height, + A = 0, + B = 0, + L = 0, + H = null, + U = null, + ea = 0, + W = 0, + P = 0, + ba = 0, + Oa = 0, + sa = 0, + Na = 0, + ua = 0, + n = 0; + r && !Ys(p) && + 135 < g && k.reverse(); + if (Ys(p)) + if (1 < l) + for (m = 0; m < l; m++) 0 === m % 2 && m !== l - 1 ? ua = Math.max(ua, b ? k[m].ob.width : k[m].ob.height) : 0 !== m % 2 && (n = Math.max(n, b ? k[m].ob.width : k[m].ob.height)); + else 1 === l && (ua = b ? k[0].ob.width : k[0].ob.height); + if (r) { + switch (p) { + case Vs: + W = 135 > g ? ht(a, k, ua, A, B) : it(a, k, ua, A, B); + ua = W.x; + A = W.width; + B = W.height; + break; + case Ws: + for (m = 0; m < l; m++) { + var n = k[m], + Ha = n.ob, + H = 0 === sa ? 0 : x; + b ? (n.qa.n(h - Ha.width, ba + H), A = Math.max(A, Ha.width), B = Math.max(B, ba + H + Ha.height), ba += H + Ha.height) : (n.qa.n(P + H, h - Ha.height), A = Math.max(A, + P + H + Ha.width), B = Math.max(B, Ha.height), P += H + Ha.width); + sa++ + } + break; + case Xs: + for (m = 0; m < l; m++) n = k[m], Ha = n.ob, H = 0 === sa ? 0 : x, b ? (n.qa.n(t / 2 + a.R.x, ba + H), A = Math.max(A, Ha.width), B = Math.max(B, ba + H + Ha.height), ba += H + Ha.height) : (n.qa.n(P + H, t / 2 + a.R.y), A = Math.max(A, P + H + Ha.width), B = Math.max(B, Ha.height), P += H + Ha.width), sa++ + } + H = jt(this, 2); + U = jt(this, 2); + b ? (H[0].n(0, 0), H[1].n(0, B), U[0].n(A, 0)) : (H[0].n(0, 0), H[1].n(A, 0), U[0].n(0, B)); + U[1].n(A, B) + } else + for (m = 0; m < l; m++) { + n = k[m]; + Ha = n.ob; + if (b) { + 0 < s && 0 < sa && P + t + Ha.width > s && (P < h && pt(a, + p, h - P, 0, Na, m - 1), Oa++, sa = 0, Na = m, L = B, P = 0, ba = 135 < g ? -B - x : B + x); + qt(this, n, 0, ba); + var Aa = 0; + if (0 === sa) { + if (H = n.Vt, U = n.mu, ea = Ha.width, W = Ha.height, null === H || null === U || g !== ct(n)) H = jt(this, 2), U = jt(this, 2), H[0].n(0, 0), H[1].n(0, W), U[0].n(ea, 0), U[1].n(ea, W) + } else { + var jc = z.rb(), + W = rt(this, a, n, H, U, ea, W, jc), + Aa = W.x, + H = jc[0], + U = jc[1], + ea = W.width, + W = W.height; + z.xa(jc); + P < Ha.width && 0 > Aa && (st(a, -Aa, 0, Na, m - 1), tt(H, -Aa, 0), tt(U, -Aa, 0), Aa = 0) + } + n.qa.n(Aa, ba); + A = Math.max(A, ea); + B = Math.max(B, L + (0 === Oa ? 0 : x) + Ha.height); + P = ea + } else { + 0 < s && 0 < sa && ba + + t + Ha.height > s && (ba < h && pt(a, p, 0, h - ba, Na, m - 1), Oa++, sa = 0, Na = m, L = A, ba = 0, P = 135 < g ? -A - x : A + x); + qt(this, n, P, 0); + Aa = 0; + if (0 === sa) { + if (H = n.Vt, U = n.mu, ea = Ha.width, W = Ha.height, null === H || null === U || g !== ct(n)) H = jt(this, 2), U = jt(this, 2), H[0].n(0, 0), H[1].n(ea, 0), U[0].n(0, W), U[1].n(ea, W) + } else jc = z.rb(), W = rt(this, a, n, H, U, ea, W, jc), Aa = W.x, H = jc[0], U = jc[1], ea = W.width, W = W.height, z.xa(jc), ba < Ha.height && 0 > Aa && (st(a, 0, -Aa, Na, m - 1), tt(H, 0, -Aa), tt(U, 0, -Aa), Aa = 0); + n.qa.n(P, Aa); + B = Math.max(B, W); + A = Math.max(A, L + (0 === Oa ? 0 : x) + Ha.width); + ba = W + } + sa++ + } + 0 < + Oa && (b ? (B += Math.max(0, c), P < A && pt(a, p, A - P, 0, Na, l - 1), 0 < y && (q || st(a, y, 0, 0, l - 1), A += y)) : (A += Math.max(0, c), ba < B && pt(a, p, 0, B - ba, Na, l - 1), 0 < y && (q || st(a, 0, y, 0, l - 1), B += y))); + q = h = 0; + switch (p) { + case ut: + b ? h += A / 2 - a.R.x - v / 2 : q += B / 2 - a.R.y - v / 2; + break; + case Ts: + 0 < Oa ? b ? h += A / 2 - a.R.x - v / 2 : q += B / 2 - a.R.y - v / 2 : b ? (m = k[0].qa.x + k[0].Ta.x, ua = k[l - 1].qa.x + k[l - 1].Ta.x + 2 * k[l - 1].R.x, h += m + (ua - m) / 2 - a.R.x - v / 2) : (m = k[0].qa.y + k[0].Ta.y, ua = k[l - 1].qa.y + k[l - 1].Ta.y + 2 * k[l - 1].R.y, q += m + (ua - m) / 2 - a.R.y - v / 2); + break; + case dt: + b ? (h -= v, A += v) : (q -= v, B += v); + break; + case et: + b ? (h += A - a.width + v, A += v) : (q += B - a.height + v, B += v); + break; + case Vs: + b ? h = 1 < l ? h + (ua + t / 2 - a.R.x) : h + (k[0].R.x - a.R.x + k[0].Ta.x) : q = 1 < l ? q + (ua + t / 2 - a.R.y) : q + (k[0].R.y - a.R.y + k[0].Ta.y); + break; + case Ws: + b ? h += A + t / 2 - a.R.x : q += B + t / 2 - a.R.y; + break; + case Xs: + break; + default: + z.k("Unhandled alignment value " + p.toString()) + } + for (m = 0; m < l; m++) n = k[m], b ? n.qa.n(n.qa.x + n.Ta.x - h, n.qa.y + (135 < g ? (r ? -B : -n.ob.height) + n.Ta.y - c : e + c + n.Ta.y)) : n.qa.n(n.qa.x + (135 < g ? (r ? -A : -n.ob.width) + n.Ta.x - c : d + c + n.Ta.x), n.qa.y + n.Ta.y - q); + l = k = 0; + r ? b ? (A = vt(a, A, h), + 0 > h && (h = 0), 135 < g && (q += B + c), B += e + c, p === Xs && (k += t / 2 + a.R.x), l += e + c) : (135 < g && (h += A + c), A += d + c, B = wt(a, B, q), 0 > q && (q = 0), p === Xs && (l += t / 2 + a.R.y), k += d + c) : b ? (null === a.comments ? d > A && (p = xt(p, d - A, 0), k = p.x, l = p.y, A = d, h = 0) : A = vt(a, A, h), 0 > h && (k -= h, h = 0), 135 < g && (q += B + c), B = Math.max(Math.max(B, e), B + e + c), l += e + c) : (135 < g && (h += A + c), A = Math.max(Math.max(A, d), A + d + c), null === a.comments ? e > B && (p = xt(p, 0, e - B), k = p.x, l = p.y, B = e, q = 0) : B = wt(a, B, q), 0 > q && (l -= q, q = 0), k += d + c); + if (0 < Oa) g = jt(this, 4), p = jt(this, 4), b ? (g[2].n(0, e + c), g[3].n(g[2].x, B), + p[2].n(A, g[2].y), p[3].n(p[2].x, g[3].y)) : (g[2].n(d + c, 0), g[3].n(A, g[2].y), p[2].n(g[2].x, B), p[3].n(g[3].x, p[2].y)); + else { + g = jt(this, H.length + 2); + p = jt(this, U.length + 2); + for (m = 0; m < H.length; m++) r = H[m], g[m + 2].n(r.x + k, r.y + l); + for (m = 0; m < U.length; m++) r = U[m], p[m + 2].n(r.x + k, r.y + l) + } + b ? (g[0].n(h, 0), g[1].n(g[0].x, e), g[2].y < g[1].y && (g[2].x > g[0].x ? g[2].assign(g[1]) : g[1].assign(g[2])), g[3].y < g[2].y && (g[3].x > g[0].x ? g[3].assign(g[2]) : g[2].assign(g[3])), p[0].n(h + d, 0), p[1].n(p[0].x, e), p[2].y < p[1].y && (p[2].x < p[0].x ? p[2].assign(p[1]) : + p[1].assign(p[2])), p[3].y < p[2].y && (p[3].x < p[0].x ? p[3].assign(p[2]) : p[2].assign(p[3])), g[2].y -= c / 2, p[2].y -= c / 2) : (g[0].n(0, q), g[1].n(d, g[0].y), g[2].x < g[1].x && (g[2].y > g[0].y ? g[2].assign(g[1]) : g[1].assign(g[2])), g[3].x < g[2].x && (g[3].y > g[0].y ? g[3].assign(g[2]) : g[2].assign(g[3])), p[0].n(0, q + e), p[1].n(d, p[0].y), p[2].x < p[1].x && (p[2].y < p[0].y ? p[2].assign(p[1]) : p[1].assign(p[2])), p[3].x < p[2].x && (p[3].y < p[0].y ? p[3].assign(p[2]) : p[2].assign(p[3])), g[2].x -= c / 2, p[2].x -= c / 2); + yt(this, H); + yt(this, U); + a.Vt = g; + a.mu = p; + a.Ta.n(h, q); + a.ob.n(A, B) + } + break; + default: + z.k("Unhandled compaction value " + a.compaction.toString()) + } + } + }; + + function at(a, b) { + u && z.l(b, zs, Y, "layoutTreeNone:v"); + if (0 === b.Wm) { + var c = !1, + d = 0, + e = Ts; + null !== b.parent && (d = b.parent.angle, e = b.parent.alignment, c = Us(e)); + e = Zs(b); + b.qa.n(0, 0); + b.ob.n(b.width, b.height); + null === b.parent || null === b.comments || (180 !== d && 270 !== d || c) && !e ? b.Ta.n(0, 0) : 180 === d && !c || (90 === d || 270 === d) && e ? b.Ta.n(b.width - 2 * b.R.x, 0) : b.Ta.n(0, b.height - 2 * b.R.y) + } else { + for (var c = ct(b), d = 90 === c || 270 === c, g = 0, e = b.children, h = e.length, k = 0; k < h; k++) var l = e[k], + g = Math.max(g, d ? l.ob.width : l.ob.height); + var m = b.alignment, + n = + m === dt, + p = m === et, + q = Us(m), + r = Math.max(0, b.breadthLimit), + s = ft(b), + t = b.nodeSpacing, + v = gt(b), + x = n || p ? 0 : v / 2, + y = b.rowSpacing, + A = 0; + if (n || p || b.Wp || b.Xp && 1 === b.maxGenerationCount) A = Math.max(0, b.rowIndent); + var n = b.width, + B = b.height, + L = 0, + H = 0, + U = 0, + ea = 0, + W = 0, + P = 0, + ba = 0, + Oa = 0, + sa = 0, + Na = 0; + q && !Ys(m) && 135 < c && e.reverse(); + if (Ys(m)) + if (1 < h) + for (k = 0; k < h; k++) { + var l = e[k], + ua = l.ob; + 0 === k % 2 && k !== h - 1 ? sa = Math.max(sa, (d ? ua.width : ua.height) + zt(l) - t) : 0 !== k % 2 && (Na = Math.max(Na, (d ? ua.width : ua.height) + zt(l) - t)) + } else 1 === h && (sa = d ? e[0].ob.width : e[0].ob.height); + if (q) switch (m) { + case Vs: + case Ks: + H = 135 > c ? ht(b, e, sa, L, H) : it(b, e, sa, L, H); + sa = H.x; + L = H.width; + H = H.height; + break; + case Ws: + for (k = 0; k < h; k++) l = e[k], ua = l.ob, r = 0 === ba ? 0 : y, d ? (l.qa.n(g - ua.width, W + r), L = Math.max(L, ua.width), H = Math.max(H, W + r + ua.height), W += r + ua.height) : (l.qa.n(ea + r, g - ua.height), L = Math.max(L, ea + r + ua.width), H = Math.max(H, ua.height), ea += r + ua.width), ba++; + break; + case Xs: + for (g = 0; g < h; g++) l = e[g], ua = l.ob, r = 0 === ba ? 0 : y, d ? (l.qa.n(t / 2 + b.R.x, W + r), L = Math.max(L, ua.width), H = Math.max(H, W + r + ua.height), W += r + ua.height) : (l.qa.n(ea + + r, t / 2 + b.R.y), L = Math.max(L, ea + r + ua.width), H = Math.max(H, ua.height), ea += r + ua.width), ba++ + } else + for (k = 0; k < h; k++) l = e[k], ua = l.ob, d ? (0 < r && 0 < ba && ea + t + ua.width > r && (ea < g && pt(b, m, g - ea, 0, Oa, k - 1), P++, ba = 0, Oa = k, U = H, ea = 0, W = 135 < c ? -H - y : H + y), Na = 0 === ba ? x : t, qt(a, l, 0, W), l.qa.n(ea + Na, W), L = Math.max(L, ea + Na + ua.width), H = Math.max(H, U + (0 === P ? 0 : y) + ua.height), ea += Na + ua.width) : (0 < r && 0 < ba && W + t + ua.height > r && (W < g && pt(b, m, 0, g - W, Oa, k - 1), P++, ba = 0, Oa = k, U = L, W = 0, ea = 135 < c ? -L - y : L + y), Na = 0 === ba ? x : t, qt(a, l, ea, 0), l.qa.n(ea, W + Na), H = Math.max(H, + W + Na + ua.height), L = Math.max(L, U + (0 === P ? 0 : y) + ua.width), W += Na + ua.height), ba++; + 0 < P && (d ? (H += Math.max(0, s), ea < L && pt(b, m, L - ea, 0, Oa, h - 1), 0 < A && (p || st(b, A, 0, 0, h - 1), L += A)) : (L += Math.max(0, s), W < H && pt(b, m, 0, H - W, Oa, h - 1), 0 < A && (p || st(b, 0, A, 0, h - 1), H += A))); + A = p = 0; + switch (m) { + case ut: + d ? p += L / 2 - b.R.x - v / 2 : A += H / 2 - b.R.y - v / 2; + break; + case Ts: + 0 < P ? d ? p += L / 2 - b.R.x - v / 2 : A += H / 2 - b.R.y - v / 2 : d ? (m = e[0].qa.x + e[0].Ta.x, t = e[h - 1].qa.x + e[h - 1].Ta.x + 2 * e[h - 1].R.x, p += m + (t - m) / 2 - b.R.x - v / 2) : (m = e[0].qa.y + e[0].Ta.y, t = e[h - 1].qa.y + e[h - 1].Ta.y + 2 * e[h - 1].R.y, + A += m + (t - m) / 2 - b.R.y - v / 2); + break; + case dt: + d ? (p -= v, L += v) : (A -= v, H += v); + break; + case et: + d ? (p += L - b.width + v, L += v) : (A += H - b.height + v, H += v); + break; + case Vs: + case Ks: + d ? p = 1 < h ? p + (sa + t / 2 - b.R.x) : p + (e[0].R.x - b.R.x + e[0].Ta.x) : A = 1 < h ? A + (sa + t / 2 - b.R.y) : A + (e[0].R.y - b.R.y + e[0].Ta.y); + break; + case Ws: + d ? p += L + t / 2 - b.R.x : A += H + t / 2 - b.R.y; + break; + case Xs: + break; + default: + z.k("Unhandled alignment value " + m.toString()) + } + for (k = 0; k < h; k++) l = e[k], d ? l.qa.n(l.qa.x + l.Ta.x - p, l.qa.y + (135 < c ? (q ? -H : -l.ob.height) + l.Ta.y - s : B + s + l.Ta.y)) : l.qa.n(l.qa.x + (135 < c ? (q ? + -L : -l.ob.width) + l.Ta.x - s : n + s + l.Ta.x), l.qa.y + l.Ta.y - A); + d ? (L = vt(b, L, p), 0 > p && (p = 0), 135 < c && (A += H + s), H += B + s) : (135 < c && (p += L + s), L += n + s, H = wt(b, H, A), 0 > A && (A = 0)); + b.Ta.n(p, A); + b.ob.n(L, H) + } + } + + function ht(a, b, c, d, e) { + u && z.l(a, zs, Y, "layoutBusChildrenPosDir:v"); + var g = b.length; + if (0 === g) return new w(c, 0, d, e); + if (1 === g) { + var h = b[0]; + d = h.ob.width; + e = h.ob.height; + return new w(c, 0, d, e) + } + for (var k = a.nodeSpacing, l = a.rowSpacing, m = 90 === ct(a), n = 0, p = 0, q = 0, r = 0; r < g; r++) + if (!(0 !== r % 2 || 1 < g && r === g - 1)) { + var h = b[r], + s = h.ob, + t = 0 === n ? 0 : l; + if (m) { + var v = zt(h) - k; + h.qa.n(c - (s.width + v), q + t); + d = Math.max(d, s.width + v); + e = Math.max(e, q + t + s.height); + q += t + s.height + } else v = zt(h) - k, h.qa.n(p + t, c - (s.height + v)), e = Math.max(e, s.height + v), d = Math.max(d, + p + t + s.width), p += t + s.width; + n++ + } + var n = 0, + x = p, + y = q; + m ? (p = c + k, q = 0) : (p = 0, q = c + k); + for (r = 0; r < g; r++) 0 !== r % 2 && (h = b[r], s = h.ob, t = 0 === n ? 0 : l, m ? (v = zt(h) - k, h.qa.n(p + v, q + t), d = Math.max(d, p + s.width + v), e = Math.max(e, q + t + s.height), q += t + s.height) : (v = zt(h) - k, h.qa.n(p + t, q + v), d = Math.max(d, p + t + s.width), e = Math.max(e, q + s.height + v), p += t + s.width), n++); + 1 < g && 1 === g % 2 && (h = b[g - 1], s = h.ob, b = At(h, m ? Math.max(Math.abs(y), Math.abs(q)) : Math.max(Math.abs(x), Math.abs(p))), m ? (h.qa.n(c + k / 2 - h.R.x - h.Ta.x, e + b), m = c + k / 2 - h.R.x - h.Ta.x, d = Math.max(d, m + s.width), + 0 > m && (d -= m), e = Math.max(e, Math.max(y, q) + b + s.height), 0 > h.qa.x && (c = Bt(a, h.qa.x, !1, c, k))) : (h.qa.n(d + b, c + k / 2 - h.R.y - h.Ta.y), d = Math.max(d, Math.max(x, p) + b + s.width), m = c + k / 2 - h.R.y - h.Ta.y, e = Math.max(e, m + s.height), 0 > m && (e -= m), 0 > h.qa.y && (c = Bt(a, h.qa.y, !0, c, k)))); + return new w(c, 0, d, e) + } + + function it(a, b, c, d, e) { + u && z.l(a, zs, Y, "layoutBusChildrenNegDir:v"); + var g = b.length; + if (0 === g) return new w(c, 0, d, e); + if (1 === g) { + var h = b[0]; + d = h.ob.width; + e = h.ob.height; + return new w(c, 0, d, e) + } + for (var k = a.nodeSpacing, l = a.rowSpacing, m = 270 === ct(a), n = 0, p = 0, q = 0, r = 0; r < g; r++) + if (!(0 !== r % 2 || 1 < g && r === g - 1)) { + var h = b[r], + s = h.ob, + t = 0 === n ? 0 : l; + if (m) { + var v = zt(h) - k, + q = q - (t + s.height); + h.qa.n(c - (s.width + v), q); + d = Math.max(d, s.width + v); + e = Math.max(e, Math.abs(q)) + } else v = zt(h) - k, p -= t + s.width, h.qa.n(p, c - (s.height + v)), e = Math.max(e, s.height + + v), d = Math.max(d, Math.abs(p)); + n++ + } + var n = 0, + x = p, + y = q; + m ? (p = c + k, q = 0) : (p = 0, q = c + k); + for (r = 0; r < g; r++) 0 !== r % 2 && (h = b[r], s = h.ob, t = 0 === n ? 0 : l, m ? (v = zt(h) - k, q -= t + s.height, h.qa.n(p + v, q), d = Math.max(d, p + s.width + v), e = Math.max(e, Math.abs(q))) : (v = zt(h) - k, p -= t + s.width, h.qa.n(p, q + v), e = Math.max(e, q + s.height + v), d = Math.max(d, Math.abs(p))), n++); + 1 < g && 1 === g % 2 && (h = b[g - 1], s = h.ob, l = At(h, m ? Math.max(Math.abs(y), Math.abs(q)) : Math.max(Math.abs(x), Math.abs(p))), m ? (h.qa.n(c + k / 2 - h.R.x - h.Ta.x, -e - s.height - l), p = c + k / 2 - h.R.x - h.Ta.x, d = Math.max(d, + p + s.width), 0 > p && (d -= p), e = Math.max(e, Math.abs(Math.min(y, q)) + l + s.height), 0 > h.qa.x && (c = Bt(a, h.qa.x, !1, c, k))) : (h.qa.n(-d - s.width - l, c + k / 2 - h.R.y - h.Ta.y), d = Math.max(d, Math.abs(Math.min(x, p)) + l + s.width), p = c + k / 2 - h.R.y - h.Ta.y, e = Math.max(e, p + s.height), 0 > p && (e -= p), 0 > h.qa.y && (c = Bt(a, h.qa.y, !0, c, k)))); + for (r = 0; r < g; r++) h = b[r], m ? h.qa.n(h.qa.x, h.qa.y + e) : h.qa.n(h.qa.x + d, h.qa.y); + return new w(c, 0, d, e) + } + + function zt(a) { + u && z.l(a, zs, Y, "fixRelativePostions:child"); + return null === a.parent ? 0 : a.parent.nodeSpacing + } + + function At(a) { + u && z.l(a, zs, Y, "fixRelativePostions:lastchild"); + return null === a.parent ? 0 : a.parent.rowSpacing + } + + function Bt(a, b, c, d, e) { + u && z.l(a, zs, Y, "fixRelativePostions:v"); + a = a.children; + for (var g = a.length, h = 0; h < g; h++) c ? a[h].qa.n(a[h].qa.x, a[h].qa.y - b) : a[h].qa.n(a[h].qa.x - b, a[h].qa.y); + b = a[g - 1]; + return Math.max(d, c ? b.Ta.y + b.R.y - e / 2 : b.Ta.x + b.R.x - e / 2) + } + + function vt(a, b, c) { + u && z.l(a, zs, Y, "calculateSubwidth:v"); + switch (a.alignment) { + case Ts: + case ut: + var d = b; + c + a.width > d && (d = c + a.width); + 0 > c && (d -= c); + return d; + case dt: + return a.width > b ? a.width : b; + case et: + return 2 * a.R.x > b ? a.width : b + a.width - 2 * a.R.x; + case Vs: + case Ks: + return d = Math.min(0, c), c = Math.max(b, c + a.width), Math.max(a.width, c - d); + case Ws: + return a.width - a.R.x + a.nodeSpacing / 2 + b; + case Xs: + return Math.max(a.width, a.R.x + a.nodeSpacing / 2 + b); + default: + return b + } + } + + function wt(a, b, c) { + u && z.l(a, zs, Y, "calculateSubheight:v"); + switch (a.alignment) { + case Ts: + case ut: + var d = b; + c + a.height > d && (d = c + a.height); + 0 > c && (d -= c); + return d; + case dt: + return a.height > b ? a.height : b; + case et: + return 2 * a.R.y > b ? a.height : b + a.height - 2 * a.R.y; + case Vs: + case Ks: + return d = Math.min(0, c), c = Math.max(b, c + a.height), Math.max(a.height, c - d); + case Ws: + return a.height - a.R.y + a.nodeSpacing / 2 + b; + case Xs: + return Math.max(a.height, a.R.y + a.nodeSpacing / 2 + b); + default: + return b + } + } + + function xt(a, b, c) { + u && z.l(a, Ba, Y, "alignOffset:align"); + switch (a) { + case ut: + b /= 2; + c /= 2; + break; + case Ts: + b /= 2; + c /= 2; + break; + case dt: + c = b = 0; + break; + case et: + break; + default: + z.k("Unhandled alignment value " + a.toString()) + } + return new N(b, c) + } + + function pt(a, b, c, d, e, g) { + u && z.l(a, zs, Y, "shiftRelPosAlign:v"); + u && z.l(b, Ba, Y, "shiftRelPosAlign:align"); + b = xt(b, c, d); + st(a, b.x, b.y, e, g) + } + + function st(a, b, c, d, e) { + u && z.l(a, zs, Y, "shiftRelPos:v"); + if (0 !== b || 0 !== c) + for (a = a.children; d <= e; d++) { + var g = a[d].qa; + g.x += b; + g.y += c + } + } + + function qt(a, b, c, d) { + u && (z.l(b, zs, Y, "recordMidPoints:v"), z.g(c, "number", Y, "recordMidPoints:x"), z.g(d, "number", Y, "recordMidPoints:y")); + var e = b.parent; + switch (a.Of) { + case vs: + for (a = b.tc; a.next();) b = a.value, b.fromVertex === e && b.ls.n(c, d); + break; + case Cs: + for (a = b.pc; a.next();) b = a.value, b.toVertex === e && b.ls.n(c, d); + break; + default: + z.k("Unhandled path value " + a.Of.toString()) + } + } + + function tt(a, b, c) { + for (var d = 0; d < a.length; d++) { + var e = a[d]; + e.x += b; + e.y += c + } + } + + function rt(a, b, c, d, e, g, h, k) { + u && z.l(b, zs, Y, "mergeFringes:parent"); + u && z.l(c, zs, Y, "mergeFringes:child"); + var l = ct(b), + m = 90 === l || 270 === l, + n = b.nodeSpacing; + b = d; + var p = e; + d = g; + e = h; + var q = c.Vt, + r = c.mu; + h = c.ob; + var s = m ? Math.max(e, h.height) : Math.max(d, h.width); + if (null === q || l !== ct(c)) q = jt(a, 2), r = jt(a, 2), m ? (q[0].n(0, 0), q[1].n(0, h.height), r[0].n(h.width, 0), r[1].n(r[0].x, q[1].y)) : (q[0].n(0, 0), q[1].n(h.width, 0), r[0].n(0, h.height), r[1].n(q[1].x, r[0].y)); + if (m) { + c = d; + d = 9999999; + if (!(null === p || 2 > p.length || null === q || 2 > q.length)) + for (m = + l = 0; l < p.length && m < q.length;) { + e = p[l]; + var t = q[m]; + g = t.x; + var v = t.y; + g += c; + var x = e; + l + 1 < p.length && (x = p[l + 1]); + var y = t, + t = y.x, + y = y.y; + m + 1 < q.length && (y = q[m + 1], t = y.x, y = y.y, t += c); + var A = d; + e.y === v ? A = g - e.x : e.y > v && e.y < y ? A = g + (e.y - v) / (y - v) * (t - g) - e.x : v > e.y && v < x.y && (A = g - (e.x + (v - e.y) / (x.y - e.y) * (x.x - e.x))); + A < d && (d = A); + x.y <= e.y ? l++ : y <= v ? m++ : (x.y <= y && l++, y <= x.y && m++) + } + c -= d; + c += n; + l = q; + m = c; + if (null === b || 2 > b.length || null === l || 2 > l.length) d = null; + else { + n = jt(a, b.length + l.length); + for (d = g = e = 0; g < l.length && l[g].y < b[0].y;) v = l[g++], n[d++].n(v.x + + m, v.y); + for (; e < b.length;) v = b[e++], n[d++].n(v.x, v.y); + for (e = b[b.length - 1].y; g < l.length && l[g].y <= e;) g++; + for (; g < l.length && l[g].y > e;) v = l[g++], n[d++].n(v.x + m, v.y); + l = jt(a, d); + for (e = 0; e < d; e++) l[e].assign(n[e]); + yt(a, n); + d = l + } + g = r; + v = c; + if (null === p || 2 > p.length || null === g || 2 > g.length) e = null; + else { + n = jt(a, p.length + g.length); + for (m = x = l = 0; l < p.length && p[l].y < g[0].y;) e = p[l++], n[m++].n(e.x, e.y); + for (; x < g.length;) e = g[x++], n[m++].n(e.x + v, e.y); + for (g = g[g.length - 1].y; l < p.length && p[l].y <= g;) l++; + for (; l < p.length && p[l].y > g;) e = p[l++], + n[m++].n(e.x, e.y); + e = jt(a, m); + for (l = 0; l < m; l++) e[l].assign(n[l]); + yt(a, n) + } + g = Math.max(0, c) + h.width; + h = s + } else { + c = e; + d = 9999999; + if (!(null === p || 2 > p.length || null === q || 2 > q.length)) + for (m = l = 0; l < p.length && m < q.length;) e = p[l], t = q[m], g = t.x, v = t.y, v += c, x = e, l + 1 < p.length && (x = p[l + 1]), y = t, t = y.x, y = y.y, m + 1 < q.length && (y = q[m + 1], t = y.x, y = y.y, y += c), A = d, e.x === g ? A = v - e.y : e.x > g && e.x < t ? A = v + (e.x - g) / (t - g) * (y - v) - e.y : g > e.x && g < x.x && (A = v - (e.y + (g - e.x) / (x.x - e.x) * (x.y - e.y))), A < d && (d = A), x.x <= e.x ? l++ : t <= g ? m++ : (x.x <= t && l++, t <= x.x && m++); + c -= d; + c += n; + l = q; + m = c; + if (null === b || 2 > b.length || null === l || 2 > l.length) d = null; + else { + n = jt(a, b.length + l.length); + for (d = g = e = 0; g < l.length && l[g].x < b[0].x;) v = l[g++], n[d++].n(v.x, v.y + m); + for (; e < b.length;) v = b[e++], n[d++].n(v.x, v.y); + for (e = b[b.length - 1].x; g < l.length && l[g].x <= e;) g++; + for (; g < l.length && l[g].x > e;) v = l[g++], n[d++].n(v.x, v.y + m); + l = jt(a, d); + for (e = 0; e < d; e++) l[e].assign(n[e]); + yt(a, n); + d = l + } + g = r; + v = c; + if (null === p || 2 > p.length || null === g || 2 > g.length) e = null; + else { + n = jt(a, p.length + g.length); + for (m = x = l = 0; l < p.length && p[l].x < g[0].x;) e = p[l++], + n[m++].n(e.x, e.y); + for (; x < g.length;) e = g[x++], n[m++].n(e.x, e.y + v); + for (g = g[g.length - 1].x; l < p.length && p[l].x <= g;) l++; + for (; l < p.length && p[l].x > g;) e = p[l++], n[m++].n(e.x, e.y); + e = jt(a, m); + for (l = 0; l < m; l++) e[l].assign(n[l]); + yt(a, n) + } + g = s; + h = Math.max(0, c) + h.height + } + yt(a, b); + yt(a, q); + yt(a, p); + yt(a, r); + k[0] = d; + k[1] = e; + return new w(c, 0, g, h) + } + + function jt(a, b) { + var c = a.nz[b]; + if (void 0 !== c && (c = c.pop(), void 0 !== c)) return c; + for (var c = [], d = 0; d < b; d++) c[d] = new N; + return c + } + + function yt(a, b) { + var c = b.length, + d = a.nz[c]; + void 0 === d && (d = [], a.nz[c] = d); + d.push(b) + } + Y.prototype.arrangeTrees = function() { + if (this.qd === Bs) + for (var a = this.Fd.i; a.next();) { + var b = a.value; + if (b instanceof zs) { + var c = b.Pc; + if (null !== c) { + var d = c.position, + c = d.x, + d = d.y; + isFinite(c) || (c = 0); + isFinite(d) || (d = 0); + Ct(this, b, c, d) + } + } + } else { + c = []; + for (a = this.Fd.i; a.next();) b = a.value, b instanceof zs && c.push(b); + switch (this.sorting) { + case Ps: + break; + case Qs: + c.reverse(); + break; + case Rs: + c.sort(this.comparer); + break; + case Ss: + c.sort(this.comparer); + c.reverse(); + break; + default: + z.k("Unhandled sorting value " + this.sorting.toString()) + } + b = + this.je; + a = b.x; + b = b.y; + for (d = 0; d < c.length; d++) { + var e = c[d]; + Ct(this, e, a + e.Ta.x, b + e.Ta.y); + switch (this.qd) { + case ys: + b += e.ob.height + this.lg.height; + break; + case Dt: + a += e.ob.width + this.lg.width; + break; + default: + z.k("Unhandled arrangement value " + this.qd.toString()) + } + } + } + }; + + function Ct(a, b, c, d) { + if (null !== b) { + u && z.l(b, zs, Y, "assignAbsolutePositions:v"); + b.x = c; + b.y = d; + b = b.children; + for (var e = b.length, g = 0; g < e; g++) { + var h = b[g]; + Ct(a, h, c + h.qa.x, d + h.qa.y) + } + } + } + Y.prototype.commitLayout = function() { + this.QA(); + this.commitNodes(); + this.Fz(); + this.Rt && this.commitLinks() + }; + Y.prototype.commitNodes = function() { + for (var a = this.network.vertexes.i; a.next();) a.value.commit(); + for (a.reset(); a.next();) this.layoutComments(a.value) + }; + Y.prototype.Fz = function() { + if (this.kA === Hs) { + for (var a = this.rB, b = [], c = null, d = this.network.vertexes.i; d.next();) { + var e = d.value; + null === c ? c = e.vb.copy() : c.qi(e.vb); + var g = b[e.level], + g = void 0 === g ? ft(e) : Math.max(g, ft(e)); + b[e.level] = g + } + for (d = 0; d < b.length; d++) void 0 === b[d] && (b[d] = 0); + 90 === this.angle || 270 === this.angle ? (c.ag(this.nodeSpacing / 2, this.layerSpacing), e = new N(-this.nodeSpacing / 2, -this.layerSpacing / 2)) : (c.ag(this.layerSpacing, this.nodeSpacing / 2), e = new N(-this.layerSpacing / 2, -this.nodeSpacing / 2)); + var g = [], + c = 90 === this.angle || 270 === this.angle ? c.width : c.height, + h = 0; + if (180 === this.angle || 270 === this.angle) + for (d = 0; d < a.length; d++) h += a[d] + b[d]; + for (d = 0; d < a.length; d++) { + var k = a[d] + b[d]; + 270 === this.angle ? (h -= k, g.push(new w(0, h, c, k))) : 90 === this.angle ? (g.push(new w(0, h, c, k)), h += k) : 180 === this.angle ? (h -= k, g.push(new w(h, 0, k, c))) : (g.push(new w(h, 0, k, c)), h += k) + } + this.commitLayers(g, e) + } + }; + Y.prototype.commitLayers = function() {}; + Y.prototype.commitLinks = function() { + for (var a = this.network.edges.i; a.next();) a.value.commit() + }; + Y.prototype.QA = function() { + for (var a = this.Fd.i; a.next();) { + var b = a.value; + b instanceof zs && Et(this, b) + } + }; + + function Et(a, b) { + if (null !== b) { + u && z.l(b, zs, Y, "setPortSpotsTree:v"); + a.setPortSpots(b); + for (var c = b.children, d = c.length, e = 0; e < d; e++) Et(a, c[e]) + } + } + Y.prototype.setPortSpots = function(a) { + u && z.l(a, zs, Y, "setPortSpots:v"); + var b = a.alignment; + if (Us(b)) { + u && z.l(a, zs, Y, "setPortSpotsBus:v"); + u && z.l(b, Ba, Y, "setPortSpots:align"); + var c = this.Of === vs, + d = ct(a), + e; + switch (d) { + case 0: + e = ad; + break; + case 90: + e = bd; + break; + case 180: + e = $c; + break; + default: + e = Zc + } + var g = a.children, + h = g.length; + switch (b) { + case Vs: + case Ks: + for (b = 0; b < h; b++) { + var k = g[b], + k = (c ? k.tc : k.pc).first(); + if (null !== k && (k = k.link, null !== k)) { + var l = 90 === d || 270 === d ? $c : Zc; + if (1 === h || b === h - 1 && 1 === h % 2) switch (d) { + case 0: + l = $c; + break; + case 90: + l = + Zc; + break; + case 180: + l = ad; + break; + default: + l = bd + } else 0 === b % 2 && (l = 90 === d || 270 === d ? ad : bd); + c ? (a.setsPortSpot && (k.Db = e), a.setsChildPortSpot && (k.Eb = l)) : (a.setsPortSpot && (k.Db = l), a.setsChildPortSpot && (k.Eb = e)) + } + } + break; + case Ws: + l = 90 === d || 270 === d ? ad : bd; + for (d = c ? a.pc : a.tc; d.next();) k = d.value.link, null !== k && (c ? (a.setsPortSpot && (k.Db = e), a.setsChildPortSpot && (k.Eb = l)) : (a.setsPortSpot && (k.Db = l), a.setsChildPortSpot && (k.Eb = e))); + break; + case Xs: + for (l = 90 === d || 270 === d ? $c : Zc, d = c ? a.pc : a.tc; d.next();) k = d.value.link, null !== k && (c ? + (a.setsPortSpot && (k.Db = e), a.setsChildPortSpot && (k.Eb = l)) : (a.setsPortSpot && (k.Db = l), a.setsChildPortSpot && (k.Eb = e))) + } + } else if (c = ct(a), this.Of === vs) + for (e = a.pc; e.next();) { + if (d = e.value.link, null !== d) { + if (a.setsPortSpot) + if (a.portSpot.bd()) switch (c) { + case 0: + d.Db = ad; + break; + case 90: + d.Db = bd; + break; + case 180: + d.Db = $c; + break; + default: + d.Db = Zc + } else d.Db = a.portSpot; + if (a.setsChildPortSpot) + if (a.childPortSpot.bd()) switch (c) { + case 0: + d.Eb = $c; + break; + case 90: + d.Eb = Zc; + break; + case 180: + d.Eb = ad; + break; + default: + d.Eb = bd + } else d.Eb = a.childPortSpot + } + } else + for (e = + a.tc; e.next();) + if (d = e.value.link, null !== d) { + if (a.setsPortSpot) + if (a.portSpot.bd()) switch (c) { + case 0: + d.Eb = ad; + break; + case 90: + d.Eb = bd; + break; + case 180: + d.Eb = $c; + break; + default: + d.Eb = Zc + } else d.Eb = a.portSpot; + if (a.setsChildPortSpot) + if (a.childPortSpot.bd()) switch (c) { + case 0: + d.Db = $c; + break; + case 90: + d.Db = Zc; + break; + case 180: + d.Db = ad; + break; + default: + d.Db = bd + } else d.Db = a.childPortSpot + } + }; + + function ct(a) { + a = a.angle; + return 45 >= a ? 0 : 135 >= a ? 90 : 225 >= a ? 180 : 315 >= a ? 270 : 0 + } + + function ft(a) { + u && z.l(a, zs, Y, "computeLayerSpacing:v"); + var b = ct(a), + b = 90 === b || 270 === b, + c = a.layerSpacing; + if (0 < a.layerSpacingParentOverlap) var d = Math.min(1, a.layerSpacingParentOverlap), + c = c - (b ? a.height * d : a.width * d); + c < (b ? -a.height : -a.width) && (c = b ? -a.height : -a.width); + return c + } + + function gt(a) { + u && z.l(a, zs, Y, "computeNodeIndent:v"); + var b = ct(a), + b = 90 === b || 270 === b, + c = a.nodeIndent; + if (0 < a.nodeIndentPastParent) var d = Math.min(1, a.nodeIndentPastParent), + c = c + (b ? a.width * d : a.height * d); + return c = Math.max(0, c) + } + z.defineProperty(Y, { + rL: "roots" + }, function() { + return this.Fd + }, function(a) { + this.Fd !== a && (z.l(a, K, Y, "roots"), this.Fd = a, this.I()) + }); + z.defineProperty(Y, { + path: "path" + }, function() { + return this.ds + }, function(a) { + this.ds !== a && (z.Ba(a, Y, Y, "path"), this.ds = a, this.I()) + }); + z.defineProperty(Y, { + zJ: "treeStyle" + }, function() { + return this.Zs + }, function(a) { + this.qd !== a && (z.Ba(a, Y, Y, "treeStyle"), a === ws || a === Ns || a === Os || a === Ms) && (this.Zs = a, this.I()) + }); + z.defineProperty(Y, { + kA: "layerStyle" + }, function() { + return this.Gv + }, function(a) { + this.qd !== a && (z.Ba(a, Y, Y, "layerStyle"), a === xs || a === Is || a === Hs) && (this.Gv = a, this.I()) + }); + z.defineProperty(Y, { + comments: "comments" + }, function() { + return this.Ih + }, function(a) { + this.Ih !== a && (z.g(a, "boolean", Y, "comments"), this.Ih = a, this.I()) + }); + z.defineProperty(Y, { + Xf: "arrangement" + }, function() { + return this.qd + }, function(a) { + this.qd !== a && (z.Ba(a, Y, Y, "arrangement"), a === ys || a === Dt || a === Bs) && (this.qd = a, this.I()) + }); + z.defineProperty(Y, { + KD: "arrangementSpacing" + }, function() { + return this.lg + }, function(a) { + z.l(a, Ea, Y, "arrangementSpacing"); + this.lg.N(a) || (this.lg.assign(a), this.I()) + }); + z.defineProperty(Y, { + qL: "rootDefaults" + }, function() { + return this.wa + }, function(a) { + this.wa !== a && (z.l(a, zs, Y, "rootDefaults"), this.wa = a, this.I()) + }); + z.defineProperty(Y, { + QJ: "alternateDefaults" + }, function() { + return this.ya + }, function(a) { + this.ya !== a && (z.l(a, zs, Y, "alternateDefaults"), this.ya = a, this.I()) + }); + z.defineProperty(Y, { + sorting: "sorting" + }, function() { + return this.wa.sorting + }, function(a) { + this.wa.sorting !== a && (z.Ba(a, Y, Y, "sorting"), a === Ps || a === Qs || a === Rs || Ss) && (this.wa.sorting = a, this.I()) + }); + z.defineProperty(Y, { + comparer: "comparer" + }, function() { + return this.wa.comparer + }, function(a) { + this.wa.comparer !== a && (z.g(a, "function", Y, "comparer"), this.wa.comparer = a, this.I()) + }); + z.defineProperty(Y, { + angle: "angle" + }, function() { + return this.wa.angle + }, function(a) { + this.wa.angle !== a && (z.g(a, "number", Y, "angle"), 0 === a || 90 === a || 180 === a || 270 === a ? (this.wa.angle = a, this.I()) : z.k("TreeLayout.angle must be 0, 90, 180, or 270")) + }); + z.defineProperty(Y, { + alignment: "alignment" + }, function() { + return this.wa.alignment + }, function(a) { + this.wa.alignment !== a && (z.Ba(a, Y, Y, "alignment"), this.wa.alignment = a, this.I()) + }); + z.defineProperty(Y, { + nodeIndent: "nodeIndent" + }, function() { + return this.wa.nodeIndent + }, function(a) { + this.wa.nodeIndent !== a && (z.g(a, "number", Y, "nodeIndent"), 0 <= a && (this.wa.nodeIndent = a, this.I())) + }); + z.defineProperty(Y, { + nodeIndentPastParent: "nodeIndentPastParent" + }, function() { + return this.wa.nodeIndentPastParent + }, function(a) { + this.wa.nodeIndentPastParent !== a && (z.g(a, "number", Y, "nodeIndentPastParent"), 0 <= a && 1 >= a && (this.wa.nodeIndentPastParent = a, this.I())) + }); + z.defineProperty(Y, { + nodeSpacing: "nodeSpacing" + }, function() { + return this.wa.nodeSpacing + }, function(a) { + this.wa.nodeSpacing !== a && (z.g(a, "number", Y, "nodeSpacing"), this.wa.nodeSpacing = a, this.I()) + }); + z.defineProperty(Y, { + layerSpacing: "layerSpacing" + }, function() { + return this.wa.layerSpacing + }, function(a) { + this.wa.layerSpacing !== a && (z.g(a, "number", Y, "layerSpacing"), this.wa.layerSpacing = a, this.I()) + }); + z.defineProperty(Y, { + layerSpacingParentOverlap: "layerSpacingParentOverlap" + }, function() { + return this.wa.layerSpacingParentOverlap + }, function(a) { + this.wa.layerSpacingParentOverlap !== a && (z.g(a, "number", Y, "layerSpacingParentOverlap"), 0 <= a && 1 >= a && (this.wa.layerSpacingParentOverlap = a, this.I())) + }); + z.defineProperty(Y, { + compaction: "compaction" + }, function() { + return this.wa.compaction + }, function(a) { + this.wa.compaction !== a && (z.Ba(a, Y, Y, "compaction"), a === $s || a === bt) && (this.wa.compaction = a, this.I()) + }); + z.defineProperty(Y, { + breadthLimit: "breadthLimit" + }, function() { + return this.wa.breadthLimit + }, function(a) { + this.wa.breadthLimit !== a && (z.g(a, "number", Y, "breadthLimit"), 0 <= a && (this.wa.breadthLimit = a, this.I())) + }); + z.defineProperty(Y, { + rowSpacing: "rowSpacing" + }, function() { + return this.wa.rowSpacing + }, function(a) { + this.wa.rowSpacing !== a && (z.g(a, "number", Y, "rowSpacing"), this.wa.rowSpacing = a, this.I()) + }); + z.defineProperty(Y, { + rowIndent: "rowIndent" + }, function() { + return this.wa.rowIndent + }, function(a) { + this.wa.rowIndent !== a && (z.g(a, "number", Y, "rowIndent"), 0 <= a && (this.wa.rowIndent = a, this.I())) + }); + z.defineProperty(Y, { + commentSpacing: "commentSpacing" + }, function() { + return this.wa.commentSpacing + }, function(a) { + this.wa.commentSpacing !== a && (z.g(a, "number", Y, "commentSpacing"), this.wa.commentSpacing = a, this.I()) + }); + z.defineProperty(Y, { + commentMargin: "commentMargin" + }, function() { + return this.wa.commentMargin + }, function(a) { + this.wa.commentMargin !== a && (z.g(a, "number", Y, "commentMargin"), this.wa.commentMargin = a, this.I()) + }); + z.defineProperty(Y, { + setsPortSpot: "setsPortSpot" + }, function() { + return this.wa.setsPortSpot + }, function(a) { + this.wa.setsPortSpot !== a && (z.g(a, "boolean", Y, "setsPortSpot"), this.wa.setsPortSpot = a, this.I()) + }); + z.defineProperty(Y, { + portSpot: "portSpot" + }, function() { + return this.wa.portSpot + }, function(a) { + z.l(a, Q, Y, "portSpot"); + this.wa.portSpot.N(a) || (this.wa.portSpot = a, this.I()) + }); + z.defineProperty(Y, { + setsChildPortSpot: "setsChildPortSpot" + }, function() { + return this.wa.setsChildPortSpot + }, function(a) { + this.wa.setsChildPortSpot !== a && (z.g(a, "boolean", Y, "setsChildPortSpot"), this.wa.setsChildPortSpot = a, this.I()) + }); + z.defineProperty(Y, { + childPortSpot: "childPortSpot" + }, function() { + return this.wa.childPortSpot + }, function(a) { + z.l(a, Q, Y, "childPortSpot"); + this.wa.childPortSpot.N(a) || (this.wa.childPortSpot = a, this.I()) + }); + z.defineProperty(Y, { + aK: "alternateSorting" + }, function() { + return this.ya.sorting + }, function(a) { + this.ya.sorting !== a && (z.Ba(a, Y, Y, "alternateSorting"), a === Ps || a === Qs || a === Rs || Ss) && (this.ya.sorting = a, this.I()) + }); + z.defineProperty(Y, { + PJ: "alternateComparer" + }, function() { + return this.ya.comparer + }, function(a) { + this.ya.comparer !== a && (z.g(a, "function", Y, "alternateComparer"), this.ya.comparer = a, this.I()) + }); + z.defineProperty(Y, { + JJ: "alternateAngle" + }, function() { + return this.ya.angle + }, function(a) { + this.ya.angle !== a && (z.g(a, "number", Y, "alternateAngle"), 0 === a || 90 === a || 180 === a || 270 === a) && (this.ya.angle = a, this.I()) + }); + z.defineProperty(Y, { + IJ: "alternateAlignment" + }, function() { + return this.ya.alignment + }, function(a) { + this.ya.alignment !== a && (z.Ba(a, Y, Y, "alternateAlignment"), this.ya.alignment = a, this.I()) + }); + z.defineProperty(Y, { + TJ: "alternateNodeIndent" + }, function() { + return this.ya.nodeIndent + }, function(a) { + this.ya.nodeIndent !== a && (z.g(a, "number", Y, "alternateNodeIndent"), 0 <= a && (this.ya.nodeIndent = a, this.I())) + }); + z.defineProperty(Y, { + UJ: "alternateNodeIndentPastParent" + }, function() { + return this.ya.nodeIndentPastParent + }, function(a) { + this.ya.nodeIndentPastParent !== a && (z.g(a, "number", Y, "alternateNodeIndentPastParent"), 0 <= a && 1 >= a && (this.ya.nodeIndentPastParent = a, this.I())) + }); + z.defineProperty(Y, { + VJ: "alternateNodeSpacing" + }, function() { + return this.ya.nodeSpacing + }, function(a) { + this.ya.nodeSpacing !== a && (z.g(a, "number", Y, "alternateNodeSpacing"), this.ya.nodeSpacing = a, this.I()) + }); + z.defineProperty(Y, { + RJ: "alternateLayerSpacing" + }, function() { + return this.ya.layerSpacing + }, function(a) { + this.ya.layerSpacing !== a && (z.g(a, "number", Y, "alternateLayerSpacing"), this.ya.layerSpacing = a, this.I()) + }); + z.defineProperty(Y, { + SJ: "alternateLayerSpacingParentOverlap" + }, function() { + return this.ya.layerSpacingParentOverlap + }, function(a) { + this.ya.layerSpacingParentOverlap !== a && (z.g(a, "number", Y, "alternateLayerSpacingParentOverlap"), 0 <= a && 1 >= a && (this.ya.layerSpacingParentOverlap = a, this.I())) + }); + z.defineProperty(Y, { + OJ: "alternateCompaction" + }, function() { + return this.ya.compaction + }, function(a) { + this.ya.compaction !== a && (z.Ba(a, Y, Y, "alternateCompaction"), a === $s || a === bt) && (this.ya.compaction = a, this.I()) + }); + z.defineProperty(Y, { + KJ: "alternateBreadthLimit" + }, function() { + return this.ya.breadthLimit + }, function(a) { + this.ya.breadthLimit !== a && (z.g(a, "number", Y, "alternateBreadthLimit"), 0 <= a && (this.ya.breadthLimit = a, this.I())) + }); + z.defineProperty(Y, { + YJ: "alternateRowSpacing" + }, function() { + return this.ya.rowSpacing + }, function(a) { + this.ya.rowSpacing !== a && (z.g(a, "number", Y, "alternateRowSpacing"), this.ya.rowSpacing = a, this.I()) + }); + z.defineProperty(Y, { + XJ: "alternateRowIndent" + }, function() { + return this.ya.rowIndent + }, function(a) { + this.ya.rowIndent !== a && (z.g(a, "number", Y, "alternateRowIndent"), 0 <= a && (this.ya.rowIndent = a, this.I())) + }); + z.defineProperty(Y, { + NJ: "alternateCommentSpacing" + }, function() { + return this.ya.commentSpacing + }, function(a) { + this.ya.commentSpacing !== a && (z.g(a, "number", Y, "alternateCommentSpacing"), this.ya.commentSpacing = a, this.I()) + }); + z.defineProperty(Y, { + MJ: "alternateCommentMargin" + }, function() { + return this.ya.commentMargin + }, function(a) { + this.ya.commentMargin !== a && (z.g(a, "number", Y, "alternateCommentMargin"), this.ya.commentMargin = a, this.I()) + }); + z.defineProperty(Y, { + $J: "alternateSetsPortSpot" + }, function() { + return this.ya.setsPortSpot + }, function(a) { + this.ya.setsPortSpot !== a && (z.g(a, "boolean", Y, "alternateSetsPortSpot"), this.ya.setsPortSpot = a, this.I()) + }); + z.defineProperty(Y, { + WJ: "alternatePortSpot" + }, function() { + return this.ya.portSpot + }, function(a) { + z.l(a, Q, Y, "alternatePortSpot"); + this.ya.portSpot.N(a) || (this.ya.portSpot = a, this.I()) + }); + z.defineProperty(Y, { + ZJ: "alternateSetsChildPortSpot" + }, function() { + return this.ya.setsChildPortSpot + }, function(a) { + this.ya.setsChildPortSpot !== a && (z.g(a, "boolean", Y, "alternateSetsChildPortSpot"), this.ya.setsChildPortSpot = a, this.I()) + }); + z.defineProperty(Y, { + LJ: "alternateChildPortSpot" + }, function() { + return this.ya.childPortSpot + }, function(a) { + z.l(a, Q, Y, "alternateChildPortSpot"); + this.ya.childPortSpot.N(a) || (this.ya.childPortSpot = a, this.I()) + }); + var us; + Y.PathDefault = us = z.s(Y, "PathDefault", -1); + var vs; + Y.PathDestination = vs = z.s(Y, "PathDestination", 0); + var Cs; + Y.PathSource = Cs = z.s(Y, "PathSource", 1); + var Ps; + Y.SortingForwards = Ps = z.s(Y, "SortingForwards", 10); + var Qs; + Y.SortingReverse = Qs = z.s(Y, "SortingReverse", 11); + var Rs; + Y.SortingAscending = Rs = z.s(Y, "SortingAscending", 12); + var Ss; + Y.SortingDescending = Ss = z.s(Y, "SortingDescending", 13); + var ut; + Y.AlignmentCenterSubtrees = ut = z.s(Y, "AlignmentCenterSubtrees", 20); + var Ts; + Y.AlignmentCenterChildren = Ts = z.s(Y, "AlignmentCenterChildren", 21); + var dt; + Y.AlignmentStart = dt = z.s(Y, "AlignmentStart", 22); + var et; + Y.AlignmentEnd = et = z.s(Y, "AlignmentEnd", 23); + var Vs; + Y.AlignmentBus = Vs = z.s(Y, "AlignmentBus", 24); + var Ks; + Y.AlignmentBusBranching = Ks = z.s(Y, "AlignmentBusBranching", 25); + var Ws; + Y.AlignmentTopLeftBus = Ws = z.s(Y, "AlignmentTopLeftBus", 26); + var Xs; + Y.AlignmentBottomRightBus = Xs = z.s(Y, "AlignmentBottomRightBus", 27); + var $s; + Y.CompactionNone = $s = z.s(Y, "CompactionNone", 30); + var bt; + Y.CompactionBlock = bt = z.s(Y, "CompactionBlock", 31); + var ws; + Y.StyleLayered = ws = z.s(Y, "StyleLayered", 40); + var Os; + Y.StyleLastParents = Os = z.s(Y, "StyleLastParents", 41); + var Ns; + Y.StyleAlternating = Ns = z.s(Y, "StyleAlternating", 42); + var Ms; + Y.StyleRootOnly = Ms = z.s(Y, "StyleRootOnly", 43); + var ys; + Y.ArrangementVertical = ys = z.s(Y, "ArrangementVertical", 50); + var Dt; + Y.ArrangementHorizontal = Dt = z.s(Y, "ArrangementHorizontal", 51); + var Bs; + Y.ArrangementFixedRoots = Bs = z.s(Y, "ArrangementFixedRoots", 52); + var xs; + Y.LayerIndividual = xs = z.s(Y, "LayerIndividual", 60); + var Is; + Y.LayerSiblings = Is = z.s(Y, "LayerSiblings", 61); + var Hs; + Y.LayerUniform = Hs = z.s(Y, "LayerUniform", 62); + + function As() { + wa.call(this) + } + z.Qa(As, wa); + z.ia("TreeNetwork", As); + As.prototype.createVertex = function() { + return new zs + }; + As.prototype.createEdge = function() { + return new Ft + }; + + function zs() { + xa.call(this); + this.initialized = !1; + this.parent = null; + this.children = []; + this.maxGenerationCount = this.maxChildrenCount = this.descendantCount = this.level = 0; + this.comments = null; + this.qa = new N(0, 0); + this.ob = new Ea(0, 0); + this.Ta = new N(0, 0); + this.Xp = this.Wp = this.dJ = !1; + this.mu = this.Vt = null; + this.sorting = Ps; + this.comparer = Aq; + this.angle = 0; + this.alignment = Ts; + this.nodeIndentPastParent = this.nodeIndent = 0; + this.nodeSpacing = 20; + this.layerSpacing = 50; + this.layerSpacingParentOverlap = 0; + this.compaction = bt; + this.breadthLimit = + 0; + this.rowSpacing = 25; + this.commentSpacing = this.rowIndent = 10; + this.commentMargin = 20; + this.setsPortSpot = !0; + this.portSpot = Pc; + this.setsChildPortSpot = !0; + this.childPortSpot = Pc + } + z.Qa(zs, xa); + z.ia("TreeVertex", zs); + zs.prototype.copyInheritedPropertiesFrom = function(a) { + null !== a && (this.sorting = a.sorting, this.comparer = a.comparer, this.angle = a.angle, this.alignment = a.alignment, this.nodeIndent = a.nodeIndent, this.nodeIndentPastParent = a.nodeIndentPastParent, this.nodeSpacing = a.nodeSpacing, this.layerSpacing = a.layerSpacing, this.layerSpacingParentOverlap = a.layerSpacingParentOverlap, this.compaction = a.compaction, this.breadthLimit = a.breadthLimit, this.rowSpacing = a.rowSpacing, this.rowIndent = a.rowIndent, this.commentSpacing = a.commentSpacing, + this.commentMargin = a.commentMargin, this.setsPortSpot = a.setsPortSpot, this.portSpot = a.portSpot, this.setsChildPortSpot = a.setsChildPortSpot, this.childPortSpot = a.childPortSpot) + }; + z.w(zs, { + Wm: "childrenCount" + }, function() { + return this.children.length + }); + z.defineProperty(zs, { + pL: "relativePosition" + }, function() { + return this.qa + }, function(a) { + this.qa.set(a) + }); + z.defineProperty(zs, { + BL: "subtreeSize" + }, function() { + return this.ob + }, function(a) { + this.ob.set(a) + }); + z.defineProperty(zs, { + AL: "subtreeOffset" + }, function() { + return this.Ta + }, function(a) { + this.Ta.set(a) + }); + + function Ft() { + ya.call(this); + this.ls = new N(0, 0) + } + z.Qa(Ft, ya); + z.ia("TreeEdge", Ft); + Ft.prototype.commit = function() { + var a = this.link; + if (null !== a && !a.jj) { + var b = this.network.Sb, + c = null, + d = null; + switch (b.Of) { + case vs: + c = this.fromVertex; + d = this.toVertex; + break; + case Cs: + c = this.toVertex; + d = this.fromVertex; + break; + default: + z.k("Unhandled path value " + b.Of.toString()) + } + if (null !== c && null !== d) + if (b = this.ls, 0 !== b.x || 0 !== b.y || c.dJ) { + var d = c.vb, + e = ct(c), + g = ft(c), + h = c.rowSpacing; + a.Bn(); + var k = a.Se === Ui, + l = a.rc, + m = 0, + n, p; + a.Ul(); + if (l || k) { + for (m = 2; 4 < a.sa;) a.oF(2); + n = a.m(1); + p = a.m(2) + } else { + for (m = 1; 3 < a.sa;) a.oF(1); + n = a.m(0); + p = + a.m(a.sa - 1) + } + var q = a.m(a.sa - 1), + r = 0; + 0 === e ? (c.alignment === et ? (r = d.bottom + b.y, 0 === b.y && n.y > q.y + c.rowIndent && (r = Math.min(r, Math.max(n.y, r - gt(c))))) : c.alignment === dt ? (r = d.top + b.y, 0 === b.y && n.y < q.y - c.rowIndent && (r = Math.max(r, Math.min(n.y, r + gt(c))))) : r = c.Wp || c.Xp && 1 === c.maxGenerationCount ? d.top - c.Ta.y + b.y : d.y + d.height / 2 + b.y, k ? (a.B(m, n.x, r), m++, a.B(m, d.right + g, r), m++, a.B(m, d.right + g + (b.x - h) / 3, r), m++, a.B(m, d.right + g + 2 * (b.x - h) / 3, r), m++, a.B(m, d.right + g + (b.x - h), r), m++, a.B(m, p.x, r)) : (l && (a.B(m, d.right + g / 2, n.y), + m++), a.B(m, d.right + g / 2, r), m++, a.B(m, d.right + g + b.x - (l ? h / 2 : h), r), m++, l && a.B(m, a.m(m - 1).x, p.y))) : 90 === e ? (c.alignment === et ? (r = d.right + b.x, 0 === b.x && n.x > q.x + c.rowIndent && (r = Math.min(r, Math.max(n.x, r - gt(c))))) : c.alignment === dt ? (r = d.left + b.x, 0 === b.x && n.x < q.x - c.rowIndent && (r = Math.max(r, Math.min(n.x, r + gt(c))))) : r = c.Wp || c.Xp && 1 === c.maxGenerationCount ? d.left - c.Ta.x + b.x : d.x + d.width / 2 + b.x, k ? (a.B(m, r, n.y), m++, a.B(m, r, d.bottom + g), m++, a.B(m, r, d.bottom + g + (b.y - h) / 3), m++, a.B(m, r, d.bottom + g + 2 * (b.y - h) / 3), m++, a.B(m, r, d.bottom + + g + (b.y - h)), m++, a.B(m, r, p.y)) : (l && (a.B(m, n.x, d.bottom + g / 2), m++), a.B(m, r, d.bottom + g / 2), m++, a.B(m, r, d.bottom + g + b.y - (l ? h / 2 : h)), m++, l && a.B(m, p.x, a.m(m - 1).y))) : 180 === e ? (c.alignment === et ? (r = d.bottom + b.y, 0 === b.y && n.y > q.y + c.rowIndent && (r = Math.min(r, Math.max(n.y, r - gt(c))))) : c.alignment === dt ? (r = d.top + b.y, 0 === b.y && n.y < q.y - c.rowIndent && (r = Math.max(r, Math.min(n.y, r + gt(c))))) : r = c.Wp || c.Xp && 1 === c.maxGenerationCount ? d.top - c.Ta.y + b.y : d.y + d.height / 2 + b.y, k ? (a.B(m, n.x, r), m++, a.B(m, d.left - g, r), m++, a.B(m, d.left - g + (b.x + + h) / 3, r), m++, a.B(m, d.left - g + 2 * (b.x + h) / 3, r), m++, a.B(m, d.left - g + (b.x + h), r), m++, a.B(m, p.x, r)) : (l && (a.B(m, d.left - g / 2, n.y), m++), a.B(m, d.left - g / 2, r), m++, a.B(m, d.left - g + b.x + (l ? h / 2 : h), r), m++, l && a.B(m, a.m(m - 1).x, p.y))) : 270 === e ? (c.alignment === et ? (r = d.right + b.x, 0 === b.x && n.x > q.x + c.rowIndent && (r = Math.min(r, Math.max(n.x, r - gt(c))))) : c.alignment === dt ? (r = d.left + b.x, 0 === b.x && n.x < q.x - c.rowIndent && (r = Math.max(r, Math.min(n.x, r + gt(c))))) : r = c.Wp || c.Xp && 1 === c.maxGenerationCount ? d.left - c.Ta.x + b.x : d.x + d.width / 2 + b.x, k ? (a.B(m, + r, n.y), m++, a.B(m, r, d.top - g), m++, a.B(m, r, d.top - g + (b.y + h) / 3), m++, a.B(m, r, d.top - g + 2 * (b.y + h) / 3), m++, a.B(m, r, d.top - g + (b.y + h)), m++, a.B(m, r, p.y)) : (l && (a.B(m, n.x, d.top - g / 2), m++), a.B(m, r, d.top - g / 2), m++, a.B(m, r, d.top - g + b.y + (l ? h / 2 : h)), m++, l && a.B(m, p.x, a.m(m - 1).y))) : z.k("Invalid angle " + e); + a.cj() + } else e = c, g = d, u && z.l(e, zs, Ft, "adjustRouteForAngleChange:parent"), u && z.l(g, zs, Ft, "adjustRouteForAngleChange:child"), a = this.link, c = ct(e), c !== ct(g) && (b = ft(e), d = e.vb, e = g.vb, 0 === c && e.left - d.right < b + 1 || 90 === c && e.top - d.bottom < + b + 1 || 180 === c && d.left - e.right < b + 1 || 270 === c && d.top - e.bottom < b + 1 || (a.Bn(), e = a.Se === Ui, g = a.rc, h = Us(this.fromVertex.alignment), a.Ul(), 0 === c ? (c = d.right + b / 2, e ? 4 === a.sa && (b = a.m(3).y, a.aa(1, c - 20, a.m(1).y), a.B(2, c - 20, b), a.B(3, c, b), a.B(4, c + 20, b), a.aa(5, a.m(5).x, b)) : g ? h ? a.aa(3, a.m(2).x, a.m(4).y) : 6 === a.sa && (a.aa(2, c, a.m(2).y), a.aa(3, c, a.m(3).y)) : 4 === a.sa ? a.B(2, c, a.m(2).y) : 3 === a.sa ? a.aa(1, c, a.m(2).y) : 2 === a.sa && a.B(1, c, a.m(1).y)) : 90 === c ? (b = d.bottom + b / 2, e ? 4 === a.sa && (c = a.m(3).x, a.aa(1, a.m(1).x, b - 20), a.B(2, c, b - 20), + a.B(3, c, b), a.B(4, c, b + 20), a.aa(5, c, a.m(5).y)) : g ? h ? a.aa(3, a.m(2).x, a.m(4).y) : 6 === a.sa && (a.aa(2, a.m(2).x, b), a.aa(3, a.m(3).x, b)) : 4 === a.sa ? a.B(2, a.m(2).x, b) : 3 === a.sa ? a.aa(1, a.m(2).x, b) : 2 === a.sa && a.B(1, a.m(1).x, b)) : 180 === c ? (c = d.left - b / 2, e ? 4 === a.sa && (b = a.m(3).y, a.aa(1, c + 20, a.m(1).y), a.B(2, c + 20, b), a.B(3, c, b), a.B(4, c - 20, b), a.aa(5, a.m(5).x, b)) : g ? h ? a.aa(3, a.m(2).x, a.m(4).y) : 6 === a.sa && (a.aa(2, c, a.m(2).y), a.aa(3, c, a.m(3).y)) : 4 === a.sa ? a.B(2, c, a.m(2).y) : 3 === a.sa ? a.aa(1, c, a.m(2).y) : 2 === a.sa && a.B(1, c, a.m(1).y)) : 270 === + c && (b = d.top - b / 2, e ? 4 === a.sa && (c = a.m(3).x, a.aa(1, a.m(1).x, b + 20), a.B(2, c, b + 20), a.B(3, c, b), a.B(4, c, b - 20), a.aa(5, c, a.m(5).y)) : g ? h ? a.aa(3, a.m(2).x, a.m(4).y) : 6 === a.sa && (a.aa(2, a.m(2).x, b), a.aa(3, a.m(3).x, b)) : 4 === a.sa ? a.B(2, a.m(2).x, b) : 3 === a.sa ? a.aa(1, a.m(2).x, b) : 2 === a.sa && a.B(1, a.m(1).x, b)), a.cj())) + } + }; + z.defineProperty(Ft, { + oL: "relativePoint" + }, function() { + return this.ls + }, function(a) { + this.ls.set(a) + }); + + function Gt() { + O.call(this); + this.$e = null + } + z.Qa(Gt, O); + Gt.prototype.cloneProtected = function(a) { + O.prototype.cloneProtected.call(this, a); + a.element = this.$e.cloneNode(!0) + }; + Gt.prototype.toString = function() { + return "HTMLHost(" + this.$e.toString() + ")#" + z.nd(this) + }; + Gt.prototype.nk = function(a, b) { + var c = this.$e; + if (null !== c) { + var d = this.fb(ec); + d.x -= this.W.width / 2; + d.y -= this.W.height / 2; + d.x -= this.W.x; + d.y -= this.W.y; + var d = b.aB(d), + e = b.Dl; + null === e || e.contains(c) || e.appendChild(c); + e = this.transform; + c.style.transform = "matrix(" + e.m11 + "," + e.m12 + "," + e.m21 + "," + e.m22 + "," + e.dx + "," + e.dy + ")"; + c.style.transformOrigin = "0 0"; + e = d.y; + c.style.left = d.x + "px"; + c.style.top = e + "px" + } + }; + Gt.prototype.Ip = function(a, b, c, d) { + var e = this.Aa; + isFinite(e.width) && (a = e.width); + isFinite(e.height) && (b = e.height); + var e = this.Xe, + g = this.cg; + c = Math.max(c, g.width); + d = Math.max(d, g.height); + a = Math.min(e.width, a); + b = Math.min(e.height, b); + a = Math.max(c, a); + b = Math.max(d, b); + c = this.$e; + null !== c && (b = c.getBoundingClientRect(), a = b.width, b = b.height); + yb(this.Wc, a, b); + Jm(this, 0, 0, a, b) + }; + Gt.prototype.$i = function(a, b, c, d) { + Nm(this, a, b, c, d) + }; + z.w(Gt, { + Ga: "naturalBounds" + }, function() { + return this.Wc + }); + z.defineProperty(Gt, { + element: "element" + }, function() { + return this.$e + }, function(a) { + var b = this.$e; + b !== a && (a instanceof HTMLElement || z.k("HTMLHost.element must be an instance of HTMLElement."), this.$e = a, a.className = "HTMLHost", this.j("element", b, a), this.ta()) + }); + aa.version = "1.6.18"; + window && (window.module && "object" === typeof window.module && "object" === typeof window.module.exports ? window.module.exports = aa : window.define && "function" === typeof window.define && window.define.amd ? (window.go = aa, window.define(aa)) : window.go = aa); + "undefined" !== typeof module && "object" === typeof module.exports && (module.exports = aa); +})(window); \ No newline at end of file diff --git a/node_modules/jibo-sdk/resources/externals/go.js b/node_modules/jibo-sdk/resources/externals/go.js new file mode 100644 index 0000000..e028590 --- /dev/null +++ b/node_modules/jibo-sdk/resources/externals/go.js @@ -0,0 +1,1983 @@ +/* + * GoJS v1.6.18 JavaScript Library for HTML Diagrams + * Northwoods Software, https://www.nwoods.com/ + * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. + * Copyright (C) 1998-2016 by Northwoods Software Corporation. All Rights Reserved. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.6.18/doc/license.html. + */ +(function(window) { var g,ea={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); +Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b}); +(function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=a.length?a.push(c):a.splice(b,0,c):v.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Th:function(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):v.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Ax:[],L:function(){var a=v.Ax.pop();return void 0===a?new z:a},Mb:function(a,b){var c=v.Ax.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){v.Ax.push(a)}, +LA:[],Fl:function(){var a=v.LA.pop();return void 0===a?new ia:a},Zj:function(a){v.LA.push(a)},Bx:[],$f:function(){var a=v.Bx.pop();return void 0===a?new B:a},gk:function(a,b,c,d){var e=v.Bx.pop();if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Vb:function(a){v.Bx.push(a)},MA:[],ph:function(){var a=v.MA.pop();return void 0===a?new ja:a},$e:function(a){v.MA.push(a)},Cx:null,s:function(){var a=v.Cx;return null!==a?(v.Cx=null,a):new ma},q:function(a){a.reset();v.Cx=a},KA:[], +jb:function(){var a=v.KA.pop();return void 0===a?[]:a},sa:function(a){a.length=0;v.KA.push(a)},gj:Object.freeze([]),Jl:1,dc:function(a){a.__gohashid=v.Jl++},ot:function(a){var b=a.__gohashid;void 0===b&&(b=v.Jl++,a.__gohashid=b);return b},ld:function(a){return a.__gohashid},ea:function(a,b){b.Lx=a;ea[a]=b},Ja:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Uh:function(a){a.RF=!0},defineProperty:function(a,b,c,d,e){v.j(a,"function","Util.defineProperty:classfunc"); +v.j(b,"object","Util.defineProperty:propobj");v.j(c,"function","Util.defineProperty:getter");v.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d,enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},XI:!1,u:function(a,b,c,d){v.j(a,"function","Util.defineReadOnlyProperty:classfunc");v.j(b,"object","Util.defineReadOnlyProperty:propobj"); +v.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){v.k('The property "'+f+'" is read-only and cannot be set to '+a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}},Kd:function(a,b){for(var c in b)b[c]=!0;a.prototype.NF=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"=== +typeof a?v.af(a):null===a?"*":""},af:function(a){if("function"===typeof a){if(a.Lx)return a.Lx;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.Lx=b}else if("object"===typeof a&&a.constructor)return v.af(a.constructor);return typeof a},p:function(a,b,c){v.j(a,"function","Util.defineEnumValue:classfunc");v.j(b,"string","Util.defineEnumValue:name");v.j(c,"number","Util.defineEnumValue:num");c=new fa(a,b,c);Object.freeze(c);a[b]=c;var d=a.ku;d instanceof +na||(d=new na("string",fa),a.ku=d);d.add(b,c);return c},qb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},Ka:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}},Xt:function(a,b){v.j(a,"object","Setting properties requires Objects as arguments");v.j(b,"object","Setting properties requires Objects as arguments"); +var c=a instanceof D,d=a instanceof E,e;for(e in b){""===e&&v.k("Setting properties requires non-empty property names");var f=a,h=e;if(c||d){var k=e.indexOf(".");if(0c;c++)b[c]=c;for(var d= +0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[v.tg("7ca11abfd7330390")](v.tg(c[d-1]),10,15*d+0);b[v.tg("7ca11abfd022028846")]=v.tg("39f046ebb36e4b");for(d=1;5>d;d++)b[v.tg("7ca11abfd7330390")](v.tg(c[d- +1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])v.p=function(a,b){var c=new fa(a,b,2);Object.freeze(c);a[b]=c;var d=a.ku;d instanceof na||(d=new na("string",fa),a.ku=d);d.add(b,c);return c};return a}();function fa(a,b,c){v.dc(this);this.ZA=a;this.Ob=b;this.WF=c}v.ea("EnumValue",fa);fa.prototype.toString=function(){return v.af(this.ZA)+"."+this.Ob};v.u(fa,{pe:"classType"},function(){return this.ZA});v.u(fa,{name:"name"},function(){return this.Ob});v.u(fa,{value:"value"},function(){return this.WF}); +var ra;fa.findName=ra=function(a,b){if(void 0===b||null===b||""===b)return null;v.j(a,"function","findName:classfunc");v.j(b,"string","EnumValue.findName:name");var c=a.ku;return c instanceof na?c.ja(b):null};function sa(){this.XA=[]}sa.prototype.toString=function(){return this.XA.join("")};sa.prototype.add=function(a){""!==a&&this.XA.push(a)};function ta(){} +function va(a){void 0===a&&(a=42);this.seed=a;this.wx=48271;this.ju=2147483647;this.JA=this.ju/this.wx;this.zF=this.ju%this.wx;this.yF=1/this.ju;this.random()}va.prototype.random=function(){var a=this.seed%this.JA*this.wx-this.seed/this.JA*this.zF;this.seed=0this.key)return!1;v.La(a)}var a=a.n,b=a.length,c=++this.Oc,d=this.Gh;if(null!==d)for(;cthis.key)return!1;v.La(a)}var b=--this.Oc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Cf();return!1};Ba.prototype.first=Ba.prototype.first=function(){var a=this.tc;this.eb=a.F;var b=a.n;this.Oc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null}; +Ba.prototype.any=function(a){var b=this.tc;b.vj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.F!==c&&v.La(b)}return!1};Ba.prototype.all=function(a){var b=this.tc;b.vj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.F!==c&&v.La(b)}return!0};Ba.prototype.each=function(a){var b=this.tc;b.vj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--)a(d[e]),b.F!==c&&v.La(b);return this}; +Ba.prototype.map=function(a){var b=this.tc;b.vj=null;var c=b.F,d=[],e=b.n,f=e.length;this.Oc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.F!==c&&v.La(b);a=new I;a.n=d;a.Bc();return a.i};Ba.prototype.filter=function(a){var b=this.tc;b.vj=null;var c=b.F,d=[],e=b.n,f=e.length;this.Oc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.F!==c&&v.La(b)}a=new I(b.ia);a.n=d;a.Bc();return a.i};Ba.prototype.concat=function(a){this.tc.vj=null;return new za(this,a.i)};v.u(Ba,{count:"count"},function(){return this.tc.n.length}); +Ba.prototype.Cf=function(){this.key=-1;this.value=null;this.eb=-1;this.tc.vj=this};Ba.prototype.toString=function(){return"ListIteratorBackwards("+this.Oc+"/"+this.tc.count+")"}; +function I(a){v.dc(this);this.D=!1;this.n=[];this.F=0;this.vj=this.Xb=null;void 0===a||null===a?this.ia=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ia=a:v.va(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ia=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:v.va(a,"null, a primitive type name, or a class type", +"List constructor: type")}v.ea("List",I);I.prototype.Bc=function(){var a=this.F;a++;999999999a||a>=b.length)&&v.va(a,"0 <= i < length",I,"elt:i");return b[a]};I.prototype.setElt=I.prototype.set=I.prototype.Hg=function(a,b){var c=this.n;(0>a||a>=c.length)&&v.va(a,"0 <= i < length",I,"setElt:i");this.D&&v.ka(this,a);c[a]=b};I.prototype.first=I.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]}; +I.prototype.last=I.prototype.Qd=function(){var a=this.n,b=a.length;return 0a&&v.va(a,">= 0",I,"insertAt:i");this.D&&v.ka(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Bc();return!0};I.prototype.remove=I.prototype["delete"]=I.prototype.remove=function(a){if(null===a)return!1;this.D&&v.ka(this,a);var b=this.n;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Bc();return!0}; +I.prototype.removeAt=I.prototype.Vc=function(a){var b=this.n;(0>a||a>=b.length)&&v.va(a,"0 <= i < length",I,"removeAt:i");this.D&&v.ka(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Bc()};I.prototype.removeRange=I.prototype.removeRange=function(a,b){var c=this.n;(0>a||a>=c.length)&&v.va(a,"0 <= from < length",I,"elt:from");(0>b||b>=c.length)&&v.va(b,"0 <= to < length",I,"elt:to");this.D&&v.ka(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.Bc()}; +I.prototype.copy=function(){var a=new I(this.ia),b=this.n;0=f)return this;(0>b||b>=e-1)&&v.va(b,"0 <= from < length",I,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(f=d.slice(0,c),f.sort(a),a=0;a=e)for(f=d.slice(b),f.sort(a),a=b;a=this.n.length)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Aa(this)}); +v.u(I,{Sm:"iteratorBackwards"},function(){if(0>=this.n.length)return xa;var a=this.vj;return null!==a?(a.reset(),a):new Ba(this)});function Da(a){this.Ih=a;this.reset()}v.Kd(Da,{key:!0,value:!0});v.u(Da,{i:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){var a=this.Ih;a.Xb=null;this.eb=a.F;this.cb=null}; +Da.prototype.next=Da.prototype.hasNext=Da.prototype.next=function(){var a=this.Ih;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.value=b.value,this.key=b.key,!0;this.Cf();return!1};Da.prototype.first=Da.prototype.first=function(){var a=this.Ih;this.eb=a.F;a=a.Da;if(null!==a){this.cb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +Da.prototype.any=function(a){var b=this.Ih;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d.value))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};Da.prototype.all=function(a){var b=this.Ih;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d.value))return!1;b.F!==c&&v.La(b);d=d.Va}return!0};Da.prototype.each=function(a){var b=this.Ih;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d.value),b.F!==c&&v.La(b),d=d.Va;return this}; +Da.prototype.map=function(a){var b=this.Ih;b.Xb=null;for(var c=new I,d=b.F,e=b.Da;null!==e;)c.add(a(e.value)),b.F!==d&&v.La(b),e=e.Va;return c.i};Da.prototype.filter=function(a){var b=this.Ih;b.Xb=null;for(var c=new I(b.ia),d=b.F,e=b.Da;null!==e;){var f=e.value;a(f)&&c.add(f);b.F!==d&&v.La(b);e=e.Va}return c.i};Da.prototype.concat=function(a){this.Ih.Xb=null;return new za(this,a.i)};v.u(Da,{count:"count"},function(){return this.Ih.fd}); +Da.prototype.Cf=function(){this.value=this.key=null;this.eb=-1;this.Ih.Xb=this};Da.prototype.toString=function(){return null!==this.cb?"SetIterator@"+this.cb.value:"SetIterator"}; +function J(a){v.dc(this);this.D=!1;void 0===a||null===a?this.ia=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ia=a:v.va(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ia=a===Object?"object":a===String?"string":a===Number?"number":a:v.va(a,"null, a primitive type name, or a class type","Set constructor: type");this.gd={};this.fd=0;this.Xb=null;this.F=0;this.Dh=this.Da=null}v.ea("Set",J); +J.prototype.Bc=function(){var a=this.F;a++;999999999=this.fd)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Da(this)});function Ha(a){this.Ga=a;this.reset()}v.Kd(Ha,{key:!0,value:!0});v.u(Ha,{i:"iterator"},function(){return this});Ha.prototype.reset=Ha.prototype.reset=function(){this.eb=this.Ga.F;this.cb=null}; +Ha.prototype.next=Ha.prototype.hasNext=Ha.prototype.next=function(){var a=this.Ga;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.value=this.key=a=b.key,!0;this.Cf();return!1};Ha.prototype.first=Ha.prototype.first=function(){var a=this.Ga;this.eb=a.F;a=a.Da;return null!==a?(this.cb=a,this.value=this.key=a=a.key):null}; +Ha.prototype.any=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d.key))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};Ha.prototype.all=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d.key))return!1;b.F!==c&&v.La(b);d=d.Va}return!0};Ha.prototype.each=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d.key),b.F!==c&&v.La(b),d=d.Va;return this}; +Ha.prototype.map=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)d.add(a(e.key)),b.F!==c&&v.La(b),e=e.Va;return d.i};Ha.prototype.filter=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=new I(b.ui),e=b.Da;null!==e;){var f=e.key;a(f)&&d.add(f);b.F!==c&&v.La(b);e=e.Va}return d.i};Ha.prototype.concat=function(a){return new za(this,a.i)};v.u(Ha,{count:"count"},function(){return this.Ga.fd});Ha.prototype.Cf=function(){this.value=this.key=null;this.eb=-1}; +Ha.prototype.toString=function(){return null!==this.cb?"MapKeySetIterator@"+this.cb.value:"MapKeySetIterator"};function Ja(a){v.dc(this);this.D=!0;this.Ga=a}v.Ja(Ja,J);Ja.prototype.freeze=function(){return this};Ja.prototype.Oa=function(){return this};Ja.prototype.toString=function(){return"MapKeySet("+this.Ga.toString()+")"};Ja.prototype.add=Ja.prototype.set=Ja.prototype.add=function(){v.k("This Set is read-only: "+this.toString());return!1}; +Ja.prototype.contains=Ja.prototype.has=Ja.prototype.contains=function(a){return this.Ga.contains(a)};Ja.prototype.remove=Ja.prototype["delete"]=Ja.prototype.remove=function(){v.k("This Set is read-only: "+this.toString());return!1};Ja.prototype.clear=Ja.prototype.clear=function(){v.k("This Set is read-only: "+this.toString())};Ja.prototype.first=Ja.prototype.first=function(){var a=this.Ga.Da;return null!==a?a.key:null}; +Ja.prototype.any=function(a){for(var b=this.Ga.Da;null!==b;){if(a(b.key))return!0;b=b.Va}return!1};Ja.prototype.all=function(a){for(var b=this.Ga.Da;null!==b;){if(!a(b.key))return!1;b=b.Va}return!0};Ja.prototype.each=function(a){for(var b=this.Ga.Da;null!==b;)a(b.key),b=b.Va;return this};Ja.prototype.map=function(a){for(var b=new J,c=this.Ga.Da;null!==c;)b.add(a(c.key)),c=c.Va;return b}; +Ja.prototype.filter=function(a){for(var b=new J(this.Ga.ui),c=this.Ga.Da;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Va}return b};Ja.prototype.concat=function(a){return this.iF().Tc(a)};Ja.prototype.copy=function(){return new Ja(this.Ga)};Ja.prototype.toSet=Ja.prototype.iF=function(){var a=new J(this.Ga.ui),b=this.Ga.gd,c;for(c in b)a.add(b[c].key);return a};Ja.prototype.toArray=Ja.prototype.cc=function(){var a=this.Ga.gd,b=Array(this.Ga.fd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; +Ja.prototype.toList=function(){var a=new I(this.ia),b=this.Ga.gd,c;for(c in b)a.add(b[c].key);return a};v.u(Ja,{count:"count"},function(){return this.Ga.fd});v.u(Ja,{size:"size"},function(){return this.Ga.fd});v.u(Ja,{i:"iterator"},function(){return 0>=this.Ga.fd?xa:new Ha(this.Ga)});function La(a){this.Ga=a;this.reset()}v.Kd(La,{key:!0,value:!0});v.u(La,{i:"iterator"},function(){return this});La.prototype.reset=La.prototype.reset=function(){var a=this.Ga;a.wj=null;this.eb=a.F;this.cb=null}; +La.prototype.next=La.prototype.hasNext=La.prototype.next=function(){var a=this.Ga;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.value=b.value,this.key=b.key,!0;this.Cf();return!1};La.prototype.first=La.prototype.first=function(){var a=this.Ga;this.eb=a.F;a=a.Da;if(null!==a){this.cb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +La.prototype.any=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d.value))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};La.prototype.all=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d.value))return!1;b.F!==c&&v.La(b);d=d.Va}return!0};La.prototype.each=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d.value),b.F!==c&&v.La(b),d=d.Va;return this}; +La.prototype.map=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)d.add(a(e.value)),b.F!==c&&v.La(b),e=e.Va;return d.i};La.prototype.filter=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=new I(b.ui),e=b.Da;null!==e;){var f=e.value;a(f)&&d.add(f);b.F!==c&&v.La(b);e=e.Va}return d.i};La.prototype.concat=function(a){this.Ga.wj=null;return new za(this,a.i)};v.u(La,{count:"count"},function(){return this.Ga.fd}); +La.prototype.Cf=function(){this.value=this.key=null;this.eb=-1;this.Ga.wj=this};La.prototype.toString=function(){return null!==this.cb?"MapValueSetIterator@"+this.cb.value:"MapValueSetIterator"};function Ea(a,b){this.key=a;this.value=b;this.mo=this.Va=null}v.Kd(Ea,{key:!0,value:!0});Ea.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function Ma(a){this.Ga=a;this.reset()}v.Kd(Ma,{key:!0,value:!0});v.u(Ma,{i:"iterator"},function(){return this}); +Ma.prototype.reset=Ma.prototype.reset=function(){var a=this.Ga;a.Xb=null;this.eb=a.F;this.cb=null};Ma.prototype.next=Ma.prototype.hasNext=Ma.prototype.next=function(){var a=this.Ga;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.key=b.key,this.value=b.value,!0;this.Cf();return!1}; +Ma.prototype.first=Ma.prototype.first=function(){var a=this.Ga;this.eb=a.F;a=a.Da;return null!==a?(this.cb=a,this.key=a.key,this.value=a.value,a):null};Ma.prototype.any=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};Ma.prototype.all=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d))return!1;b.F!==c&&v.La(b);d=d.Va}return!0}; +Ma.prototype.each=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d),b.F!==c&&v.La(b),d=d.Va;return this};Ma.prototype.map=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)d.add(a(e)),b.F!==c&&v.La(b),e=e.Va;return d.i};Ma.prototype.filter=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)a(e)&&d.add(e),b.F!==c&&v.La(b),e=e.Va;return d.i}; +Ma.prototype.concat=function(a){this.Ga.Xb=null;return new za(this,a.i)};v.u(Ma,{count:"count"},function(){return this.Ga.fd});Ma.prototype.Cf=function(){this.value=this.key=null;this.eb=-1;this.Ga.Xb=this};Ma.prototype.toString=function(){return null!==this.cb?"MapIterator@"+this.cb:"MapIterator"}; +function na(a,b){v.dc(this);this.D=!1;void 0===a||null===a?this.ui=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ui=a:v.va(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.ui=a===Object?"object":a===String?"string":a===Number?"number":a:v.va(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Hs=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== +b||"function"===b?this.Hs=b:v.va(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Hs=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:v.va(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.gd={};this.fd=0;this.wj=this.Xb=null;this.F=0;this.Dh=this.Da=null}v.ea("Map",na); +na.prototype.Bc=function(){var a=this.F;a++;999999999=this.count)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Ma(this)});v.u(na,{oE:"iteratorKeys"},function(){return 0>=this.count?xa:new Ha(this)});v.u(na,{pE:"iteratorValues"},function(){if(0>=this.count)return xa;var a=this.wj;return null!==a?(a.reset(),a):new La(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b);this.D=!1}v.ea("Point",z);v.Uh(z);v.Kd(z,{x:!0,y:!0});z.prototype.assign=function(a){this.x=a.x;this.y=a.y}; +z.prototype.setTo=z.prototype.m=function(a,b){this.x=a;this.y=b;return this};z.prototype.set=z.prototype.set=function(a){this.Cb();this.x=a.x;this.y=a.y;return this};z.prototype.copy=function(){var a=new z;a.x=this.x;a.y=this.y;return a};g=z.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this}; +g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};z.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new z(c,e)}return new z}; +z.stringify=function(a){return a instanceof z?a.x.toString()+" "+a.y.toString():a.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.K=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1};z.prototype.equalTo=z.prototype.xw=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Fc=function(a){return K(this.x,a.x)&&K(this.y,a.y)}; +z.prototype.add=z.prototype.add=function(a){this.Cb();this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.du=function(a){this.Cb();this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.Cb();this.x+=a;this.y+=b;return this}; +z.prototype.rotate=z.prototype.rotate=function(a){this.Cb();if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};z.prototype.scale=z.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this}; +z.prototype.distanceSquaredPoint=z.prototype.rf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};z.prototype.distanceSquared=z.prototype.So=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){this.Cb();var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}z.prototype.projectOntoLineSegment=function(a,b,c,d){Oa(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){Oa(a.x,a.y,b.x,b.y,this.x,this.y,this);return this}; +z.prototype.snapToGrid=function(a,b,c,d){Pa(this.x,this.y,a,b,c,d,this);return this};z.prototype.snapToGridPoint=function(a,b){Pa(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Yt=function(a,b){this.Cb();this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.$t=function(a,b,c,d,e){this.Cb();this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this}; +z.prototype.transform=function(a){a.ub(this);return this};function Qa(a,b){b.Wh(a);return a}var Sa;z.distanceLineSegmentSquared=Sa=function(a,b,c,d,e,f){var h=e-c,k=f-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=f-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Ta;z.distanceSquared=Ta=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Va; +z.direction=Va=function(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};z.prototype.isReal=z.prototype.G=function(){return isFinite(this.x)&&isFinite(this.y)};function ia(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b);this.D=!1}v.ea("Size",ia);v.Uh(ia);v.Kd(ia,{width:!0,height:!0}); +ia.prototype.assign=function(a){this.width=a.width;this.height=a.height};ia.prototype.setTo=ia.prototype.m=function(a,b){this.width=a;this.height=b;return this};ia.prototype.set=ia.prototype.set=function(a){this.Cb();this.width=a.width;this.height=a.height;return this};ia.prototype.copy=function(){var a=new ia;a.width=this.width;a.height=this.height;return a};g=ia.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()}; +g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};ia.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new ia(c,e)}return new ia}; +ia.stringify=function(a){return a instanceof ia?a.width.toString()+" "+a.height.toString():a.toString()};ia.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};ia.prototype.equals=ia.prototype.K=function(a){return a instanceof ia?this.width===a.width&&this.height===a.height:!1};ia.prototype.equalTo=ia.prototype.xw=function(a,b){return this.width===a&&this.height===b};ia.prototype.equalsApprox=ia.prototype.Fc=function(a){return K(this.width,a.width)&&K(this.height,a.height)}; +ia.prototype.isReal=ia.prototype.G=function(){return isFinite(this.width)&&isFinite(this.height)}; +function B(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof z?b instanceof z?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof ia?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):v.k("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d);this.D=!1}v.ea("Rect",B);v.Uh(B);v.Kd(B,{x:!0,y:!0,width:!0,height:!0}); +B.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function Wa(a,b,c){a.width=b;a.height=c}B.prototype.setTo=B.prototype.m=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};B.prototype.set=B.prototype.set=function(a){this.Cb();this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};B.prototype.setPoint=B.prototype.zf=function(a){this.Cb();this.x=a.x;this.y=a.y;return this}; +B.prototype.setSize=function(a){this.Cb();this.width=a.width;this.height=a.height;return this};B.prototype.copy=function(){var a=new B;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};g=B.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this}; +g.Cb=function(a){if(this.D){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};B.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new B(c,e,f,h)}return new B}; +B.stringify=function(a){return a instanceof B?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()};B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.K=function(a){return a instanceof B?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};B.prototype.equalTo=B.prototype.xw=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d}; +B.prototype.equalsApprox=B.prototype.Fc=function(a){return K(this.x,a.x)&&K(this.y,a.y)&&K(this.width,a.width)&&K(this.height,a.height)};B.prototype.containsPoint=B.prototype.Fa=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};B.prototype.containsRect=B.prototype.Wj=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height}; +B.prototype.contains=B.prototype.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};B.prototype.reset=function(){this.Cb();this.height=this.width=this.y=this.x=0};B.prototype.offset=B.prototype.offset=function(a,b){this.Cb();this.x+=a;this.y+=b;return this};B.prototype.inflate=B.prototype.Pf=function(a,b){return Xa(this,b,a,b,a)}; +B.prototype.addMargin=B.prototype.fw=function(a){return Xa(this,a.top,a.right,a.bottom,a.left)};B.prototype.subtractMargin=B.prototype.GI=function(a){return Xa(this,-a.top,-a.right,-a.bottom,-a.left)};B.prototype.grow=function(a,b,c,d){return Xa(this,a,b,c,d)};function Xa(a,b,c,d,e){a.Cb();var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}B.prototype.intersectRect=function(a){return Ya(this,a.x,a.y,a.width,a.height)}; +B.prototype.intersect=function(a,b,c,d){return Ya(this,a,b,c,d)};function Ya(a,b,c,d,e){a.Cb();var f=Math.max(a.x,b),h=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=h;a.width=Math.max(0,b-f);a.height=Math.max(0,c-h);return a}B.prototype.intersectsRect=B.prototype.xg=function(a){return this.ZD(a.x,a.y,a.width,a.height)}; +B.prototype.intersects=B.prototype.ZD=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function Za(a,b){var c=a.width,d=b.width+10+10,e=a.x,f=b.x-10;if(e>d+f||f>c+e)return!1;c=a.height;d=b.height+10+10;e=a.y;f=b.y-10;return e>d+f||f>c+e?!1:!0}B.prototype.unionPoint=B.prototype.ej=function(a){return $a(this,a.x,a.y,0,0)}; +B.prototype.unionRect=B.prototype.ai=function(a){return $a(this,a.x,a.y,a.width,a.height)};B.prototype.union=B.prototype.rF=function(a,b,c,d){this.Cb();void 0===c&&(c=0);void 0===d&&(d=0);return $a(this,a,b,c,d)};function $a(a,b,c,d,e){var f=Math.min(a.x,b),h=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=h;a.width=b-f;a.height=c-h;return a} +B.prototype.setSpot=B.prototype.$t=function(a,b,c){this.Cb();this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};var bb;B.contains=bb=function(a,b,c,d,e,f,h,k){void 0===h&&(h=0);void 0===k&&(k=0);return a<=e&&e+h<=a+c&&b<=f&&f+k<=b+d};B.intersects=function(a,b,c,d,e,f,h,k){c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=f;return b>k||f>a?!1:!0};v.defineProperty(B,{left:"left"},function(){return this.x},function(a){this.Cb(a);this.x=a}); +v.defineProperty(B,{top:"top"},function(){return this.y},function(a){this.Cb(a);this.y=a});v.defineProperty(B,{right:"right"},function(){return this.x+this.width},function(a){this.Cb(a);this.x+=a-(this.x+this.width)});v.defineProperty(B,{bottom:"bottom"},function(){return this.y+this.height},function(a){this.Cb(a);this.y+=a-(this.y+this.height)});v.defineProperty(B,{position:"position"},function(){return new z(this.x,this.y)},function(a){this.Cb(a);this.x=a.x;this.y=a.y}); +v.defineProperty(B,{size:"size"},function(){return new ia(this.width,this.height)},function(a){this.Cb(a);this.width=a.width;this.height=a.height});v.defineProperty(B,{cl:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.Cb(a);this.x=a.x-this.width/2;this.y=a.y-this.height/2});v.defineProperty(B,{na:"centerX"},function(){return this.x+this.width/2},function(a){this.Cb(a);this.x=a-this.width/2}); +v.defineProperty(B,{ua:"centerY"},function(){return this.y+this.height/2},function(a){this.Cb(a);this.y=a-this.height/2});B.prototype.isReal=B.prototype.G=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};B.prototype.isEmpty=function(){return 0===this.width&&0===this.height}; +function cb(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):v.k("Invalid arguments to Margin constructor");this.D=!1}v.ea("Margin",cb);v.Uh(cb);v.Kd(cb,{top:!0,right:!0,bottom:!0,left:!0});cb.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left}; +cb.prototype.setTo=cb.prototype.m=function(a,b,c,d){this.Cb();this.top=a;this.right=b;this.bottom=c;this.left=d;return this};cb.prototype.set=cb.prototype.set=function(a){this.Cb();this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};cb.prototype.copy=function(){var a=new cb;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};g=cb.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this}; +g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}}; +cb.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new cb;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new cb(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new cb(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new cb(c,e):new cb(c,e,f,h)}return new cb}; +cb.stringify=function(a){return a instanceof cb?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};cb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};cb.prototype.equals=cb.prototype.K=function(a){return a instanceof cb?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1}; +cb.prototype.equalTo=cb.prototype.xw=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};cb.prototype.equalsApprox=cb.prototype.Fc=function(a){return K(this.top,a.top)&&K(this.right,a.right)&&K(this.bottom,a.bottom)&&K(this.left,a.left)};cb.prototype.isReal=cb.prototype.G=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ja(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}v.Uh(ja); +v.Kd(ja,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ja.prototype.set=ja.prototype.set=function(a){this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};ja.prototype.copy=function(){var a=new ja;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};ja.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; +ja.prototype.equals=ja.prototype.K=function(a){return a instanceof ja?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};ja.prototype.isIdentity=ja.prototype.vt=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};ja.prototype.reset=ja.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; +ja.prototype.multiply=ja.prototype.multiply=function(a){var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,f=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this}; +ja.prototype.multiplyInverted=ja.prototype.xE=function(a){var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,f=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*f;e=this.m12*e+this.m22*f;f=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=f;this.dy=h;return this}; +ja.prototype.invert=ja.prototype.Dz=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),f=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this}; +ja.prototype.rotate=ja.prototype.rotate=function(a,b,c){360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var f=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=f;this.m22=h;this.translate(-b,-c);return this}; +ja.prototype.translate=ja.prototype.translate=function(a,b){this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};ja.prototype.scale=ja.prototype.scale=function(a,b){void 0===b&&(b=a);this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this};ja.prototype.transformPoint=ja.prototype.ub=function(a){var b=a.x,c=a.y;a.x=b*this.m11+c*this.m21+this.dx;a.y=b*this.m12+c*this.m22+this.dy;return a}; +ja.prototype.invertedTransformPoint=ja.prototype.Wh=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),f=a.x,h=a.y;a.x=f*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.y=f*c+h*d+e;return a}; +ja.prototype.transformRect=ja.prototype.pF=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,h=this.m12,k=this.m21,l=this.m22,m=this.dx,n=this.dy,p=b*f+c*k+m,q=b*h+c*l+n,r=d*f+c*k+m,c=d*h+c*l+n,s=b*f+e*k+m,b=b*h+e*l+n,f=d*f+e*k+m,d=d*h+e*l+n,e=p,h=q,p=Math.min(p,r),e=Math.max(e,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),e=Math.max(e,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,f),e=Math.max(e,f),h=Math.min(h,d),q=Math.max(q,d);a.x=p;a.y=h;a.width=e-p;a.height=q-h;return a}; +function L(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.D=!1}v.ea("Spot",L);v.Uh(L);v.Kd(L,{x:!0,y:!0,offsetX:!0,offsetY:!0});L.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY};L.prototype.setTo=L.prototype.m=function(a,b,c,d){this.Cb();this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this}; +L.prototype.set=L.prototype.set=function(a){this.Cb();this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};L.prototype.copy=function(){var a=new L;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};g=L.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this}; +g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};function db(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a}var gb; +L.parse=gb=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return rb;if("TopLeft"===a)return sb;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return tb;if("TopRight"===a)return ub;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return vb;if("Center"===a)return zb;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Ab;if("BottomLeft"===a)return Cb;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Db;if("BottomRight"===a)return Eb;if("TopSide"===a)return Fb;if("LeftSide"=== +a)return Gb;if("RightSide"===a)return Nb;if("BottomSide"===a)return Ob;if("TopBottomSides"===a)return Pb;if("LeftRightSides"===a)return Tb;if("TopLeftSides"===a)return Ub;if("TopRightSides"===a)return Vb;if("BottomLeftSides"===a)return Zb;if("BottomRightSides"===a)return $b;if("NotTopSide"===a)return ac;if("NotLeftSide"===a)return bc;if("NotRightSide"===a)return cc;if("NotBottomSide"===a)return dc;if("AllSides"===a)return ec;if("Default"===a)return fc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +var d=a[b++];void 0!==d&&0b.offset?1:-1});for(k=0;k=2*Math.PI?(Fc(a,b,c,d,e,e+Math.PI,h),Fc(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,f])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,f]))}}function Ec(a,b,c,d,e,f,h){var k=new Ac;k.ff=[b,c,d,e,f,h];b={};Oc(a,"g",b,k);k=a.addElement("g",b);a.tf.push(k)} +g.Za=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+v.Jl++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,h;c=Dc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",GK:this.shadowBlur/2});d=Dc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Dc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=Dc(this,"feOffset",{"in":"comp",result:"offsetBlur", +dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=Dc(this,"feMerge",{});h.appendChild(Dc(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(Dc(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);b.appendChild(h);0b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.pn?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.pn?this.clip():this.fill()};g.cj=function(){this.pn||this.stroke()};v.defineProperty(Sc,{pw:"clipInsteadOfFill"},function(){return this.pn},function(a){this.pn=a});g=Sc.prototype; +g.rA=function(a,b,c){this.ns=a;this.os=b;this.ng=c};g.an=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.bn=function(){this.shadowOffsetX=this.ns;this.shadowOffsetY=this.os;this.shadowBlur=this.ng};g.pz=function(a,b){var c=this.wa;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0}; +g.nz=function(){var a=this.wa;void 0!==a.setLineDash?(a.setLineDash(v.gj),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=v.gj,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)};function Zc(a,b){b&&(a.Jx="");a.Kx="";a.Ix=""} +var $c=(Math.sqrt(2)-1)/3*4,ad=(new z(0,0)).Ea(),bd=(new B(0,0,0,0)).Ea(),cd=(new cb(0,0,0,0)).Ea(),ld=(new cb(2,2,2,2)).Ea(),md=(new z(6,6)).Ea(),nd=(new z(-Infinity,-Infinity)).Ea(),od=(new z(Infinity,Infinity)).Ea(),pd=(new ia(0,0)).Ea(),qd=(new ia(1,1)).Ea(),rd=(new ia(6,6)).Ea(),sd=(new ia(8,8)).Ea(),td=(new ia(10,10)).Ea(),Cd=(new ia(Infinity,Infinity)).Ea(),Dd=(new z(NaN,NaN)).Ea(),Ed=(new ia(NaN,NaN)).Ea(),Fd=(new B(NaN,NaN,NaN,NaN)).Ea(),Gd=(new L(.156,.156)).Ea(),Hd=(new L(.844,.844)).Ea(), +Id=new ta,Jd=new ta,Kd=null;function Ld(a){if(0>=a)return 0;var b=Kd;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Kd=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function K(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=h&&h<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=f&&f<=h+e)return!0}else return!0;return!1} +function Xd(a,b,c,d,e,f,h,k,l,m,n,p){if(Md(a,b,h,k,p,c,d)&&Md(a,b,h,k,p,e,f))return Md(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,t=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(q+s)/2;c=(r+t)/2;var s=(s+e)/2,t=(t+f)/2,u=(d+s)/2,y=(c+t)/2;return Xd(a,b,q,r,d,c,u,y,l,m,n,p)||Xd(u,y,s,t,e,f,h,k,l,m,n,p)} +function Yd(a,b,c,d,e,f,h,k,l,m){if(Md(a,b,h,k,l,c,d)&&Md(a,b,h,k,l,e,f))$a(m,a,b,0,0),$a(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,t=(c+r)/2;Yd(a,b,n,p,d,c,s,t,l,m);Yd(s,t,q,r,e,f,h,k,l,m)}} +function Zd(a,b,c,d,e,f,h,k,l,m){if(Md(a,b,h,k,l,c,d)&&Md(a,b,h,k,l,e,f))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,t=(c+r)/2;Zd(a,b,n,p,d,c,s,t,l,m);Zd(s,t,q,r,e,f,h,k,l,m)}} +function $d(a,b,c,d,e,f,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+f*l;e=e*s+h*l;f=f*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+f*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=f}function ae(a,b,c,d,e,f,h,k,l,m){if(Md(a,b,e,f,m,c,d))return Md(a,b,e,f,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var q=(n+c)/2,r=(p+d)/2;return ae(a,b,n,p,q,r,h,k,l,m)||ae(q,r,c,d,e,f,h,k,l,m)} +function be(a,b,c,d,e,f,h,k){if(Md(a,b,e,f,h,c,d))$a(k,a,b,0,0),$a(k,e,f,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;be(a,b,l,m,n,p,h,k);be(n,p,c,d,e,f,h,k)}}function ce(a,b,c,d,e,f,h,k){if(Md(a,b,e,f,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(f);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;ce(a,b,l,m,n,p,h,k);ce(n,p,c,d,e,f,h,k)}} +function de(a,b,c,d,e,f,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(Md(a,b,h,k,q,c,d)&&Md(a,b,h,k,q,e,f)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,t=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+h)/2;f=(f+k)/2;var u=(s+c)/2,y=(t+d)/2;c=(c+e)/2;d=(d+f)/2;var w=(u+c)/2,x=(y+d)/2, +A=(n-l)*(n-l)+(p-m)*(p-m),H=!1;de(a,b,s,t,u,y,w,x,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(Md(a,b,h,k,q,c,d)&&Md(a,b,h,k,q,e,f)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,t=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,t=(b+d)/2,u=(c+e)/2,y=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(s+u)/2;c=(t+y)/2;var u=(u+e)/2,y=(y+f)/2, +w=(d+u)/2,x=(c+y)/2,r=r+ee(a,b,s,t,d,c,w,x,l,m,n,p,q),r=r+ee(w,x,u,y,e,f,h,k,l,m,n,p,q)}return r} +function Oa(a,b,c,d,e,f,h){if(Hc(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(Hc(b,d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=f;return!0}h=(d-b)/(c-a);if(Hc(k,h))return Oa(a,b,c,d,e,f,l),!1;e=(h*a-k*e+f-b)/(h-k);if(Hc(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}f= +h*(e-a)+b;return Oa(a,b,c,d,e,f,l)}function ge(a,b,c,d,e,f,h,k,l){var m=1E21,n=a,p=b;if(fe(a,b,a,d,e,f,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-f)*(l.y-f);qm} +function he(a,b,c,d,e,f,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(f-k)/m,h=a,n=k*h+(f-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(f-k)/m,a=b-d*a,h=(f-k*e-a)/(d-k),n=d*h+a);l.m(h,n);return l} +function oe(a,b,c){var d=b.x,e=b.y,f=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===f?(f=a=0,e=m):e===h?(d=k):a.Fa(b)||a.Fa(c)||pe(k,m,l,m,d,e,f,h)||pe(l,m,l,n,d,e,f,h)||pe(l,n,k,n,d,e,f,h)||pe(k,n,k,m,d,e,f,h)?!0:!1}function pe(a,b,c,d,e,f,h,k){return 0>=qe(a,b,c,d,e,f)*qe(a,b,c,d,h,k)&&0>=qe(e,f,h,k,a,b)*qe(e,f,h,k,c,d)} +function qe(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a} +function se(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);d=bc,f=0>d,h=0,k=h=0;af;++f){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.Aa.toString()+" "+this.ya.toString()+"L"+this.I.toString()+" "+this.J.toString():"M"+this.Aa.toFixed(a)+" "+this.ya.toFixed(a)+"L"+this.I.toFixed(a)+" "+this.J.toFixed(a);case Je:var b=new B(this.Aa,this.ya,0,0);b.rF(this.I,this.J,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ +"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Ke:b=new B(this.Aa,this.ya,0,0);b.rF(this.I,this.J,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ +2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Fe:for(var b="",c=this.Ub.n,d=c.length,e=0;e=t-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new z(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function f(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new z(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&v.Cd(a,"string",ve,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, +"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=-1,n="",p="",q=new z(0,0),r=new z(0,0),s=new z(0, +0),t=l.length,u=v.s(),y=!1,w=!1,x=!0;!(m>=t-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":x=!0;w=y=!1;break;case "M":var A=f();null===u.Rb||!0===x?(N(u,A.x,A.y,y,!1,!w),x=!1):u.moveTo(A.x,A.y);for(q=s;!c();)A=f(),u.lineTo(A.x,A.y);break;case "L":for(;!c();)A=f(),u.lineTo(A.x,A.y);break;case "H":for(;!c();)s=A=new z((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),u.lineTo(s.x,s.y);break;case "V":for(;!c();)s=A=new z(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),u.lineTo(s.x,s.y);break; +case "C":for(;!c();){var H=e(),C=h(),A=f();O(u,H.x,H.y,C.x,C.y,A.x,A.y)}break;case "S":for(;!c();)H=k(),C=h(),A=f(),O(u,H.x,H.y,C.x,C.y,A.x,A.y);break;case "Q":for(;!c();)C=h(),A=f(),af(u,C.x,C.y,A.x,A.y);break;case "T":for(;!c();)r=C=k(),A=f(),af(u,C.x,C.y,A.x,A.y);break;case "B":for(;!c();){var A=parseFloat(d()),H=parseFloat(d()),C=parseFloat(d()),T=parseFloat(d()),ba=parseFloat(d()),U=ba,M=!1;c()||(U=parseFloat(d()),c()||(M=0!==parseFloat(d())));n===n.toLowerCase()&&(C+=s.x,T+=s.y);u.arcTo(A,H, +C,T,ba,U,M)}break;case "A":for(;!c();)H=Math.abs(parseFloat(d())),C=Math.abs(parseFloat(d())),T=parseFloat(d()),ba=!!parseFloat(d()),U=!!parseFloat(d()),A=f(),bf(u,H,C,T,ba,U,A.x,A.y);break;case "Z":A=u.o.Ub.n[u.o.Ub.length-1];P(u);s=q;break;case "F":A="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Uu]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++;else{A=l[m+H];break}A.match(/[Mm]/)?y=!0:cf(u);break;case "U":A="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Ff]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++; +else{A=l[m+H];break}A.match(/[Mm]/)?w=!0:u.Za(!1)}q=u.o;v.q(u);if(b)for(u=q.Ub.i;u.next();)A=u.value,A.ut=!0;return q};function df(a,b){for(var c=a.length,d=v.L(),e=0;eh&&(h+=360),s.xe+=h);0>a&&(s.xe=180-s.xe,s.Af=-s.Af);0>d&&(s.xe=-s.xe,s.Af=-s.Af);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case kf:h=s.I;k=s.J;s.I=h* +a+k*c+e;s.J=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.fj+=h);0>a&&(s.fj=180-s.fj,s.tl=!s.tl);0>d&&(s.fj=-s.fj,s.tl=!s.tl);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:v.k("Unknown Segment type: "+s.type)}}}}this.ab=!0;return this}; +ve.prototype.Fa=function(a,b,c,d){var e=a.x,f=a.y,h=this.mb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.Ub.n,s=r.length,t=0;t=a)return 0;if((e>h?e-h:h-e)<(f>k?f-k:k-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a||1a)return n=(a-q)/p,v.sa(c),new z(b+(e-b)*n,d+(f-d)*n);q+=p}b=e;d=f}v.sa(c);return null};v.defineProperty(ve,{type:"type"},function(){return this.ia},function(a){this.ia!==a&&(this.D&&v.ka(this,a),this.ia=a,this.ab=!0)});v.defineProperty(ve,{Aa:"startX"},function(){return this.vc},function(a){this.vc!==a&&(this.D&&v.ka(this,a),this.vc=a,this.ab=!0)}); +v.defineProperty(ve,{ya:"startY"},function(){return this.Cc},function(a){this.Cc!==a&&(this.D&&v.ka(this,a),this.Cc=a,this.ab=!0)});v.defineProperty(ve,{I:"endX"},function(){return this.vb},function(a){this.vb!==a&&(this.D&&v.ka(this,a),this.vb=a,this.ab=!0)});v.defineProperty(ve,{J:"endY"},function(){return this.Bb},function(a){this.Bb!==a&&(this.D&&v.ka(this,a),this.Bb=a,this.ab=!0)}); +v.defineProperty(ve,{Ub:"figures"},function(){return this.lj},function(a){this.lj!==a&&(this.D&&v.ka(this,a),this.lj=a,this.ab=!0)});ve.prototype.add=ve.prototype.add=function(a){this.lj.add(a);return this};ve.prototype.setSpots=function(a,b,c,d,e,f,h,k){this.D&&v.ka(this);this.Nh=(new L(a,b,e,f)).freeze();this.Oh=(new L(c,d,h,k)).freeze();return this};v.defineProperty(ve,{B:"spot1"},function(){return this.Nh},function(a){this.D&&v.ka(this,a);this.Nh=a.R()}); +v.defineProperty(ve,{C:"spot2"},function(){return this.Oh},function(a){this.D&&v.ka(this,a);this.Oh=a.R()});v.defineProperty(ve,{Jd:"defaultStretch"},function(){return this.mi},function(a){this.D&&v.ka(this,a);this.mi=a});v.u(ve,{mb:"bounds"},function(){this.Hz()&&(this.CA(),this.$g());return this.Cu});function Ge(a,b,c,d){v.dc(this);this.D=!1;void 0===c&&(c=!0);this.Tl=c;void 0===d&&(d=!0);this.Un=d;this.vc=void 0!==a?a:0;this.Cc=void 0!==b?b:0;this.qo=new I(vf);this.Rv=this.qo.F;this.ab=!0} +v.ea("PathFigure",Ge);v.Uh(Ge);Ge.prototype.copy=function(){var a=new Ge;a.Tl=this.Tl;a.Un=this.Un;a.vc=this.vc;a.Cc=this.Cc;for(var b=this.qo.n,c=b.length,d=a.qo,e=0;ea?"M"+this.Aa.toString()+" "+this.ya.toString():"M"+this.Aa.toFixed(a)+" "+this.ya.toFixed(a),c=this.sb.n,d=c.length,e=0;ea&&(a+=360),this.sd=a,this.Fe=0,this.Xg=Math.max(d,0),this.mg=Math.max(e,0),this.Zn="boolean"===typeof h?!!h:!1,this.qn=!!k):(this.sd=d,this.Fe=e,a===jf&&(f=Math.max(f,0)),this.Xg=f,"number"===typeof h?(a===jf&&(h=Math.max(h,0)),this.mg=h):this.mg=0,this.qn=this.Zn=!1);this.Ch=!1;this.ab= +!0;this.bg=null}v.ea("PathSegment",vf);v.Uh(vf);vf.prototype.copy=function(){var a=new vf;a.ia=this.ia;a.vb=this.vb;a.Bb=this.Bb;a.sd=this.sd;a.Fe=this.Fe;a.Xg=this.Xg;a.mg=this.mg;a.Zn=this.Zn;a.qn=this.qn;a.Ch=this.Ch;a.ab=this.ab;return a}; +vf.prototype.equalsApprox=vf.prototype.Fc=function(a){if(!(a instanceof vf)||this.type!==a.type||this.Gw!==a.Gw)return!1;switch(this.type){case ff:case Ye:return K(this.I,a.I)&&K(this.J,a.J);case gf:return K(this.I,a.I)&&K(this.J,a.J)&&K(this.rc,a.rc)&&K(this.Kc,a.Kc)&&K(this.kh,a.kh)&&K(this.lh,a.lh);case hf:return K(this.I,a.I)&&K(this.J,a.J)&&K(this.rc,a.rc)&&K(this.Kc,a.Kc);case jf:return K(this.xe,a.xe)&&K(this.Af,a.Af)&&K(this.na,a.na)&&K(this.ua,a.ua)&&K(this.radiusX,a.radiusX)&&K(this.radiusY, +a.radiusY);case kf:return this.tl===a.tl&&this.Jw===a.Jw&&K(this.fj,a.fj)&&K(this.I,a.I)&&K(this.J,a.J)&&K(this.radiusX,a.radiusX)&&K(this.radiusY,a.radiusY);default:return!1}}; +vf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case ff:b=0>a?"M"+this.I.toString()+" "+this.J.toString():"M"+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case Ye:b=0>a?"L"+this.I.toString()+" "+this.J.toString():"L"+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case gf:b=0>a?"C"+this.rc.toString()+" "+this.Kc.toString()+" "+this.kh.toString()+" "+this.lh.toString()+" "+this.I.toString()+" "+this.J.toString():"C"+this.rc.toFixed(a)+" "+this.Kc.toFixed(a)+" "+this.kh.toFixed(a)+ +" "+this.lh.toFixed(a)+" "+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case hf:b=0>a?"Q"+this.rc.toString()+" "+this.Kc.toString()+" "+this.I.toString()+" "+this.J.toString():"Q"+this.rc.toFixed(a)+" "+this.Kc.toFixed(a)+" "+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case jf:b=0>a?"B"+this.xe.toString()+" "+this.Af.toString()+" "+this.na.toString()+" "+this.ua.toString()+" "+this.radiusX:"B"+this.xe.toFixed(a)+" "+this.Af.toFixed(a)+" "+this.na.toFixed(a)+" "+this.ua.toFixed(a)+" "+this.radiusX; +break;case kf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.fj.toString()+" "+(this.Jw?1:0)+" "+(this.tl?1:0)+" "+this.I.toString()+" "+this.J.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.fj.toFixed(a)+" "+(this.Jw?1:0)+" "+(this.tl?1:0)+" "+this.I.toFixed(a)+" "+this.J.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ch?"z":"")};var ff;vf.Move=ff=v.p(vf,"Move",0);var Ye;vf.Line=Ye=v.p(vf,"Line",1);var gf; +vf.Bezier=gf=v.p(vf,"Bezier",2);var hf;vf.QuadraticBezier=hf=v.p(vf,"QuadraticBezier",3);var jf;vf.Arc=jf=v.p(vf,"Arc",4);var kf;vf.SvgArc=kf=v.p(vf,"SvgArc",4);vf.prototype.freeze=function(){this.D=!0;return this};vf.prototype.Oa=function(){this.D=!1;return this};vf.prototype.close=vf.prototype.close=function(){this.Ch=!0;return this}; +function lf(a,b){if(null!==a.bg&&!1===b.ab)return a.bg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.bg=[],a.bg;var e=a.sd,f=a.Fe,h=se(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>f?1:b/f;r=b>f?f/b:1;b=se(b>f?b:f,n,n+h,!0);f=v.ph();f.reset();f.translate(c,d);f.rotate(a.sd,0,0);f.scale(l,r);df(b,f);v.$e(f);a.bg=b;return a.bg} +v.defineProperty(vf,{Gw:"isClosed"},function(){return this.Ch},function(a){this.Ch!==a&&(this.Ch=a,this.ab=!0)});v.defineProperty(vf,{type:"type"},function(){return this.ia},function(a){this.D&&v.ka(this,a);this.ia=a;this.ab=!0});v.defineProperty(vf,{I:"endX"},function(){return this.vb},function(a){this.D&&v.ka(this,a);this.vb=a;this.ab=!0});v.defineProperty(vf,{J:"endY"},function(){return this.Bb},function(a){this.D&&v.ka(this,a);this.Bb=a;this.ab=!0}); +v.defineProperty(vf,{rc:"point1X"},function(){return this.sd},function(a){this.D&&v.ka(this,a);this.sd=a;this.ab=!0});v.defineProperty(vf,{Kc:"point1Y"},function(){return this.Fe},function(a){this.D&&v.ka(this,a);this.Fe=a;this.ab=!0});v.defineProperty(vf,{kh:"point2X"},function(){return this.Xg},function(a){this.D&&v.ka(this,a);this.Xg=a;this.ab=!0});v.defineProperty(vf,{lh:"point2Y"},function(){return this.mg},function(a){this.D&&v.ka(this,a);this.mg=a;this.ab=!0}); +v.defineProperty(vf,{na:"centerX"},function(){return this.sd},function(a){this.D&&v.ka(this,a);this.sd=a;this.ab=!0});v.defineProperty(vf,{ua:"centerY"},function(){return this.Fe},function(a){this.D&&v.ka(this,a);this.Fe=a;this.ab=!0});v.defineProperty(vf,{radiusX:"radiusX"},function(){return this.Xg},function(a){0>a&&v.va(a,">= zero",vf,"radiusX");this.D&&v.ka(this,a);this.Xg=a;this.ab=!0}); +v.defineProperty(vf,{radiusY:"radiusY"},function(){return this.mg},function(a){0>a&&v.va(a,">= zero",vf,"radiusY");this.D&&v.ka(this,a);this.mg=a;this.ab=!0});v.defineProperty(vf,{xe:"startAngle"},function(){return this.vb},function(a){this.vb!==a&&(this.D&&v.ka(this,a),a%=360,0>a&&(a+=360),this.vb=a,this.ab=!0)});v.defineProperty(vf,{Af:"sweepAngle"},function(){return this.Bb},function(a){this.D&&v.ka(this,a);360a&&(a=-360);this.Bb=a;this.ab=!0}); +v.defineProperty(vf,{tl:"isClockwiseArc"},function(){return this.qn},function(a){this.D&&v.ka(this,a);this.qn=a;this.ab=!0});v.defineProperty(vf,{Jw:"isLargeArc"},function(){return this.Zn},function(a){this.D&&v.ka(this,a);this.Zn=a;this.ab=!0});v.defineProperty(vf,{fj:"xAxisRotation"},function(){return this.sd},function(a){a%=360;0>a&&(a+=360);this.D&&v.ka(this,a);this.sd=a;this.ab=!0}); +function wf(){this.W=null;this.Sy=(new z(0,0)).freeze();this.Wx=(new z(0,0)).freeze();this.yu=this.uv=0;this.zu=1;this.jv="";this.aw=this.Pu=!1;this.Lu=this.Bu=0;this.hj=this.Xu=this.gv=!1;this.Dq=null;this.Zv=0;this.og=this.Yv=null}v.ea("InputEvent",wf); +wf.prototype.copy=function(){var a=new wf;a.W=this.W;a.Sy.assign(this.jf);a.Wx.assign(this.ca);a.uv=this.uv;a.yu=this.yu;a.zu=this.zu;a.jv=this.jv;a.Pu=this.Pu;a.aw=this.aw;a.Bu=this.Bu;a.Lu=this.Lu;a.gv=this.gv;a.Xu=this.Xu;a.hj=this.hj;a.Dq=this.Dq;a.Zv=this.Zv;a.Yv=this.Yv;a.og=this.og;return a}; +wf.prototype.toString=function(){var a="^";0!==this.od&&(a+="M:"+this.od);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ge&&(a+="C:"+this.Ge);0!==this.hl&&(a+="D:"+this.hl);this.zc&&(a+="h");this.bubbles&&(a+="b");null!==this.ca&&(a+="@"+this.ca.toString());return a};v.defineProperty(wf,{g:"diagram"},function(){return this.W},function(a){this.W=a});v.defineProperty(wf,{jf:"viewPoint"},function(){return this.Sy},function(a){v.A(a,z,wf,"viewPoint");this.Sy.assign(a)}); +v.defineProperty(wf,{ca:"documentPoint"},function(){return this.Wx},function(a){v.A(a,z,wf,"documentPoint");this.Wx.assign(a)});v.defineProperty(wf,{od:"modifiers"},function(){return this.uv},function(a){this.uv=a});v.defineProperty(wf,{button:"button"},function(){return this.yu},function(a){this.yu=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}); +v.defineProperty(wf,{buttons:"buttons"},function(){return this.zu},function(a){this.zu=a});v.defineProperty(wf,{key:"key"},function(){return this.jv},function(a){this.jv=a});v.defineProperty(wf,{jl:"down"},function(){return this.Pu},function(a){this.Pu=a});v.defineProperty(wf,{up:"up"},function(){return this.aw},function(a){this.aw=a});v.defineProperty(wf,{Ge:"clickCount"},function(){return this.Bu},function(a){this.Bu=a}); +v.defineProperty(wf,{hl:"delta"},function(){return this.Lu},function(a){this.Lu=a});v.defineProperty(wf,{wt:"isMultiTouch"},function(){return this.gv},function(a){this.gv=a});v.defineProperty(wf,{zc:"handled"},function(){return this.Xu},function(a){this.Xu=a});v.defineProperty(wf,{bubbles:"bubbles"},function(){return this.hj},function(a){this.hj=a});v.defineProperty(wf,{event:"event"},function(){return this.Dq},function(a){this.Dq=a}); +v.u(wf,{Wi:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});v.u(wf,{ak:"isMac"},function(){return v.ak});v.defineProperty(wf,{timestamp:"timestamp"},function(){return this.Zv},function(a){this.Zv=a});v.defineProperty(wf,{Ig:"targetDiagram"},function(){return this.Yv},function(a){this.Yv=a}); +v.defineProperty(wf,{ye:"targetObject"},function(){return this.og},function(a){this.og=a});v.defineProperty(wf,{control:"control"},function(){return 0!==(this.od&1)},function(a){this.od=a?this.od|1:this.od&-2});v.defineProperty(wf,{shift:"shift"},function(){return 0!==(this.od&4)},function(a){this.od=a?this.od|4:this.od&-5});v.defineProperty(wf,{alt:"alt"},function(){return 0!==(this.od&2)},function(a){this.od=a?this.od|2:this.od&-3}); +v.defineProperty(wf,{Ft:"meta"},function(){return 0!==(this.od&8)},function(a){this.od=a?this.od|8:this.od&-9});v.defineProperty(wf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); +v.defineProperty(wf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});v.defineProperty(wf,{iK:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); +function xf(){this.W=null;this.Ob="";this.Dv=this.Wv=null;this.Au=!1}v.ea("DiagramEvent",xf);xf.prototype.copy=function(){var a=new xf;a.W=this.W;a.Ob=this.Ob;a.Wv=this.Wv;a.Dv=this.Dv;a.Au=this.Au;return a};xf.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.uA&&(a+=":"+this.uA.toString());null!==this.$z&&(a+="("+this.$z.toString()+")");return a};v.defineProperty(xf,{g:"diagram"},function(){return this.W},function(a){this.W=a}); +v.defineProperty(xf,{name:"name"},function(){return this.Ob},function(a){this.Ob=a});v.defineProperty(xf,{uA:"subject"},function(){return this.Wv},function(a){this.Wv=a});v.defineProperty(xf,{$z:"parameter"},function(){return this.Dv},function(a){this.Dv=a});v.defineProperty(xf,{cancel:"cancel"},function(){return this.Au},function(a){this.Au=a});function yf(){this.aq=zf;this.km=this.tv="";this.Br=this.Cr=this.Fr=this.Gr=this.Er=this.W=this.Vd=null}v.ea("ChangedEvent",yf);var Af; +yf.Transaction=Af=v.p(yf,"Transaction",-1);var zf;yf.Property=zf=v.p(yf,"Property",0);var Bf;yf.Insert=Bf=v.p(yf,"Insert",1);var Cf;yf.Remove=Cf=v.p(yf,"Remove",2);yf.prototype.clear=yf.prototype.clear=function(){this.Br=this.Cr=this.Fr=this.Gr=this.Er=this.W=this.Vd=null}; +yf.prototype.copy=function(){var a=new yf;a.aq=this.aq;a.tv=this.tv;a.km=this.km;a.Vd=this.Vd;a.W=this.W;a.Er=this.Er;var b=this.Gr;a.Gr=v.Ua(b)&&"function"===typeof b.R?b.R():b;b=this.Fr;a.Fr=v.Ua(b)&&"function"===typeof b.R?b.R():b;b=this.Cr;a.Cr=v.Ua(b)&&"function"===typeof b.R?b.R():b;b=this.Br;a.Br=v.Ua(b)&&"function"===typeof b.R?b.R():b;return a}; +yf.prototype.toString=function(){var a="",a=this.wc===Af?a+"* ":this.wc===zf?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.wc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.hf&&this.hf!==this.propertyName&&(a+=" "+this.hf);a+=": ";this.wc===Af?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Df(this.object)),null!==this.oldValue&&(a+=" old: "+Df(this.oldValue)),null!==this.Bg&&(a+=" "+this.Bg),null!==this.newValue&& +(a+=" new: "+Df(this.newValue)),null!==this.zg&&(a+=" "+this.zg));return a};yf.prototype.getValue=yf.prototype.ja=function(a){return a?this.oldValue:this.newValue};yf.prototype.getParam=function(a){return a?this.Bg:this.zg};yf.prototype.canUndo=yf.prototype.canUndo=function(){return null!==this.ba||null!==this.g?!0:!1};yf.prototype.undo=yf.prototype.undo=function(){this.canUndo()&&(null!==this.ba?this.ba.Cm(this,!0):null!==this.g&&this.g.Cm(this,!0))}; +yf.prototype.canRedo=yf.prototype.canRedo=function(){return null!==this.ba||null!==this.g?!0:!1};yf.prototype.redo=yf.prototype.redo=function(){this.canRedo()&&(null!==this.ba?this.ba.Cm(this,!1):null!==this.g&&this.g.Cm(this,!1))};v.defineProperty(yf,{ba:"model"},function(){return this.Vd},function(a){this.Vd=a});v.defineProperty(yf,{g:"diagram"},function(){return this.W},function(a){this.W=a});v.defineProperty(yf,{wc:"change"},function(){return this.aq},function(a){this.aq=a}); +v.defineProperty(yf,{hf:"modelChange"},function(){return this.tv},function(a){this.tv=a});v.defineProperty(yf,{propertyName:"propertyName"},function(){return this.km},function(a){this.km=a});v.u(yf,{mE:"isTransactionFinished"},function(){return this.aq===Af&&("CommittedTransaction"===this.km||"FinishedUndo"===this.km||"FinishedRedo"===this.km)});v.defineProperty(yf,{object:"object"},function(){return this.Er},function(a){this.Er=a}); +v.defineProperty(yf,{oldValue:"oldValue"},function(){return this.Gr},function(a){this.Gr=a});v.defineProperty(yf,{Bg:"oldParam"},function(){return this.Fr},function(a){this.Fr=a});v.defineProperty(yf,{newValue:"newValue"},function(){return this.Cr},function(a){this.Cr=a});v.defineProperty(yf,{zg:"newParam"},function(){return this.Br},function(a){this.Br=a}); +function F(a){1f?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}return'"'+b+'"'}; +F.prototype.writeJsonValue=F.prototype.iu=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.iu(a.valueOf()):v.isArray(a)?Lf(this,a):v.Ua(a)?Gf(this,a):"function"===typeof a?"null":a.toString()}; +function Lf(a,b,c){void 0===c&&(c=!1);var d=v.Wa(b);if(0>=d)return"[]";var e=new sa;e.add("[ ");c&&1e)return;v.Th(a.If,e)}Zf(a,"nodeDataArray",Cf,"nodeDataArray",a,b,null,e,null);a.gu(b)}} +F.prototype.removeNodeDataCollection=function(a){if(v.isArray(a))for(var b=v.Wa(a),c=0;cb&&(b=v.Wa(a));v.Ni(a,b,c);Zf(this,"",Bf,"",a,null,c,null,b)};F.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);a===this.If&&v.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=v.Wa(a)-1);var c=v.Qa(a,b);v.Th(a,b);Zf(this,"",Cf,"",a,c,null,b,null)}; +v.defineProperty(F,{Wm:"nodeCategoryProperty"},function(){return this.fm},function(a){var b=this.fm;b!==a&&(jg(a,F,"nodeCategoryProperty"),this.fm=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.xz=function(a){if(null===a)return"";var b=this.fm;if(""===b)return"";b=v.qb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; +F.prototype.setCategoryForNodeData=F.prototype.jx=function(a,b){v.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.fm;if(""!==c)if(this.Je(a)){var d=v.qb(a,c);void 0===d&&(d="");d!==b&&(v.Ka(a,c,b),Zf(this,"nodeCategory",zf,c,a,d,b))}else v.Ka(a,c,b)}}; +function Q(a,b){2e||(v.Th(d,e),this.ah(a)&&(pg(this,b,a),Zf(this,"linkLabelKeys",Cf,c,a,b,null)))}else void 0!==d&&v.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +v.defineProperty(Q,{yg:"linkDataArray"},function(){return this.Gf},function(a){var b=this.Gf;if(b!==a){v.bz(a,Q,"linkDataArray");this.Yc.clear();for(var c=v.Wa(a),d=0;de)return;v.Th(a.Gf,e)}Zf(a,"linkDataArray",Cf,"linkDataArray",a,b,null,e,null);c=a.pl(b);pg(a,c,b);c=a.ql(b);pg(a,c,b);d=a.$j(b);if(v.isArray(d))for(var e=v.Wa(d),f=0;fa.rh&&v.trace("Ending transaction without having started a transaction: "+c);var d=1===a.rh;d&&b&&a.isEnabled&&a.$c("CommittingTransaction",c,a.Pi);var e=0;if(0a.Ui;e--)f=d.da(e),null!== +f&&f.clear(),d.Vc(e),a.uy=!0;e=a.tE;0===e&&(e=1);0=e&&(f=d.da(0),null!==f&&f.clear(),d.Vc(0),a.Og--);d.add(b);a.Og++;d.freeze();f=b}a.$c("CommittedTransaction",c,f)}else{a.ti=!0;try{a.isEnabled&&null!==f&&(f.tt=!0,f.undo())}finally{a.$c("RolledBackTransaction",c,f),a.ti=!1}null!==f&&f.clear()}a.Ku=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Nf;for(b=c.count-1;b>=a;b--)d=c.da(b),null!==d&&d.undo(),c.Oa(),c.Vc(b);c.freeze()}return!1} +Ef.prototype.canUndo=Ef.prototype.canUndo=function(){if(!this.isEnabled||0=this.rh&&!this.hy&&(a=a.g,null!==a&&!1===a.Rm||v.trace("Change not within a transaction: "+c.toString()))}}; +Ef.prototype.skipsEvent=function(a){if(null===a||0>a.wc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Gc)return!0}else if(a instanceof Uf&&a.Gc)return!0;return!1};v.u(Ef,{SH:"models"},function(){return this.Ay.i});v.defineProperty(Ef,{isEnabled:"isEnabled"},function(){return this.Se},function(a){this.Se=a});v.u(Ef,{nF:"transactionToUndo"},function(){return 0<=this.Ui&&this.Ui<=this.history.count-1?this.history.da(this.Ui):null}); +v.u(Ef,{mF:"transactionToRedo"},function(){return this.Uib.gh||(b.scale=a))};Wf.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.vx);v.We(a,Wf,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.bl!==Xg)return!1;a*=b.scale;return ab.gh?!1:b.mw}; +Wf.prototype.increaseZoom=function(a){void 0===a&&(a=this.vx);v.We(a,Wf,"increaseZoom:factor");var b=this.g;null!==b&&b.bl===Xg&&(a*=b.scale,ab.gh||(b.scale=a))};Wf.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.vx);v.We(a,Wf,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.bl!==Xg)return!1;a*=b.scale;return ab.gh?!1:b.mw};Wf.prototype.resetZoom=function(a){void 0===a&&(a=this.tw);v.We(a,Wf,"resetZoom:newscale");var b=this.g;null===b||ab.gh||(b.scale=a)}; +Wf.prototype.canResetZoom=function(a){void 0===a&&(a=this.tw);v.We(a,Wf,"canResetZoom:newscale");var b=this.g;return null===b||ab.gh?!1:b.mw};Wf.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.Vy&&!isNaN(this.vy)&&a.Zd.K(this.Uy)?(a.scale=this.vy,a.position=this.ZB,this.Vy=NaN,this.Uy=bd):(this.vy=b,this.ZB=c.copy(),a.zoomToFit(),this.Vy=a.scale,this.Uy=a.Zd.copy())}};Wf.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.mw}; +Wf.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&v.A(a,R,Wf,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.Gi&&(this.Gi.next()?a=this.Gi.value:this.Gi=null)}catch(c){this.Gi=null}null===a&&(0b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Jf[0])c=a.Jf[0],d=a.Jf[1];else return;this.doCancel();if(a.Zo("hasGestureZoom")){a.iy=!0;a.kC=a.scale;var e=ah(a),f=c,h=f.clientX-e.x,c=f.clientY-e.y,f=d,d=f.clientX-e.x,f=f.clientY-e.y;v.v(e);e=d-h;c=f-c;a.DC=Math.sqrt(e*e+c*c);b.preventDefault();b.cancelBubble=!0}}}; +Vf.prototype.standardPinchZoomMove=function(){var a=this.g;if(null!==a){var b=a.N.event;this.doCancel();var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Jf[0])c=a.Jf[0],d=a.Jf[1];else return;if(a.Zo("hasGestureZoom")&&a.iy){var e=ah(a),f=c,c=f.clientX-e.x,h=f.clientY-e.y,f=d,d=f.clientX-e.x,f=f.clientY-e.y;v.v(e);var e=d-c,k=f-h,e=Math.sqrt(e*e+k*k)/a.DC,c=new z((Math.min(d,c)+Math.max(d,c))/2,(Math.min(f, +h)+Math.max(f,h))/2),h=a.kC*e,d=a.nb;h!==a.scale&&d.canResetZoom(h)&&(e=a.Il,a.Il=c,d.resetZoom(h),a.Il=e);b.preventDefault();b.cancelBubble=!0}}};Vf.prototype.doKeyDown=function(){var a=this.g;null!==a&&"Esc"===a.N.key&&this.doCancel()};Vf.prototype.doKeyUp=function(){};Vf.prototype.startTransaction=Vf.prototype.Qb=function(a){void 0===a&&(a=this.name);this.Bf=null;var b=this.g;return null===b?!1:b.Qb(a)}; +Vf.prototype.stopTransaction=Vf.prototype.fk=function(){var a=this.g;return null===a?!1:null===this.Bf?a.zp():a.wd(this.Bf)}; +Vf.prototype.standardMouseSelect=function(){var a=this.g;if(null!==a&&a.of){var b=a.N,c=a.gt(b.ca,!1);if(null!==c)if(v.ak?b.Ft:b.control){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ta;null!==b&&(b.hb=!b.hb);a.Ba("ChangedSelection")}else if(b.shift){if(!c.hb){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ta;null!==b&&(b.hb=!0);a.Ba("ChangedSelection")}}else{if(!c.hb){for(b=c;null!==b&&!b.canSelect();)b=b.Ta;null!==b&&a.select(b)}}else!b.left||(v.ak?b.Ft:b.control)|| +b.shift||a.ow()}};Vf.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.Gc});var c=this.g;if(null===c)return!1;var d=c.N,e=c.qe(d.ca,a,b);d.ye=e;bh(e,d,c);return d.zc}; +function bh(a,b,c){b.zc=!1;var d=0;b.left?d=1===b.Ge?1:2===b.Ge?2:1:b.right&&1===b.Ge&&(d=3);var e="";if(null!==a){switch(d){case 1:e="ObjectSingleClicked";break;case 2:e="ObjectDoubleClicked";break;case 3:e="ObjectContextClicked"}0!==d&&c.Ba(e,a)}else{switch(d){case 1:e="BackgroundSingleClicked";break;case 2:e="BackgroundDoubleClicked";break;case 3:e="BackgroundContextClicked"}0!==d&&c.Ba(e)}if(null!==a)for(;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.at?a.at:a.click;break;case 3:c= +a.ez}if(null!==c&&(c(b,a),b.zc))break;a=a.S}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.at?c.at:c.click;break;case 3:a=c.ez}null!==a&&a(b)}} +Vf.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.N;if(null!==b.g&&!0!==a.Na.pc){var c=a.tb;a.tb=!0;var d=a.qe(b.ca,null,null);b.ye=d;var e=!1;if(d!==a.xn){var f=a.xn,h=f;a.xn=d;this.doCurrentObjectChanged(f,d);for(b.zc=!1;null!==f;){var k=f.Ht;if(null!==k){if(d===f)break;if(null!==d&&d.ul(f))break;k(b,f,d);e=!0;if(b.zc)break}f=f.S}f=h;for(b.zc=!1;null!==d;){k=d.Gt;if(null!==k){if(f===d)break;if(null!==f&&f.ul(d))break;k(b,d,f);e=!0;if(b.zc)break}d=d.S}d=a.xn}if(null!==d){f= +d;for(k="";null!==f;){k=f.cursor;if(""!==k)break;f=f.S}a.$b=k;b.zc=!1;for(f=d;null!==f;){k=f.Tz;if(null!==k&&(k(b,f),e=!0,b.zc))break;f=f.S}}else a.$b="",k=a.Tz,null!==k&&(k(b),e=!0);e&&a.ue();a.tb=c}}};Vf.prototype.doCurrentObjectChanged=function(){}; +Vf.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.N,c=b.hl;if(0!==c&&a.Zd.G()){var d=a.nb,e=a.$a.It;if((e===ch&&!b.shift||e===dh&&b.control)&&(0e||Math.abs(b.y-a.y)>d};v.u(Vf,{g:"diagram"},function(){return this.W});v.defineProperty(Vf,{name:"name"},function(){return this.Ob},function(a){v.j(a,"string",Vf,"name");this.Ob=a}); +v.defineProperty(Vf,{isEnabled:"isEnabled"},function(){return this.Se},function(a){v.j(a,"boolean",Vf,"isEnabled");this.Se=a});v.defineProperty(Vf,{qa:"isActive"},function(){return this.LB},function(a){v.j(a,"boolean",Vf,"isActive");this.LB=a});v.defineProperty(Vf,{Bf:"transactionResult"},function(){return this.VC},function(a){null!==a&&v.j(a,"string",Vf,"transactionResult");this.VC=a}); +function Wg(){0e&&(e=k),l>f&&(f=l))}}Infinity===c?b.m(0,0,0,0):b.m(c,d,e-c,f-d)} +function Mh(a,b){if(null===a.gc){var c=a.g;if(!(null===c||b&&(c.bb||c.vf))&&null!==a.ac){var d=c.la;d.isEnabled&&d.iE?null!==d.Pi&&0c.oa)){var d=a.g;if(null!==d&&!d.bb&&(d=a.Ei,null!==d)){var e=null,f=null;null===c.T&&(e=Wh(a,c.l(0),!1),null!==e&&(f=e.Y));var h=null,k=null;null===c.Z&&(h=Wh(a,c.l(c.oa-1),!0),null!==h&&(k=h.Y));d.isValidLink(f,e,k,h)?b?(c.An=c.l(0).copy(),c.En=c.l(c.oa-1).copy(),c.Jp=!1,c.T=f,null!==e&&(c.wg=e.Rd),c.Z=k,null!==h&&(c.qh=h.Rd)):Xh(d,f,e,k,h):Xh(d,null,null,null,null)}}}Wg.prototype.doDragOver=function(){}; +function Yh(a,b){var c=a.g;if(null!==c){a.Ri&&Sh(a,!0);Ch(a);var d=Th(c,b,null,function(b){return!Qh(a,b)}),e=c.N;e.ye=d;if(null!==d){e.zc=!1;for(var f=d;null!==f;){var h=f.Qz;if(null!==h&&(h(e,f),e.zc))break;f=Vh(f)}}else h=c.Qz,null!==h&&h(e);if(a.qa||null!==gh)if(a.doDropOnto(b,d),a.qa||null!==gh)for(d=c.selection.i;d.next();)e=d.value,e instanceof S&&Zh(c,e.U)}}Wg.prototype.doDropOnto=function(){}; +Wg.prototype.doMouseMove=function(){if(this.qa){var a=this.g;if(null!==a&&null!==this.Jm&&null!==this.ac){var b=!1,c=!1;this.mayCopy()?(b=!0,a.$b="copy",Mh(this,!1),fh(this,this.gc),Nh(this,this.gc,!1),Dh(this,this.gc)):this.mayMove()?(c=!0,a.$b="default",Gh(this),Nh(this,this.ac,!0)):this.mayDragOut()?(a.$b="no-drop",Mh(this,!1),Nh(this,this.gc,!1)):Gh(this);Rh(this,a.N.ca,c,b)}}}; +Wg.prototype.doMouseUp=function(){if(this.qa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.gc?(Gh(this),Mh(this,!0),fh(this,this.gc),Nh(this,this.gc,!1),Dh(this,this.gc),null!==this.gc&&a.VE(this.gc.dj())):(b=!0,Gh(this),this.mayMove()&&(Nh(this,this.ac,!0),Rh(this,a.N.ca,!0,!1)));this.zq=!0;Yh(this,a.N.ca);if(this.qa){this.gc=null;if(b&&null!==this.ac)for(b=this.ac.i;b.next();){var d=b.key;d instanceof S&&(d=d.Ta,null===d||null===d.placeholder||this.ac.contains(d)||d.tD&&d.P())}a.qc(); +Dh(this,this.ac);this.Bf=c?"Copy":"Move";a.Ba(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Wg.prototype.mayCopy=function(){if(!this.dE)return!1;var a=this.g;if(null===a||a.bb||a.vf||!a.Io||!a.Uj||(v.ak?!a.N.alt:!a.N.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Od()&&b.canCopy())return!0}return null!==this.ad&&this.Ri&&this.ad.canCopy()?!0:!1}; +Wg.prototype.mayDragOut=function(){if(!this.dE)return!1;var a=this.g;if(null===a||!a.Ss||!a.Uj||a.al)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Od()&&b.canCopy())return!0}return null!==this.ad&&this.Ri&&this.ad.canCopy()?!0:!1};Wg.prototype.mayMove=function(){var a=this.g;if(null===a||a.bb||!a.al)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Od()&&b.canMove())return!0}return null!==this.ad&&this.Ri&&this.ad.canMove()?!0:!1};var Eh=new I(Wg),gh=null,hh=null; +Wg.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.fD||a.bb||a.vf||!a.Io)return!1;var b=gh;return null===b||b.g.ba.fl!==a.ba.fl?!1:!0};Wg.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Na.Zh();$h(a);a=gh;null!==a&&(a.g.$b="copy")}};Wg.prototype.doSimulatedDragLeave=function(){var a=gh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +Wg.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=gh;null!==b&&null!==b.ac&&this.mayDragIn()&&(a.$b="copy",ai(this,b.ac.dj(),!1),Nh(this,this.gc,!1),Rh(this,a.N.ca,!1,!0))}}; +Wg.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=gh;if(null!==b){var c=b.g;b.zq=!0;Gh(this);this.mayDragIn()&&(this.Qb("Drop"),ai(this,b.ac.dj(),!0),Nh(this,this.gc,!1),null!==this.gc&&a.VE(this.gc.dj()),Yh(this,a.N.ca),a.qc(),b=a.selection,null!==this.gc?this.Bf="ExternalCopy":b=new J(R),this.gc=null,a.focus(),a.Ba("ExternalObjectsDropped",b,c),this.fk())}}}; +function ai(a,b,c){if(null===a.gc){var d=a.g;if(null!==d&&!d.bb&&!d.vf){d.tb=!c;d.Qp=!c;a.ek=d.N.ca;d=d.Po(b,d,!0);c=v.$f();Lh(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;v.Vb(c);var h=a.Uv;c=new na(R);var k=v.L();for(b=b.i;b.next();){var l=b.value;if(l.Od()&&l.canCopy()){var m=l.location,l=d.ja(l);k.m(h.x-(e-m.x),h.y-(f-m.y));l.location=k;l.sf();c.add(l,zh(k))}}v.v(k);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,zh());a.gc=c;eh(a,c.dj());null!==a.ad&&(c=a.ad,d=c.$m,c.xl(a.ek.x- +(d.x+d.width/2),a.ek.y-(d.y+d.height/2)))}}}Wg.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.$b="":a.$b="no-drop")};function Ah(a){this.point=a;this.$E=ad}v.ea("DraggingInfo",Ah);function Oh(a,b,c){this.Jc=a;this.info=b;this.cH=c} +function bi(){0=d&&(d=.1);for(var e=this,f=b.Lm(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var h=f.value,k=h.Y;if(k instanceof S){var l=h.Ya(zb,v.L()),m=c.x-l.x,n=c.y-l.y;v.v(l);l=m*m+n*n;lc){if(null!==this.kc&&a===this.Cg&&b===this.Dg)return!0;var d=b.Rd;null===d&&(d="");if(a.Aw(d).count>=c)return!1}return!0}; +bi.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.gp;if(this.g.Xa===this&&(null!==a.layer&&!a.layer.Ts||!0!==b.gF))return!1;var c=b.MI;if(Infinity>c){if(null!==this.kc&&a===this.Eg&&b===this.Fg)return!0;var d=b.Rd;null===d&&(d="");if(a.vg(d).count>=c)return!1}return!0};bi.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; +bi.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof S))return!1;var d=a.Rd;null===d&&(d="");var e=b.Y;if(!(e instanceof S))return!1;var f=b.Rd;null===f&&(f="");for(e=e.vg(f);e.next();)if(f=e.value,f.T===c&&f.wg===d)return!0;return!1}; +bi.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.VG&&d.LI||!this.isInSameNode(b,d))&&(b.UG&&d.KI||!this.isLinked(b,d)))||null!==this.kc&&(null!==a&&this.isLabelDependentOnLink(a,this.kc)||null!==c&&this.isLabelDependentOnLink(c,this.kc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.kc))return!1;if(null!==a){var e=a.Pw;if(null!==e&&!e(a,b,c,d,this.kc))return!1}if(null!== +c&&(e=c.Pw,null!==e&&!e(a,b,c,d,this.kc)))return!1;e=this.Pw;return null!==e?e(a,b,c,d,this.kc):!0};bi.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.ee;if(null===c)return!1;if(c===b)return!0;var d=new J(S);d.add(a);return ci(this,c,b,d)};function ci(a,b,c,d){if(b===c)return!0;var e=b.T;if(null!==e&&e.uf&&(d.add(e),ci(a,e.ee,c,d)))return!0;b=b.Z;return null!==b&&b.uf&&(d.add(b),ci(a,b.ee,c,d))?!0:!1} +bi.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.gp;var d=this.g.TI;if(d!==di){if(d===ei){if(null!==c&&!c.Hc)return!0;for(d=b.te;d.next();){var e=d.value;if(e!==c&&e.Hc&&e.Z===b)return!1}return!fi(this,a,b,c,!0)}if(d===gi){if(null!==c&&!c.Hc)return!0;for(d=a.te;d.next();)if(e=d.value,e!==c&&e.Hc&&e.T===a)return!1;return!fi(this,a,b,c,!0)}if(d===hi)return a===b?a=!0:(d=new J(S),d.add(b),a=ii(this,d,a,b,c)),!a;if(d===ji)return!fi(this,a,b,c,!1);if(d=== +ui)return a===b?a=!0:(d=new J(S),d.add(b),a=vi(this,d,a,b,c)),!a}return!0};function fi(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.te;f.next();){var h=f.value;if(h!==d&&(!e||h.Hc)&&h.Z===b&&(h=h.T,h!==b&&fi(a,h,c,d,e)))return!0}return!1}function ii(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.te;f.next();){var h=f.value;if(h!==e&&h.Z===c&&(h=h.T,h!==c&&ii(a,b,h,d,e)))return!0}return!1} +function vi(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.te;f.next();){var h=f.value;if(h!==e){var k=h.T,h=h.Z,k=k===c?h:k;if(k!==c&&vi(a,b,k,d,e))return!0}}return!1}v.defineProperty(bi,{Pw:"linkValidation"},function(){return this.Mk},function(a){null!==a&&v.j(a,"function",bi,"linkValidation");this.Mk=a});v.defineProperty(bi,{Yw:"portTargeted"},function(){return this.vC},function(a){null!==a&&v.j(a,"function",bi,"portTargeted");this.vC=a}); +function wi(){0b.ht+1&&c=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof D)for(b=b.elements;b.next();)Ni(a, +b.value,c)}v.defineProperty(Mi,{nt:"handleArchetype"},function(){return this.Ak},function(a){null!==a&&v.A(a,G,Mi,"handleArchetype");this.Ak=a});v.u(Mi,{handle:"handle"},function(){return this.Sb});v.defineProperty(Mi,{Zb:"adornedObject"},function(){return this.Db},function(a){null!==a&&v.A(a,G,Mi,"adornedObject");this.Db=a});Mi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.bb&&a.Us&&a.N.left?null!==this.findToolHandleAt(a.yc.ca,this.name)?!0:!1:!1}; +Mi.prototype.doActivate=function(){var a=this.g;null!==a&&(this.Sb=this.findToolHandleAt(a.yc.ca,this.name),null!==this.Sb&&(this.Db=this.Sb.Y.Zb,this.Ey.set(this.Db.Y.location),this.zv.set(this.Db.xa),this.by=this.computeCellSize(),this.gy=this.computeMinSize(),this.ey=this.computeMaxSize(),a.Oe=!0,this.iC=a.Na.isEnabled,a.Na.isEnabled=!1,this.Qb(this.name),this.qa=!0))};Mi.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.fk(),this.Db=this.Sb=null,this.qa=a.Oe=!1,a.Na.isEnabled=this.iC)}; +Mi.prototype.doCancel=function(){this.Db.xa=this.zv;this.Db.Y.location=this.Ey;this.stopTool()};Mi.prototype.doMouseMove=function(){var a=this.g;if(this.qa&&null!==a){var b=this.gy,c=this.ey,d=this.by,e=this.Db.RD(a.N.ca,v.L()),f=Qi;this.Db instanceof Y&&(f=Ri(this.Db));b=this.computeResize(e,this.Sb.alignment,b,c,d,!(f===Si||f===Ti||a.N.shift));this.resize(b);a.Tf();v.v(e)}}; +Mi.prototype.doMouseUp=function(){var a=this.g;if(this.qa&&null!==a){var b=this.gy,c=this.ey,d=this.by,e=this.Db.RD(a.N.ca,v.L()),f=Qi;this.Db instanceof Y&&(f=Ri(this.Db));b=this.computeResize(e,this.Sb.alignment,b,c,d,!(f===Si||f===Ti||a.N.shift));this.resize(b);v.v(e);a.qc();this.Bf=this.name;a.Ba("PartResized",this.Db,this.zv)}this.stopTool()}; +Mi.prototype.resize=function(a){if(null!==this.g){var b=this.Zb,c=b.Y,d=b.ol(),e=b.Si(),f=Math.PI*d/180,h=Math.cos(f),f=Math.sin(f),k=0d?1:0,l=90d?1:0,d=180d?1:0,m=b.Ha.width,n=b.Ha.height;b.xa=a.size;var p=c.position.copy();c.sf();m=b.Ha.width-m;n=b.Ha.height-n;if(0!==m||0!==n)0!==m&&(p.x+=e*((a.x+m*l)*h-(a.y+n*k)*f)),0!==n&&(p.y+=e*((a.x+m*d)*f+(a.y+n*l)*h)),c.move(p),c instanceof S&&c.cf()}}; +Mi.prototype.computeResize=function(a,b,c,d,e,f){b.se()&&(b=zb);var h=this.Zb.Ha,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!f){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=v.L();Pa(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), +a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,f||(a.width=a.height/p,a.x= +k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),f||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));v.v(q);return a};Mi.prototype.computeMinSize=function(){var a=this.Zb.ih.copy(),b=this.ih;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; +Mi.prototype.computeMaxSize=function(){var a=this.Zb.xf.copy(),b=this.xf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.CI),180),c=Math.min(Math.abs(this.BI),b/2);!this.g.N.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};v.defineProperty(Ui,{CI:"snapAngleMultiple"},function(){return this.CC},function(a){v.j(a,"number",Ui,"snapAngleMultiple");this.CC=a}); +v.defineProperty(Ui,{BI:"snapAngleEpsilon"},function(){return this.BC},function(a){v.j(a,"number",Ui,"snapAngleEpsilon");this.BC=a});v.u(Ui,{pK:"originalAngle"},function(){return this.yv});function Wi(){0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ye.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b} +v.defineProperty(sg,{tA:"starting"},function(){return this.wo},function(a){this.wo!==a&&(null!==a&&v.j(a,"function",sg,"starting"),this.wo=a)});v.u(sg,{sJ:"animationReasons"},function(){return this.uu});sg.prototype.prepareAutomaticAnimation=sg.prototype.Ym=function(a){if(this.Se&&(this.tj||this.W.Rm)){this.uu.add(a);var b=this.tA;if(null===b||b(this,a))this.sj&&this.Zh(),this.pc=!0,this.Ll=!1}}; +function Jj(a){if(a.Se&&(a.uu.clear(),a.pc))if(!a.Ll)a.pc=!1;else if(0===a.mn){var b=+new Date;a.mn=b;requestAnimationFrame(function(){if(!1!==a.pc&&!a.sj&&a.mn===b){var c=a.W;c.Ti("temporaryPixelRatio")&&(c.Mj=1);Kj(c);a.pc=!1;c.Ba("AnimationStarting");Lj(a,b)}})}} +function Mj(a,b,c,d,e,f){if(!(!a.pc||"position"===c&&d.K(e)||b instanceof R&&!b.aE)){var h=a.gm;if(h.contains(b)){b=h.ja(b);var k=b.start,l=b.end;void 0===k[c]&&(k[c]=Nj(d));b.jz&&void 0!==l[c]?b.rz[c]=Nj(e):(f||(b.rz[c]=Nj(e)),l[c]=Nj(e))}else k=new ta,l=new ta,k[c]=Nj(d),l[c]=Nj(e),c=l,d=k.position,d instanceof z&&!d.G()&&a.uu.contains("Expand SubGraph")&&d.assign(c.position),h.add(b,new Ij(k,l,f));a.Ll=!0}}function Nj(a){return a instanceof z?a.copy():a instanceof ia?a.copy():a} +function Lj(a,b){var c;function d(){if(!1!==f.sj&&f.mn===b){var a=+new Date,c=a>s?m:a-r;Oj(f);Pj(f,e,q,h,c,m);f.Hu&&f.Hu();$h(e);Qj(f);a>s?Rj(f):requestAnimationFrame(d)}}void 0===c&&(c=new ta);var e=a.W;if(null!==e){a.sj=!0;var f=a,h=c.NJ||a.oB,k=c.nK||null,l=c.oK||null,m=c.duration||a.Zx,n=a.MF;for(c=a.gm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.G()||p.assign(n))}a.iB=h;a.Hu=k;a.Iu=l;a.hB=m;a.lB=a.gm;var q=a.lB;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l= +k["position:placeholder"],n=l.Ya(sb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);Oj(a);Pj(a,e,q,h,0,m);$h(a.W);Qj(a);var r=+new Date,s=r+m;f.mn===b&&requestAnimationFrame(function(){d()})}} +var Sj={opacity:function(a,b,c,d,e,f){a.opacity=d(e,b,c-b,f)},position:function(a,b,c,d,e,f){e!==f?a.nx(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new z(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},"position:node":function(a,b,c,d,e,f){var h=a.U,k=c.U;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.nx(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new z(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f))},"position:placeholder":function(a,b,c,d,e,f){e!==f?a.nx(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)): +a.position=new z(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},scale:function(a,b,c,d,e,f){a.scale=d(e,b,c-b,f)},visible:function(a,b,c,d,e,f){a.visible=e!==f?b:c}};function Oj(a){if(!a.Vn){var b=a.W;a.WC=b.tb;a.VA=b.we;a.WA=b.bu;b.tb=!0;b.we=!0;b.bu=!0;a.Vn=!0}}function Qj(a){var b=a.W;b.tb=a.WC;b.we=a.VA;b.bu=a.WA;a.Vn=!1} +function Pj(a,b,c,d,e,f){for(c=c.i;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==Sj[m])Sj[m](h,l[m],k[m],d,e,f)}d=b.Ez;b.Ez=!0;m=a.oB;0!==a.xq&&0!==a.wq&&(c=a.xq,b.Tb=m(e,c,a.wq-c,f));null!==a.vq&&null!==a.uq&&(c=a.vq,a=a.uq,b.kb=new z(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.Ez=d}sg.prototype.stopAnimation=sg.prototype.Zh=function(){!0===this.pc&&(this.pc=!1,this.Ll&&this.W.ue());this.sj&&this.Se&&Rj(this)}; +function Rj(a){a.sj=!1;a.mn=0;a.Ll=!1;a.vq=null;a.uq=null;a.xq=0;a.wq=0;Oj(a);for(var b=a.W,c=a.iB,d=a.hB,e=a.lB.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.rz,n;for(n in l)if(void 0!==Sj[n]){var p=n;!h.jz||"position:node"!==p&&"position:placeholder"!==p||(p="position");Sj[p](f,k[n],void 0!==m[n]?m[n]:h.jz?k[n]:l[n],c,d,d)}h.ax&&f.nd(!1)}for(c=a.W.links;c.next();)d=c.value,null!==d.po&&(d.points=d.po,d.po=null);b.Qw.clear();b.Mj=null;b.qc();b.Tf();Tj(b);Qj(a);a.gm=new na(G,Ij);a.Iu&& +a.Iu();a.Iu=null;a.Hu=null;b.Ba("AnimationFinished");b.ue()}function Uj(a,b,c){var d=b.U,e=c.U,f=null;c instanceof V&&(f=c.placeholder);null!==f?(d=f.Ya(sb),d.x+=f.padding.left,d.y+=f.padding.top,Mj(a,b,"position",d,b.position,!1)):Mj(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Mj(a,b,"scale",.01,b.scale,!1);if(b instanceof V)for(b=b.Ic;b.next();)f=b.value,f instanceof S&&Uj(a,f,c)} +function Vj(a,b,c){if(b.isVisible()){var d=null;c instanceof V&&(d=c.placeholder);null!==d?Mj(a,b,"position:placeholder",b.position,d,!0):Mj(a,b,"position:node",b.position,c,!0);Mj(a,b,"scale",b.scale,.01,!0);a.pc&&(d=a.gm,d.contains(b)&&(d.ja(b).ax=!0));if(b instanceof V)for(b=b.Ic;b.next();)d=b.value,d instanceof S&&Vj(a,d,c)}}function Wj(a,b,c){a.pc&&(null===a.vq&&b.G()&&null===a.uq&&(a.vq=b.copy()),a.uq=c.copy(),a.Ll=!0)} +function Xj(a,b,c){a.pc&&a.W.Rm&&(0===a.xq&&0===a.wq&&(a.xq=b),a.wq=c,a.Ll=!0)}v.defineProperty(sg,{isEnabled:"isEnabled"},function(){return this.Se},function(a){v.j(a,"boolean",sg,"isEnabled");this.Se=a});v.defineProperty(sg,{duration:"duration"},function(){return this.Zx},function(a){v.j(a,"number",sg,"duration");1>a&&v.va(a,">= 1",sg,"duration");this.Zx=a});v.u(sg,{df:"isAnimating"},function(){return this.sj});v.u(sg,{wH:"isTicking"},function(){return this.Vn}); +v.defineProperty(sg,{jE:"isInitial"},function(){return this.tj},function(a){v.j(a,"boolean",sg,"isInitial");this.tj=a});function Ij(a,b,c){this.start=a;this.end=b;this.rz=new ta;this.jz=c;this.ax=!1}function Uf(){0=a)return b;for(var c=0,d=0,e=0,f=0,h=0,k=this.wb.i;k.next();){var l=k.value;l instanceof V?e++:l instanceof S?d++:l instanceof W?f++:l instanceof Sg?h++:c++}k="";0=d.count)a=d.count;else if(d.da(a)===b)return-1;d.yd(a,b);b.qt(c);d=this.g;null!==d&&(c?d.pa():d.cp(b));dk(this,a,b);return a}; +g.Ne=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Ne(a,b,c);var d=this.wb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.da(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.rt(c);d.Vc(a);d=this.g;null!==d&&(c?d.pa():d.Ne(b));b.lv=null;return a}; +function dk(a,b,c){b=ek(a,b,c);if(c instanceof V&&null!==c&&isNaN(c.jn)){if(0!==c.Ic.count){for(var d=-1,e=a.wb.n,f=e.length,h=0;hd&&k.Ta===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,h=NaN;0<=f;){h=a.da(f).jn;if(!isNaN(h))break;f--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===f||h<=d){f++;if(f===b)break;a.Vc(b);a.yd(f,c);return f}for(h=NaN;0<=--f&&(h=a.da(f).jn,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.Vc(b);a.yd(k,c);return k}for(l=NaN;++ka||1=a)return b;for(var c=this.Yb.i;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.W instanceof E?b.W:null}; +v.defineProperty(E,{il:"div"},function(){return this.Kb},function(a){null!==a&&v.A(a,HTMLDivElement,E,"div");if(this.Kb!==a){gk=[];var b=this.Kb;null!==b?(b.W=void 0,b.innerHTML="",null!==this.zb&&(this.zb.removeEventListener("touchstart",this.lF,!1),this.zb.removeEventListener("touchmove",this.kF,!1),this.zb.removeEventListener("touchend",this.jF,!1),this.zb.xd.W=null),b=this.$a,null!==b&&(b.Pe.each(function(a){a.cancelWaitAfter()}),b.Uf.each(function(a){a.cancelWaitAfter()}),b.Vf.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.Xa.doCancel(),this.lf=this.zb=null,window.removeEventListener("resize",this.vF,!1),window.removeEventListener("mousemove",this.op,!0),window.removeEventListener("mousedown",this.np,!0),window.removeEventListener("mouseup",this.qp,!0),window.removeEventListener("mousewheel",this.jh,!0),window.removeEventListener("DOMMouseScroll",this.jh,!0),window.removeEventListener("mouseout",this.pp,!0)):this.Qg=!1;this.Kb=null;if(null!==a){if(b=a.W)b.il=null;sk(this,a);this.$w()}}}); +function vk(a){var b=a.zb;b.addEventListener("touchstart",a.lF,!1);b.addEventListener("touchmove",a.kF,!1);b.addEventListener("touchend",a.jF,!1);b.addEventListener("mousemove",a.op,!1);b.addEventListener("mousedown",a.np,!1);b.addEventListener("mouseup",a.qp,!1);b.addEventListener("mousewheel",a.jh,!1);b.addEventListener("DOMMouseScroll",a.jh,!1);b.addEventListener("mouseout",a.pp,!1);b.addEventListener("keydown",a.zH,!1);b.addEventListener("keyup",a.AH,!1);b.addEventListener("selectstart",function(a){a.preventDefault(); +return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.$a.Yo===Dj&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.aI,!1);b.addEventListener("pointermove",a.cI,!1);b.addEventListener("pointerleave",a.bI,!1);window.addEventListener("resize",a.vF,!1)}E.prototype.computePixelRatio=function(){return null!==this.Mj?this.Mj:this.JF};E.prototype.doMouseMove=function(){this.Xa.doMouseMove()}; +E.prototype.doMouseDown=function(){this.Xa.doMouseDown()};E.prototype.doMouseUp=function(){this.Xa.doMouseUp()};E.prototype.doMouseWheel=function(){this.Xa.doMouseWheel()};E.prototype.doKeyDown=function(){this.Xa.doKeyDown()};E.prototype.doKeyUp=function(){this.Xa.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){this.zb&&this.zb.focus()}; +function Kj(a){if(null!==a.zb){var b=a.Kb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Bk?a.vd:0,d=a.qj?a.vd:0,e=a.rd;a.rd=a.computePixelRatio();a.rd!==e&&(a.Nq=!0,a.ue());if(b.clientWidth!==a.Eb+c||b.clientHeight!==a.Jb+d)a.Sl=!0,a.je=!0,b=a.Pb,null!==b&&b.Lw&&a.bl===Xg&&b.H(),a.Gd||a.ue()}}} +function pk(a){var b=new Uf;b.name="Background";a.Ns(b);b=new Uf;b.name="";a.Ns(b);b=new Uf;b.name="Foreground";a.Ns(b);b=new Uf;b.name="Adornment";b.Gc=!0;a.Ns(b);b=new Uf;b.name="Tool";b.Gc=!0;b.bE=!0;a.Ns(b);b=new Uf;b.name="Grid";b.of=!1;b.Gg=!1;b.Gc=!0;a.cG(b,a.dt("Background"))} +function wk(a){a.hd=new D(xk);a.hd.name="GRID";var b=new Y;b.Ab="LineH";b.stroke="lightgray";b.lb=.5;b.interval=1;a.hd.add(b);b=new Y;b.Ab="LineH";b.stroke="gray";b.lb=.5;b.interval=5;a.hd.add(b);b=new Y;b.Ab="LineH";b.stroke="gray";b.lb=1;b.interval=10;a.hd.add(b);b=new Y;b.Ab="LineV";b.stroke="lightgray";b.lb=.5;b.interval=1;a.hd.add(b);b=new Y;b.Ab="LineV";b.stroke="gray";b.lb=.5;b.interval=5;a.hd.add(b);b=new Y;b.Ab="LineV";b.stroke="gray";b.lb=1;b.interval=10;a.hd.add(b);b=new R;b.add(a.hd); +b.Sf="Grid";b.jn=0;b.Gz=!1;b.aE=!1;b.Gg=!1;b.Lz="GRID";a.add(b);a.wb.remove(b);a.hd.visible=!1}E.prototype.LF=function(){this.W.isEnabled?this.W.JG(this):yk(this.W)};E.prototype.jC=function(a){this.W.isEnabled?(this.W.Hy=!0,this.W.Jy=a.target.scrollTop,this.W.Iy=a.target.scrollLeft):yk(this.W)}; +E.prototype.diagramScroll=E.prototype.JG=function(a){if(this.Hy&&null!==this.zb){this.Lv=!0;var b=this.Zd,c=this.rb,d=b.width,e=c.width,f=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.Tq)switch(this.Gy){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var t=s;el&&(this.position=s.m(-(this.Pv.scrollWidth-this.Eb)+t-this.Eb/r+k,this.position.y))),a.QF&&this.oe&&(bn&&(this.position=s.m(this.position.x,-(this.Pv.scrollHeight-this.Jb)+a.scrollTop-this.Jb/r+m))),v.v(s),zk(this),this.Sl=this.Lv=!1,b=this.Zd,c=this.rb,k=b.right,l=c.right, +m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(this.cs.style.width="1px"),h>=f&&b>=c&&m<=n&&(this.cs.style.height="1px"))}};E.prototype.computeBounds=E.prototype.$g=function(){0c&&(e=c),ea.gh&&(e=a.gh),e):b===Hk?(e=l>k?(h-a.vd)/d:(f-a.vd)/e,e>c&&(e=c),ea.gh&&(e=a.gh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Dk(this,Gk)}; +E.prototype.zoomToRect=function(a,b){void 0===b&&(b=Gk);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Gk||b===Hk)if(isNaN(c))e=this.rb.height*this.scale/d;else if(isNaN(d))e=this.rb.width*this.scale/c;else var e=this.Eb,f=this.Jb,e=b===Hk?f/d>e/c?(f-(this.qj?this.vd:0))/d:(e-(this.Bk?this.vd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};v.defineProperty(E,{Ez:null},function(){return this.Pc},function(a){this.Pc=a}); +E.prototype.alignDocument=function(a,b){this.rj&&Fk(this,this.$g());var c=this.Zd,d=this.rb;this.position=new z(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; +function Ek(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.jA===hk)f.bd()&&(d>c.width&&(k=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(l=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.RE,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.touches.length)&&b.preventDefault();b.cancelBubble=!0;return!1} +E.prototype.zH=function(a){if(!this.W.isEnabled)return!1;var b=this.W.Nb;Ik(this.W,this.W,a,b,!1);b.key=String.fromCharCode(a.which);b.jl=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= +"Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.W.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?Mk(b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; +E.prototype.AH=function(a){if(!this.W.isEnabled)return!1;var b=this.W.Nb;Ik(this.W,this.W,a,b,!1);b.key=String.fromCharCode(a.which);b.up=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 93:a.preventDefault()}this.W.doKeyUp(); +return Mk(b,a)};E.prototype.Iq=function(a){var b=this.zb;if(null===b)return new z(0,0);var c=this.Eb,d=this.Jb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.me?(a=new z(c,a),Qa(a,this.me),a):new z(c,a)};function Jk(a,b,c){var d=a.zb,e=a.Eb,f=a.Jb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-f/d.height*d.top);c.jf.m(h,k);null!==a.me?(b=v.Mb(h,k),a.me.Wh(b),c.ca.assign(b),v.v(b)):c.ca.m(h,k)} +E.prototype.invalidateDocumentBounds=E.prototype.qc=function(){this.rj||(this.rj=!0,this.ue(!0))};function Tj(a){a.Gd||Ak(a);a.rj&&Fk(a,a.$g())}E.prototype.redraw=E.prototype.$w=function(){this.Pc||this.Gd||(this.pa(),Nk(this),zk(this),this.qc(),this.Tf())};E.prototype.isUpdateRequested=function(){return this.Kf};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Na,c=b.isEnabled;b.Zh();b.isEnabled=!1;$h(this);this.Qg=!1;b.isEnabled=c;null!==a&&v.setTimeout(a,1)}; +E.prototype.requestUpdate=E.prototype.ue=function(a){void 0===a&&(a=!1);if(!0!==this.Kf&&!(this.Pc||!1===a&&this.Gd)){this.Kf=!0;var b=this;requestAnimationFrame(function(){b.Kf&&b.Tf()})}};E.prototype.maybeUpdate=E.prototype.Tf=function(){if(!this.Ln||this.Kf)this.Ln&&(this.Ln=!1),$h(this)};function Ok(a,b){a.Na.df||a.Pc||!a.Sl||yk(a)||(b&&Ak(a),Ck(a,!1))} +function $h(a){if(!a.Gd&&(a.Kf=!1,null!==a.Kb)){a.Gd=!0;var b=a.Na,c=a.sC;if(!b.Vn&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.eg.i;if(null===c||0===a.eg.count)break;a.eg=new J(G);a.BA(c,a.eg)}} +E.prototype.BA=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Od()||c instanceof V||!c.isVisible()||(c.vl()?(ij(c,Infinity,Infinity),c.Ec()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof V&&c.isVisible()&&dl(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.vl()?(ij(c,Infinity,Infinity),c.Ec()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Sg&&c.isVisible()&&(c.vl()?(ij(c,Infinity,Infinity),c.Ec()):b.add(c))}; +function dl(a,b){for(var c=v.jb(),d=v.jb(),e=b.Ic;e.next();){var f=e.value;f.isVisible()&&(f instanceof V?(el(f)||fl(f)||gl(f))&&dl(a,f):f instanceof W?f.T===b||f.Z===b?d.push(f):c.push(f):(ij(f,Infinity,Infinity),f.Ec()))}for(var e=c.length,h=0;hy+1&& +(A=Math.max((u-y)*C+a.Eb,A)),q+k+1n+1&&(H=Math.max((p-n)*C+a.Jb,H)),r+l+1y+1&&(A=Math.max((u-y)*C+a.Eb,A)),q+1n+1&&(H=Math.max((p-n)*C+l,H)),r+1y+1&&(k=a.position.x*C));if(a.Tq)switch(a.Gy){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.Bz&&a.oe&&(r+1n+1&&(b.scrollTop=a.position.y*C));h&&(a.Nq=!0);m=a.Eb;c=a.Jb;b.style.width=m+(a.Bk?a.vd:0)+"px";b.style.height=c+(a.qj?a.vd:0)+"px";a.Hy=!1;return d!==m||e!== +c||a.Na.pc?(n=a.rb,a.Lt(f,n,h),!1):!0} +E.prototype.add=E.prototype.add=function(a){v.A(a,R,E,"add:part");var b=a.g;if(b!==this){null!==b&&v.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Qp&&(a.Jk="Tool");var c=a.Sf,b=this.dt(c);null===b&&(b=this.dt(""));null===b&&v.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.cp(99999999,a,a.g===this),0<=c&&this.Lc(Bf,"parts",b,null,a,null,c),b.Gc||this.qc(),a.H(nl),c=a.zt,null!== +c&&c(a,null,b))}}; +E.prototype.cp=function(a){if(a instanceof S){if(this.ko.add(a),a instanceof V){var b=a.Ta;null===b?this.Vk.add(a):b.ho.add(a);b=a.Pb;null!==b&&(b.g=this)}}else a instanceof W?this.bo.add(a):a instanceof Sg||this.wb.add(a);var c=this;ol(a,function(a){pl(c,a)});a.Gb&&a.P();b=a.data;null!==b&&(a instanceof Sg||(a instanceof W?this.wk.add(b,a):this.ki.add(b,a)),ol(a,function(a){ql(c,a)}));!0!==fl(a)&&!0!==gl(a)||this.eg.add(a);rl(a,!0,this);sl(a)?(a.U.G()&&this.pa(ck(a,a.U)),this.qc()):a.isVisible()&& +a.U.G()&&this.pa(ck(a,a.U));this.ue()}; +E.prototype.Ne=function(a){a.Vs();if(a instanceof S){if(this.ko.remove(a),a instanceof V){var b=a.Ta;null===b?this.Vk.remove(a):b.ho.remove(a);b=a.Pb;null!==b&&(b.g=null)}}else a instanceof W?this.bo.remove(a):a instanceof Sg||this.wb.remove(a);var c=this;ol(a,function(a){tl(c,a)});b=a.data;null!==b&&(a instanceof Sg||(a instanceof W?this.wk.remove(b):this.ki.remove(b)),ol(a,function(a){ul(c,a)}));this.eg.remove(a);sl(a)?(a.U.G()&&this.pa(ck(a,a.U)),this.qc()):a.isVisible()&&a.U.G()&&this.pa(ck(a, +a.U));this.ue()};E.prototype.remove=E.prototype.remove=function(a){v.A(a,R,E,"remove:part");a.hb=!1;a.fh=!1;var b=a.layer;if(null!==b&&b.g===this){a.H(vl);a.Km();var c=b.Ne(-1,a,!1);0<=c&&this.Lc(Cf,"parts",b,a,null,c,null);c=a.zt;null!==c&&c(a,b,null)}};E.prototype.removeParts=E.prototype.gA=function(a,b){if(v.isArray(a))for(var c=v.Wa(a),d=0;dd&&this.qc()}; +E.prototype.addLayerAfter=function(a,b){wl(this,a,b);a.Mc(this);var c=this.Yb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.Vd&&this.Lc(Cf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.qc()}; +E.prototype.removeLayer=function(a){v.A(a,Uf,E,"removeLayer:layer");a.g!==this&&v.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.Yb,c=b.indexOf(a);if(b.remove(a)){for(b=a.wb.copy().i;b.next();){var d=b.value,e=d.Sf;d.Sf=e!==a.name?e:""}null!==this.Vd&&this.Lc(Cf,"layers",this,a,null,c,null);this.pa();this.qc()}}};E.prototype.findLayer=E.prototype.dt=function(a){for(var b=this.Ow;b.next();){var c=b.value;if(c.name===a)return c}return null}; +E.prototype.addModelChangedListener=E.prototype.eG=function(a){v.j(a,"function",E,"addModelChangedListener:listener");null===this.Rg&&(this.Rg=new I("function"));this.Rg.add(a);this.ba.xm(a)};E.prototype.removeModelChangedListener=function(a){v.j(a,"function",E,"removeModelChangedListener:listener");null!==this.Rg&&(this.Rg.remove(a),0===this.Rg.count&&(this.Rg=null));this.ba.Ot(a)}; +E.prototype.addChangedListener=E.prototype.xm=function(a){v.j(a,"function",E,"addChangedListener:listener");null===this.ei&&(this.ei=new I("function"));this.ei.add(a)};E.prototype.removeChangedListener=E.prototype.Ot=function(a){v.j(a,"function",E,"removeChangedListener:listener");null!==this.ei&&(this.ei.remove(a),0===this.ei.count&&(this.ei=null))}; +E.prototype.nw=function(a){this.tb||this.la.WD(a);a.wc!==Af&&(this.Yh=!0);if(null!==this.ei){var b=this.ei,c=b.length;if(1===c)b=b.da(0),b(a);else if(0!==c)for(var d=b.cc(),e=0;ea.gh&&(c=a.gh);e=v.Mb(a.kb.x+h/b-h/c,a.kb.y+k/b-k/c);a.position=e;v.v(e);a.Tb=c;a.Lt(d,a.rb);a.Pc=!1;Ck(a,!1);c= +a.Na;c.pc&&Xj(c,b,a.Tb);a.pa();Nk(a)}}E.prototype.Lt=function(a,b,c){if(!a.K(b)){void 0===c&&(c=!1);c||Nk(this);zk(this);var d=this.Pb;null===d||!d.Lw||this.bl!==Xg||c||a.width===b.width&&a.height===b.height||d.H();d=this.Xa;!0===this.Ul&&d instanceof Qg&&(this.N.ca=this.qF(this.N.jf),Fj(d,this));this.Pc||this.$D(a,b);$k(this);this.Ba("ViewportBoundsChanged",c?v.gj:null,a)}}; +function $k(a,b){void 0===b&&(b=null);var c=a.hd;if(null!==c&&c.visible){for(var d=v.Fl(),e=1,f=1,h=c.za.n,k=h.length,l=0;ln||(yl(m.Ab)?f=f*n/te(f,n):e=e*n/te(e,n))}h=c.Ew;d.m(f*h.width,e*h.height);h=f=l=k=0;if(null!==b)k=b.width,l=b.height,f=b.x,h=b.y;else{e=v.$f();f=a.rb;e.m(f.x,f.y,f.width,f.height);for(h=a.Cv.i;h.next();)f=h.value.rb,f.G()&&$a(e,f.x,f.y,f.width,f.height);if(!e.G()){v.Vb(e);return}k=e.width;l=e.height;f=e.x;h=e.y;v.Vb(e)}c.width=k+2*d.width;c.height= +l+2*d.height;e=v.L();Pa(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);v.Zj(d);c.Y.location=e;v.v(e)}}E.prototype.clearSelection=E.prototype.ow=function(){var a=0a&&v.va(a,">= 0",E,"scrollHorizontalLineChange"),this.Mv=a,this.h("scrollHorizontalLineChange",b,a))}); +v.defineProperty(E,{Ut:"scrollVerticalLineChange"},function(){return this.Qv},function(a){var b=this.Qv;b!==a&&(v.j(a,"number",E,"scrollVerticalLineChange"),0>a&&v.va(a,">= 0",E,"scrollVerticalLineChange"),this.Qv=a,this.h("scrollVerticalLineChange",b,a))});v.defineProperty(E,{N:"lastInput"},function(){return this.Nb},function(a){this.Nb=a});v.defineProperty(E,{yc:"firstInput"},function(){return this.qi},function(a){this.qi=a}); +v.defineProperty(E,{$b:"currentCursor"},function(){return this.Gu},function(a){""===a&&(a=this.tq);this.Gu!==a&&(v.j(a,"string",E,"currentCursor"),null!==this.zb&&(this.Gu=a,this.zb.style.cursor=a,this.Kb.style.cursor=a))});v.defineProperty(E,{CJ:"defaultCursor"},function(){return this.tq},function(a){""===a&&(a="auto");var b=this.tq;b!==a&&(v.j(a,"string",E,"defaultCursor"),this.tq=a,this.h("defaultCursor",b,a))}); +v.defineProperty(E,{click:"click"},function(){return this.fi},function(a){var b=this.fi;b!==a&&(null!==a&&v.j(a,"function",E,"click"),this.fi=a,this.h("click",b,a))});v.defineProperty(E,{at:"doubleClick"},function(){return this.oi},function(a){var b=this.oi;b!==a&&(null!==a&&v.j(a,"function",E,"doubleClick"),this.oi=a,this.h("doubleClick",b,a))}); +v.defineProperty(E,{ez:"contextClick"},function(){return this.ii},function(a){var b=this.ii;b!==a&&(null!==a&&v.j(a,"function",E,"contextClick"),this.ii=a,this.h("contextClick",b,a))});v.defineProperty(E,{Tz:"mouseOver"},function(){return this.Bi},function(a){var b=this.Bi;b!==a&&(null!==a&&v.j(a,"function",E,"mouseOver"),this.Bi=a,this.h("mouseOver",b,a))}); +v.defineProperty(E,{Sz:"mouseHover"},function(){return this.Ai},function(a){var b=this.Ai;b!==a&&(null!==a&&v.j(a,"function",E,"mouseHover"),this.Ai=a,this.h("mouseHover",b,a))});v.defineProperty(E,{Rz:"mouseHold"},function(){return this.zi},function(a){var b=this.zi;b!==a&&(null!==a&&v.j(a,"function",E,"mouseHold"),this.zi=a,this.h("mouseHold",b,a))}); +v.defineProperty(E,{VH:"mouseDragOver"},function(){return this.vv},function(a){var b=this.vv;b!==a&&(null!==a&&v.j(a,"function",E,"mouseDragOver"),this.vv=a,this.h("mouseDragOver",b,a))});v.defineProperty(E,{Qz:"mouseDrop"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(null!==a&&v.j(a,"function",E,"mouseDrop"),this.yi=a,this.h("mouseDrop",b,a))}); +v.defineProperty(E,{yA:"toolTip"},function(){return this.Ii},function(a){var b=this.Ii;b!==a&&(null!==a&&v.A(a,Sg,E,"toolTip"),this.Ii=a,this.h("toolTip",b,a))});v.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(null!==a&&v.A(a,Sg,E,"contextMenu"),this.ji=a,this.h("contextMenu",b,a))}); +v.defineProperty(E,{nb:"commandHandler"},function(){return this.Mx},function(a){var b=this.Mx;b!==a&&(v.A(a,Wf,E,"commandHandler"),null!==a.g&&v.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Mc(null),this.Mx=a,a.Mc(this))});v.defineProperty(E,{$a:"toolManager"},function(){return this.Qy},function(a){var b=this.Qy;b!==a&&(v.A(a,Qg,E,"toolManager"),null!==a.g&&v.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Mc(null),this.Qy=a,a.Mc(this))}); +v.defineProperty(E,{$s:"defaultTool"},function(){return this.Sx},function(a){var b=this.Sx;b!==a&&(v.A(a,Vf,E,"defaultTool"),this.Sx=a,this.Xa===b&&(this.Xa=a))});v.defineProperty(E,{Xa:"currentTool"},function(){return this.Qx},function(a){var b=this.Qx;null!==b&&(b.qa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.$s);null!==a&&(v.A(a,Vf,E,"currentTool"),this.Qx=a,a.Mc(this),a.doStart())});v.u(E,{selection:"selection"},function(){return this.Sv}); +v.defineProperty(E,{NH:"maxSelectionCount"},function(){return this.rv},function(a){var b=this.rv;if(b!==a)if(v.j(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.rv=a,this.h("maxSelectionCount",b,a),!this.la.ib&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); +v.defineProperty(E,{YH:"nodeSelectionAdornmentTemplate"},function(){return this.wv},function(a){var b=this.wv;b!==a&&(v.A(a,Sg,E,"nodeSelectionAdornmentTemplate"),this.wv=a,this.h("nodeSelectionAdornmentTemplate",b,a))});v.defineProperty(E,{dH:"groupSelectionAdornmentTemplate"},function(){return this.Wu},function(a){var b=this.Wu;b!==a&&(v.A(a,Sg,E,"groupSelectionAdornmentTemplate"),this.Wu=a,this.h("groupSelectionAdornmentTemplate",b,a))}); +v.defineProperty(E,{HH:"linkSelectionAdornmentTemplate"},function(){return this.nv},function(a){var b=this.nv;b!==a&&(v.A(a,Sg,E,"linkSelectionAdornmentTemplate"),this.nv=a,this.h("linkSelectionAdornmentTemplate",b,a))});v.u(E,{Pm:"highlighteds"},function(){return this.av}); +v.defineProperty(E,{Yh:"isModified"},function(){var a=this.la;return a.isEnabled?null!==a.Pi?!0:this.sy&&this.Og!==a.Ui:this.sy},function(a){if(this.sy!==a){v.j(a,"boolean",E,"isModified");this.sy=a;var b=this.la;!a&&b.isEnabled&&(this.Og=b.Ui);a||zl(this)}});function zl(a){var b=a.Yh;a.YC!==b&&(a.YC=b,a.Ba("Modified"))} +v.defineProperty(E,{ba:"model"},function(){return this.Vd},function(a){var b=this.Vd;if(b!==a){v.A(a,F,E,"model");this.Xa.doCancel();null!==b&&b.la!==a.la&&b.la.iE&&v.k("Do not replace a Diagram.model while a transaction is in progress.");this.Na.Zh();this.ow();this.Qg=!1;this.Ln=!0;this.Og=-2;this.Kf=!1;var c=this.Gd;this.Gd=!0;this.Na.Ym("Model");null!==b&&(null!==this.Rg&&this.Rg.each(function(a){b.Ot(a)}),b.Ot(this.fC),b instanceof Q&&Al(this,b.yg),Al(this,b.Xf));this.Vd=a;a.xm(this.eC);Bl(this, +a.Xf);a instanceof Q&&Cl(this,a.yg);a.Ot(this.eC);a.xm(this.fC);null!==this.Rg&&this.Rg.each(function(b){a.xm(b)});this.Gd=c;this.Pc||this.pa();null!==b&&(a.la.isEnabled=b.la.isEnabled)}});v.defineProperty(E,{Ra:null},function(){return this.YB},function(a){this.YB=a});v.u(E,{Qw:null},function(){return this.FF}); +function lk(a,b){if(b.ba===a.ba){var c=b.wc,d=b.propertyName;if(c===Af&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.$a,c.Pe.each(function(b){b.Mc(a)}),c.Uf.each(function(b){b.Mc(a)}),c.Vf.each(function(b){b.Mc(a)}),a.Gd||a.Qg||(a.Mu=!0,a.Ln&&(a.Kf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Na;e.df&&!a.tb&&e.Zh();a.Ba("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Na,e.df&&!a.tb&&e.Zh());else if(a.Ra){a.Ra=!1;try{var f=b.hf;if(""!==f)if(c===zf){if("linkFromKey"===f){var h= +b.object,k=a.Of(h);if(null!==k){var l=b.newValue,m=a.Ze(l);k.T=m}}else if("linkToKey"===f)h=b.object,k=a.Of(h),null!==k&&(l=b.newValue,m=a.Ze(l),k.Z=m);else if("linkFromPortId"===f){if(h=b.object,k=a.Of(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.wg=n)}}else if("linkToPortId"===f)h=b.object,k=a.Of(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.qh=n));else if("nodeGroupKey"===f){var h=b.object,p=a.dh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Ze(q);p.Ta=r instanceof V?r: +null}else p.Ta=null}}else if("linkLabelKeys"===f){if(h=b.object,k=a.Of(h),null!==k){var s=b.oldValue,t=b.newValue;if(v.isArray(s))for(var u=v.Wa(s),y=0;yl)){var m=l;Jl(k)&&m++;k.Ne(m);Kl(k,m,l)}}}}function ql(a,b){var c=b.uj;if(v.isArray(c)){var d=a.Xl.ja(c);if(null===d)d=[],d.push(b),a.Xl.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):v.va(a,"> 0",E,"minScale"))}); +v.defineProperty(E,{gh:"maxScale"},function(){return this.qv},function(a){v.We(a,E,"maxScale");var b=this.qv;b!==a&&(0 0",E,"maxScale"))});v.defineProperty(E,{Il:"zoomPoint"},function(){return this.ew},function(a){this.ew.K(a)||(v.A(a,z,E,"zoomPoint"),this.ew=a=a.R())}); +v.defineProperty(E,{vD:"contentAlignment"},function(){return this.un},function(a){var b=this.un;b.K(a)||(v.A(a,L,E,"contentAlignment"),this.un=a=a.R(),this.h("contentAlignment",b,a),Ck(this,!1))});v.defineProperty(E,{RJ:"initialContentAlignment"},function(){return this.Pn},function(a){var b=this.Pn;b.K(a)||(v.A(a,L,E,"initialContentAlignment"),this.Pn=a=a.R(),this.h("initialContentAlignment",b,a))}); +v.defineProperty(E,{padding:"padding"},function(){return this.Ue},function(a){"number"===typeof a?a=new cb(a):v.A(a,cb,E,"padding");var b=this.Ue;b.K(a)||(this.Ue=a=a.R(),this.qc(),this.h("padding",b,a))});v.u(E,{Ag:"nodes"},function(){return this.ko.i});v.u(E,{links:"links"},function(){return this.bo.i});v.u(E,{dk:"parts"},function(){return this.wb.i}); +E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new J(R),b=this.ko.i;b.next();){var c=b.value;c.fp&&a.add(c)}for(b=this.bo.i;b.next();)c=b.value,c.fp&&a.add(c);return a.i};E.prototype.findTopLevelGroups=function(){return this.Vk.i};v.defineProperty(E,{Pb:"layout"},function(){return this.Ud},function(a){var b=this.Ud;b!==a&&(v.A(a,Xf,E,"layout"),null!==b&&(b.g=null,b.group=null),this.Ud=a,a.g=this,a.group=null,this.vu=!0,this.h("layout",b,a),this.ue())}); +E.prototype.layoutDiagram=function(a){Ak(this);a&&Pl(this,!0);al(this,!1)};function Pl(a,b){for(var c=a.Vk.i;c.next();)Xl(a,c.value,b);null!==a.Pb&&(b?a.Pb.wf=!1:a.Pb.H())}function Xl(a,b,c){if(null!==b){for(var d=b.ho.i;d.next();)Xl(a,d.value,c);null!==b.Pb&&(c?b.Pb.wf=!1:b.Pb.H())}} +function al(a,b){if(!a.Tx){var c=a.Pb,d=a.Ra;a.Ra=!0;try{a.Qb("Layout");var e=a.Na;1!==a.la.rh||e.df||e.pc||e.Ym("Layout");for(var f=a.Vk.i;f.next();)Yl(a,f.value,b);c.wf||b&&!c.lE&&1!==a.la.rh||(c.doLayout(a),Ak(a),c.wf=!0)}finally{a.wd("Layout"),a.vu=!c.wf,a.Ra=d}}}function Yl(a,b,c){if(null!==b){for(var d=b.ho.i;d.next();)Yl(a,d.value,c);d=b.Pb;null===d||d.wf||c&&!d.lE||(b.Cy=!b.location.G(),d.doLayout(b),b.H(Zl),d.wf=!0,dl(a,b))}} +v.defineProperty(E,{Pd:"isTreePathToChildren"},function(){return this.iv},function(a){var b=this.iv;if(b!==a&&(v.j(a,"boolean",E,"isTreePathToChildren"),this.iv=a,this.h("isTreePathToChildren",b,a),!this.la.ib))for(a=this.Ag;a.next();)$l(a.value)});E.prototype.findTreeRoots=function(){for(var a=new I(S),b=this.Ag;b.next();){var c=b.value;c.fp&&null===c.Wo()&&a.add(c)}return a.i}; +v.defineProperty(E,{zA:"treeCollapsePolicy"},function(){return this.$v},function(a){var b=this.$v;b!==a&&(v.pb(a,E,E,"treeCollapsePolicy"),this.$v=a,this.h("treeCollapsePolicy",b,a))});v.defineProperty(E,{eh:null},function(){return this.MB},function(a){this.MB=a}); +function ik(a){function b(a){var b=a.toLowerCase(),h=new I("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new na("string",I),d=new na("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); +b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Vx=c;a.Ux=d} +function qa(a,b){var c=a.Ux.ja(b);return null!==c?c:a.Ux.ja(b.toLowerCase())}function am(a,b){var c=a.Vx.ja(b);if(null!==c)return c;c=a.Vx.ja(b.toLowerCase());if(null!==c)return c;v.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.Wy=function(a,b){v.j(a,"string",E,"addDiagramListener:name");v.j(b,"function",E,"addDiagramListener:listener");var c=am(this,a);null!==c&&c.add(b)}; +E.prototype.removeDiagramListener=E.prototype.FE=function(a,b){v.j(a,"string",E,"removeDiagramListener:name");v.j(b,"function",E,"addDiagramListener:listener");var c=am(this,a);null!==c&&c.remove(b)};E.prototype.raiseDiagramEvent=E.prototype.Ba=function(a,b,c){var d=am(this,a),e=new xf;e.g=this;e.name=qa(this,a);void 0!==b&&(e.uA=b);void 0!==c&&(e.$z=c);a=d.length;if(1===a)d=d.da(0),d(e);else if(0!==a)for(b=d.cc(),c=0;c=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.rb,f=a.scale,e=v.gk(0,0,e.width*f,e.height*f),h=v.Mb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Tt,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.Ut,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Fc(ad)||(c=new z(c.x+h.x/f,c.y+h.y/f));v.Vb(e);v.v(h);return c}E.prototype.makeSVG=E.prototype.makeSvg=function(a){void 0===a&&(a=new ta);a.context="svg";a=jm(this,a);return null!==a?a.Dl:null}; +E.prototype.makeImage=function(a){void 0===a&&(a=new ta);var b=(a.document||document).createElement("img");b.src=this.IH(a);return b};E.prototype.makeImageData=E.prototype.IH=function(a){void 0===a&&(a=new ta);var b=jm(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var km=!1; +function jm(a,b){a.Na.Zh();a.Tf();if(null===a.zb)return null;"object"!==typeof b&&v.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var f=b.maxSize;void 0===b.maxSize&&(c=!0,f="svg"===b.context?new ia(Infinity,Infinity):new ia(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= +b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new cb(l):l instanceof cb||(l=new cb(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Hn=!1;Zc(a.lf,!0);var s=new Rc(null,p),t=s.dl,u=s;if(!(d||e||k||h))return s.width=a.Eb+Math.ceil(l.left+l.right),s.height=a.Jb+Math.ceil(l.top+l.bottom),"svg"===b.context&&(t=u=new Cc(s.xd,p,q),t instanceof Cc&& +(a.Hn=!0)),kl(a,t,l,new ia(s.width,s.height),a.Tb,a.kb,k,m,r,n),a.Hn=!0,u;var y=a.nb.tw,w=new z(0,0),x=a.Zd.copy();x.GI(a.padding);if(r)for(var A=!0,A=a.Yb.n,H=A.length,C=0;Cy?(e=y,h=x.width,aa=x.height):(h=f.width,aa=f.height)):(h=x.width*e,aa=x.height*e):(e=y,h=x.width,aa=x.height);null!==l?(h+=ba,aa+=A):l=new cb(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!km&&(h>d||aa>f)&&(v.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(aa)+" vs 2000x2000) Consider increasing the max size."), +km=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&(aa=Math.min(aa,f)));s.width=Math.ceil(h);s.height=Math.ceil(aa);"svg"===b.context&&(t=u=new Cc(s.xd,p,q),t instanceof Cc&&(a.Hn=!0));kl(a,t,l,new ia(Math.ceil(h),Math.ceil(aa)),e,w,k,m,r,n);a.Hn=!0;return u}E.inherit=function(a,b){v.j(a,"function",E,"inherit");v.j(b,"function",E,"inherit");b.RF&&v.k("Cannot inherit from "+v.af(b));v.Ja(a,b)}; +function rk(){this.UF="63ad05bbe23a1786468a4c741b6d2";this.cg=this.UF===this._tk?!0:null} +rk.prototype.Hl=function(a){a.lf.setTransform(a.rd,0,0,a.rd,0,0);if(null===this.cg)a:{var b="f",c=window[v.tg("76a715b2f73f148a")][v.tg("72ba13b5")];a=v.tg;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){this.cg=!0;var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9")),e=a(d[1]).split("."),f=v[a("6cae19")].split(".");if(e[0]>f[0]||e[0]===f[0]&&e[1]>=f[1]){e=c[a("76ad18b4f73e")];for(f=c[a("73a612b6fb191d")](a("35e7"))+2;fc&&a(d[2])!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));0>c&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));this.cg=!(0<=c&&cc&&a(v.adym)!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));if(this.cg=!(0<=c&&cb.timeStamp-a.Zl)b.preventDefault();else if(a.Fk)b.preventDefault();else{a.Sc=a.Nb;a.Nb=c;Ik(a,a,b,c,!0);c.jl=!0;c.Ge=b.detail;if(v.fE||v.gE)b.timeStamp-a.Zlb.timeStamp-a.Zl){b.preventDefault();return}a.Zl=b.timeStamp}if(v.Qm&&null!==a.qs)a.qs=null,b.preventDefault();else{a.Sc=a.Nb;a.Nb=c;Ik(a,a,b,c,!0);c.up=!0; +c.Ge=b.detail;if(v.fE||v.gE)c.Ge=a.Ik;c.bubbles=b.bubbles;b.target.W&&(c.Ig=b.target.W);a.aF(b,null,new z,c.Ig)||(a.doMouseUp(),Bh(a),Mk(c,b))}}};a.jh=function(b){if(a.isEnabled){var c=a.Sc;a.Sc=a.Nb;a.Nb=c;Ik(a,a,b,c,!0);c.bubbles=!0;c.hl=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();Mk(c,b)}};a.pp=function(){if(a.isEnabled){a.Ul=!1;var b=a.Xa;b.cancelWaitAfter();b instanceof Qg&&b.hideToolTip()}};a.lF=function(b){if(a.isEnabled){a.ys=!1;a.Fk=!0;var c=a.Sc;a.Sc=a.Nb;a.Nb=c;Kk(a, +b,b.targetTouches[0],c,1a.Fv)){var c=a.Jf;c[0].pointerId=== +b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Sc,a.Sc=a.Nb,a.Nb=c,Lk(a,b,b,c,!0),a.px(b,null,c.Ig)||(a.doMouseMove(),Mk(c,b)))}};a.bI=function(b){if("touch"===b.pointerType){var c=a.tC;void 0!==c[b.pointerId]&&(a.Fv--,delete c[b.pointerId],c=a.Jf,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};Zc(d,!0);vk(a)} +function lm(a){1a)&&v.va(a,"0 <= loc <= 1",ha,"addColorStop:loc");v.j(b,"string",ha,"addColorStop:color");null===this.Mg&&(this.Mg=new na("number","string"));this.Mg.add(a,b);this.ia===Sf&&(this.type=Tf);this.Ng=null}; +v.defineProperty(ha,{type:"type"},function(){return this.ia},function(a){this.D&&v.ka(this,a);v.pb(a,ha,ha,"type");this.ia=a;this.start.se()&&(a===Tf?this.start=tb:a===Yc&&(this.start=zb));this.end.se()&&(a===Tf?this.end=Db:a===Yc&&(this.end=zb));this.Ng=null});v.defineProperty(ha,{color:"color"},function(){return this.rn},function(a){this.D&&v.ka(this,a);this.rn=a;this.Ng=null}); +v.defineProperty(ha,{start:"start"},function(){return this.uo},function(a){this.D&&v.ka(this,a);v.A(a,L,ha,"start");this.uo=a.R();this.Ng=null});v.defineProperty(ha,{end:"end"},function(){return this.Jn},function(a){this.D&&v.ka(this,a);v.A(a,L,ha,"end");this.Jn=a.R();this.Ng=null});v.defineProperty(ha,{cu:"startRadius"},function(){return this.Vv},function(a){this.D&&v.ka(this,a);v.We(a,ha,"startRadius");0>a&&v.va(a,">= zero",ha,"startRadius");this.Vv=a;this.Ng=null}); +v.defineProperty(ha,{bt:"endRadius"},function(){return this.Ru},function(a){this.D&&v.ka(this,a);v.We(a,ha,"endRadius");0>a&&v.va(a,">= zero",ha,"endRadius");this.Ru=a;this.Ng=null});v.defineProperty(ha,{Ys:"colorStops"},function(){return this.Mg},function(a){this.D&&v.ka(this,a);this.Mg=a;this.Ng=null});v.defineProperty(ha,{pattern:"pattern"},function(){return this.Ev},function(a){this.D&&v.ka(this,a);this.Ev=a;this.Ng=null}); +ha.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+d+e+c};var sm=(new Rc(null)).dl,ga; +ha.isValidColor=ga=function(a){if("black"===a)return!0;if(""===a)return!1;sm.fillStyle="#000000";var b=sm.fillStyle;sm.fillStyle=a;if(sm.fillStyle!==b)return!0;sm.fillStyle="#FFFFFF";b=sm.fillStyle;sm.fillStyle=a;return sm.fillStyle!==b}; +function G(){v.dc(this);this.fa=30723;this.Rc=1;this.Wg=null;this.Ob="";this.nc=this.Ib=null;this.kb=(new z(NaN,NaN)).freeze();this.mf=Ed;this.Cj=pd;this.Aj=Cd;this.me=new ja;this.Up=new ja;this.Nk=new ja;this.Tb=this.Ou=1;this.Kl=0;this.Ph=tm;this.kr=cd;this.jd=(new B(NaN,NaN,NaN,NaN)).freeze();this.mc=(new B(NaN,NaN,NaN,NaN)).freeze();this.Qc=(new B(0,0,NaN,NaN)).freeze();this.Bs=this.Eq=this.ga=this.Lr=this.Mr=null;this.Cs=this.Fq=Infinity;this.Tp=this.Ae=fc;this.$r=0;this.Fi=1;this.bq=0;this.hi= +1;this.us=null;this.es=-Infinity;this.ds=0;this.fs=ad;this.gs=Di;this.mq="";this.sc=this.ha=null;this.on=-1;this.jm=this.ps=this.gi=this.vk=this.to=null}v.Uh(G);v.ea("GraphObject",G); +G.prototype.cloneProtected=function(a){a.fa=this.fa|6144;a.Rc=this.Rc;a.Ob=this.Ob;a.Ib=this.Ib;a.nc=this.nc;a.kb.assign(this.kb);a.mf=this.mf.R();a.Cj=this.Cj.R();a.Aj=this.Aj.R();a.Nk=this.Nk.copy();a.Tb=this.Tb;a.Kl=this.Kl;a.Ph=this.Ph;a.kr=this.kr.R();a.jd.assign(this.jd);a.mc.assign(this.mc);a.Qc.assign(this.Qc);a.Lr=this.Lr;null!==this.ga&&(a.ga=this.ga.copy());a.Eq=this.Eq;a.Bs=this.Bs;a.Fq=this.Fq;a.Cs=this.Cs;a.Ae=this.Ae.R();a.Tp=this.Tp.R();a.$r=this.$r;a.Fi=this.Fi;a.bq=this.bq;a.hi= +this.hi;a.us=this.us;a.es=this.es;a.ds=this.ds;a.fs=this.fs.R();a.gs=this.gs;a.mq=this.mq;null!==this.ha&&(a.ha=this.ha.copy());a.sc=this.sc;a.on=this.on;null!==this.vk&&(a.vk=v.el(this.vk));null!==this.gi&&(a.gi=this.gi.copy());a.ps=this.ps};G.prototype.addCopyProperty=G.prototype.bG=function(a){var b=this.vk;if(v.isArray(b))for(var c=0;ck;)k+=f[n++%l],p=!p;q=!1}else k=f[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}}G.prototype.raiseChangedEvent=G.prototype.Lc=function(a,b,c,d,e,f,h){var k=this.Y;null!==k&&(k.Zm(a,b,c,d,e,f,h),0!==(this.fa&1024)&&c===this&&a===zf&&Bm(this,k,b))}; +function Bm(a,b,c){var d=a.Vo();if(null!==d)for(var e=a.sc.i;e.next();){var f=e.value,h=null;if(null!==f.cn){h=Ag(f,d,a);if(null===h)continue;f.tx(a,h,c,null)}else if(f.yt){var k=b.g;null===k||k.we||f.tx(a,k.ba.bk,c,k)}else{var l=d.data;if(null===l)continue;k=b.g;null===k||k.we||f.tx(a,l,c,k)}null!==h&&(k=d.zw(f.El),null!==k&&f.tF(k,h,c))}}G.prototype.zw=function(a){return this.on===a?this:null};G.prototype.raiseChanged=G.prototype.h=function(a,b,c){this.Lc(zf,a,this,b,c)}; +function Cm(a,b,c,d,e){var f=a.jd,h=a.Nk;h.reset();Dm(a,h,b,c,d,e);a.Nk=h;f.x=b;f.y=c;f.width=d;f.height=e;h.vt()||h.pF(f)}function Em(a,b,c,d){if(!1===a.Gg)return!1;d.multiply(a.transform);return c?a.xg(b,d):a.Fm(b,d)} +G.prototype.MD=function(a,b,c){if(!1===this.Gg)return!1;var d=this.Ha;b=a.rf(b);var e=!1;c&&(e=Sa(a.x,a.y,0,0,0,d.height)a&&(a+=360));return a}; +G.prototype.getDocumentScale=G.prototype.Si=function(){if(0!==(this.fa&4096)===!1)return this.Ou;var a=this.Tb;return null!==this.S?a*this.S.Si():a};G.prototype.getLocalPoint=G.prototype.RD=function(a,b){void 0===b&&(b=new z);b.assign(a);this.Yg.Wh(b);return b};G.prototype.getNearestIntersectionPoint=G.prototype.SD=function(a,b,c){return this.$o(a.x,a.y,b.x,b.y,c)};g=G.prototype; +g.$o=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy);if(null!==this.Am)return f=this.U,ge(f.left,f.top,f.right,f.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.m(0,0);d=this.Ha;c=ge(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c}; +function ij(a,b,c,d,e){if(!1!==el(a)){var f=a.margin,h=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-h,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-f,0);var h=a.angle,f=0,f=a.xa,k=0;a.lb&&(k=a.lb);90===h||270===h?(b=isFinite(f.height)?f.height+k:b,c=isFinite(f.width)?f.width+k:c):(b=isFinite(f.width)?f.width+k:b,c=isFinite(f.height)?f.height+k:c);var f=d||0,k=e||0,l=a instanceof D;switch(Fm(a,!0)){case Qi:k=f=0;l&&(c=b=Infinity);break;case He:isFinite(b)&&b>d&&(f=b);isFinite(c)&& +c>e&&(k=c);break;case vm:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case um:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.xf,m=a.ih;f>l.width&&m.widthl.height&&m.heighta.height||this.Kk.Te>a.width))&&(c=!0);this.fa=c?this.fa|256:this.fa&-257;this.mc.G()|| +v.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.mc.toString());this.Tw(f,this.mc);v.Vb(f)};g.Mi=function(){}; +function Gm(a,b,c,d,e){var f=a.U;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.xa.G()){f=a.jd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=f.width+b;f=f.height+h;d+=b;e+=h;b=Fm(a,!0);c===d&&f===e&&(b=Qi);switch(b){case Qi:if(c>d||f>e)Qk(a,!0),ij(a,c>d?d:c,f>e?e:f);break;case He:Qk(a,!0);ij(a,d,e,0,0);break;case vm:Qk(a,!0);ij(a,d,f,0,0);break;case um:Qk(a,!0),ij(a,c,e,0,0)}}} +g.Tw=function(a,b){Hm(this,!1);var c=this.Y;if(null!==c&&null!==c.g){var d=this.Y;null!==d&&(d.Wt!==this&&d.ME!==this&&d.PE!==this||Im(d,!0));this.pa();a.K(b)||(c.rl(),this.xv(c))}};g.xv=function(a){null!==this.Rd&&Im(a,!0)};v.defineProperty(G,{Gp:"shadowVisible"},function(){return this.ps},function(a){var b=this.ps;b!==a&&(this.ps=a,this.h("shadowVisible",b,a))}); +G.prototype.Xe=function(a,b){if(this.visible){var c=this.mc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof Cc)a:{if(this.visible){var f=null,h=a.Mw;if(this instanceof D&&(this.type===Jm||this.type===Km))Lm(this,a,b);else{var k=this.mc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.S;0!==(this.fa&4096)===!0&&Mm(this);var c=0!==(this.fa&256),n=!1;this instanceof +Zg&&(a.font=this.font);if(c){n=m.Kg()?m.Ha:m.U;if(null!==this.gi)var p=this.gi,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;Ec(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}q=!1;if(this instanceof R){var t=this,q=!0;if(!t.isVisible())break a}a.Qi.ff=[1,0,0,1,0,0];r=!1;q&&this.wl&&b.Ti("drawShadows")&&(s=this.rm, +a.rA(s.x*b.scale*b.rd,s.y*b.scale*b.rd,t.ng),a.bn(),a.shadowColor=t.qm);t=!1;this.Y&&b.Ti("drawShadows")&&(t=this.Y.wl);!0===this.Gp?(a.bn(),!1===r&&t&&(Ec(a,1,0,0,1,0,0),a.Za(),r=!0)):!1===this.Gp&&a.an();null!==this.nc&&(Nm(this,a,this.nc,!0,!0),!1===r&&t&&(Ec(a,1,0,0,1,0,0),a.Za(),r=!0),this.nc instanceof ha&&this.nc.type===Yc?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.ug(this.nc)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof D?Ec(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.Qi.ff=[l.m11, +l.m12,l.m21,l.m22,l.dx,l.dy];if(null!==this.Ib){!1===r&&t&&(Ec(a,1,0,0,1,0,0),a.Za(),r=!0);var p=this.Ha,l=k=0,s=p.width,p=p.height,u=0;this instanceof Y&&(p=this.Sa.mb,k=p.x,l=p.y,s=p.width,p=p.height,u=this.Qh);Nm(this,a,this.Ib,!0,!1);this.Ib instanceof ha&&this.Ib.type===Yc?(a.beginPath(),a.rect(k-u/2,l-u/2,s+u,p+u),a.ug(this.Ib)):a.fillRect(k-u/2,l-u/2,s+u,p+u)}t&&(null!==this.Ib||null!==this.nc||null!==m&&0!==(m.fa&512)||null!==m&&(m.type===uk||m.type===Oi)&&m.Ye()!==this)?(Om(this,!0),null=== +this.Gp&&a.an()):Om(this,!1);this.Xj(a,b);t&&0!==(this.fa&512)===!0&&a.bn();q&&t&&a.an();c&&(a.restore(),n&&a.tf.pop());this instanceof D&&(f=a.tf.pop());!0===r&&a.tf.pop();null!==a.GD&&(null===f&&(h===a.Mw?(Ec(a,1,0,0,1,0,0),f=a.tf.pop()):f=a.Mw),a.GD(this,f))}}}}else{if(this instanceof D&&(this.type===Jm||this.type===Km)){Lm(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof W&&this.Um(!1);f=this.transform;h=this.S;0!==(this.fa&4096)===!0&&Mm(this);m=0!==(this.fa&256);this instanceof Zg&& +(a.font=this.font);if(m){n=h.Kg()?h.Ha:h.U;null!==this.gi?(t=this.gi,k=t.x,l=t.y,q=t.width,t=t.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),q=Math.min(c.right,n.right)-k,t=Math.min(c.bottom,n.bottom)-l);if(k>c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,q,t);a.clip()}n=!1;if(this instanceof R){n=!0;if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.wl&&b.Ti("drawShadows")&&(k=this.rm,a.rA(k.x*b.scale*b.rd, +k.y*b.scale*b.rd,this.ng),a.bn(),a.shadowColor=this.qm)}k=!1;this.Y&&b.Ti("drawShadows")&&(k=this.Y.wl);!0===this.Gp?a.bn():!1===this.Gp&&a.an();null!==this.nc&&(Nm(this,a,this.nc,!0,!0),this.nc instanceof ha&&this.nc.type===Yc?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.ug(this.nc)):a.fillRect(c.x,c.y,c.width,c.height));f.vt()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Ib&&(t=this.Ha,l=c=0,q=t.width,t=t.height,r=0,this instanceof Y&&(t=this.Sa.mb,c=t.x,l=t.y,q=t.width,t=t.height, +r=this.Qh),Nm(this,a,this.Ib,!0,!1),this.Ib instanceof ha&&this.Ib.type===Yc?(a.beginPath(),a.rect(c-r/2,l-r/2,q+r,t+r),a.ug(this.Ib)):a.fillRect(c-r/2,l-r/2,q+r,t+r));k&&(null!==this.Ib||null!==this.nc||null!==h&&0!==(h.fa&512)||null!==h&&(h.type===uk||h.type===Oi)&&h.Ye()!==this)?(Om(this,!0),null===this.Gp&&a.an()):Om(this,!1);this.Xj(a,b);k&&0!==(this.fa&512)===!0&&a.bn();n&&k&&a.an();m?(a.restore(),this instanceof D?Zc(a,!0):Zc(a,!1)):f.vt()||(h=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22* +h,-f.m12*h,-f.m21*h,f.m11*h,h*(f.m21*f.dy-f.m22*f.dx),h*(f.m12*f.dx-f.m11*f.dy)))}1!==d&&(a.globalAlpha=e)}}}; +function Lm(a,b,c){var d=a.mc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.nc&&(Nm(a,b,a.nc,!0,!0),a.nc instanceof ha&&a.nc.type===Yc?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ug(a.nc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Ib&&(Nm(a,b,a.Ib,!0,!1),a.Ib instanceof ha&&a.Ib.type===Yc?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ug(a.Ib)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xj(b,c))}G.prototype.Xj=function(){}; +function Nm(a,b,c,d,e){if(null!==c){var f=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Sf)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ha,f=h.width,h=h.height;if(e)var l=a.U,f=l.width,h=l.height;var m=b instanceof Sc;if(m&&c.Ng&&(c.type===rm||c.tn===f&&c.Ox===h))k=c.Ng;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.U,f=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*f+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*f+c.end.offsetX;q=c.end.y*h+c.end.offsetY; +l+=r;p+=r;n+=s;q+=s;if(c.type===Tf)k=b.createLinearGradient(l,n,p,q);else if(c.type===Yc)s=isNaN(c.bt)?Math.max(f,h)/2:c.bt,isNaN(c.cu)?(r=0,s=Math.max(f,h)/2):r=c.cu,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===rm)try{k=b.createPattern(c.pattern,"repeat")}catch(t){k=null}else v.Cd(c.type,"Brush type");if(c.type!==rm&&(e=c.Ys,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.Ng=k,null!==k&&(c.tn=f,c.Ox=h),null===k&&c.type===rm&&-1!==c.tn)){c.tn=-1;var u=a.g;null!==u&& +-1===c.tn&&v.setTimeout(function(){u.$w()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.ul=function(a){if(a instanceof D)a:{if(this!==a&&null!==a)for(var b=this.S;null!==b;){if(b===a){a=!0;break a}b=b.S}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.Yi=function(){if(!this.visible)return!1;var a=this.S;return null!==a?a.Yi():!0}; +function Mm(a){if(0!==(a.fa&2048)===!0){var b=a.me;b.reset();if(!a.mc.G()||!a.jd.G()){Pm(a,!1);return}b.translate(a.mc.x,a.mc.y);b.translate(-a.Ca.x,-a.Ca.y);var c=a.Ha;Dm(a,b,c.x,c.y,c.width,c.height);Pm(a,!1);Qm(a,!0)}0!==(a.fa&4096)===!0&&(b=a.S,null===b?(a.Up.set(a.me),a.Ou=a.scale,Qm(a,!1)):null!==b.Yg&&(c=a.Up,c.reset(),b.Kg()?c.multiply(b.Up):null!==b.S&&c.multiply(b.S.Up),c.multiply(a.me),a.Ou=a.scale*b.Ou,Qm(a,!1)))} +function Dm(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=zb;a.ef&&a.ef.bd()&&(h=a.ef);var k=v.L();if(a instanceof R&&a.bc!==a)for(c=a.bc,d=c.Ha,k.$t(d.x,d.y,d.width,d.height,h),c.Nk.ub(k),k.offset(-c.Ca.x,-c.Ca.y),h=c.S;null!==h&&h!==a;)h.Nk.ub(k),k.offset(-h.Ca.x,-h.Ca.y),h=h.S;else k.$t(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);v.v(k)}}g=G.prototype; +g.P=function(a){void 0===a&&(a=!1);if(!0!==el(this)){Qk(this,!0);Hm(this,!0);var b=this.S;null!==b?a||b.P():(a=this.g,null!==a&&(a.eg.add(this),this instanceof S&&(a.la.ib||this.cf(),null!==this.ee&&Rm(this.ee)),a.ue(!0)));if(this instanceof D){if(this.ia===uk||this.ia===Ai)a=this.Ye(),null!==a&&a.P(!0);a=this.za.n;for(var b=a.length,c=0;ca?a=0:1a||1=a&&v.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Tb=a,this.ri(),this.P(),this.h("scale",b,a))});v.defineProperty(G,{angle:"angle"},function(){return this.Kl},function(a){var b=this.Kl;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Kl=a,this.P(),this.ri(),this.h("angle",b,a)))}); +v.defineProperty(G,{xa:"desiredSize"},function(){return this.mf},function(a){var b=this.mf;b.K(a)||(this.mf=a=a.R(),this.P(),this instanceof Y&&this.re(),this.h("desiredSize",b,a),a=this.Y,null!==a&&0!==(this.fa&1024)&&(Bm(this,a,"width"),Bm(this,a,"height")))}); +v.defineProperty(G,{width:"width"},function(){return this.mf.width},function(a){if(this.mf.width!==a){var b=this.mf;this.mf=a=(new ia(a,this.mf.height)).freeze();this.P();this instanceof Y&&this.re();this.h("desiredSize",b,a);b=this.Y;null!==b&&0!==(this.fa&1024)&&Bm(this,b,"width")}}); +v.defineProperty(G,{height:"height"},function(){return this.mf.height},function(a){if(this.mf.height!==a){var b=this.mf;this.mf=a=(new ia(this.mf.width,a)).freeze();this.P();this instanceof Y&&this.re();this.h("desiredSize",b,a);b=this.Y;null!==b&&0!==(this.fa&1024)&&Bm(this,b,"height")}}); +v.defineProperty(G,{ih:"minSize"},function(){return this.Cj},function(a){var b=this.Cj;b.K(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Cj=a,this.P(),this.h("minSize",b,a))});v.defineProperty(G,{xf:"maxSize"},function(){return this.Aj},function(a){var b=this.Aj;b.K(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Aj=a,this.P(),this.h("maxSize",b,a))});v.u(G,{Ca:"measuredBounds"},function(){return this.jd}); +v.u(G,{Ha:"naturalBounds"},function(){return this.Qc},{configurable:!0});v.defineProperty(G,{margin:"margin"},function(){return this.kr},function(a){"number"===typeof a&&(a=new cb(a));var b=this.kr;b.K(a)||(this.kr=a=a.R(),this.P(),this.h("margin",b,a))});v.u(G,{transform:null},function(){0!==(this.fa&2048)===!0&&Mm(this);return this.me});v.u(G,{Yg:null},function(){0!==(this.fa&4096)===!0&&Mm(this);return this.Up}); +v.defineProperty(G,{alignment:"alignment"},function(){return this.Ae},function(a){var b=this.Ae;b.K(a)||(a.se()&&!a.Uc()&&v.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Ae=a=a.R(),Rm(this),this.h("alignment",b,a))});v.defineProperty(G,{column:"column"},function(){return this.bq},function(a){a=Math.round(a);var b=this.bq;b!==a&&(0>a&&v.va(a,">= 0",G,"column"),this.bq=a,this.P(),this.h("column",b,a))}); +v.defineProperty(G,{tG:"columnSpan"},function(){return this.hi},function(a){a=Math.round(a);var b=this.hi;b!==a&&(1>a&&v.va(a,">= 1",G,"columnSpan"),this.hi=a,this.P(),this.h("columnSpan",b,a))});v.defineProperty(G,{Wb:"row"},function(){return this.$r},function(a){a=Math.round(a);var b=this.$r;b!==a&&(0>a&&v.va(a,">= 0",G,"row"),this.$r=a,this.P(),this.h("row",b,a))}); +v.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.Fi},function(a){a=Math.round(a);var b=this.Fi;b!==a&&(1>a&&v.va(a,">= 1",G,"rowSpan"),this.Fi=a,this.P(),this.h("rowSpan",b,a))});v.defineProperty(G,{qx:"spanAllocation"},function(){return this.us},function(a){var b=this.us;b!==a&&(null!==a&&v.j(a,"function",G,"spanAllocation"),this.us=a,this.h("spanAllocation",b,a))}); +v.defineProperty(G,{Tj:"alignmentFocus"},function(){return this.Tp},function(a){var b=this.Tp;b.K(a)||(!a.se()||a.Uc()||a.K(rb)&&this instanceof S||v.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Tp=a=a.R(),this.P(),this.h("alignmentFocus",b,a))}); +v.defineProperty(G,{Rd:"portId"},function(){return this.Lr},function(a){var b=this.Lr;if(b!==a){var c=this.Y;null===c||c instanceof S||(v.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Ym(c,this);this.Lr=a;if(null!==a&&c){c.Ah=!0;null===c.Wd&&Zm(c);var d=this.Rd;null!==d&&c.Wd.add(d,this)}this.h("portId",b,a)}});function Vm(a){var b=a.Y;b instanceof S&&(a=a.g,null===a||a.la.ib||b.cf())} +v.defineProperty(G,{yb:"toSpot"},function(){return null!==this.ga?this.ga.Qj:rb},function(a){this.Me();var b=this.ga.Qj;b.K(a)||(a=a.R(),this.ga.Qj=a,this.h("toSpot",b,a),Vm(this))});v.defineProperty(G,{Gl:"toEndSegmentLength"},function(){return null!==this.ga?this.ga.Oj:10},function(a){this.Me();var b=this.ga.Oj;b!==a&&(0>a&&v.va(a,">= 0",G,"toEndSegmentLength"),this.ga.Oj=a,this.h("toEndSegmentLength",b,a),Vm(this))}); +v.defineProperty(G,{eu:"toEndSegmentDirection"},function(){return null!==this.ga?this.ga.Nj:zm},function(a){this.Me();var b=this.ga.Nj;b!==a&&(this.ga.Nj=a,this.h("toEndSegmentDirection",b,a),Vm(this))});v.defineProperty(G,{fu:"toShortLength"},function(){return null!==this.ga?this.ga.Pj:0},function(a){this.Me();var b=this.ga.Pj;b!==a&&(this.ga.Pj=a,this.h("toShortLength",b,a),Vm(this))}); +v.defineProperty(G,{gF:"toLinkable"},function(){return this.Bs},function(a){var b=this.Bs;b!==a&&(this.Bs=a,this.h("toLinkable",b,a))});v.defineProperty(G,{MI:"toMaxLinks"},function(){return this.Cs},function(a){var b=this.Cs;b!==a&&(0>a&&v.va(a,">= 0",G,"toMaxLinks"),this.Cs=a,this.h("toMaxLinks",b,a))});v.defineProperty(G,{xb:"fromSpot"},function(){return null!==this.ga?this.ga.pj:rb},function(a){this.Me();var b=this.ga.pj;b.K(a)||(a=a.R(),this.ga.pj=a,this.h("fromSpot",b,a),Vm(this))}); +v.defineProperty(G,{ml:"fromEndSegmentLength"},function(){return null!==this.ga?this.ga.nj:10},function(a){this.Me();var b=this.ga.nj;b!==a&&(0>a&&v.va(a,">= 0",G,"fromEndSegmentLength"),this.ga.nj=a,this.h("fromEndSegmentLength",b,a),Vm(this))});v.defineProperty(G,{kt:"fromEndSegmentDirection"},function(){return null!==this.ga?this.ga.mj:zm},function(a){this.Me();var b=this.ga.mj;b!==a&&(this.ga.mj=a,this.h("fromEndSegmentDirection",b,a),Vm(this))}); +v.defineProperty(G,{lt:"fromShortLength"},function(){return null!==this.ga?this.ga.oj:0},function(a){this.Me();var b=this.ga.oj;b!==a&&(this.ga.oj=a,this.h("fromShortLength",b,a),Vm(this))});v.defineProperty(G,{PD:"fromLinkable"},function(){return this.Eq},function(a){var b=this.Eq;b!==a&&(this.Eq=a,this.h("fromLinkable",b,a))}); +v.defineProperty(G,{vz:"fromMaxLinks"},function(){return this.Fq},function(a){var b=this.Fq;b!==a&&(0>a&&v.va(a,">= 0",G,"fromMaxLinks"),this.Fq=a,this.h("fromMaxLinks",b,a))});v.defineProperty(G,{cursor:"cursor"},function(){return this.mq},function(a){var b=this.mq;b!==a&&(v.j(a,"string",G,"cursor"),this.mq=a,this.h("cursor",b,a))}); +v.defineProperty(G,{click:"click"},function(){return null!==this.ha?this.ha.fi:null},function(a){wm(this);var b=this.ha.fi;b!==a&&(null!==a&&v.j(a,"function",G,"click"),this.ha.fi=a,this.h("click",b,a))});v.defineProperty(G,{at:"doubleClick"},function(){return null!==this.ha?this.ha.oi:null},function(a){wm(this);var b=this.ha.oi;b!==a&&(null!==a&&v.j(a,"function",G,"doubleClick"),this.ha.oi=a,this.h("doubleClick",b,a))}); +v.defineProperty(G,{ez:"contextClick"},function(){return null!==this.ha?this.ha.ii:null},function(a){wm(this);var b=this.ha.ii;b!==a&&(null!==a&&v.j(a,"function",G,"contextClick"),this.ha.ii=a,this.h("contextClick",b,a))});v.defineProperty(G,{Gt:"mouseEnter"},function(){return null!==this.ha?this.ha.wr:null},function(a){wm(this);var b=this.ha.wr;b!==a&&(null!==a&&v.j(a,"function",G,"mouseEnter"),this.ha.wr=a,this.h("mouseEnter",b,a))}); +v.defineProperty(G,{Ht:"mouseLeave"},function(){return null!==this.ha?this.ha.xr:null},function(a){wm(this);var b=this.ha.xr;b!==a&&(null!==a&&v.j(a,"function",G,"mouseLeave"),this.ha.xr=a,this.h("mouseLeave",b,a))});v.defineProperty(G,{Tz:"mouseOver"},function(){return null!==this.ha?this.ha.Bi:null},function(a){wm(this);var b=this.ha.Bi;b!==a&&(null!==a&&v.j(a,"function",G,"mouseOver"),this.ha.Bi=a,this.h("mouseOver",b,a))}); +v.defineProperty(G,{Sz:"mouseHover"},function(){return null!==this.ha?this.ha.Ai:null},function(a){wm(this);var b=this.ha.Ai;b!==a&&(null!==a&&v.j(a,"function",G,"mouseHover"),this.ha.Ai=a,this.h("mouseHover",b,a))});v.defineProperty(G,{Rz:"mouseHold"},function(){return null!==this.ha?this.ha.zi:null},function(a){wm(this);var b=this.ha.zi;b!==a&&(null!==a&&v.j(a,"function",G,"mouseHold"),this.ha.zi=a,this.h("mouseHold",b,a))}); +v.defineProperty(G,{TH:"mouseDragEnter"},function(){return null!==this.ha?this.ha.ur:null},function(a){wm(this);var b=this.ha.ur;b!==a&&(null!==a&&v.j(a,"function",G,"mouseDragEnter"),this.ha.ur=a,this.h("mouseDragEnter",b,a))});v.defineProperty(G,{UH:"mouseDragLeave"},function(){return null!==this.ha?this.ha.vr:null},function(a){wm(this);var b=this.ha.vr;b!==a&&(null!==a&&v.j(a,"function",G,"mouseDragLeave"),this.ha.vr=a,this.h("mouseDragLeave",b,a))}); +v.defineProperty(G,{Qz:"mouseDrop"},function(){return null!==this.ha?this.ha.yi:null},function(a){wm(this);var b=this.ha.yi;b!==a&&(null!==a&&v.j(a,"function",G,"mouseDrop"),this.ha.yi=a,this.h("mouseDrop",b,a))});v.defineProperty(G,{aD:"actionDown"},function(){return null!==this.ha?this.ha.Np:null},function(a){wm(this);var b=this.ha.Np;b!==a&&(null!==a&&v.j(a,"function",G,"actionDown"),this.ha.Np=a,this.h("actionDown",b,a))}); +v.defineProperty(G,{bD:"actionMove"},function(){return null!==this.ha?this.ha.Op:null},function(a){wm(this);var b=this.ha.Op;b!==a&&(null!==a&&v.j(a,"function",G,"actionMove"),this.ha.Op=a,this.h("actionMove",b,a))});v.defineProperty(G,{cD:"actionUp"},function(){return null!==this.ha?this.ha.Pp:null},function(a){wm(this);var b=this.ha.Pp;b!==a&&(null!==a&&v.j(a,"function",G,"actionUp"),this.ha.Pp=a,this.h("actionUp",b,a))}); +v.defineProperty(G,{$C:"actionCancel"},function(){return null!==this.ha?this.ha.Mp:null},function(a){wm(this);var b=this.ha.Mp;b!==a&&(null!==a&&v.j(a,"function",G,"actionCancel"),this.ha.Mp=a,this.h("actionCancel",b,a))});v.defineProperty(G,{yA:"toolTip"},function(){return null!==this.ha?this.ha.Ii:null},function(a){wm(this);var b=this.ha.Ii;b!==a&&(null!==a&&v.A(a,Sg,G,"toolTip"),this.ha.Ii=a,this.h("toolTip",b,a))}); +v.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ha?this.ha.ji:null},function(a){wm(this);var b=this.ha.ji;b!==a&&(null!==a&&v.A(a,Sg,G,"contextMenu"),this.ha.ji=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.og=this;var b=this.Vo();null!==b&&$m(b)&&v.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.sc&&(this.sc=new I(xg));this.sc.add(a)}; +G.prototype.findTemplateBinder=G.prototype.Vo=function(){for(var a=this instanceof D?this:this.S;null!==a;){if(null!==a.tk)return a;a=a.S}return null};G.prototype.setProperties=function(a){v.Xt(this,a)};var an; +G.make=an=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=bn.ja(a);"function"===typeof f?(c=v.el(arguments),d=f(c)):e=ea[a]}null===d&&(void 0===e&&(d=window.$,void 0!==d&&void 0!==d.noop&&v.k("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),v.k("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==e&&e.constructor||v.k("GraphObject.make requires a class function or class name, not: "+ +a),d=new e);f=1;if(d instanceof E&&1e)&&v.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.ce=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.ce=!1,a.index=e);e=new ta;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);v.Xt(a,e)}else v.Xt(a,b);else v.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)} +var bn=new na("string","function");G.getBuilders=function(){var a=new na("string","function"),b;for(b in bn)if(b!==b.toLowerCase()){var c=bn[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var Mn;G.defineBuilder=Mn=function(a,b){v.j(a,"string",G,"defineBuilder:name");v.j(b,"function",G,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||v.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);bn.add(a,b)};var Nn; +G.takeBuilderArgument=Nn=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b}; +Mn("Button",function(){var a=new ha(Tf);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ha(Tf);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=an(D,uk,{Fw:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},an(Y,{name:"ButtonBorder",Ab:"Rectangle",B:new L(0,0,2.761423749153968,2.761423749153968),C:new L(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Gt=function(a,b){var e=b.be("ButtonBorder");if(e instanceof +Y){var f=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=f;f=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=f}};a.Ht=function(a,b){var e=b.be("ButtonBorder");e instanceof Y&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)};return a}); +Mn("TreeExpanderButton",function(){var a=an("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},an(Y,{name:"ButtonIcon",Ab:"MinusLine",xa:rd},(new xg("figure","isTreeExpanded",function(a,c){var d=c.S;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Sw()),{visible:!1},(new xg("visible","isTreeLeaf",function(a){return!a})).Sw());a.click=function(a,c){var d=c.Y;d instanceof Sg&&(d=d.Lf);if(d instanceof S){var e=d.g;if(null!==e){e=e.nb;if(d.md){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +a.zc=!0;d.md?e.collapseTree(d):e.expandTree(d)}}};return a}); +Mn("SubGraphExpanderButton",function(){var a=an("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},an(Y,{name:"ButtonIcon",Ab:"MinusLine",xa:rd},(new xg("figure","isSubGraphExpanded",function(a,c){var d=c.S;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Sw()));a.click=function(a,c){var d=c.Y;d instanceof Sg&&(d=d.Lf);if(d instanceof V){var e=d.g;if(null!==e){e=e.nb;if(d.de){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.zc= +!0;d.de?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});Mn("ContextMenuButton",function(){var a=an("Button");a.stretch=vm;var b=a.be("ButtonBorder");b instanceof Y&&(b.Ab="Rectangle",b.B=new L(0,0,2,3),b.C=new L(1,1,-2,-2));return a}); +Mn("PanelExpanderButton",function(a){var b=Nn(a,"COLLAPSIBLE");a=an("Button",an(Y,"TriangleUp",{xa:new ia(6,4)},(new xg("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).Sw(b)));var c=a.be("ButtonBorder");c instanceof Y&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var f=c.g;if(null!==f&&!f.bb){var h=c.Y.be(b);null!==h&&(f.Qb("Collapse/Expand Panel"),h.visible=!h.visible,f.wd("Collapse/Expand Panel"))}};return a}); +Mn("CheckBoxButton",function(a){var b=Nn(a);a=an("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},an(Y,{name:"ButtonIcon",WG:"M0 4 L3 9 9 0",lb:2,stretch:He,wz:Si,visible:!1},""!==b?(new xg("visible",b)).JH():[]));a.click=function(a,d){if(!(a.g.bb||""!==b&&a.g.ba.bb)){a.zc=!0;var e=d.be("ButtonIcon");e.g.Qb("checkbox");e.visible=!e.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.g.wd("checkbox")}};return a}); +Mn("CheckBox",function(a){a=Nn(a);a=an("CheckBoxButton",a,{name:"Button",margin:new cb(0,1,0,0)});var b=an(D,"Horizontal",a,{Fw:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,Gt:a.Gt,Ht:a.Ht,click:a.click,_buttonClick:a.click});a.Gt=null;a.Ht=null;a.click=null;return b}); +function xm(){this.ji=this.Ii=this.Mp=this.Pp=this.Op=this.Np=this.yi=this.vr=this.ur=this.zi=this.Ai=this.Bi=this.xr=this.wr=this.ii=this.oi=this.fi=null}xm.prototype.copy=function(){var a=new xm;a.fi=this.fi;a.oi=this.oi;a.ii=this.ii;a.wr=this.wr;a.xr=this.xr;a.Bi=this.Bi;a.Ai=this.Ai;a.zi=this.zi;a.ur=this.ur;a.vr=this.vr;a.yi=this.yi;a.Np=this.Np;a.Op=this.Op;a.Pp=this.Pp;a.Mp=this.Mp;a.Ii=this.Ii;a.ji=this.ji;return a}; +function D(a){G.call(this);void 0===a?0===arguments.length?this.ia=Vi:v.k("invalid argument to Panel constructor: undefined"):(v.pb(a,D,D,"type"),this.ia=a);this.za=new I(G);this.Ue=cd;this.Pg=!1;this.ia===xk&&(this.Pg=!0);this.Oq=!1;this.qq=fc;this.mi=tm;this.ia===Sm&&On(this);this.Go=Si;this.Jq=td;this.Kq=ad;this.tk=this.ie=null;this.br=NaN;this.gg=this.uj=null;this.Xn="category";this.fg=null;this.Ki=new B(NaN,NaN,NaN,NaN);this.tm=null;this.Ah=!1;this.as=null}v.Ja(D,G);v.Uh(D);v.ea("Panel",D); +function On(a){a.jj=cd;a.xh=1;a.li=null;a.Rl=null;a.wh=1;a.vh=null;a.Ql=null;a.Hd=[];a.Dd=[];a.om=Pn;a.Pl=Pn;a.Ji=0;a.vi=0} +D.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.ia=this.ia;a.Ue=this.Ue.R();a.Pg=this.Pg;a.Oq=this.Oq;a.qq=this.qq.R();a.mi=this.mi;if(a.ia===Sm){a.jj=this.jj.R();a.xh=this.xh;a.li=this.li;a.Rl=this.Rl;a.wh=this.wh;a.vh=this.vh;a.Ql=this.Ql;var b=[];if(0a&&v.va(a,">= 0",D,"padding"),a=new cb(a)):(v.A(a,cb,D,"padding"),0>a.left&&v.va(a.left,">= 0",D,"padding:value.left"),0>a.right&&v.va(a.right,">= 0",D,"padding:value.right"),0>a.top&&v.va(a.top,">= 0",D,"padding:value.top"),0>a.bottom&&v.va(a.bottom,">= 0",D,"padding:value.bottom"));var b=this.Ue;b.K(a)||(this.Ue=a=a.R(),this.P(),this.h("padding",b,a))}); +v.defineProperty(D,{gl:"defaultAlignment"},function(){return this.qq},function(a){var b=this.qq;b.K(a)||(this.qq=a=a.R(),this.P(),this.h("defaultAlignment",b,a))});v.defineProperty(D,{Jd:"defaultStretch"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(v.pb(a,G,D,"defaultStretch"),this.mi=a,this.P(),this.h("defaultStretch",b,a))}); +v.defineProperty(D,{IJ:"defaultSeparatorPadding"},function(){return void 0===this.jj?cd:this.jj},function(a){if(void 0!==this.jj){"number"===typeof a&&(a=new cb(a));var b=this.jj;b.K(a)||(this.jj=a=a.R(),this.h("defaultSeparatorPadding",b,a))}}); +v.defineProperty(D,{GJ:"defaultRowSeparatorStroke"},function(){return void 0===this.li?null:this.li},function(a){var b=this.li;b!==a&&(null===a||"string"===typeof a||a instanceof ha)&&(a instanceof ha&&a.freeze(),this.li=a,this.h("defaultRowSeparatorStroke",b,a))});v.defineProperty(D,{HJ:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.xh?1:this.xh},function(a){if(void 0!==this.xh){var b=this.xh;b!==a&&isFinite(a)&&0<=a&&(this.xh=a,this.h("defaultRowSeparatorStrokeWidth",b,a))}}); +v.defineProperty(D,{FJ:"defaultRowSeparatorDashArray"},function(){return void 0===this.Rl?null:this.Rl},function(a){if(void 0!==this.Rl){var b=this.Rl;if(b!==a){null===a||Array.isArray(a)||v.Cd(a,"Array",D,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Ew,e=d.width,d=d.height,f=this.Ha,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.UD;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.za.n,q=p.length,r=0;r +e*t*c))){var s=n[r],u=!1,x=!0,A=w.eF;null!==A&&(u=!0,x=a.pz(A,w.ke));if("LineV"===w.Ab){a.lineWidth=w.lb;Nm(this,a,w.stroke,!1,!1);a.beginPath();for(var H=y=Math.floor(-m.x/e);H<=y+k;H++){var C=H*e+m.x;0<=C&&Cf.height)continue}else if(l.position>f.width)continue;var m=l.Ep;isNaN(m)&&(m=c?a.xh:a.wh);var n=l.Dp;null===n&&(n=c?a.li:a.vh);if(0!==m&&null!==n){Nm(a,b,n,!1,!1);var n=!1,p=!0,q=l.xI;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.ke):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.ke):void 0!==b.mozDash? +(b.mozDash=q,b.mozDashOffset=a.ke):p=!1);b.beginPath();var r=l.position+m;c?r>f.height&&(m-=r-f.height):r>f.width&&(m-=r-f.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=f.width-r.right,n&&!p?Am(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=f.height-r.bottom,n&&!p?Am(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(v.gj),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=v.gj,b.webkitLineDashOffset= +0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}} +function Rn(a,b,c,d,e){for(var f=d.length,h=a.U,k=0;km)){var n=l.Ie(),p=l.Ep;isNaN(p)&&(p=c?a.xh:a.wh);var q=l.Dp;null===q&&(q=c?a.li:a.vh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ia;p+n>m&&(n=m-p);0>=n||(m=a.padding,Nm(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} +function Qn(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dhd&&(Nc=Math.max(hd-id,0));var nh=0===X.Ia;X.Ia+= +Nc;hd=Math.max(hd-(Nc+(nh?id:0)),0)}1!==ca.hi||Wc!==Qi&&Wc!==um||(X=this.Ld(xc),id=X.Ie(),Nc=Math.max(Re-X.Ia,0),Nc+id>yc&&(Nc=Math.max(yc-id,0)),nh=0===X.Ia,X.Ia+=Nc,yc=Math.max(yc-(Nc+(nh?id:0)),0));Mg&&ca.ep()}}}v.sa(mh);for(var Td=0,Ud=0,Fa=this.Oo,da=0;da=this.Cp);fb++)X=this.Md(ca.Wb+fb),Vd.height+=Math.max(X.$i,isNaN(X.Ve)?X.gf:Math.min(X.Ve,X.gf));for(fb=1;fb=this.Oo);fb++)X=this.Ld(ca.column+fb),Vd.width+=Math.max(X.$i,isNaN(X.Ve)?X.gf:Math.min(X.Ve,X.gf));ob.width+=Vd.width;ob.height+=Vd.height;Rb=ca.margin;bg=Rb.right+Rb.left;cg=Rb.top+Rb.bottom;ij(ca,ob.width,ob.height,li,sj);for(var Qe=ca.Ca,Re=Math.max(Qe.width+bg,0),zd=Math.max(Qe.height+cg,0),Og=0,fb=0;fb=this.Cp);fb++)X= +this.Md(ca.Wb+fb),Og+=X.total||0;if(Og=oc)&&!(ca.Wb+fb>=this.Cp);fb++){var X=this.Md(ca.Wb+fb),Mb=X.Pa||0,sf=Ad(ca,X,zc);X.Ia=Math.min(X.gf,Mb+sf);X.Pa!==Mb&&(oc-=X.Pa-Mb)}for(;0Mb&&(X.Ia=Math.min(X.gf,Mb+oc),X.Pa!==Mb&&(oc-=X.Pa-Mb));if(0===X.index)break;X=this.Md(X.index-1)}}for(var Ee=0,fb=0;fb=this.Oo);fb++)X=this.Ld(ca.column+fb),Ee+=X.total||0;if(Ee=oc)&&!(ca.column+fb>=this.Oo);fb++)X=this.Ld(ca.column+fb),Mb=X.Pa||0,sf=Ad(ca,X,zc),X.Ia=Math.min(X.gf,Mb+sf),X.Pa!==Mb&&(oc-=X.Pa-Mb);for(;0Mb&&(X.Ia=Math.min(X.gf,Mb+oc),X.Pa!==Mb&&(oc-=X.Pa-Mb));if(0===X.index)break;X=this.Ld(X.index-1)}}}v.sa(fd);v.Zj(Vd);v.Zj(ob);for(var dg=0,eg=0,Wc=Fm(this,!0),tf=this.xa,tj=this.xf,Wd=Ud=Td=0,Xc=0,Fa=this.Oo,da=0;daPg)ij(Sb,Infinity,Infinity),ne=Sb.Ca,Te.ai(ne),this.Lg.add(ne);else{var kd=Sb.ve,br=Sb.kA,rn=Sb.Tj;rn.se()&&(rn=zb);var xj=Sb.Vt,et=Sb.UE,yj=0,zj=0,Xk=0;if(kd<-Pg||kd>=Pg){var cr=fg.vE,si=fg.uE;xj!==Di&&(Xk=fg.computeAngle(Sb,xj,si),Sb.Kl=Xk);yj=cr.x-gg.x;zj=cr.y-gg.y}else{var Bd,Ue;if(0<=kd)Bd=hg.da(kd),Ue=kder+10?0<=kd?wh.xc(Bd):Bd.xc(wh):er>dr+10?0<=kd?Ue.xc(xh):xh.xc(Ue):0<=kd?wh.xc(xh):xh.xc(wh)}else si=0<=kd?Bd.xc(Ue):Ue.xc(Bd);xj!==Di&&(Xk=fg.computeAngle(Sb,xj,si),Sb.Kl=Xk);yj=Bd.x+(Ue.x-Bd.x)*br-gg.x;zj=Bd.y+(Ue.y-Bd.y)*br-gg.y}ij(Sb,Infinity,Infinity);var ne=Sb.Ca,Vk=Sb.Ha,Aj=0;Sb instanceof Y&&(Aj=Sb.lb);var Yk=Vk.width+Aj,sn=Vk.height+Aj;ri.reset(); +ri.translate(-ne.x,-ne.y);ri.scale(Sb.scale,Sb.scale);ri.rotate(xj===Di?Sb.angle:si,Yk/2,sn/2);var ti=new B(0,0,Yk,sn);wj.Yt(ti,rn);ri.ub(wj);var ft=-wj.x+Aj/2,gt=-wj.y+Aj/2;ig.assign(et);isNaN(ig.x)&&(ig.x=0<=kd?Yk/2+3:-(Yk/2+3));isNaN(ig.y)&&(ig.y=-(sn/2+3));ig.rotate(si);yj+=ig.x;zj+=ig.y;ti.set(ne);ti.x=yj+ft;ti.y=zj+gt;this.Lg.add(ti);Te.ai(ti)}}if(this.Ce)for(var fr=this.Rf;fr.next();)ij(fr.value,Infinity,Infinity);this.Ki=Te;var tn=this.wi;tn.m(tn.x+Te.x,tn.y+Te.y);Wa(e,Te.width||0,Te.height|| +0);v.$e(ri);v.v(wj);v.v(ig)}break;case "Grid":break;case "TableRow":case "TableColumn":v.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:v.k("Unknown panel type: "+n)}}var Ve=e.width,We=e.height,Zk=this.padding,ht=Zk.top+Zk.bottom,Ve=Ve+(Zk.left+Zk.right),We=We+ht;isFinite(f.width)&&(Ve=f.width);isFinite(f.height)&&(We=f.height);Ve=Math.min(k.width,Ve);We=Math.min(k.height,We);Ve=Math.max(h.width,Ve);We= +Math.max(h.height,We);Ve=Math.max(c,Ve);We=Math.max(d,We);e.width=Ve;e.height=We;Wa(this.Qc,Ve,We);Cm(this,0,0,Ve,We)};D.prototype.findMainElement=D.prototype.Ye=function(){if(null===this.tm){var a=this.za.n,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.P(),ij(this,n>c?c:n,p>d?d:p);break;case He:this.P(!0);ij(this,c+r,d+s,0,0);break;case vm:this.P(!0);ij(this,c+r,p+s,0,0);break;case um:this.P(!0),ij(this,n+r,d+s,0,0)}}k=this.U;k.x=a;k.y=b; +k.width=c;k.height=d;var t=this.ia.Ob;switch(t){case "Position":for(var u=f.length,y=e.x-this.padding.left,w=e.y-this.padding.top,x=0;x=this.Cp);da++){var ca=this.Md(yb+da);ib.height+=ca.total}for(da=1;da=this.Oo);da++){var Kg=this.Ld(Rd+da);ib.width+=Kg.total}var lh=Sd.Pa+ib.width,mi=Lc.Pa+ib.height;h.x=Jc;h.y=ze;h.width=lh;h.height=mi;var xc=Jc,ni=ze,Yb=lh,mh=mi;Jc+lh>e.width&&(Yb=Math.max(e.width-Jc,0));ze+mi>e.height&&(mh=Math.max(e.height-ze,0));var fd=Fa.alignment, +Ae=0,Mc=0,gd=0,yc=0;if(fd.Uc()){fd=this.gl;fd.bd()||(fd=zb);var Ae=fd.x,Mc=fd.y,gd=fd.offsetX,yc=fd.offsetY,hd=Sd.alignment,$f=Lc.alignment;hd.bd()&&(Ae=hd.x,gd=hd.offsetX);$f.bd()&&(Mc=$f.y,yc=$f.offsetY)}else Ae=fd.x,Mc=fd.y,gd=fd.offsetX,yc=fd.offsetY;if(isNaN(Ae)||isNaN(Mc))Mc=Ae=.5,yc=gd=0;var X=Oe.width,Be=Oe.height,Pe=Fa.margin,oi=Pe.left+Pe.right,pi=Pe.top+Pe.bottom,Nc=Tm(Fa,Lc,Sd,!1);!isNaN(Fa.xa.width)||Nc!==He&&Nc!==vm||(X=Math.max(lh-oi,0));!isNaN(Fa.xa.height)||Nc!==He&&Nc!==um||(Be= +Math.max(mi-pi,0));var mb=Fa.xf,nb=Fa.ih,X=Math.min(mb.width,X),Be=Math.min(mb.height,Be),X=Math.max(nb.width,X),Be=Math.max(nb.height,Be),Pk=Be+pi;h.x+=h.width*Ae-(X+oi)*Ae+gd+Pe.left;h.y+=h.height*Mc-Pk*Mc+yc+Pe.top;Fa.visible&&(bb(xc,ni,Yb,mh,h.x,h.y,Oe.width,Oe.height)?Fa.Ec(h.x,h.y,X,Be):Fa.Ec(h.x,h.y,X,Be,new B(xc,ni,Yb,mh)))}else{Fa.ri();Fa.mc.Oa();var ag=Fa.mc;ag.x=me.type===Jm?jh:Jc;ag.y=me.type===Km?kh:ze;ag.width=Oe.width;ag.height=Oe.height;Fa.mc.freeze();Hm(Fa,!1)}}}}v.Zj(ib);for(yb= +0;yb=Ng){var Og=this.vE,oc=this.uE;De!==Di&&(fb=this.computeAngle(jd,De,oc),jd.angle=fb);rf=Og.x;Vd=Og.y}else{var zc=void 0,Ad=void 0;if(0<=lc)zc=qf.n[lc],Ad=lceg+10?0<= +lc?sf.xc(zc):zc.xc(sf):eg>dg+10?0<=lc?Ad.xc(Ee):Ee.xc(Ad):0<=lc?sf.xc(Ee):Ee.xc(sf)}else oc=0<=lc?zc.xc(Ad):Ad.xc(zc);De!==Di&&(fb=this.computeAngle(jd,De,oc),jd.angle=fb);rf=zc.x+(Ad.x-zc.x)*qh;Vd=zc.y+(Ad.y-zc.y)*qh}if(ob.K(rb))jd.location=new z(rf,Vd);else{ob.se()&&(ob=zb);var tf=v.ph();tf.reset();tf.scale(jd.scale,jd.scale);tf.rotate(jd.angle,0,0);var tj=jd.Ha,Wd=v.gk(0,0,tj.width,tj.height),Xc=v.L();Xc.Yt(Wd,ob);tf.ub(Xc);var sh=-Xc.x,th=-Xc.y,mc=Jf.copy();isNaN(mc.x)&&(mc.x=0<=lc?Xc.x+3:-(Xc.x+ +3));isNaN(mc.y)&&(mc.y=-(Xc.y+3));mc.rotate(oc);rf+=mc.x;Vd+=mc.y;tf.pF(Wd);var sh=sh+Wd.x,th=th+Wd.y,uh=v.Mb(rf+sh,Vd+th);jd.move(uh);v.v(uh);v.v(Xc);v.Vb(Wd);v.$e(tf)}}this instanceof Sg?this.Um(!1):qi.Um(!1)}break;case "Grid":break;case "TableRow":case "TableColumn":v.k(this.toString()+" is not an element of a Table Panel.TableRow and TableColumn panels can only be elements of a Table Panel.");break;default:v.k("Unknown panel type: "+t)}v.Vb(h)}}; +D.prototype.Vj=function(a){var b=this.Ha;if(bb(0,0,b.width,b.height,a.x,a.y)){for(var b=this.za.n,c=b.length,d=v.Mb(0,0);c--;){var e=b[c];if(e.visible||e===this.bc)if(Qa(d.set(a),e.transform),e.Fa(d))return v.v(d),!0}v.v(d);return null===this.Ib&&null===this.nc?!1:!0}return!1};D.prototype.zw=function(a){if(this.on===a)return this;for(var b=this.za.n,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof D?m:null;p=v.ph();p.set(h);if(null!==m?m.Yj(a,b,c,d,e,p):Em(n,a,d,p))null!== +b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);v.$e(p)}}}void 0===f&&v.$e(h);return d}void 0===f&&v.$e(h);return!1};function co(a,b,c,d){for(var e=a.za.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.U,l=a.Ha;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof D&&co(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} +g.Lm=function(a,b,c,d,e,f){if(!1===this.Gg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ha,k=this.Kg(),l=k?a:Qa(v.Mb(a.x,a.y),this.transform),m=k?b:Qa(v.Mb(b.x,b.y),this.transform),n=l.rf(m),p=0s.width||r.y>s.height||0>r.x+r.width||0>r.y+r.height||(q.Kg()?(r=q.transform,Qa(k.set(a),r),Qa(l.set(b),r)):(k.set(a),l.set(b)),r=q,q=q instanceof D?q:null,null!==q?!q.Lm(k,l,c,d,e,f):!r.MD(k,l,e))||(null!==c&&(r=c(r)),null===r||null!==d&&!d(r)||f.add(r))}}v.v(k);v.v(l)}return e? +p:h}return!1};function Tn(a){var b=a.B;if(void 0===b||b===fc)b=null;null===b&&a instanceof Y&&(a=a.Sa,null!==a&&(b=a.B));null===b&&(b=sb);return b}function Un(a){var b=a.C;if(void 0===b||b===fc)b=null;null===b&&a instanceof Y&&(a=a.Sa,null!==a&&(b=a.C));null===b&&(b=Eb);return b}D.prototype.add=D.prototype.add=function(a){v.A(a,G,D,"add:element");this.yd(this.za.count,a)};D.prototype.elt=D.prototype.da=function(a){return this.za.da(a)}; +D.prototype.insertAt=D.prototype.yd=function(a,b){b instanceof R&&v.k("Cannot add a Part to a Panel: "+b);if(this===b||this.ul(b))this===b&&v.k("Cannot make a Panel contain itself: "+this.toString()),v.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.S;null!==c&&c!==this&&v.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ +this.toString());this.ia!==xk||b instanceof Y||v.k("Can only add Shapes to a Grid Panel, not: "+b);b.Bl(this);b.jm=null;if(null!==this.nE){var d=b.data;null!==d&&"object"===typeof d&&(null===this.fg&&(this.fg=new na(Object,D)),this.fg.add(d,b))}var e=this.za,d=-1;if(c===this){for(var f=-1,h=this.za.n,k=h.length,l=0;l=e.count&&a>=e.count)return;e.Vc(f);d=f}else v.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0> +a||a>e.count)a=e.count;e.yd(a,b);this.P();b.P();null!==b.Rd?this.Ah=!0:b instanceof D&&!0===b.Ah&&(this.Ah=!0);c=this.Y;null!==c&&(c.em=null,c.zj=NaN,this.Ah&&c instanceof S&&(c.Ah=!0),c.Ah&&(c.Wd=null),e=this.g,null!==e&&e.la.ib||(-1!==d&&c.Lc(Cf,"elements",this,b,null,d,null),c.Lc(Bf,"elements",this,null,b,null,a)))};D.prototype.remove=D.prototype.remove=function(a){v.A(a,G,D,"remove:element");for(var b=this.za.n,c=b.length,d=-1,e=0;ea&&v.va(a,">= 0",D,"getRowDefinition:idx");a=Math.round(a);var b=this.Hd;if(void 0===b[a]){var c=new rg;c.Bl(this);c.ce=!0;c.index=a;b[a]=c}return b[a]};D.prototype.removeRowDefinition=D.prototype.IE=function(a){0>a&&v.va(a,">= 0",D,"removeRowDefinition:idx");a=Math.round(a);var b=this.Hd;this.Lc(Cf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.P()};v.u(D,{Oo:"columnCount"},function(){return void 0===this.Dd?0:this.Dd.length}); +D.prototype.getColumnDefinition=D.prototype.Ld=function(a){0>a&&v.va(a,">= 0",D,"getColumnDefinition:idx");a=Math.round(a);var b=this.Dd;if(void 0===b[a]){var c=new rg;c.Bl(this);c.ce=!1;c.index=a;b[a]=c}return b[a]};D.prototype.removeColumnDefinition=D.prototype.EE=function(a){0>a&&v.va(a,">= 0",D,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Dd;this.Lc(Cf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.P()}; +v.defineProperty(D,{sI:"rowSizing"},function(){return void 0===this.om?Pn:this.om},function(a){if(void 0!==this.om){var b=this.om;b!==a&&(a!==Pn&&a!==Wn&&v.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.om=a,this.P(),this.h("rowSizing",b,a))}}); +v.defineProperty(D,{sG:"columnSizing"},function(){return void 0===this.Pl?Pn:this.Pl},function(a){if(void 0!==this.Pl){var b=this.Pl;b!==a&&(a!==Pn&&a!==Wn&&v.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Pl=a,this.P(),this.h("columnSizing",b,a))}}); +v.defineProperty(D,{OK:"topIndex"},function(){return void 0===this.Ji?0:this.Ji},function(a){if(void 0!==this.Ji){var b=this.Ji;b!==a&&((!isFinite(a)||0>a)&&v.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Ji=a,this.P(),this.h("topIndex",b,a))}}); +v.defineProperty(D,{$J:"leftIndex"},function(){return void 0===this.vi?0:this.vi},function(a){if(void 0!==this.vi){var b=this.vi;b!==a&&((!isFinite(a)||0>a)&&v.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.vi=a,this.P(),this.h("leftIndex",b,a))}});D.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Sm)return NaN;for(var b=0,c=this.Hd,d=c.length,e=this.Ji;ea)return-1;if(this.type!==Sm)return NaN;for(var b=0,c=this.Dd,d=c.length,e=this.vi;ea;)this.Ne(this.za.length-1);a=this.nE;if(null!==a)for(var b=v.Wa(a),c=0;cc)){var d;d=eo(a,b);var e=a.yH,f=null;null!==e&&(f=e.ja(d));null===f&&(fo||(fo=!0,v.trace('No item template Panel found for category "'+d+'" on '+a),v.trace(" Using default item template."),d=new D,e=new Zg,e.bind(new xg("text","",Df)),d.add(e),ho=d),f=ho);d=f;null!==d&&(Ug(d),d=d.copy(),"object"===typeof b&&(null===a.fg&&(a.fg=new na(Object,D)),a.fg.add(b,d)),e=c,Jl(a)&&e++,a.yd(e,d),Kl(a,e,c),d.ie=null,d.data=b)}} +function Kl(a,b,c){for(a=a.za;ba&&v.va(a,">= 0",rg,"height"),this.Ve=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("height",b,a))});v.defineProperty(rg,{width:"width"},function(){return this.Ve},function(a){var b=this.Ve;b!==a&&(0>a&&v.va(a,">= 0",rg,"width"),this.Ve=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("width",b,a))}); +v.defineProperty(rg,{$i:"minimum"},function(){return this.Dj},function(a){var b=this.Dj;b!==a&&((0>a||!isFinite(a))&&v.va(a,">= 0",rg,"minimum"),this.Dj=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("minimum",b,a))});v.defineProperty(rg,{gf:"maximum"},function(){return this.Bj},function(a){var b=this.Bj;b!==a&&(0>a&&v.va(a,">= 0",rg,"maximum"),this.Bj=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("maximum",b,a))}); +v.defineProperty(rg,{alignment:"alignment"},function(){return this.Ae},function(a){var b=this.Ae;b.K(a)||(this.Ae=a.R(),null!==this.S&&this.S.P(),this.$c("alignment",b,a))});v.defineProperty(rg,{stretch:"stretch"},function(){return this.Ph},function(a){var b=this.Ph;b!==a&&(this.Ph=a,null!==this.S&&this.S.P(),this.$c("stretch",b,a))}); +v.defineProperty(rg,{WE:"separatorPadding"},function(){return this.Hj},function(a){"number"===typeof a&&(a=new cb(a));var b=this.Hj;null!==a&&null!==b&&b.K(a)||(null!==a&&(a=a.R()),this.Hj=a,null!==this.S&&this.S.P(),this.$c("separatorPadding",b,a))});v.defineProperty(rg,{Dp:"separatorStroke"},function(){return this.ls},function(a){var b=this.ls;b!==a&&(null===a||"string"===typeof a||a instanceof ha)&&(a instanceof ha&&a.freeze(),this.ls=a,null!==this.S&&this.S.P(),this.$c("separatorStroke",b,a))}); +v.defineProperty(rg,{Ep:"separatorStrokeWidth"},function(){return this.ms},function(a){var b=this.ms;b!==a&&(this.ms=a,null!==this.S&&this.S.P(),this.$c("separatorStrokeWidth",b,a))}); +v.defineProperty(rg,{xI:"separatorDashArray"},function(){return this.Hh},function(a){var b=this.Hh;if(b!==a){null===a||Array.isArray(a)||v.Cd(a,"Array",rg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var f=d.Ca,h=Math.max(1,f.width),f=f.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,t=q=0,u=v.jb(),y=2;yp&&(p=1);c=p;for(var e=0,m=c,n=h/2,y=0===n?!1:!0,w=0,q=u[w],p=q[0],s=q[1],r=q[2],q=q[3],x=0;.1<=t;){0===x&&(y?(m=c,e++,m-=n,t-=n,y=!1):(m=c,e++),0===m&&(m=1));if(m>t){v.sa(u); +return}m>q?(x=m-q,m=q):x=0;var A=Math.sqrt(m*m/(1+r*r));0>p&&(A=-A);k+=A;l+=r*A;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(f/2));0===x&&d.Xj(a,b);a.translate(h/2,f/2);a.rotate(-s);a.translate(-k,-l);t-=m;q-=m;if(0!==x){w++;if(w===u.length){v.sa(u);return}q=u[w];p=q[0];s=q[1];r=q[2];q=q[3];m=x}}v.sa(u)}} +Y.prototype.Xj=function(a,b){if(null!==this.Dc||null!==this.pd){null!==this.pd&&Nm(this,a,this.pd,!0,!1);null!==this.Dc&&Nm(this,a,this.Dc,!1,!1);var c=this.Qh;if(0===c){var d=this.Y;d instanceof Sg&&d.type===Ai&&"Selection"===d.fc&&d.Zb instanceof Y&&d.Lf.Ye()===d.Zb&&(c=d.Zb.lb)}a.lineWidth=c;a.lineJoin=this.zo;a.lineCap=this.xo;a.miterLimit=this.sm;var e=!1;this.Y&&b.Ti("drawShadows")&&(e=this.Y.wl);var f=!0;null!==this.Dc&&null===this.pd&&(f=!1);var d=!1,h=!0,k=this.eF;null!==k&&(d=!0,h=a.pz(k, +this.ke));var l=this.Sa;if(null!==l){if(l.ia===Ie)a.beginPath(),d&&!h?Am(a,l.vc,l.Cc,l.vb,l.Bb,k,this.ke):(a.moveTo(l.vc,l.Cc),a.lineTo(l.vb,l.Bb)),null!==this.pd&&a.ug(this.pd),0!==c&&null!==this.Dc&&a.cj();else if(l.ia===Je){var m=l.vc,n=l.Cc,p=l.vb,q=l.Bb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.pd&&(a.beginPath(),a.rect(l,r,m,n),a.ug(this.pd));if(null!==this.Dc){var s=p=0,t=0;f&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= +0,a.shadowBlur=0);d&&!h?(h=v.jb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),ko(a,h,k,this.ke),a.cj(),v.sa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.cj());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t)}}else if(l.ia===Ke)m=l.vc,n=l.Cc,p=l.vb,q=l.Bb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+$c*l,n-r,m+l,n-$c*r,m+l,n),a.bezierCurveTo(m+ +l,n+$c*r,m+$c*l,n+r,m,n+r),a.bezierCurveTo(m-$c*l,n+r,m-l,n+$c*r,m-l,n),a.bezierCurveTo(m-l,n-$c*r,m-$c*l,n-r,m,n-r),a.closePath(),null!==this.pd&&a.ug(this.pd),d&&!h&&(h=v.jb(),Zd(m,n-r,m+$c*l,n-r,m+l,n-$c*r,m+l,n,.5,h),Zd(m+l,n,m+l,n+$c*r,m+$c*l,n+r,m,n+r,.5,h),Zd(m,n+r,m-$c*l,n+r,m-l,n+$c*r,m-l,n,.5,h),Zd(m-l,n,m-l,n-$c*r,m-$c*l,n-r,m,n-r,.5,h),a.beginPath(),ko(a,h,k,this.ke),v.sa(h)),0!==c&&null!==this.Dc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= +0,a.shadowBlur=0,a.cj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t):a.cj());else if(l.ia===Fe){r=l.lj;n=r.length;for(q=0;qy.Af);else{var u=lf(y,m),w=u.length;if(0===w){a.lineTo(y.na,y.ua);break}for(var x=0;xe)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)Am(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=f=0,n=0,p=0,q=0,r=p=0,s=v.jb(),t=2;tr&&(f=r);f>p?(u=f-p,f=p):u=0;var y=Math.sqrt(f*f/(1+q*q));0>n&&(y=-y);k+=y;l+= +q*y;e?a.lineTo(k,l):a.moveTo(k,l);r-=f;p-=f;if(0!==u){t++;if(t===s.length){v.sa(s);return}p=s[t];n=p[0];q=p[1];p=p[2];f=u}else e=!e}v.sa(s)}}}Y.prototype.getDocumentPoint=Y.prototype.Ya=function(a,b){void 0===b&&(b=new z);a.se()&&v.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ha,d=this.lb;b.m(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.Yg.ub(b);return b}; +Y.prototype.Vj=function(a,b){var c=this.Sa;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.mb,e=this.lb/2;c.type!==Ie||b||(e+=2);var f=v.$f();f.assign(d);f.Pf(e+2,e+2);if(!f.Fa(a))return v.Vb(f),!1;d=e+1E-4;if(c.type===Ie){if(null===this.stroke)return!1;d=(c.I-c.Aa)*(a.x-c.Aa)+(c.J-c.ya)*(a.y-c.ya);if(0>(c.Aa-c.I)*(a.x-c.I)+(c.ya-c.J)*(a.y-c.J)||0>d)return!1;v.Vb(f);return Md(c.Aa,c.ya,c.I,c.J,e,a.x,a.y)}if(c.type===Je){var h=c.Aa,k=c.ya,l=c.I,m=c.J;f.x=Math.min(h,l);f.y=Math.min(k, +m);f.width=Math.abs(l-h);f.height=Math.abs(m-k);if(null===this.fill){f.Pf(-d,-d);if(f.Fa(a))return v.Vb(f),!1;f.Pf(d,d)}null!==this.stroke&&f.Pf(e,e);e=f.Fa(a);v.Vb(f);return e}if(c.type===Ke){var h=c.Aa,k=c.ya,l=c.I,m=c.J,c=Math.min(h,l),n=Math.min(k,m),h=Math.abs(l-h)/2,k=Math.abs(m-k)/2,c=a.x-(c+h),n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return v.Vb(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);v.Vb(f);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type=== +Fe)return v.Vb(f),null===this.fill?uf(c,a.x,a.y,e):c.Fa(a,e,1=this.lb)n=fe(p.vc,p.Cc,p.vb,p.Bb,f,h,k,l,e);else{var r=0,s=0;p.vc===p.vb?(r=m,s=0):(b=(p.Bb-p.Cc)/(p.vb-p.vc),s=m/Math.sqrt(1+b*b),r=s*b);d=v.jb();b=new z;fe(p.vc+ +r,p.Cc+s,p.vb+r,p.Bb+s,f,h,k,l,b)&&d.push(b);b=new z;fe(p.vc-r,p.Cc-s,p.vb-r,p.Bb-s,f,h,k,l,b)&&d.push(b);b=new z;fe(p.vc+r,p.Cc+s,p.vc-r,p.Cc-s,f,h,k,l,b)&&d.push(b);b=new z;fe(p.vb+r,p.Bb+s,p.vb-r,p.Bb-s,f,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return v.sa(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(f-d);if(0>a*a*c*c+u*u-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+u*u-n*n);k=(-(a*a*c*n)+a*u*m)/(u*u+a*a*c*c)+d;a=(-(a*a*c*n)-a*u*m)/(u*u+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((f-k)*(f-k))+Math.abs((h-l)*(h-l));h=Math.abs((f-a)*(f-a))+Math.abs((h-b)*(h- +b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Hc(l.y,e))&&(l.ye||Hc(l.x,e))&&(l.x=h&&d<=a}a=h&&f<=a} +Y.prototype.MD=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Vj(a,!0))return!0;var e=a.rf(b);b=e;1.5=e||Ta(b,f,0,-p)>=e||Ta(b,f,0,p)>=e||Ta(b,f,n,0)>= +e?!1:!0}else if(f.type===Fe){h=f.mb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Sa(a.x,a.y,k,l,m,l)>e&&Sa(a.x,a.y,m,h,k,h)>e&&Sa(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?uf(f,a.x,a.y,b):f.Fa(a,b,!0))return!0}else{c=f.Ub;for(b=0;be)return!1;l=k.sb.n;m=l.length;for(h=0;he)return!1;break;case gf:f=v.jb(); +Zd(n,p,q.rc,q.Kc,q.kh,q.lh,q.I,q.J,.8,f);n=d(f,a);v.sa(f);if(n)return!1;n=q.I;p=q.J;if(a.So(n,p)>e)return!1;break;case hf:f=v.jb();ce(n,p,q.rc,q.Kc,q.I,q.J,.8,f);n=d(f,a);v.sa(f);if(n)return!1;n=q.I;p=q.J;if(a.So(n,p)>e)return!1;break;case jf:case kf:var r=q.type===jf?lf(q,k):mf(q,k,n,p),s=r.length;if(0===s){n=q.na;p=q.ua;if(a.So(n,p)>e)return!1;break}q=null;f=v.jb();for(b=0;b= 0",Y,"strokeWidth:value")});v.defineProperty(Y,{HK:"strokeCap"},function(){return this.xo},function(a){var b=this.xo;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?v.va(a,'"butt", "round", or "square"',Y,"strokeCap"):(this.xo=a,this.pa(),this.h("strokeCap",b,a)))}); +v.defineProperty(Y,{JK:"strokeJoin"},function(){return this.zo},function(a){var b=this.zo;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?v.va(a,'"miter", "bevel", or "round"',Y,"strokeJoin"):(this.zo=a,this.pa(),this.h("strokeJoin",b,a)))});v.defineProperty(Y,{KK:"strokeMiterLimit"},function(){return this.sm},function(a){var b=this.sm;if(b!==a)if(1<=a){this.sm=a;this.pa();var c=this.Y;null!==c&&(c.zj=NaN);this.h("strokeMiterLimit",b,a)}else v.va(a,"value >= 1",Y,"strokeWidth:value")}); +v.defineProperty(Y,{eF:"strokeDashArray"},function(){return this.yo},function(a){var b=this.yo;if(b!==a){null===a||Array.isArray(a)||v.Cd(a,"Array",Y,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;em*k*k&&(h=!0);b.lf!==a&&(h=!1);!1===b.Ti("textGreeking")&&(h=!1);for(var m=b.Tq,k=this.Jj,l=this.Kj,n=this.De,p=0;pc&&(q=c);var f=f+k,s=r,r=a, +t=f,u=c,y=d,w=0,x=this.um;"start"===x&&(x=m?"right":"left");"end"===x&&(x=m?"left":"right");h?("left"===x?w=0:"right"===x?w=u-q:"center"===x&&(w=(u-q)/2),r.fillRect(0+w,t+.25*y,q,1)):("left"===x?w=0:"right"===x?w=u:"center"===x&&(w=u/2),r.fillText(s,0+w,t+y-.25*y),s=y/20|0,0===s&&(s=1),"right"===x?w-=q:"center"===x&&(w-=q/2),this.Wl&&(r.beginPath(),r.lineWidth=s,r.moveTo(0+w,t+y-.2*y),r.lineTo(0+w+q,t+y-.2*y),r.stroke()),this.Vl&&(r.beginPath(),r.lineWidth=s,t=t+y-y/2.2|0,0!==s%2&&(t+=.5),r.moveTo(0+ +w,t),r.lineTo(0+w+q,t),r.stroke()));f+=d+l}}}; +Zg.prototype.mp=function(a,b,c,d){this.kv=a;var e=this.Kk;e.reset();var f=0,h=0;if(isNaN(this.xa.width)){f=this.le.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Kw){for(var k=h=0,l=!1;!l;){var m=f.indexOf("\n",k);-1===m&&(m=f.length,l=!0);k=Io(f.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.yh);k>h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Io(f,this.yh);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.xa.width;null!==this.S&&(f=Math.min(f, +this.S.xf.width),f=Math.max(f,this.S.ih.width));h=Go(this,f,e);m=h=isNaN(this.xa.height)?Math.min(h,b/this.scale):this.xa.height;if(0!==e.Te&&1!==e.Be.length&&this.Sk===Eo&&(b=this.yh,l=this.Sk===Eo?Jo(b):0,k=this.Jj+this.Kj,k=Math.max(0,Ho(this)+k),m=Math.min(this.LH-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Be.length))){k=e.Be[m];for(a=Math.max(1,a-l);Io(k,b)>a&&1=a.xi)return new ia(0,l);if(a.wm===Co){c.Li=1;f=Io(b,k);if(0===h||f<=d)return c.Te=f,c.kf.push(c.Te),c.Be.push(b),new ia(f,l);var m=Ko(b);b=b.substr(m.length);for(var n=Ko(b),f=Io(m+n,k);0d&&1d;){n=1;f=Io(m.substr(0,n),k);for(h=0;f<=d;)n++,h=f,f=Io(m.substr(0,n),k);1===n?(c.kf[a.De+p]=f,e=Math.max(e,f)):(c.kf[a.De+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Be[a.De+p]=m.substr(0,n);p++;m=m.substr(n);if(a.De+p>a.xi)break}n=Ko(b);for(f=Io(m+n,k);0a.xi))break}c.Li=Math.min(a.xi,p);c.Te=Math.max(c.Te,e);return new ia(c.Te,l*c.Li)}function Ko(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}function Io(a,b){Ao!==b&&(Ao=Bo.font=b);return Bo.measureText(a).width} +function Ho(a){if(null!==a.Mn)return a.Mn;var b=a.yh;Ao!==b&&(Ao=Bo.font=b);var c=0;void 0!==vo[b]&&5E3>wo?c=vo[b]:(c=1.3*Bo.measureText("M").width,vo[b]=c,wo++);return a.Mn=c}function Jo(a){Ao!==a&&(Ao=Bo.font=a);var b=0;void 0!==xo[a]&&5E3>yo?b=xo[a]:(b=Bo.measureText(zo).width,xo[a]=b,yo++);return b} +function Go(a,b,c){var d=a.le.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.Jj+a.Kj,e=Math.max(0,Ho(a)+e);if(0===d.length)return c.Te=0,a.De=1,e;if(!a.Kw){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.De=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.wm!==Co?(c.Li=0,h=Fo(a,h,c,b),f+=h.height,a.De+=c.Li):(Fo(a,h,c,b),f+=e,a.De++),a.De===a.xi&&(l=!0)),h=k+1;return a.pv=f} +v.defineProperty(Zg,{wA:"textValidation"},function(){return this.Uk},function(a){var b=this.Uk;b!==a&&(null!==a&&v.j(a,"function",Zg,"textValidation"),this.Uk=a,this.h("textValidation",b,a))});v.defineProperty(Zg,{EK:"spacingAbove"},function(){return this.Jj},function(a){var b=this.Jj;b!==a&&(this.Jj=a,this.h("spacingAbove",b,a))});v.defineProperty(Zg,{FK:"spacingBelow"},function(){return this.Kj},function(a){var b=this.Kj;b!==a&&(this.Kj=a,this.h("spacingBelow",b,a))}); +v.defineProperty(Zg,{LH:"maxLines"},function(){return this.xi},function(a){var b=this.xi;b!==a&&(a=Math.floor(a),0>=a&&v.va(a,"> 0",Zg,"maxLines"),this.xi=a,this.h("maxLines",b,a),this.P())});v.u(Zg,{hK:"metrics"},function(){return this.Kk});function uo(){this.Te=this.Li=0;this.kf=[];this.Be=[]}uo.prototype.reset=function(){this.Te=this.Li=0;this.kf=[];this.Be=[]};uo.prototype.Zs=function(a){this.Li=a.Li;this.Te=a.Te;this.kf=v.el(a.kf);this.Be=v.el(a.Be)};v.u(uo,{tJ:"arrSize"},function(){return this.kf}); +v.u(uo,{uJ:"arrText"},function(){return this.Be});v.u(uo,{gK:"maxLineWidth"},function(){return this.Te});function mk(){G.call(this);this.Re=null;this.ts="";this.Ij=Fd;this.On=He;this.Ao=this.Lj=this.nf=null;this.oy=!1;this.Tu=!0;this.ro=null}v.Ja(mk,G);v.ea("Picture",mk);mk.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Re;a.ts=this.ts;a.Ij=this.Ij.R();a.On=this.On;a.nf=this.nf;a.Lj=this.Lj;a.Tu=this.Tu;a.ro=this.ro};var Lo=new ta,Mo=0,gk=[]; +function No(){var a=gk;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;dr.Jo.length&& +(So(r,4,l,m),So(r,16,l,m));for(var l=r.Jo,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.2,.22);b.C=new L(.8, +.9);v.q(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=Wo(6);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.07,.25);b.C=new L(.93,.75);v.q(a);return b},Heptagon:function(a,b,c){var d=Wo(7);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.2,.15);b.C=new L(.8,.85);v.q(a);return b},Octagon:function(a,b,c){var d=Wo(8);a=v.s();N(a,d[0].x*b,d[0].y*c,!0); +for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.15,.15);b.C=new L(.85,.85);v.q(a);return b},Nonagon:function(a,b,c){var d=Wo(9);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.17,.13);b.C=new L(.82,.82);v.q(a);return b},Decagon:function(a,b,c){var d=Wo(10);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.16,.16);b.C=new L(.84,.84);v.q(a);return b}, +Dodecagon:function(a,b,c){var d=Wo(12);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.16,.16);b.C=new L(.84,.84);v.q(a);return b},FivePointedStar:function(a,b,c){var d=Vo(5);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.312,.383);b.C=new L(.693,.765);v.q(a);return b},SixPointedStar:function(a,b,c){var d=Vo(6);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x* +b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.17,.251);b.C=new L(.833,.755);v.q(a);return b},SevenPointedStar:function(a,b,c){var d=Vo(7);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.363,.361);b.C=new L(.641,.709);v.q(a);return b},EightPointedStar:function(a,b,c){var d=Vo(8);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.252,.255);b.C=new L(.75,.75);v.q(a);return b},NinePointedStar:function(a, +b,c){var d=Vo(9);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.355,.361);b.C=new L(.645,.651);v.q(a);return b},TenPointedStar:function(a,b,c){var d=Vo(10);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.281,.261);b.C=new L(.723,.748);v.q(a);return b},FivePointedBurst:function(a,b,c){var d=Uo(5);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=v.s(),e=.2*$c;N(d,0,.2*c,!0);O(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);O(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);O(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);O(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); +N(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Za(!1);b=d.o;b.B=new L(0,a);b.C=new L(1,1-a);v.q(d);return b},DividedProcess:function(a,b,c){a=a?a.Ac:NaN;if(isNaN(a)||.1>a)a=.1;var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);N(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Za(!1);b=d.o;b.B=new L(0,a);b.C=Eb;v.q(d);return b},Document:function(a,b,c){c/=.8;a=v.s();N(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);O(a,.5*b,.4*c,.5*b,1*c,0,.7*c);P(a);b=a.o;b.B=sb;b.C=new L(1,.6);v.q(a); +return b},ExternalOrganization:function(a,b,c){a=a?a.Ac:NaN;if(isNaN(a)||.2>a)a=.2;var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);N(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.Za(!1);b=d.o;b.B=new L(a/2,a/2);b.C=new L(1-a/2,1-a/2);v.q(d);return b},ExternalProcess:function(a,b,c){a=v.s();N(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);P(a); +N(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.Za(!1);b=a.o;b.B=new L(.25,.25);b.C=new L(.75,.75);v.q(a);return b},File:function(a,b,c){a=v.s();N(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);P(a);N(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.Za(!1);b=a.o;b.B=new L(0,.25);b.C=Eb;v.q(a);return b},Interrupt:function(a,b,c){a=v.s();N(a,1*b, +.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);N(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);N(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.o;b.B=new L(0,.25);b.C=new L(.5,.75);v.q(a);return b},InternalStorage:function(a,b,c){var d=a?a.Ac:NaN;a=a?a.Mt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=v.s();N(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);P(e);N(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.Za(!1);b=e.o;b.B=new L(d,a);b.C=Eb;v.q(e);return b},Junction:function(a,b, +c){a=v.s();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);O(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);O(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);O(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);N(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b},LinedDocument:function(a,b,c){c/=.8;a=v.s();N(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);O(a,.5*b,.4*c,.5*b,1*c,0,.7*c);P(a);N(a,.1* +b,0,!1);a.lineTo(.1*b,.75*c);a.Za(!1);b=a.o;b.B=new L(.1,0);b.C=new L(1,.6);v.q(a);return b},LoopLimit:function(a,b,c){a=v.s();N(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);P(a);b=a.o;b.B=new L(0,.25);b.C=Eb;v.q(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=v.s();var d=.5*$c;N(a,.5*b,1*c,!0);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+ +d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.o;b.B=new L(.15,.15);b.C=new L(.85,.8);v.q(a);return b},ManualInput:function(a,b,c){a=v.s();N(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);P(a);b=a.o;b.B=new L(0,.25);b.C=Eb;v.q(a);return b},MessageFromUser:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.7);var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);b=d.o;b.B=sb;b.C=new L(a,1);v.q(d);return b}, +MicroformProcessing:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.25);var d=v.s();N(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);P(d);b=d.o;b.B=new L(0,a);b.C=new L(1,1-a);v.q(d);return b},MicroformRecording:function(a,b,c){a=v.s();N(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);P(a);b=a.o;b.B=new L(0,.25);b.C=new L(1,.75);v.q(a);return b},MultiDocument:function(a,b,c){c/=.8;a=v.s(); +N(a,b,0,!0);a.lineTo(b,.5*c);O(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);O(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);O(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);P(a);N(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.Za(!1);b=a.o;b.B=new L(0,.25);b.C=new L(.8,.77);v.q(a);return b},MultiProcess:function(a,b,c){a=v.s(); +N(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);P(a);N(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.Za(!1);b=a.o;b.B=new L(0,.2);b.C=new L(.8,1);v.q(a);return b},OfflineStorage:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=1-a,e=v.s();N(e,0,0,!0);e.lineTo(1* +b,0);e.lineTo(.5*b,1*c);P(e);N(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.Za(!1);b=e.o;b.B=new L(d/4+.5*a,a);b.C=new L(3*d/4+.5*a,a+.5*d);v.q(e);return b},OffPageConnector:function(a,b,c){a=v.s();N(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);P(a);b=a.o;b.B=sb;b.C=new L(.75,1);v.q(a);return b},Or:function(a,b,c){a=v.s();var d=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a, +(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b},PaperTape:function(a,b,c){c/=.8;a=v.s();N(a,0,.7*c,!0);a.lineTo(0,.3*c);O(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);O(a,.5*b,.4*c,.5*b,1*c,0,.7*c);P(a);b=a.o;b.B=new L(0,.49);b.C=new L(1,.75);v.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Ac:NaN;a=a?a.Mt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=v.s();N(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1- +a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);P(e);b=e.o;b.B=new L(d,0);b.C=new L(1-a,1);v.q(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Ac:NaN;a=a?a.Mt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=v.s();N(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);P(e);b=e.o;b.B=new L(d,0);b.C=new L(1-a,1);v.q(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0, +1*c);P(d);N(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.Za(!1);b=d.o;b.B=new L(a,0);b.C=new L(1-a,1);v.q(d);return b},Process:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);N(d,a*b,0,!1);d.lineTo(a*b,1*c);d.Za(!1);b=d.o;b.B=new L(a,0);b.C=Eb;v.q(d);return b},Sort:function(a,b,c){a=v.s();N(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);P(a);N(a,0,.5*c,!1);a.lineTo(1*b,.5* +c);a.Za(!1);b=a.o;b.B=new L(.25,.25);b.C=new L(.75,.5);v.q(a);return b},Start:function(a,b,c){a=v.s();N(a,.25*b,0,!0);N(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);N(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.Za(!1);b=a.o;b.B=new L(.25,0);b.C=new L(.75,1);v.q(a);return b},Terminator:function(a,b,c){a=v.s();N(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.o;b.B=new L(.23,0); +b.C=new L(.77,1);v.q(a);return b},TransmittalTape:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);P(d);b=d.o;b.B=sb;b.C=new L(1,1-a);v.q(d);return b},AndGate:function(a,b,c){a=v.s();var d=.5*$c;N(a,0,0,!0);a.lineTo(.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);P(a);b=a.o;b.B=sb;b.C=new L(.55,1);v.q(a);return b},Buffer:function(a,b,c){a=v.s();N(a, +0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);P(a);b=a.o;b.B=new L(0,.25);b.C=new L(.5,.75);v.q(a);return b},Clock:function(a,b,c){a=v.s();var d=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);N(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2* +b,.75*c);a.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b},Ground:function(a,b,c){a=v.s();N(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.o;v.q(a);return b},Inverter:function(a,b,c){a=v.s();var d=.1*$c;N(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);O(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);O(a,.8*b,(.5-d)*c,(.9-d)*b,.4* +c,.9*b,.4*c);O(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.o;b.B=new L(0,.25);b.C=new L(.4,.75);v.q(a);return b},NandGate:function(a,b,c){a=v.s();var d=.5*$c,e=.4*$c,f=.1*$c;N(a,.8*b,.5*c,!0);O(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);O(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);N(a,1*b,.5*c,!0);O(a,1*b,(.5+f)*c,(.9+f)*b,.6*c,.9*b,.6*c);O(a,(.9-f)*b,.6*c,.8*b,(.5+f)*c,.8*b,.5*c);O(a,.8*b,(.5-f)*c,(.9-f)*b,.4*c,.9*b,.4*c);O(a,(.9+f)*b,.4*c,1*b,(.5-f)*c,1*b,.5* +c);b=a.o;b.B=new L(0,.05);b.C=new L(.55,.95);v.q(a);return b},NorGate:function(a,b,c){a=v.s();var d=.5,e=$c*d,f=0,h=.5;N(a,.8*b,.5*c,!0);O(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,0,1*c);O(a,.25*b,.75*c,.25*b,.25*c,0,0);O(a,(f+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*$c;f=.9;h=.5;N(a,(f-d)*b,h*c,!0);O(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);O(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);O(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);O(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.B= +new L(.2,.25);b.C=new L(.6,.75);v.q(a);return b},OrGate:function(a,b,c){a=v.s();var d=.5*$c;N(a,0,0,!0);O(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);O(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);O(a,.25*b,.75*c,.25*b,.25*c,0,0);P(a);b=a.o;b.B=new L(.2,.25);b.C=new L(.75,.75);v.q(a);return b},XnorGate:function(a,b,c){a=v.s();var d=.5,e=$c*d,f=.2,h=.5;N(a,.1*b,0,!1);O(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);N(a,.8*b,.5*c,!0);O(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,.2*b,1*c);O(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);O(a,(f+e)* +b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*$c;f=.9;h=.5;N(a,(f-d)*b,h*c,!0);O(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);O(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);O(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);O(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.B=new L(.4,.25);b.C=new L(.65,.75);v.q(a);return b},XorGate:function(a,b,c){a=v.s();var d=.5*$c;N(a,.1*b,0,!1);O(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);N(a,.2*b,0,!0);O(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);O(a,.9*b,(.5+d)* +c,(.2+d)*b,1*c,.2*b,1*c);O(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);P(a);b=a.o;b.B=new L(.4,.25);b.C=new L(.8,.75);v.q(a);return b},Capacitor:function(a,b,c){a=v.s();N(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;v.q(a);return b},Resistor:function(a,b,c){a=v.s();N(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.o;v.q(a);return b},Inductor:function(a,b,c){a=v.s();var d=.1*$c,e=.1;N(a,(e-.5* +d)*b,c,!1);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;O(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;O(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;O(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;O(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.o;v.q(a);return b},ACvoltageSource:function(a,b,c){a=v.s();var d=.5*$c;N(a,0*b,.5*c,!1);O(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);O(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+d)* +c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);O(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.o;b.Jd=Si;v.q(a);return b},DCvoltageSource:function(a,b,c){a=v.s();N(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;v.q(a);return b},Diode:function(a,b,c){a=v.s();N(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.o;b.B=new L(0,.25);b.C=new L(.5,.75);v.q(a);return b},Wifi:function(a,b,c){var d=b,e=c; +b*=.38;c*=.6;a=v.s();var f=.8*$c,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;N(a,k*b+d,(l+h)*c+e,!0);O(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);O(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);O(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);P(a);f=.4*$c;h=.4;k=.2;l=.5;N(a,k*b+d,(l+h)*c+e,!0);O(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);O(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k* +b+d,(l-h)*c+e);O(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);O(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);P(a);f=.2*$c;h=.2;l=k=.5;N(a,(k-h)*b+d,l*c+e,!0);O(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);O(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);f=.4*$c;h=.4;k=.8;l=.5;N(a,k*b+d,(l-h)*c+e,!0);O(a,(k+f)*b+d,(l- +h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);O(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);O(a,(k+h-.5*f)*b+d,(l-f)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);P(a);f=.8*$c;h=.8;k=1;l=.5;N(a,k*b+d,(l-h)*c+e,!0);O(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);O(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);O(a,(k+h-.5*f)*b+d,(l-f)*c+ +e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);P(a);b=a.o;v.q(a);return b},Email:function(a,b,c){a=v.s();N(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);P(a);N(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.Za(!1);b=a.o;v.q(a);return b},Ethernet:function(a,b,c){a=v.s();N(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);P(a);N(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c); +a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);P(a);N(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);P(a);N(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.Za(!1);b=a.o;v.q(a);return b},Power:function(a,b,c){a=v.s();var d=.4*$c,e=.4,f=v.L(),h=v.L(),k=v.L(),l=v.L();$d(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);var m=v.Mb(h.x, +h.y);N(a,h.x*b,h.y*c,!0);O(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);O(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);O(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);$d(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);O(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*$c;e=.3;$d(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);a.lineTo(h.x*b,h.y*c);O(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);O(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);O(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ +e)*b,.5*c);$d(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);O(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);P(a);N(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);P(a);v.v(f);v.v(h);v.v(k);v.v(l);v.v(m);b=a.o;b.B=new L(.25,.55);b.C=new L(.75,.8);v.q(a);return b},Fallout:function(a,b,c){a=v.s();var d=.5*$c;N(a,0*b,.5*c,!0);O(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);O(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, +.5*c);var e=d=0;N(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;P(a);N(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;P(a);N(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);P(a);b=a.o;b.Jd=Si;v.q(a);return b},IrritationHazard:function(a,b,c){a=v.s();N(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8* +b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);P(a);b=a.o;b.B=new L(.3,.3);b.C=new L(.7,.7);v.q(a);return b},ElectricalHazard:function(a,b,c){a=v.s();N(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65* +b,.56*c);a.lineTo(0*b,.68*c);P(a);b=a.o;v.q(a);return b},FireHazard:function(a,b,c){a=v.s();N(a,.1*b,1*c,!0);O(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);O(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);O(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);O(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);O(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);O(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);P(a);b=a.o;b.B=new L(.05,.645);b.C=new L(.884,.908);v.q(a);return b},BpmnActivityLoop:function(a,b,c){a=v.s();var d=4*(Math.SQRT2-1)/3*.5;N(a,.65*b,1*c, +!1);O(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);O(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);O(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);O(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.o;v.q(a);return b},BpmnActivityParallel:function(a,b,c){a=v.s();N(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;v.q(a);return b},BpmnActivitySequential:function(a,b,c){a=v.s();N(a,0,0,!1);a.lineTo(1* +b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.o;v.q(a);return b},BpmnActivityAdHoc:function(a,b,c){a=v.s();N(a,0,0,!1);N(a,1*b,1*c,!1);N(a,0,.5*c,!1);O(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);O(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.o;v.q(a);return b},BpmnActivityCompensation:function(a,b,c){a=v.s();N(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);P(a);b=a.o;v.q(a);return b},BpmnTaskMessage:function(a, +b,c){a=v.s();N(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);P(a);N(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.Za(!1);b=a.o;v.q(a);return b},BpmnTaskScript:function(a,b,c){a=v.s();N(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);O(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);O(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);P(a);N(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.Za(!1);b=a.o;v.q(a);return b}, +BpmnTaskUser:function(a,b,c){a=v.s();N(a,0,0,!1);N(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);O(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);O(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,f=4*(1-Math.cos(e))/(3*Math.sin(e)),e=f*d,f=f*d;O(a,(.5-(e+d)/2)*b,(d+(d+f)/2)*c,(.5-d)*b,(d+f)*c,(.5-d)*b,d*c);O(a,(.5-d)*b,(d-f)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c); +O(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-f)*c,(.5+d)*b,d*c);O(a,(.5+d)*b,(d+f)*c,(.5+(e+d)/2)*b,(d+(d+f)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);N(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);N(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.o;v.q(a);return b},BpmnEventConditional:function(a,b,c){a=v.s();N(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);P(a);N(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8* +b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.Za(!1);b=a.o;v.q(a);return b},BpmnEventError:function(a,b,c){a=v.s();N(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);P(a);b=a.o;v.q(a);return b},BpmnEventEscalation:function(a,b,c){a=v.s();N(a,0,0,!1);N(a,1*b,1*c,!1);N(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);P(a);b=a.o;v.q(a);return b},BpmnEventTimer:function(a,b,c){a= +v.s();var d=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b}},Xo;for(Xo in lo)lo[Xo.toLowerCase()]=Xo; +var Yo={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", +BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4", +BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", +TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", +BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z", +DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z", +TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z", +OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", +OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"}; +function po(a){if(null!==Yo){for(var b in Yo){var c=$e(Yo[b],!1);Jd[b]=c;b.toLowerCase()!==b&&(Jd[b.toLowerCase()]=b)}Yo=null}b=Jd[a];if(void 0===b){b=a.toLowerCase();if("none"===b)return"None";b=Jd[b]}return"string"===typeof b?b:b instanceof ve?a:null} +function R(a){0===arguments.length?D.call(this):D.call(this,a);this.Q=311807;this.Jk=this.di="";this.Yr=this.Vr=this.hs=this.dr=null;this.ks="";this.bi=this.js=this.pm=null;this.Xr="";this.no=null;this.Wr=Ed;this.Zr="";this.oo=null;this.le="";this.lv=this.fq=this.uk=null;this.wi=(new z(NaN,NaN)).freeze();this.ir="";this.Ok=null;this.jr=sb;this.sr=nd;this.lr=od;this.yq=null;this.er=Zo;this.rm=md;this.qm="gray";this.ng=4;this.aC=-1;this.Ms=NaN;this.CF=new B;this.em=null;this.zj=NaN}v.Ja(R,D); +v.ea("Part",R);R.prototype.cloneProtected=function(a){D.prototype.cloneProtected.call(this,a);a.Q=this.Q&-4097|49152;a.di=this.di;a.Jk=this.Jk;a.dr=this.dr;a.hs=this.hs;a.Vr=this.Vr;a.Yr=this.Yr;a.ks=this.ks;a.js=this.js;a.bi=null;a.Xr=this.Xr;a.Wr=this.Wr.R();a.Zr=this.Zr;a.le=this.le;a.fq=this.fq;a.wi.assign(this.wi);a.ir=this.ir;a.jr=this.jr.R();a.sr=this.sr.R();a.lr=this.lr.R();a.yq=this.yq;a.er=this.er;a.rm=this.rm.R();a.qm=this.qm;a.ng=this.ng;a.Ms=this.Ms}; +R.prototype.Vh=function(a){D.prototype.Vh.call(this,a);a.rl();a.pm=null;a.no=null;a.oo=null;a.Ok=null;a.em=null};R.prototype.toString=function(){var a=v.af(Object.getPrototypeOf(this))+"#"+v.ld(this);null!==this.data&&(a+="("+Df(this.data)+")");return a};R.LayoutNone=0;var nl;R.LayoutAdded=nl=1;var vl;R.LayoutRemoved=vl=2;R.LayoutShown=4;R.LayoutHidden=8;R.LayoutNodeSized=16;var Zl;R.LayoutGroupLayout=Zl=32;R.LayoutNodeReplaced=64;var Zo;R.LayoutStandard=Zo=nl|vl|28|Zl|64;R.LayoutAll=16777215; +R.prototype.Zm=function(a,b,c,d,e,f,h){var k=this.g;null!==k&&(a===Bf&&"elements"===b?e instanceof D?ol(e,function(a){ql(k,a);pl(k,a)}):e instanceof mk&&Ll(k,e):a===Cf&&"elements"===b&&(e instanceof D?ol(e,function(a){ul(k,a);tl(k,a)}):e instanceof mk&&Ml(k,e)),k.Lc(a,b,c,d,e,f,h))};R.prototype.updateTargetBindings=R.prototype.Hb=function(a){D.prototype.Hb.call(this,a);if(null!==this.data){a=this.za.n;for(var b=a.length,c=0;ch&&a.y>k&&a.righth&&b.y>k&&b.right=c.NH)){this.Q^=4096;var d=!1;if(null!==c){d=c.tb;c.tb=!0;var e=c.selection;e.Oa();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.Nd();a=this.wI;null!==a&&a(this);null!==c&&(c.ue(),c.tb=d)}}}); +v.defineProperty(R,{fh:"isHighlighted"},function(){return 0!==(this.Q&524288)},function(a){var b=0!==(this.Q&524288);if(b!==a){this.Q^=524288;var c=this.g;null!==c&&(c=c.Pm,c.Oa(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.pa()}});v.defineProperty(R,{wl:"isShadowed"},function(){return 0!==(this.Q&8192)},function(a){var b=0!==(this.Q&8192);b!==a&&(this.Q^=8192,this.h("isShadowed",b,a),this.pa())});function gl(a){return 0!==(a.Q&32768)} +function ap(a,b){a.Q=b?a.Q|32768:a.Q&-32769}function Im(a,b){a.Q=b?a.Q|65536:a.Q&-65537}function Yj(a){return 0!==(a.Q&131072)}R.prototype.yf=function(a){this.Q=a?this.Q|131072:this.Q&-131073};function hp(a,b){a.Q=b?a.Q|1048576:a.Q&-1048577}v.defineProperty(R,{aE:"isAnimated"},function(){return 0!==(this.Q&262144)},function(a){var b=0!==(this.Q&262144);b!==a&&(this.Q^=262144,this.h("isAnimated",b,a))}); +v.defineProperty(R,{lA:"selectionObjectName"},function(){return this.ks},function(a){var b=this.ks;b!==a&&(this.ks=a,this.pm=null,this.h("selectionObjectName",b,a))});v.defineProperty(R,{vI:"selectionAdornmentTemplate"},function(){return this.hs},function(a){var b=this.hs;b!==a&&(this instanceof W&&(a.type=Ai),this.hs=a,this.h("selectionAdornmentTemplate",b,a))}); +v.u(R,{Wt:"selectionObject"},function(){if(null===this.pm){var a=this.lA;null!==a&&""!==a?(a=this.be(a),this.pm=null!==a?a:this):this instanceof W?(a=this.path,this.pm=null!==a?a:this):this.pm=this}return this.pm});v.defineProperty(R,{wI:"selectionChanged"},function(){return this.js},function(a){var b=this.js;b!==a&&(null!==a&&v.j(a,"function",R,"selectionChanged"),this.js=a,this.h("selectionChanged",b,a))}); +v.defineProperty(R,{LE:"resizeAdornmentTemplate"},function(){return this.Vr},function(a){var b=this.Vr;b!==a&&(this.Vr=a,this.h("resizeAdornmentTemplate",b,a))});v.defineProperty(R,{NE:"resizeObjectName"},function(){return this.Xr},function(a){var b=this.Xr;b!==a&&(this.Xr=a,this.no=null,this.h("resizeObjectName",b,a))});v.u(R,{ME:"resizeObject"},function(){if(null===this.no){var a=this.NE;null!==a&&""!==a?(a=this.be(a),this.no=null!==a?a:this):this.no=this}return this.no}); +v.defineProperty(R,{lI:"resizeCellSize"},function(){return this.Wr},function(a){var b=this.Wr;b.K(a)||(this.Wr=a=a.R(),this.h("resizeCellSize",b,a))});v.defineProperty(R,{oI:"rotateAdornmentTemplate"},function(){return this.Yr},function(a){var b=this.Yr;b!==a&&(this.Yr=a,this.h("rotateAdornmentTemplate",b,a))});v.defineProperty(R,{pI:"rotateObjectName"},function(){return this.Zr},function(a){var b=this.Zr;b!==a&&(this.Zr=a,this.oo=null,this.h("rotateObjectName",b,a))}); +v.u(R,{PE:"rotateObject"},function(){if(null===this.oo){var a=this.pI;null!==a&&""!==a?(a=this.be(a),this.oo=null!==a?a:this):this.oo=this}return this.oo});v.defineProperty(R,{text:"text"},function(){return this.le},function(a){var b=this.le;b!==a&&(this.le=a,this.h("text",b,a))}); +v.defineProperty(R,{Ta:"containingGroup"},function(){return this.uk},function(a){if(this.Od()){var b=this.uk;if(b!==a){null===a||this!==a&&!a.Xh(this)||(this===a&&v.k("Cannot make a Group a member of itself: "+this.toString()),v.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.H(vl);var c=this.g;null!==b?ip(b,this):this instanceof V&&null!==c&&c.Vk.remove(this);this.uk=a;null!==a?jp(a,this):this instanceof V&&null!==c&&c.Vk.add(this);this.H(nl); +if(null!==c){var d=this.data,e=c.ba;null!==d&&e instanceof Q&&e.lx(d,e.gb(null!==a?a.data:null))}d=this.uD;null!==d&&(e=!0,null!==c&&(e=c.Ra,c.Ra=!0),d(this,b,a),null!==c&&(c.Ra=e));if(this instanceof V)for(c=new J(R),Rg(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof S)for(d=d.te;d.next();)Ol(d.value);if(this instanceof S)for(d=this.te;d.next();)Ol(d.value);this.h("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&dk(b,-1,a))}}else v.k("cannot set the Part.containingGroup of a Link or Adornment")}); +g=R.prototype;g.rl=function(){var a=this.Ta;null!==a&&(a.P(),null!==a.Gb&&a.Gb.P(),a.cf())};g.pa=function(){var a=this.g;null!==a&&!fl(this)&&!gl(this)&&this.isVisible()&&this.mc.G()&&a.pa(ck(this,this.mc))};g.qt=function(a){a||(a=this.uk,null!==a&&jp(a,this))};g.rt=function(a){a||(a=this.uk,null!==a&&ip(a,this))};g.Km=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ba,null!==b&&b.ex(a))}}; +v.defineProperty(R,{uD:"containingGroupChanged"},function(){return this.fq},function(a){var b=this.fq;b!==a&&(null!==a&&v.j(a,"function",R,"containingGroupChanged"),this.fq=a,this.h("containingGroupChanged",b,a))});R.prototype.findSubGraphLevel=function(){return kp(this,this)};function kp(a,b){var c=b.Ta;return null!==c?1+kp(a,c):b instanceof S&&(c=b.ee,null!==c)?kp(a,c):0}R.prototype.findTopLevelPart=function(){return lp(this,this)}; +function lp(a,b){var c=b.Ta;return null!==c?lp(a,c):b instanceof S&&(c=b.ee,null!==c)?lp(a,c):b}v.u(R,{fp:"isTopLevel"},function(){return null!==this.Ta||this instanceof S&&this.uf?!1:!0});R.prototype.isMemberOf=R.prototype.Xh=function(a){return a instanceof V?mp(this,this,a):!1};function mp(a,b,c){if(b===c||null===c)return!1;var d=b.Ta;return null===d||d!==c&&!mp(a,d,c)?b instanceof S&&(b=b.ee,null!==b)?mp(a,b,c):!1:!0} +R.prototype.findCommonContainingGroup=R.prototype.OG=function(a){if(null===a)return null;if(this===a)return this.Ta;for(var b=this;null!==b;)b instanceof V&&hp(b,!0),b=b.Ta;for(var c=null,b=a;null!==b;){if(0!==(b.Q&1048576)){c=b;break}b=b.Ta}for(b=this;null!==b;)b instanceof V&&hp(b,!1),b=b.Ta;return c};v.defineProperty(R,{CH:"layoutConditions"},function(){return this.er},function(a){var b=this.er;b!==a&&(this.er=a,this.h("layoutConditions",b,a))}); +R.prototype.canLayout=function(){if(!this.kE||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Gc||this instanceof S&&this.uf?!1:!0};R.prototype.invalidateLayout=R.prototype.H=function(a){void 0===a&&(a=16777215);var b;this.kE&&0!==(a&this.CH)?(b=this.layer,null!==b&&b.Gc||this instanceof S&&this.uf?b=!1:(b=this.g,b=null!==b&&b.la.ib?!1:!0)):b=!1;if(b)if(b=this.uk,null!==b){var c=b.Pb;null!==c?c.H():b.H(a)}else a=this.g,null!==a&&(c=a.Pb,null!==c&&c.H())}; +function sl(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Gc?!1:!0}v.defineProperty(R,{FD:"dragComputation"},function(){return this.yq},function(a){var b=this.yq;b!==a&&(null!==a&&v.j(a,"function",R,"dragComputation"),this.yq=a,this.h("dragComputation",b,a))});v.defineProperty(R,{AI:"shadowOffset"},function(){return this.rm},function(a){var b=this.rm;b.K(a)||(this.rm=a=a.R(),this.pa(),this.h("shadowOffset",b,a))}); +v.defineProperty(R,{shadowColor:"shadowColor"},function(){return this.qm},function(a){var b=this.qm;b!==a&&(this.qm=a,this.pa(),this.h("shadowColor",b,a))});v.defineProperty(R,{shadowBlur:"shadowBlur"},function(){return this.ng},function(a){var b=this.ng;b!==a&&(this.ng=a,this.pa(),this.h("shadowBlur",b,a))});function Sg(a){0===arguments.length?R.call(this,Vi):R.call(this,a);this.Q&=-257;this.Jk="Adornment";this.Gb=this.Lg=this.Db=null}v.Ja(Sg,R);v.ea("Adornment",Sg); +Sg.prototype.toString=function(){var a=this.Lf;return"Adornment("+this.fc+")"+(null!==a?a.toString():"")};Sg.prototype.updateRelationshipsFromData=function(){};Sg.prototype.Um=function(a){var b=this.Zb.Y,c=this.Zb;if(b instanceof W&&c instanceof Y){var d=b.path,c=d.Sa;b.Um(a);c=d.Sa;a=this.za.n;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.eh){b.eh=!0;var c=new J(S);c.add(this);yp(this,c,b.Pd,a,b.Na,this,b.zA===jk);b.eh=!1}}; +function yp(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.eh){b.eh=!0;var c=new J(S);c.add(this);Ap(this,c,b.Pd,a,b.Na,this,b.zA===jk);b.eh=!1}};function Ap(a,b,c,d,e,f,h){for(var k=f===a?!1:a.md,l=c?a.Aw():a.vg();l.next();){var m=l.value;m.Hc&&(k||m.qg||m.ic(),m=m.yz(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.nd(!0),m.rl(),h&&Uj(e,m,f)),2a&&(a-=180);break;case Gp:a=re(c+90);90a&&(a-=180);break;case Hp:a=re(c-90);90a&&(a-=180);break;case Ip:a=re(c);if(45a||225a)return 0;90a&&(a-=180)}return re(a)}; +v.defineProperty(W,{T:"fromNode"},function(){return this.dg},function(a){var b=this.dg;if(b!==a){var c=this.kd;null!==b&&(this.pg!==b&&vp(b,this,c),Jp(this),this.H(vl));this.dg=a;null!==a&&this.nd(a.isVisible());this.pi=null;this.ic();var d=this.g;if(null!==d){var e=this.data,f=d.ba;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.kx(e,f.gb(h))}else f instanceof Of&&(h=null!==a?a.data:null,d.Pd?f.oh(e,f.gb(h)):(null!==b&&f.oh(b.data,void 0),f.oh(h,f.gb(null!==this.pg?this.pg.data:null))))}e= +this.kd;f=this.QD;null!==f&&(h=!0,null!==d&&(h=d.Ra,d.Ra=!0),f(this,c,e),null!==d&&(d.Ra=h));null!==a&&(this.pg!==a&&up(a,this,e),Kp(this),this.H(nl));this.h("fromNode",b,a);Ol(this)}}); +v.defineProperty(W,{wg:"fromPortId"},function(){return this.zh},function(a){var b=this.zh;if(b!==a){var c=this.kd;null!==c&&tp(this.T,c);Jp(this);this.zh=a;var d=this.kd;null!==d&&tp(this.T,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof Q&&h.nA(f,a)}c!==d&&(this.pi=null,this.ic(),f=this.QD,null!==f&&(h=!0,null!==e&&(h=e.Ra,e.Ra=!0),f(this,c,d),null!==e&&(e.Ra=h)));Kp(this);this.h("fromPortId",b,a)}});v.u(W,{kd:"fromPort"},function(){var a=this.dg;return null===a?null:a.kl(this.zh)}); +v.defineProperty(W,{QD:"fromPortChanged"},function(){return this.Gq},function(a){var b=this.Gq;b!==a&&(null!==a&&v.j(a,"function",W,"fromPortChanged"),this.Gq=a,this.h("fromPortChanged",b,a))}); +v.defineProperty(W,{Z:"toNode"},function(){return this.pg},function(a){var b=this.pg;if(b!==a){var c=this.Sd;null!==b&&(this.dg!==b&&vp(b,this,c),Jp(this),this.H(vl));this.pg=a;null!==a&&this.nd(a.isVisible());this.pi=null;this.ic();var d=this.g;if(null!==d){var e=this.data,f=d.ba;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.ox(e,f.gb(h))}else f instanceof Of&&(h=null!==a?a.data:null,d.Pd?(null!==b&&f.oh(b.data,void 0),f.oh(h,f.gb(null!==this.dg?this.dg.data:null))):f.oh(e,f.gb(h)))}e= +this.Sd;f=this.hF;null!==f&&(h=!0,null!==d&&(h=d.Ra,d.Ra=!0),f(this,c,e),null!==d&&(d.Ra=h));null!==a&&(this.dg!==a&&up(a,this,e),Kp(this),this.H(nl));this.h("toNode",b,a);Ol(this)}}); +v.defineProperty(W,{qh:"toPortId"},function(){return this.Rh},function(a){var b=this.Rh;if(b!==a){var c=this.Sd;null!==c&&tp(this.Z,c);Jp(this);this.Rh=a;var d=this.Sd;null!==d&&tp(this.Z,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof Q&&h.qA(f,a)}c!==d&&(this.pi=null,this.ic(),f=this.hF,null!==f&&(h=!0,null!==e&&(h=e.Ra,e.Ra=!0),f(this,c,d),null!==e&&(e.Ra=h)));Kp(this);this.h("toPortId",b,a)}});v.u(W,{Sd:"toPort"},function(){var a=this.pg;return null===a?null:a.kl(this.Rh)}); +v.defineProperty(W,{hF:"toPortChanged"},function(){return this.Ds},function(a){var b=this.Ds;b!==a&&(null!==a&&v.j(a,"function",W,"toPortChanged"),this.Ds=a,this.h("toPortChanged",b,a))});v.defineProperty(W,{xb:"fromSpot"},function(){return null!==this.ga?this.ga.pj:fc},function(a){this.Me();var b=this.ga.pj;b.K(a)||(a=a.R(),this.ga.pj=a,this.h("fromSpot",b,a),this.ic())}); +v.defineProperty(W,{ml:"fromEndSegmentLength"},function(){return null!==this.ga?this.ga.nj:NaN},function(a){this.Me();var b=this.ga.nj;b!==a&&(0>a&&v.va(a,">= 0",W,"fromEndSegmentLength"),this.ga.nj=a,this.h("fromEndSegmentLength",b,a),this.ic())});v.defineProperty(W,{kt:"fromEndSegmentDirection"},function(){return null!==this.ga?this.ga.mj:op},function(a){this.Me();var b=this.ga.mj;b!==a&&(this.ga.mj=a,this.h("fromEndSegmentDirection",b,a),this.ic())}); +v.defineProperty(W,{lt:"fromShortLength"},function(){return null!==this.ga?this.ga.oj:NaN},function(a){this.Me();var b=this.ga.oj;b!==a&&(this.ga.oj=a,this.h("fromShortLength",b,a),this.ic())});v.defineProperty(W,{yb:"toSpot"},function(){return null!==this.ga?this.ga.Qj:fc},function(a){this.Me();var b=this.ga.Qj;b.K(a)||(a=a.R(),this.ga.Qj=a,this.h("toSpot",b,a),this.ic())}); +v.defineProperty(W,{Gl:"toEndSegmentLength"},function(){return null!==this.ga?this.ga.Oj:NaN},function(a){this.Me();var b=this.ga.Oj;b!==a&&(0>a&&v.va(a,">= 0",W,"toEndSegmentLength"),this.ga.Oj=a,this.h("toEndSegmentLength",b,a),this.ic())});v.defineProperty(W,{eu:"toEndSegmentDirection"},function(){return null!==this.ga?this.ga.Nj:op},function(a){this.Me();var b=this.ga.Nj;b!==a&&(this.ga.Nj=a,this.h("toEndSegmentDirection",b,a),this.ic())}); +v.defineProperty(W,{fu:"toShortLength"},function(){return null!==this.ga?this.ga.Pj:NaN},function(a){this.Me();var b=this.ga.Pj;b!==a&&(this.ga.Pj=a,this.h("toShortLength",b,a),this.ic())});function Ol(a){var b=a.T,c=a.Z;null!==b?null!==c?Lp(a,b.OG(c)):Lp(a,null):Lp(a,null)}function Lp(a,b){var c=a.uk;if(c!==b){null!==c&&ip(c,a);a.uk=b;null!==b&&jp(b,a);var d=a.uD;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Ra,f.Ra=!0);d(a,c,b);null!==f&&(f.Ra=e)}!a.qg||a.IC!==c&&a.KC!==c||a.ic()}} +W.prototype.rl=function(){var a=this.Ta;null!==a&&this.T!==a&&this.Z!==a&&a.qw&&R.prototype.rl.call(this)};W.prototype.getOtherNode=W.prototype.yz=function(a){var b=this.T;return a===b?this.Z:b};W.prototype.getOtherPort=function(a){var b=this.kd;return a===b?this.Sd:b};v.u(W,{UJ:"isLabeledLink"},function(){return null===this.Ce?!1:0=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Yd(e.x,e.y,k.x,k.y,l.x,l.y,f.x,f.y,.5,a);b=Math.min(f.x,b);c=Math.min(f.y,c);e=f}else for(e=this.l(0),f=this.l(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.m(e.x,e.y,0,0),a.ej(f),h=2;hc&&(c=-c)):Hc(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.rf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}v.sa(f);b=this.l(h);f=this.l(h+1);b.x===f.x?b.y>f.y?a.m(b.x,b.y-(e/2-c)):a.m(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.m(b.x-(e/2-c),b.y):a.m(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.m(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a};v.u(W,{uE:"midAngle"},function(){this.fn();return this.computeMidAngle()}); +W.prototype.computeMidAngle=function(){var a=this.oa;if(2>a)return NaN;if(this.computeCurve()===Ki&&4<=a&&!this.jc){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.l(c),d=this.l(c+1),a=this.l(c+2),c=this.l(c+3),e=d.x,d=d.y,f=a.x,a=a.y,h=(e+f)/2,k=(d+a)/2;return Va(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(f+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10))?e>c+10?d.xc(a):b.xc(a):b.xc(d);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.rf(d);e=d.rf(a);return c>e+10?b.xc(d):e>c+10?d.xc(a):b.xc(a)}; +v.defineProperty(W,{points:"points"},function(){return this.Zc},function(a){var b=this.Zc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;ep&&(t-=180));0>t?t+=360:360<=t&&(t-=360);k&&(u+=Math.abs(p));0===t?r=u:90===t?s=u:180===t?r=-u:270===t?s=-u:(r=u*Math.cos(t*Math.PI/180),s=u*Math.sin(t*Math.PI/180));if(f.se()&&k){var y=c.Ya(zb,v.L()),w=v.Mb(y.x+1E3*r,y.y+1E3*s);this.getLinkPointFromPoint(b,c,y,w,!0,q);v.v(y); +v.v(w)}}var u=this.getLinkPoint(d,e,h,!1,l,b,c),x=0,A=0,H=0;if(l||h!==rb||k)y=this.computeEndSegmentLength(d,e,h,!1),H=this.getLinkDirection(d,e,u,h,!1,l,b,c),k&&(H+=l?0:30,0>p&&(H+=180)),0>H?H+=360:360<=H&&(H-=360),k&&(y+=Math.abs(p)),0===H?x=y:90===H?A=y:180===H?x=-y:270===H?A=-y:(x=y*Math.cos(H*Math.PI/180),A=y*Math.sin(H*Math.PI/180)),h.se()&&k&&(y=e.Ya(zb,v.L()),w=v.Mb(y.x+1E3*x,y.y+1E3*A),this.getLinkPointFromPoint(d,e,y,w,!1,u),v.v(y),v.v(w));e=q;if(l||f!==rb||k)e=new z(q.x+r,q.y+s);c=u;if(l|| +h!==rb||k)c=new z(u.x+x,u.y+A);!n&&!l&&f===rb&&3k&&(m=-m),r=(0>h?-1:1)*m+q,s=l*(r-q)+t),q=a.x+2*f/3,t=a.y+2*h/3,u=q,x=t,K(h,0)?x=0h?-1:1)*m+q,x=l*(u- +q)+t),this.No(),this.Sh(a),this.Zk(r,s),this.Zk(u,x),this.Sh(n),this.zf(0,this.getLinkPoint(b,c,rb,!0,!1,d,e)),this.zf(3,this.getLinkPoint(d,e,rb,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,rb,!0,!1,a,e),e=this.getLinkPoint(a,e,rb,!1,!1,b,c),this.hasCurviness()?(h=e.x-d.x,b=e.y-d.y,c=this.computeCurviness(),a=d.x+h/2,n=d.y+b/2,f=a,k=n,K(b,0)?k=0c&&(f=-f),f=(0>b?-1:1)*f+a,k=h*(f-a)+n),this.Sh(d),this.Zk(f,k)):this.Sh(d),this.Sh(e)));return!0}; +function Rp(a,b){Math.abs(b.x-a.x)>Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} +W.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new z);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.S;null===e||e.Kg()||(e=e.S);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Yg;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.$o(e,h,k,l, +f);null!==a&&f.transform(a);return f};function Sp(a,b){var c=b.Mr;null===c&&(c=new Tp,c.port=b,c.Jc=b.Y,b.Mr=c);return Up(c,a)} +W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.bd())return b.Ya(c,k),k;if(c.Vi()&&(c=Sp(this,b),null!==c)){k.assign(c.jp);if(e&&this.hx===Bp){var l=Sp(this,h);if(null!==l&&c.Im=m.x&&a.x<=m.x+m.width?k.x=a.x:a.y>=m.y&&a.y<=m.y+m.height&&(k.y=a.y);v.v(c);v.v(l)}}return k}f=b.Ya(zb,v.L());l=c=null;this.oa>(e?6:2)?(l=d?this.l(1):this.l(this.oa-2),e&& +(l=Rp(f,l.copy()))):(c=v.L(),l=h.Ya(zb,c),e&&(l=Rp(f,l)),v.v(c));this.getLinkPointFromPoint(a,b,f,l,d,k);v.v(f);return k}; +W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.bd())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(n=e?this.l(1):this.l(this.oa-2),n=f?Rp(l,n.copy()):c):(m=v.L(),n=k.Ya(zb,m),v.v(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;v.v(l)}d.se()&&h.Xh(a)&&(c+=180,360<=c&&(c-=360));a=op;a=e?this.kt:this.eu;a===op&&(a=e?b.kt:b.eu);switch(a){case pp:b=b.ol();c+=b;360<=c&&(c-=360);break;case op:case zm:b=b.ol();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; +W.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Vi()&&(a=Sp(this,b),null!==a))return a.ww;a=NaN;a=d?this.ml:this.Gl;null!==b&&isNaN(a)&&(a=d?b.ml:b.Gl);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a){return a?Pp(this,this.kd):Qp(this,this.Sd)};function Pp(a,b){if(null===b)return zb;var c=a.xb;c.Uc()&&(void 0===b&&(b=a.kd),null!==b&&(c=b.xb));return c===fc?rb:c} +function Qp(a,b){if(null===b)return zb;var c=a.yb;c.Uc()&&(void 0===b&&(b=a.Sd),null!==b&&(c=b.yb));return c===fc?rb:c}W.prototype.computeOtherPoint=function(a,b){var c=b.Ya(zb),d;d=b.Mr;d=null!==d?Up(d,this):null;null!==d&&(c=d.jp);return c};W.prototype.computeShortLength=function(a){return a?Vp(this):Wp(this)};function Vp(a){var b=a.lt;isNaN(b)&&(a=a.kd,null!==a&&(b=a.lt));return isNaN(b)?0:b}function Wp(a){var b=a.fu;isNaN(b)&&(a=a.Sd,null!==a&&(b=a.fu));return isNaN(b)?0:b} +W.prototype.Yj=function(a,b,c,d,e,f){if(!1===this.Gg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=v.ph(),h.reset());h.multiply(this.transform);if(this.Fm(a,h))return co(this,b,c,e),void 0===f&&v.$e(h),!0;if(this.xg(a,h)){var k=!1;if(!this.Pg)for(var l=this.za.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.bc){var p=n.U,q=this.Ha;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=v.ph();p.set(h);if(n instanceof D)k=n.Yj(a,b,c,d,e,p);else if(this.path=== +n){var k=n,r=a,s=d,q=p;if(!1===k.Gg)k=!1;else if(q.multiply(k.transform),s)b:{var t=r,u=q;if(k.Fm(t,u))k=!0;else{if(void 0===u&&(u=k.transform,t.Wj(k.U))){k=!0;break b}var q=t.left,r=t.right,s=t.top,t=t.bottom,y=v.L(),w=v.L(),x=v.L(),A=v.ph();A.set(u);A.xE(k.transform);A.Dz();w.x=r;w.y=s;w.transform(A);y.x=q;y.y=s;y.transform(A);u=!1;oo(k,y,w,x)?u=!0:(y.x=r,y.y=t,y.transform(A),oo(k,y,w,x)?u=!0:(w.x=q,w.y=t,w.transform(A),oo(k,y,w,x)?u=!0:(y.x=q,y.y=s,y.transform(A),oo(k,y,w,x)&&(u=!0))));v.$e(A); +v.v(y);v.v(w);v.v(x);k=u}}else k=k.Fm(r,q)}else k=Em(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&e.add(n));v.$e(p)}}}void 0===f&&v.$e(h);return k||null!==this.background||null!==this.Am}void 0===f&&v.$e(h);return!1};v.u(W,{jc:"isOrthogonal"},function(){return 2===(this.lm.value&2)});v.u(W,{sl:"isAvoiding"},function(){return 4===(this.lm.value&4)});W.prototype.computeCurve=function(){if(null===this.pi){var a=this.kd,b=this.jc;this.pi=null!==a&&a===this.Sd&&!b}return this.pi?Ki:this.Ke}; +W.prototype.computeCorner=function(){if(this.Ke===Ki)return 0;var a=this.iz;if(isNaN(a)||0>a)a=10;return a};W.prototype.findMidLabel=function(){for(var a=this.path,b=this.za.n,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Hc(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.zf(a,b);for(a+= +1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.V(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.zf(c,d)}}return!0;case fn:f=this.l(a);p=this.l(c);if(!f.Fc(b)||!p.Fc(d)){var e=f.x,f=f.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-f)*(p-f),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.zf(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.U.copy(),k=f.U.copy();if(h.G()&&k.G()){h.Pf(8,8);k.Pf(8,8);h.ej(a);k.ej(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new z(c.x,a.y),m=new z(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Fa(a)||h.Fa(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new z(Math.max((a.x+c.x)/2,a.x),a.y),m=new z(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,k.right,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.Fa(a)||h.Fa(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new z(Math.min((a.x+c.x)/2,a.x),a.y),m=new z(l.x,c.y)}else l.y=270=== +d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new z(a.x,c.y),m=new z((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)? +this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.Fa(a)||h.Fa(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right, +Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new z(a.x,Math.max((a.y+c.y)/2,a.y)),m=new z(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Fa(a)||h.Fa(c))?l.x=this.computeMidOrthoPosition(a.x, +c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new z(a.x,Math.min((a.y+c.y)/2,a.y)),m=new z(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==Yp(e,c.x,c.y)){Zp(this,e,c.x,c.y,d,!0);d=this.l(2);if(4>this.oa)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.V(2,d.x,d.y),this.w(3,d.x,d.y);else if(c=this.l(3),0===b|| +180===b)K(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.V(2,b,a.y),this.V(3,b,c.y)):K(d.y,c.y)?(Math.abs(a.y-d.y)<=e.Ko/2&&(this.V(2,d.x,a.y),this.V(3,c.x,a.y)),this.w(2,d.x,a.y)):this.V(2,a.x,d.y);else if(90===b||270===b)K(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.V(2,a.x,b),this.V(3,c.x,b)):K(d.x,c.x)?(Math.abs(a.x-d.x)<=e.Mo/2&&(this.V(2,a.x,d.y),this.V(3,a.x,c.y)),this.w(2,a.x,d.y)):this.V(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Sh(l),this.Sh(m))}}; +W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function Kh(a){if(null===a.g||!a.sl)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=bm(a.g,!0,a.Ta,null);for(var d=1;da){var b=new ve(Fe),c=new Ge(0,0);b.Ub.add(c);return b}var d=!1,b=this.g;null!==b&&Mp(this)&&b.xk.contains(this)&&null!==this.Hv&&(d=!0);var c=b=0,e=this.l(0).copy(),f=e.copy(),b=this.Zc.n,h=this.computeCurve();if(h===Ki&&3<=a&&!Hc(this.Hp,0))if(3===a)var k=this.l(1),b=Math.min(e.x,k.x),c=Math.min(e.y,k.y),k=this.l(2),b=Math.min(b,k.x),c=Math.min(c,k.y);else{if(this.jc)for(k=0;k=a&&(k=a-1),b=this.l(k),f.x=Math.min(b.x,f.x),f.y=Math.min(b.y,f.y);b=f.x;c=f.y}else{for(k=0;ky?r>q?(t.x=w-A,t.y=q-A,u.x=w+s,u.y=q+ +s):(t.x=w-A,t.y=q+A,u.x=w+s,u.y=q-s):r>q?(t.x=w+A,t.y=q-A,u.x=w-s,u.y=q+s):(t.x=w+A,t.y=q+A,u.x=w-s,u.y=q-s));Hc(y,w)&&Hc(q,r)&&(q>p?(x>w?(t.x=w-A,t.y=q-A,u.x=w+s):(t.x=w+A,t.y=q-A,u.x=w-s),u.y=q+s):(x>w?(t.x=w-A,t.y=q+A,u.x=w+s):(t.x=w+A,t.y=q+A,u.x=w-s),u.y=q-s));if(Hc(y,w)&&Hc(w,x)||Hc(p,q)&&Hc(q,r))y=.5*(y+x),p=.5*(p+r),t.x=y,t.y=p,u.x=y,u.y=p;1===k?(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y)):2===k&&Hc(d.x,this.l(0).x)&&Hc(d.y,this.l(0).y)&&(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y));O(l,e.x-b,e.y-c,h.x-b,h.y- +c,m.x-b,m.y-c);f.set(h);e.set(a);d=m}}k=d.x;d=d.y;f=this.l(this.oa-1);k=.5*(k+f.x);d=.5*(d+f.y);O(l,a.x-b,a.y-c,k-b,d-c,f.x-b,f.y-c)}else for(k=3;k=a&&(k=a-1),f=this.l(k-1),e=this.l(k),k===a-1&&0!==Wp(this)&&(e=e.copy(),$p(this,e,!1,ad)),O(l,d.x-b,d.y-c,f.x-b,f.y-c,e.x-b,e.y-c);else{f=v.L();f.assign(this.l(0));for(k=1;k=a-1){f!==t&&(0!==Wp(this)&&(t=t.copy(),$p(this,t,!1,ad)),cq(this,l,-b,-c,f,t,d));break}k=aq(this,t,k+1,kn.x?t.x-s:t.x+s,A=u.y>t.y?t.y+w:t.y-w,cq(this,e,h,m,n,new z(q,x),p),af(e,t.x+h,t.y+m,r+h,A+m),y.m(r,A))):K(n.x,t.x)&&K(t.y,u.y)?(s=this.computeCorner(),w=Math.min(s,Math.abs(t.y-n.y)/2),w=s=Math.min(w,Math.abs(u.x-t.x)/2),K(s,0)?(cq(this,e,h,m,n,t,p),y.assign(t)):(q=t.x,A=x=t.y, +x=t.y>n.y?t.y-w:t.y+w,r=u.x>t.x?t.x+s:t.x-s,cq(this,e,h,m,n,new z(q,x),p),af(e,t.x+h,t.y+m,r+h,A+m),y.m(r,A))):(cq(this,e,h,m,n,t,p),y.assign(t))}v.v(f)}b=l.o;v.q(l)}return b};function bq(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Hc(a,0)?b:Hc(b,0)?a:Math.sqrt(a*a+b*b)} +function $p(a,b,c,d){var e=a.oa;if(!(2>e))if(c){var f=a.l(1);c=f.x-d.x;d=f.y-d.y;f=bq(b.x,b.y,c,d);0!==f&&(e=2===e?.5*f:f,a=Vp(a),a>e&&(a=e),c=a*(c-b.x)/f,a=a*(d-b.y)/f,b.x+=c,b.y+=a)}else f=a.l(e-2),c=f.x-d.x,d=f.y-d.y,f=bq(b.x,b.y,c,d),0!==f&&(e=2===e?.5*f:f,a=Wp(a),a>e&&(a=e),c=a*(b.x-c)/f,a=a*(b.y-d)/f,b.x-=c,b.y-=a)} +function aq(a,b,c,d){for(var e=a.oa,f=b;Hc(b.x,f.x)&&Hc(b.y,f.y);){if(c>=e)return e-1;f=a.l(c++)}if(!Hc(b.x,f.x)&&!Hc(b.y,f.y))return c-1;for(var h=f;Hc(b.x,f.x)&&Hc(f.x,h.x)&&(!d||(b.y>=f.y?f.y>=h.y:f.y<=h.y))||Hc(b.y,f.y)&&Hc(f.y,h.y)&&(!d||(b.x>=f.x?f.x>=h.x:f.x<=h.x));){if(c>=e)return e-1;h=a.l(c++)}return c-2} +function cq(a,b,c,d,e,f,h){if(!h&&Mp(a)){h=[];var k=0;a.isVisible()&&(k=dq(a,e,f,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,f.x);else break;q=f.y-10+d;n=p+c;p=f.y+d;a.Ke===Ci?N(b,n,p,!1,!1):O(b,l,q,n,q,n,p)}else if(K(e.x,f.x))if(e.yp-10)m--,p=Math.max(q-5,f.y);else break;q=f.x-10+c;n=f.x+c;p+=d;a.Ke===Ci?N(b,n,p,!1,!1):O(b,q,l,q,p,n,p)}}b.lineTo(f.x+c,f.y+d)} +function dq(a,b,c,d){var e=a.g;if(null===e||b.K(c))return 0;for(e=e.Ow;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.wb.n,h=f.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yt&&Math.min(h,y)q&&!K(h,y)){n.x=t;n.y=q;n=!0;break a}}else if(!K(q,s)&&K(h,y)&&Math.min(q,s)h&&Math.min(t,u)p&&!K(t,u)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}v.v(k)}v.u(W,{ht:"firstPickIndex"},function(){return 2>=this.oa?0:this.jc||Pp(this)!==rb?1:0});v.u(W,{Nw:"lastPickIndex"},function(){var a=this.oa;return 0===a?0:2>=a?a-1:this.jc||Qp(this)!==rb?a-2:a-1});function Mp(a){a=a.Ke;return a===Bi||a===Ci}function Op(a,b){if(b||Mp(a)){var c=a.g;null===c||c.xk.contains(a)||null===a.Hv||c.xk.add(a,a.Hv)}} +function Ei(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Gc){var d=c.g;if(null!==d)for(var e=!1,d=d.Ow;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,h=!1,f=f.wb.n,k=f.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.jg=Math.floor((a.x-this.ge)/this.ge)*this.ge;this.kg=Math.floor((b-this.he)/this.he)*this.he;this.mr=Math.ceil((c+2*this.ge)/this.ge)*this.ge;this.nr=Math.ceil((d+2*this.he)/this.he)*this.he;a=1+(Math.ceil((this.mr-this.jg)/this.ge)|0);b=1+(Math.ceil((this.nr-this.kg)/this.he)|0);if(null===this.oc||this.Eothis.mr||a+cthis.nr||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Eo)|0;for(c=Math.min(b+e-1,this.Fo)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.oc[a][e])return!1;return!0}; +function hq(a,b,c,d,e,f,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.oc[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;f<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.oc[m][n]);)a.oc[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)hq(a,b,c,1,!e,f,h,k,l),hq(a,b,c,-1,!e,f,h,k,l);else if(0m;b+=d)hq(a,b,c,1,!e,f,h,k,l),hq(a,b,c,-1,!e,f,h, +k,l)}}function iq(a,b,c,d,e,f,h,k,l,m,n){for(var p=b|0,q=c|0,r=a.oc[p][q];0===r&&p>k&&pm&&q=Math.abs(p-d)&&1>=Math.abs(q-e))return a.abort=!0,0;p=b|0;q=c|0;r=a.oc[p][q];b=1;for(a.oc[p][q]=b;0===r&&p>k&&pm&&q=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;b=f.y;d=f.x+f.width;var p=f.y+f.height,n=n-a.jg,n=n/a.ge;b-=a.kg;b/=a.he;d-=a.jg;d/=a.ge;p-=a.kg;p/=a.he;f=Math.max(0,Math.min(a.Eo,n|0));d=Math.min(a.Eo,Math.max(0,d|0));b=Math.max(0,Math.min(a.Fo,b|0));var p=Math.min(a.Fo,Math.max(0,p|0)),h=h|0,k=k|0,l=l|0, +m=m|0,n=h,q=k,r=0===c||90===c?1:-1;(c=90===c||270===c)?q=iq(a,h,k,l,m,r,c,f,d,b,p):n=iq(a,h,k,l,m,r,c,f,d,b,p);if(!a.abort){a:{c=0===e||90===e?1:-1;e=90===e||270===e;for(var r=l|0,s=m|0,t=a.oc[r][s];0===t&&r>f&&rb&&s=Math.abs(r-h)&&1>=Math.abs(s-k)){a.abort=!0;break a}r=l|0;s=m|0;t=a.oc[r][s];for(a.oc[r][s]=999999;0===t&&r>f&&rb&&s=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case v.Nc|v.dd:return c>a&&c<=180+a?180:270;case v.dd|v.Xc:return c>180-a&&c<=360-a?270:0;case v.Xc|v.Wc:return c>a&&c<=180+a?90:0;case v.Wc|v.Nc:return c>180-a&&c<=360-a?180:90;case v.Nc|v.dd|v.Xc:return 90180+a&&c<=360- +a?270:0;case v.dd|v.Xc|v.Wc:return 180a&&180>=c?90:0;case v.Xc|v.Wc|v.Nc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case v.Wc|v.Nc|v.dd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(v.Nc|v.dd|v.Xc|v.Wc)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Tp.prototype.dp=function(){this.Wf.length=0}; +function Up(a,b){var c=a.Wf;if(0===c.length){a:if(!a.rp){c=a.rp;a.rp=!0;var d,e=null,f=a.Jc,f=f instanceof V?f:null;if(null===f||f.de)d=a.Jc.KD(a.port.Rd);else{if(!f.U.G()){a.rp=c;break a}e=f;d=e.JD()}var h=a.Wf.length=0,k=a.port.Ya(sb,v.L()),l=a.port.Ya(Eb,v.L()),f=v.gk(k.x,k.y,0,0);f.ej(l);v.v(k);v.v(l);k=v.Mb(f.x+f.width/2,f.y+f.height/2);for(d=d.i;d.next();)if(l=d.value,l.isVisible()){var m=rb,n=l.kd===a.port||l.T.Xh(e),m=n?Pp(l,a.port):Qp(l,a.port);if(m.Vi()&&(n=n?l.Sd:l.kd,null!==n)){var p= +n.Y;if(null!==p){var n=l.computeOtherPoint(p,n),p=k.xc(n),m=jq(f,m,p,l.jc),q=0;0===m?(q=v.Xc,180 +Math.abs(C)?(x=Math.abs(C)/q,q=Math.abs(C)):x=1;break;case v.Nc:r>Math.abs(H)?(x=Math.abs(H)/r,r=Math.abs(H)):x=1;break;case v.dd:n>Math.abs(C)?(x=Math.abs(C)/n,n=Math.abs(C)):x=1;break;default:case v.Xc:p>Math.abs(H)?(x=Math.abs(H)/p,p=Math.abs(H)):x=1}w=0}var T=t.jp;if(e===qp){u=t.link.computeThickness();u*=x;T.set(A);switch(y){case v.Wc:T.x=A.x+C/2+q/2-w-u/2;break;case v.Nc:T.y=A.y+H/2+r/2-w-u/2;break;case v.dd:T.x=A.x+C/2-n/2+w+u/2;break;default:case v.Xc:T.y=A.y+H/2-p/2+w+u/2}w+=u}else u=.5, +e===np&&(u=(t.bp+1)/(t.Im+1)),T.x=A.x+C*u,T.y=A.y+H*u}v.v(k);v.v(d);v.v(l);v.v(m);A=a.Wf;for(C=0;Cb.fe?1:a.angleb.angle?1:0}; +Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Jc,this.port,rb,b.kd===this.port),d=a.bp;if(0>d)return c;var e=a.Im;if(1>=e||!b.jc)return c;var b=a.Uw,f=a.jp;if(a.fe===v.Nc||a.fe===v.Wc)d=e-1-d;return((a=a.fe===v.Nc||a.fe===v.Xc)?b.ye&&(e=k.right);k.bottom>f&&(f=k.bottom)}}isFinite(c)&&isFinite(d)?a.m(c,d,e-c,f-d):(b=b.location,c=this.padding,a.m(b.x+c.left,b.y+c.top,0,0));return a}; +v.defineProperty(Pi,{padding:"padding"},function(){return this.Ue},function(a){"number"===typeof a?((isNaN(a)||0>a)&&v.va(a,">= 0",Pi,"padding"),a=new cb(a)):(v.A(a,cb,Pi,"padding"),(isNaN(a.left)||0>a.left)&&v.va(a.left,">= 0",Pi,"padding:value.left"),(isNaN(a.right)||0>a.right)&&v.va(a.right,">= 0",Pi,"padding:value.right"),(isNaN(a.top)||0>a.top)&&v.va(a.top,">= 0",Pi,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&v.va(a.bottom,">= 0",Pi,"padding:value.bottom"));var b=this.Ue;b.K(a)||(this.Ue= +a=a.R(),this.h("padding",b,a))});function Xf(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.wd("Layout")}this.wf=!0};Xf.prototype.Uz=function(a){return!a.location.G()||a instanceof V&&a.Cy?!0:!1}; +function nq(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.fp||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof S?l.uf||(l instanceof V?null===l.Pb?nq(a,b,l.Ic,!1,e,f,h,k):b.add(l):b.add(l)):h&&l instanceof W?b.add(l):!k||!l.Od()||l instanceof S||b.add(l))}} +Xf.prototype.collectParts=Xf.prototype.pG=function(a){var b=new J(R);a instanceof E?(nq(this,b,a.Ag,!0,null,!0,!0,!0),nq(this,b,a.links,!0,null,!0,!0,!0),nq(this,b,a.dk,!0,null,!0,!0,!0)):a instanceof V?nq(this,b,a.Ic,!1,null,!0,!0,!0):nq(this,b,a.i,!1,null,!0,!0,!0);return b};v.defineProperty(Xf,{Xd:"arrangementOrigin"},function(){return this.Vp},function(a){v.A(a,z,Xf,"arrangementOrigin");this.Vp.K(a)||(this.Vp.assign(a),this.H())}); +Xf.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.Ya(sb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function Yf(){v.dc(this);this.Ud=null;this.clear()}v.ea("LayoutNetwork",Yf); +Yf.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new J(oq);this.edges=new J(pq);this.Yz=new na(S,oq);this.Kz=new na(W,pq)}; +Yf.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Pb?"("+this.Pb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; +oq.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.qd,d=b.qd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=f&&0>=h&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Qb("Layout");d=[];switch(this.alignment){case vn:var k=a,l=c,m=Math.max(this.Lo.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0h)d.push(new B(0,y,h+k,x)),w=0,u=t,y+=x,x=0;x=Math.max(x,H);H=0;switch(s){case on:H=-q.width;break;default:H=0}p.moveTo(u+H,y);switch(s){case on:u-=A;break; +default:u+=A}w++}d.push(new B(0,y,h+k,x));break;case un:k=f;l=a;m=c;n=Math.max(this.Lo.width,1);p=y=A=0;q=v.L();for(f=0;f=A&&(h-=A);for(var A=H=0,C=Math.max(this.Lo.height,1),ba=p=0,U=!0,M=v.L(),f=0;fk-1||0h){d.push(new B(0,U?w-p:w,h+l,ba+p+m));for(T=0;TA&&(e.width+=e.x-A,e.x=A)}for(k=f=h=e=0;kd?1:0}; +mm.smartComparer=function(a,b){if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.na=0,a.ua=0);else{var b=new I(yq);b.Tc(a.i);a=new I(yq);var c=new I(yq),d;d=this.sort(b);var e=this.$x,f=this.DB,h=this.Fd,k=this.In,l=this.ay,m=this.Aq,b=this.yk,n=this.TC,p=this.sg,q=this.Du,e=this.Mf,f=this.Rw,h=this.eI;if(!isFinite(h)|| +0>=h)h=NaN;k=this.jG;if(!isFinite(k)||0>=k)k=1;l=this.xe;isFinite(l)||(l=0);m=this.Af;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Jn&&f===Kn?e=In:e===Jn&&f!==Kn&&(f=Kn,e=this.Mf);if((this.direction===Cn||this.direction===Dn)&&this.sorting!==Bn){for(var r=0;!(r>=d.length);r+=2){a.add(d.da(r));if(r+1>=d.length)break;c.add(d.da(r+1))}this.direction===Cn?(this.Mf===Jn&&a.reverse(),d=new I(yq),d.Tc(a),d.Tc(c)):(this.Mf===Jn&&c.reverse(),d=new I(yq),d.Tc(c),d.Tc(a))}for(var s= +d.length,t=n=0,r=0;rm&&(0===r||r===d.length-1)&&(u/=2);n+=u;t++}if(isNaN(h)||e===Jn){isNaN(b)&&(b=6);if(e!==In&&e!==Jn){u=-Infinity;for(r=0;rh?(h=r,p=h*k):q=t/(360<=m?s:s-1)}this.$x=e;this.DB=f;this.Fd=h;this.In=k;this.ay=l;this.Aq=m;this.yk=b;this.TC=n;this.sg=p;this.Du=q;b=d;d=this.$x;e=this.Fd;f=this.ay;k=this.Aq;l=this.yk;m=this.sg;n=this.Du;if(this.direction!==Cn&&this.direction!==Dn||d!==Jn)if(this.direction===Cn||this.direction===Dn){h=0;switch(d){case Hn:h=180*Cq(this,e,m,f,n)/Math.PI;break;case In:n=b=0;h=a.first();null!==h&&(b=zq(h,Math.PI/2));h=c.first();null!==h&&(n=zq(h,Math.PI/2));h=180*Cq(this,e,m,f,l+(b+ +n)/2)/Math.PI;break;case Gn:h=k/b.length}if(this.direction===Cn){switch(d){case Hn:Dq(this,a,f,Fn);break;case In:Eq(this,a,f,Fn);break;case Gn:Fq(this,a,k/2,f,Fn)}switch(d){case Hn:Dq(this,c,f+h,En);break;case In:Eq(this,c,f+h,En);break;case Gn:Fq(this,c,k/2,f+h,En)}}else{switch(d){case Hn:Dq(this,c,f,Fn);break;case In:Eq(this,c,f,Fn);break;case Gn:Fq(this,c,k/2,f,Fn)}switch(d){case Hn:Dq(this,a,f+h,En);break;case In:Eq(this,a,f+h,En);break;case Gn:Fq(this,a,k/2,f+h,En)}}}else switch(d){case Hn:Dq(this, +b,f,this.direction);break;case In:Eq(this,b,f,this.direction);break;case Gn:Fq(this,b,k,f,this.direction);break;case Jn:Gq(this,b,k,f,this.direction)}else Gq(this,b,k,f-k/2,En)}this.updateParts();this.network=null;this.wf=!0}; +function Fq(a,b,c,d,e){var f=a.Aq,h=a.Fd;a=a.sg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(f=d+(e===En?f:-f);0>f;)f+=360;f%=360;180=n.length-1)break;Jq(a,l,m,n,p,e,f)||Kq(a,l,m,n,p,e,f);l=f.x;m=f.y}v.v(f);a.hm++;if(!(23Math.abs(r)?Math.abs(l-f)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(f)>Math.abs(p)?0p:0a.hm?a.Fd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;Jq(a,l,m,p,q,e,n)||Kq(a,l,m,p,q,e,n);l=n.x;m=n.y}v.v(n);a.hm++;if(!(23a.hm?a.Fd-f/(2*Math.PI):a.Fd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} +function Kq(a,b,c,d,e,f,h){var k=a.Fd,l=a.sg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.yk;d=!1;if(0<=b!==(f===En)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}wn.prototype.commitLayout=function(){this.commitNodes();this.xt&&this.commitLinks()}; +wn.prototype.commitNodes=function(){for(var a=this.ZF,b=this.network.vertexes.i;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};wn.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; +function Bq(a,b,c,d,e){var f=a.OF;if(.001>Math.abs(a.In-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),l=0,m=0;m<=f;m++)l=void 0!==d&&void 0!==e?d+m*e/f:m*Math.PI/(2*f),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function Aq(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Bq(a,1,c,d,e):Bq(a,1,c);return b/f} +function Cq(a,b,c,d,e){if(.001>Math.abs(a.In-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-f*f*l*l)*a;if(h>=e)return k*a}} +wn.prototype.sort=function(a){switch(this.sorting){case zn:break;case An:a.reverse();break;case xn:a.sort(this.comparer);break;case yn:a.sort(this.comparer);a.reverse();break;case Bn:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.da(f));b[f]=-1;f=a.da(f);e=0;for(h=f.lc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& +b[e]++;for(f=f.hc;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(b=0;ba[b].indexOf(l)&&a[b].push(l);for(c=h.lc;c.next();)l=d.indexOf(c.value.fromVertex),l!==b&&0>a[b].indexOf(l)&&a[b].push(l)}h=[];for(b=0;ba[c[p]].indexOf(c[p===c.length-1?0:p+1])&&t.push(p===c.length-1?0:p+1);if(0===t.length)for(p=0;pH.indexOf(U)||MH.indexOf(U)|| +M=u?l+1:l)),w+=l=u&&l++,A>=u&&A++,l>A&&(H=A,A=l,l=H),A-l<(c.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qm-s?1:-1);c.splice(0>p?l:l+1,0,b);e.splice(h,1);h--}else k=!1;if(k)break;else c.push(e[0]),e.splice(0,1)}for(b=0;b=a?a:360,this.H())}); +v.defineProperty(wn,{Mf:"arrangement"},function(){return this.ed},function(a){this.ed!==a&&(v.pb(a,wn,wn,"arrangement"),a===Jn||a===In||a===Hn||a===Gn)&&(this.ed=a,this.H())});v.defineProperty(wn,{direction:"direction"},function(){return this.aa},function(a){this.aa!==a&&(v.pb(a,wn,wn,"direction"),a===En||a===Fn||a===Cn||a===Dn)&&(this.aa=a,this.H())}); +v.defineProperty(wn,{sorting:"sorting"},function(){return this.Lh},function(a){this.Lh!==a&&(v.pb(a,wn,wn,"sorting"),a===zn||a===An||a===xn||yn||a===Bn)&&(this.Lh=a,this.H())});v.defineProperty(wn,{comparer:"comparer"},function(){return this.uh},function(a){this.uh!==a&&(v.j(a,"function",wn,"comparer"),this.uh=a,this.H())});v.defineProperty(wn,{spacing:"spacing"},function(){return this.Mh},function(a){this.Mh!==a&&(v.j(a,"number",wn,"spacing"),this.Mh=a,this.H())}); +v.defineProperty(wn,{Rw:"nodeDiameterFormula"},function(){return this.Dr},function(a){this.Dr!==a&&(v.pb(a,wn,wn,"nodeDiameterFormula"),a===Ln||a===Kn)&&(this.Dr=a,this.H())});v.u(wn,{$F:"actualXRadius"},function(){return this.Fd});v.u(wn,{aG:"actualYRadius"},function(){return this.sg});v.u(wn,{YI:"actualSpacing"},function(){return this.yk});v.u(wn,{ZF:"actualCenter"},function(){return isNaN(this.Xd.x)||isNaN(this.Xd.y)?new z(0,0):new z(this.Xd.x+this.$F,this.Xd.y+this.aG)});var In; +wn.ConstantSpacing=In=v.p(wn,"ConstantSpacing",0);var Hn;wn.ConstantDistance=Hn=v.p(wn,"ConstantDistance",1);var Gn;wn.ConstantAngle=Gn=v.p(wn,"ConstantAngle",2);var Jn;wn.Packed=Jn=v.p(wn,"Packed",3);var En;wn.Clockwise=En=v.p(wn,"Clockwise",4);var Fn;wn.Counterclockwise=Fn=v.p(wn,"Counterclockwise",5);var Cn;wn.BidirectionalLeft=Cn=v.p(wn,"BidirectionalLeft",6);var Dn;wn.BidirectionalRight=Dn=v.p(wn,"BidirectionalRight",7);var zn;wn.Forwards=zn=v.p(wn,"Forwards",8);var An; +wn.Reverse=An=v.p(wn,"Reverse",9);var xn;wn.Ascending=xn=v.p(wn,"Ascending",10);var yn;wn.Descending=yn=v.p(wn,"Descending",11);var Bn;wn.Optimized=Bn=v.p(wn,"Optimized",12);var Ln;wn.Pythagorean=Ln=v.p(wn,"Pythagorean",13);var Kn;wn.Circular=Kn=v.p(wn,"Circular",14);function wq(){this.Xo=-Infinity;this.Lp=this.hn=null} +wq.prototype.compare=function(a,b){if(0this.Xo||Math.abs(a)a&&0f?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new z(n.x+n.width+d.width,n.y),l[1]=new z(n.x,n.y+n.height+d.height),f=2):(p=Pq(l,f,e,k,n.width,n.height,d),q=l[p],r=new z(q.x+n.width+d.width, +q.y),s=new z(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().mb,d=this.network.vertexes.i;d.next();){if(d.value.mb.xg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.rg?a.rg=new I(hr):a.rg.clear();a.rg.Tc(a.network.vertexes);var c=a.rg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.Yf-a.Yf});for(var d=c.count-1;0<=d&&1>=c.da(d).Yf;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Ld((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;f.mb=new B(l-r.x-h,k-r.y-m,p+2*h,q+2*m);f.focus=new z(r.x+h,r.y+m)}a.network=d;return c}function gr(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.nh){var e=d.nh.da(d.iA);d.Yf=e.yx;var f=e.HA,h=e.IA;d.mb=new B(d.na-f,d.ua-h,e.zx,e.xx);d.focus=new z(f,h);d.iA--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} +function ir(a,b){var c=b.Em;if(null!==c&&0!==c.count){var d=b.na,e=b.ua,f=b.width,h=b.height;null!==b.nh&&0=p.Yf?l++:(k=!0,m++,h+=Math.atan2(b.ua-p.ua,b.na-p.na))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.na=d+p*Math.cos(q);l.ua=e+p*Math.sin(q);k++}}}function Pq(a,b,c,d,e,f,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+f-k,e=e-l-h,Ld(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,Ld(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.na,e=d,f=c.ua,h=f,c=1;ch-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.na-b.na}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.ua-b.ua});for(var h=a.Bh,m=0,n=0,p=0,c=0;ch||p-d>h){if(f)break}else if(l-r>h||r-l>h){if(!f)break}else{var s=kr(k,e);1>s?(n=a.Zw,null===n&&(a.Zw=n=new va(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.M.right-k.M.x),n=(1+n)*m):dr?(p=Math.abs(e.M.bottom-k.M.y),p=(1+p)*s):ds?(n=a.Zw,null===n&&(a.Zw=n=new va(0)),m=n.random(),s= +n.random(),n=(d>p?1:-1)*(1+(e.width>k.width)?e.width:k.width)*m,p=(l>r?1:-1)*(1+(e.height>k.height)?e.height:k.height)*s):(m=f.stiffness*(s-f.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.Bh/20,50);for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.na+=f,k.ua+=h,c=Math.max(c,f*f+h*h));return c>a.HD*a.HD}Mq.prototype.moveFixedVertex=function(){}; +Mq.prototype.commitLayout=function(){this.oA();this.commitNodes();this.xt&&this.commitLinks()};Mq.prototype.oA=function(){if(this.Fp)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.xb=fc,b.yb=fc)}};Mq.prototype.commitNodes=function(){var a=0,b=0;if(this.iG){var c=v.$f();this.$g(this.network,c);b=this.Xd;a=b.x-c.x;b=b.y-c.y;v.Vb(c)}for(var c=v.$f(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.mb),c.x+=a,c.y+=b,e.mb=c;e.commit()}v.Vb(c)}; +Mq.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};Mq.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Dn:a};Mq.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Cn:a};Mq.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.zn:a};Mq.prototype.electricalFieldX=function(){return 0};Mq.prototype.electricalFieldY=function(){return 0}; +Mq.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Bn:a};Mq.prototype.gravitationalFieldX=function(){return 0};Mq.prototype.gravitationalFieldY=function(){return 0};Mq.prototype.isFixed=function(a){return a.isFixed};v.u(Mq,{yJ:"currentIteration"},function(){return this.cr});v.defineProperty(Mq,{jD:"arrangementSpacing"},function(){return this.ag},function(a){v.A(a,ia,Mq,"arrangementSpacing");this.ag.K(a)||(this.ag.assign(a),this.H())}); +v.defineProperty(Mq,{iG:"arrangesToOrigin"},function(){return this.Wp},function(a){this.Wp!==a&&(v.j(a,"boolean",Mq,"arrangesToOrigin"),this.Wp=a,this.H())});v.defineProperty(Mq,{Fp:"setsPortSpots"},function(){return this.Kh},function(a){this.Kh!==a&&(v.j(a,"boolean",Mq,"setsPortSpots"),this.Kh=a,this.H())});v.defineProperty(Mq,{comments:"comments"},function(){return this.th},function(a){this.th!==a&&(v.j(a,"boolean",Mq,"comments"),this.th=a,this.H())}); +v.defineProperty(Mq,{Oz:"maxIterations"},function(){return this.fo},function(a){this.fo!==a&&(v.j(a,"number",Mq,"maxIterations"),0<=a&&(this.fo=a,this.H()))});v.defineProperty(Mq,{HD:"epsilonDistance"},function(){return this.Cq},function(a){this.Cq!==a&&(v.j(a,"number",Mq,"epsilonDistance"),0b.toVertex.index&&(this.network.gx(b),b.rev=!0);break;case nr:for(b=this.network.vertexes.i;b.next();)a=b.value,a.Ro=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.zr=0;for(b.reset();b.next();)c=b.value,0===c.lc.count&&xr(this,c);for(b.reset();b.next();)c=b.value,-1===c.Ro&&xr(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex, +d=c.finish,e=b.toVertex,f=e.finish,e.Ros&&0s&&0b[this.Hf]&&(this.ov=b[c]-1,this.Hf=c),b[c]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.Bm===m.Bm||k++;var m=0,q,r=q=p=l=0,s,t=0,u=0;s=0;var y;if(0<=c)for(n=d[h].Qe,m=0;mt||l===t&&q>s)&&k++,ul||t===l&&s>q)&&k++);if(0>=c)for(n=d[h].Le,m=0;mt||l===t&&p>u)&&k++,sl||t===l&&u>p)&&k++);f[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Le,y=d[n].Le,m=0;m=c&&(l=k.Qe);var m=null;0<=c&&(m=k.Le);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Qe);var m=null;0<=c&&(m=k.Le);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,f[h]=n&1?p[m]:p[m-1]+p[m]>>1)}Br(a,b,d);return f}function Jr(a,b,c,d,e,f){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.hc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Jr(a,m,c,d,e,f)}if(f)for(l=b.lc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Jr(a,m,c,d,e,f)}} +function Kr(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var h=b.hc;h.next();)Kr(a,h.value.toVertex,c,d,e,f);if(f)for(b=b.lc;b.next();)Kr(a,b.value.fromVertex,c,d,e,f)}}function ur(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function vr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.hc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} +function wr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.lc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function xr(a,b){b.Ro=a.zr;a.zr++;for(var c=b.hc;c.next();){var d=c.value,e=d.toVertex;-1===e.Ro&&(d.forest=!0,xr(a,e))}b.finish=a.zr;a.zr++} +hn.prototype.assignLayers=function(){switch(this.$n){case Lr:Mr(this);break;case Nr:for(var a=0,b=this.network.vertexes.i;b.next();)a=Or(this,b.value),this.ob=Math.max(a,this.ob);for(b.reset();b.next();)a=b.value,a.layer=this.ob-a.layer;break;default:case or:Mr(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.lc.count&&Pr(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.ob=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +a;this.ob=Math.max(this.ob,c.layer)}}};function Mr(a){for(var b=a.network.vertexes.i;b.next();){var c=Qr(a,b.value);a.ob=Math.max(c,a.ob)}}function Qr(a,b){var c=0;if(-1===b.layer){for(var d=b.hc;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Qr(a,f)+e);b.layer=c}else c=b.layer;return c}function Or(a,b){var c=0;if(-1===b.layer){for(var d=b.lc;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Or(a,f)+e);b.layer=c}else c=b.layer;return c} +function Pr(a,b){if(!b.valid){b.valid=!0;for(var c=b.hc;c.next();)Pr(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.Qe.n,e=d.length,f=0;fk&&Jr(a,h.fromVertex,0,-1,!0,!1)}for(Jr(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.i;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Qe.n,e=s.length,f=0;fd)&&!p&&(k=m,d=n)}if(0>f){for(c.reset();c.next();)f=c.value,1===f.component&&(f.layer-=e);b.component=0}else k.component=0}}} +function zr(a,b,c){return 90===a.aa?c&&!b.rev||!c&&b.rev?270:90:180===a.aa?c&&!b.rev||!c&&b.rev?0:180:270===a.aa?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} +hn.prototype.initializeIndices=function(){switch(this.Qn){default:case Rr:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.Td[c];this.Td[c]++}break;case pr:a=this.network.vertexes.i;for(b=this.ob;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Sr(this,c);break;case Tr:for(a=this.network.vertexes.i,b=0;b<=this.ob;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Ur(this,c)}}; +function Sr(a,b){var c=b.layer;b.index=a.Td[c];a.Td[c]++;for(var c=b.Le.cc(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;e=h;d--)f=Wr(this,d,-1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1, +d=h;d<=c;d++)f=Wr(this,d,-1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this))}break;default:case qr:for(c=this.ob,h=0,k=a+1;(d=this.countCrossings())=h;d--)f=Wr(this,d,-1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,1)||f;e=this.countCrossings(); +e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,-1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this))}}Er(this,b)}; +function Vr(a,b,c){var d=0,e=Ar(a,b),f=a.Td[b],h=Ir(a,b,c);c=Hr(a,b,c);for(d=0;df+1&&(q+=4*(w-f),r+=4*(w-(f+1)))}A=d[f].hc.i;for(A.reset();A.next();)if(x=A.value,x.valid&&x.toVertex.layer===b){x=x.toVertex;for(w=0;d[w]!==x;)w++;w===f+1&&(r+=1)}A=d[f+1].lc.i;for(A.reset();A.next();)if(x=A.value,x.valid&&x.fromVertex.layer===b){x=x.fromVertex;for(w=0;d[w]!==x;)w++;wf+1&&(q+=4*(w-(f+1)),r+=4*(w-f))}A=d[f+1].hc.i;for(A.reset();A.next();)if(x=A.value, +x.valid&&x.toVertex.layer===b){x=x.toVertex;for(w=0;d[w]!==x;)w++;w===f&&(q+=1)}var w=x=0,A=h[d[f].index],H=k[d[f].index],C=h[d[f+1].index],T=k[d[f+1].index];-1!==A&&(x+=Math.abs(A-s),w+=Math.abs(A-y));-1!==H&&(x+=Math.abs(H-s),w+=Math.abs(H-y));-1!==C&&(x+=Math.abs(C-t),w+=Math.abs(C-u));-1!==T&&(x+=Math.abs(T-t),w+=Math.abs(T-u));if(r>1)+8*d;this.Fb*=8}if(0!==(this.Di&$r))for(b=!0;b;){b=!1;for(a=this.Hf+1;a<=this.ob;a++)b=as(this,a,1)||b; +for(a=this.Hf-1;0<=a;a--)b=as(this,a,-1)||b;b=as(this,this.Hf,0)||b}if(0!==(this.Di&bs)){for(a=this.Hf+1;a<=this.ob;a++)cs(this,a,1);for(a=this.Hf-1;0<=a;a--)cs(this,a,-1);cs(this,this.Hf,0)}c&&(ds(this,-1),ds(this,1));if(0!==(this.Di&$r))for(b=!0;b;){b=!1;b=as(this,this.Hf,0)||b;for(a=this.Hf+1;a<=this.ob;a++)b=as(this,a,0)||b;for(a=this.Hf-1;0<=a;a--)b=as(this,a,0)||b}};function as(a,b,c){for(var d=!1;es(a,b,c);)d=!0;return d} +function es(a,b,c){var d=0,e=Ar(a,b),f=a.Td[b],h=Hr(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=f||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q=0,t=0,u=0,y=0,w=0;if(0>=c)for(var x=e[d].lc.i;x.next();){var A=x.value;A.valid&&A.fromVertex.layer!== +b&&(u=Cr(A),y=A.portFromColOffset,w=A.portToColOffset,A=A.fromVertex.column,q+=(Math.abs(n+w-(A+y))+1)*u,s+=(Math.abs(r+w-(A+y))+1)*u,t+=(Math.abs(p+w-(A+y))+1)*u)}if(0<=c)for(x=e[d].hc.i;x.next();)A=x.value,A.valid&&A.toVertex.layer!==b&&(u=Cr(A),y=A.portFromColOffset,w=A.portToColOffset,A=A.toVertex.column,q+=(Math.abs(n+y-(A+w))+1)*u,s+=(Math.abs(r+y-(A+w))+1)*u,t+=(Math.abs(p+y-(A+w))+1)*u);w=y=u=0;x=h[e[d].index];A=k[e[d].index];-1!==x&&(u+=Math.abs(x-n),y+=Math.abs(x-r),w+=Math.abs(x-p));-1!== +A&&(u+=Math.abs(A-n),y+=Math.abs(A-r),w+=Math.abs(A-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}Br(a,b,e);a.normalize()} +function fs(a,b){for(var c=!0,d=a.network.vertexes.i;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} +function gs(a,b){for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.ob;d++)e[d]=!1,f[d]=!1;for(var h=a.network.vertexes.i;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(f[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.ob;d++)k=k&&!(e[d]&&f[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} +function ds(a,b){for(var c=0;c<=a.Fb;c++)for(;fs(a,c););a.normalize();for(c=0;ce?Er(a,d):hb)for(c=a.Fb;0<=c;c--)for(d=Dr(a),e=Gr(a),f=e+1;ee?Er(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.lg);a.lg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Kr(a,b,a.lg,-1,!0,!0),a.lg++);var f=0;b=[];for(f=0;fc)for(k=a.Fb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +hn.prototype.commitLayout=function(){if(this.Fp)for(var a=yr(this,!0),b=yr(this,!1),c=this.network.edges.i;c.next();){var d=c.value.link;null!==d&&(d.xb=a,d.yb=b)}this.commitNodes();this.dz();this.xt&&this.commitLinks()};function yr(a,b){return 270===a.aa?b?sc:vc:90===a.aa?b?vc:sc:180===a.aa?b?tc:uc:b?uc:tc} +hn.prototype.commitNodes=function(){this.hg=[];this.Ff=[];this.Ef=[];this.Lb=[];for(var a=0;a<=this.ob;a++)this.hg[a]=0,this.Ff[a]=0,this.Ef[a]=0,this.Lb[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.hg[c]=Math.max(this.hg[c],this.nodeMinLayerSpace(b,!0));this.Ff[c]=Math.max(this.Ff[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.$l,c=0;c<=this.ob;c++){var e=d;0>=this.hg[c]+this.Ff[c]&&(e=0);0=Ga.M.bottom?(ua=Ga.M.y+Ga.M.height,b.w(M++,ka,ua+Ra),b.w(M++,ka,ua),b.w(M++, +ka,ua-Ua)):(b.w(M++,ka,la+Ra),b.w(M++,ka,la),b.w(M++,ka,la-Ua)):270===this.aa?la<=Ga.M.y?(ua=Ga.M.y,b.w(M++,ka,ua-Ua),b.w(M++,ka,ua),b.w(M++,ka,ua+Ra)):(b.w(M++,ka,la-Ua),b.w(M++,ka,la),b.w(M++,ka,la+Ra)):0===this.aa&&(ka>=Ga.M.right?(ua=Ga.M.x+Ga.M.width,b.w(M++,ua+Ra,la),b.w(M++,ua,la),b.w(M++,ua-Ua,la)):(b.w(M++,ka+Ra,la),b.w(M++,ka,la),b.w(M++,ka-Ua,la)));else{b.w(M++,pb,eb);var vd=0;if(180===this.aa||0===this.aa){if(180===this.aa?ka>=Ga.M.right:ka<=Ga.M.x)vd=(0===this.aa?-Ua:Ra)/2;b.w(M++,pb+ +vd,la)}else{if(270===this.aa?la>=Ga.M.bottom:la<=Ga.M.y)vd=(90===this.aa?-Ua:Ra)/2;b.w(M++,ka,eb+vd)}b.w(M++,ka,la)}else Ua=Math.max(10,this.hg[pa.layer]),Ra=Math.max(10,this.Ff[pa.layer]),180===this.aa?(T&&b.w(M++,ka-Ua,la),b.w(M++,ka,la),T&&b.w(M++,ka+Ra,la)):90===this.aa?(T&&b.w(M++,ka,la+Ra),b.w(M++,ka,la),T&&b.w(M++,ka,la-Ua)):270===this.aa?(T&&b.w(M++,ka,la-Ua),b.w(M++,ka,la),T&&b.w(M++,ka,la+Ra)):(T&&b.w(M++,ka+Ra,la),b.w(M++,ka,la),T&&b.w(M++,ka-Ua,la));Ga=pa}if(null===k||b.computeSpot(!1)!== +rb||ba)if(pb=b.l(M-1).x,eb=b.l(M-1).y,ka=b.l(M).x,la=b.l(M).y,ba){var Le=this.Ff[oa.layer],Wb=0;180===this.aa||0===this.aa?(Wb=eb,Wb>=oa.M.y&&Wb<=oa.M.bottom&&(180===this.aa?ka>=oa.M.x:ka<=oa.M.right)&&(ua=oa.na+(180===this.aa?-Le:Le),Wb=Wb=oa.M.x&&Wb<=oa.M.right&&(270===this.aa?la>=oa.M.y:la<=oa.M.bottom)&&(ua=oa.ua+(270===this.aa?-Le:Le),Wb=Wb=oa.M.x?(ua=oa.M.x+oa.M.width,b.V(M-2,ua,eb),b.V(M-1,ua+Ra,eb)):90===this.aa&&la<=oa.M.bottom?(ua=oa.M.y,b.V(M-2,pb,ua),b.V(M-1,pb,ua-Ua)):270===this.aa&&la>=oa.M.y?(ua=oa.M.y+oa.M.height,b.V(M-2,pb,ua),b.V(M-1,pb,ua+Ra)):0===this.aa&&ka<=oa.M.right&&(ua=oa.M.x,b.V(M-2,ua,eb),b.V(M-1,ua-Ua,eb));else{Ua=Math.max(10,this.hg[oa.layer]); +Ra=Math.max(10,this.Ff[oa.layer]);vd=0;if(180===this.aa||0===this.aa){if(180===this.aa?ka<=oa.M.x:ka>=oa.M.right)vd=(0===this.aa?Ra:-Ua)/2;b.w(M++,ka+vd,eb)}else{if(270===this.aa?la<=oa.M.y:la>=oa.M.bottom)vd=(90===this.aa?Ra:-Ua)/2;b.w(M++,pb,la+vd)}b.w(M++,ka,la)}}else{for(;null!==oa&&oa!==Ga;){Ca=pa=null;for(var Eg=oa.hc.i;Eg.next();){var wd=Eg.value;if(wd.link===c.link&&(pa=wd.toVertex,Ca=wd.fromVertex,null!==Ca.qd&&(Ca=null),null===pa.qd))break}var pb=0,eb=0,ka=0,la=0,qb=0,Ua=0,Ra=0;if(pa!== +Ga)if(pb=b.l(M-1).x,eb=b.l(M-1).y,ka=pa.na,la=pa.ua,ba)if(180===this.aa||0===this.aa){var we=null!==Ca?Ca.ua:eb;we!==la&&(qb=this.Lb[pa.layer],2===M&&(qb=0===this.aa?Math.max(qb,pb):Math.min(qb,pb)),b.w(M++,qb,eb),b.w(M++,qb,la))}else{var xd=null!==Ca?Ca.na:pb;xd!==ka&&(qb=this.Lb[pa.layer],2===M&&(qb=90===this.aa?Math.max(qb,eb):Math.min(qb,eb)),b.w(M++,pb,qb),b.w(M++,ka,qb))}else Ua=Math.max(10,this.hg[pa.layer]),Ra=Math.max(10,this.Ff[pa.layer]),180===this.aa?(b.w(M++,ka+Ra,la),T&&b.w(M++,ka,la), +b.w(M++,ka-Ua,la)):90===this.aa?(b.w(M++,ka,la-Ua),T&&b.w(M++,ka,la),b.w(M++,ka,la+Ra)):270===this.aa?(b.w(M++,ka,la+Ra),T&&b.w(M++,ka,la),b.w(M++,ka,la-Ua)):(b.w(M++,ka-Ua,la),T&&b.w(M++,ka,la),b.w(M++,ka+Ra,la));oa=pa}ba&&(pb=b.l(M-1).x,eb=b.l(M-1).y,ka=b.l(M).x,la=b.l(M).y,180===this.aa||0===this.aa?eb!==la&&(qb=0===this.aa?Math.min(Math.max((ka+pb)/2,this.Lb[Ga.layer]),ka):Math.max(Math.min((ka+pb)/2,this.Lb[Ga.layer]),ka),b.w(M++,qb,eb),b.w(M++,qb,la)):pb!==ka&&(qb=90===this.aa?Math.min(Math.max((la+ +eb)/2,this.Lb[Ga.layer]),la):Math.max(Math.min((la+eb)/2,this.Lb[Ga.layer]),la),b.w(M++,pb,qb),b.w(M++,ka,qb)))}if(null!==d&&T){if(null!==h){if(b.computeSpot(!0)===rb){var ie=b.l(0),Nd=b.l(2);ie.K(Nd)||b.V(1,(ie.x+Nd.x)/2,(ie.y+Nd.y)/2)}C=b.getLinkPoint(e,h,rb,!0,!1,f,k);C.G()||C.set(e.U.cl);b.V(0,C.x,C.y)}null!==k&&(b.computeSpot(!1)===rb&&(ie=b.l(b.oa-1),Nd=b.l(b.oa-3),ie.K(Nd)||b.V(b.oa-2,(ie.x+Nd.x)/2,(ie.y+Nd.y)/2)),C=b.getLinkPoint(f,k,rb,!1,!1,e,h),C.G()||C.set(f.U.cl),b.V(b.oa-1,C.x,C.y))}b.Oi(); +c.commit()}}}for(var je=new I(W),Fg=this.network.edges.i;Fg.next();){var dd=Fg.value.link;null!==dd&&dd.jc&&!je.contains(dd)&&je.add(dd)}if(0Xb.y&&(hc=Hg.y>Xb.y?0:Od.xjc.x&&(ye=kh.x>jc.x?0:Qb.yb.layer?1:a.Heb.He?1:a.Ydb.Yd?1:0:0};hn.prototype.SE=function(a,b){return a instanceof is&&b instanceof is&&a!==b?a.firstb.first||a.$hb.$h||a.Heb.He?1:a.Ydb.Yd?1:0:0}; +hn.prototype.ix=function(a,b){return a instanceof is&&b instanceof is&&a!==b?a.Qdb.Qd||a.$hb.$h||a.Heb.He?1:a.Ydb.Yd?1:0:0};function js(a,b){var c=a-b;return-1c}function Ar(a,b){var c,d=a.Td[b];if(d>=a.Sg.length){c=[];for(var e=0;ea&&(this.Di=a,this.H()))});v.defineProperty(hn,{Fp:"setsPortSpots"},function(){return this.Kh},function(a){this.Kh!==a&&(v.j(a,"boolean",hn,"setsPortSpots"),this.Kh=a,this.H())});v.defineProperty(hn,{rE:"linkSpacing"},function(){return this.hr},function(a){this.hr!==a&&(v.j(a,"number",hn,"linkSpacing"),0<=a&&(this.hr=a,this.H()))});v.u(hn,{KH:"maxLayer"},function(){return this.ob}); +v.u(hn,{eK:"maxIndex"},function(){return this.ov});v.u(hn,{dK:"maxColumn"},function(){return this.Fb});v.u(hn,{jK:"minIndexLayer"},function(){return this.rr});v.u(hn,{fK:"maxIndexLayer"},function(){return this.Hf});var nr;hn.CycleDepthFirst=nr=v.p(hn,"CycleDepthFirst",0);var tr;hn.CycleGreedy=tr=v.p(hn,"CycleGreedy",1);var or;hn.LayerOptimalLinkLength=or=v.p(hn,"LayerOptimalLinkLength",0);var Lr;hn.LayerLongestPathSink=Lr=v.p(hn,"LayerLongestPathSink",1);var Nr; +hn.LayerLongestPathSource=Nr=v.p(hn,"LayerLongestPathSource",2);var pr;hn.InitDepthFirstOut=pr=v.p(hn,"InitDepthFirstOut",0);var Tr;hn.InitDepthFirstIn=Tr=v.p(hn,"InitDepthFirstIn",1);var Rr;hn.InitNaive=Rr=v.p(hn,"InitNaive",2);var Xr;hn.AggressiveNone=Xr=v.p(hn,"AggressiveNone",0);var qr;hn.AggressiveLess=qr=v.p(hn,"AggressiveLess",1);var Yr;hn.AggressiveMore=Yr=v.p(hn,"AggressiveMore",2);hn.PackNone=0;var Zr;hn.PackExpand=Zr=1;var $r;hn.PackStraighten=$r=2;var bs;hn.PackMedian=bs=4;var rr; +hn.PackAll=rr=7;function is(){this.index=this.Yd=this.He=this.Qd=this.first=this.layer=0;this.link=null;this.$h=0}v.Kd(is,{layer:!0,first:!0,Qd:!0,He:!0,Yd:!0,index:!0,link:!0,$h:!0});function sr(){Yf.call(this)}v.Ja(sr,Yf);v.ea("LayeredDigraphNetwork",sr);sr.prototype.createVertex=function(){return new ks};sr.prototype.createEdge=function(){return new ls}; +function ks(){oq.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Ro=NaN;this.Bm=0;this.Vz=this.Wz=null}v.Ja(ks,oq);v.ea("LayeredDigraphVertex",ks);function ls(){pq.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}v.Ja(ls,pq);v.ea("LayeredDigraphEdge",ls); +function Z(){0b.level)return!1;a.removeChild(c.parent,c)}return!0}Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ef?$s(a,k,pa,x,A):at(a,k,pa,x,A);pa=U.x;x=U.width;A=U.height;break;case Os:for(m=0;ms&&(Mua&&(kt(a,-ua,0,Ga,m-1),lt(C,-ua,0),lt(T,-ua,0),ua=0)}n.ma.m(ua,aa);x=Math.max(x,ba);A=Math.max(A,H+(0===Ia?0:y)+Ca.height);M=ba}else{0s&&(aaua&&(kt(a,0,-ua,Ga,m-1),lt(C,0,-ua),lt(T,0,-ua),ua=0);n.ma.m(M,ua);A=Math.max(A,U);x=Math.max(x,H+(0===Ia?0:y)+Ca.width);aa=U}oa++}0h&&(h=0),135q&&(q=0),p===Ps&&(l+=t/2+a.O.y),k+=d+c):b?(null===a.comments?d>x&&(p=pt(p,d-x,0),k=p.x,l=p.y,x=d,h=0):x=nt(a,x,h),0>h&&(k-=h,h=0),135A&&(p=pt(p,0,e-A),k=p.x,l=p.y,A=e,q=0):A=ot(a,A,q),0>q&&(l-=q,q=0),k+=d+c);if(0f[0].x?f[2].assign(f[1]):f[1].assign(f[2])),f[3].yf[0].x?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(h+d,0),p[1].m(p[0].x,e),p[2].yf[0].y?f[2].assign(f[1]):f[1].assign(f[2])),f[3].xf[0].y?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(0,q+e),p[1].m(d,p[0].y),p[2].xc?$s(b,e,oa,H,C):at(b,e,oa,H,C);oa=C.x;H=C.width;C=C.height;break;case Os:for(k=0;kr&&(bar&&(Up&&(p=0),135x&&(x=0));b.Ma.m(p,x);b.fb.m(H,C)}} +function $s(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.fb.width;e=h.fb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Vs(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(w, +q)+b+s.height),0>h.ma.x&&(c=tt(a,h.ma.x,!1,c,k))):(h.ma.m(d+b,c+k/2-h.O.y-h.Ma.y),d=Math.max(d,Math.max(y,p)+b+s.width),m=c+k/2-h.O.y-h.Ma.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.ma.y&&(c=tt(a,h.ma.y,!0,c,k))));return new B(c,0,d,e)} +function at(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.fb.width;e=h.fb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Vs(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(w, +q))+l+s.height),0>h.ma.x&&(c=tt(a,h.ma.x,!1,c,k))):(h.ma.m(-d-s.width-l,c+k/2-h.O.y-h.Ma.y),d=Math.max(d,Math.abs(Math.min(y,p))+l+s.width),p=c+k/2-h.O.y-h.Ma.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.ma.y&&(c=tt(a,h.ma.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Ws:return a.width>b?a.width:b;case Xs:return 2*a.O.x>b?a.width:b+a.width-2*a.O.x;case Ns:case Cs:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Os:return a.width-a.O.x+a.nodeSpacing/2+b;case Ps:return Math.max(a.width,a.O.x+a.nodeSpacing/2+b);default:return b}} +function ot(a,b,c){switch(a.alignment){case Ls:case mt:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Ws:return a.height>b?a.height:b;case Xs:return 2*a.O.y>b?a.height:b+a.height-2*a.O.y;case Ns:case Cs:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Os:return a.height-a.O.y+a.nodeSpacing/2+b;case Ps:return Math.max(a.height,a.O.y+a.nodeSpacing/2+b);default:return b}} +function pt(a,b,c){switch(a){case mt:b/=2;c/=2;break;case Ls:b/=2;c/=2;break;case Ws:c=b=0;break;case Xs:break;default:v.k("Unhandled alignment value "+a.toString())}return new z(b,c)}function ct(a,b,c,d,e,f){b=pt(b,c,d);kt(a,b.x,b.y,e,f)}function kt(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].ma;f.x+=b;f.y+=c}} +function it(a,b,c,d){var e=b.parent;switch(a.Df){case ns:for(a=b.lc;a.next();)b=a.value,b.fromVertex===e&&b.Rr.m(c,d);break;case us:for(a=b.hc;a.next();)b=a.value,b.toVertex===e&&b.Rr.m(c,d);break;default:v.k("Unhandled path value "+a.Df.toString())}}function lt(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m=l=0;lu&&e.ye.y&&ub.length||null===l||2>l.length)d=null;else{n=bt(a,b.length+l.length);for(d=f=e=0;fe;)u=l[f++],n[d++].m(u.x+m,u.y);l=bt(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=bt(a,p.length+f.length);for(m=y=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=bt(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lf&&e.xe.x&&fb.length||null===l||2>l.length)d=null;else{n=bt(a, +b.length+l.length);for(d=f=e=0;fe;)u=l[f++],n[d++].m(u.x,u.y+m);l=bt(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=bt(a,p.length+f.length);for(m=y=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=bt(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} +function Ys(a){var b=Vs(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.ra.nodeIndentPastParent=a,this.H()))}); +v.defineProperty(Z,{nodeSpacing:"nodeSpacing"},function(){return this.ra.nodeSpacing},function(a){this.ra.nodeSpacing!==a&&(v.j(a,"number",Z,"nodeSpacing"),this.ra.nodeSpacing=a,this.H())});v.defineProperty(Z,{layerSpacing:"layerSpacing"},function(){return this.ra.layerSpacing},function(a){this.ra.layerSpacing!==a&&(v.j(a,"number",Z,"layerSpacing"),this.ra.layerSpacing=a,this.H())}); +v.defineProperty(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.ra.layerSpacingParentOverlap},function(a){this.ra.layerSpacingParentOverlap!==a&&(v.j(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.ra.layerSpacingParentOverlap=a,this.H()))});v.defineProperty(Z,{compaction:"compaction"},function(){return this.ra.compaction},function(a){this.ra.compaction!==a&&(v.pb(a,Z,Z,"compaction"),a===Ss||a===Us)&&(this.ra.compaction=a,this.H())}); +v.defineProperty(Z,{breadthLimit:"breadthLimit"},function(){return this.ra.breadthLimit},function(a){this.ra.breadthLimit!==a&&(v.j(a,"number",Z,"breadthLimit"),0<=a&&(this.ra.breadthLimit=a,this.H()))});v.defineProperty(Z,{rowSpacing:"rowSpacing"},function(){return this.ra.rowSpacing},function(a){this.ra.rowSpacing!==a&&(v.j(a,"number",Z,"rowSpacing"),this.ra.rowSpacing=a,this.H())}); +v.defineProperty(Z,{rowIndent:"rowIndent"},function(){return this.ra.rowIndent},function(a){this.ra.rowIndent!==a&&(v.j(a,"number",Z,"rowIndent"),0<=a&&(this.ra.rowIndent=a,this.H()))});v.defineProperty(Z,{commentSpacing:"commentSpacing"},function(){return this.ra.commentSpacing},function(a){this.ra.commentSpacing!==a&&(v.j(a,"number",Z,"commentSpacing"),this.ra.commentSpacing=a,this.H())}); +v.defineProperty(Z,{commentMargin:"commentMargin"},function(){return this.ra.commentMargin},function(a){this.ra.commentMargin!==a&&(v.j(a,"number",Z,"commentMargin"),this.ra.commentMargin=a,this.H())});v.defineProperty(Z,{setsPortSpot:"setsPortSpot"},function(){return this.ra.setsPortSpot},function(a){this.ra.setsPortSpot!==a&&(v.j(a,"boolean",Z,"setsPortSpot"),this.ra.setsPortSpot=a,this.H())}); +v.defineProperty(Z,{portSpot:"portSpot"},function(){return this.ra.portSpot},function(a){v.A(a,L,Z,"portSpot");this.ra.portSpot.K(a)||(this.ra.portSpot=a,this.H())});v.defineProperty(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.ra.setsChildPortSpot},function(a){this.ra.setsChildPortSpot!==a&&(v.j(a,"boolean",Z,"setsChildPortSpot"),this.ra.setsChildPortSpot=a,this.H())}); +v.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.ra.childPortSpot},function(a){v.A(a,L,Z,"childPortSpot");this.ra.childPortSpot.K(a)||(this.ra.childPortSpot=a,this.H())});v.defineProperty(Z,{rJ:"alternateSorting"},function(){return this.ta.sorting},function(a){this.ta.sorting!==a&&(v.pb(a,Z,Z,"alternateSorting"),a===Hs||a===Is||a===Js||Ks)&&(this.ta.sorting=a,this.H())}); +v.defineProperty(Z,{fJ:"alternateComparer"},function(){return this.ta.comparer},function(a){this.ta.comparer!==a&&(v.j(a,"function",Z,"alternateComparer"),this.ta.comparer=a,this.H())});v.defineProperty(Z,{$I:"alternateAngle"},function(){return this.ta.angle},function(a){this.ta.angle!==a&&(v.j(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ta.angle=a,this.H())}); +v.defineProperty(Z,{ZI:"alternateAlignment"},function(){return this.ta.alignment},function(a){this.ta.alignment!==a&&(v.pb(a,Z,Z,"alternateAlignment"),this.ta.alignment=a,this.H())});v.defineProperty(Z,{jJ:"alternateNodeIndent"},function(){return this.ta.nodeIndent},function(a){this.ta.nodeIndent!==a&&(v.j(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.ta.nodeIndent=a,this.H()))}); +v.defineProperty(Z,{kJ:"alternateNodeIndentPastParent"},function(){return this.ta.nodeIndentPastParent},function(a){this.ta.nodeIndentPastParent!==a&&(v.j(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ta.nodeIndentPastParent=a,this.H()))});v.defineProperty(Z,{lJ:"alternateNodeSpacing"},function(){return this.ta.nodeSpacing},function(a){this.ta.nodeSpacing!==a&&(v.j(a,"number",Z,"alternateNodeSpacing"),this.ta.nodeSpacing=a,this.H())}); +v.defineProperty(Z,{hJ:"alternateLayerSpacing"},function(){return this.ta.layerSpacing},function(a){this.ta.layerSpacing!==a&&(v.j(a,"number",Z,"alternateLayerSpacing"),this.ta.layerSpacing=a,this.H())});v.defineProperty(Z,{iJ:"alternateLayerSpacingParentOverlap"},function(){return this.ta.layerSpacingParentOverlap},function(a){this.ta.layerSpacingParentOverlap!==a&&(v.j(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ta.layerSpacingParentOverlap=a,this.H()))}); +v.defineProperty(Z,{eJ:"alternateCompaction"},function(){return this.ta.compaction},function(a){this.ta.compaction!==a&&(v.pb(a,Z,Z,"alternateCompaction"),a===Ss||a===Us)&&(this.ta.compaction=a,this.H())});v.defineProperty(Z,{aJ:"alternateBreadthLimit"},function(){return this.ta.breadthLimit},function(a){this.ta.breadthLimit!==a&&(v.j(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.ta.breadthLimit=a,this.H()))}); +v.defineProperty(Z,{oJ:"alternateRowSpacing"},function(){return this.ta.rowSpacing},function(a){this.ta.rowSpacing!==a&&(v.j(a,"number",Z,"alternateRowSpacing"),this.ta.rowSpacing=a,this.H())});v.defineProperty(Z,{nJ:"alternateRowIndent"},function(){return this.ta.rowIndent},function(a){this.ta.rowIndent!==a&&(v.j(a,"number",Z,"alternateRowIndent"),0<=a&&(this.ta.rowIndent=a,this.H()))}); +v.defineProperty(Z,{dJ:"alternateCommentSpacing"},function(){return this.ta.commentSpacing},function(a){this.ta.commentSpacing!==a&&(v.j(a,"number",Z,"alternateCommentSpacing"),this.ta.commentSpacing=a,this.H())});v.defineProperty(Z,{cJ:"alternateCommentMargin"},function(){return this.ta.commentMargin},function(a){this.ta.commentMargin!==a&&(v.j(a,"number",Z,"alternateCommentMargin"),this.ta.commentMargin=a,this.H())}); +v.defineProperty(Z,{qJ:"alternateSetsPortSpot"},function(){return this.ta.setsPortSpot},function(a){this.ta.setsPortSpot!==a&&(v.j(a,"boolean",Z,"alternateSetsPortSpot"),this.ta.setsPortSpot=a,this.H())});v.defineProperty(Z,{mJ:"alternatePortSpot"},function(){return this.ta.portSpot},function(a){v.A(a,L,Z,"alternatePortSpot");this.ta.portSpot.K(a)||(this.ta.portSpot=a,this.H())}); +v.defineProperty(Z,{pJ:"alternateSetsChildPortSpot"},function(){return this.ta.setsChildPortSpot},function(a){this.ta.setsChildPortSpot!==a&&(v.j(a,"boolean",Z,"alternateSetsChildPortSpot"),this.ta.setsChildPortSpot=a,this.H())});v.defineProperty(Z,{bJ:"alternateChildPortSpot"},function(){return this.ta.childPortSpot},function(a){v.A(a,L,Z,"alternateChildPortSpot");this.ta.childPortSpot.K(a)||(this.ta.childPortSpot=a,this.H())});var ms;Z.PathDefault=ms=v.p(Z,"PathDefault",-1);var ns; +Z.PathDestination=ns=v.p(Z,"PathDestination",0);var us;Z.PathSource=us=v.p(Z,"PathSource",1);var Hs;Z.SortingForwards=Hs=v.p(Z,"SortingForwards",10);var Is;Z.SortingReverse=Is=v.p(Z,"SortingReverse",11);var Js;Z.SortingAscending=Js=v.p(Z,"SortingAscending",12);var Ks;Z.SortingDescending=Ks=v.p(Z,"SortingDescending",13);var mt;Z.AlignmentCenterSubtrees=mt=v.p(Z,"AlignmentCenterSubtrees",20);var Ls;Z.AlignmentCenterChildren=Ls=v.p(Z,"AlignmentCenterChildren",21);var Ws; +Z.AlignmentStart=Ws=v.p(Z,"AlignmentStart",22);var Xs;Z.AlignmentEnd=Xs=v.p(Z,"AlignmentEnd",23);var Ns;Z.AlignmentBus=Ns=v.p(Z,"AlignmentBus",24);var Cs;Z.AlignmentBusBranching=Cs=v.p(Z,"AlignmentBusBranching",25);var Os;Z.AlignmentTopLeftBus=Os=v.p(Z,"AlignmentTopLeftBus",26);var Ps;Z.AlignmentBottomRightBus=Ps=v.p(Z,"AlignmentBottomRightBus",27);var Ss;Z.CompactionNone=Ss=v.p(Z,"CompactionNone",30);var Us;Z.CompactionBlock=Us=v.p(Z,"CompactionBlock",31);var os; +Z.StyleLayered=os=v.p(Z,"StyleLayered",40);var Gs;Z.StyleLastParents=Gs=v.p(Z,"StyleLastParents",41);var Fs;Z.StyleAlternating=Fs=v.p(Z,"StyleAlternating",42);var Es;Z.StyleRootOnly=Es=v.p(Z,"StyleRootOnly",43);var qs;Z.ArrangementVertical=qs=v.p(Z,"ArrangementVertical",50);var vt;Z.ArrangementHorizontal=vt=v.p(Z,"ArrangementHorizontal",51);var ts;Z.ArrangementFixedRoots=ts=v.p(Z,"ArrangementFixedRoots",52);var ps;Z.LayerIndividual=ps=v.p(Z,"LayerIndividual",60);var As; +Z.LayerSiblings=As=v.p(Z,"LayerSiblings",61);var zs;Z.LayerUniform=zs=v.p(Z,"LayerUniform",62);function ss(){Yf.call(this)}v.Ja(ss,Yf);v.ea("TreeNetwork",ss);ss.prototype.createVertex=function(){return new rs};ss.prototype.createEdge=function(){return new xt}; +function rs(){oq.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.ma=new z(0,0);this.fb=new ia(0,0);this.Ma=new z(0,0);this.Bp=this.Ap=this.rI=!1;this.St=this.At=null;this.sorting=Hs;this.comparer=uq;this.angle=0;this.alignment=Ls;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Us;this.breadthLimit= +0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=fc;this.setsChildPortSpot=!0;this.childPortSpot=fc}v.Ja(rs,oq);v.ea("TreeVertex",rs); +rs.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing, +this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};v.u(rs,{Dm:"childrenCount"},function(){return this.children.length});v.defineProperty(rs,{AK:"relativePosition"},function(){return this.ma},function(a){this.ma.set(a)});v.defineProperty(rs,{MK:"subtreeSize"},function(){return this.fb},function(a){this.fb.set(a)}); +v.defineProperty(rs,{LK:"subtreeOffset"},function(){return this.Ma},function(a){this.Ma.set(a)});function xt(){pq.call(this);this.Rr=new z(0,0)}v.Ja(xt,pq);v.ea("TreeEdge",xt); +xt.prototype.commit=function(){var a=this.link;if(null!==a&&!a.sl){var b=this.network.Pb,c=null,d=null;switch(b.Df){case ns:c=this.fromVertex;d=this.toVertex;break;case us:c=this.toVertex;d=this.fromVertex;break;default:v.k("Unhandled path value "+b.Df.toString())}if(null!==c&&null!==d)if(b=this.Rr,0!==b.x||0!==b.y||c.rI){var d=c.mb,e=Vs(c),f=Ys(c),h=c.rowSpacing;a.fn();var k=a.Ke===Ki,l=a.jc,m=0,n,p;a.Cl();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Zs(c))))):c.alignment===Ws?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Zs(c))))):c.alignment===Ws?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Zs(c))))):c.alignment===Ws?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Zs(c))))):c.alignment===Ws?(r=d.left+b.x,0===b.x&&n.x + + + + + + + + + + + + diff --git a/node_modules/jibo-sdk/resources/gating/m.js b/node_modules/jibo-sdk/resources/gating/m.js new file mode 100644 index 0000000..40706c8 --- /dev/null +++ b/node_modules/jibo-sdk/resources/gating/m.js @@ -0,0 +1,9 @@ +/** + * jibo-sdk - Jibo's SDK plugin for Atom + * @version v3.9.10 + * @license Copyright (c) 2017, Jibo, Inc. All rights reserved. + * All use of the Jibo SDK is subject to the Jibo SDK End User License Agreement (EULA) + * distributed herewith. If you did not receive a copy of the EULA, you may view a + * copy at https://developers.jibo.com/license. + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.m=e()}}(function(){return function e(r,o,l){function t(i,a){if(!o[i]){if(!r[i]){var u="function"==typeof require&&require;if(!a&&u)return u(i,!0);if(n)return n(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[i]={exports:{}};r[i][0].call(d.exports,function(e){var o=r[i][1][e];return t(o?o:e)},d,d.exports,e,r,o,l)}return o[i].exports}for(var n="function"==typeof require&&require,i=0;i div{ + width: 100%; + height: 100%; + background: black; + display: flex; + flex-direction: column; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: stretch; + align-content: stretch; +} + +.animation-preview { + width: 100%; + height: 100%; + order: 0; + flex-grow: 1; + flex-shrink: 1; + flex-basis: auto; + align-self: auto; +} + +@animation-channel-tick-width: 18px; +@animation-channel-tick-height: 40px; + +.animation-timeline { + width: 100%; + background: #363636; + overflow: auto; + -webkit-user-select: none; +} + +.animation-timeline .time-display { + height: 22px; + color: #9f9f9f; + text-align: right; +} + +.animation-timeline .time-display > .frame-rate { +} + +.animation-timeline .time-display > .frames { + height: 22px; + line-height: 22px; +} + +.animation-timeline .time-display > .seconds { + padding-left: 3px; + height: 22px; + line-height: 22px; +} + +.animation-timeline .time-display > .new-layer { + padding-left: 3px; + height: 20px; + line-height: 22px; + margin-left: 5px; + margin-top: 2px; + cursor: pointer; +} + +.animation-timeline .delete { + margin-top: 13px; + float: right; + display: inline-block; + font-size: 14px; + line-height: 12px; + position: relative; + cursor: pointer; + width: 20px; + height: 20px; +} + +.animation-timeline .flags{ + width: 56px; + height: 39px; + border-right: thin solid #525252; + float: left; +} + +.animation-channel-label.selected .flags{ + border-right: thin solid #CFAE67; + padding-left: 2px; +} + +.animation-timeline .locked, .animation-timeline .visible{ + padding: 13px 9px 0px 9px; + float: left; + display: inline-block; + font-size: 14px; + line-height: 12px; + position: relative; + cursor: pointer; + width: 22px; + height: 38px; +} + +.animation-channel-label .drop-bottom.drag-over:after{ + content: ""; + display: block; + width: 270px; + height: 6px; + background: #1F8BFF; + margin-top: 16px; +} + +.animation-channel-label .drop-top.drag-over:before{ + content: ""; + display: block; + width: 270px; + height: 6px; + background: #1F8BFF; + margin-top: -4px; +} + +.animation-channel-label .drop-top.drag-over:first-child:before{ + margin-top: -1px; +} + +.animation-timeline .fa-circle.locked, .animation-timeline .fa-circle.visible{ + font-size: 7px; + top: -2px; + left: 2px; +} + +.animation-timeline-notches-container{ + + height: 22px; +} +.animation-timeline-notch { + cursor: ew-resize; + width: (@animation-channel-tick-width * 5); + height: @animation-channel-tick-height / 2; + line-height: @animation-channel-tick-height / 2; + font-size: 10px; + padding-left: 6px; + color: #a5a5a7; + display: inline-block; + float: left; +} + +.animation-channel { + height: @animation-channel-tick-height; + clear: both; +} + +.animation-channel-label { + width: @animation-channel-tick-width * 15; + height: @animation-channel-tick-height; + line-height: @animation-channel-tick-height; + font-size: 12px; + text-align: right; + padding-right: 12px; + float: left; + background: #363636; + color: #959597; + border-top: thin solid #525252; +} + +.animation-channel-label input{ + background: none; + border: none; + cursor: pointer; + left: -51px; + position: relative; +} +.animation-channel-label input:focus{ + background: white; + border: thin solid grey; + color: #3f3f3f; +} + +.animation-channel-label .type{ + float: right; + font-size: 10px; + opacity: 0.5; +} + +.animation-channel-label.selected { + background: #CE8D01; +} + +.animation-channel-label.odd { + background: #404040; +} +.animation-channel-label.selected.odd { + background: #CE8D01; +} + +.animation-channel-label:last-child{ + border-bottom: thin solid #525252; +} +.animation-channel .animation-channel-keyframes { + display: inline-block; +} + +.animation-channel-keyframes { + cursor: pointer; + height: @animation-channel-tick-height + 2; +} + +@keyframe-slot-color: #404040; +@keyframe-slot-shadow: #3A3A3A; +@keyframe-slot-hightlight: #4B4B4B; + +.animation-channel .animation-channel-keyframe-slot { + width: @animation-channel-tick-width; + height: @animation-channel-tick-height; + display: inline-block; + padding: 0px; + margin: 0px; + + background: @keyframe-slot-color; + border-left: thin solid @keyframe-slot-hightlight; + border-top: thin solid @keyframe-slot-hightlight; + border-right: thin solid @keyframe-slot-shadow; + border-bottom: thin solid @keyframe-slot-shadow; +} + +@keyframe-marker-color: #3C3C3C; +@keyframe-marker-shadow: #3A3A3A; +@keyframe-marker-hightlight: #4B4B4B; + +.animation-channel .animation-channel-keyframe-slot.marker { + background: @keyframe-marker-color; + border-left: thin solid @keyframe-marker-hightlight; + border-top: thin solid @keyframe-marker-hightlight; + border-right: thin solid @keyframe-marker-shadow; + border-bottom: thin solid @keyframe-marker-shadow; +} + +.animation-channel .animation-channel-keyframe-slot.shadowed-dark { + background: #1A4A85 +} + +.animation-channel .animation-channel-keyframe-slot.shadowed-light { + background: #5176A3; +} + +.animation-channel .animation-channel-keyframe-slot.selected { + background: #635433; +} + +.animation-channel .animation-channel-keyframe-slot.exists { + border: thin solid #2f2f2f; +} + +.animation-channel .animation-channel-keyframe-slot.selected.exists { + background: #CE8D01; +} + +.animation-channel .animation-channel-keyframe-slot.exists:after{ + content: "•"; + position: relative; + float: left; + color: #1f1f1f; + margin-left: 0px; + margin-top: -3px; + font-size: 29px; +} + +.animation-channel .animation-channel-keyframe-slot:hover { + opacity: 0.4; +} + +.animation-channel .animation-channel-keyframe-slot.drag-over, +.animation-channel .animation-channel-keyframe-slot.marker.drag-over, +.animation-channel .animation-channel-keyframe-slot.exceeds.drag-over, +.animation-channel .animation-channel-keyframe-slot.selected.drag-over, +.animation-channel .animation-channel-keyframe-slot.exists.drag-over{ + background: #1F8BFF; + opacity: 1.0; +} + +.animation-channel .animation-channel-keyframe-slot.drag-over-empty, +.animation-channel .animation-channel-keyframe-slot.marker.drag-over-empty, +.animation-channel .animation-channel-keyframe-slot.exceeds.drag-over-empty, +.animation-channel .animation-channel-keyframe-slot.selected.drag-over-empty, +.animation-channel .animation-channel-keyframe-slot.exists.drag-over-empty{ + background: #37526F; + opacity: 1.0; +} +.animation-channel .animation-channel-keyframe-slot.drag-over-mismatched, +.animation-channel .animation-channel-keyframe-slot.marker.drag-over-mismatched, +.animation-channel .animation-channel-keyframe-slot.exceeds.drag-over-mismatched, +.animation-channel .animation-channel-keyframe-slot.selected.drag-over-mismatched, +.animation-channel .animation-channel-keyframe-slot.exists.drag-over-mismatched{ + background: #6F1212; + border: thin solid #664C4C; + opacity: 1.0; +} + +.animation-channel .animation-channel-keyframe-slot.exceeds { + background-color: #5E3737; +} + +.animation-channel .animation-channel-keyframe-slot > .slot-effect{ + background: green; + width: @animation-channel-tick-width - 2; + height: @animation-channel-tick-height - 2; + display: none; + position: absolute; +} + +.animation-timeline-indicator { + position: absolute; + opacity: 0.5; + width: 20px; + height: 20px; + z-index: 1; +} + +.animation-timeline-indicator-handle { + width: 17px; + height: 22px; + margin: 0px 2px 2px 1px; + background: red; + border: thin solid #9f0000; + cursor: ew-resize; +} + +.animation-timeline-indicator-line { + width: 2px; + background: #9f0000; + pointer-events: none; + opacity: 0.7; +} + +.animation-channel-labels-container { + width: 271px; + clear: both; + background: #404040; + border-right: thin solid #363636; +} + +.animation-editor-playback-controls{ + background: #3f3f3f; + width: 250px; + height: 40px; + position: absolute; + margin-top: -57px; + z-index: 2; + border: thin solid #525252; + border-radius: 10px; + text-align: center; +} + +.animation-editor-playback-controls > i { + font-size: 22px; + line-height: 22px; + padding: 8.5px; + color: #afafaf; + margin-top: 0px; +} + +.animation-editor-playback-controls > .fa { + cursor: pointer; +} +.animation-editor-playback-controls > .fa:hover{ + color: #efefef; +} + +.animation-editor-playback-controls > .fa-gear{ + color: #6f6f6f; + padding: 6.5px; +} +.animation-editor-playback-controls > .fa-gear:hover{ + color: #9f9f9f; +} + +.animation-preview > canvas{ + cursor: pointer; +} + +.event-editor > atom-text-editor.is-focused { + outline: auto -webkit-focus-ring-color; +} + +.animation-settings { + width: 150px; + height: 63px; + position: relative; + margin-top: -100px; + margin-left: 121px; + z-index: 1; +} + +.settings-container{ + width: 100%; + height: 100%; + background-color: #363636; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); + padding: 5px; + border-radius: 2px; + border: 1px solid rgba(255, 255, 255, 0.07); + z-index: 1; +} +.settings-container > label{ + color: grey; + display: block; +} + +.settings-mousetrap{ + position:absolute; + width: 10000px; + height: 10000px; + margin-left: -5000px; + margin-top: -5000px; + z-index: -1; +} + + +/* +.right-pane input[type="number"] { + color: @text-color; + font-family: @font-family; + background-color: @input-background-color; + font-size: (@font-size + 4); + border: 1px solid @input-border-color; +} +*/ + +.animation-editor-properties { + background: @base-background-color; + width: 100%; + height: 100%; + overflow: auto; +} + +.animation-editor-properties input[type="number"]:focus{ + background: #616161; + color: #afafaf; +} + +.animation-editor-properties input[type="number"]:focus::selection{ + background: #afaf3f; +} + +.animation-editor .face { + background-color: @tree-view-background-color; +} + +.eye-mode { + border-bottom: 1px solid @panel-heading-border-color; + border-top: 1px solid fadein(@background-color-highlight, 10%); + + background-color: transparent; + background-image: -webkit-linear-gradient(@panel-heading-background-color, darken(@panel-heading-background-color, 10%)); + width: 100%; +} + +.video-container { + background-color: @tree-view-background-color; +} +.animation-editor .pixi-container { + background-color: @tree-view-background-color; +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/styles/atom-react.less b/node_modules/jibo-sdk/styles/atom-react.less new file mode 100755 index 0000000..9c56a54 --- /dev/null +++ b/node_modules/jibo-sdk/styles/atom-react.less @@ -0,0 +1,15 @@ +@import "ui-variables"; + +input[type="number"] { + color: @text-color; + font-family: @font-family; + background-color: @input-background-color; + font-size: (@font-size + 4); + border: 1px solid @input-border-color; + text-align: right; +} + + +.jibo-tool-bar .btn{ + height: 100%; +} diff --git a/node_modules/jibo-sdk/styles/behavior-editor.less b/node_modules/jibo-sdk/styles/behavior-editor.less new file mode 100644 index 0000000..cf85172 --- /dev/null +++ b/node_modules/jibo-sdk/styles/behavior-editor.less @@ -0,0 +1,219 @@ +@import "ui-variables"; + +.behavior-editor-container { + display: flex; + width: 100%; + height: 100%; +} + +li.list-item.selected-item { + background-color: @background-color-selected; + span { + color: @text-color-highlight; + } +} + +.right-pane { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + background-color: @tree-view-background-color; + overflow: hidden; + border: solid @pane-item-border-color 2px; +} + +.right-pane h1 { + font-family: @font-family; + color: @text-color; + font-weight: bold; + margin-bottom: 3px; + margin-top: 3px; +} + +.right-pane hr { + margin-top: 10px; + margin-bottom: 3px; +} + +.right-pane p { + font-family: @font-family; + color: @text-color; + font-weight: bold; + font-size: 15px; + white-space: normal; +} + +.arguments-scroll-container { + flex: 1; + margin-left: 5px; + margin-right: 5px; + overflow-x: auto; +} + +.arguments-container { + width: 100%; + height: 400px; +} + +.argument-editor { + width: 100%; + height: 200px; +} + +.input-div { + background-color: @input-background-color; + border: 1px solid @input-border-color; + box-shadow: 1px 1px 1px 0 @input-border-color inset; + margin-top: 5px; + margin-left: auto; + margin-right: auto; + padding: 2px 3px; + font-size: 14px; + width: 95%; + height: 25px; + color: @text-color; + font-family: @font-family; +} + +[contenteditable="true"].input-div { + white-space: nowrap; + overflow: hidden; +} +[contenteditable="true"].input-div br { + display:none; + +} +[contenteditable="true"].input-div * { + display:inline; + white-space:nowrap; +} + +.jibo-list-group { + list-style: none; + background-color: transparent; + border: none; +} + +.behavior-selector-modal { + width: 800px; + height: 600px; + margin-left: -150px; + background-color: @input-background-color; + border: solid @base-border-color 1px; + .panel-heading { + height: 35px; + } + + .contents { + border: solid @base-border-color 1px; + display: flex; + height: 450px; + margin: 10px; + .description-contents { + height: 450px; + width: 330px; + .behavior-description { + height: 418px; + margin-left: 10px; + background-color: @tree-view-background-color; + div { + padding: 10px; + } + } + } + .list-contents { + width: 223px; + height: 450px; + } + .list-group { + overflow-y: scroll; + height: 418px; + position: relative; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-top: 10px; + width: 100%; + background-color: @tree-view-background-color; + } + + .list-group.schema-list { + margin-left: 5px; + } + + .list-group:focus { + outline: auto -webkit-focus-ring-color; + } + } + + .btn-group { + margin-left: 10px; + } +} + +.asset-selector-modal { + width: 900px; + height: 600px; + margin-left: -150px; + background-color: @input-background-color; + border: solid @base-border-color 1px; + .panel-heading { + height: 35px; + } + + .contents { + border: solid @base-border-color 1px; + display: flex; + height: 450px; + margin: 10px; + .preview-contents { + height: 400px; + width: 430px; + .asset-preview { + overflow: scroll; + width: 410px; + height: 418px; + padding: 10px; + background-color: @tree-view-background-color; + } + } + .name-list-contents { + width: 453px; + height: 450px; + } + .list-contents { + width: 253px; + height: 450px; + } + .list-group { + overflow-y: scroll; + height: 418px; + position: relative; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 10px; + padding-top: 10px; + width: 100%; + background-color: @tree-view-background-color; + } + .asset-list { + overflow-y: scroll; + height: 418px; + position: relative; + padding-right: 5px; + padding-left: 5px; + li { + padding-left: 5px; + } + } + + .list-group:focus { + outline: auto -webkit-focus-ring-color; + } + } + + .btn-group { + margin-left: 10px; + } +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/styles/flow.less b/node_modules/jibo-sdk/styles/flow.less new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/jibo-sdk/styles/font-awesome.less b/node_modules/jibo-sdk/styles/font-awesome.less new file mode 100644 index 0000000..22199dd --- /dev/null +++ b/node_modules/jibo-sdk/styles/font-awesome.less @@ -0,0 +1,1802 @@ +/*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + + src: url('atom://jibo-sdk/styles/fonts/fontawesome-webfont.eot'); + src: url('atom://jibo-sdk/styles/fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('atom://jibo-sdk/styles/fonts/fontawesome-webfont.woff2') format('woff2'), url('atom://jibo-sdk/styles/fonts/fontawesome-webfont.woff') format('woff'), url('atom://jibo-sdk/styles/fonts/fontawesome-webfont.ttf') format('truetype'), url('atom://jibo-sdk/styles/fonts/fontawesome-webfont.svg#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); +} +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-fw { + width: 1.28571429em; + text-align: center; +} +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714286em; +} +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fa-stack-1x { + line-height: inherit; +} +.fa-stack-2x { + font-size: 2em; +} +.fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} +.fa-music:before { + content: "\f001"; +} +.fa-search:before { + content: "\f002"; +} +.fa-envelope-o:before { + content: "\f003"; +} +.fa-heart:before { + content: "\f004"; +} +.fa-star:before { + content: "\f005"; +} +.fa-star-o:before { + content: "\f006"; +} +.fa-user:before { + content: "\f007"; +} +.fa-film:before { + content: "\f008"; +} +.fa-th-large:before { + content: "\f009"; +} +.fa-th:before { + content: "\f00a"; +} +.fa-th-list:before { + content: "\f00b"; +} +.fa-check:before { + content: "\f00c"; +} +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} +.fa-search-plus:before { + content: "\f00e"; +} +.fa-search-minus:before { + content: "\f010"; +} +.fa-power-off:before { + content: "\f011"; +} +.fa-signal:before { + content: "\f012"; +} +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} +.fa-trash-o:before { + content: "\f014"; +} +.fa-home:before { + content: "\f015"; +} +.fa-file-o:before { + content: "\f016"; +} +.fa-clock-o:before { + content: "\f017"; +} +.fa-road:before { + content: "\f018"; +} +.fa-download:before { + content: "\f019"; +} +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.fa-inbox:before { + content: "\f01c"; +} +.fa-play-circle-o:before { + content: "\f01d"; +} +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} +.fa-refresh:before { + content: "\f021"; +} +.fa-list-alt:before { + content: "\f022"; +} +.fa-lock:before { + content: "\f023"; +} +.fa-flag:before { + content: "\f024"; +} +.fa-headphones:before { + content: "\f025"; +} +.fa-volume-off:before { + content: "\f026"; +} +.fa-volume-down:before { + content: "\f027"; +} +.fa-volume-up:before { + content: "\f028"; +} +.fa-qrcode:before { + content: "\f029"; +} +.fa-barcode:before { + content: "\f02a"; +} +.fa-tag:before { + content: "\f02b"; +} +.fa-tags:before { + content: "\f02c"; +} +.fa-book:before { + content: "\f02d"; +} +.fa-bookmark:before { + content: "\f02e"; +} +.fa-print:before { + content: "\f02f"; +} +.fa-camera:before { + content: "\f030"; +} +.fa-font:before { + content: "\f031"; +} +.fa-bold:before { + content: "\f032"; +} +.fa-italic:before { + content: "\f033"; +} +.fa-text-height:before { + content: "\f034"; +} +.fa-text-width:before { + content: "\f035"; +} +.fa-align-left:before { + content: "\f036"; +} +.fa-align-center:before { + content: "\f037"; +} +.fa-align-right:before { + content: "\f038"; +} +.fa-align-justify:before { + content: "\f039"; +} +.fa-list:before { + content: "\f03a"; +} +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} +.fa-indent:before { + content: "\f03c"; +} +.fa-video-camera:before { + content: "\f03d"; +} +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} +.fa-pencil:before { + content: "\f040"; +} +.fa-map-marker:before { + content: "\f041"; +} +.fa-adjust:before { + content: "\f042"; +} +.fa-tint:before { + content: "\f043"; +} +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} +.fa-share-square-o:before { + content: "\f045"; +} +.fa-check-square-o:before { + content: "\f046"; +} +.fa-arrows:before { + content: "\f047"; +} +.fa-step-backward:before { + content: "\f048"; +} +.fa-fast-backward:before { + content: "\f049"; +} +.fa-backward:before { + content: "\f04a"; +} +.fa-play:before { + content: "\f04b"; +} +.fa-pause:before { + content: "\f04c"; +} +.fa-stop:before { + content: "\f04d"; +} +.fa-forward:before { + content: "\f04e"; +} +.fa-fast-forward:before { + content: "\f050"; +} +.fa-step-forward:before { + content: "\f051"; +} +.fa-eject:before { + content: "\f052"; +} +.fa-chevron-left:before { + content: "\f053"; +} +.fa-chevron-right:before { + content: "\f054"; +} +.fa-plus-circle:before { + content: "\f055"; +} +.fa-minus-circle:before { + content: "\f056"; +} +.fa-times-circle:before { + content: "\f057"; +} +.fa-check-circle:before { + content: "\f058"; +} +.fa-question-circle:before { + content: "\f059"; +} +.fa-info-circle:before { + content: "\f05a"; +} +.fa-crosshairs:before { + content: "\f05b"; +} +.fa-times-circle-o:before { + content: "\f05c"; +} +.fa-check-circle-o:before { + content: "\f05d"; +} +.fa-ban:before { + content: "\f05e"; +} +.fa-arrow-left:before { + content: "\f060"; +} +.fa-arrow-right:before { + content: "\f061"; +} +.fa-arrow-up:before { + content: "\f062"; +} +.fa-arrow-down:before { + content: "\f063"; +} +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} +.fa-expand:before { + content: "\f065"; +} +.fa-compress:before { + content: "\f066"; +} +.fa-plus:before { + content: "\f067"; +} +.fa-minus:before { + content: "\f068"; +} +.fa-asterisk:before { + content: "\f069"; +} +.fa-exclamation-circle:before { + content: "\f06a"; +} +.fa-gift:before { + content: "\f06b"; +} +.fa-leaf:before { + content: "\f06c"; +} +.fa-fire:before { + content: "\f06d"; +} +.fa-eye:before { + content: "\f06e"; +} +.fa-eye-slash:before { + content: "\f070"; +} +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} +.fa-plane:before { + content: "\f072"; +} +.fa-calendar:before { + content: "\f073"; +} +.fa-random:before { + content: "\f074"; +} +.fa-comment:before { + content: "\f075"; +} +.fa-magnet:before { + content: "\f076"; +} +.fa-chevron-up:before { + content: "\f077"; +} +.fa-chevron-down:before { + content: "\f078"; +} +.fa-retweet:before { + content: "\f079"; +} +.fa-shopping-cart:before { + content: "\f07a"; +} +.fa-folder:before { + content: "\f07b"; +} +.fa-folder-open:before { + content: "\f07c"; +} +.fa-arrows-v:before { + content: "\f07d"; +} +.fa-arrows-h:before { + content: "\f07e"; +} +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} +.fa-twitter-square:before { + content: "\f081"; +} +.fa-facebook-square:before { + content: "\f082"; +} +.fa-camera-retro:before { + content: "\f083"; +} +.fa-key:before { + content: "\f084"; +} +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} +.fa-comments:before { + content: "\f086"; +} +.fa-thumbs-o-up:before { + content: "\f087"; +} +.fa-thumbs-o-down:before { + content: "\f088"; +} +.fa-star-half:before { + content: "\f089"; +} +.fa-heart-o:before { + content: "\f08a"; +} +.fa-sign-out:before { + content: "\f08b"; +} +.fa-linkedin-square:before { + content: "\f08c"; +} +.fa-thumb-tack:before { + content: "\f08d"; +} +.fa-external-link:before { + content: "\f08e"; +} +.fa-sign-in:before { + content: "\f090"; +} +.fa-trophy:before { + content: "\f091"; +} +.fa-github-square:before { + content: "\f092"; +} +.fa-upload:before { + content: "\f093"; +} +.fa-lemon-o:before { + content: "\f094"; +} +.fa-phone:before { + content: "\f095"; +} +.fa-square-o:before { + content: "\f096"; +} +.fa-bookmark-o:before { + content: "\f097"; +} +.fa-phone-square:before { + content: "\f098"; +} +.fa-twitter:before { + content: "\f099"; +} +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} +.fa-github:before { + content: "\f09b"; +} +.fa-unlock:before { + content: "\f09c"; +} +.fa-credit-card:before { + content: "\f09d"; +} +.fa-rss:before { + content: "\f09e"; +} +.fa-hdd-o:before { + content: "\f0a0"; +} +.fa-bullhorn:before { + content: "\f0a1"; +} +.fa-bell:before { + content: "\f0f3"; +} +.fa-certificate:before { + content: "\f0a3"; +} +.fa-hand-o-right:before { + content: "\f0a4"; +} +.fa-hand-o-left:before { + content: "\f0a5"; +} +.fa-hand-o-up:before { + content: "\f0a6"; +} +.fa-hand-o-down:before { + content: "\f0a7"; +} +.fa-arrow-circle-left:before { + content: "\f0a8"; +} +.fa-arrow-circle-right:before { + content: "\f0a9"; +} +.fa-arrow-circle-up:before { + content: "\f0aa"; +} +.fa-arrow-circle-down:before { + content: "\f0ab"; +} +.fa-globe:before { + content: "\f0ac"; +} +.fa-wrench:before { + content: "\f0ad"; +} +.fa-tasks:before { + content: "\f0ae"; +} +.fa-filter:before { + content: "\f0b0"; +} +.fa-briefcase:before { + content: "\f0b1"; +} +.fa-arrows-alt:before { + content: "\f0b2"; +} +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} +.fa-cloud:before { + content: "\f0c2"; +} +.fa-flask:before { + content: "\f0c3"; +} +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} +.fa-paperclip:before { + content: "\f0c6"; +} +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} +.fa-square:before { + content: "\f0c8"; +} +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} +.fa-list-ul:before { + content: "\f0ca"; +} +.fa-list-ol:before { + content: "\f0cb"; +} +.fa-strikethrough:before { + content: "\f0cc"; +} +.fa-underline:before { + content: "\f0cd"; +} +.fa-table:before { + content: "\f0ce"; +} +.fa-magic:before { + content: "\f0d0"; +} +.fa-truck:before { + content: "\f0d1"; +} +.fa-pinterest:before { + content: "\f0d2"; +} +.fa-pinterest-square:before { + content: "\f0d3"; +} +.fa-google-plus-square:before { + content: "\f0d4"; +} +.fa-google-plus:before { + content: "\f0d5"; +} +.fa-money:before { + content: "\f0d6"; +} +.fa-caret-down:before { + content: "\f0d7"; +} +.fa-caret-up:before { + content: "\f0d8"; +} +.fa-caret-left:before { + content: "\f0d9"; +} +.fa-caret-right:before { + content: "\f0da"; +} +.fa-columns:before { + content: "\f0db"; +} +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} +.fa-envelope:before { + content: "\f0e0"; +} +.fa-linkedin:before { + content: "\f0e1"; +} +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} +.fa-comment-o:before { + content: "\f0e5"; +} +.fa-comments-o:before { + content: "\f0e6"; +} +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} +.fa-sitemap:before { + content: "\f0e8"; +} +.fa-umbrella:before { + content: "\f0e9"; +} +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} +.fa-lightbulb-o:before { + content: "\f0eb"; +} +.fa-exchange:before { + content: "\f0ec"; +} +.fa-cloud-download:before { + content: "\f0ed"; +} +.fa-cloud-upload:before { + content: "\f0ee"; +} +.fa-user-md:before { + content: "\f0f0"; +} +.fa-stethoscope:before { + content: "\f0f1"; +} +.fa-suitcase:before { + content: "\f0f2"; +} +.fa-bell-o:before { + content: "\f0a2"; +} +.fa-coffee:before { + content: "\f0f4"; +} +.fa-cutlery:before { + content: "\f0f5"; +} +.fa-file-text-o:before { + content: "\f0f6"; +} +.fa-building-o:before { + content: "\f0f7"; +} +.fa-hospital-o:before { + content: "\f0f8"; +} +.fa-ambulance:before { + content: "\f0f9"; +} +.fa-medkit:before { + content: "\f0fa"; +} +.fa-fighter-jet:before { + content: "\f0fb"; +} +.fa-beer:before { + content: "\f0fc"; +} +.fa-h-square:before { + content: "\f0fd"; +} +.fa-plus-square:before { + content: "\f0fe"; +} +.fa-angle-double-left:before { + content: "\f100"; +} +.fa-angle-double-right:before { + content: "\f101"; +} +.fa-angle-double-up:before { + content: "\f102"; +} +.fa-angle-double-down:before { + content: "\f103"; +} +.fa-angle-left:before { + content: "\f104"; +} +.fa-angle-right:before { + content: "\f105"; +} +.fa-angle-up:before { + content: "\f106"; +} +.fa-angle-down:before { + content: "\f107"; +} +.fa-desktop:before { + content: "\f108"; +} +.fa-laptop:before { + content: "\f109"; +} +.fa-tablet:before { + content: "\f10a"; +} +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} +.fa-circle-o:before { + content: "\f10c"; +} +.fa-quote-left:before { + content: "\f10d"; +} +.fa-quote-right:before { + content: "\f10e"; +} +.fa-spinner:before { + content: "\f110"; +} +.fa-circle:before { + content: "\f111"; +} +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} +.fa-github-alt:before { + content: "\f113"; +} +.fa-folder-o:before { + content: "\f114"; +} +.fa-folder-open-o:before { + content: "\f115"; +} +.fa-smile-o:before { + content: "\f118"; +} +.fa-frown-o:before { + content: "\f119"; +} +.fa-meh-o:before { + content: "\f11a"; +} +.fa-gamepad:before { + content: "\f11b"; +} +.fa-keyboard-o:before { + content: "\f11c"; +} +.fa-flag-o:before { + content: "\f11d"; +} +.fa-flag-checkered:before { + content: "\f11e"; +} +.fa-terminal:before { + content: "\f120"; +} +.fa-code:before { + content: "\f121"; +} +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} +.fa-location-arrow:before { + content: "\f124"; +} +.fa-crop:before { + content: "\f125"; +} +.fa-code-fork:before { + content: "\f126"; +} +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} +.fa-question:before { + content: "\f128"; +} +.fa-info:before { + content: "\f129"; +} +.fa-exclamation:before { + content: "\f12a"; +} +.fa-superscript:before { + content: "\f12b"; +} +.fa-subscript:before { + content: "\f12c"; +} +.fa-eraser:before { + content: "\f12d"; +} +.fa-puzzle-piece:before { + content: "\f12e"; +} +.fa-microphone:before { + content: "\f130"; +} +.fa-microphone-slash:before { + content: "\f131"; +} +.fa-shield:before { + content: "\f132"; +} +.fa-calendar-o:before { + content: "\f133"; +} +.fa-fire-extinguisher:before { + content: "\f134"; +} +.fa-rocket:before { + content: "\f135"; +} +.fa-maxcdn:before { + content: "\f136"; +} +.fa-chevron-circle-left:before { + content: "\f137"; +} +.fa-chevron-circle-right:before { + content: "\f138"; +} +.fa-chevron-circle-up:before { + content: "\f139"; +} +.fa-chevron-circle-down:before { + content: "\f13a"; +} +.fa-html5:before { + content: "\f13b"; +} +.fa-css3:before { + content: "\f13c"; +} +.fa-anchor:before { + content: "\f13d"; +} +.fa-unlock-alt:before { + content: "\f13e"; +} +.fa-bullseye:before { + content: "\f140"; +} +.fa-ellipsis-h:before { + content: "\f141"; +} +.fa-ellipsis-v:before { + content: "\f142"; +} +.fa-rss-square:before { + content: "\f143"; +} +.fa-play-circle:before { + content: "\f144"; +} +.fa-ticket:before { + content: "\f145"; +} +.fa-minus-square:before { + content: "\f146"; +} +.fa-minus-square-o:before { + content: "\f147"; +} +.fa-level-up:before { + content: "\f148"; +} +.fa-level-down:before { + content: "\f149"; +} +.fa-check-square:before { + content: "\f14a"; +} +.fa-pencil-square:before { + content: "\f14b"; +} +.fa-external-link-square:before { + content: "\f14c"; +} +.fa-share-square:before { + content: "\f14d"; +} +.fa-compass:before { + content: "\f14e"; +} +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} +.fa-gbp:before { + content: "\f154"; +} +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} +.fa-file:before { + content: "\f15b"; +} +.fa-file-text:before { + content: "\f15c"; +} +.fa-sort-alpha-asc:before { + content: "\f15d"; +} +.fa-sort-alpha-desc:before { + content: "\f15e"; +} +.fa-sort-amount-asc:before { + content: "\f160"; +} +.fa-sort-amount-desc:before { + content: "\f161"; +} +.fa-sort-numeric-asc:before { + content: "\f162"; +} +.fa-sort-numeric-desc:before { + content: "\f163"; +} +.fa-thumbs-up:before { + content: "\f164"; +} +.fa-thumbs-down:before { + content: "\f165"; +} +.fa-youtube-square:before { + content: "\f166"; +} +.fa-youtube:before { + content: "\f167"; +} +.fa-xing:before { + content: "\f168"; +} +.fa-xing-square:before { + content: "\f169"; +} +.fa-youtube-play:before { + content: "\f16a"; +} +.fa-dropbox:before { + content: "\f16b"; +} +.fa-stack-overflow:before { + content: "\f16c"; +} +.fa-instagram:before { + content: "\f16d"; +} +.fa-flickr:before { + content: "\f16e"; +} +.fa-adn:before { + content: "\f170"; +} +.fa-bitbucket:before { + content: "\f171"; +} +.fa-bitbucket-square:before { + content: "\f172"; +} +.fa-tumblr:before { + content: "\f173"; +} +.fa-tumblr-square:before { + content: "\f174"; +} +.fa-long-arrow-down:before { + content: "\f175"; +} +.fa-long-arrow-up:before { + content: "\f176"; +} +.fa-long-arrow-left:before { + content: "\f177"; +} +.fa-long-arrow-right:before { + content: "\f178"; +} +.fa-apple:before { + content: "\f179"; +} +.fa-windows:before { + content: "\f17a"; +} +.fa-android:before { + content: "\f17b"; +} +.fa-linux:before { + content: "\f17c"; +} +.fa-dribbble:before { + content: "\f17d"; +} +.fa-skype:before { + content: "\f17e"; +} +.fa-foursquare:before { + content: "\f180"; +} +.fa-trello:before { + content: "\f181"; +} +.fa-female:before { + content: "\f182"; +} +.fa-male:before { + content: "\f183"; +} +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} +.fa-sun-o:before { + content: "\f185"; +} +.fa-moon-o:before { + content: "\f186"; +} +.fa-archive:before { + content: "\f187"; +} +.fa-bug:before { + content: "\f188"; +} +.fa-vk:before { + content: "\f189"; +} +.fa-weibo:before { + content: "\f18a"; +} +.fa-renren:before { + content: "\f18b"; +} +.fa-pagelines:before { + content: "\f18c"; +} +.fa-stack-exchange:before { + content: "\f18d"; +} +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.fa-arrow-circle-o-left:before { + content: "\f190"; +} +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} +.fa-dot-circle-o:before { + content: "\f192"; +} +.fa-wheelchair:before { + content: "\f193"; +} +.fa-vimeo-square:before { + content: "\f194"; +} +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} +.fa-plus-square-o:before { + content: "\f196"; +} +.fa-space-shuttle:before { + content: "\f197"; +} +.fa-slack:before { + content: "\f198"; +} +.fa-envelope-square:before { + content: "\f199"; +} +.fa-wordpress:before { + content: "\f19a"; +} +.fa-openid:before { + content: "\f19b"; +} +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} +.fa-yahoo:before { + content: "\f19e"; +} +.fa-google:before { + content: "\f1a0"; +} +.fa-reddit:before { + content: "\f1a1"; +} +.fa-reddit-square:before { + content: "\f1a2"; +} +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.fa-stumbleupon:before { + content: "\f1a4"; +} +.fa-delicious:before { + content: "\f1a5"; +} +.fa-digg:before { + content: "\f1a6"; +} +.fa-pied-piper:before { + content: "\f1a7"; +} +.fa-pied-piper-alt:before { + content: "\f1a8"; +} +.fa-drupal:before { + content: "\f1a9"; +} +.fa-joomla:before { + content: "\f1aa"; +} +.fa-language:before { + content: "\f1ab"; +} +.fa-fax:before { + content: "\f1ac"; +} +.fa-building:before { + content: "\f1ad"; +} +.fa-child:before { + content: "\f1ae"; +} +.fa-paw:before { + content: "\f1b0"; +} +.fa-spoon:before { + content: "\f1b1"; +} +.fa-cube:before { + content: "\f1b2"; +} +.fa-cubes:before { + content: "\f1b3"; +} +.fa-behance:before { + content: "\f1b4"; +} +.fa-behance-square:before { + content: "\f1b5"; +} +.fa-steam:before { + content: "\f1b6"; +} +.fa-steam-square:before { + content: "\f1b7"; +} +.fa-recycle:before { + content: "\f1b8"; +} +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} +.fa-tree:before { + content: "\f1bb"; +} +.fa-spotify:before { + content: "\f1bc"; +} +.fa-deviantart:before { + content: "\f1bd"; +} +.fa-soundcloud:before { + content: "\f1be"; +} +.fa-database:before { + content: "\f1c0"; +} +.fa-file-pdf-o:before { + content: "\f1c1"; +} +.fa-file-word-o:before { + content: "\f1c2"; +} +.fa-file-excel-o:before { + content: "\f1c3"; +} +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} +.fa-file-code-o:before { + content: "\f1c9"; +} +.fa-vine:before { + content: "\f1ca"; +} +.fa-codepen:before { + content: "\f1cb"; +} +.fa-jsfiddle:before { + content: "\f1cc"; +} +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} +.fa-circle-o-notch:before { + content: "\f1ce"; +} +.fa-ra:before, +.fa-rebel:before { + content: "\f1d0"; +} +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} +.fa-git-square:before { + content: "\f1d2"; +} +.fa-git:before { + content: "\f1d3"; +} +.fa-hacker-news:before { + content: "\f1d4"; +} +.fa-tencent-weibo:before { + content: "\f1d5"; +} +.fa-qq:before { + content: "\f1d6"; +} +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} +.fa-history:before { + content: "\f1da"; +} +.fa-genderless:before, +.fa-circle-thin:before { + content: "\f1db"; +} +.fa-header:before { + content: "\f1dc"; +} +.fa-paragraph:before { + content: "\f1dd"; +} +.fa-sliders:before { + content: "\f1de"; +} +.fa-share-alt:before { + content: "\f1e0"; +} +.fa-share-alt-square:before { + content: "\f1e1"; +} +.fa-bomb:before { + content: "\f1e2"; +} +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} +.fa-tty:before { + content: "\f1e4"; +} +.fa-binoculars:before { + content: "\f1e5"; +} +.fa-plug:before { + content: "\f1e6"; +} +.fa-slideshare:before { + content: "\f1e7"; +} +.fa-twitch:before { + content: "\f1e8"; +} +.fa-yelp:before { + content: "\f1e9"; +} +.fa-newspaper-o:before { + content: "\f1ea"; +} +.fa-wifi:before { + content: "\f1eb"; +} +.fa-calculator:before { + content: "\f1ec"; +} +.fa-paypal:before { + content: "\f1ed"; +} +.fa-google-wallet:before { + content: "\f1ee"; +} +.fa-cc-visa:before { + content: "\f1f0"; +} +.fa-cc-mastercard:before { + content: "\f1f1"; +} +.fa-cc-discover:before { + content: "\f1f2"; +} +.fa-cc-amex:before { + content: "\f1f3"; +} +.fa-cc-paypal:before { + content: "\f1f4"; +} +.fa-cc-stripe:before { + content: "\f1f5"; +} +.fa-bell-slash:before { + content: "\f1f6"; +} +.fa-bell-slash-o:before { + content: "\f1f7"; +} +.fa-trash:before { + content: "\f1f8"; +} +.fa-copyright:before { + content: "\f1f9"; +} +.fa-at:before { + content: "\f1fa"; +} +.fa-eyedropper:before { + content: "\f1fb"; +} +.fa-paint-brush:before { + content: "\f1fc"; +} +.fa-birthday-cake:before { + content: "\f1fd"; +} +.fa-area-chart:before { + content: "\f1fe"; +} +.fa-pie-chart:before { + content: "\f200"; +} +.fa-line-chart:before { + content: "\f201"; +} +.fa-lastfm:before { + content: "\f202"; +} +.fa-lastfm-square:before { + content: "\f203"; +} +.fa-toggle-off:before { + content: "\f204"; +} +.fa-toggle-on:before { + content: "\f205"; +} +.fa-bicycle:before { + content: "\f206"; +} +.fa-bus:before { + content: "\f207"; +} +.fa-ioxhost:before { + content: "\f208"; +} +.fa-angellist:before { + content: "\f209"; +} +.fa-cc:before { + content: "\f20a"; +} +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} +.fa-meanpath:before { + content: "\f20c"; +} +.fa-buysellads:before { + content: "\f20d"; +} +.fa-connectdevelop:before { + content: "\f20e"; +} +.fa-dashcube:before { + content: "\f210"; +} +.fa-forumbee:before { + content: "\f211"; +} +.fa-leanpub:before { + content: "\f212"; +} +.fa-sellsy:before { + content: "\f213"; +} +.fa-shirtsinbulk:before { + content: "\f214"; +} +.fa-simplybuilt:before { + content: "\f215"; +} +.fa-skyatlas:before { + content: "\f216"; +} +.fa-cart-plus:before { + content: "\f217"; +} +.fa-cart-arrow-down:before { + content: "\f218"; +} +.fa-diamond:before { + content: "\f219"; +} +.fa-ship:before { + content: "\f21a"; +} +.fa-user-secret:before { + content: "\f21b"; +} +.fa-motorcycle:before { + content: "\f21c"; +} +.fa-street-view:before { + content: "\f21d"; +} +.fa-heartbeat:before { + content: "\f21e"; +} +.fa-venus:before { + content: "\f221"; +} +.fa-mars:before { + content: "\f222"; +} +.fa-mercury:before { + content: "\f223"; +} +.fa-transgender:before { + content: "\f224"; +} +.fa-transgender-alt:before { + content: "\f225"; +} +.fa-venus-double:before { + content: "\f226"; +} +.fa-mars-double:before { + content: "\f227"; +} +.fa-venus-mars:before { + content: "\f228"; +} +.fa-mars-stroke:before { + content: "\f229"; +} +.fa-mars-stroke-v:before { + content: "\f22a"; +} +.fa-mars-stroke-h:before { + content: "\f22b"; +} +.fa-neuter:before { + content: "\f22c"; +} +.fa-facebook-official:before { + content: "\f230"; +} +.fa-pinterest-p:before { + content: "\f231"; +} +.fa-whatsapp:before { + content: "\f232"; +} +.fa-server:before { + content: "\f233"; +} +.fa-user-plus:before { + content: "\f234"; +} +.fa-user-times:before { + content: "\f235"; +} +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} +.fa-viacoin:before { + content: "\f237"; +} +.fa-train:before { + content: "\f238"; +} +.fa-subway:before { + content: "\f239"; +} +.fa-medium:before { + content: "\f23a"; +} diff --git a/node_modules/jibo-sdk/styles/fonts/fontawesome-webfont.woff2 b/node_modules/jibo-sdk/styles/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..3311d58 Binary files /dev/null and b/node_modules/jibo-sdk/styles/fonts/fontawesome-webfont.woff2 differ diff --git a/node_modules/jibo-sdk/styles/index.less b/node_modules/jibo-sdk/styles/index.less new file mode 100644 index 0000000..2925aad --- /dev/null +++ b/node_modules/jibo-sdk/styles/index.less @@ -0,0 +1,483 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +.color-picker, +.color-picker *, +.cp-saturation-spectrum, +.cp-saturation-spectrum *, +.cp-hue-spectrum, +.cp-hue-spectrum * { + box-sizing: border-box; +} +.cp-saturation-spectrum, +.cp-hue-spectrum { + position: relative; + display: inline-block; +} +.cp-saturation-white, +.cp-saturation-black { + position: relative; + width: 100%; + height: 100%; +} +.cp-saturation-white { + background: linear-gradient(to right, #fff, rgba(204,154,129,0)); +} +.cp-saturation-black { + background: linear-gradient(to top, #000, rgba(204,154,129,0)); +} +.cp-saturation-spectrum { + cursor: pointer; +} +.cp-saturation-spectrum .cp-saturation-drag { + display: none; + border: 1px solid #fff; + border-radius: 10px; + position: absolute; + top: 0px; + left: 0px; +} +.cp-saturation-spectrum .cp-saturation-drag .inner { + position: relative; + width: 100%; + height: 100%; + border: 1px solid #000; + border-radius: 10px; +} +.cp-hue-spectrum { + background: linear-gradient(to bottom, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); + cursor: pointer; +} +.cp-hue-spectrum .cp-hue-drag { + display: none; + position: absolute; + top: 0px; + left: 0px; + width: 100%; + border: 1px solid #000; +} diff --git a/node_modules/jibo-sdk/styles/jibo-rule-linter.less b/node_modules/jibo-sdk/styles/jibo-rule-linter.less new file mode 100644 index 0000000..261e888 --- /dev/null +++ b/node_modules/jibo-sdk/styles/jibo-rule-linter.less @@ -0,0 +1,33 @@ +@import "ui-variables"; + +atom-text-editor.editor { + .gutter .line-number { + &.jibo-line-number-red { + color: @text-color-error; + font-weight: bold; + } + } + + .jibo-highlight-red .region { + background-color: @text-color-error; + } +} + +.rule-panel { + height: 100%; + width: 480px; +} + +.rule-panel .json-container { + display: block; + position: absolute; + height: auto; + bottom: 0; + top: 0; + right: 0; + left: 0; + margin-top: 125px; + margin-bottom: 26px; + margin-right: 10px; + margin-left: 10px; +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/styles/layout.less b/node_modules/jibo-sdk/styles/layout.less new file mode 100644 index 0000000..9b62acf --- /dev/null +++ b/node_modules/jibo-sdk/styles/layout.less @@ -0,0 +1,38 @@ +.layout { + width: 100%; + height: 100%; + white-space: nowrap; +} + +.layout div { + -moz-user-select: -moz-none; + -webkit-user-select: none; + user-select: none; +} + +.h-layout { + width: 100%; + height: 100%; + white-space: nowrap; + display: inline-flex; +} + + +.h-child-container { + width: 100%; + height: 100%; + float: left; +} + +.v-child-container { + width: 100%; + height: 100%; +} + +.layout-handle { + margin: auto; +} + +.layout-handle:hover { + background-color: #999999; +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/styles/main.less b/node_modules/jibo-sdk/styles/main.less new file mode 100644 index 0000000..b2db17e --- /dev/null +++ b/node_modules/jibo-sdk/styles/main.less @@ -0,0 +1,21 @@ +@import "ui-variables"; + +.modal-background { + background-color: @base-background-color; +} + +.fill { + display: flex; + flex-direction: column; + justify-content: center; +} + +.fill > div { + /* these are the flex items */ + flex-grow: 1; +} + +.bodyRenderer { + width: 800; + height: 600; +} diff --git a/node_modules/jibo-sdk/styles/mim-editor.less b/node_modules/jibo-sdk/styles/mim-editor.less new file mode 100644 index 0000000..5aa07e8 --- /dev/null +++ b/node_modules/jibo-sdk/styles/mim-editor.less @@ -0,0 +1,311 @@ +@import "ui-variables"; + +.mim-editor { + + overflow-x: auto; + + .mim-editor-frame { + display: flex; + width: 100%; + height: 100%; + flex-direction: row; + } + + .left-pane { + min-width: 300px; + max-width: 500px; + height: 100%; + flex: 1; + margin-right: 5px; + } + + .right-pane { + min-width: 570px; + height: 100%; + flex: 1; + border: none; + margin-left: 5px; + } + + .mim-title { + font-size: 1.6em; + -webkit-user-select: none; + margin-top: 10px; + width: 100%; + display:table; + } + + .mim-title > div { + display: table-cell; + } + + .mim-title .setting-title { + padding-left: 10px; + width: 160px; + } + + .mim-title > .mim-id { + font-style: italic; + } + + .mim-setting { + margin-bottom: 4px; + } + + .mim-setting > div { + width: 100%; + display:flex; + flex-direction: row; + } + + .mim-setting > div > div { + display: inline-block; + } + + .mim-setting .setting-title { + font-size: 1.2em; + -webkit-user-select: none; + //vertical-align: middle; + padding-top: 4px; + width: 160px; + } + + .mim-setting .option { + flex: 1; + } + + .mim-gui-option { + > div, .checkbox { + display: inline-block; + } + } + + .prompt-pane-container { + display: table; + height: 100%; + width: 100%; + } + + .prompt-list-header { + display: table-row; + margin-bottom: 5px; + } + + .prompt-list-outer { + display: table-row; + height: 100%; + } + + .prompt-list-inner { + height: 100%; + position: relative; + } + + .prompt-list { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow-y: scroll; + overflow-x: hidden; + } + + .prompt-list-title { + font-size: 1.2em; + -webkit-user-select: none; + vertical-align: middle; + display: inline; + margin-right: 20px; + } + + .mim-prompt { + border-style: solid; + border-width: 1px; + border-color: #666666; + margin-top: 2px; + margin-bottom: 2px; + padding-left: 8px; + display: block; + } + + .mim-prompt .row { + width: 100%; + display: flex; + flex-direction: row; + } + + .mim-prompt .row .mim-setting { + flex: 1; + //min-width: 285px; + } + + .mim-prompt .row .delete-button-wrapper { + margin-left: 10px; + margin-right: 10px; + } + + .mim-prompt .mim-setting .setting-title:not(.short) { + width: 145px; + } + .mim-prompt .mim-setting .setting-title.short { + width: 60px; + margin-left: 20px; + } + + .hidden-block-setting { + visibility: hidden; + pointer-events: none; + } + + .hidden-setting { + display: none; + } + + .disabled-setting { + opacity: 0.4; + } + + .mim-type-announcement { + .needs-mim-type:not(.works-with-type-AN):not(.mim-prompt) { + .hidden-setting; + } + .needs-mim-type:not(.works-with-type-AN).mim-prompt { + .disabled-setting; + } + } + + .mim-type-optional-response { + .needs-mim-type:not(.works-with-type-OR):not(.mim-prompt) { + .hidden-setting; + } + .needs-mim-type:not(.works-with-type-OR).mim-prompt { + .disabled-setting; + } + } + + .mim-type-question { + .needs-mim-type:not(.works-with-type-Q):not(.mim-prompt) { + .hidden-setting; + } + .needs-mim-type:not(.works-with-type-Q).mim-prompt { + .disabled-setting; + } + } + + .mim-prompt:not(.prompt-type-Errors) .prompt-cat-error-only { + .hidden-block-setting; + } +} + +.mim-menu-modal { + width: 900px; + height: 600px; + margin-left: -150px; + background-color: @input-background-color; + border: solid @base-border-color 1px; + .panel-heading { + height: 35px; + } + + .contents { + border: solid @base-border-color 1px; + display: flex; + flex-direction: column; + height: 450px; + margin: 10px; + + .list-header { + display: flex; + width: 100%; + padding: 5px; + background-color: @tree-view-background-color; + .list-title { + vertical-align: middle; + width: 75px; + } + } + + .list-outer { + //display: table-row; + //height: 100%; + flex-grow: 1; + + .list-inner { + height: 100%; + //position: relative; + + .list { + display: block; + //position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow-y: scroll; + overflow-x: hidden; + + .button-entry { + display: flex; + flex-direction: row; + + .delete-button-wrapper { + align-content: center; + background-color: @tree-view-background-color; + } + + .column { + flex-grow: 1; + padding: 2px; + border: solid @base-border-color 1px; + background-color: @tree-view-background-color; + + .option-title { + text-align: center; + } + } + } + } + } + } + } + + .btn-group { + margin-left: 10px; + } +} + +.color-modal { + width: 900px; + height: 600px; + margin-left: -150px; + background-color: @input-background-color; + border: solid @base-border-color 1px; + .panel-heading { + height: 35px; + } + + .contents { + border: solid @base-border-color 1px; + display: flex; + flex-direction: column; + height: 450px; + margin: 10px; + } + + .btn-group { + margin-left: 10px; + } +} + +.color-preview { + display:flex; + flex-direction: row; + justify-content: space-around; + + > div { + + display: inline-block; + } +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/styles/toolbar.less b/node_modules/jibo-sdk/styles/toolbar.less new file mode 100644 index 0000000..d73159b --- /dev/null +++ b/node_modules/jibo-sdk/styles/toolbar.less @@ -0,0 +1,28 @@ +@import "ui-variables"; +@import "ui-mixins"; + +.toolbar { + width: 100%; + height: 38px; + background-color: @app-background-color; + overflow-x: hidden; + overflow-y: hidden; + padding: 6px 0px; +} + +.comboBox { + background-color: @button-background-color; + border: 1px solid @button-border-color; + width: 30px; + height: 30px; +} + +.combo-box-list { + background-color: @base-background-color; + border: 1px solid @button-border-color; + position: absolute; + width: 300px; + top: 0px; + left: 100px; + z-index: 10000; +} diff --git a/node_modules/jibo-sdk/styles/tree-view.less b/node_modules/jibo-sdk/styles/tree-view.less new file mode 100644 index 0000000..d77d602 --- /dev/null +++ b/node_modules/jibo-sdk/styles/tree-view.less @@ -0,0 +1,158 @@ +@import "ui-variables"; + + +.behavior-tree-container { + display: flex; + flex-grow: 1; + overflow: hidden; +} + +.decorator-container { + display: flex; + width: 100%; + flex-grow: 0.2; + overflow: hidden; +} + +.tree-grid-view { + position: relative; + white-space: nowrap; + width: 100%; + min-height: 100%; + flex-grow: 1; + overflow: hidden; + background-color: @tree-view-background-color; + border: solid rgba(0, 0, 0, 0.5) 2px; +} + +.tree-grid-view .arguments-scroll-container { + height: 92%; + width: 99%; + margin-top: 5px; + position: absolute; + overflow-x: hidden; +} + +.tree-grid-view:focus .arguments-scroll-container { + outline: auto -webkit-focus-ring-color; +} + + +.tree-view-level { + position: relative; + width: 100%; +} + +.scroll-container { + width: 100%; + height: 100%; +} + +.scroll-content { + overflow-y: scroll; + overflow-x: hidden; + height: 95%; + width: 100%; + position: absolute; +} + +.row-wrapper { +// white-space: nowrap; + height: 26px; +} + +.row-wrapper:hover { + background-color: @background-color-highlight; +} + +.row-wrapper.row-wrapper-selected { + background-color: @background-color-selected; +} + +.drop-bar { +// background-color: #93c3cd; + height: 5px; + width: 100%; +} + +.arrow { + font-size: @font-size; + position: absolute; + color: @text-color; + padding-top: 3px; + font-size: large; +} + +.row-wrapper > .cell { + /*border-bottom: 0px solid #FFFFFF;*/ + /*border-top: 1px solid #FFFFFF;*/ + /*border-left: 1px solid #FFFFFF;*/ + /*border-right: 1px solid #FFFFFF;*/ + width: 200px; + height: 20px; + display: inline-block; + position: relative; + left: 0; +} + +.row-wrapper-header { + white-space: nowrap; + height: 30px; + width: 100%; + display: flex; +} + +.row-wrapper-header > .cell { + width: 200px; + height: 30px; + display: inline-table; + color: #aaaaaa; + text-shadow: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.6); + border-top: 1px solid rgba(255, 255, 255, 0.17); + background-color: transparent; + background-image: -webkit-linear-gradient(#43484d, #2b2f32); +} + +.row-wrapper-header > .cell > .separator { + width: 2px; + height: 100%; + resize: horizontal; + float: right; + cursor: ew-resize; + background-color: rgba(0, 0, 0, 0.5); +} + +.row-wrapper-header > .cell > .separator:hover { + background-color: #bbbbbb; +} + +.row-wrapper > div > p { + text-align: left; + font-size: 14px; + margin-left: 5px; + margin-top: auto; + margin-bottom: auto; + position: absolute; + font-family: @font-family; +// border-left: 2px; +// vertical-align: middle; + -webkit-user-select: none; + color: @text-color; +} +.row-wrapper > div > p.row-selected-text { + color: @text-color-highlight; +} + + +.row-wrapper-header > div > h1 { + text-align: left; + font-size: 15px; + line-height: 15px; + min-height: 15px; + margin: 0px; + margin-left: 5px; + position: absolute; + font-family: @font-family; + margin-top: 7px; +} \ No newline at end of file diff --git a/node_modules/jibo-sdk/styles/vis.less b/node_modules/jibo-sdk/styles/vis.less new file mode 100644 index 0000000..7f86694 --- /dev/null +++ b/node_modules/jibo-sdk/styles/vis.less @@ -0,0 +1,1248 @@ +.vis .adam-panel.modal { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + + /* Must be displayed above for example selected Timeline items */ + z-index: 10; +} + +.vis-active { + box-shadow: 0 0 10px #86d5f8; +} + +/* override some bootstrap styles screwing up the timelines css */ + +.vis [class*="span"] { + min-height: 0; + width: auto; +} + + +.vis-timeline { + position: relative; + border: 1px solid #bfbfbf; + + overflow: hidden; + padding: 0; + margin: 0; + + box-sizing: border-box; +} + + +.vis-panel { + position: absolute; + + padding: 0; + margin: 0; + + box-sizing: border-box; +} + +.vis-panel.vis-center, +.vis-panel.vis-left, +.vis-panel.vis-right, +.vis-panel.vis-top, +.vis-panel.vis-bottom { + border: 1px #bfbfbf; +} + +.vis-panel.vis-center, +.vis-panel.vis-left, +.vis-panel.vis-right { + border-top-style: solid; + border-bottom-style: solid; + overflow: hidden; +} + +.vis-panel.vis-center, +.vis-panel.vis-top, +.vis-panel.vis-bottom { + border-left-style: solid; + border-right-style: solid; +} + +.vis-background { + overflow: hidden; +} + +.vis-panel > .vis-content { + position: relative; +} + +.vis-panel .vis-shadow { + position: absolute; + width: 100%; + height: 1px; + box-shadow: 0 0 10px rgba(0,0,0,0.8); + /* TODO: find a nice way to ensure vis-shadows are drawn on top of items + z-index: 1; + */ +} + +.vis-panel .vis-shadow.vis-top { + top: -1px; + left: 0; +} + +.vis-panel .vis-shadow.vis-bottom { + bottom: -1px; + left: 0; +} + +.vis-labelset { + position: relative; + + overflow: hidden; + + box-sizing: border-box; +} + +.vis-labelset .vis-label { + position: relative; + left: 0; + top: 0; + width: 100%; + color: #4d4d4d; + + box-sizing: border-box; +} + +.vis-labelset .vis-label { + border-bottom: 1px solid #bfbfbf; +} + +.vis-labelset .vis-label:last-child { + border-bottom: none; +} + +.vis-labelset .vis-label .vis-inner { + display: inline-block; + padding: 5px; +} + +.vis-labelset .vis-label .vis-inner.vis-hidden { + padding: 0; +} + + +.vis-itemset { + position: relative; + padding: 0; + margin: 0; + + box-sizing: border-box; +} + +.vis-itemset .vis-background, +.vis-itemset .vis-foreground { + position: absolute; + width: 100%; + height: 100%; + overflow: visible; +} + +.vis-axis { + position: absolute; + width: 100%; + height: 0; + left: 0; + z-index: 1; +} + +.vis-foreground .vis-group { + position: relative; + box-sizing: border-box; + border-bottom: 1px solid #bfbfbf; +} + +.vis-foreground .vis-group:last-child { + border-bottom: none; +} + +.vis-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 10; +} + +.vis-item { + position: absolute; + color: #1A1A1A; + border-color: #97B0F8; + border-width: 1px; + background-color: #D5DDF6; + display: inline-block; + /*overflow: hidden;*/ +} + +.vis-item.vis-selected { + border-color: #FFC200; + background-color: #FFF785; + + /* z-index must be higher than the z-index of custom time bar and current time bar */ + z-index: 2; +} + +.vis-editable .vis-item.vis-selected { + cursor: move; +} + +.vis-item.vis-point.vis-selected { + background-color: #FFF785; +} + +.vis-item.vis-box { + text-align: center; + border-style: solid; + border-radius: 2px; +} + +.vis-item.vis-point { + background: none; +} + +.vis-item.vis-dot { + position: absolute; + padding: 0; + border-width: 4px; + border-style: solid; + border-radius: 4px; +} + +.vis-item.vis-range { + border-style: solid; + border-radius: 2px; + box-sizing: border-box; +} + +.vis-item.vis-background { + border: none; + background-color: rgba(213, 221, 246, 0.4); + box-sizing: border-box; + padding: 0; + margin: 0; +} + +.vis-item .vis-item-overflow { + position: relative; + width: 100%; + height: 100%; + padding: 0; + margin: 0; + overflow: hidden; +} + +.vis-item.vis-range .vis-item-content { + position: relative; + display: inline-block; +} + +.vis-item.vis-background .vis-item-content { + position: absolute; + display: inline-block; +} + +.vis-item.vis-line { + padding: 0; + position: absolute; + width: 0; + border-left-width: 1px; + border-left-style: solid; +} + +.vis-item .vis-item-content { + white-space: nowrap; + box-sizing: border-box; + padding: 5px; +} + +.vis-item .vis-delete { + background: url('img/timeline/delete.png') no-repeat center; + position: absolute; + width: 24px; + height: 24px; + top: -4px; + right: -24px; + cursor: pointer; +} + +.vis-item.vis-range .vis-drag-left { + position: absolute; + width: 24px; + max-width: 20%; + min-width: 2px; + height: 100%; + top: 0; + left: -4px; + + cursor: w-resize; +} + +.vis-item.vis-range .vis-drag-right { + position: absolute; + width: 24px; + max-width: 20%; + min-width: 2px; + height: 100%; + top: 0; + right: -4px; + + cursor: e-resize; +} + +.vis-time-axis { + position: relative; + overflow: hidden; +} + +.vis-time-axis.vis-foreground { + top: 0; + left: 0; + width: 100%; +} + +.vis-time-axis.vis-background { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.vis-time-axis .vis-text { + position: absolute; + color: #4d4d4d; + padding: 3px; + white-space: nowrap; +} + +.vis-time-axis .vis-text.vis-measure { + position: absolute; + padding-left: 0; + padding-right: 0; + margin-left: 0; + margin-right: 0; + visibility: hidden; +} + +.vis-time-axis .vis-grid.vis-vertical { + position: absolute; + border-left: 1px solid; +} + +.vis-time-axis .vis-grid.vis-minor { + border-color: #e5e5e5; +} + +.vis-time-axis .vis-grid.vis-major { + border-color: #bfbfbf; +} + +.vis-current-time { + background-color: #FF7F6E; + width: 2px; + z-index: 1; +} +.vis-custom-time { + background-color: #6E94FF; + width: 2px; + cursor: move; + z-index: 1; +} +.vis-timeline { + /* + -webkit-transition: height .4s ease-in-out; + transition: height .4s ease-in-out; + */ +} + +.vis-panel { + /* + -webkit-transition: height .4s ease-in-out, top .4s ease-in-out; + transition: height .4s ease-in-out, top .4s ease-in-out; + */ +} + +.vis-axis { + /* + -webkit-transition: top .4s ease-in-out; + transition: top .4s ease-in-out; + */ +} + +/* TODO: get animation working nicely + +.vis-item { + -webkit-transition: top .4s ease-in-out; + transition: top .4s ease-in-out; +} + +.vis-item.line { + -webkit-transition: height .4s ease-in-out, top .4s ease-in-out; + transition: height .4s ease-in-out, top .4s ease-in-out; +} +/**/ + +.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal { + position: absolute; + width: 100%; + height: 0; + border-bottom: 1px solid; +} + +.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor { + border-color: #e5e5e5; +} + +.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major { + border-color: #bfbfbf; +} + + +.vis-data-axis .vis-y-axis.vis-major { + width: 100%; + position: absolute; + color: #4d4d4d; + white-space: nowrap; +} + +.vis-data-axis .vis-y-axis.vis-major.vis-measure { + padding: 0; + margin: 0; + border: 0; + visibility: hidden; + width: auto; +} + + +.vis-data-axis .vis-y-axis.vis-minor { + position: absolute; + width: 100%; + color: #bebebe; + white-space: nowrap; +} + +.vis-data-axis .vis-y-axis.vis-minor.vis-measure { + padding: 0; + margin: 0; + border: 0; + visibility: hidden; + width: auto; +} + +.vis-data-axis .vis-y-axis.vis-title { + position: absolute; + color: #4d4d4d; + white-space: nowrap; + bottom: 20px; + text-align: center; +} + +.vis-data-axis .vis-y-axis.vis-title.vis-measure { + padding: 0; + margin: 0; + visibility: hidden; + width: auto; +} + +.vis-data-axis .vis-y-axis.vis-title.vis-left { + bottom: 0; + -webkit-transform-origin: left top; + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -o-transform-origin: left top; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + transform: rotate(-90deg); +} + +.vis-data-axis .vis-y-axis.vis-title.vis-right { + bottom: 0; + -webkit-transform-origin: right bottom; + -moz-transform-origin: right bottom; + -ms-transform-origin: right bottom; + -o-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); +} + +.vis-legend { + background-color: rgba(247, 252, 255, 0.65); + padding: 5px; + border: 1px solid #b3b3b3; + box-shadow: 2px 2px 10px rgba(154, 154, 154, 0.55); +} + +.vis-legend-text { + /*font-size: 10px;*/ + white-space: nowrap; + display: inline-block +} +.vis-graph-group0 { + fill:#4f81bd; + fill-opacity:0; + stroke-width:2px; + stroke: #4f81bd; +} + +.vis-graph-group1 { + fill:#f79646; + fill-opacity:0; + stroke-width:2px; + stroke: #f79646; +} + +.vis-graph-group2 { + fill: #8c51cf; + fill-opacity:0; + stroke-width:2px; + stroke: #8c51cf; +} + +.vis-graph-group3 { + fill: #75c841; + fill-opacity:0; + stroke-width:2px; + stroke: #75c841; +} + +.vis-graph-group4 { + fill: #ff0100; + fill-opacity:0; + stroke-width:2px; + stroke: #ff0100; +} + +.vis-graph-group5 { + fill: #37d8e6; + fill-opacity:0; + stroke-width:2px; + stroke: #37d8e6; +} + +.vis-graph-group6 { + fill: #042662; + fill-opacity:0; + stroke-width:2px; + stroke: #042662; +} + +.vis-graph-group7 { + fill:#00ff26; + fill-opacity:0; + stroke-width:2px; + stroke: #00ff26; +} + +.vis-graph-group8 { + fill:#ff00ff; + fill-opacity:0; + stroke-width:2px; + stroke: #ff00ff; +} + +.vis-graph-group9 { + fill: #8f3938; + fill-opacity:0; + stroke-width:2px; + stroke: #8f3938; +} + +.vis-timeline .vis-fill { + fill-opacity:0.1; + stroke: none; +} + + +.vis-timeline .vis-bar { + fill-opacity:0.5; + stroke-width:1px; +} + +.vis-timeline .vis-point { + stroke-width:2px; + fill-opacity:1.0; +} + + +.vis-timeline .vis-legend-background { + stroke-width:1px; + fill-opacity:0.9; + fill: #ffffff; + stroke: #c2c2c2; +} + + +.vis-timeline .vis-outline { + stroke-width:1px; + fill-opacity:1; + fill: #ffffff; + stroke: #e5e5e5; +} + +.vis-timeline .vis-icon-fill { + fill-opacity:0.3; + stroke: none; +} + +div.vis-network div.vis-manipulation { + border-width: 0; + border-bottom: 1px; + border-style:solid; + border-color: #d6d9d8; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #fcfcfc 48%, #fafafa 50%, #fcfcfc 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(48%,#fcfcfc), color-stop(50%,#fafafa), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */ + + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 30px; +} + +div.vis-network div.vis-edit-mode { + position:absolute; + left: 0; + top: 15px; + height: 30px; +} + +/* FIXME: shouldn't the vis-close button be a child of the vis-manipulation div? */ + +div.vis-network div.vis-close { + position:absolute; + right: 0; + top: 0; + width: 30px; + height: 30px; + + background-position: 20px 3px; + background-repeat: no-repeat; + background-image: url("img/network/cross.png"); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.vis-network div.vis-close:hover { + opacity: 0.6; +} + +div.vis-network div.vis-manipulation div.vis-button, +div.vis-network div.vis-edit-mode div.vis-button { + position:relative; + top:-7px; + font-family: verdana; + font-size: 12px; + -moz-border-radius: 15px; + border-radius: 15px; + display:inline-block; + background-position: 0px 0px; + background-repeat:no-repeat; + height:24px; + margin: 0px 0px 0px 10px; + vertical-align:middle; + cursor: pointer; + padding: 0px 8px 0px 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.vis-network div.vis-manipulation div.vis-button:hover { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.20); +} + +div.vis-network div.vis-manipulation div.vis-button:active { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.50); +} + +div.vis-network div.vis-manipulation div.vis-button.vis-back { + background-image: url("img/network/backIcon.png"); +} + +div.vis-network div.vis-manipulation div.vis-button.vis-none:hover { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0); + cursor: default; +} +div.vis-network div.vis-manipulation div.vis-button.vis-none:active { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0); +} +div.vis-network div.vis-manipulation div.vis-button.vis-none { + padding: 0; +} +div.vis-network div.vis-manipulation div.notification { + margin: 2px; + font-weight: bold; +} + +div.vis-network div.vis-manipulation div.vis-button.vis-add { + background-image: url("img/network/addNodeIcon.png"); +} + +div.vis-network div.vis-manipulation div.vis-button.vis-edit, +div.vis-network div.vis-edit-mode div.vis-button.vis-edit { + background-image: url("img/network/editIcon.png"); +} + +div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode { + background-color: #fcfcfc; + border: 1px solid #cccccc; +} + +div.vis-network div.vis-manipulation div.vis-button.vis-connect { + background-image: url("img/network/connectIcon.png"); +} + +div.vis-network div.vis-manipulation div.vis-button.vis-delete { + background-image: url("img/network/deleteIcon.png"); +} +/* top right bottom left */ +div.vis-network div.vis-manipulation div.vis-label, +div.vis-network div.vis-edit-mode div.vis-label { + margin: 0 0 0 23px; + line-height: 25px; +} +div.vis-network div.vis-manipulation div.vis-separator-line { + display:inline-block; + width:1px; + height:20px; + background-color: #bdbdbd; + margin: 5px 7px 0 15px; +} + +/* TODO: is this redundant? +div.network-navigation_wrapper { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; +} +*/ +div.vis-network div.vis-navigation div.vis-button { + width:34px; + height:34px; + -moz-border-radius: 17px; + border-radius: 17px; + position:absolute; + display:inline-block; + background-position: 2px 2px; + background-repeat:no-repeat; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.vis-network div.vis-navigation div.vis-button:hover { + box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30); +} + +div.vis-network div.vis-navigation div.vis-button:active { + box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95); +} + +div.vis-network div.vis-navigation div.vis-button.vis-up { + background-image: url("img/network/upArrow.png"); + bottom:50px; + left:55px; +} +div.vis-network div.vis-navigation div.vis-button.vis-down { + background-image: url("img/network/downArrow.png"); + bottom:10px; + left:55px; +} +div.vis-network div.vis-navigation div.vis-button.vis-left { + background-image: url("img/network/leftArrow.png"); + bottom:10px; + left:15px; +} +div.vis-network div.vis-navigation div.vis-button.vis-right { + background-image: url("img/network/rightArrow.png"); + bottom:10px; + left:95px; +} +div.vis-network div.vis-navigation div.vis-button.vis-zoomIn { + background-image: url("img/network/plus.png"); + bottom:10px; + right:15px; +} +div.vis-network div.vis-navigation div.vis-button.vis-zoomOut { + background-image: url("img/network/minus.png"); + bottom:10px; + right:55px; +} +div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends { + background-image: url("img/network/zoomExtends.png"); + bottom:50px; + right:15px; +} +div.vis-network-tooltip { + position: absolute; + visibility: hidden; + padding: 5px; + white-space: nowrap; + + font-family: verdana; + font-size:14px; + font-color:#000000; + background-color: #f5f4ed; + + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + border: 1px solid #808074; + + box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); + pointer-events: none; +} +div.vis-network-configuration { + position:relative; + display:block; + float:left; + font-size:12px; +} + +div.vis-network-configuration-wrapper { + display:block; + width:700px; +} + + +div.vis-network-configuration.vis-option-container{ + display:block; + width:495px; + background-color: #ffffff; + border:2px solid #f7f8fa; + border-radius:4px; + margin-top:20px; + left:10px; + padding-left:5px; +} + +div.vis-network-configuration.button{ + display:block; + width:495px; + height:25px; + vertical-align: middle; + line-height:25px; + background-color: #f7f8fa; + border:2px solid #ceced0; + border-radius:4px; + margin-top:20px; + left:10px; + padding-left:5px; + cursor: pointer; + margin-bottom:30px; +} + +div.vis-network-configuration.button.hover{ + background-color: #4588e6; + border:2px solid #214373; + color:#ffffff; +} + +div.vis-network-configuration.item{ + display:block; + float:left; + width:495px; + height:25px; + vertical-align: middle; + line-height:25px; +} + + +div.vis-network-configuration.item.s2{ + left:10px; + background-color: #f7f8fa; + padding-left:5px; + border-radius:3px; +} +div.vis-network-configuration.item.s3{ + left:20px; + background-color: #e4e9f0; + padding-left:5px; + border-radius:3px; +} +div.vis-network-configuration.item.s4{ + left:30px; + background-color: #cfd8e6; + padding-left:5px; + border-radius:3px; +} + +div.vis-network-configuration.header{ + font-size:18px; + font-weight: bold; +} + +div.vis-network-configuration.label{ + width:120px; + height:25px; + line-height: 25px; +} + +div.vis-network-configuration.label.s3{ + width:110px; +} +div.vis-network-configuration.label.s4{ + width:100px; +} + +div.vis-network-configuration.colorBlock{ + top:1px; + width:30px; + height:19px; + border:1px solid #444444; + border-radius:2px; + padding:0px; + margin:0px; + cursor:pointer; +} + +input.vis-network-configuration.checkbox { + left:-5px; +} + + +input.vis-network-configuration.rangeinput{ + position:relative; + top:-5px; + width:60px; + height:13px; + padding:1px; + margin:0; + pointer-events:none; +} + +input.vis-network-configuration.range{ + /*removes default webkit styles*/ + -webkit-appearance: none; + + /*fix for FF unable to apply focus style bug */ + border: 0px solid white; + background-color:rgba(0,0,0,0); + + /*required for proper track sizing in FF*/ + width: 300px; + height:20px; +} +input.vis-network-configuration.range::-webkit-slider-runnable-track { + width: 300px; + height: 5px; + background: #dedede; /* Old browsers */ + background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */ + background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ + + border: 1px solid #999999; + box-shadow: #aaaaaa 0px 0px 3px 0px; + border-radius: 3px; +} +input.vis-network-configuration.range::-webkit-slider-thumb { + -webkit-appearance: none; + border: 1px solid #14334b; + height: 17px; + width: 17px; + border-radius: 50%; + background: #3876c2; /* Old browsers */ + background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */ + background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */ + box-shadow: #111927 0px 0px 1px 0px; + margin-top: -7px; +} +input.vis-network-configuration.range:focus { + outline: none; +} +input.vis-network-configuration.range:focus::-webkit-slider-runnable-track { + background: #9d9d9d; /* Old browsers */ + background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */ + background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ +} + +input.vis-network-configuration.range::-moz-range-track { + width: 300px; + height: 10px; + background: #dedede; /* Old browsers */ + background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */ + background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */ + + border: 1px solid #999999; + box-shadow: #aaaaaa 0px 0px 3px 0px; + border-radius: 3px; +} +input.vis-network-configuration.range::-moz-range-thumb { + border: none; + height: 16px; + width: 16px; + + border-radius: 50%; + background: #385380; +} + +/*hide the outline behind the border*/ +input.vis-network-configuration.range:-moz-focusring{ + outline: 1px solid white; + outline-offset: -1px; +} + +input.vis-network-configuration.range::-ms-track { + width: 300px; + height: 5px; + + /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */ + background: transparent; + + /*leave room for the larger thumb to overflow with a transparent border */ + border-color: transparent; + border-width: 6px 0; + + /*remove default tick marks*/ + color: transparent; +} +input.vis-network-configuration.range::-ms-fill-lower { + background: #777; + border-radius: 10px; +} +input.vis-network-configuration.range::-ms-fill-upper { + background: #ddd; + border-radius: 10px; +} +input.vis-network-configuration.range::-ms-thumb { + border: none; + height: 16px; + width: 16px; + border-radius: 50%; + background: #385380; +} +input.vis-network-configuration.range:focus::-ms-fill-lower { + background: #888; +} +input.vis-network-configuration.range:focus::-ms-fill-upper { + background: #ccc; +} + +div.vis-color-picker { + position:absolute; + margin-top:-140px; + margin-left:30px; + width:293px; + height:425px; + padding: 10px; + border-radius:15px; + background-color:#ffffff; + display:none; + box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px; +} + +div.vis-color-picker div.vis-arrow { + position: absolute; + top:147px; + left:5px; +} + +div.vis-color-picker div.vis-arrow:after, +div.vis-color-picker div.vis-arrow:before { + right: 100%; + top: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} + +div.vis-color-picker div.vis-arrow:after { + border-color: rgba(255, 255, 255, 0); + border-right-color: #ffffff; + border-width: 30px; + margin-top: -30px; +} + +div.vis-color-picker div.vis-color { + position:absolute; + width: 289px; + height: 289px; + cursor: pointer; +} + + + +div.vis-color-picker div.vis-brightness { + position: absolute; + top:313px; +} + +div.vis-color-picker div.vis-opacity { + position:absolute; + top:350px; +} + +div.vis-color-picker div.vis-selector { + position:absolute; + top:137px; + left:137px; + width:15px; + height:15px; + border-radius:15px; + border:1px solid #ffffff; + background: #4c4c4c; /* Old browsers */ + background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */ + background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */ +} + + + +div.vis-color-picker div.vis-new-color { + position:absolute; + width:140px; + height:20px; + border:1px solid rgba(0,0,0,0.1); + border-radius:5px; + top:380px; + left:159px; + text-align:right; + padding-right:2px; + font-size:10px; + color:rgba(0,0,0,0.4); + vertical-align:middle; + line-height:20px; + +} + +div.vis-color-picker div.vis-initial-color { + position:absolute; + width:140px; + height:20px; + border:1px solid rgba(0,0,0,0.1); + border-radius:5px; + top:380px; + left:10px; + text-align:left; + padding-left:2px; + font-size:10px; + color:rgba(0,0,0,0.4); + vertical-align:middle; + line-height:20px; +} + +div.vis-color-picker div.vis-label { + position:absolute; + width:300px; + left:10px; +} + +div.vis-color-picker div.vis-label.vis-brightness { + top:300px; +} + +div.vis-color-picker div.vis-label.vis-opacity { + top:338px; +} + +div.vis-color-picker div.vis-button { + position:absolute; + width:68px; + height:25px; + border-radius:10px; + vertical-align: middle; + text-align:center; + line-height: 25px; + top:410px; + border:2px solid #d9d9d9; + background-color: #f7f7f7; + cursor:pointer; +} + +div.vis-color-picker div.vis-button.vis-cancel { + /*border:2px solid #ff4e33;*/ + /*background-color: #ff7761;*/ + left:5px; +} +div.vis-color-picker div.vis-button.vis-load { + /*border:2px solid #a153e6;*/ + /*background-color: #cb8dff;*/ + left:82px; +} +div.vis-color-picker div.vis-button.vis-apply { + /*border:2px solid #4588e6;*/ + /*background-color: #82b6ff;*/ + left:159px; +} +div.vis-color-picker div.vis-button.vis-save { + /*border:2px solid #45e655;*/ + /*background-color: #6dff7c;*/ + left:236px; +} + + +div.vis-color-picker input.vis-range { + width: 290px; + height:20px; +} + +/* TODO: is this redundant? +div.vis-color-picker input.vis-range-brightness { + width: 289px !important; +} + + +div.vis-color-picker input.vis-saturation-range { + width: 289px !important; +}*/ diff --git a/node_modules/npm/lib/utils/lifecycle.js b/node_modules/npm/lib/utils/lifecycle.js index a1b8ebc..61c23b9 100644 --- a/node_modules/npm/lib/utils/lifecycle.js +++ b/node_modules/npm/lib/utils/lifecycle.js @@ -51,7 +51,7 @@ function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { var env = makeEnv(pkg) env.npm_lifecycle_event = stage env.npm_node_execpath = env.NODE = env.NODE || process.execPath - env.npm_execpath = require.main.filename + env.npm_execpath = (require.main && require.main.filename) || process.execPath // "nobody" typically doesn't have permission to write to /tmp // even if it's never used, sh freaks out. diff --git a/node_modules/remote/index.js b/node_modules/remote/index.js new file mode 100644 index 0000000..b2348c1 --- /dev/null +++ b/node_modules/remote/index.js @@ -0,0 +1,243 @@ +"use strict"; + +// Compatibility shim for legacy Atom packages that do `require('remote')`. +// +// Old Electron exposed the `remote` module and Atom packages frequently used: +// const remote = require('remote') +// const dialog = remote.dialog || remote.require('dialog') +// +// Newer Electron removed `remote` by default. Pulsar may provide @electron/remote +// or alternative dialog helpers via Atom's application delegate. + +function getElectron() { + try { + // Available in renderer. + return require("electron"); + } catch (_) { + return null; + } +} + +function getRemote() { + const electron = getElectron(); + if (electron && electron.remote) return electron.remote; + try { + // Some apps (incl. Pulsar/Atom forks) ship this. + return require("@electron/remote"); + } catch (_) { + return null; + } +} + +function getAtomDialogDelegate() { + try { + if (typeof atom !== "undefined" && atom && atom.applicationDelegate) { + return atom.applicationDelegate; + } + } catch (_) { + // ignore + } + return null; +} + +function toOldCallback(result, callback) { + // Electron >= 7 showSaveDialog returns { canceled, filePath } + if (!callback) return; + if (!result || result.canceled) return callback(undefined); + return callback(result.filePath); +} + +function wrapDialog(dialog) { + if (!dialog) return null; + + // Ensure callback-style APIs exist. + if (typeof dialog.showSaveDialog === "function") { + const original = dialog.showSaveDialog.bind(dialog); + dialog.showSaveDialog = function showSaveDialogCompat(browserWindow, options, callback) { + // Legacy call pattern: (win, options, cb) + if (typeof options === "function") { + callback = options; + options = browserWindow; + browserWindow = undefined; + } + + try { + const maybePromise = original(browserWindow, options); + if (maybePromise && typeof maybePromise.then === "function") { + return maybePromise.then((res) => { + toOldCallback(res, callback); + return res; + }); + } + // Some older implementations support the callback directly. + if (typeof callback === "function") return original(browserWindow, options, callback); + return maybePromise; + } catch (err) { + if (typeof callback === "function") return callback(undefined); + throw err; + } + }; + } + + if (typeof dialog.showMessageBox === "function") { + const original = dialog.showMessageBox.bind(dialog); + dialog.showMessageBox = function showMessageBoxCompat(browserWindow, options, callback) { + if (typeof options === "function") { + callback = options; + options = browserWindow; + browserWindow = undefined; + } + + // Legacy Atom/Electron usage sometimes expects a *synchronous* numeric response. + // Prefer sync primitives when no callback is provided. + if (typeof callback !== "function") { + try { + if (typeof dialog.showMessageBoxSync === "function") { + return dialog.showMessageBoxSync(browserWindow, options); + } + if (typeof atom !== "undefined" && atom && typeof atom.confirm === "function") { + return atom.confirm({ + message: (options && (options.title || options.message)) || "", + detailedMessage: options && options.title && options.message ? options.message : undefined, + buttons: (options && options.buttons) || ["OK"], + }); + } + } catch (_) { + // Fall through to async implementation. + } + } + try { + const maybePromise = original(browserWindow, options); + if (maybePromise && typeof maybePromise.then === "function") { + return maybePromise.then((res) => { + if (typeof callback === "function") { + // Electron returns { response, checkboxChecked } + callback(res && typeof res.response === "number" ? res.response : res); + } + return res; + }); + } + if (typeof callback === "function") return original(browserWindow, options, callback); + return maybePromise; + } catch (err) { + if (typeof callback === "function") return callback(0); + throw err; + } + }; + } + + return dialog; +} + +const remote = getRemote(); +const electron = getElectron(); + +let dialog = null; +if (remote && remote.dialog) dialog = remote.dialog; +else if (electron && electron.dialog) dialog = electron.dialog; + +const atomDelegate = getAtomDialogDelegate(); +if (!dialog && atomDelegate) { + // Atom/Pulsar delegate methods are typically Promise-based. + dialog = { + showSaveDialog(browserWindow, options, callback) { + try { + const p = atomDelegate.showSaveDialog ? atomDelegate.showSaveDialog(options) : null; + if (p && typeof p.then === "function") { + return p.then((filePath) => { + if (typeof callback === "function") callback(filePath); + return { canceled: !filePath, filePath }; + }); + } + if (typeof callback === "function") callback(undefined); + return { canceled: true, filePath: undefined }; + } catch (err) { + if (typeof callback === "function") callback(undefined); + return { canceled: true, filePath: undefined }; + } + }, + showMessageBox(browserWindow, options, callback) { + try { + const p = atomDelegate.showMessageBox ? atomDelegate.showMessageBox(options) : null; + if (p && typeof p.then === "function") { + return p.then((response) => { + if (typeof callback === "function") callback(response); + return { response }; + }); + } + if (typeof callback === "function") callback(0); + return { response: 0 }; + } catch (err) { + if (typeof callback === "function") callback(0); + return { response: 0 }; + } + }, + }; +} + +// Absolute last-resort fallback: avoid hard crashes if no dialog backend exists. +if (!dialog) { + dialog = { + showSaveDialog(browserWindow, options, callback) { + try { + if (atomDelegate && typeof atomDelegate.showSaveDialog === "function") { + const p = atomDelegate.showSaveDialog(options); + if (p && typeof p.then === "function") { + return p.then((filePath) => { + if (typeof callback === "function") callback(filePath); + return { canceled: !filePath, filePath }; + }); + } + } + } catch (_) { + // ignore + } + if (typeof callback === "function") callback(undefined); + return { canceled: true, filePath: undefined }; + }, + showMessageBox(browserWindow, options, callback) { + try { + if (typeof atom !== "undefined" && atom && typeof atom.confirm === "function") { + const response = atom.confirm({ + message: (options && (options.title || options.message)) || "", + detailedMessage: options && options.title && options.message ? options.message : undefined, + buttons: (options && options.buttons) || ["OK"], + }); + if (typeof callback === "function") callback(response); + return response; + } + } catch (_) { + // ignore + } + if (typeof callback === "function") callback(0); + return 0; + }, + }; +} + +dialog = wrapDialog(dialog); + +function remoteRequire(moduleName) { + if (remote && typeof remote.require === "function") return remote.require(moduleName); + if (moduleName === "dialog") return dialog; + // Best-effort: some old code asks for 'browser-window', etc. + if (electron) { + if (moduleName === "browser-window" || moduleName === "BrowserWindow") return electron.BrowserWindow; + if (moduleName === "app") return electron.app; + } + throw new Error("remote.require not available for: " + moduleName); +} + +module.exports = { + dialog, + require: remoteRequire, + getCurrentWindow: (remote && typeof remote.getCurrentWindow === "function") + ? remote.getCurrentWindow.bind(remote) + : function () { + try { + return typeof atom !== "undefined" && atom.getCurrentWindow ? atom.getCurrentWindow() : undefined; + } catch (_) { + return undefined; + } + }, +}; diff --git a/node_modules/remote/package.json b/node_modules/remote/package.json new file mode 100644 index 0000000..9452b00 --- /dev/null +++ b/node_modules/remote/package.json @@ -0,0 +1,6 @@ +{ + "name": "remote", + "version": "0.0.0-jibo-pulsar-shim", + "main": "index.js", + "private": true +}