From 4d1efd344d561e3ff3958ea07021871fd374e492 Mon Sep 17 00:00:00 2001 From: pengqiang <pengqiang.it@ciic.com.cn> Date: Tue, 9 Nov 2021 15:55:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E7=A8=8Bactiviti=206.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/activiti/DeleteTaskCommand.java | 32 + .../work/config/activiti/JumpCommand.java | 40 + .../diagram-viewer/images/bg.png | Bin 0 -> 3383 bytes .../diagram-viewer/images/breadcrumbs.png | Bin 0 -> 580 bytes .../diagram-viewer/images/checker-bg.png | Bin 0 -> 108 bytes .../images/deployer/blue/message_catch.png | Bin 0 -> 438 bytes .../images/deployer/business_rule.png | Bin 0 -> 227 bytes .../images/deployer/error_catch.png | Bin 0 -> 1307 bytes .../images/deployer/error_throw.png | Bin 0 -> 830 bytes .../diagram-viewer/images/deployer/manual.png | Bin 0 -> 3319 bytes .../images/deployer/message_catch.png | Bin 0 -> 410 bytes .../images/deployer/message_throw.png | Bin 0 -> 367 bytes .../images/deployer/receive.png | Bin 0 -> 344 bytes .../diagram-viewer/images/deployer/script.png | Bin 0 -> 601 bytes .../diagram-viewer/images/deployer/send.png | Bin 0 -> 361 bytes .../images/deployer/service.png | Bin 0 -> 1445 bytes .../images/deployer/signal_catch.png | Bin 0 -> 953 bytes .../images/deployer/signal_throw.png | Bin 0 -> 687 bytes .../diagram-viewer/images/deployer/timer.png | Bin 0 -> 6280 bytes .../diagram-viewer/images/deployer/user.png | Bin 0 -> 775 bytes .../activiti-editor/diagram-viewer/index.html | 130 + .../diagram-viewer/js/ActivitiRest.js | 75 + .../diagram-viewer/js/ActivityImpl.js | 1 + .../diagram-viewer/js/Color.js | 603 + .../diagram-viewer/js/LineBreakMeasurer.js | 270 + .../diagram-viewer/js/Polyline.js | 387 + .../diagram-viewer/js/ProcessDiagramCanvas.js | 2172 ++ .../js/ProcessDiagramGenerator.js | 1087 + .../js/jquery/jquery.asyncqueue.js | 125 + .../diagram-viewer/js/jquery/jquery.js | 9266 ++++++ .../js/jquery/jquery.progressbar.js | 131 + .../diagram-viewer/js/jstools.js | 23 + .../diagram-viewer/js/raphael.2.1.1.js | 2764 ++ .../diagram-viewer/js/raphael.js | 10 + .../diagram-viewer/js/raphael_uncompressed.js | 5815 ++++ .../diagram-viewer/js/textlayout.js | 441 + .../activiti-editor/diagram-viewer/style.css | 1 + .../activiti-editor/editor-app/app-cfg.js | 28 + .../static/activiti-editor/editor-app/app.js | 435 + .../properties-assignment-controller.js | 150 + ...perties-condition-expression-controller.js | 59 + .../properties-custom-controllers.js | 18 + .../properties-default-controllers.js | 115 + .../properties-event-listeners-controller.js | 266 + ...operties-execution-listeners-controller.js | 326 + .../properties-fields-controller.js | 192 + .../properties-form-properties-controller.js | 276 + .../properties-in-parameters-controller.js | 158 + ...operties-message-definitions-controller.js | 137 + .../properties-message-scope-controller.js | 48 + .../properties-multiinstance-controller.js | 34 + .../properties-out-parameters-controller.js | 158 + ...roperties-sequenceflow-order-controller.js | 130 + ...roperties-signal-definitions-controller.js | 136 + .../properties-signal-scope-controller.js | 47 + .../properties-task-listeners-controller.js | 325 + .../editor-app/configuration/properties.js | 99 + .../assignment-display-template.html | 4 + .../properties/assignment-popup.html | 44 + .../properties/assignment-write-template.html | 4 + .../properties/boolean-property-template.html | 4 + ...condition-expression-display-template.html | 2 + .../condition-expression-popup.html | 29 + .../condition-expression-write-template.html | 4 + .../default-value-display-template.html | 4 + .../event-listeners-display-template.html | 3 + .../properties/event-listeners-popup.html | 115 + .../event-listeners-write-template.html | 4 + .../execution-listeners-display-template.html | 3 + .../properties/execution-listeners-popup.html | 101 + .../execution-listeners-write-template.html | 4 + .../properties/feedback-popup.html | 17 + .../properties/fields-display-template.html | 3 + .../properties/fields-popup.html | 61 + .../properties/fields-write-template.html | 4 + .../form-properties-display-template.html | 3 + .../properties/form-properties-popup.html | 117 + .../form-properties-write-template.html | 4 + .../in-parameters-display-template.html | 3 + .../properties/in-parameters-popup.html | 53 + .../in-parameters-write-template.html | 4 + .../message-definitions-display-template.html | 2 + .../properties/message-definitions-popup.html | 50 + .../message-definitions-write-template.html | 3 + .../message-property-write-template.html | 4 + ...multiinstance-property-write-template.html | 8 + .../out-parameters-display-template.html | 3 + .../properties/out-parameters-popup.html | 53 + .../out-parameters-write-template.html | 4 + .../sequenceflow-order-display-template.html | 3 + .../properties/sequenceflow-order-popup.html | 47 + .../sequenceflow-order-write-template.html | 4 + .../signal-definitions-display-template.html | 3 + .../properties/signal-definitions-popup.html | 58 + .../signal-definitions-write-template.html | 4 + .../signal-property-write-template.html | 4 + .../string-property-write-mode-template.html | 8 + ...subprocess-reference-display-template.html | 3 + .../subprocess-reference-popup.html | 43 + .../subprocess-reference-write-template.html | 4 + .../task-listeners-display-template.html | 3 + .../properties/task-listeners-popup.html | 102 + .../task-listeners-write-template.html | 4 + .../configuration/properties/text-popup.html | 17 + .../text-property-write-template.html | 4 + .../configuration/toolbar-custom-actions.js | 18 + .../configuration/toolbar-default-actions.js | 431 + .../editor-app/configuration/toolbar.js | 176 + .../editor-app/configuration/url-config.js | 34 + .../editor-app/css/style-common.css | 1517 + .../editor-app/css/style-editor.css | 639 + .../activiti-editor/editor-app/css/style.css | 477 + .../editor-app/editor-config.js | 32 + .../editor-app/editor-controller.js | 65 + .../editor-app/editor-utils.js | 135 + .../activiti-editor/editor-app/editor.html | 136 + .../editor-app/editor/css/editor.css | 202 + .../editor-app/editor/i18n/translation_de.js | 383 + .../editor/i18n/translation_en_us.js | 423 + .../editor/i18n/translation_signavio_de.js | 106 + .../editor/i18n/translation_signavio_en_us.js | 108 + .../editor-app/editor/oryx.debug.js | 24513 ++++++++++++++++ .../activiti-editor/editor-app/editor/oryx.js | 14249 +++++++++ .../activiti-editor/editor-app/eventbus.js | 133 + .../fonts/activiti-admin-webfont.eot | Bin 0 -> 5029 bytes .../fonts/activiti-admin-webfont.svg | 43 + .../fonts/activiti-admin-webfont.ttf | Bin 0 -> 8628 bytes .../fonts/activiti-admin-webfont.woff | Bin 0 -> 5624 bytes .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20290 bytes .../fonts/glyphicons-halflings-regular.svg | 229 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41236 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23292 bytes .../editor-app/header-controller.js | 31 + .../activiti-editor/editor-app/i18n/en.json | 291 + .../editor-app/images/bpmn-error.png | Bin 0 -> 492 bytes .../editor-app/images/bpmn-warning.png | Bin 0 -> 469 bytes .../editor-app/images/datadefinition.png | Bin 0 -> 778 bytes .../editor-app/images/delete.png | Bin 0 -> 304 bytes .../editor-app/images/loading.gif | Bin 0 -> 17550 bytes .../editor-app/images/logo-2x.png | Bin 0 -> 21832 bytes .../editor-app/images/logo.png | Bin 0 -> 18297 bytes .../editor-app/images/nw-handle-dark.gif | Bin 0 -> 839 bytes .../editor-app/images/se-handle-dark.gif | Bin 0 -> 838 bytes .../editor-app/images/shapemenu_highlight.png | Bin 0 -> 462 bytes .../editor-app/images/wrench.png | Bin 0 -> 374 bytes .../angular-cookies.min.js | 8 + .../angular-cookies.min.js.map | 8 + .../libs/angular-dragdrop.min-1.0.3.js | 9 + .../angular-dragdrop.min.js | 29 + .../angular-mocks_1.2.13/angular-mocks.js | 2136 ++ .../angular-resource.js | 596 + .../angular-resource.min.js | 13 + .../angular-resource.min.js.map | 8 + .../angular-route_1.2.13/angular-route.js | 921 + .../angular-route_1.2.13/angular-route.min.js | 14 + .../angular-route.min.js.map | 8 + .../angular-sanitize.js | 625 + .../angular-sanitize.min.js | 14 + .../angular-sanitize.min.js.map | 8 + .../angular-scroll.min.js | 1 + .../angular-strap_2.0.5/angular-strap.min.js | 9 + .../angular-strap.tpl.min.js | 8 + .../.bower.json | 19 + .../angular-translate-loader-static-files.js | 31 + ...gular-translate-loader-static-files.min.js | 6 + .../.bower.json | 20 + .../angular-translate-storage-cookie.js | 19 + .../angular-translate-storage-cookie.min.js | 6 + .../angular-translate.js | 960 + .../angular-translate.min.js | 6 + .../angular_1.2.13/angular-animate.min.js | 27 + .../libs/angular_1.2.13/angular.min.js | 204 + .../daterangepicker-bs3.css | 267 + .../daterangepicker.js | 1026 + .../bootstrap_3.1.1/css/bootstrap-theme.css | 347 + .../css/bootstrap-theme.css.map | 1 + .../css/bootstrap-theme.min.css | 7 + .../libs/bootstrap_3.1.1/css/bootstrap.css | 5785 ++++ .../bootstrap_3.1.1/css/bootstrap.css.map | 1 + .../bootstrap_3.1.1/css/bootstrap.min.css | 7 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20335 bytes .../fonts/glyphicons-halflings-regular.svg | 229 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41280 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23320 bytes .../libs/bootstrap_3.1.1/js/bootstrap.js | 1951 ++ .../libs/bootstrap_3.1.1/js/bootstrap.min.js | 6 + .../libs/es5-shim-15.3.4.5/.bower.json | 14 + .../libs/es5-shim-15.3.4.5/.gitignore | 2 + .../editor-app/libs/es5-shim-15.3.4.5/CHANGES | 93 + .../libs/es5-shim-15.3.4.5/CONTRIBUTORS.md | 25 + .../editor-app/libs/es5-shim-15.3.4.5/LICENSE | 19 + .../libs/es5-shim-15.3.4.5/README.md | 161 + .../libs/es5-shim-15.3.4.5/es5-sham.js | 444 + .../libs/es5-shim-15.3.4.5/es5-sham.map | 1 + .../libs/es5-shim-15.3.4.5/es5-sham.min.js | 280 + .../libs/es5-shim-15.3.4.5/es5-shim.js | 1314 + .../libs/es5-shim-15.3.4.5/es5-shim.map | 1 + .../libs/es5-shim-15.3.4.5/es5-shim.min.js | 4 + .../libs/es5-shim-15.3.4.5/package.json | 34 + .../es5-shim-15.3.4.5/tests/helpers/h-kill.js | 64 + .../tests/helpers/h-matchers.js | 34 + .../libs/es5-shim-15.3.4.5/tests/helpers/h.js | 3 + .../libs/es5-shim-15.3.4.5/tests/index.html | 64 + .../es5-shim-15.3.4.5/tests/index.min.html | 63 + .../tests/lib/jasmine-html.js | 190 + .../es5-shim-15.3.4.5/tests/lib/jasmine.css | 166 + .../es5-shim-15.3.4.5/tests/lib/jasmine.js | 2479 ++ .../tests/lib/jasmine_favicon.png | Bin 0 -> 905 bytes .../libs/es5-shim-15.3.4.5/tests/lib/json2.js | 481 + .../es5-shim-15.3.4.5/tests/spec/s-array.js | 1223 + .../es5-shim-15.3.4.5/tests/spec/s-date.js | 152 + .../tests/spec/s-function.js | 147 + .../es5-shim-15.3.4.5/tests/spec/s-number.js | 14 + .../es5-shim-15.3.4.5/tests/spec/s-object.js | 181 + .../es5-shim-15.3.4.5/tests/spec/s-string.js | 204 + .../libs/jquery-ui-1.10.3.custom.min.js | 1588 + .../libs/jquery.autogrow-textarea.js | 61 + .../editor-app/libs/jquery_1.11.0/jquery.js | 9789 ++++++ .../libs/jquery_1.11.0/jquery.min.js | 4 + .../libs/jquery_1.11.0/jquery.min.map | 1 + .../editor-app/libs/json3_3.2.6/LICENSE | 20 + .../editor-app/libs/json3_3.2.6/lib/json3.js | 861 + .../libs/json3_3.2.6/lib/json3.min.js | 400 + .../libs/momentjs_2.5.1/momentjs.min.js | 963 + .../editor-app/libs/mousetrap-1.4.5.min.js | 9 + .../editor-app/libs/ng-grid-2.0.7-min.js | 2 + .../editor-app/libs/ng-grid-2.0.7.min.css | 1 + .../editor-app/libs/path_parser.js | 30 + .../editor-app/libs/prototype-1.5.1.js | 3272 +++ .../editor-app/libs/ui-utils.min-0.0.4.js | 7 + .../partials/root-stencil-item-template.html | 11 + .../partials/stencil-item-template.html | 27 + .../activiti-editor/editor-app/plugins.xml | 58 + .../editor-app/popups/icon-template.html | 3 + .../editor-app/popups/save-model.html | 41 + .../editor-app/popups/select-shape.html | 20 + .../editor-app/popups/unsaved-changes.html | 22 + .../editor-app/select-shape-controller.js | 314 + .../editor-app/stencil-controller.js | 1435 + .../activity/event.subprocess.collapsed.png | Bin 0 -> 309 bytes .../icons/activity/event.subprocess.png | Bin 0 -> 274 bytes .../icons/activity/expanded.subprocess.png | Bin 0 -> 273 bytes .../activity/list/type.business.rule.png | Bin 0 -> 209 bytes .../icons/activity/list/type.camel.png | Bin 0 -> 608 bytes .../icons/activity/list/type.manual.png | Bin 0 -> 405 bytes .../bpmn2.0/icons/activity/list/type.mule.png | Bin 0 -> 705 bytes .../icons/activity/list/type.receive.png | Bin 0 -> 297 bytes .../icons/activity/list/type.script.png | Bin 0 -> 300 bytes .../bpmn2.0/icons/activity/list/type.send.png | Bin 0 -> 440 bytes .../icons/activity/list/type.service.png | Bin 0 -> 530 bytes .../icons/activity/list/type.shell.png | Bin 0 -> 325 bytes .../bpmn2.0/icons/activity/list/type.user.png | Bin 0 -> 405 bytes .../bpmn2.0/icons/activity/subprocess.png | Bin 0 -> 282 bytes .../bpmn2.0/icons/activity/task.png | Bin 0 -> 255 bytes .../icons/artifact/text.annotation.png | Bin 0 -> 367 bytes .../bpmn2.0/icons/catching/cancel.png | Bin 0 -> 3241 bytes .../bpmn2.0/icons/catching/compensation.png | Bin 0 -> 3256 bytes .../bpmn2.0/icons/catching/error.png | Bin 0 -> 698 bytes .../bpmn2.0/icons/catching/message.png | Bin 0 -> 549 bytes .../bpmn2.0/icons/catching/signal.png | Bin 0 -> 627 bytes .../bpmn2.0/icons/catching/timer.png | Bin 0 -> 573 bytes .../connector/association.undirected.png | Bin 0 -> 413 bytes .../connector/association.unidirectional.png | Bin 0 -> 3032 bytes .../bpmn2.0/icons/connector/messageflow.png | Bin 0 -> 3121 bytes .../bpmn2.0/icons/connector/sequenceflow.png | Bin 0 -> 346 bytes .../bpmn2.0/icons/dataobject/data.store.png | Bin 0 -> 3184 bytes .../stencilsets/bpmn2.0/icons/diagram.png | Bin 0 -> 206 bytes .../bpmn2.0/icons/endevent/cancel.png | Bin 0 -> 3280 bytes .../bpmn2.0/icons/endevent/error.png | Bin 0 -> 757 bytes .../bpmn2.0/icons/endevent/none.png | Bin 0 -> 467 bytes .../bpmn2.0/icons/endevent/terminate.png | Bin 0 -> 3166 bytes .../bpmn2.0/icons/gateway/eventbased.png | Bin 0 -> 492 bytes .../icons/gateway/exclusive.databased.png | Bin 0 -> 462 bytes .../bpmn2.0/icons/gateway/inclusive.png | Bin 0 -> 432 bytes .../bpmn2.0/icons/gateway/parallel.png | Bin 0 -> 329 bytes .../bpmn2.0/icons/startevent/error.png | Bin 0 -> 698 bytes .../bpmn2.0/icons/startevent/message.png | Bin 0 -> 549 bytes .../bpmn2.0/icons/startevent/none.png | Bin 0 -> 450 bytes .../bpmn2.0/icons/startevent/signal.png | Bin 0 -> 3201 bytes .../bpmn2.0/icons/startevent/timer.png | Bin 0 -> 573 bytes .../bpmn2.0/icons/swimlane/lane.png | Bin 0 -> 187 bytes .../bpmn2.0/icons/swimlane/pool.png | Bin 0 -> 189 bytes .../bpmn2.0/icons/throwing/none.png | Bin 0 -> 582 bytes .../bpmn2.0/icons/throwing/signal.png | Bin 0 -> 747 bytes .../editor-app/toolbar-controller.js | 162 + .../static/activiti-editor/modeler.html | 142 + 286 files changed, 114353 insertions(+) create mode 100644 src/main/java/cn/palmte/work/config/activiti/DeleteTaskCommand.java create mode 100644 src/main/java/cn/palmte/work/config/activiti/JumpCommand.java create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/bg.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/breadcrumbs.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/checker-bg.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/blue/message_catch.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/business_rule.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/error_catch.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/error_throw.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/manual.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/message_catch.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/message_throw.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/receive.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/script.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/send.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/service.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/signal_catch.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/signal_throw.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/timer.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/user.png create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/index.html create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/ActivitiRest.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/ActivityImpl.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/Color.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/LineBreakMeasurer.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/Polyline.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramCanvas.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramGenerator.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.asyncqueue.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.progressbar.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/jstools.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.2.1.1.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/raphael_uncompressed.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/js/textlayout.js create mode 100644 src/main/resources/static/activiti-editor/diagram-viewer/style.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/app-cfg.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/app.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-assignment-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-condition-expression-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-custom-controllers.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-default-controllers.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-event-listeners-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-execution-listeners-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-fields-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-form-properties-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-in-parameters-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-definitions-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-scope-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-multiinstance-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-out-parameters-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-sequenceflow-order-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-definitions-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-scope-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties-task-listeners-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/boolean-property-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/default-value-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/feedback-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-property-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/multiinstance-property-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-property-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/string-property-write-mode-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-display-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-popup.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-property-write-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-custom-actions.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-default-actions.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/toolbar.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/configuration/url-config.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/css/style-common.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/css/style-editor.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/css/style.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor-config.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor-utils.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/css/editor.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_de.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_en_us.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_de.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_en_us.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/oryx.debug.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/editor/oryx.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/eventbus.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.eot create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.svg create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.ttf create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.woff create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.eot create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.svg create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.ttf create mode 100644 src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.woff create mode 100644 src/main/resources/static/activiti-editor/editor-app/header-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/i18n/en.json create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/bpmn-error.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/bpmn-warning.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/datadefinition.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/delete.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/loading.gif create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/logo-2x.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/logo.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/nw-handle-dark.gif create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/se-handle-dark.gif create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/shapemenu_highlight.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/images/wrench.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop.min-1.0.3.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop_1.0.7/angular-dragdrop.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-mocks_1.2.13/angular-mocks.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/.bower.json create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/.bower.json create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular-animate.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.min.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.eot create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.svg create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.ttf create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.woff create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.bower.json create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.gitignore create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CHANGES create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CONTRIBUTORS.md create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/LICENSE create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/README.md create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/package.json create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-kill.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.min.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine-html.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine_favicon.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/json2.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-array.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-date.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-function.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-number.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-object.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-string.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/jquery-ui-1.10.3.custom.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/jquery.autogrow-textarea.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.map create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/LICENSE create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/momentjs_2.5.1/momentjs.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/mousetrap-1.4.5.min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7-min.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7.min.css create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/path_parser.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/prototype-1.5.1.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/libs/ui-utils.min-0.0.4.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/partials/root-stencil-item-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/partials/stencil-item-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/plugins.xml create mode 100644 src/main/resources/static/activiti-editor/editor-app/popups/icon-template.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/popups/save-model.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/popups/select-shape.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/popups/unsaved-changes.html create mode 100644 src/main/resources/static/activiti-editor/editor-app/select-shape-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencil-controller.js create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.collapsed.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/expanded.subprocess.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.business.rule.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.camel.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.manual.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.mule.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.receive.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.script.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.send.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.service.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.shell.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.user.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/subprocess.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/task.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/artifact/text.annotation.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/cancel.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/compensation.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/error.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/message.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/signal.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/timer.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/association.undirected.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/association.unidirectional.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/messageflow.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/sequenceflow.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/dataobject/data.store.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/diagram.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/cancel.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/error.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/none.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/terminate.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/eventbased.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/exclusive.databased.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/inclusive.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/parallel.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/error.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/message.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/none.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/signal.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/timer.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/swimlane/lane.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/swimlane/pool.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/throwing/none.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/throwing/signal.png create mode 100644 src/main/resources/static/activiti-editor/editor-app/toolbar-controller.js create mode 100644 src/main/resources/static/activiti-editor/modeler.html diff --git a/src/main/java/cn/palmte/work/config/activiti/DeleteTaskCommand.java b/src/main/java/cn/palmte/work/config/activiti/DeleteTaskCommand.java new file mode 100644 index 0000000..e29a1e1 --- /dev/null +++ b/src/main/java/cn/palmte/work/config/activiti/DeleteTaskCommand.java @@ -0,0 +1,32 @@ +package cn.palmte.work.config.activiti; + +import org.activiti.engine.impl.cmd.NeedsActiveTaskCmd; +import org.activiti.engine.impl.interceptor.CommandContext; +import org.activiti.engine.impl.persistence.entity.ExecutionEntity; +import org.activiti.engine.impl.persistence.entity.TaskEntity; +import org.activiti.engine.impl.persistence.entity.TaskEntityManagerImpl; + +/** + * 删除当前运行时任务命令,并返回当前任务的执行对象id + */ +public class DeleteTaskCommand extends NeedsActiveTaskCmd<String> { + public DeleteTaskCommand(String taskId) { + super(taskId); + } + + @Override + public String execute(CommandContext commandContext, TaskEntity currentTask) { + //获取所需服务 + TaskEntityManagerImpl taskEntityManager = (TaskEntityManagerImpl) commandContext.getTaskEntityManager(); + //获取当前任务的来源任务及来源节点信息 + ExecutionEntity executionEntity = currentTask.getExecution(); + //删除当前任务,来源任务 + taskEntityManager.deleteTask(currentTask, "jumpReason", false, false); + return executionEntity.getId(); + } + + @Override + public String getSuspendedTaskException() { + return "挂起的任务不能跳转"; + } +} diff --git a/src/main/java/cn/palmte/work/config/activiti/JumpCommand.java b/src/main/java/cn/palmte/work/config/activiti/JumpCommand.java new file mode 100644 index 0000000..2f5f849 --- /dev/null +++ b/src/main/java/cn/palmte/work/config/activiti/JumpCommand.java @@ -0,0 +1,40 @@ +package cn.palmte.work.config.activiti; + +import org.activiti.bpmn.model.FlowNode; +import org.activiti.bpmn.model.SequenceFlow; +import org.activiti.engine.ActivitiException; +import org.activiti.engine.impl.interceptor.Command; +import org.activiti.engine.impl.interceptor.CommandContext; +import org.activiti.engine.impl.persistence.entity.ExecutionEntity; + +import java.util.List; + +/** + * 根据提供节点和执行对象id,进行跳转命令 + * + * @author + */ +public class JumpCommand implements Command<Void> { + private FlowNode flowElement; + private String executionId; + + public JumpCommand(FlowNode flowElement, String executionId) { + this.flowElement = flowElement; + this.executionId = executionId; + } + + @Override + public Void execute(CommandContext commandContext) { + //获取目标节点的来源连线 + List<SequenceFlow> flows = flowElement.getIncomingFlows(); + if (flows == null || flows.isEmpty()) { + throw new ActivitiException("回退错误,目标节点没有来源连线"); + } + + //随便选一条连线来执行,当前执行计划为,从连线流转到目标节点,实现跳转 + ExecutionEntity executionEntity = commandContext.getExecutionEntityManager().findById(executionId); + executionEntity.setCurrentFlowElement(flows.get(0)); + commandContext.getAgenda().planTakeOutgoingSequenceFlowsOperation(executionEntity, true); + return null; + } +} diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/bg.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..42c4a829f2d0b434878bc20c9b4d062258b83c7c GIT binary patch literal 3383 zcmV-74ao9|P)<h;3K|Lk000e1NJLTq005Q%005Q<0{{R33*Ujz0000mP)t-s=;-M5 z^z`-h_2%a0_V)Jk^YiKH>GJaO>gww8@$u{H>+J08@bK{M?d|XH@9ysI-xTdE0000P zbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU;ok>JNRCwCWTv>J;M-t1T zlo=bA``>mxWP4;;61$pgKOcbXSGgb%03z2JtK#jl0vV)BW$X0hbPrDyeW)ofrCq_* z=orvRO9xeBgR+X{J)w?b&pyb2hXLf9Sr*$vZwio4%ST(Y`*MogJ=vEzXVDC+OkNyM zU>K7_7o^me*4kz7Hi@gn?y=br`4&qSF*(VWE$m80X)bHXZOCH5ol=8MN^+E_M1A3= zsWcefHOx9(d*0T@9PKb%{;D<wvCAXP4B3Ui7&=x(HlXa79#gO=;}Dj*6g-$l)io9z z<pMJmXi=x$7DvHpd<B<gY}A{35<o|EDZdWTy;>k<ghD~C<TS$>RDo*Z3}))I>8~hi z9M^F4wZhqqCat{}C)Go`gXUnS6Tuc#2Ctru%Wk;{gK@eNX4^3~t^@|Nr}tVmX4VY7 zZJpGpftnsDKzS^gb~lTG@_U<Xf}JL2Yj_g9D0lN1Jf7*TsWWX^!%YbQ++sBoWpkyP zr$Hcw8R)UjVulT)nSE-i#!S()NUk1s5xZ+#t?HR2(3A@yQ!x!?S0)-)ve<8n$&p1e zYQ}u?a7{Q8Ygr<a*rPbh9w^UXLuZS#=;9n|r0U^>8JGyzwq(~%S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E_uc<FeWc+Pc)<1#&y>j$^ z82jVpXx(>8UIPh#2dY2vQg>2ZcV1X|HpR8>&&WN&fp4SPx_`@GGk5;Obl-jV_C5Ri zGurHRKU(p4vi=tj&O9)Sv+f&#AGDz#GN+zUe?AaZez<zBca{5p_z9mq=lU~0;fciI zV@<-x-UM2YKiTxxXw(azZ2EIFYTchuyZa2&Gk10U?4gg}Pq*G5lequ<$hu$Y?`8?_ z4ufqs*8On6tL87hk1Q<wCx`a`v%384)ZwRHx8H!kdLl;gqEP4e^>f{=?PosrnA~H_ zy5{!0xBrEC@Biu}YWHIuA9YqAk*3#uvh=~6%0pWFx<3p0+5XN?U8no6I=t|4#lPs? zy59;vB`VyMI@S|L$;*R3+v_*)QT&3ce(HM^zd+4(Ur%`*%lbd}`yYU6!4R&SI79#d N002ovPDHLkV1kqr$Rz*( literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/breadcrumbs.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/breadcrumbs.png new file mode 100644 index 0000000000000000000000000000000000000000..f70c2d43ab33329ce02bb8445572b5ea2f488818 GIT binary patch literal 580 zcmeAS@N?(olHy`uVBq!ia0vp^f<SD>!3-qDq?+7-lw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6JlqKyGQA+G=a{rmCr=jSh94jw-C`}gl7$4-9u`0>=4^XD&I z{`2S0;iD(6-MD%A%C$3RFT8pC?%DGf-@bi+_~^;K`wyNzdw%lt*;}{o9zS{J`HPn) zPMtk)=;-S=Z*ShZ^YZ2E<0npExOn-=lV^{gJiU7T=Gk)>-@bc)|G}d>ckdrLcH-QH zOOGBudGPSj&!4~EzyEOT#HqXY9^ANj`^S$Tr%s>y`t94RSFbN$y?*-a`S0JqfBO9S z;iJcY|Ngyt?Z*HA{}<a%)df1<x+KUi7|10PFf2S`EeAB_k*AAeNX4y`%SWq@81S?P zs%|?xhsQZ_*_k`9{>rb3pZ@Fh)5yqO;gh;<smHr_EzuX)ds-uE+msAR#}b>x9(NtS z6wh=nDRcbzSz^)cD1}}2OG_SdE^>DLId7Xl?mJtTdb24jJQS+_>IkgNSD3YfZ_(_Y zN6y?AU3a9`MS6DLwcputB9vcJed8zdSyQ(Q*~hTwtKRROQ8F!2y0iQ3u_u2Squ-YA zoO*8U#B=jF^}6`A?Y?9<&0M709-1UQ)xSUEuE3tDH@0ruTQqOsLv_7vLZZxiOJ_X~ miwoyv^3sk=m2#|Om0(Cy*>QBGt`j@Zw+x=HelF{r5}E*P$z3`C literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/checker-bg.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/checker-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..a23232d93846c619b78a6775804f303f304e26ec GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;7>k44ofy`glX(f`um$*pxPJfs z{r~^}KCeaefg&QFE{-7_*OL<xe*B-`*u_%no6NxQcCY=xFPqMG1LYY!UHx3vIVCg! E037!s!2kdN literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/blue/message_catch.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/blue/message_catch.png new file mode 100644 index 0000000000000000000000000000000000000000..a07404cd215770dfcc4d56498711de1804189c07 GIT binary patch literal 438 zcmV;n0ZIOeP)<h;3K|Lk000e1NJLTq001rk001rs1^@s6SGg-U00009a7bBm000XU z000XU0RWnu7ytkOAY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ-JV``BRCwC#*})BiFbn`dI|?K4;>#Z0fKfUOqp$&c@a4q_Af=yzqDlcf2_dQM zS0!q3N*xDWG{!)Qp`g$ZxWEOTY3Tg}4ofk8(R4MIzv4&ClYyq)vXjn}hNeX~ylFSn z)m3h89AE{2>VLZm_9I|FKD){%1}EISUq|v&XxqW+<4@tQ(4-nqji;c=n==)jie`0{ zyYU<}yB*$z=c2v(cx=26+WP>Ch4)1Vot&Zg5OlO7pNo%CW-8XtOvU)-MS=g`oQm+x zivoAm<`u#>&*|7FS=OuD>UtihY^XB;CC~L89G2sGob~EP?E<dr)I9QDp{#gl>xxl| z>=jRm=B&KR3C+Q)+|X3K_UQnr@wXlMxeSE#cZQMUKnTtTLTC?OvIz@abg7{Hc_nax g3tZp=e<D5u0E~LR`PTfd@c;k-07*qoM6N<$f-pV3a{vGU literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/business_rule.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/business_rule.png new file mode 100644 index 0000000000000000000000000000000000000000..3d1b5934177197152a1dc2999ce5b0a24a78f1a4 GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQk}4T^vI! zdf!fV<T{|h!=iq4_WKW(`>wVBWazv-`QBQm>I{VmwmK<d*HktdU!Nw;!I1Xt1+S-A zo5oU|nZ@T0FtSW8VOzMhZTI7MM<iBm^}Aa=|ND(8mn2*4oApx?)^GpFR?VFvnrYVp PvWvmf)z4*}Q$iB}>Kjdu literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/error_catch.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/error_catch.png new file mode 100644 index 0000000000000000000000000000000000000000..0a33f08c8080056813b48166843708f20de3e558 GIT binary patch literal 1307 zcmV+$1?2jPP)<h;3K|Lk000e1NJLTq001rk001rs1^@s6SGg-U00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11ei%gK~!jg?U`RlWK|r;zqc9x%`z-1Bdfts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hrZOia*ZGRcE|1)x;d=M!<<;cze%3Z)cp zZ*P}bZ)GE$t@yA2mz9;Vw6s(n=vx3*gFcr4{2|)u(_Rt#`}^`qI0f*8N^zsCjR1Z` zip(wE?^SvE^!a>A;<_DmC0pr?;*b(5UAY6mp2d$|5q%mP8_(P&k)*@nkeRQj6u)U8 z{X2lVtl+>?@pYL1I5RVokX~C`lbL@a#bbz^#i2{6;^i(3?*B5#kBa^li-o(pyCg}s z+bwgi=fcb+-mjCsm+cy><Cp<_CpfLGtqcZ(v|6n)`x%wuD-t*g;H6yQ66<oDK>%!P zYm=pK=fzAj*f$b<AYW;TH<jW-A5krS8L_8HU4=@=d1U~8(n&`ETv96jUlagWbmE`p z%R1LrDI~uH@PSlyJzrMA5B75&F!rjYAHY7z&-3P-x45eKf4_Bm5b@B8{|k^Ovp6*j RE2jVe002ovPDHLkV1f`-S_J?A literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/error_throw.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/error_throw.png new file mode 100644 index 0000000000000000000000000000000000000000..2fdaf71d703db3ec9c847678c77631eeb9807e45 GIT binary patch literal 830 zcmV-E1Ht@>P)<h;3K|Lk000e1NJLTq001rk001rs1^@s6SGg-U00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10=r2>K~!jg?U_wT6;Tv`znc%rOoG4=f+(U8+eOe1v~it9M2n!s zLuj8RZfjLRv}qA(fh`iEMK5YqV393q5fVhwA}XXZ3WDrUvOF!`JRFCa`_G8vfdh|u z=YI3O`|iw~nNcFbVvJ=AE#MnV;$_E@c-av}Tq)J2lsc`HI;NB=XEH=2IDtVxlI)Mc zG^GkXk1M5GfJvY=+4KYG6p@J_upwgnt%sPC2512;MBwTp!ZLZp+%ie$zDUckId^*? zbW4G>0B?bn0qo_#9bg9Ni!FXeBQC(%0QPW-^EjF~&;)!ii2nw*dazGsI2U7z?=?s_ z@}VR5a1LX8O!1nfxByj4=5Am*Gxm9It*7+bWEt3se*)GRm>ZM2?AYTm#rqtj8#$=q ztp;8c93yQp#m7CwXMtTgtO{_iU`(yh!9#kdhjb&K0Zkd+B~5*IO!3PB;sW%hSiPFM zk3c1gIQ2ecDp33zuny=3{%Y#ZX<Zz}tAWyu90k4`YC2<zk46$V<r9;Obz7^H+6?Tm ztq+VLQ-MoA-V-3=62E}!#wyDtV$)Cw@Y<rrl-I1BEX8das;ktmfbRmuyJCvpH0<ma z$%O^jA0Yh(>i5CH;+Pw%2f&KVm>Ztrr>xI#7UCx~J9-MV=8S0vzBo$H0vlqA=XGrY zyriIWOUCs$ijUYz8^tMZs3w5*7C(B#LHtNe@w|rWGtgmqP;UZ$T1bDT;4y@=IQb3L z6gl^Q2Kjyq@c|d6NxYhYPh)wG&2TEfm_d9;O!4&k`~w_tg{N5C5=Nf%xDQj;tE@_W zJ}M$LO|3RWWDGc8@b!={R5we*z(L=c&hVOnSInR78KB*Z7emTHzAGbs+m}`9s}vEr z4_rxY8t`QWKiGHPVf|H06?iWqcfC1fi^q!p`>oqT#G)1d2V(uTusIOVa{vGU07*qo IM6N<$f-YxoF8}}l literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/manual.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/manual.png new file mode 100644 index 0000000000000000000000000000000000000000..7aa3b85300b3bdca540a4b5a5af42f7e42ec9583 GIT binary patch literal 3319 zcmV<T3<&dyP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV000V4X+uL$P-t&- zZ*ypGa3D!TLm+T+Z)Rz1WdHzp+MQEpR8#2|J@?-9LQ9B%luK_?6$l_wLW_VDktQl3 z2@pz%A)(n7QNa;KMFbnjpojyGj)066Q7jCK3fKqaA)=0hqlk*i`{8?|Yu3E?=FR@K z*FNX0^PRKL2fzpnmPj*EHGmAMLLL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t%Ugo)`Y2{>!cx7B7DI)$7;J(U{Spm-3gBzioV_{p!H$8L!*M!p0uH$#^p{Ui4P` z?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi{{a60 z|De66lK=n!32;bRa{vGf6951U69E94oEQKA00(qQO+^RV3=a=890}AG`~Uy~DM>^@ zR5;7ElQBqJQ5c24`|iE(B`?t;R=e2HLAn_*bhD*{I9gCBWOm3<uuvRYI+ZRiQXxyn zj)8V7c5@U0A&3+mT%;BpBnjlT;bFY*=I^4NEz&ce?+k}?l!)*@Rg2@em(S<F0=a(y z74T+mZcaL#j+9Cz0ZKQ8myIz$78e&K%Q9J6SrKdPr<=lWXJ==n)oO`|$m;5<08QW_ za36R8l!3=U5x`u5cYv4Wa{2x4?k?lw<2dJ7T3X`t^t6&?*>@2^DW!_VqSacfX0!Rx zIrjpf9>;NSVPQee&d#LU?MkoLlO#!GI2=lrWs;_;42MIx*8cv!0Da)8+TPy&Fh4*4 zYG!5zYb{!9j4>Evh@yz2qa(Jqws6kjy(gE;F*Y_v9LF>ojbEzWZa-H_eGY<vD2mAC za#(BshFELy-lLQvpU<PUW-u7Ax3@>NTK#F9b6o(fH6nudo+ye4!w`UezfZkhr`2k4 z?X%XBBnfGn?ij6gM?}1c=q$?+5k{jC&N-ZOSZmqX*dPo;M1&v+u+~zm)i^jfxNDA& zj|Y>JlX&m3)-o|MK@bFZ@A2N#ZnxRo+(c_l5Cnu_$ocs>CnqQ0fY(YX^~74+5Rpu4 z9ZgM5-CJ8*Q<X}E>FMdeeQ2$@xVT_27_h#+&f($VGO(k7;A*=5Y8Q`ys@D2hp-?Eq zaU2<Ag3)L+y1cy1k|g=<ocjX215$O{HwL%8>mO8y{z`ef;R^r&002ovPDHLkV1fu4 BI)MNH literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/message_catch.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/message_catch.png new file mode 100644 index 0000000000000000000000000000000000000000..6ac06bb1135f5fcce17c6cc25baed2f050732e61 GIT binary patch literal 410 zcmV;L0cHM)P)<h;3K|Lk000e1NJLTq001rk001rs1^@s6SGg-U00009a7bBm000XU z000XU0RWnu7ytkOAY({UO#lFTB>(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ-AW1|)RCwC#*})FOAP4|ZG4?Y!`Tw8f$<J65cUhBWi53wjE^z9_^u<!J6iO*> z$M9~`Fu1`Dt~A1R5o6q@E~b=V{~f;~=Ufo+)CSEt2SkJ_91+iy(xD9=V|+R1j{mJH z0N?;%DXwLx!mq>ED*Scd+99x+Dy#5MXi|><8c#u!U(R3Qspzh%G8^B6?k<P3@V#hO z9hb&)(Ch{zh3BG&I_D^U1TEI`d+`!!=A|Ap6~kR80{^}_6~SF60<Y!f6N0;r{2?*& zLX}dQCpyYH@diY#0xg_ml?pRT7q`Uq?7Wvoj|O$;y(V-I-fKfs@j*IIXW*x`d@Tc^ z@R?y~90<AAKnU)G7cFr|Z=EV&Kd%gKaDyA%;49)i0PFFxkLDA*ApigX07*qoM6N<$ Ef^*TOIRF3v literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/message_throw.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/message_throw.png new file mode 100644 index 0000000000000000000000000000000000000000..971f1c2dcb9d8cc2d6517e502b497cb0ce165302 GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^dLYcf1|-9GYMTQo&H|6fVg?3oVGw3ym^DWND5#L^ z5#-CjP^HSi(9q1l@bf>Ae#yX4YQVtoDuIE)Y6b&?c>bjLqi#U8Up-wMLn>~)xf#gU zY{0>mkWn?^?Z5V0d57Yrr5a|ldg<<(?=Jjky4OOjZjQNzTysqr*kuY1Fsdsp+O_w< znf^5qf;-J0zTcr*V!uB2v69p3^M<z0!spJ+e-ip4zkTKEHHY3W3^lDYiE9qaKezZp z)RvX2&m4=s@T|;&JKuHpuL_fU&1L)xH1>$wnpnDjRDQ8xV*XM0DUqF3XQFz{^;!1q z-6{6)EO+DftYZF$XM^{9^yFxyy_@&Kr1BxN$8FZC9Vhfc)3@m5cW+)()9KdVR`%3e zZ3}DsriEL7NX0HU{&4-D!k5?5ZpRY-crk*U%`WqyzF|KbgND`$3q^)jU;r^Nc)I$z JtaD0e0syk7j{E=s literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/receive.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/receive.png new file mode 100644 index 0000000000000000000000000000000000000000..dd2d1c12074ca922620223b8344e70ae5b9bb543 GIT binary patch literal 344 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQqhqx;Tbd z^d6mjaapT_NZbCtTKS9KTfT_A)>@SQ(o;!k(e4h3Mb|s-CB!YcxNmmtwkJ8u4@<Vq zG~Ji~C(XA&hQ0jQb=_b3EQ|%(hnWvpmRo+W-ESj2F}!8fD!YB9^V0W!Yuco<^7SwG z8xqceBI%3`t1g+GRkiUIUiB-iTDXH_mDlZU>J>8XAyW-_*0VBPiwc>#?sZMB1Y3w` z_FK<CKlVjVYt=bjaE|f9_r3jM#|;BTHm=jooK>a9!1r9{n8YWW|1TuB=PG*&xja$* jkt=`a-H`|P>mLjADz05FlbmJ%^dN($tDnm{r-UW|c7le) literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/script.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/script.png new file mode 100644 index 0000000000000000000000000000000000000000..febac1d5be2e28efda105e433870d9e6c2449154 GIT binary patch literal 601 zcmV-f0;c_mP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp) z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ign| z4>S(7Eb(&y00G%aL_t(I%bk-ys~SNR#ecfHs0*uNm%>V$6e&cDd;wFWPGgbcRS!}m zUA{o9EmDOPX@#VCAbB4kAecf6!BVgg@gMjH+1+u~y(x4S3FPG^2ZrG?bIv_?=3Y3% z1ik_Cugkm$d;ng}W-~0y0w5NP@jDKO17R347!0UZs{k(mo&&PkY~(ReO6lzHwXigs zO_@w4f3-Ut4yD)Y>DU5@0WuzsNvG4SRx2JtCX*qT%K>}@-bD`X?(XEVxMcr+E&Lh~ z5s`ks|6mEz=~PCek&d6~64Jo7+wD>)6mVVlY)gc5!t;-a2$p4$NF-=98r19c^U=k{ zE$~SbPNx&c<B`MRaBdRQL`2x{_xQfgd_JdCDgl(^7lE$;%jJ^caENJ|B$G)T$H8$N zQmGWSZ3D2~Zb>GS6pKZG+v{%mQZAQo+U+(<smQ)Y7>0-lVHmPlEEo(1)M_=%t2?7! zuSYx{$M^k+pvgfHpp-%>g<%+Ev)O0{05A;WO{G#{u~?AL=l|FXolb}2@yKK{!8FaC zF5x9`@47CwZR7iX^b`6~gCJnP-=maby<StPQ~=(_fv3QItJT6V3_Q<^21)N)!1FwI nyPYQg06z0SBMkfmo&fv;GdW%t<YG*a00000NkvXXu0mjf16BY) literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/send.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/send.png new file mode 100644 index 0000000000000000000000000000000000000000..11a19f006de7e21c1a376752d58256d44d76033b GIT binary patch literal 361 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQp`Zx;Tbd z^d6mTnAPSW(qf<N#s7J_+@V83YjjvHy4_%o$jVIrx?#(<En9^2AH?2q@|nte%!7rw za>E8|gZoC-Yqq|(_J8(v;%|Khu@4%DtsQ19Tk|?=+O=N=`z~$I{oVE8_rJH%yVn_4 zGr#yfPl2P(bbGG1L|ZyTLx+It#ictlrCgpYkY(t5te~XgS!8s*w70{+_p&L&fzLKB zEjH(S!$L)snx0pxZ(w~hUw6m4(*`^lYd7Z3w&?TSk{Wp-Dp-WoOY?FQ<DNMEV}*M{ zlOw04M3${7ocH|n@!xh{E0bGppOZiK>-+s5j0Tz0>%9U$c>;aR;OXk;vd$@?2>?^1 Bkg)&& literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/service.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/service.png new file mode 100644 index 0000000000000000000000000000000000000000..2c21f0f3b7e30c82f88c1923ac13029190e0baa0 GIT binary patch literal 1445 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+m=!WZB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%s|1+P|wiV z#N6CmN5ROz&_Lh7NZ-&%*U;R`*vQJjKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8EkR}&8R-I5=oVMzl_XZ^<`pZ$OmImpPA<wUD9OyvQvjKmn3P{y zVygsnDZ~r81#n~YilM;-3^4tQ!~%UoJp+)JU<!SG@hi>Eg{v+u2}(t{7puX=A(aKG z`a!A1`K3k4z=%sz23b{L<y@4SSdw29lAoUg3&ntp{F40QjQj!x=U`KX@XWlF{PJS3 zYF}R~&%EN2#JuEGPZwJypnko~%oHmZH$!7HH#buQBNt~wLstVQXD2sTGiPIGOA`}I z17|asUYGpj(%jU%5}4i;gkCe8dO-;xw*Y9fOKMSOS!#+~QGTuh*uz$txZPrm(>$o& z6x?nx!Kqgt=oo!av?4__ObD2EKuma|1#;lYJ~a=R){B6Ndf9J}{|pRF(w;7kAr-fB zg8Vy#3Pt|y<Vf05?QtP^V*9IC2b<d`EZU{fqyWq^!fzBBFWj8mB)4s~xMI)SRZR;2 z7WxLdY`81rRd!QsZnN5qvo~&7ZGM{b?v43BAM<VOpCA9O%fC1K{obD)HL82!^k=#& z2<(`p>Mg?6dg-M}!_6E$k*@dOzwxj!XPC`)-KgTZn#ob%#QhZ^S{B(`qqg4;UVZgw zlHisQt%owbZrx3F`}z0n{@s@v$*}$Q-?^zvH*a3McKL$6_pVQ#%;~WFa-=6$`(dfx zw#QTC7GLE5we?{Eht*ua#?@D~YKzy#=&1{FuD;sU61Mv8&C11>?-p3d_$?PU&dJ{& zvP(#*E6GOAUv0AYN0rGZH|Vf8yv*F}p~7@4Z@V>*v)*wRi`bk7f!SxxW}nqy{ZL`E zW62c1O>OCaf0<78Dy{j$D)FF5-|P6}`3%z1uMZ{^1it<L`}=qMo=Uk)orXBK#euu# zG&ei%zH2AJBO-b?@A~GQE8n!tZ`kj(hwa!Az3JQx$!F@PaICbNyY6Prq_EYkN8}^_ z9qaDxpU>)97o8hm%X4_n{L^2n_6BJ9sGVY18R9i@iN@^qqe%yEYdmw!)cND|>fz$! zYLic9m?*ve{4?xYgVqeE_1EPMZU2>cy*_^Ez5iP0S1W4l_~rj3+vy0#SA6?(^e?+V zL(;|@XQQ|G-#RmQ_jilF-~G{n6HY(Pc<;9O;CXYmx!bpBJ#uPbWLWX)z(-THm<ynS N)6><@Wt~$(695z5BwPRh literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/signal_catch.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/signal_catch.png new file mode 100644 index 0000000000000000000000000000000000000000..3991897e2437fd742976cd40963a56e1c0ebd524 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4$%elGGS&*et~ciA=gY#vf~WA=*;&cS z$+7VlRvR-|6=TdEpiPe(8ylINoLqgG>#47=r>Cb!53d?y`b6a8?+X$<?Os;?1aFje z+jb^;>A5$RC*@)a?SnsFGaF+L0e66G4^jWh3~)t6#`T2b@5jB$=ATzyXA|yqHsN09 bzlHw*a_xEXu*?mB00000NkvXXu0mjfFqWya literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/signal_throw.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/signal_throw.png new file mode 100644 index 0000000000000000000000000000000000000000..29a16376766da595d0a080079fa23146e65d05da GIT binary patch literal 687 zcmV;g0#N;lP)<h;3K|Lk000e1NJLTq001rk001rs1^@s6SGg-U00004b3#c}2nYxW zd<bNS00009a7bBm000fu000fu0X^1O@c;k-8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10xU^HK~!jg?b$nvQ$ZNU@!z|w;Eh#S(Lz^5*%d*B-O54>D=qA7 zv=Tuq7s0|tLGXegD59TW8$W;_z{1KxEEKPWg(zC6u!#3{EW&{-#?8se<Rn5Kc#2GB z^89(3cQPl5l#>5ZBmD-bsv&qQMZ~gReRj{lBVrEo5pkg>0V$>I#!;ju@6VkPxlfgd zSc&J@)HM7E(<!BeTsghiDrYQ)hFv(BGbC%pBVse2VMU9#KVUMY^eIPH?uuX48XCrN zK3h`8hTLayL$>ly?8uRqrQ#7Wf*U2Kj^cWb%v{wzp?$TReW>rpVMMIK3#{*8*-Pw9 zDgCILn`5h-(-|~OVz!&mt|}f8Q+SLjcanKbrIg-R$?mq|*HnXsF<h#g+(knk)LBEe z@&aZm<yV9r#nTMn3HRy*Ka~l(@R6P$hY_((<2YN}(ZZ$m8rxG!U&}72(wrCNg@y@@ zTV;85xJ7p3m%Q7g@E1(<WRK%+kDv?R&JK>lJ%%p4Hyb#X<5f-I4=~b>scdte#+H(E zyVVSix1Cj@+8gm%J=HG!4rAR`{0df;n3q!<G;W>$R-0<?!Eg0eyYP37hwILo6M_4E zf-Zcg3iz=;Ll-_!8XT+fb^xFgo?x^r_~iirZuV?jaBRi50f24xM~t@vpBn(sR=(Np z9N*SrY!Ecj{Nk?%iHMlSE%krtETuO%n^JmM3}pX(ye<v@ysBG6@VYewuUr2u_#ejS V8%vH&H#YzP002ovPDHLkV1iIuHu(Sm literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/timer.png b/src/main/resources/static/activiti-editor/diagram-viewer/images/deployer/timer.png new file mode 100644 index 0000000000000000000000000000000000000000..77f4e4ff4201045e8f502837b2719fdecad499d7 GIT binary patch literal 6280 zcmWkz2RzjOAO0R^oju}=%y4FBlo1gwd+(@>tV&K~$7QdQ9ogF{N+mlvBMyasiL=fK zKQhY5{(pSAyVsr9>wBNi^Lf9Y_wzgw%uI9{5j+S8f*AGnbS%KD=GlXm8a(5@e5b(+ z%+Eqs3#uLBTLEvVT?}<~pwqLTqPEI(@ChAO&)yG$=-JO6Feo<<2|lFp*Ehz{OfWDr z%kV3_)MJJqB(1*AHLIYBZii5;m38iEK4~vtX5C+WijGb{Rx@5mn4FrOm?W$BI~hH{ zJb*4OwZUXqP`G@zNwBv3;NVbON?cDyQ)bYv>uEK_R^Qa6;ijsA%Q5wEQF>z7`ShIP z7q015UO8@kyrF*ByBoOcUwLKrSxYFsnd0My`s4PQy>Q3aI<KAW?b)foneLvayxkwL z%8q*{hZ{3)$e!0(Zc|Rk>#yDH5lejAZ@qc*{OqzYWB0ACX_S}R5=&ZbZ{B>2-T$*# zI9l*=@*%y=E4wE$4h>;4OYRXX)B<6fuq@e|k|zQQI(J)IS_<_purbFHoC75@Bb|}p zP5kvzy>g4mdg<%Yl(-TUR+;ac;?pbnCKY%|4$PAh)EjSJJiY=tatIFI|8eQw4_Y*T z=$f3`>CxX)4QMiC_4Nylh^yf{HMe1qNr76hhmX%jLve9&@MkBMR6Y1sP#&pa5W>k( zW6U8<7Lz1Dr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iti-editor/diagram-viewer/images/deployer/user.png new file mode 100644 index 0000000000000000000000000000000000000000..5c6b4e127b6a7951e23da6d80e8b4df96a509a82 GIT binary patch literal 775 zcmV+i1Ni)jP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10)$CKK~y-6rIF1`RACgxpZDH*@14)f<kv9Xrf5(Rk`WCw7@<~f zf^w-TMQ!{bMJScNXdy#wszsCwK}{V@TJ#qPvuP|rvp^H48f+6T)JE_3yv%JO3_6vI zI&e0J=lnS5d5CS>_@8q8X;@zuxnEpTJjC<7hcO1rw6shn^Yr7Vm3xI+Qg}gqU1TU2 z3_f(ZL;?Vo#h@EH6h*Ojb~3|jYwHgV>bXK<AP{)ua*1SjPr>e<0>d=GaU6J#C!#?6 z3-!MN6h%Qa8bx344YXXk2t`q#YdQ!a5S^lHaG+m2(gXRpyxrE?Ui9VbIvfrMy1P0d zNfK&mB8bI?^-w5e9|>St_IcxbIw}YP0)Zd`fgrM36I<I`Fs*E=x9_I)*B8#z*V0rf z^=)iy420uBDFvkz4k}=JY7(m}s~b(xv#x_X`4nm+r$x~zUMGaSh)>5cGV=V;WtZDK z(AC)m##lcU=;*@2l9mUQloXMZCqh@9PUra4<P=m*#pdRZeFJqJnx?^j%#ZM?3Uv2$ zLs7IIN%D>+lM9U4wvF@Wnp&tp-wX{7fOk;*+}Va<7%)u}rfEXgbr^;LS(c%yDrRS2 z!?LVvZ<FsQh;7@rbNd!+Y;5Gy=`<us+BcIiSeBKCn5GF$)8O%V(9qC;xw*OQ<0sDq z4gd%toG6M&Cf~vBc0<#&d>e)VN-0E9L}g_q78gH&QVNda9QhQ&;qcu=BEfPw#^UiA zc)ecu{eF~{l|hzel$MsFyu2La6EER*yR}3jVOCdH#}1|NYG%?mKR+)lEiK1XRlUIT zd=cRYwR1Ldxg2ARDL$WXxvHw7qq(_RZ*9A>cL?yW^$Q!6ALAK3Gw=Wa002ovPDHLk FV1gI@Q62yQ literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/index.html b/src/main/resources/static/activiti-editor/diagram-viewer/index.html new file mode 100644 index 0000000..66a8c4f --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/index.html @@ -0,0 +1,130 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + + <link rel="stylesheet" href="style.css" type="text/css" media="screen"> + <script src="js/jstools.js" type="text/javascript" charset="utf-8"></script> + <script src="js/raphael.js" type="text/javascript" charset="utf-8"></script> + + <script src="js/jquery/jquery.js" type="text/javascript" charset="utf-8"></script> + <script src="js/jquery/jquery.progressbar.js" type="text/javascript" charset="utf-8"></script> + <script src="js/jquery/jquery.asyncqueue.js" type="text/javascript" charset="utf-8"></script> + + <script src="js/Color.js" type="text/javascript" charset="utf-8"></script> + <script src="js/Polyline.js" type="text/javascript" charset="utf-8"></script> + <script src="js/ActivityImpl.js" type="text/javascript" charset="utf-8"></script> + <script src="js/ActivitiRest.js" type="text/javascript" charset="utf-8"></script> + <script src="js/LineBreakMeasurer.js" type="text/javascript" charset="utf-8"></script> + <script src="js/ProcessDiagramGenerator.js" type="text/javascript" charset="utf-8"></script> + <script src="js/ProcessDiagramCanvas.js" type="text/javascript" charset="utf-8"></script> + + <style type="text/css" media="screen"> + + </style> +</head> +<body> +<div class="wrapper"> + <div id="pb1"></div> + <div id="overlayBox" > + <div id="diagramBreadCrumbs" class="diagramBreadCrumbs" onmousedown="return false" onselectstart="return false"></div> + <div id="diagramHolder" class="diagramHolder"></div> + <div class="diagram-info" id="diagramInfo"></div> + </div> +</div> +<script language='javascript'> +var DiagramGenerator = {}; +var pb1; +$(document).ready(function(){ + var query_string = {}; + var query = window.location.search.substring(1); + var vars = query.split("&"); + for (var i=0;i<vars.length;i++) { + var pair = vars[i].split("="); + query_string[pair[0]] = pair[1]; + } + + var processDefinitionId = query_string["processDefinitionId"]; + var processInstanceId = query_string["processInstanceId"]; + + console.log("Initialize progress bar"); + + pb1 = new $.ProgressBar({ + boundingBox: '#pb1', + label: 'Progressbar!', + on: { + complete: function() { + console.log("Progress Bar COMPLETE"); + this.set('label', 'complete!'); + if (processInstanceId) { + ProcessDiagramGenerator.drawHighLights(processInstanceId); + } + }, + valueChange: function(e) { + this.set('label', e.newVal + '%'); + } + }, + value: 0 + }); + console.log("Progress bar inited"); + + ProcessDiagramGenerator.options = { + diagramBreadCrumbsId: "diagramBreadCrumbs", + diagramHolderId: "diagramHolder", + diagramInfoId: "diagramInfo", + on: { + click: function(canvas, element, contextObject){ + var mouseEvent = this; + console.log("[CLICK] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject); + + if (contextObject.getProperty("type") == "callActivity") { + var processDefinitonKey = contextObject.getProperty("processDefinitonKey"); + var processDefinitons = contextObject.getProperty("processDefinitons"); + var processDefiniton = processDefinitons[0]; + console.log("Load callActivity '" + processDefiniton.processDefinitionKey + "', contextObject: ", contextObject); + + // Load processDefinition + ProcessDiagramGenerator.drawDiagram(processDefiniton.processDefinitionId); + } + }, + rightClick: function(canvas, element, contextObject){ + var mouseEvent = this; + console.log("[RIGHTCLICK] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject); + }, + over: function(canvas, element, contextObject){ + var mouseEvent = this; + //console.log("[OVER] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject); + + // TODO: show tooltip-window with contextObject info + ProcessDiagramGenerator.showActivityInfo(contextObject); + }, + out: function(canvas, element, contextObject){ + var mouseEvent = this; + //console.log("[OUT] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject); + + ProcessDiagramGenerator.hideInfo(); + } + } + }; + + var baseUrl = window.document.location.protocol + "//" + window.document.location.host + "/"; + var shortenedUrl = window.document.location.href.replace(baseUrl, ""); + baseUrl = baseUrl + shortenedUrl.substring(0, shortenedUrl.indexOf("/")); + + ActivitiRest.options = { + processInstanceHighLightsUrl: baseUrl + "/service/process-instance/{processInstanceId}/highlights?callback=?", + processDefinitionUrl: baseUrl + "/service/process-definition/{processDefinitionId}/diagram-layout?callback=?", + processDefinitionByKeyUrl: baseUrl + "/service/process-definition/{processDefinitionKey}/diagram-layout?callback=?" + }; + + if (processDefinitionId) { + ProcessDiagramGenerator.drawDiagram(processDefinitionId); + + } else { + alert("processDefinitionId parameter is required"); + } +}); + + +</script> +</body> +</html> diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/ActivitiRest.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/ActivitiRest.js new file mode 100644 index 0000000..1eb274b --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/ActivitiRest.js @@ -0,0 +1,75 @@ +var ActivitiRest = { + options: {}, + getProcessDefinitionByKey: function(processDefinitionKey, callback) { + var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey}); + + $.ajax({ + url: url, + dataType: 'jsonp', + cache: false, + async: true, + success: function(data, textStatus) { + var processDefinition = data; + if (!processDefinition) { + console.error("Process definition '" + processDefinitionKey + "' not found"); + } else { + callback.apply({processDefinitionId: processDefinition.id}); + } + } + }).done(function(data, textStatus) { + console.log("ajax done"); + }).fail(function(jqXHR, textStatus, error){ + console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, 'error: ', error, jqXHR); + }); + }, + + getProcessDefinition: function(processDefinitionId, callback) { + var url = Lang.sub(this.options.processDefinitionUrl, {processDefinitionId: processDefinitionId}); + + $.ajax({ + url: url, + dataType: 'jsonp', + cache: false, + async: true, + success: function(data, textStatus) { + var processDefinitionDiagramLayout = data; + if (!processDefinitionDiagramLayout) { + console.error("Process definition diagram layout '" + processDefinitionId + "' not found"); + return; + } else { + callback.apply({processDefinitionDiagramLayout: processDefinitionDiagramLayout}); + } + } + }).done(function(data, textStatus) { + console.log("ajax done"); + }).fail(function(jqXHR, textStatus, error){ + console.log('Get diagram layout['+processDefinitionId+'] failure: ', textStatus, jqXHR); + }); + }, + + getHighLights: function(processInstanceId, callback) { + var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId}); + + $.ajax({ + url: url, + dataType: 'jsonp', + cache: false, + async: true, + success: function(data, textStatus) { + console.log("ajax returned data"); + var highLights = data; + if (!highLights) { + console.log("highLights not found"); + return; + } else { + callback.apply({highLights: highLights}); + } + } + }).done(function(data, textStatus) { + console.log("ajax done"); + }).fail(function(jqXHR, textStatus, error){ + console.log('Get HighLights['+processInstanceId+'] failure: ', textStatus, jqXHR); + }); + } +}; +//FHqq-3-1-3-5-9-6-7-9-0 \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/ActivityImpl.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/ActivityImpl.js new file mode 100644 index 0000000..f310211 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/ActivityImpl.js @@ -0,0 +1 @@ +/** * * @author Tom Baeyens * @author (Javascript) Dmitry Farafonov */ var ActivityImpl = function(activityJson){ this.outgoingTransitions = []; this.outgoingTransitions = []; this.incomingTransitions = []; this.activityBehavior = null; this.parent = null; this.isScope = false; this.isAsync = false; this.isExclusive = false; this.x = -1; this.y = -1; this.width = -1; this.height = -1; this.properties = {}; //console.log("activityJson: ", activityJson); if (activityJson != undefined) { this.setId(activityJson.activityId); for (var propertyName in activityJson.properties) { this.setProperty(propertyName, activityJson.properties[propertyName]); } //this.setProperty("name", activityJson.activityName); //this.setProperty("type", activityJson.activityType); this.setX(activityJson.x); this.setY(activityJson.y); this.setWidth(activityJson.width); this.setHeight(activityJson.height); if (activityJson.multiInstance) this.setProperty("multiInstance", activityJson.multiInstance); if (activityJson.collapsed) { this.setProperty("collapsed", activityJson.collapsed); } if (activityJson.isInterrupting != undefined) this.setProperty("isInterrupting", activityJson.isInterrupting); } }; ActivityImpl.prototype = { outgoingTransitions: [], outgoingTransitions: [], incomingTransitions: [], activityBehavior: null, parent: null, isScope: false, isAsync: false, isExclusive: false, id: null, properties: {}, // Graphical information x: -1, y: -1, width: -1, height: -1, setId: function(id){ this.id = id; }, getId: function(){ return this.id; }, setProperty: function(name, value){ this.properties[name] = value; }, getProperty: function(name){ return this.properties[name]; }, createOutgoingTransition: function(transitionId){ }, toString: function(id) { return "Activity("+id+")"; }, getParentActivity: function(){ /* if (parent instanceof ActivityImpl) { 79 return (ActivityImpl) parent; 80 } 81 return null; */ return this.parent; }, // restricted setters /////////////////////////////////////////////////////// setOutgoingTransitions: function(outgoingTransitions){ this.outgoingTransitions = outgoingTransitions; }, setParent: function(parent){ this.parent = parent; }, setIncomingTransitions: function(incomingTransitions){ this.incomingTransitions = incomingTransitions; }, // getters and setters ////////////////////////////////////////////////////// getOutgoingTransitions: function(){ return this.outgoingTransitions; }, getActivityBehavior: function(){ return this.activityBehavior; }, setActivityBehavior: function(activityBehavior){ this.activityBehavior = activityBehavior; }, getParent: function(){ return this.parent; }, getIncomingTransitions: function(){ return this.incomingTransitions; }, isScope: function(){ return this.isScope; }, setScope: function(isScope){ this.isScope = isScope; }, getX: function(){ return this.x; }, setX: function(x){ this.x = x; }, getY: function(){ return this.y; }, setY: function(y){ this.y = y; }, getWidth: function(){ return this.width; }, setWidth: function(width){ this.width = width; }, getHeight: function(){ return this.height; }, setHeight: function(height){ this.height = height; }, isAsync: function() { return this.isAsync; }, setAsync: function(isAsync) { this.isAsync = isAsync; }, isExclusive: function() { return this.isExclusive; }, setExclusive: function(isExclusive) { this.isExclusive = isExclusive; }, vvoid: function(){} }; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/Color.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/Color.js new file mode 100644 index 0000000..e57027e --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/Color.js @@ -0,0 +1,603 @@ +/** + * Web color table + * + * @author Dmitry Farafonov + */ + +var Color = { + /** + * The color white. In the default sRGB space. + */ + white : Raphael.getRGB("rgb(255,255,255)"), + + /** + * The color white. In the default sRGB space. + */ + WHITE : this.white, + + /** + * The color light gray. In the default sRGB space. + */ + lightGray : Raphael.getRGB("rgb(192, 192, 192)"), + + /** + * The color light gray. In the default sRGB space. + */ + LIGHT_GRAY : this.lightGray, + + /** + * The color gray. In the default sRGB space. + */ + gray : Raphael.getRGB("rgb(128, 128, 128)"), + + /** + * The color gray. In the default sRGB space. + */ + GRAY : this.gray, + + /** + * The color dark gray. In the default sRGB space. + */ + darkGray : Raphael.getRGB("rgb(64, 64, 64)"), + + /** + * The color dark gray. In the default sRGB space. + */ + DARK_GRAY : this.darkGray, + + /** + * The color black. In the default sRGB space. + */ + black : Raphael.getRGB("rgb(0, 0, 0)"), + + /** + * The color black. In the default sRGB space. + */ + BLACK : this.black, + + /** + * The color red. In the default sRGB space. + */ + red : Raphael.getRGB("rgb(255, 0, 0)"), + + /** + * The color red. In the default sRGB space. + */ + RED : this.red, + + /** + * The color pink. In the default sRGB space. + */ + pink : Raphael.getRGB("rgb(255, 175, 175)"), + + /** + * The color pink. In the default sRGB space. + */ + PINK : this.pink, + + /** + * The color orange. In the default sRGB space. + */ + orange : Raphael.getRGB("rgb(255, 200, 0)"), + + /** + * The color orange. In the default sRGB space. + */ + ORANGE : this.orange, + + /** + * The color yellow. In the default sRGB space. + */ + yellow : Raphael.getRGB("rgb(255, 255, 0)"), + + /** + * The color yellow. In the default sRGB space. + */ + YELLOW : this.yellow, + + /** + * The color green. In the default sRGB space. + */ + green : Raphael.getRGB("rgb(0, 255, 0)"), + + /** + * The color green. In the default sRGB space. + */ + GREEN : this.green, + + /** + * The color magenta. In the default sRGB space. + */ + magenta : Raphael.getRGB("rgb(255, 0, 255)"), + + /** + * The color magenta. In the default sRGB space. + */ + MAGENTA : this.magenta, + + /** + * The color cyan. In the default sRGB space. + */ + cyan : Raphael.getRGB("rgb(0, 255, 255)"), + + /** + * The color cyan. In the default sRGB space. + */ + CYAN : this.cyan, + + /** + * The color blue. In the default sRGB space. + */ + blue : Raphael.getRGB("rgb(0, 0, 255)"), + + /** + * The color blue. In the default sRGB space. + */ + BLUE : this.blue, + + /************************************************************************/ + + // http://www.stm.dp.ua/web-design/color-html.php + + Snow : Raphael.getRGB("#FFFAFA "), // 255 250 250 + GhostWhite : Raphael.getRGB("#F8F8FF "), // 248 248 255 + WhiteSmoke : Raphael.getRGB("#F5F5F5 "), // 245 245 245 + Gainsboro : Raphael.getRGB("#DCDCDC "), // 220 220 220 + FloralWhite : Raphael.getRGB("#FFFAF0 "), // 255 250 240 + OldLace : Raphael.getRGB("#FDF5E6 "), // 253 245 230 + Linen : Raphael.getRGB("#FAF0E6 "), // 250 240 230 + AntiqueWhite : Raphael.getRGB("#FAEBD7 "), // 250 235 215 + PapayaWhip : Raphael.getRGB("#FFEFD5 "), // 255 239 213 + BlanchedAlmond : Raphael.getRGB("#FFEBCD "), // 255 235 205 + Bisque : Raphael.getRGB("#FFE4C4 "), // 255 228 196 + PeachPuff : Raphael.getRGB("#FFDAB9 "), // 255 218 185 + NavajoWhite : Raphael.getRGB("#FFDEAD "), // 255 222 173 + Moccasin : Raphael.getRGB("#FFE4B5 "), // 255 228 181 + Cornsilk : Raphael.getRGB("#FFF8DC "), // 255 248 220 + Ivory : Raphael.getRGB("#FFFFF0 "), // 255 255 240 + LemonChiffon : Raphael.getRGB("#FFFACD "), // 255 250 205 + Seashell : Raphael.getRGB("#FFF5EE "), // 255 245 238 + Honeydew : Raphael.getRGB("#F0FFF0 "), // 240 255 240 + MintCream : Raphael.getRGB("#F5FFFA "), // 245 255 250 + Azure : Raphael.getRGB("#F0FFFF "), // 240 255 255 + AliceBlue : Raphael.getRGB("#F0F8FF "), // 240 248 255 + lavender : Raphael.getRGB("#E6E6FA "), // 230 230 250 + LavenderBlush : Raphael.getRGB("#FFF0F5 "), // 255 240 245 + MistyRose : Raphael.getRGB("#FFE4E1 "), // 255 228 225 + White : Raphael.getRGB("#FFFFFF "), // 255 255 255 + Black : Raphael.getRGB("#000000 "), // 0 0 0 + DarkSlateGray : Raphael.getRGB("#2F4F4F "), // 47 79 79 + DimGrey : Raphael.getRGB("#696969 "), // 105 105 105 + SlateGrey : Raphael.getRGB("#708090 "), // 112 128 144 + LightSlateGray : Raphael.getRGB("#778899 "), // 119 136 153 + Grey : Raphael.getRGB("#BEBEBE "), // 190 190 190 + LightGray : Raphael.getRGB("#D3D3D3 "), // 211 211 211 + MidnightBlue : Raphael.getRGB("#191970 "), // 25 25 112 + NavyBlue : Raphael.getRGB("#000080 "), // 0 0 128 + CornflowerBlue : Raphael.getRGB("#6495ED "), // 100 149 237 + DarkSlateBlue : Raphael.getRGB("#483D8B "), // 72 61 139 + SlateBlue : Raphael.getRGB("#6A5ACD "), // 106 90 205 + MediumSlateBlue : Raphael.getRGB("#7B68EE "), // 123 104 238 + LightSlateBlue : Raphael.getRGB("#8470FF "), // 132 112 255 + MediumBlue : Raphael.getRGB("#0000CD "), // 0 0 205 + RoyalBlue : Raphael.getRGB("#4169E1 "), // 65 105 225 + Blue : Raphael.getRGB("#0000FF "), // 0 0 255 + DodgerBlue : Raphael.getRGB("#1E90FF "), // 30 144 255 + DeepSkyBlue : Raphael.getRGB("#00BFFF "), // 0 191 255 + SkyBlue : Raphael.getRGB("#87CEEB "), // 135 206 235 + LightSkyBlue : Raphael.getRGB("#87CEFA "), // 135 206 250 + SteelBlue : Raphael.getRGB("#4682B4 "), // 70 130 180 + LightSteelBlue : Raphael.getRGB("#B0C4DE "), // 176 196 222 + LightBlue : Raphael.getRGB("#ADD8E6 "), // 173 216 230 + PowderBlue : Raphael.getRGB("#B0E0E6 "), // 176 224 230 + PaleTurquoise : Raphael.getRGB("#AFEEEE "), // 175 238 238 + DarkTurquoise : Raphael.getRGB("#00CED1 "), // 0 206 209 + MediumTurquoise : Raphael.getRGB("#48D1CC "), // 72 209 204 + Turquoise : Raphael.getRGB("#40E0D0 "), // 64 224 208 + Cyan : Raphael.getRGB("#00FFFF "), // 0 255 255 + LightCyan : Raphael.getRGB("#E0FFFF "), // 224 255 255 + CadetBlue : Raphael.getRGB("#5F9EA0 "), // 95 158 160 + MediumAquamarine: Raphael.getRGB("#66CDAA "), // 102 205 170 + Aquamarine : Raphael.getRGB("#7FFFD4 "), // 127 255 212 + DarkGreen : Raphael.getRGB("#006400 "), // 0 100 0 + DarkOliveGreen : Raphael.getRGB("#556B2F "), // 85 107 47 + DarkSeaGreen : Raphael.getRGB("#8FBC8F "), // 143 188 143 + SeaGreen : Raphael.getRGB("#2E8B57 "), // 46 139 87 + MediumSeaGreen : Raphael.getRGB("#3CB371 "), // 60 179 113 + LightSeaGreen : Raphael.getRGB("#20B2AA "), // 32 178 170 + PaleGreen : Raphael.getRGB("#98FB98 "), // 152 251 152 + SpringGreen : Raphael.getRGB("#00FF7F "), // 0 255 127 + LawnGreen : Raphael.getRGB("#7CFC00 "), // 124 252 0 + Green : Raphael.getRGB("#00FF00 "), // 0 255 0 + Chartreuse : Raphael.getRGB("#7FFF00 "), // 127 255 0 + MedSpringGreen : Raphael.getRGB("#00FA9A "), // 0 250 154 + GreenYellow : Raphael.getRGB("#ADFF2F "), // 173 255 47 + LimeGreen : Raphael.getRGB("#32CD32 "), // 50 205 50 + YellowGreen : Raphael.getRGB("#9ACD32 "), // 154 205 50 + ForestGreen : Raphael.getRGB("#228B22 "), // 34 139 34 + OliveDrab : Raphael.getRGB("#6B8E23 "), // 107 142 35 + DarkKhaki : Raphael.getRGB("#BDB76B "), // 189 183 107 + PaleGoldenrod : Raphael.getRGB("#EEE8AA "), // 238 232 170 + LtGoldenrodYello: Raphael.getRGB("#FAFAD2 "), // 250 250 210 + LightYellow : Raphael.getRGB("#FFFFE0 "), // 255 255 224 + Yellow : Raphael.getRGB("#FFFF00 "), // 255 255 0 + Gold : Raphael.getRGB("#FFD700 "), // 255 215 0 + LightGoldenrod : Raphael.getRGB("#EEDD82 "), // 238 221 130 + goldenrod : Raphael.getRGB("#DAA520 "), // 218 165 32 + DarkGoldenrod : Raphael.getRGB("#B8860B "), // 184 134 11 + RosyBrown : Raphael.getRGB("#BC8F8F "), // 188 143 143 + IndianRed : Raphael.getRGB("#CD5C5C "), // 205 92 92 + SaddleBrown : Raphael.getRGB("#8B4513 "), // 139 69 19 + Sienna : Raphael.getRGB("#A0522D "), // 160 82 45 + Peru : Raphael.getRGB("#CD853F "), // 205 133 63 + Burlywood : Raphael.getRGB("#DEB887 "), // 222 184 135 + Beige : Raphael.getRGB("#F5F5DC "), // 245 245 220 + Wheat : Raphael.getRGB("#F5DEB3 "), // 245 222 179 + SandyBrown : Raphael.getRGB("#F4A460 "), // 244 164 96 + Tan : Raphael.getRGB("#D2B48C "), // 210 180 140 + Chocolate : Raphael.getRGB("#D2691E "), // 210 105 30 + Firebrick : Raphael.getRGB("#B22222 "), // 178 34 34 + Brown : Raphael.getRGB("#A52A2A "), // 165 42 42 + DarkSalmon : Raphael.getRGB("#E9967A "), // 233 150 122 + Salmon : Raphael.getRGB("#FA8072 "), // 250 128 114 + LightSalmon : Raphael.getRGB("#FFA07A "), // 255 160 122 + Orange : Raphael.getRGB("#FFA500 "), // 255 165 0 + DarkOrange : Raphael.getRGB("#FF8C00 "), // 255 140 0 + Coral : Raphael.getRGB("#FF7F50 "), // 255 127 80 + LightCoral : Raphael.getRGB("#F08080 "), // 240 128 128 + Tomato : Raphael.getRGB("#FF6347 "), // 255 99 71 + OrangeRed : Raphael.getRGB("#FF4500 "), // 255 69 0 + Red : Raphael.getRGB("#FF0000 "), // 255 0 0 + HotPink : Raphael.getRGB("#FF69B4 "), // 255 105 180 + DeepPink : Raphael.getRGB("#FF1493 "), // 255 20 147 + Pink : Raphael.getRGB("#FFC0CB "), // 255 192 203 + LightPink : Raphael.getRGB("#FFB6C1 "), // 255 182 193 + PaleVioletRed : Raphael.getRGB("#DB7093 "), // 219 112 147 + Maroon : Raphael.getRGB("#B03060 "), // 176 48 96 + MediumVioletRed : Raphael.getRGB("#C71585 "), // 199 21 133 + VioletRed : Raphael.getRGB("#D02090 "), // 208 32 144 + Magenta : Raphael.getRGB("#FF00FF "), // 255 0 255 + Violet : Raphael.getRGB("#EE82EE "), // 238 130 238 + Plum : Raphael.getRGB("#DDA0DD "), // 221 160 221 + Orchid : Raphael.getRGB("#DA70D6 "), // 218 112 214 + MediumOrchid : Raphael.getRGB("#BA55D3 "), // 186 85 211 + DarkOrchid : Raphael.getRGB("#9932CC "), // 153 50 204 + DarkViolet : Raphael.getRGB("#9400D3 "), // 148 0 211 + BlueViolet : Raphael.getRGB("#8A2BE2 "), // 138 43 226 + Purple : Raphael.getRGB("#A020F0 "), // 160 32 240 + MediumPurple : Raphael.getRGB("#9370DB "), // 147 112 219 + Thistle : Raphael.getRGB("#D8BFD8 "), // 216 191 216 + Snow1 : Raphael.getRGB("#FFFAFA "), // 255 250 250 + Snow2 : Raphael.getRGB("#EEE9E9 "), // 238 233 233 + Snow3 : Raphael.getRGB("#CDC9C9 "), // 205 201 201 + Snow4 : Raphael.getRGB("#8B8989 "), // 139 137 137 + Seashell1 : Raphael.getRGB("#FFF5EE "), // 255 245 238 + Seashell2 : Raphael.getRGB("#EEE5DE "), // 238 229 222 + Seashell3 : Raphael.getRGB("#CDC5BF "), // 205 197 191 + Seashell4 : Raphael.getRGB("#8B8682 "), // 139 134 130 + AntiqueWhite1 : Raphael.getRGB("#FFEFDB "), // 255 239 219 + AntiqueWhite2 : Raphael.getRGB("#EEDFCC "), // 238 223 204 + AntiqueWhite3 : Raphael.getRGB("#CDC0B0 "), // 205 192 176 + AntiqueWhite4 : Raphael.getRGB("#8B8378 "), // 139 131 120 + Bisque1 : Raphael.getRGB("#FFE4C4 "), // 255 228 196 + Bisque2 : Raphael.getRGB("#EED5B7 "), // 238 213 183 + Bisque3 : Raphael.getRGB("#CDB79E "), // 205 183 158 + Bisque4 : Raphael.getRGB("#8B7D6B "), // 139 125 107 + PeachPuff1 : Raphael.getRGB("#FFDAB9 "), // 255 218 185 + PeachPuff2 : Raphael.getRGB("#EECBAD "), // 238 203 173 + PeachPuff3 : Raphael.getRGB("#CDAF95 "), // 205 175 149 + PeachPuff4 : Raphael.getRGB("#8B7765 "), // 139 119 101 + NavajoWhite1 : Raphael.getRGB("#FFDEAD "), // 255 222 173 + NavajoWhite2 : Raphael.getRGB("#EECFA1 "), // 238 207 161 + NavajoWhite3 : Raphael.getRGB("#CDB38B "), // 205 179 139 + NavajoWhite4 : Raphael.getRGB("#8B795E "), // 139 121 94 + LemonChiffon1 : Raphael.getRGB("#FFFACD "), // 255 250 205 + LemonChiffon2 : Raphael.getRGB("#EEE9BF "), // 238 233 191 + LemonChiffon3 : Raphael.getRGB("#CDC9A5 "), // 205 201 165 + LemonChiffon4 : Raphael.getRGB("#8B8970 "), // 139 137 112 + Cornsilk1 : Raphael.getRGB("#FFF8DC "), // 255 248 220 + Cornsilk2 : Raphael.getRGB("#EEE8CD "), // 238 232 205 + Cornsilk3 : Raphael.getRGB("#CDC8B1 "), // 205 200 177 + Cornsilk4 : Raphael.getRGB("#8B8878 "), // 139 136 120 + Ivory1 : Raphael.getRGB("#FFFFF0 "), // 255 255 240 + Ivory2 : Raphael.getRGB("#EEEEE0 "), // 238 238 224 + Ivory3 : Raphael.getRGB("#CDCDC1 "), // 205 205 193 + Ivory4 : Raphael.getRGB("#8B8B83 "), // 139 139 131 + Honeydew1 : Raphael.getRGB("#F0FFF0 "), // 240 255 240 + Honeydew2 : Raphael.getRGB("#E0EEE0 "), // 224 238 224 + Honeydew3 : Raphael.getRGB("#C1CDC1 "), // 193 205 193 + Honeydew4 : Raphael.getRGB("#838B83 "), // 131 139 131 + LavenderBlush1 : Raphael.getRGB("#FFF0F5 "), // 255 240 245 + LavenderBlush2 : Raphael.getRGB("#EEE0E5 "), // 238 224 229 + LavenderBlush3 : Raphael.getRGB("#CDC1C5 "), // 205 193 197 + LavenderBlush4 : Raphael.getRGB("#8B8386 "), // 139 131 134 + MistyRose1 : Raphael.getRGB("#FFE4E1 "), // 255 228 225 + MistyRose2 : Raphael.getRGB("#EED5D2 "), // 238 213 210 + MistyRose3 : Raphael.getRGB("#CDB7B5 "), // 205 183 181 + MistyRose4 : Raphael.getRGB("#8B7D7B "), // 139 125 123 + Azure1 : Raphael.getRGB("#F0FFFF "), // 240 255 255 + Azure2 : Raphael.getRGB("#E0EEEE "), // 224 238 238 + Azure3 : Raphael.getRGB("#C1CDCD "), // 193 205 205 + Azure4 : Raphael.getRGB("#838B8B "), // 131 139 139 + SlateBlue1 : Raphael.getRGB("#836FFF "), // 131 111 255 + SlateBlue2 : Raphael.getRGB("#7A67EE "), // 122 103 238 + SlateBlue3 : Raphael.getRGB("#6959CD "), // 105 89 205 + SlateBlue4 : Raphael.getRGB("#473C8B "), // 71 60 139 + RoyalBlue1 : Raphael.getRGB("#4876FF "), // 72 118 255 + RoyalBlue2 : Raphael.getRGB("#436EEE "), // 67 110 238 + RoyalBlue3 : Raphael.getRGB("#3A5FCD "), // 58 95 205 + RoyalBlue4 : Raphael.getRGB("#27408B "), // 39 64 139 + Blue1 : Raphael.getRGB("#0000FF "), // 0 0 255 + Blue2 : Raphael.getRGB("#0000EE "), // 0 0 238 + Blue3 : Raphael.getRGB("#0000CD "), // 0 0 205 + Blue4 : Raphael.getRGB("#00008B "), // 0 0 139 + DodgerBlue1 : Raphael.getRGB("#1E90FF "), // 30 144 255 + DodgerBlue2 : Raphael.getRGB("#1C86EE "), // 28 134 238 + DodgerBlue3 : Raphael.getRGB("#1874CD "), // 24 116 205 + DodgerBlue4 : Raphael.getRGB("#104E8B "), // 16 78 139 + SteelBlue1 : Raphael.getRGB("#63B8FF "), // 99 184 255 + SteelBlue2 : Raphael.getRGB("#5CACEE "), // 92 172 238 + SteelBlue3 : Raphael.getRGB("#4F94CD "), // 79 148 205 + SteelBlue4 : Raphael.getRGB("#36648B "), // 54 100 139 + DeepSkyBlue1 : Raphael.getRGB("#00BFFF "), // 0 191 255 + DeepSkyBlue2 : Raphael.getRGB("#00B2EE "), // 0 178 238 + DeepSkyBlue3 : Raphael.getRGB("#009ACD "), // 0 154 205 + DeepSkyBlue4 : Raphael.getRGB("#00688B "), // 0 104 139 + SkyBlue1 : Raphael.getRGB("#87CEFF "), // 135 206 255 + SkyBlue2 : Raphael.getRGB("#7EC0EE "), // 126 192 238 + SkyBlue3 : Raphael.getRGB("#6CA6CD "), // 108 166 205 + SkyBlue4 : Raphael.getRGB("#4A708B "), // 74 112 139 + LightSkyBlue1 : Raphael.getRGB("#B0E2FF "), // 176 226 255 + LightSkyBlue2 : Raphael.getRGB("#A4D3EE "), // 164 211 238 + LightSkyBlue3 : Raphael.getRGB("#8DB6CD "), // 141 182 205 + LightSkyBlue4 : Raphael.getRGB("#607B8B "), // 96 123 139 + SlateGray1 : Raphael.getRGB("#C6E2FF "), // 198 226 255 + SlateGray2 : Raphael.getRGB("#B9D3EE "), // 185 211 238 + SlateGray3 : Raphael.getRGB("#9FB6CD "), // 159 182 205 + SlateGray4 : Raphael.getRGB("#6C7B8B "), // 108 123 139 + LightSteelBlue1 : Raphael.getRGB("#CAE1FF "), // 202 225 255 + LightSteelBlue2 : Raphael.getRGB("#BCD2EE "), // 188 210 238 + LightSteelBlue3 : Raphael.getRGB("#A2B5CD "), // 162 181 205 + LightSteelBlue4 : Raphael.getRGB("#6E7B8B "), // 110 123 139 + LightBlue1 : Raphael.getRGB("#BFEFFF "), // 191 239 255 + LightBlue2 : Raphael.getRGB("#B2DFEE "), // 178 223 238 + LightBlue3 : Raphael.getRGB("#9AC0CD "), // 154 192 205 + LightBlue4 : Raphael.getRGB("#68838B "), // 104 131 139 + LightCyan1 : Raphael.getRGB("#E0FFFF "), // 224 255 255 + LightCyan2 : Raphael.getRGB("#D1EEEE "), // 209 238 238 + LightCyan3 : Raphael.getRGB("#B4CDCD "), // 180 205 205 + LightCyan4 : Raphael.getRGB("#7A8B8B "), // 122 139 139 + PaleTurquoise1 : Raphael.getRGB("#BBFFFF "), // 187 255 255 + PaleTurquoise2 : Raphael.getRGB("#AEEEEE "), // 174 238 238 + PaleTurquoise3 : Raphael.getRGB("#96CDCD "), // 150 205 205 + PaleTurquoise4 : Raphael.getRGB("#668B8B "), // 102 139 139 + CadetBlue1 : Raphael.getRGB("#98F5FF "), // 152 245 255 + CadetBlue2 : Raphael.getRGB("#8EE5EE "), // 142 229 238 + CadetBlue3 : Raphael.getRGB("#7AC5CD "), // 122 197 205 + CadetBlue4 : Raphael.getRGB("#53868B "), // 83 134 139 + Turquoise1 : Raphael.getRGB("#00F5FF "), // 0 245 255 + Turquoise2 : Raphael.getRGB("#00E5EE "), // 0 229 238 + Turquoise3 : Raphael.getRGB("#00C5CD "), // 0 197 205 + Turquoise4 : Raphael.getRGB("#00868B "), // 0 134 139 + Cyan1 : Raphael.getRGB("#00FFFF "), // 0 255 255 + Cyan2 : Raphael.getRGB("#00EEEE "), // 0 238 238 + Cyan3 : Raphael.getRGB("#00CDCD "), // 0 205 205 + Cyan4 : Raphael.getRGB("#008B8B "), // 0 139 139 + DarkSlateGray1 : Raphael.getRGB("#97FFFF "), // 151 255 255 + DarkSlateGray2 : Raphael.getRGB("#8DEEEE "), // 141 238 238 + DarkSlateGray3 : Raphael.getRGB("#79CDCD "), // 121 205 205 + DarkSlateGray4 : Raphael.getRGB("#528B8B "), // 82 139 139 + Aquamarine1 : Raphael.getRGB("#7FFFD4 "), // 127 255 212 + Aquamarine2 : Raphael.getRGB("#76EEC6 "), // 118 238 198 + Aquamarine3 : Raphael.getRGB("#66CDAA "), // 102 205 170 + Aquamarine4 : Raphael.getRGB("#458B74 "), // 69 139 116 + DarkSeaGreen1 : Raphael.getRGB("#C1FFC1 "), // 193 255 193 + DarkSeaGreen2 : Raphael.getRGB("#B4EEB4 "), // 180 238 180 + DarkSeaGreen3 : Raphael.getRGB("#9BCD9B "), // 155 205 155 + DarkSeaGreen4 : Raphael.getRGB("#698B69 "), // 105 139 105 + SeaGreen1 : Raphael.getRGB("#54FF9F "), // 84 255 159 + SeaGreen2 : Raphael.getRGB("#4EEE94 "), // 78 238 148 + SeaGreen3 : Raphael.getRGB("#43CD80 "), // 67 205 128 + SeaGreen4 : Raphael.getRGB("#2E8B57 "), // 46 139 87 + PaleGreen1 : Raphael.getRGB("#9AFF9A "), // 154 255 154 + PaleGreen2 : Raphael.getRGB("#90EE90 "), // 144 238 144 + PaleGreen3 : Raphael.getRGB("#7CCD7C "), // 124 205 124 + PaleGreen4 : Raphael.getRGB("#548B54 "), // 84 139 84 + SpringGreen1 : Raphael.getRGB("#00FF7F "), // 0 255 127 + SpringGreen2 : Raphael.getRGB("#00EE76 "), // 0 238 118 + SpringGreen3 : Raphael.getRGB("#00CD66 "), // 0 205 102 + SpringGreen4 : Raphael.getRGB("#008B45 "), // 0 139 69 + Green1 : Raphael.getRGB("#00FF00 "), // 0 255 0 + Green2 : Raphael.getRGB("#00EE00 "), // 0 238 0 + Green3 : Raphael.getRGB("#00CD00 "), // 0 205 0 + Green4 : Raphael.getRGB("#008B00 "), // 0 139 0 + Chartreuse1 : Raphael.getRGB("#7FFF00 "), // 127 255 0 + Chartreuse2 : Raphael.getRGB("#76EE00 "), // 118 238 0 + Chartreuse3 : Raphael.getRGB("#66CD00 "), // 102 205 0 + Chartreuse4 : Raphael.getRGB("#458B00 "), // 69 139 0 + OliveDrab1 : Raphael.getRGB("#C0FF3E "), // 192 255 62 + OliveDrab2 : Raphael.getRGB("#B3EE3A "), // 179 238 58 + OliveDrab3 : Raphael.getRGB("#9ACD32 "), // 154 205 50 + OliveDrab4 : Raphael.getRGB("#698B22 "), // 105 139 34 + DarkOliveGreen1 : Raphael.getRGB("#CAFF70 "), // 202 255 112 + DarkOliveGreen2 : Raphael.getRGB("#BCEE68 "), // 188 238 104 + DarkOliveGreen3 : Raphael.getRGB("#A2CD5A "), // 162 205 90 + DarkOliveGreen4 : Raphael.getRGB("#6E8B3D "), // 110 139 61 + Khaki1 : Raphael.getRGB("#FFF68F "), // 255 246 143 + Khaki2 : Raphael.getRGB("#EEE685 "), // 238 230 133 + Khaki3 : Raphael.getRGB("#CDC673 "), // 205 198 115 + Khaki4 : Raphael.getRGB("#8B864E "), // 139 134 78 + LightGoldenrod1 : Raphael.getRGB("#FFEC8B "), // 255 236 139 + LightGoldenrod2 : Raphael.getRGB("#EEDC82 "), // 238 220 130 + LightGoldenrod3 : Raphael.getRGB("#CDBE70 "), // 205 190 112 + LightGoldenrod4 : Raphael.getRGB("#8B814C "), // 139 129 76 + LightYellow1 : Raphael.getRGB("#FFFFE0 "), // 255 255 224 + LightYellow2 : Raphael.getRGB("#EEEED1 "), // 238 238 209 + LightYellow3 : Raphael.getRGB("#CDCDB4 "), // 205 205 180 + LightYellow4 : Raphael.getRGB("#8B8B7A "), // 139 139 122 + Yellow1 : Raphael.getRGB("#FFFF00 "), // 255 255 0 + Yellow2 : Raphael.getRGB("#EEEE00 "), // 238 238 0 + Yellow3 : Raphael.getRGB("#CDCD00 "), // 205 205 0 + Yellow4 : Raphael.getRGB("#8B8B00 "), // 139 139 0 + Gold1 : Raphael.getRGB("#FFD700 "), // 255 215 0 + Gold2 : Raphael.getRGB("#EEC900 "), // 238 201 0 + Gold3 : Raphael.getRGB("#CDAD00 "), // 205 173 0 + Gold4 : Raphael.getRGB("#8B7500 "), // 139 117 0 + Goldenrod1 : Raphael.getRGB("#FFC125 "), // 255 193 37 + Goldenrod2 : Raphael.getRGB("#EEB422 "), // 238 180 34 + Goldenrod3 : Raphael.getRGB("#CD9B1D "), // 205 155 29 + Goldenrod4 : Raphael.getRGB("#8B6914 "), // 139 105 20 + DarkGoldenrod1 : Raphael.getRGB("#FFB90F "), // 255 185 15 + DarkGoldenrod2 : Raphael.getRGB("#EEAD0E "), // 238 173 14 + DarkGoldenrod3 : Raphael.getRGB("#CD950C "), // 205 149 12 + DarkGoldenrod4 : Raphael.getRGB("#8B658B "), // 139 101 8 + RosyBrown1 : Raphael.getRGB("#FFC1C1 "), // 255 193 193 + RosyBrown2 : Raphael.getRGB("#EEB4B4 "), // 238 180 180 + RosyBrown3 : Raphael.getRGB("#CD9B9B "), // 205 155 155 + RosyBrown4 : Raphael.getRGB("#8B6969 "), // 139 105 105 + IndianRed1 : Raphael.getRGB("#FF6A6A "), // 255 106 106 + IndianRed2 : Raphael.getRGB("#EE6363 "), // 238 99 99 + IndianRed3 : Raphael.getRGB("#CD5555 "), // 205 85 85 + IndianRed4 : Raphael.getRGB("#8B3A3A "), // 139 58 58 + Sienna1 : Raphael.getRGB("#FF8247 "), // 255 130 71 + Sienna2 : Raphael.getRGB("#EE7942 "), // 238 121 66 + Sienna3 : Raphael.getRGB("#CD6839 "), // 205 104 57 + Sienna4 : Raphael.getRGB("#8B4726 "), // 139 71 38 + Burlywood1 : Raphael.getRGB("#FFD39B "), // 255 211 155 + Burlywood2 : Raphael.getRGB("#EEC591 "), // 238 197 145 + Burlywood3 : Raphael.getRGB("#CDAA7D "), // 205 170 125 + Burlywood4 : Raphael.getRGB("#8B7355 "), // 139 115 85 + Wheat1 : Raphael.getRGB("#FFE7BA "), // 255 231 186 + Wheat2 : Raphael.getRGB("#EED8AE "), // 238 216 174 + Wheat3 : Raphael.getRGB("#CDBA96 "), // 205 186 150 + Wheat4 : Raphael.getRGB("#8B7E66 "), // 139 126 102 + Tan1 : Raphael.getRGB("#FFA54F "), // 255 165 79 + Tan2 : Raphael.getRGB("#EE9A49 "), // 238 154 73 + Tan3 : Raphael.getRGB("#CD853F "), // 205 133 63 + Tan4 : Raphael.getRGB("#8B5A2B "), // 139 90 43 + Chocolate1 : Raphael.getRGB("#FF7F24 "), // 255 127 36 + Chocolate2 : Raphael.getRGB("#EE7621 "), // 238 118 33 + Chocolate3 : Raphael.getRGB("#CD661D "), // 205 102 29 + Chocolate4 : Raphael.getRGB("#8B4513 "), // 139 69 19 + Firebrick1 : Raphael.getRGB("#FF3030 "), // 255 48 48 + Firebrick2 : Raphael.getRGB("#EE2C2C "), // 238 44 44 + Firebrick3 : Raphael.getRGB("#CD2626 "), // 205 38 38 + Firebrick4 : Raphael.getRGB("#8B1A1A "), // 139 26 26 + Brown1 : Raphael.getRGB("#FF4040 "), // 255 64 64 + Brown2 : Raphael.getRGB("#EE3B3B "), // 238 59 59 + Brown3 : Raphael.getRGB("#CD3333 "), // 205 51 51 + Brown4 : Raphael.getRGB("#8B2323 "), // 139 35 35 + Salmon1 : Raphael.getRGB("#FF8C69 "), // 255 140 105 + Salmon2 : Raphael.getRGB("#EE8262 "), // 238 130 98 + Salmon3 : Raphael.getRGB("#CD7054 "), // 205 112 84 + Salmon4 : Raphael.getRGB("#8B4C39 "), // 139 76 57 + LightSalmon1 : Raphael.getRGB("#FFA07A "), // 255 160 122 + LightSalmon2 : Raphael.getRGB("#EE9572 "), // 238 149 114 + LightSalmon3 : Raphael.getRGB("#CD8162 "), // 205 129 98 + LightSalmon4 : Raphael.getRGB("#8B5742 "), // 139 87 66 + Orange1 : Raphael.getRGB("#FFA500 "), // 255 165 0 + Orange2 : Raphael.getRGB("#EE9A00 "), // 238 154 0 + Orange3 : Raphael.getRGB("#CD8500 "), // 205 133 0 + Orange4 : Raphael.getRGB("#8B5A00 "), // 139 90 0 + DarkOrange1 : Raphael.getRGB("#FF7F00 "), // 255 127 0 + DarkOrange2 : Raphael.getRGB("#EE7600 "), // 238 118 0 + DarkOrange3 : Raphael.getRGB("#CD6600 "), // 205 102 0 + DarkOrange4 : Raphael.getRGB("#8B4500 "), // 139 69 0 + Coral1 : Raphael.getRGB("#FF7256 "), // 255 114 86 + Coral2 : Raphael.getRGB("#EE6A50 "), // 238 106 80 + Coral3 : Raphael.getRGB("#CD5B45 "), // 205 91 69 + Coral4 : Raphael.getRGB("#8B3E2F "), // 139 62 47 + Tomato1 : Raphael.getRGB("#FF6347 "), // 255 99 71 + Tomato2 : Raphael.getRGB("#EE5C42 "), // 238 92 66 + Tomato3 : Raphael.getRGB("#CD4F39 "), // 205 79 57 + Tomato4 : Raphael.getRGB("#8B3626 "), // 139 54 38 + OrangeRed1 : Raphael.getRGB("#FF4500 "), // 255 69 0 + OrangeRed2 : Raphael.getRGB("#EE4000 "), // 238 64 0 + OrangeRed3 : Raphael.getRGB("#CD3700 "), // 205 55 0 + OrangeRed4 : Raphael.getRGB("#8B2500 "), // 139 37 0 + Red1 : Raphael.getRGB("#FF0000 "), // 255 0 0 + Red2 : Raphael.getRGB("#EE0000 "), // 238 0 0 + Red3 : Raphael.getRGB("#CD0000 "), // 205 0 0 + Red4 : Raphael.getRGB("#8B0000 "), // 139 0 0 + DeepPink1 : Raphael.getRGB("#FF1493 "), // 255 20 147 + DeepPink2 : Raphael.getRGB("#EE1289 "), // 238 18 137 + DeepPink3 : Raphael.getRGB("#CD1076 "), // 205 16 118 + DeepPink4 : Raphael.getRGB("#8B0A50 "), // 139 10 80 + HotPink1 : Raphael.getRGB("#FF6EB4 "), // 255 110 180 + HotPink2 : Raphael.getRGB("#EE6AA7 "), // 238 106 167 + HotPink3 : Raphael.getRGB("#CD6090 "), // 205 96 144 + HotPink4 : Raphael.getRGB("#8B3A62 "), // 139 58 98 + Pink1 : Raphael.getRGB("#FFB5C5 "), // 255 181 197 + Pink2 : Raphael.getRGB("#EEA9B8 "), // 238 169 184 + Pink3 : Raphael.getRGB("#CD919E "), // 205 145 158 + Pink4 : Raphael.getRGB("#8B636C "), // 139 99 108 + LightPink1 : Raphael.getRGB("#FFAEB9 "), // 255 174 185 + LightPink2 : Raphael.getRGB("#EEA2AD "), // 238 162 173 + LightPink3 : Raphael.getRGB("#CD8C95 "), // 205 140 149 + LightPink4 : Raphael.getRGB("#8B5F65 "), // 139 95 101 + PaleVioletRed1 : Raphael.getRGB("#FF82AB "), // 255 130 171 + PaleVioletRed2 : Raphael.getRGB("#EE799F "), // 238 121 159 + PaleVioletRed3 : Raphael.getRGB("#CD6889 "), // 205 104 137 + PaleVioletRed4 : Raphael.getRGB("#8B475D "), // 139 71 93 + Maroon1 : Raphael.getRGB("#FF34B3 "), // 255 52 179 + Maroon2 : Raphael.getRGB("#EE30A7 "), // 238 48 167 + Maroon3 : Raphael.getRGB("#CD2990 "), // 205 41 144 + Maroon4 : Raphael.getRGB("#8B1C62 "), // 139 28 98 + VioletRed1 : Raphael.getRGB("#FF3E96 "), // 255 62 150 + VioletRed2 : Raphael.getRGB("#EE3A8C "), // 238 58 140 + VioletRed3 : Raphael.getRGB("#CD3278 "), // 205 50 120 + VioletRed4 : Raphael.getRGB("#8B2252 "), // 139 34 82 + Magenta1 : Raphael.getRGB("#FF00FF "), // 255 0 255 + Magenta2 : Raphael.getRGB("#EE00EE "), // 238 0 238 + Magenta3 : Raphael.getRGB("#CD00CD "), // 205 0 205 + Magenta4 : Raphael.getRGB("#8B008B "), // 139 0 139 + Orchid1 : Raphael.getRGB("#FF83FA "), // 255 131 250 + Orchid2 : Raphael.getRGB("#EE7AE9 "), // 238 122 233 + Orchid3 : Raphael.getRGB("#CD69C9 "), // 205 105 201 + Orchid4 : Raphael.getRGB("#8B4789 "), // 139 71 137 + Plum1 : Raphael.getRGB("#FFBBFF "), // 255 187 255 + Plum2 : Raphael.getRGB("#EEAEEE "), // 238 174 238 + Plum3 : Raphael.getRGB("#CD96CD "), // 205 150 205 + Plum4 : Raphael.getRGB("#8B668B "), // 139 102 139 + MediumOrchid1 : Raphael.getRGB("#E066FF "), // 224 102 255 + MediumOrchid2 : Raphael.getRGB("#D15FEE "), // 209 95 238 + MediumOrchid3 : Raphael.getRGB("#B452CD "), // 180 82 205 + MediumOrchid4 : Raphael.getRGB("#7A378B "), // 122 55 139 + DarkOrchid1 : Raphael.getRGB("#BF3EFF "), // 191 62 255 + DarkOrchid2 : Raphael.getRGB("#B23AEE "), // 178 58 238 + DarkOrchid3 : Raphael.getRGB("#9A32CD "), // 154 50 205 + DarkOrchid4 : Raphael.getRGB("#68228B "), // 104 34 139 + Purple1 : Raphael.getRGB("#9B30FF "), // 155 48 255 + Purple2 : Raphael.getRGB("#912CEE "), // 145 44 238 + Purple3 : Raphael.getRGB("#7D26CD "), // 125 38 205 + Purple4 : Raphael.getRGB("#551A8B "), // 85 26 139 + MediumPurple1 : Raphael.getRGB("#AB82FF "), // 171 130 255 + MediumPurple2 : Raphael.getRGB("#9F79EE "), // 159 121 238 + MediumPurple3 : Raphael.getRGB("#8968CD "), // 137 104 205 + MediumPurple4 : Raphael.getRGB("#5D478B "), // 93 71 139 + Thistle1 : Raphael.getRGB("#FFE1FF "), // 255 225 255 + Thistle2 : Raphael.getRGB("#EED2EE "), // 238 210 238 + Thistle3 : Raphael.getRGB("#CDB5CD "), // 205 181 205 + Thistle4 : Raphael.getRGB("#8B7B8B "), // 139 123 139 + grey11 : Raphael.getRGB("#1C1C1C "), // 28 28 28 + grey21 : Raphael.getRGB("#363636 "), // 54 54 54 + grey31 : Raphael.getRGB("#4F4F4F "), // 79 79 79 + grey41 : Raphael.getRGB("#696969 "), // 105 105 105 + grey51 : Raphael.getRGB("#828282 "), // 130 130 130 + grey61 : Raphael.getRGB("#9C9C9C "), // 156 156 156 + grey71 : Raphael.getRGB("#B5B5B5 "), // 181 181 181 + gray81 : Raphael.getRGB("#CFCFCF "), // 207 207 207 + gray91 : Raphael.getRGB("#E8E8E8 "), // 232 232 232 + DarkGrey : Raphael.getRGB("#A9A9A9 "), // 169 169 169 + DarkBlue : Raphael.getRGB("#00008B "), // 0 0 139 + DarkCyan : Raphael.getRGB("#008B8B "), // 0 139 139 + DarkMagenta : Raphael.getRGB("#8B008B "), // 139 0 139 + DarkRed : Raphael.getRGB("#8B0000 "), // 139 0 0 + LightGreen : Raphael.getRGB("#90EE90 "), // 144 238 144 + + + + get: function(R, G, B){ + return Raphael.getRGB("rgb(" + R + ", " + G + ", " + B + ")"); + } +}; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/LineBreakMeasurer.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/LineBreakMeasurer.js new file mode 100644 index 0000000..edba1a0 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/LineBreakMeasurer.js @@ -0,0 +1,270 @@ +/** + * Word wrapping + * + * @author (Javascript) Dmitry Farafonov + */ + + var AttributedStringIterator = function(text){ + //this.text = this.rtrim(this.ltrim(text)); + text = text.replace(/(\s)+/, " "); + this.text = this.rtrim(text); + /* + if (beginIndex < 0 || beginIndex > endIndex || endIndex > length()) { + throw new IllegalArgumentException("Invalid substring range"); + } + */ + this.beginIndex = 0; + this.endIndex = this.text.length; + this.currentIndex = this.beginIndex; + + //console.group("[AttributedStringIterator]"); + var i = 0; + var string = this.text; + var fullPos = 0; + + //console.log("string: \"" + string + "\", length: " + string.length); + this.startWordOffsets = []; + this.startWordOffsets.push(fullPos); + + // TODO: remove i 1000 + while (i<1000) { + var pos = string.search(/[ \t\n\f-\.\,]/); + if (pos == -1) + break; + + // whitespace start + fullPos += pos; + string = string.substr(pos); + ////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string); + + // remove whitespaces + var pos = string.search(/[^ \t\n\f-\.\,]/); + if (pos == -1) + break; + + // whitespace end + fullPos += pos; + string = string.substr(pos); + + ////console.log("fullPos: " + fullPos); + this.startWordOffsets.push(fullPos); + + i++; + } + //console.log("startWordOffsets: ", this.startWordOffsets); + //console.groupEnd(); + }; + AttributedStringIterator.prototype = { + getEndIndex: function(pos){ + if (typeof(pos) == "undefined") + return this.endIndex; + + var string = this.text.substr(pos, this.endIndex - pos); + + var posEndOfLine = string.search(/[\n]/); + if (posEndOfLine == -1) + return this.endIndex; + else + return pos + posEndOfLine; + }, + getBeginIndex: function(){ + return this.beginIndex; + }, + isWhitespace: function(pos){ + var str = this.text[pos]; + var whitespaceChars = " \t\n\f"; + + return (whitespaceChars.indexOf(str) != -1); + }, + isNewLine: function(pos){ + var str = this.text[pos]; + var whitespaceChars = "\n"; + + return (whitespaceChars.indexOf(str) != -1); + }, + preceding: function(pos){ + //console.group("[AttributedStringIterator.preceding]"); + for(var i in this.startWordOffsets) { + var startWordOffset = this.startWordOffsets[i]; + if (pos < startWordOffset && i>0) { + //console.log("startWordOffset: " + this.startWordOffsets[i-1]); + //console.groupEnd(); + return this.startWordOffsets[i-1]; + } + } + //console.log("pos: " + pos); + //console.groupEnd(); + return this.startWordOffsets[i]; + }, + following: function(pos){ + //console.group("[AttributedStringIterator.following]"); + for(var i in this.startWordOffsets) { + var startWordOffset = this.startWordOffsets[i]; + if (pos < startWordOffset && i>0) { + //console.log("startWordOffset: " + this.startWordOffsets[i]); + //console.groupEnd(); + return this.startWordOffsets[i]; + } + } + //console.log("pos: " + pos); + //console.groupEnd(); + return this.startWordOffsets[i]; + }, + ltrim: function(str){ + var patt2=/^\s+/g; + return str.replace(patt2, ""); + }, + rtrim: function(str){ + var patt2=/\s+$/g; + return str.replace(patt2, ""); + }, + getLayout: function(start, limit){ + return this.text.substr(start, limit - start); + }, + getCharAtPos: function(pos) { + return this.text[pos]; + } + }; + + var LineBreakMeasurer = function(paper, x, y, text, fontAttrs){ + this.paper = paper; + this.text = new AttributedStringIterator(text); + this.fontAttrs = fontAttrs; + + if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) { + throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"}; + } + + //this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs); + this.limit = this.text.getEndIndex(); + this.pos = this.start = this.text.getBeginIndex(); + + this.rafaelTextObject = this.paper.text(x, y, this.text.text).attr(fontAttrs).attr("text-anchor", "start"); + this.svgTextObject = this.rafaelTextObject[0]; + }; + LineBreakMeasurer.prototype = { + nextOffset: function(wrappingWidth, offsetLimit, requireNextWord) { + //console.group("[nextOffset]"); + var nextOffset = this.pos; + if (this.pos < this.limit) { + if (offsetLimit <= this.pos) { + throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"}; + } + + var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth); + //charAtMaxAdvance --; + //console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]"); + + if (charAtMaxAdvance == this.limit) { + nextOffset = this.limit; + //console.log("charAtMaxAdvance == this.limit"); + } else if (this.text.isNewLine(charAtMaxAdvance)) { + //console.log("isNewLine"); + nextOffset = charAtMaxAdvance+1; + } else if (this.text.isWhitespace(charAtMaxAdvance)) { + // TODO: find next noSpaceChar + //return nextOffset; + nextOffset = this.text.following(charAtMaxAdvance); + } else { + // Break is in a word; back up to previous break. + /* + var testPos = charAtMaxAdvance + 1; + if (testPos == this.limit) { + console.error("hbz..."); + } else { + nextOffset = this.text.preceding(charAtMaxAdvance); + } + */ + nextOffset = this.text.preceding(charAtMaxAdvance); + + if (nextOffset <= this.pos) { + nextOffset = Math.max(this.pos+1, charAtMaxAdvance); + } + } + } + if (nextOffset > offsetLimit) { + nextOffset = offsetLimit; + } + //console.log("nextOffset: " + nextOffset); + //console.groupEnd(); + return nextOffset; + }, + nextLayout: function(wrappingWidth) { + //console.groupCollapsed("[nextLayout]"); + if (this.pos < this.limit) { + var requireNextWord = false; + var layoutLimit = this.nextOffset(wrappingWidth, this.limit, requireNextWord); + //console.log("layoutLimit:", layoutLimit); + if (layoutLimit == this.pos) { + //console.groupEnd(); + return null; + } + var result = this.text.getLayout(this.pos, layoutLimit); + //console.log("layout: \"" + result + "\""); + + // remove end of line + + //var posEndOfLine = this.text.getEndIndex(this.pos); + //if (posEndOfLine < result.length) + // result = result.substr(0, posEndOfLine); + + this.pos = layoutLimit; + + //console.groupEnd(); + return result; + } else { + //console.groupEnd(); + return null; + } + }, + getLineBreakIndex: function(pos, wrappingWidth) { + //console.group("[getLineBreakIndex]"); + //console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\""); + + var bb = this.rafaelTextObject.getBBox(); + + var charNum = -1; + try { + var svgPoint = this.svgTextObject.getStartPositionOfChar(pos); + //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.blue}); + svgPoint.x = svgPoint.x + wrappingWidth; + //svgPoint.y = bb.y; + //console.log("svgPoint:", svgPoint); + + //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red}); + + charNum = this.svgTextObject.getCharNumAtPosition(svgPoint); + } catch (e){ + console.warn("getStartPositionOfChar error, pos:" + pos); + /* + var testPos = pos + 1; + if (testPos < this.limit) { + return testPos + } + */ + } + //console.log("charNum:", charNum); + if (charNum == -1) { + //console.groupEnd(); + return this.text.getEndIndex(pos); + } else { + // When case there is new line between pos and charnum then use this new line + var newLineIndex = this.text.getEndIndex(pos); + if (newLineIndex < charNum ) { + console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "?") + "\""); + //console.groupEnd(); + + return newLineIndex; + } + + //var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1); + var charAtMaxAdvance = this.text.getCharAtPos(charNum); + //console.log("!!charAtMaxAdvance: " + charAtMaxAdvance); + //console.groupEnd(); + return charNum; + } + }, + getPosition: function() { + return this.pos; + } + }; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/Polyline.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/Polyline.js new file mode 100644 index 0000000..e7e4c30 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/Polyline.js @@ -0,0 +1,387 @@ +/** + * Class to generate polyline + * + * @author Dmitry Farafonov + */ + +var ANCHOR_TYPE= { + main: "main", + middle: "middle", + first: "first", + last: "last" +}; + +function Anchor(uuid, type, x, y) { + this.uuid = uuid; + this.x = x + this.y = y + this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main; +}; +Anchor.prototype = { + uuid: null, + x: 0, + y: 0, + type: ANCHOR_TYPE.main, + isFirst: false, + isLast: false, + ndex: 0, + typeIndex: 0 +}; + +function Polyline(uuid, points, strokeWidth) { + /* Array on coordinates: + * points: [{x: 410, y: 110}, 1 + * {x: 570, y: 110}, 1 2 + * {x: 620, y: 240}, 2 3 + * {x: 750, y: 270}, 3 4 + * {x: 650, y: 370}]; 4 + */ + this.points = points; + + /* + * path for graph + * [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]] + */ + this.path = []; + + this.anchors = []; + + if (strokeWidth) this.strokeWidth = strokeWidth; + + this.closePath = false; + + this.init(); +}; + +Polyline.prototype = { + id: null, + points: [], + path: [], + anchors: [], + strokeWidth: 1, + radius: 15, + showDetails: false, + element: null, + isDefaultConditionAvailable: false, + closePath: false, + + init: function(points){ + var linesCount = this.getLinesCount(); + if (linesCount < 1) + return; + + this.normalizeCoordinates(); + + // create anchors + + this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1); + + for(var i = 1; i < linesCount; i++){ + var line1 = this.getLine(i-1), + line2 = this.getLine(i); + + //this.pushAnchor(ANCHOR_TYPE.middle, line1.x1 + line1.x2-line1.x1, line1.y1 + line1.y2-line1.y1); + this.pushAnchor(ANCHOR_TYPE.main, line1.x2, line1.y2); + //this.pushAnchor(ANCHOR_TYPE.middle, line2.x1 + line2.x2-line2.x1, line2.y1 + line2.y2-line2.y1); + } + + this.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount-1).x2, this.getLine(linesCount-1).y2); + + this.rebuildPath(); + }, + + normalizeCoordinates: function(){ + for(var i=0; i < this.points.length; i++){ + this.points[i].x = parseFloat(this.points[i].x); + this.points[i].y = parseFloat(this.points[i].y); + } + }, + + getLinesCount: function(){ + return this.points.length-1; + }, + _getLine: function(i){ + return {x1: this.points[i].x, y1: this.points[i].y, x2: this.points[i+1].x, y2: this.points[i+1].y}; + }, + getLine: function(i){ + var line = this._getLine(i); + line.angle = this.getLineAngle(i) ; + return line; + }, + getLineAngle: function(i){ + var line = this._getLine(i); + return Math.atan2(line.y2 - line.y1, line.x2 - line.x1); + }, + getLineLengthX: function(i){ + var line = this.getLine(i); + return (line.x2 - line.x1); + }, + getLineLengthY: function(i){ + var line = this.getLine(i); + return (line.y2 - line.y1); + }, + getLineLength: function(i){ + var line = this.getLine(i); + return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2)); + }, + + getAnchors: function(){ + // ������� ��������������� ������ + // ???? + return this.anchors; + }, + getAnchorsCount: function(type){ + if (!type) + return this.anchors.length; + else { + var count = 0; + for(var i=0; i < this.getAnchorsCount(); i++){ + var anchor = this.anchors[i]; + if (anchor.getType() == type) { + count++; + } + } + return count; + } + }, + + pushAnchor: function(type, x, y, index){ + if (type == ANCHOR_TYPE.first) { + index = 0; + typeIndex = 0; + } else if (type == ANCHOR_TYPE.last) { + index = this.getAnchorsCount(); + typeIndex = 0; + } else if (!index) { + index = this.anchors.length; + } else { + // ��������� anchors, �������� ������� ��� �������, ������� � index + //var anchor = this.getAnchor() + for(var i=0; i < this.getAnchorsCount(); i++){ + var anchor = this.anchors[i]; + if (anchor.index > index) { + anchor.index++; + anchor.typeIndex++; + } + } + } + + var anchor = new Anchor(this.id, ANCHOR_TYPE.main, x, y, index, typeIndex); + + this.anchors.push(anchor); + }, + + getAnchor: function(position){ + return this.anchors[position]; + }, + + getAnchorByType: function(type, position){ + if (type == ANCHOR_TYPE.first) + return this.anchors[0]; + if (type == ANCHOR_TYPE.last) + return this.anchors[this.getAnchorsCount()-1]; + + for(var i=0; i < this.getAnchorsCount(); i++){ + var anchor = this.anchors[i]; + if (anchor.type == type) { + if( position == anchor.position) + return anchor; + } + } + return null; + }, + + addNewPoint: function(position, x, y){ + // + for(var i = 0; i < this.getLinesCount(); i++){ + var line = this.getLine(i); + if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) { + this.points.splice(i+1,0,{x: x, y: y}); + break; + } + } + + this.rebuildPath(); + }, + + rebuildPath: function(){ + var path = []; + + for(var i = 0; i < this.getAnchorsCount(); i++){ + var anchor = this.getAnchor(i); + + var pathType = "" + if (i==0) + pathType = "M"; + else + pathType = "L"; + +// TODO: save previous points and calculate new path just if points are updated, and then save currents values as previous + + var targetX = anchor.x, targetY = anchor.y; + if (i>0 && i < this.getAnchorsCount()-1) { + // get new x,y + var cx = anchor.x, cy = anchor.y; + + // pivot point of prev line + var AO = this.getLineLength(i-1); + if (AO < this.radius) { + AO = this.radius; + } + + this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10)); + //console.log("isDefaultConditionAvailable", this.isDefaultConditionAvailable); + + var ED = this.getLineLengthY(i-1) * this.radius / AO; + var OD = this.getLineLengthX(i-1) * this.radius / AO; + targetX = anchor.x - OD; + targetY = anchor.y - ED; + + if (AO < 2*this.radius && i>1) { + targetX = anchor.x - this.getLineLengthX(i-1)/2; + targetY = anchor.y - this.getLineLengthY(i-1)/2;; + } + + // pivot point of next line + var AO = this.getLineLength(i); + if (AO < this.radius) { + AO = this.radius; + } + var ED = this.getLineLengthY(i) * this.radius / AO; + var OD = this.getLineLengthX(i) * this.radius / AO; + var nextSrcX = anchor.x + OD; + var nextSrcY = anchor.y + ED; + + if (AO < 2*this.radius && i<this.getAnchorsCount()-2) { + nextSrcX = anchor.x + this.getLineLengthX(i)/2; + nextSrcY = anchor.y + this.getLineLengthY(i)/2;; + } + + + var dx0 = (cx - targetX) / 3, + dy0 = (cy - targetY) / 3, + ax = cx - dx0, + ay = cy - dy0, + + dx1 = (cx - nextSrcX) / 3, + dy1 = (cy - nextSrcY) / 3, + bx = cx - dx1, + by = cy - dy1, + + zx=nextSrcX, zy=nextSrcY; + + if (this.showDetails) { + var c = ProcessDiagramCanvas.g.path("M"+targetX+","+targetY+"L"+ax+","+ay).attr({stroke: Color.get(255, 153, 51), "stroke-dasharray": "- "}); + var c = ProcessDiagramCanvas.g.path("M"+nextSrcX+","+nextSrcY+"L"+bx+","+by).attr({stroke: Color.get(255, 153, 51), "stroke-dasharray": "- "}); + var c = ProcessDiagramCanvas.g.ellipse(ax, ay, 2, 2).attr({stroke: Color.SlateGrey}); + var c = ProcessDiagramCanvas.g.ellipse(bx, by, 2, 2).attr({stroke: Color.SlateGrey}); + var c = ProcessDiagramCanvas.g.ellipse(cx, cy, this.radius, this.radius).attr({stroke: Color.Gainsboro}); + var c = ProcessDiagramCanvas.g.ellipse(targetX, targetY, 2, 2).attr({fill: Color.red}); + var c = ProcessDiagramCanvas.g.ellipse(nextSrcX, nextSrcY, 2, 2).attr({fill: Color.red}); + } + } else if (i==1 && this.getAnchorsCount() == 2){ + var AO = this.getLineLength(i-1); + if (AO < this.radius) { + AO = this.radius; + } + this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10)); + //console.log("-- isDefaultConditionAvailable", this.isDefaultConditionAvailable); + } + + // anti smoothing + if (this.strokeWidth%2 == 1) { + targetX += 0.5; + targetY += 0.5; + } + + path.push([pathType, targetX, targetY]); + + if (i>0 && i < this.getAnchorsCount()-1) { + path.push(["C", ax, ay, bx, by, zx, zy]); + } + } + + if (this.closePath) { + console.log("closePath:", this.closePath); + path.push(["Z"]); + } + + this.path = path; + }, + + transform: function(transformation){ + this.element.transform(transformation); + }, + attr: function(attrs){ + //console.log("attrs: " +attrs, "", this.element); + // TODO: foreach and set each + this.element.attr(attrs); + } +}; + +function Polygone(points, strokeWidth) { + /* Array on coordinates: + * points: [{x: 410, y: 110}, 1 + * {x: 570, y: 110}, 1 2 + * {x: 620, y: 240}, 2 3 + * {x: 750, y: 270}, 3 4 + * {x: 650, y: 370}]; 4 + */ + this.points = points; + + /* + * path for graph + * [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]] + */ + this.path = []; + + this.anchors = []; + + if (strokeWidth) this.strokeWidth = strokeWidth; + + this.closePath = true; + this.init(); +}; + + +/* + * Poligone is inherited from Poliline: draws closedPath of polyline + */ + +var Foo = function () { }; +Foo.prototype = Polyline.prototype; + +Polygone.prototype = new Foo(); + +Polygone.prototype.rebuildPath = function(){ + var path = []; + //console.log("Polygone rebuildPath"); + for(var i = 0; i < this.getAnchorsCount(); i++){ + var anchor = this.getAnchor(i); + + var pathType = "" + if (i==0) + pathType = "M"; + else + pathType = "L"; + + var targetX = anchor.x, targetY = anchor.y; + + // anti smoothing + if (this.strokeWidth%2 == 1) { + targetX += 0.5; + targetY += 0.5; + } + + path.push([pathType, targetX, targetY]); + } + if (this.closePath) + path.push(["Z"]); + + this.path = path; +}; +/* +Polygone.prototype.transform = function(transformation){ + this.element.transform(transformation); +}; +*/ \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramCanvas.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramCanvas.js new file mode 100644 index 0000000..eadbe9c --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramCanvas.js @@ -0,0 +1,2172 @@ +/** + * Represents a canvas on which BPMN 2.0 constructs can be drawn. + * + * Some of the icons used are licenced under a Creative Commons Attribution 2.5 + * License, see http://www.famfamfam.com/lab/icons/silk/ + * + * @see ProcessDiagramGenerator + * @author (Java) Joram Barrez + * @author (Javascript) Dmitry Farafonov + */ + +//Color.Cornsilk + +var ARROW_HEAD_SIMPLE = "simple"; +var ARROW_HEAD_EMPTY = "empty"; +var ARROW_HEAD_FILL = "FILL"; +var MULTILINE_VERTICAL_ALIGN_TOP = "top"; +var MULTILINE_VERTICAL_ALIGN_MIDDLE = "middle"; +var MULTILINE_VERTICAL_ALIGN_BOTTOM = "bottom"; +var MULTILINE_HORIZONTAL_ALIGN_LEFT = "start"; +var MULTILINE_HORIZONTAL_ALIGN_MIDDLE = "middle"; +var MULTILINE_HORIZONTAL_ALIGN_RIGHT = "end"; + +// Predefined sized +var TEXT_PADDING = 3; +var ARROW_WIDTH = 4; +var CONDITIONAL_INDICATOR_WIDTH = 16; +var MARKER_WIDTH = 12; +var ANNOTATION_TEXT_PADDING = 7; + +// Colors +var TASK_COLOR = Color.OldLace; // original: Color.get(255, 255, 204); +var TASK_STROKE_COLOR = Color.black; /*Color.SlateGrey; */ +//var EXPANDED_SUBPROCESS_ATTRS = Color.black; /*Color.SlateGrey; */ +var BOUNDARY_EVENT_COLOR = Color.white; +var CONDITIONAL_INDICATOR_COLOR = Color.get(255, 255, 255); +var HIGHLIGHT_COLOR = Color.Firebrick1; +//var SEQUENCEFLOW_COLOR = Color.DimGrey; +var SEQUENCEFLOW_COLOR = Color.black; + +var CATCHING_EVENT_COLOR = Color.black; /* Color.SlateGrey; */ +var START_EVENT_COLOR = Color.get(251,251,251); +var START_EVENT_STROKE_COLOR = Color.black; /* Color.SlateGrey; */ +var END_EVENT_COLOR = Color.get(251,251,251); +//var END_EVENT_STROKE_COLOR = Color.black; +var NONE_END_EVENT_COLOR = Color.Firebrick4; +var NONE_END_EVENT_STROKE_COLOR = Color.Firebrick4; +var ERROR_END_EVENT_COLOR = Color.Firebrick; +var ERROR_END_EVENT_STROKE_COLOR = Color.Firebrick; +//var LABEL_COLOR = Color.get(112, 146, 190); +var LABEL_COLOR = Color.get(72, 106, 150); + +// Fonts +var NORMAL_FONT = {font: "10px Arial", opacity: 1, fill: Color.black}; +var LABEL_FONT = {font: "11px Arial", "font-style":"italic", opacity: 1, "fill": LABEL_COLOR}; +var LABEL_FONT_SMOOTH = {font: "10px Arial", "font-style":"italic", opacity: 1, "fill": LABEL_COLOR, stroke: LABEL_COLOR, "stroke-width":.4}; +var TASK_FONT = {font: "11px Arial", opacity: 1, fill: Color.black}; +var TASK_FONT_SMOOTH = {font: "11px Arial", opacity: 1, fill: Color.black, stroke: LABEL_COLOR, "stroke-width":.4}; +var POOL_LANE_FONT = {font: "11px Arial", opacity: 1, fill: Color.black}; +var EXPANDED_SUBPROCESS_FONT = {font: "11px Arial", opacity: 1, fill: Color.black}; + +// Strokes +var NORMAL_STROKE = 1; +var SEQUENCEFLOW_STROKE = 1.5; +var SEQUENCEFLOW_HIGHLIGHT_STROKE = 2; +var THICK_TASK_BORDER_STROKE = 2.5; +var GATEWAY_TYPE_STROKE = 3.2; +var END_EVENT_STROKE = NORMAL_STROKE+2; +var MULTI_INSTANCE_STROKE = 1.3; +var EVENT_SUBPROCESS_ATTRS = {"stroke": Color.black, "stroke-width": NORMAL_STROKE, "stroke-dasharray": ". "}; +//var EXPANDED_SUBPROCESS_ATTRS = {"stroke": Color.black, "stroke-width": NORMAL_STROKE, "fill": Color.FloralWhite}; +var EXPANDED_SUBPROCESS_ATTRS = {"stroke": Color.black, "stroke-width": NORMAL_STROKE, "fill": Color.WhiteSmoke}; +var NON_INTERRUPTING_EVENT_STROKE = "- "; + +var TASK_CORNER_ROUND = 10; +var EXPANDED_SUBPROCESS_CORNER_ROUND = 10; + +// icons +var ICON_SIZE = 16; +var ICON_PADDING = 4; +var USERTASK_IMAGE = "images/deployer/user.png"; +var SCRIPTTASK_IMAGE = "images/deployer/script.png"; +var SERVICETASK_IMAGE = "images/deployer/service.png"; +var RECEIVETASK_IMAGE = "images/deployer/receive.png"; +var SENDTASK_IMAGE = "images/deployer/send.png"; +var MANUALTASK_IMAGE = "images/deployer/manual.png"; +var BUSINESS_RULE_TASK_IMAGE = "images/deployer/business_rule.png"; +var TIMER_IMAGE = "images/deployer/timer.png"; +var MESSAGE_CATCH_IMAGE = "images/deployer/message_catch.png"; +var MESSAGE_THROW_IMAGE = "images/deployer/message_throw.png"; +var ERROR_THROW_IMAGE = "images/deployer/error_throw.png"; +var ERROR_CATCH_IMAGE = "images/deployer/error_catch.png"; +var SIGNAL_CATCH_IMAGE = "images/deployer/signal_catch.png"; +var SIGNAL_THROW_IMAGE = "images/deployer/signal_throw.png"; +var MULTIPLE_CATCH_IMAGE = "images/deployer/multiple_catch.png"; + + +var ObjectType = { + ELLIPSE: "ellipse", + FLOW: "flow", + RECT: "rect", + RHOMBUS: "rhombus" +}; + +function OBJ(type){ + this.c = null; + this.type = type; + this.nestedElements = []; +}; +OBJ.prototype = { + +}; + +var CONNECTION_TYPE = { + SEQUENCE_FLOW: "sequence_flow", + MESSAGE_FLOW: "message_flow", + ASSOCIATION: "association" +}; + +var ProcessDiagramCanvas = function(){ +}; +ProcessDiagramCanvas.prototype = { +// var DefaultProcessDiagramCanvas = { + canvasHolder: "holder", + canvasWidth: 0, + canvasHeight: 0, + paint: Color.black, + strokeWidth: 0, + font: null, + fontSmoothing: null, + + g: null, + ninjaPaper: null, + + objects: [], + + processDefinitionId: null, + activity: null, + + frame: null, + + + debug: false, + + /** + * Creates an empty canvas with given width and height. + */ + init: function(width, height, processDefinitionId){ + this.canvasWidth = width; + this.canvasHeight = height; + + // TODO: name it as 'canvasName' + if (!processDefinitionId) + processDefinitionId = "holder"; + + this.processDefinitionId = processDefinitionId; + this.canvasHolder = this.processDefinitionId; + + var h = document.getElementById(this.canvasHolder); + if (!h) return; + + h.style.width = this.canvasWidth; + h.style.height = this.canvasHeight; + + this.g = Raphael(this.canvasHolder); + this.g.clear(); + + //this.setPaint(Color.DimGrey); + this.setPaint(Color.black); + //this.setPaint(Color.white); + this.setStroke(NORMAL_STROKE); + + //this.setFont("Arial", 11); + this.setFont(NORMAL_FONT); + //this.font = this.g.getFont("Arial"); + + this.fontSmoothing = true; + + // ninja! + var RaphaelOriginal = Raphael; + this.ninjaPaper =(function (local_raphael) { + var paper = local_raphael(1, 1, 1, 1, processDefinitionId); + return paper; + })(Raphael.ninja()); + Raphael = RaphaelOriginal; + }, + setPaint: function(color){ + this.paint = color; + }, + getPaint: function(){ + return this.paint; + }, + setStroke: function(strokeWidth){ + this.strokeWidth = strokeWidth; + }, + getStroke: function(){ + return this.strokeWidth; + }, + /* + setFont: function(family, weight, style, stretch){ + this.font = this.g.getFont(family, weight); + }, + */ + setFont: function(font){ + this.font = font; + }, + getFont: function(){ + return this.font; + }, + drawShaddow: function(object){ + var border = object.clone(); + border.attr({"stroke-width": this.strokeWidth + 6, + "stroke": Color.white, + "fill": Color.white, + "opacity": 1, + "stroke-dasharray":null}); + //border.toBack(); + object.toFront(); + + return border; + }, + + setConextObject: function(obj){ + this.contextObject = obj; + }, + getConextObject: function(){ + return this.contextObject; + }, + setContextToElement: function(object){ + var contextObject = this.getConextObject(); + object.id = contextObject.id; + object.data("contextObject", contextObject); + }, + onClick: function(event, instance, element){ + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + //console.log("["+contextObject.getProperty("type")+"], activityId: " + contextObject.getId()); + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.click) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.click.apply(event, args); + } + }, + onRightClick: function(event, instance, element){ + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + //console.log("[%s], activityId: %s (RIGHTCLICK)", contextObject.getProperty("type"), contextObject.getId()); + + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.rightClick) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.rightClick.apply(event, args); + } + }, + onHoverIn: function(event, instance, element){ + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + + var border = instance.g.getById(contextObject.id + "_border"); + border.attr("opacity", 0.3); + + // provide callback + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.over) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.over.apply(event, args); + } + }, + onHoverOut: function(event, instance, element){ + var overlay = element; + var set = overlay.data("set"); + var contextObject = overlay.data("contextObject"); + + var border = instance.g.getById(contextObject.id + "_border"); + border.attr("opacity", 0.0); + // provide callback + if (ProcessDiagramGenerator.options && ProcessDiagramGenerator.options.on && ProcessDiagramGenerator.options.on.out) { + var args = [instance, element, contextObject]; + ProcessDiagramGenerator.options.on.out.apply(event, args); + } + }, + addHandlers: function(set, x, y, width, height, type){ + var contextObject = this.getConextObject(); + + var cx = x+width/2, cy = y+height/2; + if (type == "event") { + var border = this.g.ellipse(cx, cy, width/2+4, height/2+4); + var overlay = this.g.ellipse(cx, cy, width/2, height/2); + } else if (type == "gateway") { + // rhombus + var border = this.g.path( "M" + (x - 4) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y + height + 4) + + "L" + (x + width + 4) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y - 4) + + "z" ); + var overlay = this.g.path( "M" + x + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y + height) + + "L" + (x + width) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + y + + "z" ); + } else if (type == "task") { + var border = this.g.rect(x - 4, y - 4, width+9, height+9, TASK_CORNER_ROUND+4); + var overlay = this.g.rect(x, y, width, height, TASK_CORNER_ROUND); + } + + border.attr({stroke: Color.get(132,112,255)/*Color.Tan1*/,"stroke-width": 4, opacity: 0.0}); + border.id = contextObject.id + "_border"; + + set.push(border); + + overlay.attr({stroke: Color.Orange,"stroke-width": 3, fill: Color.get(0,0,0), opacity: 0.0, cursor: "hand"}); + overlay.data("set",set); + overlay.id = contextObject.id; + overlay.data("contextObject",contextObject); + + var instance = this; + overlay.mousedown(function(event){if (event.button == 2) instance.onRightClick(event, instance, this);}); + overlay.click(function(event){instance.onClick(event, instance, this);}); + overlay.hover(function(event){instance.onHoverIn(event, instance, this);}, function(event){instance.onHoverOut(event, instance, this);}); + }, + + /* + * Start Events: + * + * drawNoneStartEvent + * drawTimerStartEvent + * drawMessageStartEvent + * drawErrorStartEvent + * drawSignalStartEvent + * _drawStartEventImage + * _drawStartEvent + */ + + drawNoneStartEvent: function(x, y, width, height) { + this.g.setStart(); + + var isInterrupting = undefined; + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawTimerStartEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + var cx = x + width/2 - this.getStroke()/4; + var cy = y + height/2 - this.getStroke()/4; + + var w = width*.9;// - this.getStroke()*2; + var h = height*.9;// - this.getStroke()*2; + + this._drawClock(cx, cy, w, h); + + if (this.gebug) + var center = this.g.ellipse(cx, cy, 3, 3).attr({stroke:"none", fill: Color.green}); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMessageStartEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + this._drawStartEventImage(x, y, width, height, MESSAGE_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawErrorStartEvent: function(x, y, width, height, name) { + this.g.setStart(); + var isInterrupting = undefined; + this._drawStartEvent(x, y, width, height, isInterrupting); + + this._drawStartEventImage(x, y, width, height, ERROR_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawSignalStartEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + this._drawStartEventImage(x, y, width, height, SIGNAL_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMultipleStartEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + + this._drawStartEvent(x, y, width, height, isInterrupting, null); + + var cx = x + width/2 - this.getStroke()/4; + var cy = y + height/2 - this.getStroke()/4; + + var w = width*1; + var h = height*1; + + this._drawPentagon(cx, cy, w, h); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + _drawStartEventImage: function(x, y, width, height, image){ + var cx = x + width/2 - this.getStroke()/2; + var cy = y + height/2 - this.getStroke()/2; + + var w = width*.65;// - this.getStroke()*2; + var h = height*.65;// - this.getStroke()*2; + + var img = this.g.image(image, cx-w/2, cy-h/2, w, h); + }, + _drawStartEvent: function(x, y, width, height, isInterrupting){ + var originalPaint = this.getPaint(); + if (typeof(START_EVENT_STROKE_COLOR) != "undefined") + this.setPaint(START_EVENT_STROKE_COLOR); + + + width -= this.strokeWidth / 2; + height -= this.strokeWidth / 2; + + x = x + width/2; + y = y + height/2; + + var circle = this.g.ellipse(x, y, width/2, height/2); + + circle.attr({"stroke-width": this.strokeWidth, + "stroke": this.paint, + //"stroke": START_EVENT_STROKE_COLOR, + "fill": START_EVENT_COLOR}); + + // white shaddow + this.drawShaddow(circle); + + if (isInterrupting!=null && isInterrupting!=undefined && !isInterrupting) + circle.attr({"stroke-dasharray": NON_INTERRUPTING_EVENT_STROKE}); + + this.setContextToElement(circle); + + + this.setPaint(originalPaint); + }, + + /* + * End Events: + * + * drawNoneEndEvent + * drawErrorEndEvent + * drawMessageEndEvent + * drawSignalEndEvent + * drawMultipleEndEvent + * _drawEndEventImage + * _drawNoneEndEvent + */ + + drawNoneEndEvent: function(x, y, width, height) { + this.g.setStart(); + + this._drawNoneEndEvent(x, y, width, height, null, "noneEndEvent"); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawErrorEndEvent: function(x, y, width, height) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + this._drawEndEventImage(x, y, width, height, ERROR_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMessageEndEvent: function(x, y, width, height, name) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + this._drawEndEventImage(x, y, width, height, MESSAGE_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawSignalEndEvent: function(x, y, width, height, name) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + this._drawEndEventImage(x, y, width, height, SIGNAL_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawMultipleEndEvent: function(x, y, width, height, name) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + var cx = x + width/2;// - this.getStroke(); + var cy = y + height/2;// - this.getStroke(); + + var w = width*1; + var h = height*1; + + var filled = true; + this._drawPentagon(cx, cy, w, h, filled); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawTerminateEndEvent: function(x, y, width, height) { + this.g.setStart(); + var type = "errorEndEvent"; + this._drawNoneEndEvent(x, y, width, height, null, type); + + var cx = x + width/2;// - this.getStroke()/2; + var cy = y + height/2;// - this.getStroke()/2; + + var w = width/2*.6; + var h = height/2*.6; + + var circle = this.g.ellipse(cx, cy, w, h).attr({fill: Color.black}); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + _drawEndEventImage: function(x, y, width, height, image){ + var cx = x + width/2 - this.getStroke()/2; + var cy = y + height/2 - this.getStroke()/2; + + var w = width*.65; + var h = height*.65; + + var img = this.g.image(image, cx-w/2, cy-h/2, w, h); + }, + + _drawNoneEndEvent: function(x, y, width, height, image, type) { + var originalPaint = this.getPaint(); + if (typeof(CATCHING_EVENT_COLOR) != "undefined") + this.setPaint(CATCHING_EVENT_COLOR); + + var strokeColor = this.getPaint(); + var fillColor = this.getPaint(); + + if (type == "errorEndEvent") { + strokeColor = ERROR_END_EVENT_STROKE_COLOR; + fillColor = ERROR_END_EVENT_COLOR; + } else if (type == "noneEndEvent") { + strokeColor = NONE_END_EVENT_STROKE_COLOR; + fillColor = NONE_END_EVENT_COLOR; + } else + + // event circles + width -= this.strokeWidth / 2; + height -= this.strokeWidth / 2; + + x = x + width/2;// + this.strokeWidth/2; + y = y + width/2;// + this.strokeWidth/2; + + // outerCircle + var outerCircle = this.g.ellipse(x, y, width/2, height/2); + + // white shaddow + var shaddow = this.drawShaddow(outerCircle); + + outerCircle.attr({"stroke-width": this.strokeWidth, + "stroke": strokeColor, + "fill": fillColor}); + + var innerCircleX = x; + var innerCircleY = y; + var innerCircleWidth = width/2 - 2; + var innerCircleHeight = height/2 - 2; + var innerCircle = this.g.ellipse(innerCircleX, innerCircleY, innerCircleWidth, innerCircleHeight); + innerCircle.attr({"stroke-width": this.strokeWidth, + "stroke": strokeColor, + "fill": Color.white}); + + // TODO: implement it + //var originalPaint = this.getPaint(); + //this.g.setPaint(BOUNDARY_EVENT_COLOR); + + this.setPaint(originalPaint); + }, + + /* + * Catching Events: + * + * drawCatchingTimerEvent + * drawCatchingErrorEvent + * drawCatchingSignalEvent + * drawCatchingMessageEvent + * drawCatchingMultipleEvent + * _drawCatchingEventImage + * _drawCatchingEvent + */ + + + drawCatchingTimerEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + var innerCircleWidth = width - 4; + var innerCircleHeight = height - 4; + + var cx = x + width/2 - this.getStroke()/4; + var cy = y + height/2 - this.getStroke()/4; + + var w = innerCircleWidth*.9;// - this.getStroke()*2; + var h = innerCircleHeight*.9;// - this.getStroke()*2; + + this._drawClock(cx, cy, w, h); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingErrorEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + this._drawCatchingEventImage(x, y, width, height, ERROR_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingSignalEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + this._drawCatchingEventImage(x, y, width, height, SIGNAL_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingMessageEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + this._drawCatchingEventImage(x, y, width, height, MESSAGE_CATCH_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawCatchingMultipleEvent: function(x, y, width, height, isInterrupting, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, isInterrupting, null); + + var cx = x + width/2 - this.getStroke(); + var cy = y + height/2 - this.getStroke(); + + var w = width*.9; + var h = height*.9; + + this._drawPentagon(cx, cy, w, h); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + _drawCatchingEventImage: function(x, y, width, height, image){ + var innerCircleWidth = width - 4; + var innerCircleHeight = height - 4; + + var cx = x + width/2 - this.getStroke()/2; + var cy = y + height/2 - this.getStroke()/2; + + var w = innerCircleWidth*.6;// - this.getStroke()*2; + var h = innerCircleHeight*.6;// - this.getStroke()*2; + + var img = this.g.image(image, cx-w/2, cy-h/2, w, h); + }, + + _drawCatchingEvent: function(x, y, width, height, isInterrupting, image) { + var originalPaint = this.getPaint(); + if (typeof(CATCHING_EVENT_COLOR) != "undefined") + this.setPaint(CATCHING_EVENT_COLOR); + + // event circles + width -= this.strokeWidth / 2; + height -= this.strokeWidth / 2; + + x = x + width/2;// + this.strokeWidth/2; + y = y + width/2;// + this.strokeWidth/2; + + // outerCircle + var outerCircle = this.g.ellipse(x, y, width/2, height/2); + + // white shaddow + var shaddow = this.drawShaddow(outerCircle); + + //console.log("isInterrupting: " + isInterrupting, "x:" , x, "y:",y); + if (isInterrupting!=null && isInterrupting!=undefined && !isInterrupting) + outerCircle.attr({"stroke-dasharray": NON_INTERRUPTING_EVENT_STROKE}); + + outerCircle.attr({"stroke-width": this.strokeWidth, + "stroke": this.getPaint(), + "fill": BOUNDARY_EVENT_COLOR}); + + var innerCircleX = x; + var innerCircleY = y; + var innerCircleRadiusX = width/2 - 4; + var innerCircleRadiusY = height/2 - 4; + var innerCircle = this.g.ellipse(innerCircleX, innerCircleY, innerCircleRadiusX, innerCircleRadiusY); + innerCircle.attr({"stroke-width": this.strokeWidth, + "stroke": this.getPaint()}); + + if (image) { + var imageWidth = imageHeight = innerCircleRadiusX*1.2 + this.getStroke()*2; + var imageX = innerCircleX-imageWidth/2 - this.strokeWidth/2; + var imageY = innerCircleY-imageWidth/2 - this.strokeWidth/2; + var img = this.g.image(image, imageX, imageY, imageWidth, imageHeight); + } + + this.setPaint(originalPaint); + + var set = this.g.set(); + set.push(outerCircle, innerCircle, shaddow); + this.setContextToElement(outerCircle); + + // TODO: add shapes to set + + /* + var st = this.g.set(); + st.push( + this.g.ellipse(innerCircleX, innerCircleY, 2, 2), + this.g.ellipse(imageX, imageY, 2, 2) + ); + st.attr({fill: "red", "stroke-width":0}); + */ + }, + + /* + * Catching Events: + * + * drawThrowingNoneEvent + * drawThrowingSignalEvent + * drawThrowingMessageEvent + * drawThrowingMultipleEvent + */ + + drawThrowingNoneEvent: function(x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawThrowingSignalEvent: function(x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + this._drawCatchingEventImage(x, y, width, height, SIGNAL_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawThrowingMessageEvent: function(x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + this._drawCatchingEventImage(x, y, width, height, MESSAGE_THROW_IMAGE); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + drawThrowingMultipleEvent: function(x, y, width, height, name) { + this.g.setStart(); + this._drawCatchingEvent(x, y, width, height, null, null); + + var cx = x + width/2 - this.getStroke(); + var cy = y + height/2 - this.getStroke(); + + var w = width*.9; + var h = height*.9; + + var filled = true; + this._drawPentagon(cx, cy, w, h, filled); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "event"); + }, + + /* + * Draw flows: + * + * _connectFlowToActivity + * _drawFlow + * _drawDefaultSequenceFlowIndicator + * drawSequenceflow + * drawMessageflow + * drawAssociation + * _drawCircleTail + * _drawArrowHead + * _drawConditionalSequenceFlowIndicator + * drawSequenceflowWithoutArrow + */ + + _connectFlowToActivity: function(sourceActivityId, destinationActivityId, waypoints){ + var sourceActivity = this.g.getById(sourceActivityId); + var destinationActivity = this.g.getById(destinationActivityId); + if (sourceActivity == null || destinationActivity == null) { + if (sourceActivity == null) + console.error("source activity["+sourceActivityId+"] not found"); + else + console.error("destination activity["+destinationActivityId+"] not found"); + return null; + } + var bbSourceActivity = sourceActivity.getBBox() + var bbDestinationActivity = destinationActivity.getBBox() + + var path = []; + var newWaypoints = []; + for(var i = 0; i < waypoints.length; i++){ + var pathType = "" + if (i==0) + pathType = "M"; + else + pathType = "L"; + + path.push([pathType, waypoints[i].x, waypoints[i].y]); + newWaypoints.push({x:waypoints[i].x, y:waypoints[i].y}); + } + + var ninjaPathSourceActivity = this.ninjaPaper.path(sourceActivity.realPath); + var ninjaPathDestinationActivity = this.ninjaPaper.path(destinationActivity.realPath); + var ninjaBBSourceActivity = ninjaPathSourceActivity.getBBox(); + var ninjaBBDestinationActivity = ninjaPathDestinationActivity.getBBox(); + + // set target of the flow to the center of the taskObject + var newPath = path; + var originalSource = {x: newPath[0][1], y: newPath[0][2]}; + var originalTarget = {x: newPath[newPath.length-1][1], y: newPath[newPath.length-1][2]}; + newPath[0][1] = ninjaBBSourceActivity.x + (ninjaBBSourceActivity.x2 - ninjaBBSourceActivity.x ) / 2; + newPath[0][2] = ninjaBBSourceActivity.y + (ninjaBBSourceActivity.y2 - ninjaBBSourceActivity.y ) / 2; + newPath[newPath.length-1][1] = ninjaBBDestinationActivity.x + (ninjaBBDestinationActivity.x2 - ninjaBBDestinationActivity.x ) / 2; + newPath[newPath.length-1][2] = ninjaBBDestinationActivity.y + (ninjaBBDestinationActivity.y2 - ninjaBBDestinationActivity.y ) / 2; + + var ninjaPathFlowObject = this.ninjaPaper.path(newPath); + var ninjaBBFlowObject = ninjaPathFlowObject.getBBox(); + + var intersectionsSource = Raphael.pathIntersection(ninjaPathSourceActivity.realPath, ninjaPathFlowObject.realPath); + var intersectionsDestination = Raphael.pathIntersection(ninjaPathDestinationActivity.realPath, ninjaPathFlowObject.realPath); + var intersectionSource = intersectionsSource.pop(); + var intersectionDestination = intersectionsDestination.pop(); + + if (intersectionSource != undefined) { + if (this.gebug) { + var diameter = 5; + var dotOriginal = this.g.ellipse(originalSource.x, originalSource.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Pink}); + var dot = this.g.ellipse(intersectionSource.x, intersectionSource.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Green}); + } + + newWaypoints[0].x = intersectionSource.x; + newWaypoints[0].y = intersectionSource.y; + } + if (intersectionDestination != undefined) { + if (this.gebug) { + var diameter = 5; + var dotOriginal = this.g.ellipse(originalTarget.x, originalTarget.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Red}); + var dot = this.g.ellipse(intersectionDestination.x, intersectionDestination.y, diameter, diameter).attr({"fill": Color.white, "stroke": Color.Blue}); + } + + newWaypoints[newWaypoints.length-1].x = intersectionDestination.x; + newWaypoints[newWaypoints.length-1].y = intersectionDestination.y; + } + + this.ninjaPaper.clear(); + return newWaypoints; + }, + + _drawFlow: function(waypoints, conditional, isDefault, highLighted, withArrowHead, connectionType){ + var originalPaint = this.getPaint(); + var originalStroke = this.getStroke(); + + this.setPaint(SEQUENCEFLOW_COLOR); + this.setStroke(SEQUENCEFLOW_STROKE); + + if (highLighted) { + this.setPaint(HIGHLIGHT_COLOR); + this.setStroke(SEQUENCEFLOW_HIGHLIGHT_STROKE); + } + +// TODO: generate polylineId or do something!! + var uuid = Raphael.createUUID(); + + var contextObject = this.getConextObject(); + var newWaypoints = waypoints; + if (contextObject) { + var newWaypoints = this._connectFlowToActivity(contextObject.sourceActivityId, contextObject.destinationActivityId, waypoints); + + if (!newWaypoints) { + console.error("Error draw flow from '"+contextObject.sourceActivityId+"' to '"+contextObject.destinationActivityId+"' "); + return; + } + } + var polyline = new Polyline(uuid, newWaypoints, this.getStroke()); + //var polyline = new Polyline(waypoints, 3); + + polyline.element = this.g.path(polyline.path); + polyline.element.attr("stroke-width", this.getStroke()); + polyline.element.attr("stroke", this.getPaint()); + + if (contextObject) { + polyline.element.id = contextObject.id; + polyline.element.data("contextObject", contextObject); + } else { + polyline.element.id = uuid; + } + + + /* + polyline.element.mouseover(function(){ + this.attr({"stroke-width": NORMAL_STROKE + 2}); + }).mouseout(function(){ + this.attr({"stroke-width": NORMAL_STROKE}); + }); + */ + + var last = polyline.getAnchorsCount()-1; + var x = polyline.getAnchor(last).x; + var y = polyline.getAnchor(last).y; + //var c = this.g.ellipse(x, y, 5, 5); + + var lastLineIndex = polyline.getLinesCount()-1; + var line = polyline.getLine(lastLineIndex); + var firstLine = polyline.getLine(0); + + var arrowHead = null, + circleTail = null, + defaultSequenceFlowIndicator = null, + conditionalSequenceFlowIndicator = null; + + if (connectionType == CONNECTION_TYPE.MESSAGE_FLOW) { + circleTail = this._drawCircleTail(firstLine, connectionType); + } + if(withArrowHead) + arrowHead = this._drawArrowHead(line, connectionType); + + //console.log("isDefault: ", isDefault, ", isDefaultConditionAvailable: ", polyline.isDefaultConditionAvailable); + if (isDefault && polyline.isDefaultConditionAvailable) { + //var angle = polyline.getLineAngle(0); + //console.log("firstLine", firstLine); + defaultSequenceFlowIndicator = this._drawDefaultSequenceFlowIndicator(firstLine); + } + + if (conditional) { + conditionalSequenceFlowIndicator = this._drawConditionalSequenceFlowIndicator(firstLine); + } + + // draw flow name + var flowName = contextObject.name; + if (flowName) { + var xPointArray = contextObject.xPointArray; + var yPointArray = contextObject.yPointArray; + var textX = xPointArray[0] < xPointArray[1] ? xPointArray[0] : xPointArray[1]; + var textY = yPointArray[0] < yPointArray[1] ? yPointArray[1] : yPointArray[0]; + // fix xy + textX += 20; + textY -= 10; + this.g.text(textX, textY, flowName).attr(LABEL_FONT); + } + + var st = this.g.set(); + st.push(polyline.element, arrowHead, circleTail, conditionalSequenceFlowIndicator); + polyline.element.data("set", st); + polyline.element.data("withArrowHead", withArrowHead); + + var polyCloneAttrNormal = {"stroke-width": this.getStroke() + 5, stroke: Color.get(132,112,255), opacity: 0.0, cursor: "hand"}; + var polyClone = st.clone().attr(polyCloneAttrNormal).hover(function () { + //if (polyLine.data("isSelected")) return; + polyClone.attr({opacity: 0.2}); + }, function () { + //if (polyLine.data("isSelected")) return; + polyClone.attr({opacity: 0.0}); + }); + polyClone.data("objectId", polyline.element.id); + polyClone.click(function(){ + var instance = this; + var objectId = instance.data("objectId"); + var object = this.paper.getById(objectId); + var contextObject = object.data("contextObject"); + if (contextObject) { + console.log("[flow], objectId: " + object.id +", flow: " + contextObject.flow); + ProcessDiagramGenerator.showFlowInfo(contextObject); + } + }).dblclick(function(){ + console.log("!!! DOUBLE CLICK !!!"); + }).hover(function (mouseEvent) { + var instance = this; + var objectId = instance.data("objectId"); + var object = this.paper.getById(objectId); + var contextObject = object.data("contextObject"); + if (contextObject) + ProcessDiagramGenerator.showFlowInfo(contextObject); + }); + polyClone.data("parentId", uuid); + + if (!connectionType || connectionType == CONNECTION_TYPE.SEQUENCE_FLOW) + polyline.element.attr("stroke-width", this.getStroke()); + else if (connectionType == CONNECTION_TYPE.MESSAGE_FLOW) + polyline.element.attr({"stroke-dasharray": "--"}); + else if (connectionType == CONNECTION_TYPE.ASSOCIATION) + polyline.element.attr({"stroke-dasharray": ". "}); + + this.setPaint(originalPaint); + this.setStroke(originalStroke); + }, + + _drawDefaultSequenceFlowIndicator: function(line) { + //console.log("line: ", line); + + var len = 10; c = len/2, f = 8; + var defaultIndicator = this.g.path("M" + (-c) + " " + 0 + "L" + (c) + " " + 0); + defaultIndicator.attr("stroke-width", this.getStroke()+0); + defaultIndicator.attr("stroke", this.getPaint()); + + + var cosAngle = Math.cos((line.angle)); + var sinAngle = Math.sin((line.angle)); + + var dx = f * cosAngle; + var dy = f * sinAngle; + + var x1 = line.x1 + dx + 0*c*cosAngle; + var y1 = line.y1 + dy + 0*c*sinAngle; + + defaultIndicator.transform("t" + (x1) + "," + (y1) + ""); + defaultIndicator.transform("...r" + Raphael.deg(line.angle - 3*Math.PI / 4) + " " + 0 + " " + 0); + /* + var c0 = this.g.ellipse(0, 0, 1, 1).attr({stroke: Color.Blue}); + c0.transform("t" + (line.x1) + "," + (line.y1) + ""); + var center = this.g.ellipse(0, 0, 1, 1).attr({stroke: Color.Red}); + center.transform("t" + (line.x1+dx) + "," + (line.y1+dy) + ""); + */ + + return defaultIndicator; + }, + + drawSequenceflow: function(waypoints, conditional, isDefault, highLighted) { + var withArrowHead = true; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.SEQUENCE_FLOW); + }, + + drawMessageflow: function(waypoints, highLighted) { + var withArrowHead = true; + var conditional=isDefault=false; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.MESSAGE_FLOW); + }, + + drawAssociation: function(waypoints, withArrowHead, highLighted) { + var withArrowHead = withArrowHead; + var conditional=isDefault=false; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.ASSOCIATION); + }, + + _drawCircleTail: function(line, connectionType){ + var diameter = ARROW_WIDTH/2*1.5; + + // anti smoothing + if (this.strokeWidth%2 == 1) + line.x1 += .5, line.y1 += .5; + + var circleTail = this.g.ellipse(line.x1, line.y1, diameter, diameter); + circleTail.attr("fill", Color.white); + circleTail.attr("stroke", this.getPaint()); + + return circleTail; + }, + + _drawArrowHead: function(line, connectionType){ + var doubleArrowWidth = 2 * ARROW_WIDTH; + + if (connectionType == CONNECTION_TYPE.ASSOCIATION) + var arrowHead = this.g.path("M-" + (ARROW_WIDTH/2+.5) + " -" + doubleArrowWidth + "L 0 0 L" + (ARROW_WIDTH/2+.5) + " -" + doubleArrowWidth); + else + var arrowHead = this.g.path("M0 0L-" + (ARROW_WIDTH/2+.5) + " -" + doubleArrowWidth + "L" + (ARROW_WIDTH/2+.5) + " -" + doubleArrowWidth + "z"); + + //arrowHead.transform("t" + 0 + ",-" + this.getStroke() + ""); + + // anti smoothing + if (this.strokeWidth%2 == 1) + line.x2 += .5, line.y2 += .5; + + arrowHead.transform("t" + line.x2 + "," + line.y2 + ""); + arrowHead.transform("...r" + Raphael.deg(line.angle - Math.PI / 2) + " " + 0 + " " + 0); + + if (!connectionType || connectionType == CONNECTION_TYPE.SEQUENCE_FLOW) + arrowHead.attr("fill", this.getPaint()); + else if (connectionType == CONNECTION_TYPE.MESSAGE_FLOW) + arrowHead.attr("fill", Color.white); + + arrowHead.attr("stroke-width", this.getStroke()); + arrowHead.attr("stroke", this.getPaint()); + + return arrowHead; + }, + + /* + drawArrowHead2: function(srcX, srcY, targetX, targetY) { + var doubleArrowWidth = 2 * ARROW_WIDTH; + + //var arrowHead = this.g.path("M-" + ARROW_WIDTH/2 + " -" + doubleArrowWidth + "L0 0" + "L" + ARROW_WIDTH/2 + " -" + doubleArrowWidth + "z"); + + var arrowHead = this.g.path("M0 0L-" + ARROW_WIDTH/1.5 + " -" + doubleArrowWidth + "L" + ARROW_WIDTH/1.5 + " -" + doubleArrowWidth + "z"); + //var c = DefaultProcessDiagramCanvas.g.ellipse(0, 0, 3, 3); + //c.transform("t"+targetX+","+targetY+""); + + var angle = Math.atan2(targetY - srcY, targetX - srcX); + + arrowHead.transform("t"+targetX+","+targetY+""); + arrowHead.transform("...r" + Raphael.deg(angle - Math.PI / 2) + " "+0+" "+0); + + //console.log(arrowHead.transform()); + //console.log("--> " + Raphael.deg(angle - Math.PI / 2)); + + arrowHead.attr("fill", this.getPaint()); + arrowHead.attr("stroke", this.getPaint()); + + / * + // shaddow + var c0 = arrowHead.clone(); + c0.transform("...t-1 1"); + c0.attr("stroke-width", this.strokeWidth); + c0.attr("stroke", Color.black); + c0.attr("opacity", 0.15); + c0.toBack(); + * / + }, + */ + + _drawConditionalSequenceFlowIndicator: function(line){ + var horizontal = (CONDITIONAL_INDICATOR_WIDTH * 0.7); + var halfOfHorizontal = horizontal / 2; + var halfOfVertical = CONDITIONAL_INDICATOR_WIDTH / 2; + + var uuid = null; + var waypoints = [{x: 0, y: 0}, + {x: -halfOfHorizontal, y: halfOfVertical}, + {x: 0, y: CONDITIONAL_INDICATOR_WIDTH}, + {x: halfOfHorizontal, y: halfOfVertical}]; + /* + var polyline = new Polyline(uuid, waypoints, this.getStroke()); + polyline.element = this.g.path(polyline.path); + polyline.element.attr("stroke-width", this.getStroke()); + polyline.element.attr("stroke", this.getPaint()); + polyline.element.id = uuid; + */ + var polygone = new Polygone(waypoints, this.getStroke()); + polygone.element = this.g.path(polygone.path); + polygone.element.attr("fill", Color.white); + + polygone.transform("t" + line.x1 + "," + line.y1 + ""); + polygone.transform("...r" + Raphael.deg(line.angle - Math.PI / 2) + " " + 0 + " " + 0); + + + var cosAngle = Math.cos((line.angle)); + var sinAngle = Math.sin((line.angle)); + + //polygone.element.attr("stroke-width", this.getStroke()); + //polygone.element.attr("stroke", this.getPaint()); + + polygone.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + return polygone.element; + }, + + drawSequenceflowWithoutArrow: function(waypoints, conditional, isDefault, highLighted) { + var withArrowHead = false; + this._drawFlow(waypoints, conditional, isDefault, highLighted, withArrowHead, CONNECTION_TYPE.SEQUENCE_FLOW); + }, + + /* + * Draw artifacts + */ + + drawPoolOrLane: function(x, y, width, height, name){ + // anti smoothing + if (this.strokeWidth%2 == 1) + x = Math.round(x) + .5, y = Math.round(y) + .5; + + // shape + var rect = this.g.rect(x, y, width, height); + var attr = {"stroke-width": NORMAL_STROKE, stroke: TASK_STROKE_COLOR}; + rect.attr(attr); + + // Add the name as text, vertical + if(name != null && name.length > 0) { + var attr = POOL_LANE_FONT; + + // Include some padding + var availableTextSpace = height - 6; + + // Create rotation for derived font + var truncated = this.fitTextToWidth(name, availableTextSpace); + var realWidth = this.getStringWidth(truncated, attr); + var realHeight = this.getStringHeight(truncated, attr); + + //console.log("truncated:", truncated, ", height:", height, ", realHeight:", realHeight, ", availableTextSpace:", availableTextSpace, ", realWidth:", realWidth); + var newX = x + 2 + realHeight*1 - realHeight/2; + var newY = 3 + y + availableTextSpace - (availableTextSpace - realWidth) / 2 - realWidth/2; + var textElement = this.g.text(newX, newY, truncated).attr(attr); + //console.log(".getBBox(): ", t.getBBox()); + textElement.transform("r" + Raphael.deg(270 * Math.PI/180) + " " + newX + " " + newY); + } + + // TODO: add to set + }, + + _drawTask: function(name, x, y, width, height, thickBorder) { + var originalPaint = this.getPaint(); + this.setPaint(TASK_COLOR); + + // anti smoothing + if (this.strokeWidth%2 == 1) + x = Math.round(x) + .5, y = Math.round(y) + .5; + + // shape + var shape = this.g.rect(x, y, width, height, TASK_CORNER_ROUND); + var attr = {"stroke-width": this.strokeWidth, stroke: TASK_STROKE_COLOR, fill: this.getPaint()}; + shape.attr(attr); + //shape.attr({fill: "90-"+this.getPaint()+"-" + Color.get(250, 250, 244)}); + + var contextObject = this.getConextObject(); + if (contextObject) { + shape.id = contextObject.id; + shape.data("contextObject", contextObject); + } + + //var activity = this.getConextObject(); + //console.log("activity: " + activity.getId(), activity); + //Object.clone(activity); + + /* + c.mouseover(function(){ + this.attr({"stroke-width": NORMAL_STROKE + 2}); + }).mouseout(function(){ + this.attr({"stroke-width": NORMAL_STROKE}); + }); + */ + + this.setPaint(originalPaint); + + // white shaddow + this.drawShaddow(shape); + + + if (thickBorder) { + shape.attr({"stroke-width": THICK_TASK_BORDER_STROKE}); + } else { + //g.draw(rect); + } + + // text + if (name) { + var fontAttr = TASK_FONT; + + // Include some padding + var paddingX = 5; + var paddingY = 5; + var availableTextSpace = width - paddingX*2; + + // TODO: this.setFont + // var originalFont = this.getFont(); + // this.setFont(TASK_FONT) + /* + var truncated = this.fitTextToWidth(name, availableTextSpace); + var realWidth = this.getStringWidth(truncated, fontAttr); + var realHeight = this.getStringHeight(truncated, fontAttr); + + //var t = this.g.text(x + width/2 + realWidth*0/2 + paddingX*0, y + height/2, truncated).attr(fontAttr); + */ + //console.log("draw task name: " + name); + var boxWidth = width - (2 * TEXT_PADDING); + var boxHeight = height - ICON_SIZE - ICON_PADDING - ICON_PADDING - MARKER_WIDTH - 2 - 2; + var boxX = x + width/2 - boxWidth/2; + var boxY = y + height/2 - boxHeight/2 + ICON_PADDING + ICON_PADDING - 2 - 2; + /* + var boxWidth = width - (2 * ANNOTATION_TEXT_PADDING); + var boxHeight = height - (2 * ANNOTATION_TEXT_PADDING); + var boxX = x + width/2 - boxWidth/2; + var boxY = y + height/2 - boxHeight/2; + */ + + this.drawTaskLabel(name, boxX, boxY, boxWidth, boxHeight); + } + }, + + drawTaskLabel: function(text, x, y, boxWidth, boxHeight){ + var originalFont = this.getFont(); + this.setFont(TASK_FONT); + + this._drawMultilineText(text, x, y, boxWidth, boxHeight, MULTILINE_VERTICAL_ALIGN_MIDDLE, MULTILINE_HORIZONTAL_ALIGN_MIDDLE); + + this.setFont(originalFont); + }, + + drawAnnotationText: function(text, x, y, width, height){ + //this._drawMultilineText(text, x, y, width, height, "start"); + + var originalPaint = this.getPaint(); + var originalFont = this.getFont(); + + this.setPaint(Color.black); + this.setFont(TASK_FONT); + + this._drawMultilineText(text, x, y, width, height, MULTILINE_VERTICAL_ALIGN_TOP, MULTILINE_HORIZONTAL_ALIGN_LEFT); + + this.setPaint(originalPaint); + this.setFont(originalFont); + }, + + drawLabel: function(text, x, y, width, height){ + //this._drawMultilineText(text, x, y, width, height, "start"); + + var originalPaint = this.getPaint(); + var originalFont = this.getFont(); + + this.setPaint(LABEL_COLOR); + //this.setFont(LABEL_FONT); + this.setFont(LABEL_FONT_SMOOTH); + + // predefined box width for labels + // TODO: use label width as is, but not height (for stretching) + if (!width || !height) { + width = 100; + height = 0; + } + + // TODO: remove it. It is debug + x = x - width/2; + + this._drawMultilineText(text, x, y, width, height, MULTILINE_VERTICAL_ALIGN_TOP, MULTILINE_HORIZONTAL_ALIGN_MIDDLE); + + this.setPaint(originalPaint); + this.setFont(originalFont); + }, + + /* + drawMultilineLabel: function(text, x, y){ + var originalFont = this.getFont(); + this.setFont(LABEL_FONT_SMOOTH); + + var boxWidth = 80; + x = x - boxWidth/2 + + this._drawMultilineText(text, x, y, boxWidth, null, "middle"); + this.setFont(originalFont); + }, + */ + + getStringWidth: function(text, fontAttrs){ + var textElement = this.g.text(0, 0, text).attr(fontAttrs).hide(); + var bb = textElement.getBBox(); + + //console.log("string width: ", t.getBBox().width); + return textElement.getBBox().width; + }, + getStringHeight: function(text, fontAttrs){ + var textElement = this.g.text(0, 0, text).attr(fontAttrs).hide(); + var bb = textElement.getBBox(); + + //console.log("string height: ", t.getBBox().height); + return textElement.getBBox().height; + }, + fitTextToWidth: function(original, width) { + var text = original; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + // remove length for "..." + var dots = this.g.text(0, 0, "...").attr(attr).hide(); + var dotsBB = dots.getBBox(); + + var maxWidth = width - dotsBB.width; + + var textElement = this.g.text(0, 0, text).attr(attr).hide(); + var bb = textElement.getBBox(); + + // it's a little bit incorrect with "..." + while (bb.width > maxWidth && text.length > 0) { + text = text.substring(0, text.length - 1); + textElement.attr({"text": text}); + bb = textElement.getBBox(); + } + + // remove element from paper + textElement.remove(); + + if (text != original) { + text = text + "..."; + } + + return text; + }, + wrapTextToWidth: function(original, width){ + + //return original; + + var text = original; + var wrappedText = "\n"; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + var textElement = this.g.text(0, 0, wrappedText).attr(attr).hide(); + var bb = textElement.getBBox(); + + var resultText = ""; + var i = 0, j = 0; + while (text.length > 0) { + while (bb.width < width && text.length>0) { + // remove "\n" + wrappedText = wrappedText.substring(0,wrappedText.length-1); + // add new char, add "\n" + wrappedText = wrappedText + text.substring(0,1) + "\n"; + text = text.substring(1); + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + i++; + if (i>200) break; + } + // remove "\n" + wrappedText = wrappedText.substring(0, wrappedText.length - 1); + + if (text.length == 0) { + resultText += wrappedText; + break; + } + + // return last char to text + text = wrappedText.substring(wrappedText.length-1) + text; + // remove last char from wrappedText + wrappedText = wrappedText.substring(0, wrappedText.length-1) + "\n"; + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + + //console.log(">> ", wrappedText, ", ", text); + resultText += wrappedText; + wrappedText = "\n"; + + j++; + if (j>20) break; + } + // remove element from paper + textElement.remove(); + + return resultText; + }, + + wrapTextToWidth2: function(original, width){ + var text = original; + var wrappedText = "\n"; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + var textElement = this.g.text(0, 0, wrappedText).attr(attr).hide(); + var bb = textElement.getBBox(); + + var resultText = ""; + var i = 0, j = 0; + while (text.length > 0) { + while (bb.width < width && text.length>0) { + // remove "\n" + wrappedText = wrappedText.substring(0,wrappedText.length-1); + // add new char, add "\n" + wrappedText = wrappedText + text.substring(0,1) + "\n"; + text = text.substring(1); + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + i++; + if (i>200) break; + } + // remove "\n" + wrappedText = wrappedText.substring(0, wrappedText.length - 1); + + if (text.length == 0) { + resultText += wrappedText; + break; + } + + // return last char to text + text = wrappedText.substring(wrappedText.length-1) + text; + // remove last char from wrappedText + wrappedText = wrappedText.substring(0, wrappedText.length-1) + "\n"; + + textElement.attr({"text": wrappedText}); + bb = textElement.getBBox(); + + //console.log(">> ", wrappedText, ", ", text); + resultText += wrappedText; + wrappedText = "\n"; + + j++; + if (j>20) break; + } + // remove element from paper + textElement.remove(); + + return resultText; + }, + + drawUserTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(USERTASK_IMAGE, x + ICON_PADDING, y + ICON_PADDING, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawScriptTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(SCRIPTTASK_IMAGE, x + ICON_PADDING, y + ICON_PADDING, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawServiceTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(SERVICETASK_IMAGE, x + ICON_PADDING, y + ICON_PADDING, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawReceiveTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(RECEIVETASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawSendTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(SENDTASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawManualTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(MANUALTASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawBusinessRuleTask: function(name, x, y, width, height) { + this.g.setStart(); + this._drawTask(name, x, y, width, height); + var img = this.g.image(BUSINESS_RULE_TASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawExpandedSubProcess: function(name, x, y, width, height, isTriggeredByEvent){ + this.g.setStart(); + // anti smoothing + if (this.strokeWidth%2 == 1) + x = Math.round(x) + .5, y = Math.round(y) + .5; + + // shape + var rect = this.g.rect(x, y, width, height, EXPANDED_SUBPROCESS_CORNER_ROUND); + + // Use different stroke (dashed) + if(isTriggeredByEvent) { + rect.attr(EVENT_SUBPROCESS_ATTRS); + } else { + rect.attr(EXPANDED_SUBPROCESS_ATTRS); + } + + this.setContextToElement(rect); + + var fontAttr = EXPANDED_SUBPROCESS_FONT; + + // Include some padding + var paddingX = 10; + var paddingY = 5; + var availableTextSpace = width - paddingX*2; + + var truncated = this.fitTextToWidth(name, availableTextSpace); + var realWidth = this.getStringWidth(truncated, fontAttr); + var realHeight = this.getStringHeight(truncated, fontAttr); + + var textElement = this.g.text(x + width/2 - realWidth*0/2 + 0*paddingX, y + realHeight/2 + paddingY, truncated).attr(fontAttr); + + var set = this.g.setFinish(); + // TODO: Expanded Sub Process may has specific handlers + //this.addHandlers(set, x, y, width, height, "task"); + }, + + drawCollapsedSubProcess: function(name, x, y, width, height, isTriggeredByEvent) { + this.g.setStart(); + this._drawCollapsedTask(name, x, y, width, height, false); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + drawCollapsedCallActivity: function(name, x, y, width, height) { + this.g.setStart(); + this._drawCollapsedTask(name, x, y, width, height, true); + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "task"); + }, + + _drawCollapsedTask: function(name, x, y, width, height, thickBorder) { + // The collapsed marker is now visualized separately + this._drawTask(name, x, y, width, height, thickBorder); + }, + + drawCollapsedMarker: function(x, y, width, height){ + // rectangle + var rectangleWidth = MARKER_WIDTH; + var rectangleHeight = MARKER_WIDTH; + + // anti smoothing + if (this.strokeWidth%2 == 1) + y += .5; + + var rect = this.g.rect(x + (width - rectangleWidth) / 2, y + height - rectangleHeight - 3, rectangleWidth, rectangleHeight); + + // plus inside rectangle + var cx = rect.attr("x") + rect.attr("width")/2; + var cy = rect.attr("y") + rect.attr("height")/2; + + var line = this.g.path( + "M" + cx + " " + (cy+2) + "L" + cx + " " + (cy-2) + + "M" + (cx-2) + " " + cy + "L" + (cx+2) + " " + cy + ).attr({"stroke-width": this.strokeWidth}); + + }, + + drawActivityMarkers: function(x, y, width, height, multiInstanceSequential, multiInstanceParallel, collapsed){ + if (collapsed) { + if (!multiInstanceSequential && !multiInstanceParallel) { + this.drawCollapsedMarker(x, y, width, height); + } else { + this.drawCollapsedMarker(x - MARKER_WIDTH / 2 - 2, y, width, height); + if (multiInstanceSequential) { + console.log("is collapsed and multiInstanceSequential"); + this.drawMultiInstanceMarker(true, x + MARKER_WIDTH / 2 + 2, y, width, height); + } else if (multiInstanceParallel) { + console.log("is collapsed and multiInstanceParallel"); + this.drawMultiInstanceMarker(false, x + MARKER_WIDTH / 2 + 2, y, width, height); + } + } + } else { + if (multiInstanceSequential) { + console.log("is multiInstanceSequential"); + this.drawMultiInstanceMarker(true, x, y, width, height); + } else if (multiInstanceParallel) { + console.log("is multiInstanceParallel"); + this.drawMultiInstanceMarker(false, x, y, width, height); + } + } + }, + + drawGateway: function(x, y, width, height) { + + var rhombus = this.g.path( "M" + x + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + (y + height) + + "L" + (x + width) + " " + (y + (height / 2)) + + "L" + (x + (width / 2)) + " " + y + + "z" + ); + + // white shaddow + this.drawShaddow(rhombus); + + rhombus.attr("stroke-width", this.strokeWidth); + rhombus.attr("stroke", Color.SlateGrey); + rhombus.attr({fill: Color.white}); + + this.setContextToElement(rhombus); + + return rhombus; + }, + + drawParallelGateway: function(x, y, width, height) { + this.g.setStart(); + + // rhombus + this.drawGateway(x, y, width, height); + + // plus inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + + var plus = this.g.path( + "M" + (x + 10) + " " + (y + height / 2) + "L" + (x + width - 10) + " " + (y + height / 2) + // horizontal + "M" + (x + width / 2) + " " + (y + height - 10) + "L" + (x + width / 2) + " " + (y + 10) // vertical + ); + plus.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + drawExclusiveGateway: function(x, y, width, height) { + this.g.setStart(); + + // rhombus + var rhombus = this.drawGateway(x, y, width, height); + + var quarterWidth = width / 4; + var quarterHeight = height / 4; + + // X inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + + var iks = this.g.path( + "M" + (x + quarterWidth + 3) + " " + (y + quarterHeight + 3) + "L" + (x + 3 * quarterWidth - 3) + " " + (y + 3 * quarterHeight - 3) + + "M" + (x + quarterWidth + 3) + " " + (y + 3 * quarterHeight - 3) + "L" + (x + 3 * quarterWidth - 3) + " " + (y + quarterHeight + 3) + ); + iks.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + drawInclusiveGateway: function(x, y, width, height){ + this.g.setStart(); + + // rhombus + this.drawGateway(x, y, width, height); + + var diameter = width / 4; + + // circle inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + var circle = this.g.ellipse(width/2 + x, height/2 + y, diameter, diameter); + circle.attr({"stroke-width": this.getStroke(), "stroke": this.getPaint()}); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + drawEventBasedGateway: function(x, y, width, height){ + this.g.setStart(); + + // rhombus + this.drawGateway(x, y, width, height); + + var diameter = width / 2; + + // rombus inside rhombus + var originalStroke = this.getStroke(); + this.setStroke(GATEWAY_TYPE_STROKE); + + + // draw GeneralPath (polygon) + var n=5; + var angle = 2*Math.PI/n; + var x1Points = []; + var y1Points = []; + + for ( var index = 0; index < n; index++ ) { + var v = index*angle - Math.PI/2; + x1Points[index] = x + parseInt(Math.round(width/2)) + parseInt(Math.round((width/4)*Math.cos(v))); + y1Points[index] = y + parseInt(Math.round(height/2)) + parseInt(Math.round((height/4)*Math.sin(v))); + } + //g.drawPolygon(x1Points, y1Points, n); + + var path = ""; + for ( var index = 0; index < n; index++ ) { + if (index == 0) + path += "M"; + else + path += "L"; + path += x1Points[index] + "," + y1Points[index]; + } + path += "z"; + var polygone = this.g.path(path); + polygone.attr("stroke-width", this.strokeWidth); + polygone.attr("stroke", this.getPaint()); + + this.setStroke(originalStroke); + + var set = this.g.setFinish(); + this.addHandlers(set, x, y, width, height, "gateway"); + }, + + /* + * drawMultiInstanceMarker + * drawHighLight + * highLightFlow + */ + + drawMultiInstanceMarker: function(sequential, x, y, width, height) { + var rectangleWidth = MARKER_WIDTH; + var rectangleHeight = MARKER_WIDTH; + + // anti smoothing + if (this.strokeWidth%2 == 1) + x += .5;//, y += .5; + + var lineX = x + (width - rectangleWidth) / 2; + var lineY = y + height - rectangleHeight - 3; + + var originalStroke = this.getStroke(); + this.setStroke(MULTI_INSTANCE_STROKE); + + if (sequential) { + var line = this.g.path( + "M" + lineX + " " + lineY + "L" + (lineX + rectangleWidth) + " " + lineY + + "M" + lineX + " " + (lineY + rectangleHeight / 2) + "L" + (lineX + rectangleWidth) + " " + (lineY + rectangleHeight / 2) + + "M" + lineX + " " + (lineY + rectangleHeight) + "L" + (lineX + rectangleWidth) + " " + (lineY + rectangleHeight) + ).attr({"stroke-width": this.strokeWidth}); + } else { + var line = this.g.path( + "M" + lineX + " " + lineY + "L" + lineX + " " + (lineY + rectangleHeight) + + "M" + (lineX + rectangleWidth / 2) + " " + lineY + "L" + (lineX + rectangleWidth / 2) + " " + (lineY + rectangleHeight) + + "M" + (lineX + rectangleWidth) + " " + lineY + "L" + (lineX + rectangleWidth) + " " + (lineY + rectangleHeight) + ).attr({"stroke-width": this.strokeWidth}); + } + + this.setStroke(originalStroke); + }, + + drawHighLight: function(x, y, width, height){ + var originalPaint = this.getPaint(); + var originalStroke = this.getStroke(); + + this.setPaint(HIGHLIGHT_COLOR); + this.setStroke(THICK_TASK_BORDER_STROKE); + + //var c = this.g.rect(x - width/2 - THICK_TASK_BORDER_STROKE, y - height/2 - THICK_TASK_BORDER_STROKE, width + THICK_TASK_BORDER_STROKE*2, height + THICK_TASK_BORDER_STROKE*2, 5); + var rect = this.g.rect(x - THICK_TASK_BORDER_STROKE, y - THICK_TASK_BORDER_STROKE, width + THICK_TASK_BORDER_STROKE*2, height + THICK_TASK_BORDER_STROKE*2, TASK_CORNER_ROUND); + rect.attr("stroke-width", this.strokeWidth); + rect.attr("stroke", this.getPaint()); + + this.setPaint(originalPaint); + this.setStroke(originalStroke); + }, + + highLightActivity: function(activityId){ + var shape = this.g.getById(activityId); + if (!shape) { + console.error("Activity " + activityId + " not found"); + return; + } + + var contextObject = shape.data("contextObject"); + if (contextObject) + console.log("--> highLightActivity: ["+contextObject.getProperty("type")+"], activityId: " + contextObject.getId()); + else + console.log("--> highLightActivity: ", shape, shape.data("contextObject")); + + shape.attr("stroke-width", THICK_TASK_BORDER_STROKE); + shape.attr("stroke", HIGHLIGHT_COLOR); + }, + + highLightFlow: function(flowId){ + var shapeFlow = this.g.getById(flowId); + if (!shapeFlow) { + console.error("Flow " + flowId + " not found"); + return; + } + + var contextObject = shapeFlow.data("contextObject"); + if (contextObject) + console.log("--> highLightFlow: ["+contextObject.id+"] " + contextObject.flow); + //console.log("--> highLightFlow: ", flow.flow, flow.data("set")); + + var st = shapeFlow.data("set"); + + st.attr("stroke-width", SEQUENCEFLOW_HIGHLIGHT_STROKE); + st.attr("stroke", HIGHLIGHT_COLOR); + var withArrowHead = shapeFlow.data("withArrowHead"); + if (withArrowHead) + st[1].attr("fill", HIGHLIGHT_COLOR); + + st.forEach(function(el){ + //console.log("---->", el); + //el.attr("") + }); + }, + + + _drawClock: function(cx, cy, width, height){ + + var circle = this.g.ellipse(cx, cy, 1, 1).attr({stroke:"none", fill: Color.get(232, 239, 241)}); + //var c = this.g.ellipse(cx, cy, width, height).attr({stroke:"none", fill: Color.red}); + //x = cx - width/2; + //y = cy - height/2; + + var clock = this.g.path( + /* outer circle */ "M15.5,2.374 C8.251,2.375,2.376,8.251,2.374,15.5 C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374z" + + /* inner circle */ "M15.5,26.623 C8.909,26.615,4.385,22.09,4.375,15.5 C4.385,8.909,8.909,4.384,15.5,4.374c4.59,0.01,11.115,3.535,11.124,11.125C26.615,22.09,22.091,26.615,15.5,26.623z" + + /* 9 */ "M8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5z" + + /* 8 */ "M8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572z" + + /* 10 */ "M9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696z" + + /* 2 */ "M22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428z" + + /* 7 */ "M12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455z" + + /* 11 */ "M12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545z" + + /* 4 */ "M22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572z" + + /* 2 */ "M19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813z" + + /* 3 */ "M23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5z" + + /* arrows */ "M15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624z" + + /* 9 */ "M15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377z" + + /* 8 */ "M18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z" + + ""); + clock.attr({fill: Color.black, stroke: "none"}); + //clock.transform("t " + (cx-29.75/2) + " " + (cy-29.75/2)); + //clock.transform("...s 0.85"); + + //clock.transform("...s " + .85 + " " + .85); + clock.transform("t " + (-2.374) + " " + (-2.374) ); + clock.transform("...t -" + (15.5-2.374) + " -" + (15.5-2.374) ); + clock.transform("...s " + 1*(width/35) + " " + 1*(height/35)); + clock.transform("...T " + cx + " " + cy); + //clock.transform("t " + (cx-width/2) + " " + (cy-height/2)); + + //console.log(".getBBox(): ", clock.getBBox()); + //console.log(".attr(): ", c.attrs); + circle.attr("rx", clock.getBBox().width/2); + circle.attr("ry", clock.getBBox().height/2); + + //return circle + }, + + _drawPentagon: function(cx, cy, width, height, filled){ + // draw GeneralPath (polygon) + var n=5; + var angle = 2*Math.PI/n; + var waypoints = []; + + for ( var index = 0; index < n; index++ ) { + var v = index*angle - Math.PI/2; + var point = {}; + point.x = -width*1.2/2 + parseInt(Math.round(width*1.2/2)) + parseInt(Math.round((width*1.2/4)*Math.cos(v))); + point.y = -height*1.2/2 + parseInt(Math.round(height*1.2/2)) + parseInt(Math.round((height*1.2/4)*Math.sin(v))); + waypoints[index] = point; + } + + var polygone = new Polygone(waypoints, this.getStroke()); + polygone.element = this.g.path(polygone.path); + if (filled) + polygone.element.attr("fill", Color.black); + else + polygone.element.attr("fill", Color.white); + + polygone.element.transform("s " + 1*(width/35) + " " + 1*(height/35)); + polygone.element.transform("...T " + cx + " " + cy); + }, + + //_drawMultilineText: function(text, x, y, boxWidth, boxHeight, textAnchor) { + _drawMultilineText: function(text, x, y, boxWidth, boxHeight, verticalAlign, horizontalAlign) { + if (!text || text == "") + return; + + // Autostretch boxHeight if boxHeight is 0 + if (boxHeight == 0) + verticalAlign = MULTILINE_VERTICAL_ALIGN_TOP; + + //var TEXT_PADDING = 3; + var width = boxWidth; + if (boxHeight) + var height = boxHeight; + + var layouts = []; + + //var font = {font: "11px Arial", opacity: 1, "fill": LABEL_COLOR}; + var font = this.getFont(); + var measurer = new LineBreakMeasurer(this.g, x, y, text, font); + var lineHeight = measurer.rafaelTextObject.getBBox().height; + //console.log("text: ", text.replace(/\n/g, "?")); + + if (height) { + var availableLinesCount = parseInt(height/lineHeight); + //console.log("availableLinesCount: " + availableLinesCount); + } + + var i = 1; + while (measurer.getPosition() < measurer.text.getEndIndex()) { + var layout = measurer.nextLayout(width); + //console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition()); + + if (layout != null) { + // TODO: and check if measurer has next layout. If no then don't draw dots + if (!availableLinesCount || i < availableLinesCount) { + layouts.push(layout); + } else { + layouts.push(this.fitTextToWidth(layout + "...", boxWidth)); + break; + } + } + i++; + }; + //console.log(layouts); + + measurer.rafaelTextObject.attr({"text": layouts.join("\n")}); + + if (horizontalAlign) + measurer.rafaelTextObject.attr({"text-anchor": horizontalAlign}); // end, middle, start + + var bb = measurer.rafaelTextObject.getBBox(); + // TODO: there is somethin wrong with wertical align. May be: measurer.rafaelTextObject.attr({"y": y + height/2 - bb.height/2}) + measurer.rafaelTextObject.attr({"y": y + bb.height/2}); + //var bb = measurer.rafaelTextObject.getBBox(); + + if (measurer.rafaelTextObject.attr("text-anchor") == MULTILINE_HORIZONTAL_ALIGN_MIDDLE ) + measurer.rafaelTextObject.attr("x", x + boxWidth/2); + else if (measurer.rafaelTextObject.attr("text-anchor") == MULTILINE_HORIZONTAL_ALIGN_RIGHT ) + measurer.rafaelTextObject.attr("x", x + boxWidth); + + var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "}; + //var box = this.g.rect(x+.5, y + .5, width, height).attr(boxStyle); + var textAreaCX = x + boxWidth/2; + var height = boxHeight; + if (!height) height = bb.height; + var textAreaCY = y + height/2; + var dotLeftTop = this.g.ellipse(x, y, 3, 3).attr({"stroke-width": 0, fill: Color.LightSteelBlue, stroke: "none"}).hide(); + var dotCenter = this.g.ellipse(textAreaCX, textAreaCY, 3, 3).attr({fill: Color.LightSteelBlue2, stroke: "none"}).hide(); + + /* + // real bbox + var bb = measurer.rafaelTextObject.getBBox(); + var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1}); + */ + var rect = this.g.rect(x, y, boxWidth, height).attr({"stroke-width": 1}).attr(boxStyle).hide(); + var debugSet = this.g.set(); + debugSet.push(dotLeftTop, dotCenter, rect); + //debugSet.show(); + }, + + drawTextAnnotation: function(text, x, y, width, height){ + var lineLength = 18; + var path = []; + path.push(["M", x + lineLength, y]); + path.push(["L", x, y]); + path.push(["L", x, y + height]); + path.push(["L", x + lineLength, y + height]); + + path.push(["L", x + lineLength, y + height -1]); + path.push(["L", x + 1, y + height -1]); + path.push(["L", x + 1, y + 1]); + path.push(["L", x + lineLength, y + 1]); + path.push(["z"]); + + var textAreaLines = this.g.path(path); + + var boxWidth = width - (2 * ANNOTATION_TEXT_PADDING); + var boxHeight = height - (2 * ANNOTATION_TEXT_PADDING); + var boxX = x + width/2 - boxWidth/2; + var boxY = y + height/2 - boxHeight/2; + + // for debug + var rectStyle = {stroke: Color(112, 146, 190), "stroke-width": 1.0, "stroke-dasharray": "- "}; + var r = this.g.rect(boxX, boxY, boxWidth, boxHeight).attr(rectStyle); + // + + this.drawAnnotationText(text, boxX, boxY, boxWidth, boxHeight); + }, + + drawLabel111111111: function(text, x, y, width, height, labelAttrs){ + var debug = false; + + // text + if (text != null && text != undefined && text != "") { + var attr = LABEL_FONT; + + //console.log("x", x, "y", y, "width", width, "height", height ); + + wrappedText = text; + if (labelAttrs && labelAttrs.wrapWidth) { + wrappedText = this.wrapTextToWidth(wrappedText, labelAttrs.wrapWidth); + } + var realWidth = this.getStringWidth(wrappedText, attr); + var realHeight = this.getStringHeight(wrappedText, attr); + + var textAreaCX = x + width/2; + var textAreaCY = y + 3 + height + this.getStringHeight(wrappedText, attr)/2; + + var textX = textAreaCX; + var textY = textAreaCY; + + var textAttrs = {}; + if (labelAttrs && labelAttrs.align) { + switch (labelAttrs.align) { + case "left": + textAttrs["text-anchor"] = "start"; + textX = textX - realWidth/2; + break; + case "center": + textAttrs["text-anchor"] = "middle"; + break; + case "right": + textAttrs["text-anchor"] = "end"; + textX = textX + realWidth/2; + break; + } + } + if (labelAttrs && labelAttrs.wrapWidth) { + if (true) { + // Draw frameborder + var textAreaStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "}; + var textAreaX = textAreaCX - realWidth/2; + var textAreaY = textAreaCY+.5 - realHeight/2; + var textArea = this.g.rect(textAreaX, textAreaY, realWidth, realHeight).attr(textAreaStyle); + + var textAreaLines = this.g.path("M" + textAreaX + " " + textAreaY + "L" + (textAreaX+realWidth) + " " + (textAreaY+realHeight) + "M" + + (textAreaX+realWidth) + " " + textAreaY + "L" + textAreaX + " " + (textAreaY+realHeight)); + textAreaLines.attr(textAreaStyle); + + this.g.ellipse(textAreaCX, textAreaCY, 3, 3).attr({fill: Color.LightSteelBlue2, stroke: "none"}); + } + } + + var label = this.g.text(textX, textY, wrappedText).attr(attr).attr(textAttrs); + //label.id = Raphael.createUUID(); + //console.log("label ", label.id, ", ", wrappedText); + + if (this.fontSmoothing) { + label.attr({stroke: LABEL_COLOR, "stroke-width":.4}); + } + + // debug + if (debug) { + var imageAreaStyle = {stroke: Color.grey61, "stroke-width": 1.0, "stroke-dasharray": "- "}; + var imageArea = this.g.rect(x+.5, y+.5, width, height).attr(imageAreaStyle); + var imageAreaLines = this.g.path("M" + x + " " + y + "L" + (x+width) + " " + (y+height) + "M" + + (x+width) + " " + y + "L" + x + " " + (y+height)); + imageAreaLines.attr(imageAreaStyle); + var dotStyle = {fill: Color.Coral, stroke: "none"}; + this.g.ellipse(x, y, 3, 3).attr(dotStyle); + this.g.ellipse(x+width, y, 2, 2).attr(dotStyle); + this.g.ellipse(x+width, y+height, 2, 2).attr(dotStyle); + this.g.ellipse(x, y+height, 2, 2).attr(dotStyle); + } + + return label; + } + }, + + vvoid: function(){} +}; diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramGenerator.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramGenerator.js new file mode 100644 index 0000000..9855233 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/ProcessDiagramGenerator.js @@ -0,0 +1,1087 @@ + /** + * Class to generate an image based the diagram interchange information in a + * BPMN 2.0 process. + * + * @author (Javascript) Dmitry Farafonov + */ + +var ProcessDiagramGenerator = { + options: {}, + + processDiagramCanvas: [], + + activityDrawInstructions:{}, + + processDiagrams: {}, + + diagramBreadCrumbs: null, + + init: function(){ + // start event + this.activityDrawInstructions["startEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawNoneStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // start timer event + this.activityDrawInstructions["startTimerEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawTimerStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // start event + this.activityDrawInstructions["messageStartEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawMessageStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // start signal event + this.activityDrawInstructions["startSignalEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawSignalStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // start multiple event + this.activityDrawInstructions["startMultipleEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawMultipleStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // signal catch + this.activityDrawInstructions["intermediateSignalCatch"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingSignalEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // message catch + this.activityDrawInstructions["intermediateMessageCatch"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingMessageEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // multiple catch + this.activityDrawInstructions["intermediateMultipleCatch"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingMultipleEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + + + // signal throw + this.activityDrawInstructions["intermediateSignalThrow"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingSignalEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // message throw + this.activityDrawInstructions["intermediateMessageThrow"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingMessageEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // multiple throw + this.activityDrawInstructions["intermediateMultipleThrow"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingMultipleEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // none throw + this.activityDrawInstructions["intermediateThrowEvent"] = function() { + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawThrowingNoneEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // end event + this.activityDrawInstructions["endEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawNoneEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // error end event + this.activityDrawInstructions["errorEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawErrorEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // message end event + this.activityDrawInstructions["messageEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawMessageEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // signal end event + this.activityDrawInstructions["signalEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawSignalEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // multiple end event + this.activityDrawInstructions["multipleEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawMultipleEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // terminate end event + this.activityDrawInstructions["terminateEndEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawTerminateEndEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // error start event + this.activityDrawInstructions["errorStartEvent"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawErrorStartEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), activityImpl.getProperty("name")); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // task + this.activityDrawInstructions["task"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + // TODO: + //console.error("task is not implemented yet"); + /* + var activityImpl = this; + processDiagramCanvas.drawTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), thickBorder); + */ + }; + + + // user task + this.activityDrawInstructions["userTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawUserTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // script task + this.activityDrawInstructions["scriptTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawScriptTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // service task + this.activityDrawInstructions["serviceTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawServiceTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // receive task + this.activityDrawInstructions["receiveTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawReceiveTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // send task + this.activityDrawInstructions["sendTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawSendTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // manual task + this.activityDrawInstructions["manualTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawManualTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // businessRuleTask task + this.activityDrawInstructions["businessRuleTask"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawBusinessRuleTask(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // exclusive gateway + this.activityDrawInstructions["exclusiveGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawExclusiveGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // inclusive gateway + this.activityDrawInstructions["inclusiveGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawInclusiveGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // parallel gateway + this.activityDrawInstructions["parallelGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawParallelGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // eventBasedGateway + this.activityDrawInstructions["eventBasedGateway"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + processDiagramCanvas.drawEventBasedGateway(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + // Boundary timer + this.activityDrawInstructions["boundaryTimer"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingTimerEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // Boundary catch error + this.activityDrawInstructions["boundaryError"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingErrorEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // Boundary signal event + this.activityDrawInstructions["boundarySignal"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingSignalEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // Boundary message event + this.activityDrawInstructions["boundaryMessage"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = activityImpl.getProperty("isInterrupting"); + processDiagramCanvas.drawCatchingMessageEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, null); + + var label = ProcessDiagramGenerator.getActivitiLabel(activityImpl); + if (label) + processDiagramCanvas.drawLabel(label.text, label.x, label.y, label.width, label.height); + }; + + // timer catch event + this.activityDrawInstructions["intermediateTimer"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + + var isInterrupting = null; + processDiagramCanvas.drawCatchingTimerEvent(activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight(), isInterrupting, activityImpl.getProperty("name")); + }; + + // subprocess + this.activityDrawInstructions["subProcess"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + // TODO: + + processDiagramCanvas.setConextObject(activityImpl); + + var isExpanded = activityImpl.getProperty("isExpanded"); + var isTriggeredByEvent = activityImpl.getProperty("triggeredByEvent"); + if(isTriggeredByEvent == undefined) { + isTriggeredByEvent = true; + } + // TODO: check why isTriggeredByEvent = true when undefined + isTriggeredByEvent = false; + + if (isExpanded != undefined && isExpanded == false) { + processDiagramCanvas.drawCollapsedSubProcess(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), + activityImpl.getWidth(), activityImpl.getHeight(), isTriggeredByEvent); + } else { + processDiagramCanvas.drawExpandedSubProcess(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), + activityImpl.getWidth(), activityImpl.getHeight(), isTriggeredByEvent); + } + + //console.error("subProcess is not implemented yet"); + }; + + // call activity + this.activityDrawInstructions["callActivity"] = function(){ + var activityImpl = this.activity; + var processDiagramCanvas = this.processDiagramCanvas; + processDiagramCanvas.setConextObject(activityImpl); + processDiagramCanvas.drawCollapsedCallActivity(activityImpl.getProperty("name"), activityImpl.getX(), activityImpl.getY(), activityImpl.getWidth(), activityImpl.getHeight()); + }; + + $(document).ready(function(){ + // Protect right click on SVG elements (and on canvas too) + document.body.oncontextmenu = function(event) { + if (window.event.srcElement.tagName == "shape" || window.event.srcElement.tagName == "DIV" && window.event.srcElement.parentElement.className == "diagram") { + + // IE DIAGRAM CANVAS OR SHAPE DETECTED! + return false; + } + return (!Object.isSVGElement(window.event.srcElement)); + }; + }); + }, + + getActivitiLabel:function(activityImpl){ + /* + TODO: Label object should be in activityImpl and looks like: + { + x: 250, + y: 250, + width: 80, + height: 30 + } + And then: + if (!activityImpl.label) + return null; + var label = activityImpl.label; + label.text = activityImpl.name; + return label; + */ + + // But now default label for all events is: + return { + text: activityImpl.getProperty("name"), + x: activityImpl.getX() + .5 + activityImpl.getWidth()/2, + y: activityImpl.getY() + .5 + activityImpl.getHeight() + ICON_PADDING, + width: 100, + height: 0 + }; + }, + + generateDiagram: function(processDefinitionDiagramLayout){ + // Init canvas + var processDefinitionId = processDefinitionDiagramLayout.processDefinition.id; + //console.log("Init canvas ", processDefinitionId); + + if (this.getProcessDiagram(processDefinitionId) != undefined) { + // TODO: may be reset canvas if exists.. Or just show + //console.log("ProcessDiagram '" + processDefinitionId + "' is already generated. Just show it."); + return; + } + var processDiagram = this.initProcessDiagramCanvas(processDefinitionDiagramLayout); + var processDiagramCanvas = processDiagram.diagramCanvas; + + // Draw pool shape, if process is participant in collaboration + + if(processDefinitionDiagramLayout.participantProcess != undefined) { + //console.log("Draw pool shape"); + var pProc = processDefinitionDiagramLayout.participantProcess; + processDiagramCanvas.drawPoolOrLane(pProc.x, pProc.y, pProc.width, pProc.height, pProc.name); + } + + var laneSets = processDefinitionDiagramLayout.laneSets; + var activities = processDefinitionDiagramLayout.activities; + var sequenceFlows = processDefinitionDiagramLayout.sequenceFlows; + + + pb1.set('value', 0); + var cnt = 0; + if (laneSets) + for(var i in laneSets) { + cnt += laneSets[i].lanes.length; + } + if (activities) + cnt += activities.length; + if (sequenceFlows) + cnt += sequenceFlows.length; + var step = (cnt>0)? 100/cnt : 0; + var progress = 0; + //console.log("progress bar step: ", step); + + var task1 = new $.AsyncQueue(); + + // Draw lanes + + task1.add(function (task1) { + if (!laneSets) laneSets = []; + //console.log("> draw lane sets, count:", laneSets.length) + }); + + for(var i in laneSets) { + var laneSet = laneSets[i]; + //laneSet.id, laneSet.name + + task1.add(laneSet.lanes,function (task1, lane) { + progress += step; + pb1.set('value', parseInt(progress)); + + //console.log("--> laneId: " + lane.name + ", name: " + lane.name); + + processDiagramCanvas.drawPoolOrLane(lane.x, lane.y, lane.width, lane.height, lane.name); + }); + } + + // Draw activities + + task1.add(function (task1) { + if (!activities) activities = []; + //console.log("> draw activities, count:", activities.length) + }); + + var activitiesLength = activities.length; + task1.add(activities,function (task1, activityJson) { + var activity = new ActivityImpl(activityJson); + activitiesLength --; + progress += step; + pb1.set('value', parseInt(progress)); + //console.log(activitiesLength, "--> activityId: " + activity.getId() + ", name: " + activity.getProperty("name")); + ProcessDiagramGenerator.drawActivity(processDiagramCanvas, activity); + }); + + // Draw sequence-flows + + task1.add(function (task1) { + if (!sequenceFlows) sequenceFlows = []; + //console.log("> draw sequence flows, count:", sequenceFlows.length) + }); + + var flowsLength = sequenceFlows.length; + task1.add(sequenceFlows,function (task1, flow) { + var waypoints = []; + for(var j in flow.xPointArray) { + waypoints[j] = {x: flow.xPointArray[j], y: flow.yPointArray[j]}; + } + var isDefault = flow.isDefault; + var isConditional = flow.isConditional; + var isHighLighted = flow.isHighLighted; + + // TODO: add source and destination for sequence flows in REST + // parse for test + var f = flow.flow; + var matches = f.match(/\((.*)\)--.*-->\((.*)\)/); + var sourceActivityId, destinationActivityId; + if (matches != null) { + sourceActivityId = matches[1]; + destinationActivityId = matches[2]; + } + flow.sourceActivityId = sourceActivityId; + flow.destinationActivityId = destinationActivityId; + // + flowsLength--; + progress += step; + pb1.set('value', parseInt(progress)); + + //console.log(flowsLength, "--> flow: " + flow.flow); + + processDiagramCanvas.setConextObject(flow); + processDiagramCanvas.drawSequenceflow(waypoints, isConditional, isDefault, isHighLighted); + }); + + task1.onComplete(function(){ + if (progress<100) + pb1.set('value', 100); + //console.log("COMPLETE!!!"); + + //console.timeEnd('generateDiagram'); + }); + + task1.run(); + }, + + getProcessDiagram: function (processDefinitionId) { + return this.processDiagrams[processDefinitionId]; + }, + + initProcessDiagramCanvas: function (processDefinitionDiagramLayout) { + var minX = 0; + var maxX = 0; + var minY = 0; + var maxY = 0; + + if(processDefinitionDiagramLayout.participantProcess != undefined) { + var pProc = processDefinitionDiagramLayout.participantProcess; + + minX = pProc.x; + maxX = pProc.x + pProc.width; + minY = pProc.y; + maxY = pProc.y + pProc.height; + } + + var activities = processDefinitionDiagramLayout.activities; + for(var i in activities) { + var activityJson = activities[i]; + var activity = new ActivityImpl(activityJson); + + // width + if (activity.getX() + activity.getWidth() > maxX) { + maxX = activity.getX() + activity.getWidth(); + } + if (activity.getX() < minX) { + minX = activity.getX(); + } + // height + if (activity.getY() + activity.getHeight() > maxY) { + maxY = activity.getY() + activity.getHeight(); + } + if (activity.getY() < minY) { + minY = activity.getY(); + } + } + + var sequenceFlows = processDefinitionDiagramLayout.sequenceFlows; + for(var i in sequenceFlows) { + var flow = sequenceFlows[i]; + var waypoints = []; + for(var j in flow.xPointArray) { + waypoints[j] = {x: flow.xPointArray[j], y: flow.yPointArray[j]}; + + // width + if (waypoints[j].x > maxX) { + maxX = waypoints[j].x; + } + if (waypoints[j].x < minX) { + minX = waypoints[j].x; + } + // height + if (waypoints[j].y > maxY) { + maxY = waypoints[j].y; + } + if (waypoints[j].y < minY) { + minY = waypoints[j].y; + } + } + } + + var laneSets = processDefinitionDiagramLayout.laneSets; + for(var i in laneSets) { + var laneSet = laneSets[i]; + //laneSet.id, laneSet.name + + for(var j in laneSet.lanes) { + var lane = laneSet.lanes[j]; + // width + if (lane.x + lane.width > maxX) { + maxX = lane.x + lane.width; + } + if (lane.x < minX) { + minX = lane.x; + } + // height + if (lane.y + lane.height > maxY) { + maxY = lane.y + lane.height; + } + if (lane.y < minY) { + minY = lane.y; + } + } + } + + var diagramCanvas = new ProcessDiagramCanvas(); + if (diagramCanvas) { + + // create div in diagramHolder + var diagramHolder = document.getElementById(this.options.diagramHolderId); + if (!diagramHolder) + throw {msg: "Diagram holder not found", error: "diagramHolderNotFound"}; + var div = document.createElement("DIV"); + div.id = processDefinitionDiagramLayout.processDefinition.id; + div.className = "diagram"; + diagramHolder.appendChild(div); + + diagramCanvas.init(maxX + 20, maxY + 20, processDefinitionDiagramLayout.processDefinition.id); + this.processDiagrams[processDefinitionDiagramLayout.processDefinition.id] = { + processDefinitionDiagramLayout: processDefinitionDiagramLayout, + diagramCanvas: diagramCanvas + }; + } + return this.getProcessDiagram(processDefinitionDiagramLayout.processDefinition.id); + //return new DefaultProcessDiagramCanvas(maxX + 10, maxY + 10, minX, minY); + }, + + drawActivity: function(processDiagramCanvas, activity, highLightedActivities) { + var type = activity.getProperty("type"); + var drawInstruction = this.activityDrawInstructions[type]; + if (drawInstruction != null) { + drawInstruction.apply({processDiagramCanvas:processDiagramCanvas, activity:activity}); + } else { + //console.error("no drawInstruction for " + type + ": ", activity); + } + + // Actually draw the markers + if (activity.getProperty("multiInstance") != undefined || activity.getProperty("collapsed") != undefined) { + //console.log(activity.getProperty("name"), activity.properties); + var multiInstanceSequential = (activity.getProperty("multiInstance") == "sequential"); + var multiInstanceParallel = (activity.getProperty("multiInstance") == "parrallel"); + var collapsed = activity.getProperty("collapsed"); + processDiagramCanvas.drawActivityMarkers(activity.getX(), activity.getY(), activity.getWidth(), activity.getHeight(), + multiInstanceSequential, multiInstanceParallel, collapsed); + } + /* + processDiagramCanvas.drawActivityMarkers(activity.getX(), activity.getY(), activity.getWidth(), activity.getHeight(), multiInstanceSequential, + multiInstanceParallel, collapsed); + */ + + // TODO: Draw highlighted activities if they are present + + }, + + setHighLights: function(highLights){ + if (highLights.processDefinitionId == undefined) { + //console.error("Process instance " + highLights.processInstanceId + " doesn't exist"); + return; + } + + var processDiagram = this.getProcessDiagram(highLights.processDefinitionId); + if (processDiagram == undefined) { + //console.error("Process diagram " + highLights.processDefinitionId + " not found"); + return; + } + + var processDiagramCanvas = processDiagram.diagramCanvas; + + // TODO: remove highLightes from all activities before set new highLight + for (var i in highLights.activities) { + var activityId = highLights.activities[i]; + processDiagramCanvas.highLightActivity(activityId); + } + + // TODO: remove highLightes from all flows before set new highLight + for (var i in highLights.flows) { + var flowId = highLights.flows[i]; + var object = processDiagramCanvas.g.getById(flowId); + var flow = object.data("contextObject"); + flow.isHighLighted = true; + processDiagramCanvas.highLightFlow(flowId); + } + }, + + drawHighLights: function(processInstanceId) { + // Load highLights for the processInstanceId + /* + var url = Lang.sub(this.options.processInstanceHighLightsUrl, {processInstanceId: processInstanceId}); + $.ajax({ + url: url, + type: 'GET', + dataType: 'json', + cache: false, + async: true, + }).done(function(data) { + var highLights = data; + if (!highLights) { + console.log("highLights not found"); + return; + } + + console.log("highLights[" + highLights.processDefinitionId + "][" + processInstanceId + "]: ", highLights); + + ProcessDiagramGenerator.setHighLights(highLights); + }).fail(function(jqXHR, textStatus){ + console.log('Get HighLights['+processDefinitionId+'] failure: ', textStatus, jqXHR); + }); + */ + ActivitiRest.getHighLights(processInstanceId, this._drawHighLights); + }, + _drawHighLights: function() { + var highLights = this.highLights; + ProcessDiagramGenerator.setHighLights(highLights); + }, + + // Load processDefinition + + drawDiagram: function(processDefinitionId) { + // Hide all diagrams + var diagrams = $("#" + this.options.diagramHolderId + " div.diagram"); + diagrams.addClass("hidden"); + + + // If processDefinitionId doesn't contain ":" then it's a "processDefinitionKey", not an id. + // Get process definition by key + if (processDefinitionId.indexOf(":") < 0) { + ActivitiRest.getProcessDefinitionByKey(processDefinitionId, this._drawDiagram); + } else { + this._drawDiagram.apply({processDefinitionId: processDefinitionId}); + } + }, + _drawDiagram: function() { + var processDefinitionId = this.processDefinitionId; + + ProcessDiagramGenerator.addBreadCrumbsItem(processDefinitionId); + + + // Check if processDefinition is already loaded and rendered + + + var processDiagram = ProcessDiagramGenerator.getProcessDiagram(processDefinitionId); + + if (processDiagram != undefined && processDiagram != null) { + //console.log("Process diagram " + processDefinitionId + " is already loaded"); + //return; + + var diagram = document.getElementById(processDefinitionId); + $(diagram).removeClass("hidden"); + + // Regenerate image + var processDefinitionDiagramLayout = processDiagram.processDefinitionDiagramLayout; + ProcessDiagramGenerator.generateDiagram(processDefinitionDiagramLayout); + + return; + } + + //console.time('loadDiagram'); + + // Load processDefinition + + ActivitiRest.getProcessDefinition(processDefinitionId, ProcessDiagramGenerator._generateDiagram); + }, + _generateDiagram: function() { + var processDefinitionDiagramLayout = this.processDefinitionDiagramLayout; + + //console.log("process-definition-diagram-layout["+processDefinitionDiagramLayout.processDefinition.id+"]: ", processDefinitionDiagramLayout); + + //console.timeEnd('loadDiagram'); + //console.time('generateDiagram'); + + pb1.set('value', 0); + ProcessDiagramGenerator.generateDiagram(processDefinitionDiagramLayout); + }, + + getProcessDefinitionByKey: function(processDefinitionKey) { + var url = Lang.sub(this.options.processDefinitionByKeyUrl, {processDefinitionKey: processDefinitionKey}); + + var processDefinition; + $.ajax({ + url: url, + type: 'POST', + dataType: 'json', + cache: false, + async: false + }).done(function(data) { + //console.log("ajax returned data"); + //console.log("ajax returned data:", data); + processDefinition = data; + if (!processDefinition) { + //console.error("Process definition '" + processDefinitionKey + "' not found"); + } + }).fail(function(jqXHR, textStatus){ + //console.error('Get diagram layout['+processDefinitionKey+'] failure: ', textStatus, jqXHR); + }); + + if (processDefinition) { + //console.log("Get process definition by key '" + processDefinitionKey + "': ", processDefinition.id); + return processDefinition; + } else { + return null; + } + }, + + addBreadCrumbsItem: function(processDefinitionId){ + var TPL_UL_CONTAINER = '<ul></ul>', + TPL_LI_CONTAINER = '<li id="{id}", processDefinitionId="{processDefinitionId}"><span>{name}</span></li>'; + + if (!this.diagramBreadCrumbs) + this.diagramBreadCrumbs = $("#" + this.options.diagramBreadCrumbsId); + if (!this.diagramBreadCrumbs) return; + + + var ul = this.diagramBreadCrumbs.find("ul"); + //console.log("ul: ", ul); + if (ul.size() == 0) { + ul = $(TPL_UL_CONTAINER); + this.diagramBreadCrumbs.append(ul); + + } + var liListOld = ul.find("li"); + //console.warn("liListOld", liListOld); + + // TODO: if there is any items after current then remove that before adding new item (m.b. it is a duplicate) + var currentBreadCrumbsItemId = this.currentBreadCrumbsItemId; + found = false; + liListOld.each( + function(index, item) { + //console.warn("item:", $(this)); + if (!found && currentBreadCrumbsItemId == $(this).attr("id")) { + found = true; + return; + } + if (found) { + //console.warn("remove ", $(this).attr("id")); + $(this).remove(); + } + } + ); + + var liListNew = ul.find("li"); + + //console.log("liListNew size: ", liListNew.size()); + var values = { + id: 'breadCrumbsItem_' + liListNew.size(), + processDefinitionId: processDefinitionId, + name: processDefinitionId + }; + + + var tpl = Lang.sub(TPL_LI_CONTAINER, values); + //console.log("tpl: ", tpl); + ul.append(tpl); + + var li = ul.find("#" + values.id); + //console.warn("li:", li); + $('#' + values.id).on('click', this._breadCrumbsItemClick); + + ul.find("li").removeClass("selected"); + li.attr("num", liListNew.size()); + li.addClass("selected"); + this.currentBreadCrumbsItemId = li.attr("id"); + }, + _breadCrumbsItemClick: function(){ + var li = $(this), + id = li.attr("id"), + processDefinitionId = li.attr("processDefinitionId"); + //console.warn("_breadCrumbsItemClick: ", id, ", processDefinitionId: ", processDefinitionId); + + var ul = ProcessDiagramGenerator.diagramBreadCrumbs.one("ul"); + ul.find("li").removeClass("selected"); + li.addClass("selected"); + ProcessDiagramGenerator.currentBreadCrumbsItemId = li.attr("id"); + + // Hide all diagrams + var diagrams = $("#"+ProcessDiagramGenerator.options.diagramHolderId+" div.diagram"); + diagrams.addClass("hidden"); + + var processDiagram = ProcessDiagramGenerator.getProcessDiagram(processDefinitionId); + + var diagram = document.getElementById(processDefinitionId); + if (!diagram) return; + $(diagram).removeClass("hidden"); + + // Regenerate image + var processDefinitionDiagramLayout = processDiagram.processDefinitionDiagramLayout; + ProcessDiagramGenerator.generateDiagram(processDefinitionDiagramLayout); + }, + + showFlowInfo: function(flow){ + var diagramInfo = $("#" + this.options.diagramInfoId); + if (!diagramInfo) return; + + var values = { + flow: flow.flow, + isDefault: (flow.isDefault)? "true":"", + isConditional: (flow.isConditional)? "true":"", + isHighLighted: (flow.isHighLighted)? "true":"", + sourceActivityId: flow.sourceActivityId, + destinationActivityId: flow.destinationActivityId + }; + var TPL_FLOW_INFO = '<div>{flow}</div>' + + '<div><b>sourceActivityId</b>: {sourceActivityId}</div>' + + '<div><b>destinationActivityId</b>: {destinationActivityId}</div>' + + '<div><b>isDefault</b>: {isDefault}</div>' + + '<div><b>isConditional</b>: {isConditional}</div>' + + '<div><b>isHighLighted</b>: {isHighLighted}</div>'; + var tpl = Lang.sub(TPL_FLOW_INFO, values); + //console.log("info: ", tpl); + diagramInfo.html(tpl); + }, + + showActivityInfo: function(activity){ + var diagramInfo = $("#" + this.options.diagramInfoId); + if (!diagramInfo) return; + + var values = { + activityId: activity.getId(), + name: activity.getProperty("name"), + type: activity.getProperty("type") + }; + var TPL_ACTIVITY_INFO = '' + + '<div><b>activityId</b>: {activityId}</div>' + + '<div><b>name</b>: {name}</div>' + + '<div><b>type</b>: {type}</div>'; + var TPL_CALLACTIVITY_INFO = '' + + '<div><b>collapsed</b>: {collapsed}</div>' + + '<div><b>processDefinitonKey</b>: {processDefinitonKey}</div>'; + + var template = TPL_ACTIVITY_INFO; + if (activity.getProperty("type") == "callActivity") { + values.collapsed = activity.getProperty("collapsed"); + values.processDefinitonKey = activity.getProperty("processDefinitonKey"); + template += TPL_CALLACTIVITY_INFO; + } else if (activity.getProperty("type") == "callActivity") { + var abcdef = '1' + } + + var tpl = Lang.sub(template, values); + //console.log("info: ", tpl); + diagramInfo.html(tpl); + }, + + hideInfo: function(){ + var diagramInfo = $("#" + this.options.diagramInfoId); + if (!diagramInfo) return; + diagramInfo.html(""); + }, + + vvoid: function(){} +}; + +var Lang = { + SUBREGEX: /\{\s*([^\|\}]+?)\s*(?:\|([^\}]*))?\s*\}/g, + UNDEFINED: 'undefined', + isUndefined: function(o) { + return typeof o === Lang.UNDEFINED; + }, + sub: function(s, o) { + return ((s.replace) ? s.replace(Lang.SUBREGEX, function(match, key) { + return (!Lang.isUndefined(o[key])) ? o[key] : match; + }) : s); + } +}; + +if (Lang.isUndefined(console)) { + console = { log: function() {}, warn: function() {}, error: function() {}}; +} +ProcessDiagramGenerator.init(); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.asyncqueue.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.asyncqueue.js new file mode 100644 index 0000000..0f1783d --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.asyncqueue.js @@ -0,0 +1,125 @@ +/* +* This file is part of the jquery plugin "asyncQueue". +*FHqq-3-1-3-5-9-6-7-9-0 +* (c) Sebastien Roch <roch.sebastien@gmail.com> +* @author (parallel) Dmitry Farafonov +* +* For the full copyright and license information, please view the LICENSE +* file that was distributed with this source code. +*/ +(function($){ + $.AsyncQueue = function() { + var that = this, + queue = [], + completeFunc, + failureFunc, + paused = false, + lastCallbackData, + _run, + _complete, + inQueue = 0, + defaultTimeOut = 10; + + _run = function() { + var f = queue.shift(); + + if (f) { + inQueue++; + setTimeout(function(){ + f.fn.apply(that, [that]); + + if (!f.isParallel) + if (paused === false) { + _run(); + } + inQueue --; + if (inQueue == 0 && queue.length == 0) + _complete(); + }, f.timeOut); + + if (f.isParallel) + if (paused === false) { + _run(); + } + } + }; + + _complete = function(){ + if (completeFunc) + completeFunc.apply(that, [that]); + }; + + this.onComplete = function(func) { + completeFunc = func; + }; + + this.onFailure = function(func) { + failureFunc = func; + }; + + this.add = function(func) { + // TODO: add callback for queue[i] complete + + var obj = arguments[0]; + if (obj && Object.prototype.toString.call(obj) === "[object Array]") { + var fn = arguments[1]; + var timeOut = (typeof(arguments[2]) != "undefined")? arguments[2] : defaultTimeOut; + if (typeof(fn) == "function") { + for(var i = 0; i < obj.length; i++) { + var f = function(objx){ + queue.push({isParallel: true, fn: function(){fn.apply(that, [that, objx]);}, timeOut: timeOut}); + }(obj[i]) + } + } + } else { + var fn = arguments[0]; + var timeOut = (typeof(arguments[1]) != "undefined")? arguments[2] : defaultTimeOut; + queue.push({isParallel: false, fn: func, timeOut: timeOut}); + } + return this; + }; + + this.addParallel = function(func, timeOut) { + // TODO: add callback for queue[i] complete + + queue.push({isParallel: true, fn: func, timeOut: timeOut}); + return this; + }; + + this.storeData = function(dataObject) { + lastCallbackData = dataObject; + return this; + }; + + this.lastCallbackData = function () { + return lastCallbackData; + }; + + this.run = function() { + paused = false; + _run(); + }; + + this.pause = function () { + paused = true; + return this; + }; + + this.failure = function() { + paused = true; + if (failureFunc) { + var args = [that]; + for(i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + failureFunc.apply(that, args); + } + }; + + this.size = function(){ + return queue.length; + }; + + return this; + } +})(jQuery); diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.js new file mode 100644 index 0000000..8ccd0ea --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.js @@ -0,0 +1,9266 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context ? context.ownerDocument || context : document ); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.7.1", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.add( fn ); + + return this; + }, + + eq: function( i ) { + i = +i; + return i === -1 ? + this.slice( i ) : + this.slice( i, i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.fireWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).off( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery.Callbacks( "once memory" ); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array, i ) { + var len; + + if ( array ) { + if ( indexOf ) { + return indexOf.call( array, elem, i ); + } + + len = array.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in array && array[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + if ( typeof context === "string" ) { + var tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +return jQuery; + +})(); + + +// String to Object flags format cache +var flagsCache = {}; + +// Convert String-formatted flags into Object-formatted ones and store in cache +function createFlags( flags ) { + var object = flagsCache[ flags ] = {}, + i, length; + flags = flags.split( /\s+/ ); + for ( i = 0, length = flags.length; i < length; i++ ) { + object[ flags[i] ] = true; + } + return object; +} + +/* + * Create a callback list using the following parameters: + * + * flags: an optional list of space-separated flags that will change how + * the callback list behaves + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible flags: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( flags ) { + + // Convert flags from String-formatted to Object-formatted + // (we check in cache first) + flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; + + var // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = [], + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Add one or several callbacks to the list + add = function( args ) { + var i, + length, + elem, + type, + actual; + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + // Inspect recursively + add( elem ); + } else if ( type === "function" ) { + // Add if not in unique mode and callback is not in + if ( !flags.unique || !self.has( elem ) ) { + list.push( elem ); + } + } + } + }, + // Fire callbacks + fire = function( context, args ) { + args = args || []; + memory = !flags.memory || [ context, args ]; + firing = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { + memory = true; // Mark as halted + break; + } + } + firing = false; + if ( list ) { + if ( !flags.once ) { + if ( stack && stack.length ) { + memory = stack.shift(); + self.fireWith( memory[ 0 ], memory[ 1 ] ); + } + } else if ( memory === true ) { + self.disable(); + } else { + list = []; + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + var length = list.length; + add( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away, unless previous + // firing was halted (stopOnFalse) + } else if ( memory && memory !== true ) { + firingStart = length; + fire( memory[ 0 ], memory[ 1 ] ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + var args = arguments, + argIndex = 0, + argLength = args.length; + for ( ; argIndex < argLength ; argIndex++ ) { + for ( var i = 0; i < list.length; i++ ) { + if ( args[ argIndex ] === list[ i ] ) { + // Handle firingIndex and firingLength + if ( firing ) { + if ( i <= firingLength ) { + firingLength--; + if ( i <= firingIndex ) { + firingIndex--; + } + } + } + // Remove the element + list.splice( i--, 1 ); + // If we have some unicity property then + // we only need to do this once + if ( flags.unique ) { + break; + } + } + } + } + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + if ( list ) { + var i = 0, + length = list.length; + for ( ; i < length; i++ ) { + if ( fn === list[ i ] ) { + return true; + } + } + } + return false; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory || memory === true ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( stack ) { + if ( firing ) { + if ( !flags.once ) { + stack.push( [ context, args ] ); + } + } else if ( !( flags.once && memory ) ) { + fire( context, args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!memory; + } + }; + + return self; +}; + + + + +var // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + + Deferred: function( func ) { + var doneList = jQuery.Callbacks( "once memory" ), + failList = jQuery.Callbacks( "once memory" ), + progressList = jQuery.Callbacks( "memory" ), + state = "pending", + lists = { + resolve: doneList, + reject: failList, + notify: progressList + }, + promise = { + done: doneList.add, + fail: failList.add, + progress: progressList.add, + + state: function() { + return state; + }, + + // Deprecated + isResolved: doneList.fired, + isRejected: failList.fired, + + then: function( doneCallbacks, failCallbacks, progressCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); + return this; + }, + always: function() { + deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); + return this; + }, + pipe: function( fnDone, fnFail, fnProgress ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ], + progress: [ fnProgress, "notify" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + obj = promise; + } else { + for ( var key in promise ) { + obj[ key ] = promise[ key ]; + } + } + return obj; + } + }, + deferred = promise.promise({}), + key; + + for ( key in lists ) { + deferred[ key ] = lists[ key ].fire; + deferred[ key + "With" ] = lists[ key ].fireWith; + } + + // Handle state + deferred.done( function() { + state = "resolved"; + }, failList.disable, progressList.lock ).fail( function() { + state = "rejected"; + }, doneList.disable, progressList.lock ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = sliceDeferred.call( arguments, 0 ), + i = 0, + length = args.length, + pValues = new Array( length ), + count = length, + pCount = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(), + promise = deferred.promise(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( deferred, args ); + } + }; + } + function progressFunc( i ) { + return function( value ) { + pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + deferred.notifyWith( promise, pValues ); + }; + } + if ( length > 1 ) { + for ( ; i < length; i++ ) { + if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return promise; + } +}); + + + + +jQuery.support = (function() { + + var support, + all, + a, + select, + opt, + input, + marginDiv, + fragment, + tds, + events, + eventName, + i, + isSupported, + div = document.createElement( "div" ), + documentElement = document.documentElement; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute("href") === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + fragment.removeChild( input ); + fragment.appendChild( div ); + + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( window.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.style.width = "2px"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for( i in { + submit: 1, + change: 1, + focusin: 1 + }) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + fragment.removeChild( div ); + + // Null elements to avoid leaks in IE + fragment = select = opt = marginDiv = div = input = null; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + conMarginTop, ptlm, vb, style, html, + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + conMarginTop = 1; + ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; + vb = "visibility:hidden;border:0;"; + style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; + html = "<div " + style + "><div></div></div>" + + "<table " + style + " cellpadding='0' cellspacing='0'>" + + "<tr><td></td></tr></table>"; + + container = document.createElement("div"); + container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct the test element + div = document.createElement("div"); + container.appendChild( div ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"; + tds = div.getElementsByTagName( "td" ); + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE <= 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Figure out if the W3C box model works as expected + div.innerHTML = ""; + div.style.width = div.style.paddingLeft = "1px"; + jQuery.boxModel = support.boxModel = div.offsetWidth === 2; + + if ( typeof div.style.zoom !== "undefined" ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "<div style='width:4px;'></div>"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.style.cssText = ptlm + vb; + div.innerHTML = html; + + outer = div.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + body.removeChild( container ); + div = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + return support; +})(); + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, + isEvents = name === "events"; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = ++jQuery.uuid; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + privateCache = thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ internalKey ] : internalKey; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ internalKey ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( internalKey ); + } else { + elem[ internalKey ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, attr, name, + data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { + attr = this[0].attributes; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( this[0], name, data[ name ] ); + } + } + jQuery._data( this[0], "parsedAttrs", true ); + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var self = jQuery( this ), + args = [ parts[0], value ]; + + self.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + self.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + jQuery.isNumeric( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.prop ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, + i = 0; + + if ( value && elem.nodeType === 1 ) { + attrNames = value.toLowerCase().split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ]; + + if ( name ) { + propName = jQuery.propFix[ name ] || name; + + // See #9699 for explanation of this approach (setting first, then removal) + jQuery.attr( elem, name, "" ); + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && propName in elem ) { + elem[ propName ] = false; + } + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rformElems = /^(?:textarea|input|select)$/i, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /\bhover(\.\S+)?\b/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + var attrs = elem.attributes || {}; + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || (attrs.id || {}).value === m[2]) && + (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = jQuery.trim( hoverHack(types) ).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + quick: quickParse( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, origType, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = jQuery.trim( hoverHack( types || "" ) ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = origType = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Remove matching events + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !namespaces || namespaces.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; + old = null; + for ( ; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + // Note that this is a bare JS function and not a jQuery handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + handlerQueue = [], + i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Determine handlers that should run if there are delegated events + // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { + + // Pregenerate a single jQuery object for reuse with .is() + jqcur = jQuery(this); + jqcur.context = this.ownerDocument || this; + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + selMatch = {}; + matches = []; + jqcur[0] = cur; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + + if ( selMatch[ sel ] === undefined ) { + selMatch[ sel ] = ( + handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) + ); + } + if ( selMatch[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + ret; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = true; + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on.call( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 || nodeType === 9 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = "<a name='" + id + "'/>"; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = "<a href='#'></a>"; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "<p class='TEST'></p>"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "<div class='test e'></div><div class='test'></div>"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, slice.call( arguments ).join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /<tbody/i, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style)/i, + rnocache = /<(?:script|object|embed|option|style)/i, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"), + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /\/(java|ecma)script/i, + rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/, + wrapMap = { + option: [ 1, "<select multiple='multiple'>", "</select>" ], + legend: [ 1, "<fieldset>", "</fieldset>" ], + thead: [ 1, "<table>", "</table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], + area: [ 1, "<map>", "</map>" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize <link> and <script> tags normally +if ( !jQuery.support.htmlSerialize ) { + wrapMap._default = [ 1, "div<div>", "</div>" ]; +} + +jQuery.fn.extend({ + text: function( text ) { + if ( jQuery.isFunction(text) ) { + return this.each(function(i) { + var self = jQuery( this ); + + self.text( text.call(this, i, self.text()) ); + }); + } + + if ( typeof text !== "object" && text !== undefined ) { + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + } + + return jQuery.text( this ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + if ( this[0] && this[0].parentNode ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this ); + }); + } else if ( arguments.length ) { + var set = jQuery.clean( arguments ); + set.push.apply( set, this.toArray() ); + return this.pushStack( set, "before", arguments ); + } + }, + + after: function() { + if ( this[0] && this[0].parentNode ) { + return this.domManip(arguments, false, function( elem ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + } else if ( arguments.length ) { + var set = this.pushStack( this, "after", arguments ); + set.push.apply( set, jQuery.clean(arguments) ); + return set; + } + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + jQuery.cleanData( [ elem ] ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( elem.getElementsByTagName("*") ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + if ( value === undefined ) { + return this[0] && this[0].nodeType === 1 ? + this[0].innerHTML.replace(rinlinejQuery, "") : + null; + + // See if we can take a shortcut and just use innerHTML + } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && + !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { + + value = value.replace(rxhtmlTag, "<$1></$2>"); + + try { + for ( var i = 0, l = this.length; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + if ( this[i].nodeType === 1 ) { + jQuery.cleanData( this[i].getElementsByTagName("*") ); + this[i].innerHTML = value; + } + } + + // If using innerHTML throws an exception, use the fallback method + } catch(e) { + this.empty().append( value ); + } + + } else if ( jQuery.isFunction( value ) ) { + this.each(function(i){ + var self = jQuery( this ); + + self.html( value.call(this, i, self.html()) ); + }); + + } else { + this.empty().append( value ); + } + + return this; + }, + + replaceWith: function( value ) { + if ( this[0] && this[0].parentNode ) { + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( jQuery.isFunction( value ) ) { + return this.each(function(i) { + var self = jQuery(this), old = self.html(); + self.replaceWith( value.call( this, i, old ) ); + }); + } + + if ( typeof value !== "string" ) { + value = jQuery( value ).detach(); + } + + return this.each(function() { + var next = this.nextSibling, + parent = this.parentNode; + + jQuery( this ).remove(); + + if ( next ) { + jQuery(next).before( value ); + } else { + jQuery(parent).append( value ); + } + }); + } else { + return this.length ? + this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : + this; + } + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + var results, first, fragment, parent, + value = args[0], + scripts = []; + + // We can't cloneNode fragments that contain checked, in WebKit + if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { + return this.each(function() { + jQuery(this).domManip( args, table, callback, true ); + }); + } + + if ( jQuery.isFunction(value) ) { + return this.each(function(i) { + var self = jQuery(this); + args[0] = value.call(this, i, table ? self.html() : undefined); + self.domManip( args, table, callback ); + }); + } + + if ( this[0] ) { + parent = value && value.parentNode; + + // If we're in a fragment, just use that instead of building a new one + if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { + results = { fragment: parent }; + + } else { + results = jQuery.buildFragment( args, this, scripts ); + } + + fragment = results.fragment; + + if ( fragment.childNodes.length === 1 ) { + first = fragment = fragment.firstChild; + } else { + first = fragment.firstChild; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + + for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) { + callback.call( + table ? + root(this[i], first) : + this[i], + // Make sure that we do not leak memory by inadvertently discarding + // the original fragment (which might have attached data) instead of + // using it; in addition, use the original fragment object for the last + // item instead of first because it can end up being emptied incorrectly + // in certain situations (Bug #8070). + // Fragments from the fragment cache must always be cloned and never used + // in place. + results.cacheable || ( l > 1 && i < lastIndex ) ? + jQuery.clone( fragment, true, true ) : + fragment + ); + } + } + + if ( scripts.length ) { + jQuery.each( scripts, evalScript ); + } + } + + return this; + } +}); + +function root( elem, cur ) { + return jQuery.nodeName(elem, "table") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function cloneFixAttributes( src, dest ) { + var nodeName; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + // clearAttributes removes the attributes, which we don't want, + // but also removes the attachEvent events, which we *do* want + if ( dest.clearAttributes ) { + dest.clearAttributes(); + } + + // mergeAttributes, in contrast, only merges back on the + // original attributes, not the events + if ( dest.mergeAttributes ) { + dest.mergeAttributes( src ); + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 fail to clone children inside object elements that use + // the proprietary classid attribute value (rather than the type + // attribute) to identify the type of content to display + if ( nodeName === "object" ) { + dest.outerHTML = src.outerHTML; + + } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + if ( src.checked ) { + dest.defaultChecked = dest.checked = src.checked; + } + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } + + // Event data gets referenced instead of copied if the expando + // gets copied too + dest.removeAttribute( jQuery.expando ); +} + +jQuery.buildFragment = function( args, nodes, scripts ) { + var fragment, cacheable, cacheresults, doc, + first = args[ 0 ]; + + // nodes may contain either an explicit document object, + // a jQuery collection or context object. + // If nodes[0] contains a valid object to assign to doc + if ( nodes && nodes[0] ) { + doc = nodes[0].ownerDocument || nodes[0]; + } + + // Ensure that an attr object doesn't incorrectly stand in as a document object + // Chrome and Firefox seem to allow this to occur and will throw exception + // Fixes #8950 + if ( !doc.createDocumentFragment ) { + doc = document; + } + + // Only cache "small" (1/2 KB) HTML strings that are associated with the main document + // Cloning options loses the selected state, so don't cache them + // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment + // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache + // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 + if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document && + first.charAt(0) === "<" && !rnocache.test( first ) && + (jQuery.support.checkClone || !rchecked.test( first )) && + (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { + + cacheable = true; + + cacheresults = jQuery.fragments[ first ]; + if ( cacheresults && cacheresults !== 1 ) { + fragment = cacheresults; + } + } + + if ( !fragment ) { + fragment = doc.createDocumentFragment(); + jQuery.clean( args, doc, fragment, scripts ); + } + + if ( cacheable ) { + jQuery.fragments[ first ] = cacheresults ? fragment : 1; + } + + return { fragment: fragment, cacheable: cacheable }; +}; + +jQuery.fragments = {}; + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var ret = [], + insert = jQuery( selector ), + parent = this.length === 1 && this[0].parentNode; + + if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { + insert[ original ]( this[0] ); + return this; + + } else { + for ( var i = 0, l = insert.length; i < l; i++ ) { + var elems = ( i > 0 ? this.clone(true) : this ).get(); + jQuery( insert[i] )[ original ]( elems ); + ret = ret.concat( elems ); + } + + return this.pushStack( ret, name, insert.selector ); + } + }; +}); + +function getAll( elem ) { + if ( typeof elem.getElementsByTagName !== "undefined" ) { + return elem.getElementsByTagName( "*" ); + + } else if ( typeof elem.querySelectorAll !== "undefined" ) { + return elem.querySelectorAll( "*" ); + + } else { + return []; + } +} + +// Used in clean, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( elem.type === "checkbox" || elem.type === "radio" ) { + elem.defaultChecked = elem.checked; + } +} +// Finds all inputs and passes them to fixDefaultChecked +function findInputs( elem ) { + var nodeName = ( elem.nodeName || "" ).toLowerCase(); + if ( nodeName === "input" ) { + fixDefaultChecked( elem ); + // Skip scripts, get other children + } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) { + jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); + } +} + +// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js +function shimCloneNode( elem ) { + var div = document.createElement( "div" ); + safeFragment.appendChild( div ); + + div.innerHTML = elem.outerHTML; + return div.firstChild; +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var srcElements, + destElements, + i, + // IE<=8 does not properly clone detached, unknown element nodes + clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ? + elem.cloneNode( true ) : + shimCloneNode( elem ); + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + // IE copies events bound via attachEvent when using cloneNode. + // Calling detachEvent on the clone will also remove the events + // from the original. In order to get around this, we use some + // proprietary methods to clear the events. Thanks to MooTools + // guys for this hotness. + + cloneFixAttributes( elem, clone ); + + // Using Sizzle here is crazy slow, so we use getElementsByTagName instead + srcElements = getAll( elem ); + destElements = getAll( clone ); + + // Weird iteration because IE will replace the length property + // with an element if you are cloning the body and one of the + // elements on the page has a name or id of "length" + for ( i = 0; srcElements[i]; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + cloneFixAttributes( srcElements[i], destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + cloneCopyEvent( elem, clone ); + + if ( deepDataAndEvents ) { + srcElements = getAll( elem ); + destElements = getAll( clone ); + + for ( i = 0; srcElements[i]; ++i ) { + cloneCopyEvent( srcElements[i], destElements[i] ); + } + } + } + + srcElements = destElements = null; + + // Return the cloned set + return clone; + }, + + clean: function( elems, context, fragment, scripts ) { + var checkScriptType; + + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) { + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + } + + var ret = [], j; + + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + if ( typeof elem === "number" ) { + elem += ""; + } + + if ( !elem ) { + continue; + } + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + if ( !rhtml.test( elem ) ) { + elem = context.createTextNode( elem ); + } else { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(rxhtmlTag, "<$1></$2>"); + + // Trim whitespace, otherwise indexOf won't work as expected + var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(), + wrap = wrapMap[ tag ] || wrapMap._default, + depth = wrap[0], + div = context.createElement("div"); + + // Append wrapper element to unknown element safe doc fragment + if ( context === document ) { + // Use the fragment we've already created for this document + safeFragment.appendChild( div ); + } else { + // Use a fragment created with the owner document + createSafeFragment( context ).appendChild( div ); + } + + // Go to html and back, then peel off extra wrappers + div.innerHTML = wrap[1] + elem + wrap[2]; + + // Move to the right depth + while ( depth-- ) { + div = div.lastChild; + } + + // Remove IE's autoinserted <tbody> from table fragments + if ( !jQuery.support.tbody ) { + + // String was a <table>, *may* have spurious <tbody> + var hasBody = rtbody.test(elem), + tbody = tag === "table" && !hasBody ? + div.firstChild && div.firstChild.childNodes : + + // String was a bare <thead> or <tfoot> + wrap[1] === "<table>" && !hasBody ? + div.childNodes : + []; + + for ( j = tbody.length - 1; j >= 0 ; --j ) { + if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { + tbody[ j ].parentNode.removeChild( tbody[ j ] ); + } + } + } + + // IE completely kills leading whitespace when innerHTML is used + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); + } + + elem = div.childNodes; + } + } + + // Resets defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + var len; + if ( !jQuery.support.appendChecked ) { + if ( elem[0] && typeof (len = elem.length) === "number" ) { + for ( j = 0; j < len; j++ ) { + findInputs( elem[j] ); + } + } else { + findInputs( elem ); + } + } + + if ( elem.nodeType ) { + ret.push( elem ); + } else { + ret = jQuery.merge( ret, elem ); + } + } + + if ( fragment ) { + checkScriptType = function( elem ) { + return !elem.type || rscriptType.test( elem.type ); + }; + for ( i = 0; ret[i]; i++ ) { + if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { + scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); + + } else { + if ( ret[i].nodeType === 1 ) { + var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType ); + + ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); + } + fragment.appendChild( ret[i] ); + } + } + } + + return ret; + }, + + cleanData: function( elems ) { + var data, id, + cache = jQuery.cache, + special = jQuery.event.special, + deleteExpando = jQuery.support.deleteExpando; + + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { + continue; + } + + id = elem[ jQuery.expando ]; + + if ( id ) { + data = cache[ id ]; + + if ( data && data.events ) { + for ( var type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + + // Null the DOM reference to avoid IE6/7/8 leak (#7054) + if ( data.handle ) { + data.handle.elem = null; + } + } + + if ( deleteExpando ) { + delete elem[ jQuery.expando ]; + + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } + + delete cache[ id ]; + } + } + } +}); + +function evalScript( i, elem ) { + if ( elem.src ) { + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + } else { + jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) ); + } + + if ( elem.parentNode ) { + elem.parentNode.removeChild( elem ); + } +} + + + + +var ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity=([^)]*)/, + // fixed for IE9, see #8346 + rupper = /([A-Z]|^ms)/g, + rnumpx = /^-?\d+(?:px)?$/i, + rnum = /^-?\d/, + rrelNum = /^([\-+])=([\-+.\de]+)/, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssWidth = [ "Left", "Right" ], + cssHeight = [ "Top", "Bottom" ], + curCSS, + + getComputedStyle, + currentStyle; + +jQuery.fn.css = function( name, value ) { + // Setting 'undefined' is a no-op + if ( arguments.length === 2 && value === undefined ) { + return this; + } + + return jQuery.access( this, name, value, true, function( elem, name, value ) { + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }); +}; + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity", "opacity" ); + return ret === "" ? "1" : ret; + + } else { + return elem.style.opacity; + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, origName = jQuery.camelCase( name ), + style = elem.style, hooks = jQuery.cssHooks[ origName ]; + + name = jQuery.cssProps[ origName ] || origName; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) { + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra ) { + var ret, hooks; + + // Make sure that we're working with the right name + name = jQuery.camelCase( name ); + hooks = jQuery.cssHooks[ name ]; + name = jQuery.cssProps[ name ] || name; + + // cssFloat needs a special treatment + if ( name === "cssFloat" ) { + name = "float"; + } + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) { + return ret; + + // Otherwise, if a way to get the computed value exists, use that + } else if ( curCSS ) { + return curCSS( elem, name ); + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + } +}); + +// DEPRECATED, Use jQuery.css() instead +jQuery.curCSS = jQuery.css; + +jQuery.each(["height", "width"], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + var val; + + if ( computed ) { + if ( elem.offsetWidth !== 0 ) { + return getWH( elem, name, extra ); + } else { + jQuery.swap( elem, cssShow, function() { + val = getWH( elem, name, extra ); + }); + } + + return val; + } + }, + + set: function( elem, value ) { + if ( rnumpx.test( value ) ) { + // ignore negative width and height values #1599 + value = parseFloat( value ); + + if ( value >= 0 ) { + return value + "px"; + } + + } else { + return value; + } + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( parseFloat( RegExp.$1 ) / 100 ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there there is no filter style applied in a css rule, we are done + if ( currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +jQuery(function() { + // This hook cannot be added until DOM ready because the support test + // for it is not run until after DOM ready + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + var ret; + jQuery.swap( elem, { "display": "inline-block" }, function() { + if ( computed ) { + ret = curCSS( elem, "margin-right", "marginRight" ); + } else { + ret = elem.style.marginRight; + } + }); + return ret; + } + }; + } +}); + +if ( document.defaultView && document.defaultView.getComputedStyle ) { + getComputedStyle = function( elem, name ) { + var ret, defaultView, computedStyle; + + name = name.replace( rupper, "-$1" ).toLowerCase(); + + if ( (defaultView = elem.ownerDocument.defaultView) && + (computedStyle = defaultView.getComputedStyle( elem, null )) ) { + ret = computedStyle.getPropertyValue( name ); + if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { + ret = jQuery.style( elem, name ); + } + } + + return ret; + }; +} + +if ( document.documentElement.currentStyle ) { + currentStyle = function( elem, name ) { + var left, rsLeft, uncomputed, + ret = elem.currentStyle && elem.currentStyle[ name ], + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret === null && style && (uncomputed = style[ name ]) ) { + ret = uncomputed; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { + + // Remember the original values + left = style.left; + rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + elem.runtimeStyle.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ( ret || 0 ); + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + elem.runtimeStyle.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +curCSS = getComputedStyle || currentStyle; + +function getWH( elem, name, extra ) { + + // Start with offset property + var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + which = name === "width" ? cssWidth : cssHeight, + i = 0, + len = which.length; + + if ( val > 0 ) { + if ( extra !== "border" ) { + for ( ; i < len; i++ ) { + if ( !extra ) { + val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; + } + if ( extra === "margin" ) { + val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; + } else { + val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; + } + } + } + + return val + "px"; + } + + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, name ); + if ( val < 0 || val == null ) { + val = elem.style[ name ] || 0; + } + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + + // Add padding, border, margin + if ( extra ) { + for ( ; i < len; i++ ) { + val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; + if ( extra !== "padding" ) { + val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; + } + if ( extra === "margin" ) { + val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; + } + } + } + + return val + "px"; +} + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + var width = elem.offsetWidth, + height = elem.offsetHeight; + + return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + + + + +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rhash = /#.*$/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rquery = /\?/, + rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, + rselectTextarea = /^(?:select|textarea)/i, + rspacesAjax = /\s+/, + rts = /([?&])_=[^&]*/, + rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Document location + ajaxLocation, + + // Document location segments + ajaxLocParts, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = ["*/"] + ["*"]; + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + if ( jQuery.isFunction( func ) ) { + var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), + i = 0, + length = dataTypes.length, + dataType, + list, + placeBefore; + + // For each dataType in the dataTypeExpression + for ( ; i < length; i++ ) { + dataType = dataTypes[ i ]; + // We control if we're asked to add before + // any existing element + placeBefore = /^\+/.test( dataType ); + if ( placeBefore ) { + dataType = dataType.substr( 1 ) || "*"; + } + list = structure[ dataType ] = structure[ dataType ] || []; + // then we add to the structure accordingly + list[ placeBefore ? "unshift" : "push" ]( func ); + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, + dataType /* internal */, inspected /* internal */ ) { + + dataType = dataType || options.dataTypes[ 0 ]; + inspected = inspected || {}; + + inspected[ dataType ] = true; + + var list = structure[ dataType ], + i = 0, + length = list ? list.length : 0, + executeOnly = ( structure === prefilters ), + selection; + + for ( ; i < length && ( executeOnly || !selection ); i++ ) { + selection = list[ i ]( options, originalOptions, jqXHR ); + // If we got redirected to another dataType + // we try there if executing only and not done already + if ( typeof selection === "string" ) { + if ( !executeOnly || inspected[ selection ] ) { + selection = undefined; + } else { + options.dataTypes.unshift( selection ); + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, selection, inspected ); + } + } + } + // If we're only executing or nothing was selected + // we try the catchall dataType if not done already + if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { + selection = inspectPrefiltersOrTransports( + structure, options, originalOptions, jqXHR, "*", inspected ); + } + // unnecessary when only executing (prefilters) + // but it'll be ignored by the caller in that case + return selection; +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } +} + +jQuery.fn.extend({ + load: function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + + // Don't do a request if no elements are being requested + } else if ( !this.length ) { + return this; + } + + var off = url.indexOf( " " ); + if ( off >= 0 ) { + var selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // Default to a GET request + var type = "GET"; + + // If the second parameter was provided + if ( params ) { + // If it's a function + if ( jQuery.isFunction( params ) ) { + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( typeof params === "object" ) { + params = jQuery.param( params, jQuery.ajaxSettings.traditional ); + type = "POST"; + } + } + + var self = this; + + // Request the remote document + jQuery.ajax({ + url: url, + type: type, + dataType: "html", + data: params, + // Complete callback (responseText is used internally) + complete: function( jqXHR, status, responseText ) { + // Store the response as specified by the jqXHR object + responseText = jqXHR.responseText; + // If successful, inject the HTML into all the matched elements + if ( jqXHR.isResolved() ) { + // #4825: Get the actual response in case + // a dataFilter is present in ajaxSettings + jqXHR.done(function( r ) { + responseText = r; + }); + // See if a selector was specified + self.html( selector ? + // Create a dummy div to hold the results + jQuery("<div>") + // inject the contents of the document in, removing the scripts + // to avoid any 'Permission Denied' errors in IE + .append(responseText.replace(rscript, "")) + + // Locate the specified elements + .find(selector) : + + // If not, just inject the full result + responseText ); + } + + if ( callback ) { + self.each( callback, [ responseText, status, jqXHR ] ); + } + } + }); + + return this; + }, + + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + + serializeArray: function() { + return this.map(function(){ + return this.elements ? jQuery.makeArray( this.elements ) : this; + }) + .filter(function(){ + return this.name && !this.disabled && + ( this.checked || rselectTextarea.test( this.nodeName ) || + rinput.test( this.type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val, i ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ + jQuery.fn[ o ] = function( f ){ + return this.on( o, f ); + }; +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + type: method, + url: url, + data: data, + success: callback, + dataType: type + }); + }; +}); + +jQuery.extend({ + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + if ( settings ) { + // Building a settings object + ajaxExtend( target, jQuery.ajaxSettings ); + } else { + // Extending ajaxSettings + settings = target; + target = jQuery.ajaxSettings; + } + ajaxExtend( target, settings ); + return target; + }, + + ajaxSettings: { + url: ajaxLocation, + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + type: "GET", + contentType: "application/x-www-form-urlencoded", + processData: true, + async: true, + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + traditional: false, + headers: {}, + */ + + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": allTypes + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText" + }, + + // List of data converters + // 1) key format is "source_type destination_type" (a single space in-between) + // 2) the catchall symbol "*" can be used for source_type + converters: { + + // Convert anything to text + "* text": window.String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + context: true, + url: true + } + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events + // It's the callbackContext if one was provided in the options + // and if it's a DOM node or a jQuery collection + globalEventContext = callbackContext !== s && + ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? + jQuery( callbackContext ) : jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // ifModified key + ifModifiedKey, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // Response headers + responseHeadersString, + responseHeaders, + // transport + transport, + // timeout handle + timeoutTimer, + // Cross-domain detection vars + parts, + // The jqXHR state + state = 0, + // To know if global events are to be dispatched + fireGlobals, + // Loop variable + i, + // Fake xhr + jqXHR = { + + readyState: 0, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( !state ) { + var lname = name.toLowerCase(); + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match === undefined ? null : match; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + statusText = statusText || "abort"; + if ( transport ) { + transport.abort( statusText ); + } + done( 0, statusText ); + return this; + } + }; + + // Callback for when everything is done + // It is defined here because jslint complains if it is declared + // at the end of the function (which would be more logical and readable) + function done( status, nativeStatusText, responses, headers ) { + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + var isSuccess, + success, + error, + statusText = nativeStatusText, + response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined, + lastModified, + etag; + + // If successful, handle type chaining + if ( status >= 200 && status < 300 || status === 304 ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + + if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) { + jQuery.lastModified[ ifModifiedKey ] = lastModified; + } + if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) { + jQuery.etag[ ifModifiedKey ] = etag; + } + } + + // If not modified + if ( status === 304 ) { + + statusText = "notmodified"; + isSuccess = true; + + // If we have data + } else { + + try { + success = ajaxConvert( s, response ); + statusText = "success"; + isSuccess = true; + } catch(e) { + // We have a parsererror + statusText = "parsererror"; + error = e; + } + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( !statusText || status ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = "" + ( nativeStatusText || statusText ); + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + // Attach deferreds + deferred.promise( jqXHR ); + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + jqXHR.complete = completeDeferred.add; + + // Status-dependent callbacks + jqXHR.statusCode = function( map ) { + if ( map ) { + var tmp; + if ( state < 2 ) { + for ( tmp in map ) { + statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; + } + } else { + tmp = map[ jqXHR.status ]; + jqXHR.then( tmp, tmp ); + } + } + return this; + }; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // We also use the url parameter if available + s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); + + // Determine if a cross-domain request is in order + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefiler, stop there + if ( state === 2 ) { + return false; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Get ifModifiedKey before adding the anti-cache parameter + ifModifiedKey = s.url; + + // Add anti-cache in url if needed + if ( s.cache === false ) { + + var ts = jQuery.now(), + // try replacing _= if it is there + ret = s.url.replace( rts, "$1_=" + ts ); + + // if nothing was replaced, add timestamp to the end + s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + ifModifiedKey = ifModifiedKey || s.url; + if ( jQuery.lastModified[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); + } + if ( jQuery.etag[ ifModifiedKey ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); + } + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already + jqXHR.abort(); + return false; + + } + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout( function(){ + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch (e) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + return jqXHR; + }, + + // Serialize an array of form elements or a set of + // key/values into a query string + param: function( a, traditional ) { + var s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : value; + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( var prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); + } +}); + +function buildParams( prefix, obj, traditional, add ) { + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // If array item is non-scalar (array or object), encode its + // numeric index to resolve deserialization ambiguity issues. + // Note that rack (as of 1.0.0) can't currently deserialize + // nested arrays properly, and attempting to do so may cause + // a server error. Possible fixes are to modify rack's + // deserialization algorithm or to provide an option or flag + // to force array serialization to be shallow. + buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && obj != null && typeof obj === "object" ) { + // Serialize object item. + for ( var name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} + +// This is still on the jQuery object... for now +// Want to move this to jQuery.ajax some day +jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {} + +}); + +/* Handles responses to an ajax request: + * - sets all responseXXX fields accordingly + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var contents = s.contents, + dataTypes = s.dataTypes, + responseFields = s.responseFields, + ct, + type, + finalDataType, + firstDataType; + + // Fill responseXXX fields + for ( type in responseFields ) { + if ( type in responses ) { + jqXHR[ responseFields[type] ] = responses[ type ]; + } + } + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +// Chain conversions given the request and the original response +function ajaxConvert( s, response ) { + + // Apply the dataFilter if provided + if ( s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + var dataTypes = s.dataTypes, + converters = {}, + i, + key, + length = dataTypes.length, + tmp, + // Current and previous dataTypes + current = dataTypes[ 0 ], + prev, + // Conversion expression + conversion, + // Conversion function + conv, + // Conversion functions (transitive conversion) + conv1, + conv2; + + // For each dataType in the chain + for ( i = 1; i < length; i++ ) { + + // Create converters map + // with lowercased keys + if ( i === 1 ) { + for ( key in s.converters ) { + if ( typeof key === "string" ) { + converters[ key.toLowerCase() ] = s.converters[ key ]; + } + } + } + + // Get the dataTypes + prev = current; + current = dataTypes[ i ]; + + // If current is auto dataType, update it to prev + if ( current === "*" ) { + current = prev; + // If no auto and dataTypes are actually different + } else if ( prev !== "*" && prev !== current ) { + + // Get the converter + conversion = prev + " " + current; + conv = converters[ conversion ] || converters[ "* " + current ]; + + // If there is no direct converter, search transitively + if ( !conv ) { + conv2 = undefined; + for ( conv1 in converters ) { + tmp = conv1.split( " " ); + if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { + conv2 = converters[ tmp[1] + " " + current ]; + if ( conv2 ) { + conv1 = converters[ conv1 ]; + if ( conv1 === true ) { + conv = conv2; + } else if ( conv2 === true ) { + conv = conv1; + } + break; + } + } + } + } + // If we found no converter, dispatch an error + if ( !( conv || conv2 ) ) { + jQuery.error( "No conversion from " + conversion.replace(" "," to ") ); + } + // If found converter is not an equivalence + if ( conv !== true ) { + // Convert with 1 or 2 converters accordingly + response = conv ? conv( response ) : conv2( conv1(response) ); + } + } + } + return response; +} + + + + +var jsc = jQuery.now(), + jsre = /(\=)\?(&|$)|\?\?/i; + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + return jQuery.expando + "_" + ( jsc++ ); + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var inspectData = s.contentType === "application/x-www-form-urlencoded" && + ( typeof s.data === "string" ); + + if ( s.dataTypes[ 0 ] === "jsonp" || + s.jsonp !== false && ( jsre.test( s.url ) || + inspectData && jsre.test( s.data ) ) ) { + + var responseContainer, + jsonpCallback = s.jsonpCallback = + jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback, + previous = window[ jsonpCallback ], + url = s.url, + data = s.data, + replace = "$1" + jsonpCallback + "$2"; + + if ( s.jsonp !== false ) { + url = url.replace( jsre, replace ); + if ( s.url === url ) { + if ( inspectData ) { + data = data.replace( jsre, replace ); + } + if ( s.data === data ) { + // Add callback manually + url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; + } + } + } + + s.url = url; + s.data = data; + + // Install callback + window[ jsonpCallback ] = function( response ) { + responseContainer = [ response ]; + }; + + // Clean-up function + jqXHR.always(function() { + // Set callback back to previous value + window[ jsonpCallback ] = previous; + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( previous ) ) { + window[ jsonpCallback ]( responseContainer[ 0 ] ); + } + }); + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( jsonpCallback + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Delegate to script + return "script"; + } +}); + + + + +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement( "script" ); + + script.async = "async"; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( head && script.parentNode ) { + head.removeChild( script ); + } + + // Dereference the script + script = undefined; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( 0, 1 ); + } + } + }; + } +}); + + + + +var // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject ? function() { + // Abort all pending requests + for ( var key in xhrCallbacks ) { + xhrCallbacks[ key ]( 0, 1 ); + } + } : false, + xhrId = 0, + xhrCallbacks; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject( "Microsoft.XMLHTTP" ); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +(function( xhr ) { + jQuery.extend( jQuery.support, { + ajax: !!xhr, + cors: !!xhr && ( "withCredentials" in xhr ) + }); +})( jQuery.ajaxSettings.xhr() ); + +// Create transport if the browser can provide an xhr +if ( jQuery.support.ajax ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var xhr = s.xhr(), + handle, + i; + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( _ ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + + var status, + statusText, + responseHeaders, + responses, + xml; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occured + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + responses = {}; + xml = xhr.responseXML; + + // Construct response list + if ( xml && xml.documentElement /* #4958 */ ) { + responses.xml = xml; + } + responses.text = xhr.responseText; + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + // if we're in sync mode or it's in cache + // and has been retrieved directly (IE6 & IE7) + // we need to manually fire the callback + if ( !s.async || xhr.readyState === 4 ) { + callback(); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback(0,1); + } + } + }; + } + }); +} + + + + +var elemdisplay = {}, + iframe, iframeDoc, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, + timerId, + fxAttrs = [ + // height animations + [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], + // width animations + [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], + // opacity animations + [ "opacity" ] + ], + fxNow; + +jQuery.fn.extend({ + show: function( speed, easing, callback ) { + var elem, display; + + if ( speed || speed === 0 ) { + return this.animate( genFx("show", 3), speed, easing, callback ); + + } else { + for ( var i = 0, j = this.length; i < j; i++ ) { + elem = this[ i ]; + + if ( elem.style ) { + display = elem.style.display; + + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { + display = elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( display === "" && jQuery.css(elem, "display") === "none" ) { + jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( i = 0; i < j; i++ ) { + elem = this[ i ]; + + if ( elem.style ) { + display = elem.style.display; + + if ( display === "" || display === "none" ) { + elem.style.display = jQuery._data( elem, "olddisplay" ) || ""; + } + } + } + + return this; + } + }, + + hide: function( speed, easing, callback ) { + if ( speed || speed === 0 ) { + return this.animate( genFx("hide", 3), speed, easing, callback); + + } else { + var elem, display, + i = 0, + j = this.length; + + for ( ; i < j; i++ ) { + elem = this[i]; + if ( elem.style ) { + display = jQuery.css( elem, "display" ); + + if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) { + jQuery._data( elem, "olddisplay", display ); + } + } + } + + // Set the display of the elements in a second loop + // to avoid the constant reflow + for ( i = 0; i < j; i++ ) { + if ( this[i].style ) { + this[i].style.display = "none"; + } + } + + return this; + } + }, + + // Save the old toggle function + _toggle: jQuery.fn.toggle, + + toggle: function( fn, fn2, callback ) { + var bool = typeof fn === "boolean"; + + if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { + this._toggle.apply( this, arguments ); + + } else if ( fn == null || bool ) { + this.each(function() { + var state = bool ? fn : jQuery(this).is(":hidden"); + jQuery(this)[ state ? "show" : "hide" ](); + }); + + } else { + this.animate(genFx("toggle", 3), fn, fn2, callback); + } + + return this; + }, + + fadeTo: function( speed, to, easing, callback ) { + return this.filter(":hidden").css("opacity", 0).show().end() + .animate({opacity: to}, speed, easing, callback); + }, + + animate: function( prop, speed, easing, callback ) { + var optall = jQuery.speed( speed, easing, callback ); + + if ( jQuery.isEmptyObject( prop ) ) { + return this.each( optall.complete, [ false ] ); + } + + // Do not change referenced properties as per-property easing will be lost + prop = jQuery.extend( {}, prop ); + + function doAnimation() { + // XXX 'this' does not always have a nodeName when running the + // test suite + + if ( optall.queue === false ) { + jQuery._mark( this ); + } + + var opt = jQuery.extend( {}, optall ), + isElement = this.nodeType === 1, + hidden = isElement && jQuery(this).is(":hidden"), + name, val, p, e, + parts, start, end, unit, + method; + + // will store per property easing and be used to determine when an animation is complete + opt.animatedProperties = {}; + + for ( p in prop ) { + + // property name normalization + name = jQuery.camelCase( p ); + if ( p !== name ) { + prop[ name ] = prop[ p ]; + delete prop[ p ]; + } + + val = prop[ name ]; + + // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default) + if ( jQuery.isArray( val ) ) { + opt.animatedProperties[ name ] = val[ 1 ]; + val = prop[ name ] = val[ 0 ]; + } else { + opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing'; + } + + if ( val === "hide" && hidden || val === "show" && !hidden ) { + return opt.complete.call( this ); + } + + if ( isElement && ( name === "height" || name === "width" ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( this, "display" ) === "inline" && + jQuery.css( this, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) { + this.style.display = "inline-block"; + + } else { + this.style.zoom = 1; + } + } + } + } + + if ( opt.overflow != null ) { + this.style.overflow = "hidden"; + } + + for ( p in prop ) { + e = new jQuery.fx( this, opt, p ); + val = prop[ p ]; + + if ( rfxtypes.test( val ) ) { + + // Tracks whether to show or hide based on private + // data attached to the element + method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 ); + if ( method ) { + jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" ); + e[ method ](); + } else { + e[ val ](); + } + + } else { + parts = rfxnum.exec( val ); + start = e.cur(); + + if ( parts ) { + end = parseFloat( parts[2] ); + unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" ); + + // We need to compute starting value + if ( unit !== "px" ) { + jQuery.style( this, p, (end || 1) + unit); + start = ( (end || 1) / e.cur() ) * start; + jQuery.style( this, p, start + unit); + } + + // If a +=/-= token was provided, we're doing a relative animation + if ( parts[1] ) { + end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; + } + + e.custom( start, end, unit ); + + } else { + e.custom( start, val, "" ); + } + } + } + + // For JS strict compliance + return true; + } + + return optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + + stop: function( type, clearQueue, gotoEnd ) { + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var index, + hadTimers = false, + timers = jQuery.timers, + data = jQuery._data( this ); + + // clear marker counters if we know they won't be + if ( !gotoEnd ) { + jQuery._unmark( true, this ); + } + + function stopQueue( elem, data, index ) { + var hooks = data[ index ]; + jQuery.removeData( elem, index, true ); + hooks.stop( gotoEnd ); + } + + if ( type == null ) { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) { + stopQueue( this, data, index ); + } + } + } else if ( data[ index = type + ".run" ] && data[ index ].stop ){ + stopQueue( this, data, index ); + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + if ( gotoEnd ) { + + // force the next step to be the last + timers[ index ]( true ); + } else { + timers[ index ].saveState(); + } + hadTimers = true; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( !( gotoEnd && hadTimers ) ) { + jQuery.dequeue( this, type ); + } + }); + } + +}); + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout( clearFxNow, 0 ); + return ( fxNow = jQuery.now() ); +} + +function clearFxNow() { + fxNow = undefined; +} + +// Generate parameters to create a standard animation +function genFx( type, num ) { + var obj = {}; + + jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() { + obj[ this ] = type; + }); + + return obj; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx( "show", 1 ), + slideUp: genFx( "hide", 1 ), + slideToggle: genFx( "toggle", 1 ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.extend({ + speed: function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function( noUnmark ) { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } else if ( noUnmark !== false ) { + jQuery._unmark( this ); + } + }; + + return opt; + }, + + easing: { + linear: function( p, n, firstNum, diff ) { + return firstNum + diff * p; + }, + swing: function( p, n, firstNum, diff ) { + return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum; + } + }, + + timers: [], + + fx: function( elem, options, prop ) { + this.options = options; + this.elem = elem; + this.prop = prop; + + options.orig = options.orig || {}; + } + +}); + +jQuery.fx.prototype = { + // Simple function for setting a style value + update: function() { + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this ); + }, + + // Get the current size + cur: function() { + if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) { + return this.elem[ this.prop ]; + } + + var parsed, + r = jQuery.css( this.elem, this.prop ); + // Empty strings, null, undefined and "auto" are converted to 0, + // complex values such as "rotate(1rad)" are returned as is, + // simple values such as "10px" are parsed to Float. + return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; + }, + + // Start an animation from one number to another + custom: function( from, to, unit ) { + var self = this, + fx = jQuery.fx; + + this.startTime = fxNow || createFxNow(); + this.end = to; + this.now = this.start = from; + this.pos = this.state = 0; + this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" ); + + function t( gotoEnd ) { + return self.step( gotoEnd ); + } + + t.queue = this.options.queue; + t.elem = this.elem; + t.saveState = function() { + if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) { + jQuery._data( self.elem, "fxshow" + self.prop, self.start ); + } + }; + + if ( t() && jQuery.timers.push(t) && !timerId ) { + timerId = setInterval( fx.tick, fx.interval ); + } + }, + + // Simple 'show' function + show: function() { + var dataShow = jQuery._data( this.elem, "fxshow" + this.prop ); + + // Remember where we started, so that we can go back to it later + this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop ); + this.options.show = true; + + // Begin the animation + // Make sure that we start at a small width/height to avoid any flash of content + if ( dataShow !== undefined ) { + // This show is picking up where a previous hide or show left off + this.custom( this.cur(), dataShow ); + } else { + this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() ); + } + + // Start by showing the element + jQuery( this.elem ).show(); + }, + + // Simple 'hide' function + hide: function() { + // Remember where we started, so that we can go back to it later + this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop ); + this.options.hide = true; + + // Begin the animation + this.custom( this.cur(), 0 ); + }, + + // Each step of an animation + step: function( gotoEnd ) { + var p, n, complete, + t = fxNow || createFxNow(), + done = true, + elem = this.elem, + options = this.options; + + if ( gotoEnd || t >= options.duration + this.startTime ) { + this.now = this.end; + this.pos = this.state = 1; + this.update(); + + options.animatedProperties[ this.prop ] = true; + + for ( p in options.animatedProperties ) { + if ( options.animatedProperties[ p ] !== true ) { + done = false; + } + } + + if ( done ) { + // Reset the overflow + if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) { + + jQuery.each( [ "", "X", "Y" ], function( index, value ) { + elem.style[ "overflow" + value ] = options.overflow[ index ]; + }); + } + + // Hide the element if the "hide" operation was done + if ( options.hide ) { + jQuery( elem ).hide(); + } + + // Reset the properties, if the item has been hidden or shown + if ( options.hide || options.show ) { + for ( p in options.animatedProperties ) { + jQuery.style( elem, p, options.orig[ p ] ); + jQuery.removeData( elem, "fxshow" + p, true ); + // Toggle data is no longer needed + jQuery.removeData( elem, "toggle" + p, true ); + } + } + + // Execute the complete function + // in the event that the complete function throws an exception + // we must ensure it won't be called twice. #5684 + + complete = options.complete; + if ( complete ) { + + options.complete = false; + complete.call( elem ); + } + } + + return false; + + } else { + // classical easing cannot be used with an Infinity duration + if ( options.duration == Infinity ) { + this.now = t; + } else { + n = t - this.startTime; + this.state = n / options.duration; + + // Perform the easing function, defaults to swing + this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration ); + this.now = this.start + ( (this.end - this.start) * this.pos ); + } + // Perform the next step of the animation + this.update(); + } + + return true; + } +}; + +jQuery.extend( jQuery.fx, { + tick: function() { + var timer, + timers = jQuery.timers, + i = 0; + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + }, + + interval: 13, + + stop: function() { + clearInterval( timerId ); + timerId = null; + }, + + speeds: { + slow: 600, + fast: 200, + // Default speed + _default: 400 + }, + + step: { + opacity: function( fx ) { + jQuery.style( fx.elem, "opacity", fx.now ); + }, + + _default: function( fx ) { + if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { + fx.elem.style[ fx.prop ] = fx.now + fx.unit; + } else { + fx.elem[ fx.prop ] = fx.now; + } + } + } +}); + +// Adds width/height step functions +// Do not set anything below 0 +jQuery.each([ "width", "height" ], function( i, prop ) { + jQuery.fx.step[ prop ] = function( fx ) { + jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit ); + }; +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} + +// Try to restore the default display value of an element +function defaultDisplay( nodeName ) { + + if ( !elemdisplay[ nodeName ] ) { + + var body = document.body, + elem = jQuery( "<" + nodeName + ">" ).appendTo( body ), + display = elem.css( "display" ); + elem.remove(); + + // If the simple way fails, + // get element's real default display by attaching it to a temp iframe + if ( display === "none" || display === "" ) { + // No iframe to use yet, so create it + if ( !iframe ) { + iframe = document.createElement( "iframe" ); + iframe.frameBorder = iframe.width = iframe.height = 0; + } + + body.appendChild( iframe ); + + // Create a cacheable copy of the iframe document on first call. + // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML + // document to it; WebKit & Firefox won't allow reusing the iframe document. + if ( !iframeDoc || !iframe.createElement ) { + iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; + iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" ); + iframeDoc.close(); + } + + elem = iframeDoc.createElement( nodeName ); + + iframeDoc.body.appendChild( elem ); + + display = jQuery.css( elem, "display" ); + body.removeChild( iframe ); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + } + + return elemdisplay[ nodeName ]; +} + + + + +var rtable = /^t(?:able|d|h)$/i, + rroot = /^(?:body|html)$/i; + +if ( "getBoundingClientRect" in document.documentElement ) { + jQuery.fn.offset = function( options ) { + var elem = this[0], box; + + if ( options ) { + return this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + if ( !elem || !elem.ownerDocument ) { + return null; + } + + if ( elem === elem.ownerDocument.body ) { + return jQuery.offset.bodyOffset( elem ); + } + + try { + box = elem.getBoundingClientRect(); + } catch(e) {} + + var doc = elem.ownerDocument, + docElem = doc.documentElement; + + // Make sure we're not dealing with a disconnected DOM node + if ( !box || !jQuery.contains( docElem, elem ) ) { + return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; + } + + var body = doc.body, + win = getWindow(doc), + clientTop = docElem.clientTop || body.clientTop || 0, + clientLeft = docElem.clientLeft || body.clientLeft || 0, + scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, + scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, + top = box.top + scrollTop - clientTop, + left = box.left + scrollLeft - clientLeft; + + return { top: top, left: left }; + }; + +} else { + jQuery.fn.offset = function( options ) { + var elem = this[0]; + + if ( options ) { + return this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + if ( !elem || !elem.ownerDocument ) { + return null; + } + + if ( elem === elem.ownerDocument.body ) { + return jQuery.offset.bodyOffset( elem ); + } + + var computedStyle, + offsetParent = elem.offsetParent, + prevOffsetParent = elem, + doc = elem.ownerDocument, + docElem = doc.documentElement, + body = doc.body, + defaultView = doc.defaultView, + prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, + top = elem.offsetTop, + left = elem.offsetLeft; + + while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { + if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { + break; + } + + computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; + top -= elem.scrollTop; + left -= elem.scrollLeft; + + if ( elem === offsetParent ) { + top += elem.offsetTop; + left += elem.offsetLeft; + + if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) { + top += parseFloat( computedStyle.borderTopWidth ) || 0; + left += parseFloat( computedStyle.borderLeftWidth ) || 0; + } + + prevOffsetParent = offsetParent; + offsetParent = elem.offsetParent; + } + + if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { + top += parseFloat( computedStyle.borderTopWidth ) || 0; + left += parseFloat( computedStyle.borderLeftWidth ) || 0; + } + + prevComputedStyle = computedStyle; + } + + if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { + top += body.offsetTop; + left += body.offsetLeft; + } + + if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { + top += Math.max( docElem.scrollTop, body.scrollTop ); + left += Math.max( docElem.scrollLeft, body.scrollLeft ); + } + + return { top: top, left: left }; + }; +} + +jQuery.offset = { + + bodyOffset: function( body ) { + var top = body.offsetTop, + left = body.offsetLeft; + + if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { + top += parseFloat( jQuery.css(body, "marginTop") ) || 0; + left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; + } + + return { top: top, left: left }; + }, + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[0] ) { + return null; + } + + var elem = this[0], + + // Get *real* offsetParent + offsetParent = this.offsetParent(), + + // Get correct offsets + offset = this.offset(), + parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); + + // Subtract element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; + offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; + + // Add offsetParent borders + parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; + parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; + + // Subtract the two offsets + return { + top: offset.top - parentOffset.top, + left: offset.left - parentOffset.left + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || document.body; + while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( ["Left", "Top"], function( i, name ) { + var method = "scroll" + name; + + jQuery.fn[ method ] = function( val ) { + var elem, win; + + if ( val === undefined ) { + elem = this[ 0 ]; + + if ( !elem ) { + return null; + } + + win = getWindow( elem ); + + // Return the scroll offset + return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : + jQuery.support.boxModel && win.document.documentElement[ method ] || + win.document.body[ method ] : + elem[ method ]; + } + + // Set the scroll offset + return this.each(function() { + win = getWindow( this ); + + if ( win ) { + win.scrollTo( + !i ? val : jQuery( win ).scrollLeft(), + i ? val : jQuery( win ).scrollTop() + ); + + } else { + this[ method ] = val; + } + }); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} + + + + +// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods +jQuery.each([ "Height", "Width" ], function( i, name ) { + + var type = name.toLowerCase(); + + // innerHeight and innerWidth + jQuery.fn[ "inner" + name ] = function() { + var elem = this[0]; + return elem ? + elem.style ? + parseFloat( jQuery.css( elem, type, "padding" ) ) : + this[ type ]() : + null; + }; + + // outerHeight and outerWidth + jQuery.fn[ "outer" + name ] = function( margin ) { + var elem = this[0]; + return elem ? + elem.style ? + parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) : + this[ type ]() : + null; + }; + + jQuery.fn[ type ] = function( size ) { + // Get window width or height + var elem = this[0]; + if ( !elem ) { + return size == null ? null : this; + } + + if ( jQuery.isFunction( size ) ) { + return this.each(function( i ) { + var self = jQuery( this ); + self[ type ]( size.call( this, i, self[ type ]() ) ); + }); + } + + if ( jQuery.isWindow( elem ) ) { + // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode + // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat + var docElemProp = elem.document.documentElement[ "client" + name ], + body = elem.document.body; + return elem.document.compatMode === "CSS1Compat" && docElemProp || + body && body[ "client" + name ] || docElemProp; + + // Get document width or height + } else if ( elem.nodeType === 9 ) { + // Either scroll[Width/Height] or offset[Width/Height], whichever is greater + return Math.max( + elem.documentElement["client" + name], + elem.body["scroll" + name], elem.documentElement["scroll" + name], + elem.body["offset" + name], elem.documentElement["offset" + name] + ); + + // Get or set width or height on the element + } else if ( size === undefined ) { + var orig = jQuery.css( elem, type ), + ret = parseFloat( orig ); + + return jQuery.isNumeric( ret ) ? ret : orig; + + // Set the width or height on the element (default to pixels if value is unitless) + } else { + return this.css( type, typeof size === "string" ? size : size + "px" ); + } + }; + +}); + + + + +// Expose jQuery to the global object +window.jQuery = window.$ = jQuery; + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +// Do this after creating the global so that if an AMD module wants to call +// noConflict to hide this version of jQuery, it will work. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + + + +})( window ); diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.progressbar.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.progressbar.js new file mode 100644 index 0000000..0b2fdc7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/jquery/jquery.progressbar.js @@ -0,0 +1,131 @@ +/* + * @ Dmitry Farafonov + */ + +(function($){ +$.ProgressBar = function(options) { + this.element = $(options.boundingBox); + if (options.on && options.on.complete){ + this.onComplete = options.on.complete; + } + if (options.on && options.on.valueChange){ + this.onValueChange = options.on.valueChange; + } + + this._create(); + + if (options.label) + this.set("label", options.label); + if (options.value) + this.value(options.value); + if (options.max) + this.set("max", options.max); +}; +$.ProgressBar.prototype = { + options: { + value: 0, + max: 100 + }, + + min: 0, + + _create: function() { + this.element + .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .attr({ + role: "progressbar", + "aria-valuemin": this.min, + "aria-valuemax": this.options.max, + "aria-valuenow": this._value() + }); + + this.valueDiv = $( "<div class='ui-progressbar-label'></div>" ) + .appendTo( this.element ); + + this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" ) + .appendTo( this.element ); + + this.oldValue = this._value(); + this._refreshValue(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + + this.valueDiv.remove(); + }, + + value: function( newValue ) { + if ( newValue === undefined ) { + return this._value(); + } + + this._setOption( "value", newValue ); + return this; + }, + + _setOption: function( key, value ) { + if ( key === "value" ) { + //var oldVal = this.options.value; + this.options.value = value; + this._refreshValue(); + + if (this.onValueChange) + this.onValueChange.apply(this, [{oldVal: this.oldValue, newVal: value}]); + + if ( this._value() === this.options.max ) { + //this._trigger( "complete" ); + if (this.onComplete) + this.onComplete.apply(this); + } + } else if (key === "label") { + $(this.element).find(".ui-progressbar-label").html(value); + } else if (key === "max") { + this.options.max = value; + } + + //this._super( key, value ); + }, + + _value: function() { + var val = this.options.value; + // normalize invalid value + if ( typeof val !== "number" ) { + val = 0; + } + return Math.min( this.options.max, Math.max( this.min, val ) ); + }, + + _percentage: function() { + return 100 * this._value() / this.options.max; + }, + + _refreshValue: function() { + var value = this.value(), + percentage = this._percentage(); + + if ( this.oldValue !== value ) { + this.oldValue = value; + //this._trigger( "change" ); + } + + this.valueDiv + .toggle( value > this.min ) + .toggleClass( "ui-corner-right", value === this.options.max ) + .width( percentage.toFixed(0) + "%" ); + this.element.attr( "aria-valuenow", value ); + + //$(this.element).find(".ui-progressbar-label").html(value + "%"); + }, + + set: function(key, value){ + this._setOption(key, value); + } +}; + +})( jQuery ); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/jstools.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/jstools.js new file mode 100644 index 0000000..d0c2829 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/jstools.js @@ -0,0 +1,23 @@ +if (typeof(console) == "undefined") { + var console = { + info: function(){}, + warn: function(){}, + error: function(){}, + log: function(){}, + time: function(){}, + timeEnd: function(){} + }; +} + +if(!Array.isArray) { + Array.isArray = function (vArg) { + return Object.prototype.toString.call(vArg) === "[object Array]"; + }; +} + +if (!Object.isSVGElement) { + Object.isSVGElement = function(vArg) { + var str = Object.prototype.toString.call(vArg); + return (str.indexOf("[object SVG") == 0); + }; +} diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.2.1.1.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.2.1.1.js new file mode 100644 index 0000000..3ae3ee8 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.2.1.1.js @@ -0,0 +1,2764 @@ +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.1 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function (a) { + var b = "0.3.4", c = "hasOwnProperty", d = /[\.\/]/, e = "*", f = function () { + }, g = function (a, b) { + return a - b + }, h, i, j = {n: {}}, k = function (a, b) { + var c = j, d = i, e = Array.prototype.slice.call(arguments, 2), f = k.listeners(a), l = 0, m = !1, n, o = [], + p = {}, q = [], r = h, s = []; + h = a, i = 0; + for (var t = 0, u = f.length; t < u; t++) "zIndex" in f[t] && (o.push(f[t].zIndex), f[t].zIndex < 0 && (p[f[t].zIndex] = f[t])); + o.sort(g); + while (o[l] < 0) { + n = p[o[l++]], q.push(n.apply(b, e)); + if (i) { + i = d; + return q + } + } + for (t = 0; t < u; t++) { + n = f[t]; + if ("zIndex" in n) if (n.zIndex == o[l]) { + q.push(n.apply(b, e)); + if (i) break; + do { + l++, n = p[o[l]], n && q.push(n.apply(b, e)); + if (i) break + } while (n) + } else p[n.zIndex] = n; else { + q.push(n.apply(b, e)); + if (i) break + } + } + i = d, h = r; + return q.length ? q : null + }; + k.listeners = function (a) { + var b = a.split(d), c = j, f, g, h, i, k, l, m, n, o = [c], p = []; + for (i = 0, k = b.length; i < k; i++) { + n = []; + for (l = 0, m = o.length; l < m; l++) { + c = o[l].n, g = [c[b[i]], c[e]], h = 2; + while (h--) f = g[h], f && (n.push(f), p = p.concat(f.f || [])) + } + o = n + } + return p + }, k.on = function (a, b) { + var c = a.split(d), e = j; + for (var g = 0, h = c.length; g < h; g++) e = e.n, !e[c[g]] && (e[c[g]] = {n: {}}), e = e[c[g]]; + e.f = e.f || []; + for (g = 0, h = e.f.length; g < h; g++) if (e.f[g] == b) return f; + e.f.push(b); + return function (a) { + +a == +a && (b.zIndex = +a) + } + }, k.stop = function () { + i = 1 + }, k.nt = function (a) { + if (a) return (new RegExp("(?:\\.|\\/|^)" + a + "(?:\\.|\\/|$)")).test(h); + return h + }, k.off = k.unbind = function (a, b) { + var f = a.split(d), g, h, i, k, l, m, n, o = [j]; + for (k = 0, l = f.length; k < l; k++) for (m = 0; m < o.length; m += i.length - 2) { + i = [m, 1], g = o[m].n; + if (f[k] != e) g[f[k]] && i.push(g[f[k]]); else for (h in g) g[c](h) && i.push(g[h]); + o.splice.apply(o, i) + } + for (k = 0, l = o.length; k < l; k++) { + g = o[k]; + while (g.n) { + if (b) { + if (g.f) { + for (m = 0, n = g.f.length; m < n; m++) if (g.f[m] == b) { + g.f.splice(m, 1); + break + } + !g.f.length && delete g.f + } + for (h in g.n) if (g.n[c](h) && g.n[h].f) { + var p = g.n[h].f; + for (m = 0, n = p.length; m < n; m++) if (p[m] == b) { + p.splice(m, 1); + break + } + !p.length && delete g.n[h].f + } + } else { + delete g.f; + for (h in g.n) g.n[c](h) && g.n[h].f && delete g.n[h].f + } + g = g.n + } + } + }, k.once = function (a, b) { + var c = function () { + var d = b.apply(this, arguments); + k.unbind(a, c); + return d + }; + return k.on(a, c) + }, k.version = b, k.toString = function () { + return "You are running Eve " + b + }, typeof module != "undefined" && module.exports ? module.exports = k : typeof define != "undefined" ? define("eve", [], function () { + return k + }) : a.eve = k +})(this), function () { + function cF(a) { + for (var b = 0; b < cy.length; b++) cy[b].el.paper == a && cy.splice(b--, 1) + } + + function cE(b, d, e, f, h, i) { + e = Q(e); + var j, k, l, m = [], o, p, q, t = b.ms, u = {}, v = {}, w = {}; + if (f) for (y = 0, z = cy.length; y < z; y++) { + var x = cy[y]; + if (x.el.id == d.id && x.anim == b) { + x.percent != e ? (cy.splice(y, 1), l = 1) : k = x, d.attr(x.totalOrigin); + break + } + } else f = +v; + for (var y = 0, z = b.percents.length; y < z; y++) { + if (b.percents[y] == e || b.percents[y] > f * b.top) { + e = b.percents[y], p = b.percents[y - 1] || 0, t = t / b.top * (e - p), o = b.percents[y + 1], j = b.anim[e]; + break + } + f && d.attr(b.anim[b.percents[y]]) + } + if (!!j) { + if (!k) { + for (var A in j) if (j[g](A)) if (U[g](A) || d.paper.customAttributes[g](A)) { + u[A] = d.attr(A), u[A] == null && (u[A] = T[A]), v[A] = j[A]; + switch (U[A]) { + case C: + w[A] = (v[A] - u[A]) / t; + break; + case"colour": + u[A] = a.getRGB(u[A]); + var B = a.getRGB(v[A]); + w[A] = {r: (B.r - u[A].r) / t, g: (B.g - u[A].g) / t, b: (B.b - u[A].b) / t}; + break; + case"path": + var D = bR(u[A], v[A]), E = D[1]; + u[A] = D[0], w[A] = []; + for (y = 0, z = u[A].length; y < z; y++) { + w[A][y] = [0]; + for (var F = 1, G = u[A][y].length; F < G; F++) w[A][y][F] = (E[y][F] - u[A][y][F]) / t + } + break; + case"transform": + var H = d._, I = ca(H[A], v[A]); + if (I) { + u[A] = I.from, v[A] = I.to, w[A] = [], w[A].real = !0; + for (y = 0, z = u[A].length; y < z; y++) { + w[A][y] = [u[A][y][0]]; + for (F = 1, G = u[A][y].length; F < G; F++) w[A][y][F] = (v[A][y][F] - u[A][y][F]) / t + } + } else { + var J = d.matrix || new cb, K = { + _: {transform: H.transform}, getBBox: function () { + return d.getBBox(1) + } + }; + u[A] = [J.a, J.b, J.c, J.d, J.e, J.f], b$(K, v[A]), v[A] = K._.transform, w[A] = [(K.matrix.a - J.a) / t, (K.matrix.b - J.b) / t, (K.matrix.c - J.c) / t, (K.matrix.d - J.d) / t, (K.matrix.e - J.e) / t, (K.matrix.f - J.f) / t] + } + break; + case"csv": + var L = r(j[A])[s](c), M = r(u[A])[s](c); + if (A == "clip-rect") { + u[A] = M, w[A] = [], y = M.length; + while (y--) w[A][y] = (L[y] - u[A][y]) / t + } + v[A] = L; + break; + default: + L = [][n](j[A]), M = [][n](u[A]), w[A] = [], y = d.paper.customAttributes[A].length; + while (y--) w[A][y] = ((L[y] || 0) - (M[y] || 0)) / t + } + } + var O = j.easing, P = a.easing_formulas[O]; + if (!P) { + P = r(O).match(N); + if (P && P.length == 5) { + var R = P; + P = function (a) { + return cC(a, +R[1], +R[2], +R[3], +R[4], t) + } + } else P = bf + } + q = j.start || b.start || +(new Date), x = { + anim: b, + percent: e, + timestamp: q, + start: q + (b.del || 0), + status: 0, + initstatus: f || 0, + stop: !1, + ms: t, + easing: P, + from: u, + diff: w, + to: v, + el: d, + callback: j.callback, + prev: p, + next: o, + repeat: i || b.times, + origin: d.attr(), + totalOrigin: h + }, cy.push(x); + if (f && !k && !l) { + x.stop = !0, x.start = new Date - t * f; + if (cy.length == 1) return cA() + } + l && (x.start = new Date - x.ms * f), cy.length == 1 && cz(cA) + } else k.initstatus = f, k.start = new Date - k.ms * f; + eve("raphael.anim.start." + d.id, d, b) + } + } + + function cD(a, b) { + var c = [], d = {}; + this.ms = b, this.times = 1; + if (a) { + for (var e in a) a[g](e) && (d[Q(e)] = a[e], c.push(Q(e))); + c.sort(bd) + } + this.anim = d, this.top = c[c.length - 1], this.percents = c + } + + function cC(a, b, c, d, e, f) { + function o(a, b) { + var c, d, e, f, j, k; + for (e = a, k = 0; k < 8; k++) { + f = m(e) - a; + if (z(f) < b) return e; + j = (3 * i * e + 2 * h) * e + g; + if (z(j) < 1e-6) break; + e = e - f / j + } + c = 0, d = 1, e = a; + if (e < c) return c; + if (e > d) return d; + while (c < d) { + f = m(e); + if (z(f - a) < b) return e; + a > f ? c = e : d = e, e = (d - c) / 2 + c + } + return e + } + + function n(a, b) { + var c = o(a, b); + return ((l * c + k) * c + j) * c + } + + function m(a) { + return ((i * a + h) * a + g) * a + } + + var g = 3 * b, h = 3 * (d - b) - g, i = 1 - g - h, j = 3 * c, k = 3 * (e - c) - j, l = 1 - j - k; + return n(a, 1 / (200 * f)) + } + + function cq() { + return this.x + q + this.y + q + this.width + " × " + this.height + } + + function cp() { + return this.x + q + this.y + } + + function cb(a, b, c, d, e, f) { + a != null ? (this.a = +a, this.b = +b, this.c = +c, this.d = +d, this.e = +e, this.f = +f) : (this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.e = 0, this.f = 0) + } + + function bH(b, c, d) { + b = a._path2curve(b), c = a._path2curve(c); + var e, f, g, h, i, j, k, l, m, n, o = d ? 0 : []; + for (var p = 0, q = b.length; p < q; p++) { + var r = b[p]; + if (r[0] == "M") e = i = r[1], f = j = r[2]; else { + r[0] == "C" ? (m = [e, f].concat(r.slice(1)), e = m[6], f = m[7]) : (m = [e, f, e, f, i, j, i, j], e = i, f = j); + for (var s = 0, t = c.length; s < t; s++) { + var u = c[s]; + if (u[0] == "M") g = k = u[1], h = l = u[2]; else { + u[0] == "C" ? (n = [g, h].concat(u.slice(1)), g = n[6], h = n[7]) : (n = [g, h, g, h, k, l, k, l], g = k, h = l); + var v = bG(m, n, d); + if (d) o += v; else { + for (var w = 0, x = v.length; w < x; w++) v[w].segment1 = p, v[w].segment2 = s, v[w].bez1 = m, v[w].bez2 = n; + o = o.concat(v) + } + } + } + } + } + return o + } + + function bG(b, c, d) { + var e = a.bezierBBox(b), f = a.bezierBBox(c); + if (!a.isBBoxIntersect(e, f)) return d ? 0 : []; + var g = bB.apply(0, b), h = bB.apply(0, c), i = ~~(g / 5), j = ~~(h / 5), k = [], l = [], m = {}, + n = d ? 0 : []; + for (var o = 0; o < i + 1; o++) { + var p = a.findDotsAtSegment.apply(a, b.concat(o / i)); + k.push({x: p.x, y: p.y, t: o / i}) + } + for (o = 0; o < j + 1; o++) p = a.findDotsAtSegment.apply(a, c.concat(o / j)), l.push({ + x: p.x, + y: p.y, + t: o / j + }); + for (o = 0; o < i; o++) for (var q = 0; q < j; q++) { + var r = k[o], s = k[o + 1], t = l[q], u = l[q + 1], v = z(s.x - r.x) < .001 ? "y" : "x", + w = z(u.x - t.x) < .001 ? "y" : "x", x = bD(r.x, r.y, s.x, s.y, t.x, t.y, u.x, u.y); + if (x) { + if (m[x.x.toFixed(4)] == x.y.toFixed(4)) continue; + m[x.x.toFixed(4)] = x.y.toFixed(4); + var y = r.t + z((x[v] - r[v]) / (s[v] - r[v])) * (s.t - r.t), + A = t.t + z((x[w] - t[w]) / (u[w] - t[w])) * (u.t - t.t); + y >= 0 && y <= 1 && A >= 0 && A <= 1 && (d ? n++ : n.push({x: x.x, y: x.y, t1: y, t2: A})) + } + } + return n + } + + function bF(a, b) { + return bG(a, b, 1) + } + + function bE(a, b) { + return bG(a, b) + } + + function bD(a, b, c, d, e, f, g, h) { + if (!(x(a, c) < y(e, g) || y(a, c) > x(e, g) || x(b, d) < y(f, h) || y(b, d) > x(f, h))) { + var i = (a * d - b * c) * (e - g) - (a - c) * (e * h - f * g), + j = (a * d - b * c) * (f - h) - (b - d) * (e * h - f * g), k = (a - c) * (f - h) - (b - d) * (e - g); + if (!k) return; + var l = i / k, m = j / k, n = +l.toFixed(2), o = +m.toFixed(2); + if (n < +y(a, c).toFixed(2) || n > +x(a, c).toFixed(2) || n < +y(e, g).toFixed(2) || n > +x(e, g).toFixed(2) || o < +y(b, d).toFixed(2) || o > +x(b, d).toFixed(2) || o < +y(f, h).toFixed(2) || o > +x(f, h).toFixed(2)) return; + return {x: l, y: m} + } + } + + function bC(a, b, c, d, e, f, g, h, i) { + if (!(i < 0 || bB(a, b, c, d, e, f, g, h) < i)) { + var j = 1, k = j / 2, l = j - k, m, n = .01; + m = bB(a, b, c, d, e, f, g, h, l); + while (z(m - i) > n) k /= 2, l += (m < i ? 1 : -1) * k, m = bB(a, b, c, d, e, f, g, h, l); + return l + } + } + + function bB(a, b, c, d, e, f, g, h, i) { + i == null && (i = 1), i = i > 1 ? 1 : i < 0 ? 0 : i; + var j = i / 2, k = 12, + l = [-0.1252, .1252, -0.3678, .3678, -0.5873, .5873, -0.7699, .7699, -0.9041, .9041, -0.9816, .9816], + m = [.2491, .2491, .2335, .2335, .2032, .2032, .1601, .1601, .1069, .1069, .0472, .0472], n = 0; + for (var o = 0; o < k; o++) { + var p = j * l[o] + j, q = bA(p, a, c, e, g), r = bA(p, b, d, f, h), s = q * q + r * r; + n += m[o] * w.sqrt(s) + } + return j * n + } + + function bA(a, b, c, d, e) { + var f = -3 * b + 9 * c - 9 * d + 3 * e, g = a * f + 6 * b - 12 * c + 6 * d; + return a * g - 3 * b + 3 * c + } + + function by(a, b) { + var c = []; + for (var d = 0, e = a.length; e - 2 * !b > d; d += 2) { + var f = [{x: +a[d - 2], y: +a[d - 1]}, {x: +a[d], y: +a[d + 1]}, { + x: +a[d + 2], + y: +a[d + 3] + }, {x: +a[d + 4], y: +a[d + 5]}]; + b ? d ? e - 4 == d ? f[3] = {x: +a[0], y: +a[1]} : e - 2 == d && (f[2] = { + x: +a[0], + y: +a[1] + }, f[3] = {x: +a[2], y: +a[3]}) : f[0] = { + x: +a[e - 2], + y: +a[e - 1] + } : e - 4 == d ? f[3] = f[2] : d || (f[0] = { + x: +a[d], + y: +a[d + 1] + }), c.push(["C", (-f[0].x + 6 * f[1].x + f[2].x) / 6, (-f[0].y + 6 * f[1].y + f[2].y) / 6, (f[1].x + 6 * f[2].x - f[3].x) / 6, (f[1].y + 6 * f[2].y - f[3].y) / 6, f[2].x, f[2].y]) + } + return c + } + + function bx() { + return this.hex + } + + function bv(a, b, c) { + function d() { + var e = Array.prototype.slice.call(arguments, 0), f = e.join("␀"), h = d.cache = d.cache || {}, + i = d.count = d.count || []; + if (h[g](f)) { + bu(i, f); + return c ? c(h[f]) : h[f] + } + i.length >= 1e3 && delete h[i.shift()], i.push(f), h[f] = a[m](b, e); + return c ? c(h[f]) : h[f] + } + + return d + } + + function bu(a, b) { + for (var c = 0, d = a.length; c < d; c++) if (a[c] === b) return a.push(a.splice(c, 1)[0]) + } + + function bm(a) { + if (Object(a) !== a) return a; + var b = new a.constructor; + for (var c in a) a[g](c) && (b[c] = bm(a[c])); + return b + } + + function a(c) { + if (a.is(c, "function")) return b ? c() : eve.on("raphael.DOMload", c); + if (a.is(c, E)) return a._engine.create[m](a, c.splice(0, 3 + a.is(c[0], C))).add(c); + var d = Array.prototype.slice.call(arguments, 0); + if (a.is(d[d.length - 1], "function")) { + var e = d.pop(); + return b ? e.call(a._engine.create[m](a, d)) : eve.on("raphael.DOMload", function () { + e.call(a._engine.create[m](a, d)) + }) + } + return a._engine.create[m](a, arguments) + } + + a.version = "2.1.0", a.eve = eve; + var b, c = /[, ]+/, d = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, e = /\{(\d+)\}/g, + f = "prototype", g = "hasOwnProperty", h = {doc: document, win: window}, + i = {was: Object.prototype[g].call(h.win, "Raphael"), is: h.win.Raphael}, j = function () { + this.ca = this.customAttributes = {} + }, k, l = "appendChild", m = "apply", n = "concat", o = "createTouch" in h.doc, p = "", q = " ", r = String, + s = "split", + t = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[s](q), + u = {mousedown: "touchstart", mousemove: "touchmove", mouseup: "touchend"}, v = r.prototype.toLowerCase, + w = Math, x = w.max, y = w.min, z = w.abs, A = w.pow, B = w.PI, C = "number", D = "string", E = "array", + F = "toString", G = "fill", H = Object.prototype.toString, I = {}, J = "push", + K = a._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i, + L = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, + M = {NaN: 1, Infinity: 1, "-Infinity": 1}, N = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, + O = w.round, P = "setAttribute", Q = parseFloat, R = parseInt, S = r.prototype.toUpperCase, + T = a._availableAttrs = { + "arrow-end": "none", + "arrow-start": "none", + blur: 0, + "clip-rect": "0 0 1e9 1e9", + cursor: "default", + cx: 0, + cy: 0, + fill: "#fff", + "fill-opacity": 1, + font: '10px "Arial"', + "font-family": '"Arial"', + "font-size": "10", + "font-style": "normal", + "font-weight": 400, + gradient: 0, + height: 0, + href: "http://raphaeljs.com/", + "letter-spacing": 0, + opacity: 1, + path: "M0,0", + r: 0, + rx: 0, + ry: 0, + src: "", + stroke: "#000", + "stroke-dasharray": "", + "stroke-linecap": "butt", + "stroke-linejoin": "butt", + "stroke-miterlimit": 0, + "stroke-opacity": 1, + "stroke-width": 1, + target: "_blank", + "text-anchor": "middle", + title: "Raphael", + transform: "", + width: 0, + x: 0, + y: 0 + }, U = a._availableAnimAttrs = { + blur: C, + "clip-rect": "csv", + cx: C, + cy: C, + fill: "colour", + "fill-opacity": C, + "font-size": C, + height: C, + opacity: C, + path: "path", + r: C, + rx: C, + ry: C, + stroke: "colour", + "stroke-opacity": C, + "stroke-width": C, + transform: "transform", + width: C, + x: C, + y: C + }, + V = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g, + W = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, + X = {hs: 1, rg: 1}, Y = /,?([achlmqrstvxz]),?/gi, + Z = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + $ = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + _ = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig, + ba = a._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, + bb = {}, bc = function (a, b) { + return a.key - b.key + }, bd = function (a, b) { + return Q(a) - Q(b) + }, be = function () { + }, bf = function (a) { + return a + }, bg = a._rectPath = function (a, b, c, d, e) { + if (e) return [["M", a + e, b], ["l", c - e * 2, 0], ["a", e, e, 0, 0, 1, e, e], ["l", 0, d - e * 2], ["a", e, e, 0, 0, 1, -e, e], ["l", e * 2 - c, 0], ["a", e, e, 0, 0, 1, -e, -e], ["l", 0, e * 2 - d], ["a", e, e, 0, 0, 1, e, -e], ["z"]]; + return [["M", a, b], ["l", c, 0], ["l", 0, d], ["l", -c, 0], ["z"]] + }, bh = function (a, b, c, d) { + d == null && (d = c); + return [["M", a, b], ["m", 0, -d], ["a", c, d, 0, 1, 1, 0, 2 * d], ["a", c, d, 0, 1, 1, 0, -2 * d], ["z"]] + }, bi = a._getPath = { + path: function (a) { + return a.attr("path") + }, circle: function (a) { + var b = a.attrs; + return bh(b.cx, b.cy, b.r) + }, ellipse: function (a) { + var b = a.attrs; + return bh(b.cx, b.cy, b.rx, b.ry) + }, rect: function (a) { + var b = a.attrs; + return bg(b.x, b.y, b.width, b.height, b.r) + }, image: function (a) { + var b = a.attrs; + return bg(b.x, b.y, b.width, b.height) + }, text: function (a) { + var b = a._getBBox(); + return bg(b.x, b.y, b.width, b.height) + } + }, bj = a.mapPath = function (a, b) { + if (!b) return a; + var c, d, e, f, g, h, i; + a = bR(a); + for (e = 0, g = a.length; e < g; e++) { + i = a[e]; + for (f = 1, h = i.length; f < h; f += 2) c = b.x(i[f], i[f + 1]), d = b.y(i[f], i[f + 1]), i[f] = c, i[f + 1] = d + } + return a + }; + a._g = h, a.type = h.win.SVGAngle || h.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"; + if (a.type == "VML") { + var bk = h.doc.createElement("div"), bl; + bk.innerHTML = '<v:shape adj="1"/>', bl = bk.firstChild, bl.style.behavior = "url(#default#VML)"; + if (!bl || typeof bl.adj != "object") return a.type = p; + bk = null + } + a.svg = !(a.vml = a.type == "VML"), a._Paper = j, a.fn = k = j.prototype = a.prototype, a._id = 0, a._oid = 0, a.is = function (a, b) { + b = v.call(b); + if (b == "finite") return !M[g](+a); + if (b == "array") return a instanceof Array; + return b == "null" && a === null || b == typeof a && a !== null || b == "object" && a === Object(a) || b == "array" && Array.isArray && Array.isArray(a) || H.call(a).slice(8, -1).toLowerCase() == b + }, a.angle = function (b, c, d, e, f, g) { + if (f == null) { + var h = b - d, i = c - e; + if (!h && !i) return 0; + return (180 + w.atan2(-i, -h) * 180 / B + 360) % 360 + } + return a.angle(b, c, f, g) - a.angle(d, e, f, g) + }, a.rad = function (a) { + return a % 360 * B / 180 + }, a.deg = function (a) { + return a * 180 / B % 360 + }, a.snapTo = function (b, c, d) { + d = a.is(d, "finite") ? d : 10; + if (a.is(b, E)) { + var e = b.length; + while (e--) if (z(b[e] - c) <= d) return b[e] + } else { + b = +b; + var f = c % b; + if (f < d) return c - f; + if (f > b - d) return c - f + b + } + return c + }; + var bn = a.createUUID = function (a, b) { + return function () { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a, b).toUpperCase() + } + }(/[xy]/g, function (a) { + var b = w.random() * 16 | 0, c = a == "x" ? b : b & 3 | 8; + return c.toString(16) + }); + a.setWindow = function (b) { + eve("raphael.setWindow", a, h.win, b), h.win = b, h.doc = h.win.document, a._engine.initWin && a._engine.initWin(h.win) + }; + var bo = function (b) { + if (a.vml) { + var c = /^\s+|\s+$/g, d; + try { + var e = new ActiveXObject("htmlfile"); + e.write("<body>"), e.close(), d = e.body + } catch (f) { + d = createPopup().document.body + } + var g = d.createTextRange(); + bo = bv(function (a) { + try { + d.style.color = r(a).replace(c, p); + var b = g.queryCommandValue("ForeColor"); + b = (b & 255) << 16 | b & 65280 | (b & 16711680) >>> 16; + return "#" + ("000000" + b.toString(16)).slice(-6) + } catch (e) { + return "none" + } + }) + } else { + var i = h.doc.createElement("i"); + i.title = "Raphaël Colour Picker", i.style.display = "none", h.doc.body.appendChild(i), bo = bv(function (a) { + i.style.color = a; + return h.doc.defaultView.getComputedStyle(i, p).getPropertyValue("color") + }) + } + return bo(b) + }, bp = function () { + return "hsb(" + [this.h, this.s, this.b] + ")" + }, bq = function () { + return "hsl(" + [this.h, this.s, this.l] + ")" + }, br = function () { + return this.hex + }, bs = function (b, c, d) { + c == null && a.is(b, "object") && "r" in b && "g" in b && "b" in b && (d = b.b, c = b.g, b = b.r); + if (c == null && a.is(b, D)) { + var e = a.getRGB(b); + b = e.r, c = e.g, d = e.b + } + if (b > 1 || c > 1 || d > 1) b /= 255, c /= 255, d /= 255; + return [b, c, d] + }, bt = function (b, c, d, e) { + b *= 255, c *= 255, d *= 255; + var f = {r: b, g: c, b: d, hex: a.rgb(b, c, d), toString: br}; + a.is(e, "finite") && (f.opacity = e); + return f + }; + a.color = function (b) { + var c; + a.is(b, "object") && "h" in b && "s" in b && "b" in b ? (c = a.hsb2rgb(b), b.r = c.r, b.g = c.g, b.b = c.b, b.hex = c.hex) : a.is(b, "object") && "h" in b && "s" in b && "l" in b ? (c = a.hsl2rgb(b), b.r = c.r, b.g = c.g, b.b = c.b, b.hex = c.hex) : (a.is(b, "string") && (b = a.getRGB(b)), a.is(b, "object") && "r" in b && "g" in b && "b" in b ? (c = a.rgb2hsl(b), b.h = c.h, b.s = c.s, b.l = c.l, c = a.rgb2hsb(b), b.v = c.b) : (b = {hex: "none"}, b.r = b.g = b.b = b.h = b.s = b.v = b.l = -1)), b.toString = br; + return b + }, a.hsb2rgb = function (a, b, c, d) { + this.is(a, "object") && "h" in a && "s" in a && "b" in a && (c = a.b, b = a.s, a = a.h, d = a.o), a *= 360; + var e, f, g, h, i; + a = a % 360 / 60, i = c * b, h = i * (1 - z(a % 2 - 1)), e = f = g = c - i, a = ~~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a]; + return bt(e, f, g, d) + }, a.hsl2rgb = function (a, b, c, d) { + this.is(a, "object") && "h" in a && "s" in a && "l" in a && (c = a.l, b = a.s, a = a.h); + if (a > 1 || b > 1 || c > 1) a /= 360, b /= 100, c /= 100; + a *= 360; + var e, f, g, h, i; + a = a % 360 / 60, i = 2 * b * (c < .5 ? c : 1 - c), h = i * (1 - z(a % 2 - 1)), e = f = g = c - i / 2, a = ~~a, e += [i, h, 0, 0, h, i][a], f += [h, i, i, h, 0, 0][a], g += [0, 0, h, i, i, h][a]; + return bt(e, f, g, d) + }, a.rgb2hsb = function (a, b, c) { + c = bs(a, b, c), a = c[0], b = c[1], c = c[2]; + var d, e, f, g; + f = x(a, b, c), g = f - y(a, b, c), d = g == 0 ? null : f == a ? (b - c) / g : f == b ? (c - a) / g + 2 : (a - b) / g + 4, d = (d + 360) % 6 * 60 / 360, e = g == 0 ? 0 : g / f; + return {h: d, s: e, b: f, toString: bp} + }, a.rgb2hsl = function (a, b, c) { + c = bs(a, b, c), a = c[0], b = c[1], c = c[2]; + var d, e, f, g, h, i; + g = x(a, b, c), h = y(a, b, c), i = g - h, d = i == 0 ? null : g == a ? (b - c) / i : g == b ? (c - a) / i + 2 : (a - b) / i + 4, d = (d + 360) % 6 * 60 / 360, f = (g + h) / 2, e = i == 0 ? 0 : f < .5 ? i / (2 * f) : i / (2 - 2 * f); + return {h: d, s: e, l: f, toString: bq} + }, a._path2string = function () { + return this.join(",").replace(Y, "$1") + }; + var bw = a._preload = function (a, b) { + var c = h.doc.createElement("img"); + c.style.cssText = "position:absolute;left:-9999em;top:-9999em", c.onload = function () { + b.call(this), this.onload = null, h.doc.body.removeChild(this) + }, c.onerror = function () { + h.doc.body.removeChild(this) + }, h.doc.body.appendChild(c), c.src = a + }; + a.getRGB = bv(function (b) { + if (!b || !!((b = r(b)).indexOf("-") + 1)) return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: bx}; + if (b == "none") return {r: -1, g: -1, b: -1, hex: "none", toString: bx}; + !X[g](b.toLowerCase().substring(0, 2)) && b.charAt() != "#" && (b = bo(b)); + var c, d, e, f, h, i, j, k = b.match(L); + if (k) { + k[2] && (f = R(k[2].substring(5), 16), e = R(k[2].substring(3, 5), 16), d = R(k[2].substring(1, 3), 16)), k[3] && (f = R((i = k[3].charAt(3)) + i, 16), e = R((i = k[3].charAt(2)) + i, 16), d = R((i = k[3].charAt(1)) + i, 16)), k[4] && (j = k[4][s](W), d = Q(j[0]), j[0].slice(-1) == "%" && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == "%" && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == "%" && (f *= 2.55), k[1].toLowerCase().slice(0, 4) == "rgba" && (h = Q(j[3])), j[3] && j[3].slice(-1) == "%" && (h /= 100)); + if (k[5]) { + j = k[5][s](W), d = Q(j[0]), j[0].slice(-1) == "%" && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == "%" && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == "%" && (f *= 2.55), (j[0].slice(-3) == "deg" || j[0].slice(-1) == "°") && (d /= 360), k[1].toLowerCase().slice(0, 4) == "hsba" && (h = Q(j[3])), j[3] && j[3].slice(-1) == "%" && (h /= 100); + return a.hsb2rgb(d, e, f, h) + } + if (k[6]) { + j = k[6][s](W), d = Q(j[0]), j[0].slice(-1) == "%" && (d *= 2.55), e = Q(j[1]), j[1].slice(-1) == "%" && (e *= 2.55), f = Q(j[2]), j[2].slice(-1) == "%" && (f *= 2.55), (j[0].slice(-3) == "deg" || j[0].slice(-1) == "°") && (d /= 360), k[1].toLowerCase().slice(0, 4) == "hsla" && (h = Q(j[3])), j[3] && j[3].slice(-1) == "%" && (h /= 100); + return a.hsl2rgb(d, e, f, h) + } + k = { + r: d, + g: e, + b: f, + toString: bx + }, k.hex = "#" + (16777216 | f | e << 8 | d << 16).toString(16).slice(1), a.is(h, "finite") && (k.opacity = h); + return k + } + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: bx} + }, a), a.hsb = bv(function (b, c, d) { + return a.hsb2rgb(b, c, d).hex + }), a.hsl = bv(function (b, c, d) { + return a.hsl2rgb(b, c, d).hex + }), a.rgb = bv(function (a, b, c) { + return "#" + (16777216 | c | b << 8 | a << 16).toString(16).slice(1) + }), a.getColor = function (a) { + var b = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: a || .75}, c = this.hsb2rgb(b.h, b.s, b.b); + b.h += .075, b.h > 1 && (b.h = 0, b.s -= .2, b.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: b.b})); + return c.hex + }, a.getColor.reset = function () { + delete this.start + }, a.parsePathString = function (b) { + if (!b) return null; + var c = bz(b); + if (c.arr) return bJ(c.arr); + var d = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, e = []; + a.is(b, E) && a.is(b[0], E) && (e = bJ(b)), e.length || r(b).replace(Z, function (a, b, c) { + var f = [], g = b.toLowerCase(); + c.replace(_, function (a, b) { + b && f.push(+b) + }), g == "m" && f.length > 2 && (e.push([b][n](f.splice(0, 2))), g = "l", b = b == "m" ? "l" : "L"); + if (g == "r") e.push([b][n](f)); else while (f.length >= d[g]) { + e.push([b][n](f.splice(0, d[g]))); + if (!d[g]) break + } + }), e.toString = a._path2string, c.arr = bJ(e); + return e + }, a.parseTransformString = bv(function (b) { + if (!b) return null; + var c = {r: 3, s: 4, t: 2, m: 6}, d = []; + a.is(b, E) && a.is(b[0], E) && (d = bJ(b)), d.length || r(b).replace($, function (a, b, c) { + var e = [], f = v.call(b); + c.replace(_, function (a, b) { + b && e.push(+b) + }), d.push([b][n](e)) + }), d.toString = a._path2string; + return d + }); + var bz = function (a) { + var b = bz.ps = bz.ps || {}; + b[a] ? b[a].sleep = 100 : b[a] = {sleep: 100}, setTimeout(function () { + for (var c in b) b[g](c) && c != a && (b[c].sleep--, !b[c].sleep && delete b[c]) + }); + return b[a] + }; + a.findDotsAtSegment = function (a, b, c, d, e, f, g, h, i) { + var j = 1 - i, k = A(j, 3), l = A(j, 2), m = i * i, n = m * i, + o = k * a + l * 3 * i * c + j * 3 * i * i * e + n * g, + p = k * b + l * 3 * i * d + j * 3 * i * i * f + n * h, q = a + 2 * i * (c - a) + m * (e - 2 * c + a), + r = b + 2 * i * (d - b) + m * (f - 2 * d + b), s = c + 2 * i * (e - c) + m * (g - 2 * e + c), + t = d + 2 * i * (f - d) + m * (h - 2 * f + d), u = j * a + i * c, v = j * b + i * d, x = j * e + i * g, + y = j * f + i * h, z = 90 - w.atan2(q - s, r - t) * 180 / B; + (q > s || r < t) && (z += 180); + return {x: o, y: p, m: {x: q, y: r}, n: {x: s, y: t}, start: {x: u, y: v}, end: {x: x, y: y}, alpha: z} + }, a.bezierBBox = function (b, c, d, e, f, g, h, i) { + a.is(b, "array") || (b = [b, c, d, e, f, g, h, i]); + var j = bQ.apply(null, b); + return {x: j.min.x, y: j.min.y, x2: j.max.x, y2: j.max.y, width: j.max.x - j.min.x, height: j.max.y - j.min.y} + }, a.isPointInsideBBox = function (a, b, c) { + return b >= a.x && b <= a.x2 && c >= a.y && c <= a.y2 + }, a.isBBoxIntersect = function (b, c) { + var d = a.isPointInsideBBox; + return d(c, b.x, b.y) || d(c, b.x2, b.y) || d(c, b.x, b.y2) || d(c, b.x2, b.y2) || d(b, c.x, c.y) || d(b, c.x2, c.y) || d(b, c.x, c.y2) || d(b, c.x2, c.y2) || (b.x < c.x2 && b.x > c.x || c.x < b.x2 && c.x > b.x) && (b.y < c.y2 && b.y > c.y || c.y < b.y2 && c.y > b.y) + }, a.pathIntersection = function (a, b) { + return bH(a, b) + }, a.pathIntersectionNumber = function (a, b) { + return bH(a, b, 1) + }, a.isPointInsidePath = function (b, c, d) { + var e = a.pathBBox(b); + return a.isPointInsideBBox(e, c, d) && bH(b, [["M", c, d], ["H", e.x2 + 10]], 1) % 2 == 1 + }, a._removedFactory = function (a) { + return function () { + eve("raphael.log", null, "Raphaël: you are calling to method “" + a + "” of removed object", a) + } + }; + var bI = a.pathBBox = function (a) { + var b = bz(a); + if (b.bbox) return bm(b.bbox); + if (!a) return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0}; + a = bR(a); + var c = 0, d = 0, e = [], f = [], g; + for (var h = 0, i = a.length; h < i; h++) { + g = a[h]; + if (g[0] == "M") c = g[1], d = g[2], e.push(c), f.push(d); else { + var j = bQ(c, d, g[1], g[2], g[3], g[4], g[5], g[6]); + e = e[n](j.min.x, j.max.x), f = f[n](j.min.y, j.max.y), c = g[5], d = g[6] + } + } + var k = y[m](0, e), l = y[m](0, f), o = x[m](0, e), p = x[m](0, f), + q = {x: k, y: l, x2: o, y2: p, width: o - k, height: p - l}; + b.bbox = bm(q); + return q + }, bJ = function (b) { + var c = bm(b); + c.toString = a._path2string; + return c + }, bK = a._pathToRelative = function (b) { + var c = bz(b); + if (c.rel) return bJ(c.rel); + if (!a.is(b, E) || !a.is(b && b[0], E)) b = a.parsePathString(b); + var d = [], e = 0, f = 0, g = 0, h = 0, i = 0; + b[0][0] == "M" && (e = b[0][1], f = b[0][2], g = e, h = f, i++, d.push(["M", e, f])); + for (var j = i, k = b.length; j < k; j++) { + var l = d[j] = [], m = b[j]; + if (m[0] != v.call(m[0])) { + l[0] = v.call(m[0]); + switch (l[0]) { + case"a": + l[1] = m[1], l[2] = m[2], l[3] = m[3], l[4] = m[4], l[5] = m[5], l[6] = +(m[6] - e).toFixed(3), l[7] = +(m[7] - f).toFixed(3); + break; + case"v": + l[1] = +(m[1] - f).toFixed(3); + break; + case"m": + g = m[1], h = m[2]; + default: + for (var n = 1, o = m.length; n < o; n++) l[n] = +(m[n] - (n % 2 ? e : f)).toFixed(3) + } + } else { + l = d[j] = [], m[0] == "m" && (g = m[1] + e, h = m[2] + f); + for (var p = 0, q = m.length; p < q; p++) d[j][p] = m[p] + } + var r = d[j].length; + switch (d[j][0]) { + case"z": + e = g, f = h; + break; + case"h": + e += +d[j][r - 1]; + break; + case"v": + f += +d[j][r - 1]; + break; + default: + e += +d[j][r - 2], f += +d[j][r - 1] + } + } + d.toString = a._path2string, c.rel = bJ(d); + return d + }, bL = a._pathToAbsolute = function (b) { + var c = bz(b); + if (c.abs) return bJ(c.abs); + if (!a.is(b, E) || !a.is(b && b[0], E)) b = a.parsePathString(b); + if (!b || !b.length) return [["M", 0, 0]]; + var d = [], e = 0, f = 0, g = 0, h = 0, i = 0; + b[0][0] == "M" && (e = +b[0][1], f = +b[0][2], g = e, h = f, i++, d[0] = ["M", e, f]); + var j = b.length == 3 && b[0][0] == "M" && b[1][0].toUpperCase() == "R" && b[2][0].toUpperCase() == "Z"; + for (var k, l, m = i, o = b.length; m < o; m++) { + d.push(k = []), l = b[m]; + if (l[0] != S.call(l[0])) { + k[0] = S.call(l[0]); + switch (k[0]) { + case"A": + k[1] = l[1], k[2] = l[2], k[3] = l[3], k[4] = l[4], k[5] = l[5], k[6] = +(l[6] + e), k[7] = +(l[7] + f); + break; + case"V": + k[1] = +l[1] + f; + break; + case"H": + k[1] = +l[1] + e; + break; + case"R": + var p = [e, f][n](l.slice(1)); + for (var q = 2, r = p.length; q < r; q++) p[q] = +p[q] + e, p[++q] = +p[q] + f; + d.pop(), d = d[n](by(p, j)); + break; + case"M": + g = +l[1] + e, h = +l[2] + f; + default: + for (q = 1, r = l.length; q < r; q++) k[q] = +l[q] + (q % 2 ? e : f) + } + } else if (l[0] == "R") p = [e, f][n](l.slice(1)), d.pop(), d = d[n](by(p, j)), k = ["R"][n](l.slice(-2)); else for (var s = 0, t = l.length; s < t; s++) k[s] = l[s]; + switch (k[0]) { + case"Z": + e = g, f = h; + break; + case"H": + e = k[1]; + break; + case"V": + f = k[1]; + break; + case"M": + g = k[k.length - 2], h = k[k.length - 1]; + default: + e = k[k.length - 2], f = k[k.length - 1] + } + } + d.toString = a._path2string, c.abs = bJ(d); + return d + }, bM = function (a, b, c, d) { + return [a, b, c, d, c, d] + }, bN = function (a, b, c, d, e, f) { + var g = 1 / 3, h = 2 / 3; + return [g * a + h * c, g * b + h * d, g * e + h * c, g * f + h * d, e, f] + }, bO = function (a, b, c, d, e, f, g, h, i, j) { + var k = B * 120 / 180, l = B / 180 * (+e || 0), m = [], o, p = bv(function (a, b, c) { + var d = a * w.cos(c) - b * w.sin(c), e = a * w.sin(c) + b * w.cos(c); + return {x: d, y: e} + }); + if (!j) { + o = p(a, b, -l), a = o.x, b = o.y, o = p(h, i, -l), h = o.x, i = o.y; + var q = w.cos(B / 180 * e), r = w.sin(B / 180 * e), t = (a - h) / 2, u = (b - i) / 2, + v = t * t / (c * c) + u * u / (d * d); + v > 1 && (v = w.sqrt(v), c = v * c, d = v * d); + var x = c * c, y = d * d, + A = (f == g ? -1 : 1) * w.sqrt(z((x * y - x * u * u - y * t * t) / (x * u * u + y * t * t))), + C = A * c * u / d + (a + h) / 2, D = A * -d * t / c + (b + i) / 2, E = w.asin(((b - D) / d).toFixed(9)), + F = w.asin(((i - D) / d).toFixed(9)); + E = a < C ? B - E : E, F = h < C ? B - F : F, E < 0 && (E = B * 2 + E), F < 0 && (F = B * 2 + F), g && E > F && (E = E - B * 2), !g && F > E && (F = F - B * 2) + } else E = j[0], F = j[1], C = j[2], D = j[3]; + var G = F - E; + if (z(G) > k) { + var H = F, I = h, J = i; + F = E + k * (g && F > E ? 1 : -1), h = C + c * w.cos(F), i = D + d * w.sin(F), m = bO(h, i, c, d, e, 0, g, I, J, [F, H, C, D]) + } + G = F - E; + var K = w.cos(E), L = w.sin(E), M = w.cos(F), N = w.sin(F), O = w.tan(G / 4), P = 4 / 3 * c * O, + Q = 4 / 3 * d * O, R = [a, b], S = [a + P * L, b - Q * K], T = [h + P * N, i - Q * M], U = [h, i]; + S[0] = 2 * R[0] - S[0], S[1] = 2 * R[1] - S[1]; + if (j) return [S, T, U][n](m); + m = [S, T, U][n](m).join()[s](","); + var V = []; + for (var W = 0, X = m.length; W < X; W++) V[W] = W % 2 ? p(m[W - 1], m[W], l).y : p(m[W], m[W + 1], l).x; + return V + }, bP = function (a, b, c, d, e, f, g, h, i) { + var j = 1 - i; + return { + x: A(j, 3) * a + A(j, 2) * 3 * i * c + j * 3 * i * i * e + A(i, 3) * g, + y: A(j, 3) * b + A(j, 2) * 3 * i * d + j * 3 * i * i * f + A(i, 3) * h + } + }, bQ = bv(function (a, b, c, d, e, f, g, h) { + var i = e - 2 * c + a - (g - 2 * e + c), j = 2 * (c - a) - 2 * (e - c), k = a - c, + l = (-j + w.sqrt(j * j - 4 * i * k)) / 2 / i, n = (-j - w.sqrt(j * j - 4 * i * k)) / 2 / i, o = [b, h], + p = [a, g], q; + z(l) > "1e12" && (l = .5), z(n) > "1e12" && (n = .5), l > 0 && l < 1 && (q = bP(a, b, c, d, e, f, g, h, l), p.push(q.x), o.push(q.y)), n > 0 && n < 1 && (q = bP(a, b, c, d, e, f, g, h, n), p.push(q.x), o.push(q.y)), i = f - 2 * d + b - (h - 2 * f + d), j = 2 * (d - b) - 2 * (f - d), k = b - d, l = (-j + w.sqrt(j * j - 4 * i * k)) / 2 / i, n = (-j - w.sqrt(j * j - 4 * i * k)) / 2 / i, z(l) > "1e12" && (l = .5), z(n) > "1e12" && (n = .5), l > 0 && l < 1 && (q = bP(a, b, c, d, e, f, g, h, l), p.push(q.x), o.push(q.y)), n > 0 && n < 1 && (q = bP(a, b, c, d, e, f, g, h, n), p.push(q.x), o.push(q.y)); + return {min: {x: y[m](0, p), y: y[m](0, o)}, max: {x: x[m](0, p), y: x[m](0, o)}} + }), bR = a._path2curve = bv(function (a, b) { + var c = !b && bz(a); + if (!b && c.curve) return bJ(c.curve); + var d = bL(a), e = b && bL(b), f = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + g = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, h = function (a, b) { + var c, d; + if (!a) return ["C", b.x, b.y, b.x, b.y, b.x, b.y]; + !(a[0] in {T: 1, Q: 1}) && (b.qx = b.qy = null); + switch (a[0]) { + case"M": + b.X = a[1], b.Y = a[2]; + break; + case"A": + a = ["C"][n](bO[m](0, [b.x, b.y][n](a.slice(1)))); + break; + case"S": + c = b.x + (b.x - (b.bx || b.x)), d = b.y + (b.y - (b.by || b.y)), a = ["C", c, d][n](a.slice(1)); + break; + case"T": + b.qx = b.x + (b.x - (b.qx || b.x)), b.qy = b.y + (b.y - (b.qy || b.y)), a = ["C"][n](bN(b.x, b.y, b.qx, b.qy, a[1], a[2])); + break; + case"Q": + b.qx = a[1], b.qy = a[2], a = ["C"][n](bN(b.x, b.y, a[1], a[2], a[3], a[4])); + break; + case"L": + a = ["C"][n](bM(b.x, b.y, a[1], a[2])); + break; + case"H": + a = ["C"][n](bM(b.x, b.y, a[1], b.y)); + break; + case"V": + a = ["C"][n](bM(b.x, b.y, b.x, a[1])); + break; + case"Z": + a = ["C"][n](bM(b.x, b.y, b.X, b.Y)) + } + return a + }, i = function (a, b) { + if (a[b].length > 7) { + a[b].shift(); + var c = a[b]; + while (c.length) a.splice(b++, 0, ["C"][n](c.splice(0, 6))); + a.splice(b, 1), l = x(d.length, e && e.length || 0) + } + }, j = function (a, b, c, f, g) { + a && b && a[g][0] == "M" && b[g][0] != "M" && (b.splice(g, 0, ["M", f.x, f.y]), c.bx = 0, c.by = 0, c.x = a[g][1], c.y = a[g][2], l = x(d.length, e && e.length || 0)) + }; + for (var k = 0, l = x(d.length, e && e.length || 0); k < l; k++) { + d[k] = h(d[k], f), i(d, k), e && (e[k] = h(e[k], g)), e && i(e, k), j(d, e, f, g, k), j(e, d, g, f, k); + var o = d[k], p = e && e[k], q = o.length, r = e && p.length; + f.x = o[q - 2], f.y = o[q - 1], f.bx = Q(o[q - 4]) || f.x, f.by = Q(o[q - 3]) || f.y, g.bx = e && (Q(p[r - 4]) || g.x), g.by = e && (Q(p[r - 3]) || g.y), g.x = e && p[r - 2], g.y = e && p[r - 1] + } + e || (c.curve = bJ(d)); + return e ? [d, e] : d + }, null, bJ), bS = a._parseDots = bv(function (b) { + var c = []; + for (var d = 0, e = b.length; d < e; d++) { + var f = {}, g = b[d].match(/^([^:]*):?([\d\.]*)/); + f.color = a.getRGB(g[1]); + if (f.color.error) return null; + f.color = f.color.hex, g[2] && (f.offset = g[2] + "%"), c.push(f) + } + for (d = 1, e = c.length - 1; d < e; d++) if (!c[d].offset) { + var h = Q(c[d - 1].offset || 0), i = 0; + for (var j = d + 1; j < e; j++) if (c[j].offset) { + i = c[j].offset; + break + } + i || (i = 100, j = e), i = Q(i); + var k = (i - h) / (j - d + 1); + for (; d < j; d++) h += k, c[d].offset = h + "%" + } + return c + }), bT = a._tear = function (a, b) { + a == b.top && (b.top = a.prev), a == b.bottom && (b.bottom = a.next), a.next && (a.next.prev = a.prev), a.prev && (a.prev.next = a.next) + }, bU = a._tofront = function (a, b) { + b.top !== a && (bT(a, b), a.next = null, a.prev = b.top, b.top.next = a, b.top = a) + }, bV = a._toback = function (a, b) { + b.bottom !== a && (bT(a, b), a.next = b.bottom, a.prev = null, b.bottom.prev = a, b.bottom = a) + }, bW = a._insertafter = function (a, b, c) { + bT(a, c), b == c.top && (c.top = a), b.next && (b.next.prev = a), a.next = b.next, a.prev = b, b.next = a + }, bX = a._insertbefore = function (a, b, c) { + bT(a, c), b == c.bottom && (c.bottom = a), b.prev && (b.prev.next = a), a.prev = b.prev, b.prev = a, a.next = b + }, bY = a.toMatrix = function (a, b) { + var c = bI(a), d = { + _: {transform: p}, getBBox: function () { + return c + } + }; + b$(d, b); + return d.matrix + }, bZ = a.transformPath = function (a, b) { + return bj(a, bY(a, b)) + }, b$ = a._extractTransform = function (b, c) { + if (c == null) return b._.transform; + c = r(c).replace(/\.{3}|\u2026/g, b._.transform || p); + var d = a.parseTransformString(c), e = 0, f = 0, g = 0, h = 1, i = 1, j = b._, k = new cb; + j.transform = d || []; + if (d) for (var l = 0, m = d.length; l < m; l++) { + var n = d[l], o = n.length, q = r(n[0]).toLowerCase(), s = n[0] != q, t = s ? k.invert() : 0, u, v, w, x, y; + q == "t" && o == 3 ? s ? (u = t.x(0, 0), v = t.y(0, 0), w = t.x(n[1], n[2]), x = t.y(n[1], n[2]), k.translate(w - u, x - v)) : k.translate(n[1], n[2]) : q == "r" ? o == 2 ? (y = y || b.getBBox(1), k.rotate(n[1], y.x + y.width / 2, y.y + y.height / 2), e += n[1]) : o == 4 && (s ? (w = t.x(n[2], n[3]), x = t.y(n[2], n[3]), k.rotate(n[1], w, x)) : k.rotate(n[1], n[2], n[3]), e += n[1]) : q == "s" ? o == 2 || o == 3 ? (y = y || b.getBBox(1), k.scale(n[1], n[o - 1], y.x + y.width / 2, y.y + y.height / 2), h *= n[1], i *= n[o - 1]) : o == 5 && (s ? (w = t.x(n[3], n[4]), x = t.y(n[3], n[4]), k.scale(n[1], n[2], w, x)) : k.scale(n[1], n[2], n[3], n[4]), h *= n[1], i *= n[2]) : q == "m" && o == 7 && k.add(n[1], n[2], n[3], n[4], n[5], n[6]), j.dirtyT = 1, b.matrix = k + } + b.matrix = k, j.sx = h, j.sy = i, j.deg = e, j.dx = f = k.e, j.dy = g = k.f, h == 1 && i == 1 && !e && j.bbox ? (j.bbox.x += +f, j.bbox.y += +g) : j.dirtyT = 1 + }, b_ = function (a) { + var b = a[0]; + switch (b.toLowerCase()) { + case"t": + return [b, 0, 0]; + case"m": + return [b, 1, 0, 0, 1, 0, 0]; + case"r": + return a.length == 4 ? [b, 0, a[2], a[3]] : [b, 0]; + case"s": + return a.length == 5 ? [b, 1, 1, a[3], a[4]] : a.length == 3 ? [b, 1, 1] : [b, 1] + } + }, ca = a._equaliseTransform = function (b, c) { + c = r(c).replace(/\.{3}|\u2026/g, b), b = a.parseTransformString(b) || [], c = a.parseTransformString(c) || []; + var d = x(b.length, c.length), e = [], f = [], g = 0, h, i, j, k; + for (; g < d; g++) { + j = b[g] || b_(c[g]), k = c[g] || b_(j); + if (j[0] != k[0] || j[0].toLowerCase() == "r" && (j[2] != k[2] || j[3] != k[3]) || j[0].toLowerCase() == "s" && (j[3] != k[3] || j[4] != k[4])) return; + e[g] = [], f[g] = []; + for (h = 0, i = x(j.length, k.length); h < i; h++) h in j && (e[g][h] = j[h]), h in k && (f[g][h] = k[h]) + } + return {from: e, to: f} + }; + a._getContainer = function (b, c, d, e) { + var f; + f = e == null && !a.is(b, "object") ? h.doc.getElementById(b) : b; + if (f != null) { + if (f.tagName) return c == null ? { + container: f, + width: f.style.pixelWidth || f.offsetWidth, + height: f.style.pixelHeight || f.offsetHeight + } : {container: f, width: c, height: d}; + return {container: 1, x: b, y: c, width: d, height: e} + } + }, a.pathToRelative = bK, a._engine = {}, a.path2curve = bR, a.matrix = function (a, b, c, d, e, f) { + return new cb(a, b, c, d, e, f) + }, function (b) { + function d(a) { + var b = w.sqrt(c(a)); + a[0] && (a[0] /= b), a[1] && (a[1] /= b) + } + + function c(a) { + return a[0] * a[0] + a[1] * a[1] + } + + b.add = function (a, b, c, d, e, f) { + var g = [[], [], []], h = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], + i = [[a, c, e], [b, d, f], [0, 0, 1]], j, k, l, m; + a && a instanceof cb && (i = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]); + for (j = 0; j < 3; j++) for (k = 0; k < 3; k++) { + m = 0; + for (l = 0; l < 3; l++) m += h[j][l] * i[l][k]; + g[j][k] = m + } + this.a = g[0][0], this.b = g[1][0], this.c = g[0][1], this.d = g[1][1], this.e = g[0][2], this.f = g[1][2] + }, b.invert = function () { + var a = this, b = a.a * a.d - a.b * a.c; + return new cb(a.d / b, -a.b / b, -a.c / b, a.a / b, (a.c * a.f - a.d * a.e) / b, (a.b * a.e - a.a * a.f) / b) + }, b.clone = function () { + return new cb(this.a, this.b, this.c, this.d, this.e, this.f) + }, b.translate = function (a, b) { + this.add(1, 0, 0, 1, a, b) + }, b.scale = function (a, b, c, d) { + b == null && (b = a), (c || d) && this.add(1, 0, 0, 1, c, d), this.add(a, 0, 0, b, 0, 0), (c || d) && this.add(1, 0, 0, 1, -c, -d) + }, b.rotate = function (b, c, d) { + b = a.rad(b), c = c || 0, d = d || 0; + var e = +w.cos(b).toFixed(9), f = +w.sin(b).toFixed(9); + this.add(e, f, -f, e, c, d), this.add(1, 0, 0, 1, -c, -d) + }, b.x = function (a, b) { + return a * this.a + b * this.c + this.e + }, b.y = function (a, b) { + return a * this.b + b * this.d + this.f + }, b.get = function (a) { + return +this[r.fromCharCode(97 + a)].toFixed(4) + }, b.toString = function () { + return a.svg ? "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join() + }, b.toFilter = function () { + return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')" + }, b.offset = function () { + return [this.e.toFixed(4), this.f.toFixed(4)] + }, b.split = function () { + var b = {}; + b.dx = this.e, b.dy = this.f; + var e = [[this.a, this.c], [this.b, this.d]]; + b.scalex = w.sqrt(c(e[0])), d(e[0]), b.shear = e[0][0] * e[1][0] + e[0][1] * e[1][1], e[1] = [e[1][0] - e[0][0] * b.shear, e[1][1] - e[0][1] * b.shear], b.scaley = w.sqrt(c(e[1])), d(e[1]), b.shear /= b.scaley; + var f = -e[0][1], g = e[1][1]; + g < 0 ? (b.rotate = a.deg(w.acos(g)), f < 0 && (b.rotate = 360 - b.rotate)) : b.rotate = a.deg(w.asin(f)), b.isSimple = !+b.shear.toFixed(9) && (b.scalex.toFixed(9) == b.scaley.toFixed(9) || !b.rotate), b.isSuperSimple = !+b.shear.toFixed(9) && b.scalex.toFixed(9) == b.scaley.toFixed(9) && !b.rotate, b.noRotation = !+b.shear.toFixed(9) && !b.rotate; + return b + }, b.toTransformString = function (a) { + var b = a || this[s](); + if (b.isSimple) { + b.scalex = +b.scalex.toFixed(4), b.scaley = +b.scaley.toFixed(4), b.rotate = +b.rotate.toFixed(4); + return (b.dx || b.dy ? "t" + [b.dx, b.dy] : p) + (b.scalex != 1 || b.scaley != 1 ? "s" + [b.scalex, b.scaley, 0, 0] : p) + (b.rotate ? "r" + [b.rotate, 0, 0] : p) + } + return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)] + } + }(cb.prototype); + var cc = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/); + navigator.vendor == "Apple Computer, Inc." && (cc && cc[1] < 4 || navigator.platform.slice(0, 2) == "iP") || navigator.vendor == "Google Inc." && cc && cc[1] < 8 ? k.safari = function () { + var a = this.rect(-99, -99, this.width + 99, this.height + 99).attr({stroke: "none"}); + setTimeout(function () { + a.remove() + }) + } : k.safari = be; + var cd = function () { + this.returnValue = !1 + }, ce = function () { + return this.originalEvent.preventDefault() + }, cf = function () { + this.cancelBubble = !0 + }, cg = function () { + return this.originalEvent.stopPropagation() + }, ch = function () { + if (h.doc.addEventListener) return function (a, b, c, d) { + var e = o && u[b] ? u[b] : b, f = function (e) { + var f = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, + i = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft, j = e.clientX + i, k = e.clientY + f; + if (o && u[g](b)) for (var l = 0, m = e.targetTouches && e.targetTouches.length; l < m; l++) if (e.targetTouches[l].target == a) { + var n = e; + e = e.targetTouches[l], e.originalEvent = n, e.preventDefault = ce, e.stopPropagation = cg; + break + } + return c.call(d, e, j, k) + }; + a.addEventListener(e, f, !1); + return function () { + a.removeEventListener(e, f, !1); + return !0 + } + }; + if (h.doc.attachEvent) return function (a, b, c, d) { + var e = function (a) { + a = a || h.win.event; + var b = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, + e = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft, f = a.clientX + e, g = a.clientY + b; + a.preventDefault = a.preventDefault || cd, a.stopPropagation = a.stopPropagation || cf; + return c.call(d, a, f, g) + }; + a.attachEvent("on" + b, e); + var f = function () { + a.detachEvent("on" + b, e); + return !0 + }; + return f + } + }(), ci = [], cj = function (a) { + var b = a.clientX, c = a.clientY, d = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, + e = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft, f, g = ci.length; + while (g--) { + f = ci[g]; + if (o) { + var i = a.touches.length, j; + while (i--) { + j = a.touches[i]; + if (j.identifier == f.el._drag.id) { + b = j.clientX, c = j.clientY, (a.originalEvent ? a.originalEvent : a).preventDefault(); + break + } + } + } else a.preventDefault(); + var k = f.el.node, l, m = k.nextSibling, n = k.parentNode, p = k.style.display; + h.win.opera && n.removeChild(k), k.style.display = "none", l = f.el.paper.getElementByPoint(b, c), k.style.display = p, h.win.opera && (m ? n.insertBefore(k, m) : n.appendChild(k)), l && eve("raphael.drag.over." + f.el.id, f.el, l), b += e, c += d, eve("raphael.drag.move." + f.el.id, f.move_scope || f.el, b - f.el._drag.x, c - f.el._drag.y, b, c, a) + } + }, ck = function (b) { + a.unmousemove(cj).unmouseup(ck); + var c = ci.length, d; + while (c--) d = ci[c], d.el._drag = {}, eve("raphael.drag.end." + d.el.id, d.end_scope || d.start_scope || d.move_scope || d.el, b); + ci = [] + }, cl = a.el = {}; + for (var cm = t.length; cm--;) (function (b) { + a[b] = cl[b] = function (c, d) { + a.is(c, "function") && (this.events = this.events || [], this.events.push({ + name: b, + f: c, + unbind: ch(this.shape || this.node || h.doc, b, c, d || this) + })); + return this + }, a["un" + b] = cl["un" + b] = function (a) { + var c = this.events || [], d = c.length; + while (d--) if (c[d].name == b && c[d].f == a) { + c[d].unbind(), c.splice(d, 1), !c.length && delete this.events; + return this + } + return this + } + })(t[cm]); + cl.data = function (b, c) { + var d = bb[this.id] = bb[this.id] || {}; + if (arguments.length == 1) { + if (a.is(b, "object")) { + for (var e in b) b[g](e) && this.data(e, b[e]); + return this + } + eve("raphael.data.get." + this.id, this, d[b], b); + return d[b] + } + d[b] = c, eve("raphael.data.set." + this.id, this, c, b); + return this + }, cl.removeData = function (a) { + a == null ? bb[this.id] = {} : bb[this.id] && delete bb[this.id][a]; + return this + }, cl.hover = function (a, b, c, d) { + return this.mouseover(a, c).mouseout(b, d || c) + }, cl.unhover = function (a, b) { + return this.unmouseover(a).unmouseout(b) + }; + var cn = []; + cl.drag = function (b, c, d, e, f, g) { + function i(i) { + (i.originalEvent || i).preventDefault(); + var j = h.doc.documentElement.scrollTop || h.doc.body.scrollTop, + k = h.doc.documentElement.scrollLeft || h.doc.body.scrollLeft; + this._drag.x = i.clientX + k, this._drag.y = i.clientY + j, this._drag.id = i.identifier, !ci.length && a.mousemove(cj).mouseup(ck), ci.push({ + el: this, + move_scope: e, + start_scope: f, + end_scope: g + }), c && eve.on("raphael.drag.start." + this.id, c), b && eve.on("raphael.drag.move." + this.id, b), d && eve.on("raphael.drag.end." + this.id, d), eve("raphael.drag.start." + this.id, f || e || this, i.clientX + k, i.clientY + j, i) + } + + this._drag = {}, cn.push({el: this, start: i}), this.mousedown(i); + return this + }, cl.onDragOver = function (a) { + a ? eve.on("raphael.drag.over." + this.id, a) : eve.unbind("raphael.drag.over." + this.id) + }, cl.undrag = function () { + var b = cn.length; + while (b--) cn[b].el == this && (this.unmousedown(cn[b].start), cn.splice(b, 1), eve.unbind("raphael.drag.*." + this.id)); + !cn.length && a.unmousemove(cj).unmouseup(ck) + }, k.circle = function (b, c, d) { + var e = a._engine.circle(this, b || 0, c || 0, d || 0); + this.__set__ && this.__set__.push(e); + return e + }, k.rect = function (b, c, d, e, f) { + var g = a._engine.rect(this, b || 0, c || 0, d || 0, e || 0, f || 0); + this.__set__ && this.__set__.push(g); + return g + }, k.ellipse = function (b, c, d, e) { + var f = a._engine.ellipse(this, b || 0, c || 0, d || 0, e || 0); + this.__set__ && this.__set__.push(f); + return f + }, k.path = function (b) { + b && !a.is(b, D) && !a.is(b[0], E) && (b += p); + var c = a._engine.path(a.format[m](a, arguments), this); + this.__set__ && this.__set__.push(c); + return c + }, k.image = function (b, c, d, e, f) { + var g = a._engine.image(this, b || "about:blank", c || 0, d || 0, e || 0, f || 0); + this.__set__ && this.__set__.push(g); + return g + }, k.text = function (b, c, d) { + var e = a._engine.text(this, b || 0, c || 0, r(d)); + this.__set__ && this.__set__.push(e); + return e + }, k.set = function (b) { + !a.is(b, "array") && (b = Array.prototype.splice.call(arguments, 0, arguments.length)); + var c = new cG(b); + this.__set__ && this.__set__.push(c); + return c + }, k.setStart = function (a) { + this.__set__ = a || this.set() + }, k.setFinish = function (a) { + var b = this.__set__; + delete this.__set__; + return b + }, k.setSize = function (b, c) { + return a._engine.setSize.call(this, b, c) + }, k.setViewBox = function (b, c, d, e, f) { + return a._engine.setViewBox.call(this, b, c, d, e, f) + }, k.top = k.bottom = null, k.raphael = a; + var co = function (a) { + var b = a.getBoundingClientRect(), c = a.ownerDocument, d = c.body, e = c.documentElement, + f = e.clientTop || d.clientTop || 0, g = e.clientLeft || d.clientLeft || 0, + i = b.top + (h.win.pageYOffset || e.scrollTop || d.scrollTop) - f, + j = b.left + (h.win.pageXOffset || e.scrollLeft || d.scrollLeft) - g; + return {y: i, x: j} + }; + k.getElementByPoint = function (a, b) { + var c = this, d = c.canvas, e = h.doc.elementFromPoint(a, b); + if (h.win.opera && e.tagName == "svg") { + var f = co(d), g = d.createSVGRect(); + g.x = a - f.x, g.y = b - f.y, g.width = g.height = 1; + var i = d.getIntersectionList(g, null); + i.length && (e = i[i.length - 1]) + } + if (!e) return null; + while (e.parentNode && e != d.parentNode && !e.raphael) e = e.parentNode; + e == c.canvas.parentNode && (e = d), e = e && e.raphael ? c.getById(e.raphaelid) : null; + return e + }, k.getById = function (a) { + var b = this.bottom; + while (b) { + if (b.id == a) return b; + b = b.next + } + return null + }, k.forEach = function (a, b) { + var c = this.bottom; + while (c) { + if (a.call(b, c) === !1) return this; + c = c.next + } + return this + }, k.getElementsByPoint = function (a, b) { + var c = this.set(); + this.forEach(function (d) { + d.isPointInside(a, b) && c.push(d) + }); + return c + }, cl.isPointInside = function (b, c) { + var d = this.realPath = this.realPath || bi[this.type](this); + return a.isPointInsidePath(d, b, c) + }, cl.getBBox = function (a) { + if (this.removed) return {}; + var b = this._; + if (a) { + if (b.dirty || !b.bboxwt) this.realPath = bi[this.type](this), b.bboxwt = bI(this.realPath), b.bboxwt.toString = cq, b.dirty = 0; + return bm(b.bboxwt) + } + if (b.dirty || b.dirtyT || !b.bbox) { + if (b.dirty || !this.realPath) b.bboxwt = 0, this.realPath = bi[this.type](this); + b.bbox = bI(bj(this.realPath, this.matrix)), b.bbox.toString = cq, b.dirty = b.dirtyT = 0 + } + return bm(b.bbox) + }, cl.getBBoxWOTransform = function () { + return this.getBBox(1) + }, cl.clone = function () { + if (this.removed) return null; + var a = this.paper[this.type]().attr(this.attr()); + this.__set__ && this.__set__.push(a); + return a + }, cl.glow = function (a) { + if (this.type == "text") return null; + a = a || {}; + var b = { + width: (a.width || 10) + (+this.attr("stroke-width") || 1), + fill: a.fill || !1, + opacity: a.opacity || .5, + offsetx: a.offsetx || 0, + offsety: a.offsety || 0, + color: a.color || "#000" + }, c = b.width / 2, d = this.paper, e = d.set(), f = this.realPath || bi[this.type](this); + f = this.matrix ? bj(f, this.matrix) : f; + for (var g = 1; g < c + 1; g++) e.push(d.path(f).attr({ + stroke: b.color, + fill: b.fill ? b.color : "none", + "stroke-linejoin": "round", + "stroke-linecap": "round", + "stroke-width": +(b.width / c * g).toFixed(3), + opacity: +(b.opacity / c).toFixed(3) + })); + return e.insertBefore(this).translate(b.offsetx, b.offsety) + }; + var cr = {}, cs = function (b, c, d, e, f, g, h, i, j) { + return j == null ? bB(b, c, d, e, f, g, h, i) : a.findDotsAtSegment(b, c, d, e, f, g, h, i, bC(b, c, d, e, f, g, h, i, j)) + }, ct = function (b, c) { + return function (d, e, f) { + d = bR(d); + var g, h, i, j, k = "", l = {}, m, n = 0; + for (var o = 0, p = d.length; o < p; o++) { + i = d[o]; + if (i[0] == "M") g = +i[1], h = +i[2]; else { + j = cs(g, h, i[1], i[2], i[3], i[4], i[5], i[6]); + if (n + j > e) { + if (c && !l.start) { + m = cs(g, h, i[1], i[2], i[3], i[4], i[5], i[6], e - n), k += ["C" + m.start.x, m.start.y, m.m.x, m.m.y, m.x, m.y]; + if (f) return k; + l.start = k, k = ["M" + m.x, m.y + "C" + m.n.x, m.n.y, m.end.x, m.end.y, i[5], i[6]].join(), n += j, g = +i[5], h = +i[6]; + continue + } + if (!b && !c) { + m = cs(g, h, i[1], i[2], i[3], i[4], i[5], i[6], e - n); + return {x: m.x, y: m.y, alpha: m.alpha} + } + } + n += j, g = +i[5], h = +i[6] + } + k += i.shift() + i + } + l.end = k, m = b ? n : c ? l : a.findDotsAtSegment(g, h, i[0], i[1], i[2], i[3], i[4], i[5], 1), m.alpha && (m = { + x: m.x, + y: m.y, + alpha: m.alpha + }); + return m + } + }, cu = ct(1), cv = ct(), cw = ct(0, 1); + a.getTotalLength = cu, a.getPointAtLength = cv, a.getSubpath = function (a, b, c) { + if (this.getTotalLength(a) - c < 1e-6) return cw(a, b).end; + var d = cw(a, c, 1); + return b ? cw(d, b).end : d + }, cl.getTotalLength = function () { + if (this.type == "path") { + if (this.node.getTotalLength) return this.node.getTotalLength(); + return cu(this.attrs.path) + } + }, cl.getPointAtLength = function (a) { + if (this.type == "path") return cv(this.attrs.path, a) + }, cl.getSubpath = function (b, c) { + if (this.type == "path") return a.getSubpath(this.attrs.path, b, c) + }; + var cx = a.easing_formulas = { + linear: function (a) { + return a + }, "<": function (a) { + return A(a, 1.7) + }, ">": function (a) { + return A(a, .48) + }, "<>": function (a) { + var b = .48 - a / 1.04, c = w.sqrt(.1734 + b * b), d = c - b, e = A(z(d), 1 / 3) * (d < 0 ? -1 : 1), + f = -c - b, g = A(z(f), 1 / 3) * (f < 0 ? -1 : 1), h = e + g + .5; + return (1 - h) * 3 * h * h + h * h * h + }, backIn: function (a) { + var b = 1.70158; + return a * a * ((b + 1) * a - b) + }, backOut: function (a) { + a = a - 1; + var b = 1.70158; + return a * a * ((b + 1) * a + b) + 1 + }, elastic: function (a) { + if (a == !!a) return a; + return A(2, -10 * a) * w.sin((a - .075) * 2 * B / .3) + 1 + }, bounce: function (a) { + var b = 7.5625, c = 2.75, d; + a < 1 / c ? d = b * a * a : a < 2 / c ? (a -= 1.5 / c, d = b * a * a + .75) : a < 2.5 / c ? (a -= 2.25 / c, d = b * a * a + .9375) : (a -= 2.625 / c, d = b * a * a + .984375); + return d + } + }; + cx.easeIn = cx["ease-in"] = cx["<"], cx.easeOut = cx["ease-out"] = cx[">"], cx.easeInOut = cx["ease-in-out"] = cx["<>"], cx["back-in"] = cx.backIn, cx["back-out"] = cx.backOut; + var cy = [], + cz = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { + setTimeout(a, 16) + }, cA = function () { + var b = +(new Date), c = 0; + for (; c < cy.length; c++) { + var d = cy[c]; + if (d.el.removed || d.paused) continue; + var e = b - d.start, f = d.ms, h = d.easing, i = d.from, j = d.diff, k = d.to, l = d.t, m = d.el, o = {}, p, + r = {}, s; + d.initstatus ? (e = (d.initstatus * d.anim.top - d.prev) / (d.percent - d.prev) * f, d.status = d.initstatus, delete d.initstatus, d.stop && cy.splice(c--, 1)) : d.status = (d.prev + (d.percent - d.prev) * (e / f)) / d.anim.top; + if (e < 0) continue; + if (e < f) { + var t = h(e / f); + for (var u in i) if (i[g](u)) { + switch (U[u]) { + case C: + p = +i[u] + t * f * j[u]; + break; + case"colour": + p = "rgb(" + [cB(O(i[u].r + t * f * j[u].r)), cB(O(i[u].g + t * f * j[u].g)), cB(O(i[u].b + t * f * j[u].b))].join(",") + ")"; + break; + case"path": + p = []; + for (var v = 0, w = i[u].length; v < w; v++) { + p[v] = [i[u][v][0]]; + for (var x = 1, y = i[u][v].length; x < y; x++) p[v][x] = +i[u][v][x] + t * f * j[u][v][x]; + p[v] = p[v].join(q) + } + p = p.join(q); + break; + case"transform": + if (j[u].real) { + p = []; + for (v = 0, w = i[u].length; v < w; v++) { + p[v] = [i[u][v][0]]; + for (x = 1, y = i[u][v].length; x < y; x++) p[v][x] = i[u][v][x] + t * f * j[u][v][x] + } + } else { + var z = function (a) { + return +i[u][a] + t * f * j[u][a] + }; + p = [["m", z(0), z(1), z(2), z(3), z(4), z(5)]] + } + break; + case"csv": + if (u == "clip-rect") { + p = [], v = 4; + while (v--) p[v] = +i[u][v] + t * f * j[u][v] + } + break; + default: + var A = [][n](i[u]); + p = [], v = m.paper.customAttributes[u].length; + while (v--) p[v] = +A[v] + t * f * j[u][v] + } + o[u] = p + } + m.attr(o), function (a, b, c) { + setTimeout(function () { + eve("raphael.anim.frame." + a, b, c) + }) + }(m.id, m, d.anim) + } else { + (function (b, c, d) { + setTimeout(function () { + eve("raphael.anim.frame." + c.id, c, d), eve("raphael.anim.finish." + c.id, c, d), a.is(b, "function") && b.call(c) + }) + })(d.callback, m, d.anim), m.attr(k), cy.splice(c--, 1); + if (d.repeat > 1 && !d.next) { + for (s in k) k[g](s) && (r[s] = d.totalOrigin[s]); + d.el.attr(r), cE(d.anim, d.el, d.anim.percents[0], null, d.totalOrigin, d.repeat - 1) + } + d.next && !d.stop && cE(d.anim, d.el, d.next, null, d.totalOrigin, d.repeat) + } + } + a.svg && m && m.paper && m.paper.safari(), cy.length && cz(cA) + }, cB = function (a) { + return a > 255 ? 255 : a < 0 ? 0 : a + }; + cl.animateWith = function (b, c, d, e, f, g) { + var h = this; + if (h.removed) { + g && g.call(h); + return h + } + var i = d instanceof cD ? d : a.animation(d, e, f, g), j, k; + cE(i, h, i.percents[0], null, h.attr()); + for (var l = 0, m = cy.length; l < m; l++) if (cy[l].anim == c && cy[l].el == b) { + cy[m - 1].start = cy[l].start; + break + } + return h + }, cl.onAnimation = function (a) { + a ? eve.on("raphael.anim.frame." + this.id, a) : eve.unbind("raphael.anim.frame." + this.id); + return this + }, cD.prototype.delay = function (a) { + var b = new cD(this.anim, this.ms); + b.times = this.times, b.del = +a || 0; + return b + }, cD.prototype.repeat = function (a) { + var b = new cD(this.anim, this.ms); + b.del = this.del, b.times = w.floor(x(a, 0)) || 1; + return b + }, a.animation = function (b, c, d, e) { + if (b instanceof cD) return b; + if (a.is(d, "function") || !d) e = e || d || null, d = null; + b = Object(b), c = +c || 0; + var f = {}, h, i; + for (i in b) b[g](i) && Q(i) != i && Q(i) + "%" != i && (h = !0, f[i] = b[i]); + if (!h) return new cD(b, c); + d && (f.easing = d), e && (f.callback = e); + return new cD({100: f}, c) + }, cl.animate = function (b, c, d, e) { + var f = this; + if (f.removed) { + e && e.call(f); + return f + } + var g = b instanceof cD ? b : a.animation(b, c, d, e); + cE(g, f, g.percents[0], null, f.attr()); + return f + }, cl.setTime = function (a, b) { + a && b != null && this.status(a, y(b, a.ms) / a.ms); + return this + }, cl.status = function (a, b) { + var c = [], d = 0, e, f; + if (b != null) { + cE(a, this, -1, y(b, 1)); + return this + } + e = cy.length; + for (; d < e; d++) { + f = cy[d]; + if (f.el.id == this.id && (!a || f.anim == a)) { + if (a) return f.status; + c.push({anim: f.anim, status: f.status}) + } + } + if (a) return 0; + return c + }, cl.pause = function (a) { + for (var b = 0; b < cy.length; b++) cy[b].el.id == this.id && (!a || cy[b].anim == a) && eve("raphael.anim.pause." + this.id, this, cy[b].anim) !== !1 && (cy[b].paused = !0); + return this + }, cl.resume = function (a) { + for (var b = 0; b < cy.length; b++) if (cy[b].el.id == this.id && (!a || cy[b].anim == a)) { + var c = cy[b]; + eve("raphael.anim.resume." + this.id, this, c.anim) !== !1 && (delete c.paused, this.status(c.anim, c.status)) + } + return this + }, cl.stop = function (a) { + for (var b = 0; b < cy.length; b++) cy[b].el.id == this.id && (!a || cy[b].anim == a) && eve("raphael.anim.stop." + this.id, this, cy[b].anim) !== !1 && cy.splice(b--, 1); + return this + }, eve.on("raphael.remove", cF), eve.on("raphael.clear", cF), cl.toString = function () { + return "Raphaël’s object" + }; + var cG = function (a) { + this.items = [], this.length = 0, this.type = "set"; + if (a) for (var b = 0, c = a.length; b < c; b++) a[b] && (a[b].constructor == cl.constructor || a[b].constructor == cG) && (this[this.items.length] = this.items[this.items.length] = a[b], this.length++) + }, cH = cG.prototype; + cH.push = function () { + var a, b; + for (var c = 0, d = arguments.length; c < d; c++) a = arguments[c], a && (a.constructor == cl.constructor || a.constructor == cG) && (b = this.items.length, this[b] = this.items[b] = a, this.length++); + return this + }, cH.pop = function () { + this.length && delete this[this.length--]; + return this.items.pop() + }, cH.forEach = function (a, b) { + for (var c = 0, d = this.items.length; c < d; c++) if (a.call(b, this.items[c], c) === !1) return this; + return this + }; + for (var cI in cl) cl[g](cI) && (cH[cI] = function (a) { + return function () { + var b = arguments; + return this.forEach(function (c) { + c[a][m](c, b) + }) + } + }(cI)); + cH.attr = function (b, c) { + if (b && a.is(b, E) && a.is(b[0], "object")) for (var d = 0, e = b.length; d < e; d++) this.items[d].attr(b[d]); else for (var f = 0, g = this.items.length; f < g; f++) this.items[f].attr(b, c); + return this + }, cH.clear = function () { + while (this.length) this.pop() + }, cH.splice = function (a, b, c) { + a = a < 0 ? x(this.length + a, 0) : a, b = x(0, y(this.length - a, b)); + var d = [], e = [], f = [], g; + for (g = 2; g < arguments.length; g++) f.push(arguments[g]); + for (g = 0; g < b; g++) e.push(this[a + g]); + for (; g < this.length - a; g++) d.push(this[a + g]); + var h = f.length; + for (g = 0; g < h + d.length; g++) this.items[a + g] = this[a + g] = g < h ? f[g] : d[g - h]; + g = this.items.length = this.length -= b - h; + while (this[g]) delete this[g++]; + return new cG(e) + }, cH.exclude = function (a) { + for (var b = 0, c = this.length; b < c; b++) if (this[b] == a) { + this.splice(b, 1); + return !0 + } + }, cH.animate = function (b, c, d, e) { + (a.is(d, "function") || !d) && (e = d || null); + var f = this.items.length, g = f, h, i = this, j; + if (!f) return this; + e && (j = function () { + !--f && e.call(i) + }), d = a.is(d, D) ? d : j; + var k = a.animation(b, c, d, j); + h = this.items[--g].animate(k); + while (g--) this.items[g] && !this.items[g].removed && this.items[g].animateWith(h, k, k); + return this + }, cH.insertAfter = function (a) { + var b = this.items.length; + while (b--) this.items[b].insertAfter(a); + return this + }, cH.getBBox = function () { + var a = [], b = [], c = [], d = []; + for (var e = this.items.length; e--;) if (!this.items[e].removed) { + var f = this.items[e].getBBox(); + a.push(f.x), b.push(f.y), c.push(f.x + f.width), d.push(f.y + f.height) + } + a = y[m](0, a), b = y[m](0, b), c = x[m](0, c), d = x[m](0, d); + return {x: a, y: b, x2: c, y2: d, width: c - a, height: d - b} + }, cH.clone = function (a) { + a = new cG; + for (var b = 0, c = this.items.length; b < c; b++) a.push(this.items[b].clone()); + return a + }, cH.toString = function () { + return "Raphaël‘s set" + }, a.registerFont = function (a) { + if (!a.face) return a; + this.fonts = this.fonts || {}; + var b = {w: a.w, face: {}, glyphs: {}}, c = a.face["font-family"]; + for (var d in a.face) a.face[g](d) && (b.face[d] = a.face[d]); + this.fonts[c] ? this.fonts[c].push(b) : this.fonts[c] = [b]; + if (!a.svg) { + b.face["units-per-em"] = R(a.face["units-per-em"], 10); + for (var e in a.glyphs) if (a.glyphs[g](e)) { + var f = a.glyphs[e]; + b.glyphs[e] = { + w: f.w, k: {}, d: f.d && "M" + f.d.replace(/[mlcxtrv]/g, function (a) { + return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[a] || "M" + }) + "z" + }; + if (f.k) for (var h in f.k) f[g](h) && (b.glyphs[e].k[h] = f.k[h]) + } + } + return a + }, k.getFont = function (b, c, d, e) { + e = e || "normal", d = d || "normal", c = +c || {normal: 400, bold: 700, lighter: 300, bolder: 800}[c] || 400; + if (!!a.fonts) { + var f = a.fonts[b]; + if (!f) { + var h = new RegExp("(^|\\s)" + b.replace(/[^\w\d\s+!~.:_-]/g, p) + "(\\s|$)", "i"); + for (var i in a.fonts) if (a.fonts[g](i) && h.test(i)) { + f = a.fonts[i]; + break + } + } + var j; + if (f) for (var k = 0, l = f.length; k < l; k++) { + j = f[k]; + if (j.face["font-weight"] == c && (j.face["font-style"] == d || !j.face["font-style"]) && j.face["font-stretch"] == e) break + } + return j + } + }, k.print = function (b, d, e, f, g, h, i) { + h = h || "middle", i = x(y(i || 0, 1), -1); + var j = r(e)[s](p), k = 0, l = 0, m = p, n; + a.is(f, e) && (f = this.getFont(f)); + if (f) { + n = (g || 16) / f.face["units-per-em"]; + var o = f.face.bbox[s](c), q = +o[0], t = o[3] - o[1], u = 0, + v = +o[1] + (h == "baseline" ? t + +f.face.descent : t / 2); + for (var w = 0, z = j.length; w < z; w++) { + if (j[w] == "\n") k = 0, B = 0, l = 0, u += t; else { + var A = l && f.glyphs[j[w - 1]] || {}, B = f.glyphs[j[w]]; + k += l ? (A.w || f.w) + (A.k && A.k[j[w]] || 0) + f.w * i : 0, l = 1 + } + B && B.d && (m += a.transformPath(B.d, ["t", k * n, u * n, "s", n, n, q, v, "t", (b - q) / n, (d - v) / n])) + } + } + return this.path(m).attr({fill: "#000", stroke: "none"}) + }, k.add = function (b) { + if (a.is(b, "array")) { + var c = this.set(), e = 0, f = b.length, h; + for (; e < f; e++) h = b[e] || {}, d[g](h.type) && c.push(this[h.type]().attr(h)) + } + return c + }, a.format = function (b, c) { + var d = a.is(c, E) ? [0][n](c) : arguments; + b && a.is(b, D) && d.length - 1 && (b = b.replace(e, function (a, b) { + return d[++b] == null ? p : d[b] + })); + return b || p + }, a.fullfill = function () { + var a = /\{([^\}]+)\}/g, b = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, + c = function (a, c, d) { + var e = d; + c.replace(b, function (a, b, c, d, f) { + b = b || d, e && (b in e && (e = e[b]), typeof e == "function" && f && (e = e())) + }), e = (e == null || e == d ? a : e) + ""; + return e + }; + return function (b, d) { + return String(b).replace(a, function (a, b) { + return c(a, b, d) + }) + } + }(), a.ninja = function () { + i.was ? h.win.Raphael = i.is : delete Raphael; + return a + }, a.st = cH, function (b, c, d) { + function e() { + /in/.test(b.readyState) ? setTimeout(e, 9) : a.eve("raphael.DOMload") + } + + b.readyState == null && b.addEventListener && (b.addEventListener(c, d = function () { + b.removeEventListener(c, d, !1), b.readyState = "complete" + }, !1), b.readyState = "loading"), e() + }(document, "DOMContentLoaded"), i.was ? h.win.Raphael = a : Raphael = a, eve.on("raphael.DOMload", function () { + b = !0 + }) +}(), window.Raphael.svg && function (a) { + var b = "hasOwnProperty", c = String, d = parseFloat, e = parseInt, f = Math, g = f.max, h = f.abs, i = f.pow, + j = /[, ]+/, k = a.eve, l = "", m = " ", n = "http://www.w3.org/1999/xlink", o = { + block: "M5,0 0,2.5 5,5z", + classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", + diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", + open: "M6,1 1,3.5 6,6", + oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" + }, p = {}; + a.toString = function () { + return "Your browser supports SVG.\nYou are running Raphaël " + this.version + }; + var q = function (d, e) { + if (e) { + typeof d == "string" && (d = q(d)); + for (var f in e) e[b](f) && (f.substring(0, 6) == "xlink:" ? d.setAttributeNS(n, f.substring(6), c(e[f])) : d.setAttribute(f, c(e[f]))) + } else d = a._g.doc.createElementNS("http://www.w3.org/2000/svg", d), d.style && (d.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); + return d + }, r = function (b, e) { + var j = "linear", k = b.id + e, m = .5, n = .5, o = b.node, p = b.paper, r = o.style, + s = a._g.doc.getElementById(k); + if (!s) { + e = c(e).replace(a._radial_gradient, function (a, b, c) { + j = "radial"; + if (b && c) { + m = d(b), n = d(c); + var e = (n > .5) * 2 - 1; + i(m - .5, 2) + i(n - .5, 2) > .25 && (n = f.sqrt(.25 - i(m - .5, 2)) * e + .5) && n != .5 && (n = n.toFixed(5) - 1e-5 * e) + } + return l + }), e = e.split(/\s*\-\s*/); + if (j == "linear") { + var t = e.shift(); + t = -d(t); + if (isNaN(t)) return null; + var u = [0, 0, f.cos(a.rad(t)), f.sin(a.rad(t))], v = 1 / (g(h(u[2]), h(u[3])) || 1); + u[2] *= v, u[3] *= v, u[2] < 0 && (u[0] = -u[2], u[2] = 0), u[3] < 0 && (u[1] = -u[3], u[3] = 0) + } + var w = a._parseDots(e); + if (!w) return null; + k = k.replace(/[\(\)\s,\xb0#]/g, "_"), b.gradient && k != b.gradient.id && (p.defs.removeChild(b.gradient), delete b.gradient); + if (!b.gradient) { + s = q(j + "Gradient", {id: k}), b.gradient = s, q(s, j == "radial" ? {fx: m, fy: n} : { + x1: u[0], + y1: u[1], + x2: u[2], + y2: u[3], + gradientTransform: b.matrix.invert() + }), p.defs.appendChild(s); + for (var x = 0, y = w.length; x < y; x++) s.appendChild(q("stop", { + offset: w[x].offset ? w[x].offset : x ? "100%" : "0%", + "stop-color": w[x].color || "#fff" + })) + } + } + q(o, {fill: "url(#" + k + ")", opacity: 1, "fill-opacity": 1}), r.fill = l, r.opacity = 1, r.fillOpacity = 1; + return 1 + }, s = function (a) { + var b = a.getBBox(1); + q(a.pattern, {patternTransform: a.matrix.invert() + " translate(" + b.x + "," + b.y + ")"}) + }, t = function (d, e, f) { + if (d.type == "path") { + var g = c(e).toLowerCase().split("-"), h = d.paper, i = f ? "end" : "start", j = d.node, k = d.attrs, + m = k["stroke-width"], n = g.length, r = "classic", s, t, u, v, w, x = 3, y = 3, z = 5; + while (n--) switch (g[n]) { + case"block": + case"classic": + case"oval": + case"diamond": + case"open": + case"none": + r = g[n]; + break; + case"wide": + y = 5; + break; + case"narrow": + y = 2; + break; + case"long": + x = 5; + break; + case"short": + x = 2 + } + r == "open" ? (x += 2, y += 2, z += 2, u = 1, v = f ? 4 : 1, w = { + fill: "none", + stroke: k.stroke + }) : (v = u = x / 2, w = { + fill: k.stroke, + stroke: "none" + }), d._.arrows ? f ? (d._.arrows.endPath && p[d._.arrows.endPath]--, d._.arrows.endMarker && p[d._.arrows.endMarker]--) : (d._.arrows.startPath && p[d._.arrows.startPath]--, d._.arrows.startMarker && p[d._.arrows.startMarker]--) : d._.arrows = {}; + if (r != "none") { + var A = "raphael-marker-" + r, B = "raphael-marker-" + i + r + x + y; + a._g.doc.getElementById(A) ? p[A]++ : (h.defs.appendChild(q(q("path"), { + "stroke-linecap": "round", + d: o[r], + id: A + })), p[A] = 1); + var C = a._g.doc.getElementById(B), D; + C ? (p[B]++, D = C.getElementsByTagName("use")[0]) : (C = q(q("marker"), { + id: B, + markerHeight: y, + markerWidth: x, + orient: "auto", + refX: v, + refY: y / 2 + }), D = q(q("use"), { + "xlink:href": "#" + A, + transform: (f ? "rotate(180 " + x / 2 + " " + y / 2 + ") " : l) + "scale(" + x / z + "," + y / z + ")", + "stroke-width": (1 / ((x / z + y / z) / 2)).toFixed(4) + }), C.appendChild(D), h.defs.appendChild(C), p[B] = 1), q(D, w); + var F = u * (r != "diamond" && r != "oval"); + f ? (s = d._.arrows.startdx * m || 0, t = a.getTotalLength(k.path) - F * m) : (s = F * m, t = a.getTotalLength(k.path) - (d._.arrows.enddx * m || 0)), w = {}, w["marker-" + i] = "url(#" + B + ")"; + if (t || s) w.d = Raphael.getSubpath(k.path, s, t); + q(j, w), d._.arrows[i + "Path"] = A, d._.arrows[i + "Marker"] = B, d._.arrows[i + "dx"] = F, d._.arrows[i + "Type"] = r, d._.arrows[i + "String"] = e + } else f ? (s = d._.arrows.startdx * m || 0, t = a.getTotalLength(k.path) - s) : (s = 0, t = a.getTotalLength(k.path) - (d._.arrows.enddx * m || 0)), d._.arrows[i + "Path"] && q(j, {d: Raphael.getSubpath(k.path, s, t)}), delete d._.arrows[i + "Path"], delete d._.arrows[i + "Marker"], delete d._.arrows[i + "dx"], delete d._.arrows[i + "Type"], delete d._.arrows[i + "String"]; + for (w in p) if (p[b](w) && !p[w]) { + var G = a._g.doc.getElementById(w); + G && G.parentNode.removeChild(G) + } + } + }, u = { + "": [0], + none: [0], + "-": [3, 1], + ".": [1, 1], + "-.": [3, 1, 1, 1], + "-..": [3, 1, 1, 1, 1, 1], + ". ": [1, 3], + "- ": [4, 3], + "--": [8, 3], + "- .": [4, 3, 1, 3], + "--.": [8, 3, 1, 3], + "--..": [8, 3, 1, 3, 1, 3] + }, v = function (a, b, d) { + b = u[c(b).toLowerCase()]; + if (b) { + var e = a.attrs["stroke-width"] || "1", + f = {round: e, square: e, butt: 0}[a.attrs["stroke-linecap"] || d["stroke-linecap"]] || 0, g = [], + h = b.length; + while (h--) g[h] = b[h] * e + (h % 2 ? 1 : -1) * f; + q(a.node, {"stroke-dasharray": g.join(",")}) + } + }; + k.on("raphael.util.attr.blur", function (a) { + this.blur(a) + }), k.on("raphael.util.attr.cursor", function (a) { + this.node.style.cursor = a + }); + var w = function (d, f) { + var i = d.node, m = d.attrs, o = i.style.visibility; + i.style.visibility = "hidden"; + for (var p in f) { + k("raphael.util.attr." + p, d, f[p]); + if (f[b](p)) { + if (!a._availableAttrs[b](p)) continue; + var u = f[p]; + m[p] = u; + switch (p) { + case"blur": + d.blur(u); + break; + case"href": + case"title": + case"target": + var w = i.parentNode; + if (w.tagName.toLowerCase() != "a") { + var x = q("a"); + w.insertBefore(x, i), x.appendChild(i), w = x + } + p == "target" ? w.setAttributeNS(n, "show", u == "blank" ? "new" : u) : w.setAttributeNS(n, p, u); + break; + case"cursor": + break; + case"transform": + d.transform(u); + break; + case"arrow-start": + t(d, u); + break; + case"arrow-end": + t(d, u, 1); + break; + case"clip-rect": + var z = c(u).split(j); + if (z.length == 4) { + d.clip && d.clip.parentNode.parentNode.removeChild(d.clip.parentNode); + var A = q("clipPath"), B = q("rect"); + A.id = a.createUUID(), q(B, { + x: z[0], + y: z[1], + width: z[2], + height: z[3] + }), A.appendChild(B), d.paper.defs.appendChild(A), q(i, {"clip-path": "url(#" + A.id + ")"}), d.clip = B + } + if (!u) { + var C = i.getAttribute("clip-path"); + if (C) { + var D = a._g.doc.getElementById(C.replace(/(^url\(#|\)$)/g, l)); + D && D.parentNode.removeChild(D), q(i, {"clip-path": l}), delete d.clip + } + } + break; + case"path": + d.type == "path" && (q(i, {d: u ? m.path = a._pathToAbsolute(u) : "M0,0"}), d._.dirty = 1, d._.arrows && ("startString" in d._.arrows && t(d, d._.arrows.startString), "endString" in d._.arrows && t(d, d._.arrows.endString, 1))); + break; + case"width": + i.setAttribute(p, u), d._.dirty = 1; + if (m.fx) p = "x", u = m.x; else break; + case"x": + m.fx && (u = -m.x - (m.width || 0)); + case"rx": + if (p == "rx" && d.type == "rect") break; + case"cx": + i.setAttribute(p, u), d.pattern && s(d), d._.dirty = 1; + break; + case"height": + i.setAttribute(p, u), d._.dirty = 1; + if (m.fy) p = "y", u = m.y; else break; + case"y": + m.fy && (u = -m.y - (m.height || 0)); + case"ry": + if (p == "ry" && d.type == "rect") break; + case"cy": + i.setAttribute(p, u), d.pattern && s(d), d._.dirty = 1; + break; + case"r": + d.type == "rect" ? q(i, {rx: u, ry: u}) : i.setAttribute(p, u), d._.dirty = 1; + break; + case"src": + d.type == "image" && i.setAttributeNS(n, "href", u); + break; + case"stroke-width": + if (d._.sx != 1 || d._.sy != 1) u /= g(h(d._.sx), h(d._.sy)) || 1; + d.paper._vbSize && (u *= d.paper._vbSize), i.setAttribute(p, u), m["stroke-dasharray"] && v(d, m["stroke-dasharray"], f), d._.arrows && ("startString" in d._.arrows && t(d, d._.arrows.startString), "endString" in d._.arrows && t(d, d._.arrows.endString, 1)); + break; + case"stroke-dasharray": + v(d, u, f); + break; + case"fill": + var F = c(u).match(a._ISURL); + if (F) { + A = q("pattern"); + var G = q("image"); + A.id = a.createUUID(), q(A, { + x: 0, + y: 0, + patternUnits: "userSpaceOnUse", + height: 1, + width: 1 + }), q(G, {x: 0, y: 0, "xlink:href": F[1]}), A.appendChild(G), function (b) { + a._preload(F[1], function () { + var a = this.offsetWidth, c = this.offsetHeight; + q(b, {width: a, height: c}), q(G, {width: a, height: c}), d.paper.safari() + }) + }(A), d.paper.defs.appendChild(A), q(i, {fill: "url(#" + A.id + ")"}), d.pattern = A, d.pattern && s(d); + break + } + var H = a.getRGB(u); + if (!H.error) delete f.gradient, delete m.gradient, !a.is(m.opacity, "undefined") && a.is(f.opacity, "undefined") && q(i, {opacity: m.opacity}), !a.is(m["fill-opacity"], "undefined") && a.is(f["fill-opacity"], "undefined") && q(i, {"fill-opacity": m["fill-opacity"]}); else if ((d.type == "circle" || d.type == "ellipse" || c(u).charAt() != "r") && r(d, u)) { + if ("opacity" in m || "fill-opacity" in m) { + var I = a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g, l)); + if (I) { + var J = I.getElementsByTagName("stop"); + q(J[J.length - 1], {"stop-opacity": ("opacity" in m ? m.opacity : 1) * ("fill-opacity" in m ? m["fill-opacity"] : 1)}) + } + } + m.gradient = u, m.fill = "none"; + break + } + H[b]("opacity") && q(i, {"fill-opacity": H.opacity > 1 ? H.opacity / 100 : H.opacity}); + case"stroke": + H = a.getRGB(u), i.setAttribute(p, H.hex), p == "stroke" && H[b]("opacity") && q(i, {"stroke-opacity": H.opacity > 1 ? H.opacity / 100 : H.opacity}), p == "stroke" && d._.arrows && ("startString" in d._.arrows && t(d, d._.arrows.startString), "endString" in d._.arrows && t(d, d._.arrows.endString, 1)); + break; + case"gradient": + (d.type == "circle" || d.type == "ellipse" || c(u).charAt() != "r") && r(d, u); + break; + case"opacity": + m.gradient && !m[b]("stroke-opacity") && q(i, {"stroke-opacity": u > 1 ? u / 100 : u}); + case"fill-opacity": + if (m.gradient) { + I = a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g, l)), I && (J = I.getElementsByTagName("stop"), q(J[J.length - 1], {"stop-opacity": u})); + break + } + ; + default: + p == "font-size" && (u = e(u, 10) + "px"); + var K = p.replace(/(\-.)/g, function (a) { + return a.substring(1).toUpperCase() + }); + i.style[K] = u, d._.dirty = 1, i.setAttribute(p, u) + } + } + } + y(d, f), i.style.visibility = o + }, x = 1.2, y = function (d, f) { + if (d.type == "text" && !!(f[b]("text") || f[b]("font") || f[b]("font-size") || f[b]("x") || f[b]("y"))) { + var g = d.attrs, h = d.node, + i = h.firstChild ? e(a._g.doc.defaultView.getComputedStyle(h.firstChild, l).getPropertyValue("font-size"), 10) : 10; + if (f[b]("text")) { + g.text = f.text; + while (h.firstChild) h.removeChild(h.firstChild); + var j = c(f.text).split("\n"), k = [], m; + for (var n = 0, o = j.length; n < o; n++) m = q("tspan"), n && q(m, { + dy: i * x, + x: g.x + }), m.appendChild(a._g.doc.createTextNode(j[n])), h.appendChild(m), k[n] = m + } else { + k = h.getElementsByTagName("tspan"); + for (n = 0, o = k.length; n < o; n++) n ? q(k[n], {dy: i * x, x: g.x}) : q(k[0], {dy: 0}) + } + q(h, {x: g.x, y: g.y}), d._.dirty = 1; + var p = d._getBBox(), r = g.y - (p.y + p.height / 2); + r && a.is(r, "finite") && q(k[0], {dy: r}) + } + }, z = function (b, c) { + var d = 0, e = 0; + this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.matrix = a.matrix(), this.realPath = null, this.paper = c, this.attrs = this.attrs || {}, this._ = { + transform: [], + sx: 1, + sy: 1, + deg: 0, + dx: 0, + dy: 0, + dirty: 1 + }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null + }, A = a.el; + z.prototype = A, A.constructor = z, a._engine.path = function (a, b) { + var c = q("path"); + b.canvas && b.canvas.appendChild(c); + var d = new z(c, b); + d.type = "path", w(d, {fill: "none", stroke: "#000", path: a}); + return d + }, A.rotate = function (a, b, e) { + if (this.removed) return this; + a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e); + if (b == null || e == null) { + var f = this.getBBox(1); + b = f.x + f.width / 2, e = f.y + f.height / 2 + } + this.transform(this._.transform.concat([["r", a, b, e]])); + return this + }, A.scale = function (a, b, e, f) { + if (this.removed) return this; + a = c(a).split(j), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3])), a = d(a[0]), b == null && (b = a), f == null && (e = f); + if (e == null || f == null) var g = this.getBBox(1); + e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([["s", a, b, e, f]])); + return this + }, A.translate = function (a, b) { + if (this.removed) return this; + a = c(a).split(j), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this.transform(this._.transform.concat([["t", a, b]])); + return this + }, A.transform = function (c) { + var d = this._; + if (c == null) return d.transform; + a._extractTransform(this, c), this.clip && q(this.clip, {transform: this.matrix.invert()}), this.pattern && s(this), this.node && q(this.node, {transform: this.matrix}); + if (d.sx != 1 || d.sy != 1) { + var e = this.attrs[b]("stroke-width") ? this.attrs["stroke-width"] : 1; + this.attr({"stroke-width": e}) + } + return this + }, A.hide = function () { + !this.removed && this.paper.safari(this.node.style.display = "none"); + return this + }, A.show = function () { + !this.removed && this.paper.safari(this.node.style.display = ""); + return this + }, A.remove = function () { + if (!this.removed && !!this.node.parentNode) { + var b = this.paper; + b.__set__ && b.__set__.exclude(this), k.unbind("raphael.*.*." + this.id), this.gradient && b.defs.removeChild(this.gradient), a._tear(this, b), this.node.parentNode.tagName.toLowerCase() == "a" ? this.node.parentNode.parentNode.removeChild(this.node.parentNode) : this.node.parentNode.removeChild(this.node); + for (var c in this) this[c] = typeof this[c] == "function" ? a._removedFactory(c) : null; + this.removed = !0 + } + }, A._getBBox = function () { + if (this.node.style.display == "none") { + this.show(); + var a = !0 + } + var b = {}; + try { + b = this.node.getBBox() + } catch (c) { + var abcdef = 1 + } finally { + b = b || {} + } + a && this.hide(); + return b + }, A.attr = function (c, d) { + if (this.removed) return this; + if (c == null) { + var e = {}; + for (var f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); + e.gradient && e.fill == "none" && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform; + return e + } + if (d == null && a.is(c, "string")) { + if (c == "fill" && this.attrs.fill == "none" && this.attrs.gradient) return this.attrs.gradient; + if (c == "transform") return this._.transform; + var g = c.split(j), h = {}; + for (var i = 0, l = g.length; i < l; i++) c = g[i], c in this.attrs ? h[c] = this.attrs[c] : a.is(this.paper.customAttributes[c], "function") ? h[c] = this.paper.customAttributes[c].def : h[c] = a._availableAttrs[c]; + return l - 1 ? h : h[g[0]] + } + if (d == null && a.is(c, "array")) { + h = {}; + for (i = 0, l = c.length; i < l; i++) h[c[i]] = this.attr(c[i]); + return h + } + if (d != null) { + var m = {}; + m[c] = d + } else c != null && a.is(c, "object") && (m = c); + for (var n in m) k("raphael.attr." + n + "." + this.id, this, m[n]); + for (n in this.paper.customAttributes) if (this.paper.customAttributes[b](n) && m[b](n) && a.is(this.paper.customAttributes[n], "function")) { + var o = this.paper.customAttributes[n].apply(this, [].concat(m[n])); + this.attrs[n] = m[n]; + for (var p in o) o[b](p) && (m[p] = o[p]) + } + w(this, m); + return this + }, A.toFront = function () { + if (this.removed) return this; + this.node.parentNode.tagName.toLowerCase() == "a" ? this.node.parentNode.parentNode.appendChild(this.node.parentNode) : this.node.parentNode.appendChild(this.node); + var b = this.paper; + b.top != this && a._tofront(this, b); + return this + }, A.toBack = function () { + if (this.removed) return this; + var b = this.node.parentNode; + b.tagName.toLowerCase() == "a" ? b.parentNode.insertBefore(this.node.parentNode, this.node.parentNode.parentNode.firstChild) : b.firstChild != this.node && b.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper); + var c = this.paper; + return this + }, A.insertAfter = function (b) { + if (this.removed) return this; + var c = b.node || b[b.length - 1].node; + c.nextSibling ? c.parentNode.insertBefore(this.node, c.nextSibling) : c.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper); + return this + }, A.insertBefore = function (b) { + if (this.removed) return this; + var c = b.node || b[0].node; + c.parentNode.insertBefore(this.node, c), a._insertbefore(this, b, this.paper); + return this + }, A.blur = function (b) { + var c = this; + if (+b !== 0) { + var d = q("filter"), e = q("feGaussianBlur"); + c.attrs.blur = b, d.id = a.createUUID(), q(e, {stdDeviation: +b || 1.5}), d.appendChild(e), c.paper.defs.appendChild(d), c._blur = d, q(c.node, {filter: "url(#" + d.id + ")"}) + } else c._blur && (c._blur.parentNode.removeChild(c._blur), delete c._blur, delete c.attrs.blur), c.node.removeAttribute("filter") + }, a._engine.circle = function (a, b, c, d) { + var e = q("circle"); + a.canvas && a.canvas.appendChild(e); + var f = new z(e, a); + f.attrs = {cx: b, cy: c, r: d, fill: "none", stroke: "#000"}, f.type = "circle", q(e, f.attrs); + return f + }, a._engine.rect = function (a, b, c, d, e, f) { + var g = q("rect"); + a.canvas && a.canvas.appendChild(g); + var h = new z(g, a); + h.attrs = { + x: b, + y: c, + width: d, + height: e, + r: f || 0, + rx: f || 0, + ry: f || 0, + fill: "none", + stroke: "#000" + }, h.type = "rect", q(g, h.attrs); + return h + }, a._engine.ellipse = function (a, b, c, d, e) { + var f = q("ellipse"); + a.canvas && a.canvas.appendChild(f); + var g = new z(f, a); + g.attrs = {cx: b, cy: c, rx: d, ry: e, fill: "none", stroke: "#000"}, g.type = "ellipse", q(f, g.attrs); + return g + }, a._engine.image = function (a, b, c, d, e, f) { + var g = q("image"); + q(g, { + x: c, + y: d, + width: e, + height: f, + preserveAspectRatio: "none" + }), g.setAttributeNS(n, "href", b), a.canvas && a.canvas.appendChild(g); + var h = new z(g, a); + h.attrs = {x: c, y: d, width: e, height: f, src: b}, h.type = "image"; + return h + }, a._engine.text = function (b, c, d, e) { + var f = q("text"); + b.canvas && b.canvas.appendChild(f); + var g = new z(f, b); + g.attrs = { + x: c, + y: d, + "text-anchor": "middle", + text: e, + font: a._availableAttrs.font, + stroke: "none", + fill: "#000" + }, g.type = "text", w(g, g.attrs); + return g + }, a._engine.setSize = function (a, b) { + this.width = a || this.width, this.height = b || this.height, this.canvas.setAttribute("width", this.width), this.canvas.setAttribute("height", this.height), this._viewBox && this.setViewBox.apply(this, this._viewBox); + return this + }, a._engine.create = function () { + var b = a._getContainer.apply(0, arguments), c = b && b.container, d = b.x, e = b.y, f = b.width, g = b.height; + if (!c) throw new Error("SVG container not found."); + var h = q("svg"), i = "overflow:hidden;", j; + d = d || 0, e = e || 0, f = f || 512, g = g || 342, q(h, { + height: g, + version: 1.1, + width: f, + xmlns: "http://www.w3.org/2000/svg" + }), c == 1 ? (h.style.cssText = i + "position:absolute;left:" + d + "px;top:" + e + "px", a._g.doc.body.appendChild(h), j = 1) : (h.style.cssText = i + "position:relative", c.firstChild ? c.insertBefore(h, c.firstChild) : c.appendChild(h)), c = new a._Paper, c.width = f, c.height = g, c.canvas = h, c.clear(), c._left = c._top = 0, j && (c.renderfix = function () { + }), c.renderfix(); + return c + }, a._engine.setViewBox = function (a, b, c, d, e) { + k("raphael.setViewBox", this, this._viewBox, [a, b, c, d, e]); + var f = g(c / this.width, d / this.height), h = this.top, i = e ? "meet" : "xMinYMin", j, l; + a == null ? (this._vbSize && (f = 1), delete this._vbSize, j = "0 0 " + this.width + m + this.height) : (this._vbSize = f, j = a + m + b + m + c + m + d), q(this.canvas, { + viewBox: j, + preserveAspectRatio: i + }); + while (f && h) l = "stroke-width" in h.attrs ? h.attrs["stroke-width"] : 1, h.attr({"stroke-width": l}), h._.dirty = 1, h._.dirtyT = 1, h = h.prev; + this._viewBox = [a, b, c, d, !!e]; + return this + }, a.prototype.renderfix = function () { + var a = this.canvas, b = a.style, c; + try { + c = a.getScreenCTM() || a.createSVGMatrix() + } catch (d) { + c = a.createSVGMatrix() + } + var e = -c.e % 1, f = -c.f % 1; + if (e || f) e && (this._left = (this._left + e) % 1, b.left = this._left + "px"), f && (this._top = (this._top + f) % 1, b.top = this._top + "px") + }, a.prototype.clear = function () { + a.eve("raphael.clear", this); + var b = this.canvas; + while (b.firstChild) b.removeChild(b.firstChild); + this.bottom = this.top = null, (this.desc = q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël " + a.version)), b.appendChild(this.desc), b.appendChild(this.defs = q("defs")) + }, a.prototype.remove = function () { + k("raphael.remove", this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); + for (var b in this) this[b] = typeof this[b] == "function" ? a._removedFactory(b) : null + }; + var B = a.st; + for (var C in A) A[b](C) && !B[b](C) && (B[C] = function (a) { + return function () { + var b = arguments; + return this.forEach(function (c) { + c[a].apply(c, b) + }) + } + }(C)) +}(window.Raphael), window.Raphael.vml && function (a) { + var b = "hasOwnProperty", c = String, d = parseFloat, e = Math, f = e.round, g = e.max, h = e.min, i = e.abs, + j = "fill", k = /[, ]+/, l = a.eve, m = " progid:DXImageTransform.Microsoft", n = " ", o = "", + p = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, q = /([clmz]),?([^clmz]*)/gi, + r = / progid:\S+Blur\([^\)]+\)/g, s = /-?[^,\s-]+/g, t = "position:absolute;left:0;top:0;width:1px;height:1px", + u = 21600, v = {path: 1, rect: 1, image: 1}, w = {circle: 1, ellipse: 1}, x = function (b) { + var d = /[ahqstv]/ig, e = a._pathToAbsolute; + c(b).match(d) && (e = a._path2curve), d = /[clmz]/g; + if (e == a._pathToAbsolute && !c(b).match(d)) { + var g = c(b).replace(q, function (a, b, c) { + var d = [], e = b.toLowerCase() == "m", g = p[b]; + c.replace(s, function (a) { + e && d.length == 2 && (g += d + p[b == "m" ? "l" : "L"], d = []), d.push(f(a * u)) + }); + return g + d + }); + return g + } + var h = e(b), i, j; + g = []; + for (var k = 0, l = h.length; k < l; k++) { + i = h[k], j = h[k][0].toLowerCase(), j == "z" && (j = "x"); + for (var m = 1, r = i.length; m < r; m++) j += f(i[m] * u) + (m != r - 1 ? "," : o); + g.push(j) + } + return g.join(n) + }, y = function (b, c, d) { + var e = a.matrix(); + e.rotate(-b, .5, .5); + return {dx: e.x(c, d), dy: e.y(c, d)} + }, z = function (a, b, c, d, e, f) { + var g = a._, h = a.matrix, k = g.fillpos, l = a.node, m = l.style, o = 1, p = "", q, r = u / b, s = u / c; + m.visibility = "hidden"; + if (!!b && !!c) { + l.coordsize = i(r) + n + i(s), m.rotation = f * (b * c < 0 ? -1 : 1); + if (f) { + var t = y(f, d, e); + d = t.dx, e = t.dy + } + b < 0 && (p += "x"), c < 0 && (p += " y") && (o = -1), m.flip = p, l.coordorigin = d * -r + n + e * -s; + if (k || g.fillsize) { + var v = l.getElementsByTagName(j); + v = v && v[0], l.removeChild(v), k && (t = y(f, h.x(k[0], k[1]), h.y(k[0], k[1])), v.position = t.dx * o + n + t.dy * o), g.fillsize && (v.size = g.fillsize[0] * i(b) + n + g.fillsize[1] * i(c)), l.appendChild(v) + } + m.visibility = "visible" + } + }; + a.toString = function () { + return "Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël " + this.version + }; + var A = function (a, b, d) { + var e = c(b).toLowerCase().split("-"), f = d ? "end" : "start", g = e.length, h = "classic", i = "medium", + j = "medium"; + while (g--) switch (e[g]) { + case"block": + case"classic": + case"oval": + case"diamond": + case"open": + case"none": + h = e[g]; + break; + case"wide": + case"narrow": + j = e[g]; + break; + case"long": + case"short": + i = e[g] + } + var k = a.node.getElementsByTagName("stroke")[0]; + k[f + "arrow"] = h, k[f + "arrowlength"] = i, k[f + "arrowwidth"] = j + }, B = function (e, i) { + e.attrs = e.attrs || {}; + var l = e.node, m = e.attrs, p = l.style, q, + r = v[e.type] && (i.x != m.x || i.y != m.y || i.width != m.width || i.height != m.height || i.cx != m.cx || i.cy != m.cy || i.rx != m.rx || i.ry != m.ry || i.r != m.r), + s = w[e.type] && (m.cx != i.cx || m.cy != i.cy || m.r != i.r || m.rx != i.rx || m.ry != i.ry), t = e; + for (var y in i) i[b](y) && (m[y] = i[y]); + r && (m.path = a._getPath[e.type](e), e._.dirty = 1), i.href && (l.href = i.href), i.title && (l.title = i.title), i.target && (l.target = i.target), i.cursor && (p.cursor = i.cursor), "blur" in i && e.blur(i.blur); + if (i.path && e.type == "path" || r) l.path = x(~c(m.path).toLowerCase().indexOf("r") ? a._pathToAbsolute(m.path) : m.path), e.type == "image" && (e._.fillpos = [m.x, m.y], e._.fillsize = [m.width, m.height], z(e, 1, 1, 0, 0, 0)); + "transform" in i && e.transform(i.transform); + if (s) { + var B = +m.cx, D = +m.cy, E = +m.rx || +m.r || 0, G = +m.ry || +m.r || 0; + l.path = a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", f((B - E) * u), f((D - G) * u), f((B + E) * u), f((D + G) * u), f(B * u)) + } + if ("clip-rect" in i) { + var H = c(i["clip-rect"]).split(k); + if (H.length == 4) { + H[2] = +H[2] + +H[0], H[3] = +H[3] + +H[1]; + var I = l.clipRect || a._g.doc.createElement("div"), J = I.style; + J.clip = a.format("rect({1}px {2}px {3}px {0}px)", H), l.clipRect || (J.position = "absolute", J.top = 0, J.left = 0, J.width = e.paper.width + "px", J.height = e.paper.height + "px", l.parentNode.insertBefore(I, l), I.appendChild(l), l.clipRect = I) + } + i["clip-rect"] || l.clipRect && (l.clipRect.style.clip = "auto") + } + if (e.textpath) { + var K = e.textpath.style; + i.font && (K.font = i.font), i["font-family"] && (K.fontFamily = '"' + i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, o) + '"'), i["font-size"] && (K.fontSize = i["font-size"]), i["font-weight"] && (K.fontWeight = i["font-weight"]), i["font-style"] && (K.fontStyle = i["font-style"]) + } + "arrow-start" in i && A(t, i["arrow-start"]), "arrow-end" in i && A(t, i["arrow-end"], 1); + if (i.opacity != null || i["stroke-width"] != null || i.fill != null || i.src != null || i.stroke != null || i["stroke-width"] != null || i["stroke-opacity"] != null || i["fill-opacity"] != null || i["stroke-dasharray"] != null || i["stroke-miterlimit"] != null || i["stroke-linejoin"] != null || i["stroke-linecap"] != null) { + var L = l.getElementsByTagName(j), M = !1; + L = L && L[0], !L && (M = L = F(j)), e.type == "image" && i.src && (L.src = i.src), i.fill && (L.on = !0); + if (L.on == null || i.fill == "none" || i.fill === null) L.on = !1; + if (L.on && i.fill) { + var N = c(i.fill).match(a._ISURL); + if (N) { + L.parentNode == l && l.removeChild(L), L.rotate = !0, L.src = N[1], L.type = "tile"; + var O = e.getBBox(1); + L.position = O.x + n + O.y, e._.fillpos = [O.x, O.y], a._preload(N[1], function () { + e._.fillsize = [this.offsetWidth, this.offsetHeight] + }) + } else L.color = a.getRGB(i.fill).hex, L.src = o, L.type = "solid", a.getRGB(i.fill).error && (t.type in { + circle: 1, + ellipse: 1 + } || c(i.fill).charAt() != "r") && C(t, i.fill, L) && (m.fill = "none", m.gradient = i.fill, L.rotate = !1) + } + if ("fill-opacity" in i || "opacity" in i) { + var P = ((+m["fill-opacity"] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+a.getRGB(i.fill).o + 1 || 2) - 1); + P = h(g(P, 0), 1), L.opacity = P, L.src && (L.color = "none") + } + l.appendChild(L); + var Q = l.getElementsByTagName("stroke") && l.getElementsByTagName("stroke")[0], T = !1; + !Q && (T = Q = F("stroke")); + if (i.stroke && i.stroke != "none" || i["stroke-width"] || i["stroke-opacity"] != null || i["stroke-dasharray"] || i["stroke-miterlimit"] || i["stroke-linejoin"] || i["stroke-linecap"]) Q.on = !0; + (i.stroke == "none" || i.stroke === null || Q.on == null || i.stroke == 0 || i["stroke-width"] == 0) && (Q.on = !1); + var U = a.getRGB(i.stroke); + Q.on && i.stroke && (Q.color = U.hex), P = ((+m["stroke-opacity"] + 1 || 2) - 1) * ((+m.opacity + 1 || 2) - 1) * ((+U.o + 1 || 2) - 1); + var V = (d(i["stroke-width"]) || 1) * .75; + P = h(g(P, 0), 1), i["stroke-width"] == null && (V = m["stroke-width"]), i["stroke-width"] && (Q.weight = V), V && V < 1 && (P *= V) && (Q.weight = 1), Q.opacity = P, i["stroke-linejoin"] && (Q.joinstyle = i["stroke-linejoin"] || "miter"), Q.miterlimit = i["stroke-miterlimit"] || 8, i["stroke-linecap"] && (Q.endcap = i["stroke-linecap"] == "butt" ? "flat" : i["stroke-linecap"] == "square" ? "square" : "round"); + if (i["stroke-dasharray"]) { + var W = { + "-": "shortdash", + ".": "shortdot", + "-.": "shortdashdot", + "-..": "shortdashdotdot", + ". ": "dot", + "- ": "dash", + "--": "longdash", + "- .": "dashdot", + "--.": "longdashdot", + "--..": "longdashdotdot" + }; + Q.dashstyle = W[b](i["stroke-dasharray"]) ? W[i["stroke-dasharray"]] : o + } + T && l.appendChild(Q) + } + if (t.type == "text") { + t.paper.canvas.style.display = o; + var X = t.paper.span, Y = 100, Z = m.font && m.font.match(/\d+(?:\.\d*)?(?=px)/); + p = X.style, m.font && (p.font = m.font), m["font-family"] && (p.fontFamily = m["font-family"]), m["font-weight"] && (p.fontWeight = m["font-weight"]), m["font-style"] && (p.fontStyle = m["font-style"]), Z = d(m["font-size"] || Z && Z[0]) || 10, p.fontSize = Z * Y + "px", t.textpath.string && (X.innerHTML = c(t.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>")); + var $ = X.getBoundingClientRect(); + t.W = m.w = ($.right - $.left) / Y, t.H = m.h = ($.bottom - $.top) / Y, t.X = m.x, t.Y = m.y + t.H / 2, ("x" in i || "y" in i) && (t.path.v = a.format("m{0},{1}l{2},{1}", f(m.x * u), f(m.y * u), f(m.x * u) + 1)); + var _ = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; + for (var ba = 0, bb = _.length; ba < bb; ba++) if (_[ba] in i) { + t._.dirty = 1; + break + } + switch (m["text-anchor"]) { + case"start": + t.textpath.style["v-text-align"] = "left", t.bbx = t.W / 2; + break; + case"end": + t.textpath.style["v-text-align"] = "right", t.bbx = -t.W / 2; + break; + default: + t.textpath.style["v-text-align"] = "center", t.bbx = 0 + } + t.textpath.style["v-text-kern"] = !0 + } + }, C = function (b, f, g) { + b.attrs = b.attrs || {}; + var h = b.attrs, i = Math.pow, j, k, l = "linear", m = ".5 .5"; + b.attrs.gradient = f, f = c(f).replace(a._radial_gradient, function (a, b, c) { + l = "radial", b && c && (b = d(b), c = d(c), i(b - .5, 2) + i(c - .5, 2) > .25 && (c = e.sqrt(.25 - i(b - .5, 2)) * ((c > .5) * 2 - 1) + .5), m = b + n + c); + return o + }), f = f.split(/\s*\-\s*/); + if (l == "linear") { + var p = f.shift(); + p = -d(p); + if (isNaN(p)) return null + } + var q = a._parseDots(f); + if (!q) return null; + b = b.shape || b.node; + if (q.length) { + b.removeChild(g), g.on = !0, g.method = "none", g.color = q[0].color, g.color2 = q[q.length - 1].color; + var r = []; + for (var s = 0, t = q.length; s < t; s++) q[s].offset && r.push(q[s].offset + n + q[s].color); + g.colors = r.length ? r.join() : "0% " + g.color, l == "radial" ? (g.type = "gradientTitle", g.focus = "100%", g.focussize = "0 0", g.focusposition = m, g.angle = 0) : (g.type = "gradient", g.angle = (270 - p) % 360), b.appendChild(g) + } + return 1 + }, D = function (b, c) { + this[0] = this.node = b, b.raphael = !0, this.id = a._oid++, b.raphaelid = this.id, this.X = 0, this.Y = 0, this.attrs = {}, this.paper = c, this.matrix = a.matrix(), this._ = { + transform: [], + sx: 1, + sy: 1, + dx: 0, + dy: 0, + deg: 0, + dirty: 1, + dirtyT: 1 + }, !c.bottom && (c.bottom = this), this.prev = c.top, c.top && (c.top.next = this), c.top = this, this.next = null + }, E = a.el; + D.prototype = E, E.constructor = D, E.transform = function (b) { + if (b == null) return this._.transform; + var d = this.paper._viewBoxShift, e = d ? "s" + [d.scale, d.scale] + "-1-1t" + [d.dx, d.dy] : o, f; + d && (f = b = c(b).replace(/\.{3}|\u2026/g, this._.transform || o)), a._extractTransform(this, e + b); + var g = this.matrix.clone(), h = this.skew, i = this.node, j, k = ~c(this.attrs.fill).indexOf("-"), + l = !c(this.attrs.fill).indexOf("url("); + g.translate(-0.5, -0.5); + if (l || k || this.type == "image") { + h.matrix = "1 0 0 1", h.offset = "0 0", j = g.split(); + if (k && j.noRotation || !j.isSimple) { + i.style.filter = g.toFilter(); + var m = this.getBBox(), p = this.getBBox(1), q = m.x - p.x, r = m.y - p.y; + i.coordorigin = q * -u + n + r * -u, z(this, 1, 1, q, r, 0) + } else i.style.filter = o, z(this, j.scalex, j.scaley, j.dx, j.dy, j.rotate) + } else i.style.filter = o, h.matrix = c(g), h.offset = g.offset(); + f && (this._.transform = f); + return this + }, E.rotate = function (a, b, e) { + if (this.removed) return this; + if (a != null) { + a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2])), a = d(a[0]), e == null && (b = e); + if (b == null || e == null) { + var f = this.getBBox(1); + b = f.x + f.width / 2, e = f.y + f.height / 2 + } + this._.dirtyT = 1, this.transform(this._.transform.concat([["r", a, b, e]])); + return this + } + }, E.translate = function (a, b) { + if (this.removed) return this; + a = c(a).split(k), a.length - 1 && (b = d(a[1])), a = d(a[0]) || 0, b = +b || 0, this._.bbox && (this._.bbox.x += a, this._.bbox.y += b), this.transform(this._.transform.concat([["t", a, b]])); + return this + }, E.scale = function (a, b, e, f) { + if (this.removed) return this; + a = c(a).split(k), a.length - 1 && (b = d(a[1]), e = d(a[2]), f = d(a[3]), isNaN(e) && (e = null), isNaN(f) && (f = null)), a = d(a[0]), b == null && (b = a), f == null && (e = f); + if (e == null || f == null) var g = this.getBBox(1); + e = e == null ? g.x + g.width / 2 : e, f = f == null ? g.y + g.height / 2 : f, this.transform(this._.transform.concat([["s", a, b, e, f]])), this._.dirtyT = 1; + return this + }, E.hide = function () { + !this.removed && (this.node.style.display = "none"); + return this + }, E.show = function () { + !this.removed && (this.node.style.display = o); + return this + }, E._getBBox = function () { + if (this.removed) return {}; + return {x: this.X + (this.bbx || 0) - this.W / 2, y: this.Y - this.H, width: this.W, height: this.H} + }, E.remove = function () { + if (!this.removed && !!this.node.parentNode) { + this.paper.__set__ && this.paper.__set__.exclude(this), a.eve.unbind("raphael.*.*." + this.id), a._tear(this, this.paper), this.node.parentNode.removeChild(this.node), this.shape && this.shape.parentNode.removeChild(this.shape); + for (var b in this) this[b] = typeof this[b] == "function" ? a._removedFactory(b) : null; + this.removed = !0 + } + }, E.attr = function (c, d) { + if (this.removed) return this; + if (c == null) { + var e = {}; + for (var f in this.attrs) this.attrs[b](f) && (e[f] = this.attrs[f]); + e.gradient && e.fill == "none" && (e.fill = e.gradient) && delete e.gradient, e.transform = this._.transform; + return e + } + if (d == null && a.is(c, "string")) { + if (c == j && this.attrs.fill == "none" && this.attrs.gradient) return this.attrs.gradient; + var g = c.split(k), h = {}; + for (var i = 0, m = g.length; i < m; i++) c = g[i], c in this.attrs ? h[c] = this.attrs[c] : a.is(this.paper.customAttributes[c], "function") ? h[c] = this.paper.customAttributes[c].def : h[c] = a._availableAttrs[c]; + return m - 1 ? h : h[g[0]] + } + if (this.attrs && d == null && a.is(c, "array")) { + h = {}; + for (i = 0, m = c.length; i < m; i++) h[c[i]] = this.attr(c[i]); + return h + } + var n; + d != null && (n = {}, n[c] = d), d == null && a.is(c, "object") && (n = c); + for (var o in n) l("raphael.attr." + o + "." + this.id, this, n[o]); + if (n) { + for (o in this.paper.customAttributes) if (this.paper.customAttributes[b](o) && n[b](o) && a.is(this.paper.customAttributes[o], "function")) { + var p = this.paper.customAttributes[o].apply(this, [].concat(n[o])); + this.attrs[o] = n[o]; + for (var q in p) p[b](q) && (n[q] = p[q]) + } + n.text && this.type == "text" && (this.textpath.string = n.text), B(this, n) + } + return this + }, E.toFront = function () { + !this.removed && this.node.parentNode.appendChild(this.node), this.paper && this.paper.top != this && a._tofront(this, this.paper); + return this + }, E.toBack = function () { + if (this.removed) return this; + this.node.parentNode.firstChild != this.node && (this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild), a._toback(this, this.paper)); + return this + }, E.insertAfter = function (b) { + if (this.removed) return this; + b.constructor == a.st.constructor && (b = b[b.length - 1]), b.node.nextSibling ? b.node.parentNode.insertBefore(this.node, b.node.nextSibling) : b.node.parentNode.appendChild(this.node), a._insertafter(this, b, this.paper); + return this + }, E.insertBefore = function (b) { + if (this.removed) return this; + b.constructor == a.st.constructor && (b = b[0]), b.node.parentNode.insertBefore(this.node, b.node), a._insertbefore(this, b, this.paper); + return this + }, E.blur = function (b) { + var c = this.node.runtimeStyle, d = c.filter; + d = d.replace(r, o), +b !== 0 ? (this.attrs.blur = b, c.filter = d + n + m + ".Blur(pixelradius=" + (+b || 1.5) + ")", c.margin = a.format("-{0}px 0 0 -{0}px", f(+b || 1.5))) : (c.filter = d, c.margin = 0, delete this.attrs.blur) + }, a._engine.path = function (a, b) { + var c = F("shape"); + c.style.cssText = t, c.coordsize = u + n + u, c.coordorigin = b.coordorigin; + var d = new D(c, b), e = {fill: "none", stroke: "#000"}; + a && (e.path = a), d.type = "path", d.path = [], d.Path = o, B(d, e), b.canvas.appendChild(c); + var f = F("skew"); + f.on = !0, c.appendChild(f), d.skew = f, d.transform(o); + return d + }, a._engine.rect = function (b, c, d, e, f, g) { + var h = a._rectPath(c, d, e, f, g), i = b.path(h), j = i.attrs; + i.X = j.x = c, i.Y = j.y = d, i.W = j.width = e, i.H = j.height = f, j.r = g, j.path = h, i.type = "rect"; + return i + }, a._engine.ellipse = function (a, b, c, d, e) { + var f = a.path(), g = f.attrs; + f.X = b - d, f.Y = c - e, f.W = d * 2, f.H = e * 2, f.type = "ellipse", B(f, {cx: b, cy: c, rx: d, ry: e}); + return f + }, a._engine.circle = function (a, b, c, d) { + var e = a.path(), f = e.attrs; + e.X = b - d, e.Y = c - d, e.W = e.H = d * 2, e.type = "circle", B(e, {cx: b, cy: c, r: d}); + return e + }, a._engine.image = function (b, c, d, e, f, g) { + var h = a._rectPath(d, e, f, g), i = b.path(h).attr({stroke: "none"}), k = i.attrs, l = i.node, + m = l.getElementsByTagName(j)[0]; + k.src = c, i.X = k.x = d, i.Y = k.y = e, i.W = k.width = f, i.H = k.height = g, k.path = h, i.type = "image", m.parentNode == l && l.removeChild(m), m.rotate = !0, m.src = c, m.type = "tile", i._.fillpos = [d, e], i._.fillsize = [f, g], l.appendChild(m), z(i, 1, 1, 0, 0, 0); + return i + }, a._engine.text = function (b, d, e, g) { + var h = F("shape"), i = F("path"), j = F("textpath"); + d = d || 0, e = e || 0, g = g || "", i.v = a.format("m{0},{1}l{2},{1}", f(d * u), f(e * u), f(d * u) + 1), i.textpathok = !0, j.string = c(g), j.on = !0, h.style.cssText = t, h.coordsize = u + n + u, h.coordorigin = "0 0"; + var k = new D(h, b), l = {fill: "#000", stroke: "none", font: a._availableAttrs.font, text: g}; + k.shape = h, k.path = i, k.textpath = j, k.type = "text", k.attrs.text = c(g), k.attrs.x = d, k.attrs.y = e, k.attrs.w = 1, k.attrs.h = 1, B(k, l), h.appendChild(j), h.appendChild(i), b.canvas.appendChild(h); + var m = F("skew"); + m.on = !0, h.appendChild(m), k.skew = m, k.transform(o); + return k + }, a._engine.setSize = function (b, c) { + var d = this.canvas.style; + this.width = b, this.height = c, b == +b && (b += "px"), c == +c && (c += "px"), d.width = b, d.height = c, d.clip = "rect(0 " + b + " " + c + " 0)", this._viewBox && a._engine.setViewBox.apply(this, this._viewBox); + return this + }, a._engine.setViewBox = function (b, c, d, e, f) { + a.eve("raphael.setViewBox", this, this._viewBox, [b, c, d, e, f]); + var h = this.width, i = this.height, j = 1 / g(d / h, e / i), k, l; + f && (k = i / e, l = h / d, d * k < h && (b -= (h - d * k) / 2 / k), e * l < i && (c -= (i - e * l) / 2 / l)), this._viewBox = [b, c, d, e, !!f], this._viewBoxShift = { + dx: -b, + dy: -c, + scale: j + }, this.forEach(function (a) { + a.transform("...") + }); + return this + }; + var F; + a._engine.initWin = function (a) { + var b = a.document; + b.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); + try { + !b.namespaces.rvml && b.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"), F = function (a) { + return b.createElement("<rvml:" + a + ' class="rvml">') + } + } catch (c) { + F = function (a) { + return b.createElement("<" + a + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">') + } + } + }, a._engine.initWin(a._g.win), a._engine.create = function () { + var b = a._getContainer.apply(0, arguments), c = b.container, d = b.height, e, f = b.width, g = b.x, h = b.y; + if (!c) throw new Error("VML container not found."); + var i = new a._Paper, j = i.canvas = a._g.doc.createElement("div"), k = j.style; + g = g || 0, h = h || 0, f = f || 512, d = d || 342, i.width = f, i.height = d, f == +f && (f += "px"), d == +d && (d += "px"), i.coordsize = u * 1e3 + n + u * 1e3, i.coordorigin = "0 0", i.span = a._g.doc.createElement("span"), i.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;", j.appendChild(i.span), k.cssText = a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", f, d), c == 1 ? (a._g.doc.body.appendChild(j), k.left = g + "px", k.top = h + "px", k.position = "absolute") : c.firstChild ? c.insertBefore(j, c.firstChild) : c.appendChild(j), i.renderfix = function () { + }; + return i + }, a.prototype.clear = function () { + a.eve("raphael.clear", this), this.canvas.innerHTML = o, this.span = a._g.doc.createElement("span"), this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;", this.canvas.appendChild(this.span), this.bottom = this.top = null + }, a.prototype.remove = function () { + a.eve("raphael.remove", this), this.canvas.parentNode.removeChild(this.canvas); + for (var b in this) this[b] = typeof this[b] == "function" ? a._removedFactory(b) : null; + return !0 + }; + var G = a.st; + for (var H in E) E[b](H) && !G[b](H) && (G[H] = function (a) { + return function () { + var b = arguments; + return this.forEach(function (c) { + c[a].apply(c, b) + }) + } + }(H)) +}(window.Raphael) \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.js new file mode 100644 index 0000000..e0ee319 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael.js @@ -0,0 +1,10 @@ +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.1 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +(function(a){var b="0.3.4",c="hasOwnProperty",d=/[\.\/]/,e="*",f=function(){},g=function(a,b){return a-b},h,i,j={n:{}},k=function(a,b){var c=j,d=i,e=Array.prototype.slice.call(arguments,2),f=k.listeners(a),l=0,m=!1,n,o=[],p={},q=[],r=h,s=[];h=a,i=0;for(var t=0,u=f.length;t<u;t++)"zIndex"in f[t]&&(o.push(f[t].zIndex),f[t].zIndex<0&&(p[f[t].zIndex]=f[t]));o.sort(g);while(o[l]<0){n=p[o[l++]],q.push(n.apply(b,e));if(i){i=d;return q}}for(t=0;t<u;t++){n=f[t];if("zIndex"in n)if(n.zIndex==o[l]){q.push(n.apply(b,e));if(i)break;do{l++,n=p[o[l]],n&&q.push(n.apply(b,e));if(i)break}while(n)}else p[n.zIndex]=n;else{q.push(n.apply(b,e));if(i)break}}i=d,h=r;return q.length?q:null};k.listeners=function(a){var b=a.split(d),c=j,f,g,h,i,k,l,m,n,o=[c],p=[];for(i=0,k=b.length;i<k;i++){n=[];for(l=0,m=o.length;l<m;l++){c=o[l].n,g=[c[b[i]],c[e]],h=2;while(h--)f=g[h],f&&(n.push(f),p=p.concat(f.f||[]))}o=n}return p},k.on=function(a,b){var c=a.split(d),e=j;for(var g=0,h=c.length;g<h;g++)e=e.n,!e[c[g]]&&(e[c[g]]={n:{}}),e=e[c[g]];e.f=e.f||[];for(g=0,h=e.f.length;g<h;g++)if(e.f[g]==b)return f;e.f.push(b);return function(a){+a==+a&&(b.zIndex=+a)}},k.stop=function(){i=1},k.nt=function(a){if(a)return(new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)")).test(h);return h},k.off=k.unbind=function(a,b){var f=a.split(d),g,h,i,k,l,m,n,o=[j];for(k=0,l=f.length;k<l;k++)for(m=0;m<o.length;m+=i.length-2){i=[m,1],g=o[m].n;if(f[k]!=e)g[f[k]]&&i.push(g[f[k]]);else for(h in g)g[c](h)&&i.push(g[h]);o.splice.apply(o,i)}for(k=0,l=o.length;k<l;k++){g=o[k];while(g.n){if(b){if(g.f){for(m=0,n=g.f.length;m<n;m++)if(g.f[m]==b){g.f.splice(m,1);break}!g.f.length&&delete g.f}for(h in g.n)if(g.n[c](h)&&g.n[h].f){var p=g.n[h].f;for(m=0,n=p.length;m<n;m++)if(p[m]==b){p.splice(m,1);break}!p.length&&delete g.n[h].f}}else{delete g.f;for(h in g.n)g.n[c](h)&&g.n[h].f&&delete g.n[h].f}g=g.n}}},k.once=function(a,b){var c=function(){var d=b.apply(this,arguments);k.unbind(a,c);return d};return k.on(a,c)},k.version=b,k.toString=function(){return"You are running Eve "+b},typeof module!="undefined"&&module.exports?module.exports=k:typeof define!="undefined"?define("eve",[],function(){return k}):a.eve=k})(this),function(){function cF(a){for(var b=0;b<cy.length;b++)cy[b].el.paper==a&&cy.splice(b--,1)}function cE(b,d,e,f,h,i){e=Q(e);var j,k,l,m=[],o,p,q,t=b.ms,u={},v={},w={};if(f)for(y=0,z=cy.length;y<z;y++){var x=cy[y];if(x.el.id==d.id&&x.anim==b){x.percent!=e?(cy.splice(y,1),l=1):k=x,d.attr(x.totalOrigin);break}}else f=+v;for(var y=0,z=b.percents.length;y<z;y++){if(b.percents[y]==e||b.percents[y]>f*b.top){e=b.percents[y],p=b.percents[y-1]||0,t=t/b.top*(e-p),o=b.percents[y+1],j=b.anim[e];break}f&&d.attr(b.anim[b.percents[y]])}if(!!j){if(!k){for(var A in j)if(j[g](A))if(U[g](A)||d.paper.customAttributes[g](A)){u[A]=d.attr(A),u[A]==null&&(u[A]=T[A]),v[A]=j[A];switch(U[A]){case C:w[A]=(v[A]-u[A])/t;break;case"colour":u[A]=a.getRGB(u[A]);var B=a.getRGB(v[A]);w[A]={r:(B.r-u[A].r)/t,g:(B.g-u[A].g)/t,b:(B.b-u[A].b)/t};break;case"path":var D=bR(u[A],v[A]),E=D[1];u[A]=D[0],w[A]=[];for(y=0,z=u[A].length;y<z;y++){w[A][y]=[0];for(var F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(E[y][F]-u[A][y][F])/t}break;case"transform":var H=d._,I=ca(H[A],v[A]);if(I){u[A]=I.from,v[A]=I.to,w[A]=[],w[A].real=!0;for(y=0,z=u[A].length;y<z;y++){w[A][y]=[u[A][y][0]];for(F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(v[A][y][F]-u[A][y][F])/t}}else{var J=d.matrix||new cb,K={_:{transform:H.transform},getBBox:function(){return d.getBBox(1)}};u[A]=[J.a,J.b,J.c,J.d,J.e,J.f],b$(K,v[A]),v[A]=K._.transform,w[A]=[(K.matrix.a-J.a)/t,(K.matrix.b-J.b)/t,(K.matrix.c-J.c)/t,(K.matrix.d-J.d)/t,(K.matrix.e-J.e)/t,(K.matrix.f-J.f)/t]}break;case"csv":var L=r(j[A])[s](c),M=r(u[A])[s](c);if(A=="clip-rect"){u[A]=M,w[A]=[],y=M.length;while(y--)w[A][y]=(L[y]-u[A][y])/t}v[A]=L;break;default:L=[][n](j[A]),M=[][n](u[A]),w[A]=[],y=d.paper.customAttributes[A].length;while(y--)w[A][y]=((L[y]||0)-(M[y]||0))/t}}var O=j.easing,P=a.easing_formulas[O];if(!P){P=r(O).match(N);if(P&&P.length==5){var R=P;P=function(a){return cC(a,+R[1],+R[2],+R[3],+R[4],t)}}else P=bf}q=j.start||b.start||+(new Date),x={anim:b,percent:e,timestamp:q,start:q+(b.del||0),status:0,initstatus:f||0,stop:!1,ms:t,easing:P,from:u,diff:w,to:v,el:d,callback:j.callback,prev:p,next:o,repeat:i||b.times,origin:d.attr(),totalOrigin:h},cy.push(x);if(f&&!k&&!l){x.stop=!0,x.start=new Date-t*f;if(cy.length==1)return cA()}l&&(x.start=new Date-x.ms*f),cy.length==1&&cz(cA)}else k.initstatus=f,k.start=new Date-k.ms*f;eve("raphael.anim.start."+d.id,d,b)}}function cD(a,b){var c=[],d={};this.ms=b,this.times=1;if(a){for(var e in a)a[g](e)&&(d[Q(e)]=a[e],c.push(Q(e)));c.sort(bd)}this.anim=d,this.top=c[c.length-1],this.percents=c}function cC(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(z(f)<b)return e;j=(3*i*e+2*h)*e+g;if(z(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(z(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cq(){return this.x+q+this.y+q+this.width+" × "+this.height}function cp(){return this.x+q+this.y}function cb(a,b,c,d,e,f){a!=null?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function bH(b,c,d){b=a._path2curve(b),c=a._path2curve(c);var e,f,g,h,i,j,k,l,m,n,o=d?0:[];for(var p=0,q=b.length;p<q;p++){var r=b[p];if(r[0]=="M")e=i=r[1],f=j=r[2];else{r[0]=="C"?(m=[e,f].concat(r.slice(1)),e=m[6],f=m[7]):(m=[e,f,e,f,i,j,i,j],e=i,f=j);for(var s=0,t=c.length;s<t;s++){var u=c[s];if(u[0]=="M")g=k=u[1],h=l=u[2];else{u[0]=="C"?(n=[g,h].concat(u.slice(1)),g=n[6],h=n[7]):(n=[g,h,g,h,k,l,k,l],g=k,h=l);var v=bG(m,n,d);if(d)o+=v;else{for(var w=0,x=v.length;w<x;w++)v[w].segment1=p,v[w].segment2=s,v[w].bez1=m,v[w].bez2=n;o=o.concat(v)}}}}}return o}function bG(b,c,d){var e=a.bezierBBox(b),f=a.bezierBBox(c);if(!a.isBBoxIntersect(e,f))return d?0:[];var g=bB.apply(0,b),h=bB.apply(0,c),i=~~(g/5),j=~~(h/5),k=[],l=[],m={},n=d?0:[];for(var o=0;o<i+1;o++){var p=a.findDotsAtSegment.apply(a,b.concat(o/i));k.push({x:p.x,y:p.y,t:o/i})}for(o=0;o<j+1;o++)p=a.findDotsAtSegment.apply(a,c.concat(o/j)),l.push({x:p.x,y:p.y,t:o/j});for(o=0;o<i;o++)for(var q=0;q<j;q++){var r=k[o],s=k[o+1],t=l[q],u=l[q+1],v=z(s.x-r.x)<.001?"y":"x",w=z(u.x-t.x)<.001?"y":"x",x=bD(r.x,r.y,s.x,s.y,t.x,t.y,u.x,u.y);if(x){if(m[x.x.toFixed(4)]==x.y.toFixed(4))continue;m[x.x.toFixed(4)]=x.y.toFixed(4);var y=r.t+z((x[v]-r[v])/(s[v]-r[v]))*(s.t-r.t),A=t.t+z((x[w]-t[w])/(u[w]-t[w]))*(u.t-t.t);y>=0&&y<=1&&A>=0&&A<=1&&(d?n++:n.push({x:x.x,y:x.y,t1:y,t2:A}))}}return n}function bF(a,b){return bG(a,b,1)}function bE(a,b){return bG(a,b)}function bD(a,b,c,d,e,f,g,h){if(!(x(a,c)<y(e,g)||y(a,c)>x(e,g)||x(b,d)<y(f,h)||y(b,d)>x(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(!k)return;var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(n<+y(a,c).toFixed(2)||n>+x(a,c).toFixed(2)||n<+y(e,g).toFixed(2)||n>+x(e,g).toFixed(2)||o<+y(b,d).toFixed(2)||o>+x(b,d).toFixed(2)||o<+y(f,h).toFixed(2)||o>+x(f,h).toFixed(2))return;return{x:l,y:m}}}function bC(a,b,c,d,e,f,g,h,i){if(!(i<0||bB(a,b,c,d,e,f,g,h)<i)){var j=1,k=j/2,l=j-k,m,n=.01;m=bB(a,b,c,d,e,f,g,h,l);while(z(m-i)>n)k/=2,l+=(m<i?1:-1)*k,m=bB(a,b,c,d,e,f,g,h,l);return l}}function bB(a,b,c,d,e,f,g,h,i){i==null&&(i=1),i=i>1?1:i<0?0:i;var j=i/2,k=12,l=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],n=0;for(var o=0;o<k;o++){var p=j*l[o]+j,q=bA(p,a,c,e,g),r=bA(p,b,d,f,h),s=q*q+r*r;n+=m[o]*w.sqrt(s)}return j*n}function bA(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function by(a,b){var c=[];for(var d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function bx(){return this.hex}function bv(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[g](f)){bu(i,f);return c?c(h[f]):h[f]}i.length>=1e3&&delete h[i.shift()],i.push(f),h[f]=a[m](b,e);return c?c(h[f]):h[f]}return d}function bu(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function bm(a){if(Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[g](c)&&(b[c]=bm(a[c]));return b}function a(c){if(a.is(c,"function"))return b?c():eve.on("raphael.DOMload",c);if(a.is(c,E))return a._engine.create[m](a,c.splice(0,3+a.is(c[0],C))).add(c);var d=Array.prototype.slice.call(arguments,0);if(a.is(d[d.length-1],"function")){var e=d.pop();return b?e.call(a._engine.create[m](a,d)):eve.on("raphael.DOMload",function(){e.call(a._engine.create[m](a,d))})}return a._engine.create[m](a,arguments)}a.version="2.1.0",a.eve=eve;var b,c=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},e=/\{(\d+)\}/g,f="prototype",g="hasOwnProperty",h={doc:document,win:window},i={was:Object.prototype[g].call(h.win,"Raphael"),is:h.win.Raphael},j=function(){this.ca=this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in h.doc,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v=r.prototype.toLowerCase,w=Math,x=w.max,y=w.min,z=w.abs,A=w.pow,B=w.PI,C="number",D="string",E="array",F="toString",G="fill",H=Object.prototype.toString,I={},J="push",K=a._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,L=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,M={NaN:1,Infinity:1,"-Infinity":1},N=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,O=w.round,P="setAttribute",Q=parseFloat,R=parseInt,S=r.prototype.toUpperCase,T=a._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},U=a._availableAnimAttrs={blur:C,"clip-rect":"csv",cx:C,cy:C,fill:"colour","fill-opacity":C,"font-size":C,height:C,opacity:C,path:"path",r:C,rx:C,ry:C,stroke:"colour","stroke-opacity":C,"stroke-width":C,transform:"transform",width:C,x:C,y:C},V=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,W=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,X={hs:1,rg:1},Y=/,?([achlmqrstvxz]),?/gi,Z=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,$=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,_=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,ba=a._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,bb={},bc=function(a,b){return a.key-b.key},bd=function(a,b){return Q(a)-Q(b)},be=function(){},bf=function(a){return a},bg=a._rectPath=function(a,b,c,d,e){if(e)return[["M",a+e,b],["l",c-e*2,0],["a",e,e,0,0,1,e,e],["l",0,d-e*2],["a",e,e,0,0,1,-e,e],["l",e*2-c,0],["a",e,e,0,0,1,-e,-e],["l",0,e*2-d],["a",e,e,0,0,1,e,-e],["z"]];return[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},bh=function(a,b,c,d){d==null&&(d=c);return[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},bi=a._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return bh(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return bh(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return bg(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return bg(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return bg(b.x,b.y,b.width,b.height)}},bj=a.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;a=bR(a);for(e=0,g=a.length;e<g;e++){i=a[e];for(f=1,h=i.length;f<h;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d}return a};a._g=h,a.type=h.win.SVGAngle||h.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bk=h.doc.createElement("div"),bl;bk.innerHTML='<v:shape adj="1"/>',bl=bk.firstChild,bl.style.behavior="url(#default#VML)";if(!bl||typeof bl.adj!="object")return a.type=p;bk=null}a.svg=!(a.vml=a.type=="VML"),a._Paper=j,a.fn=k=j.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){b=v.call(b);if(b=="finite")return!M[g](+a);if(b=="array")return a instanceof Array;return b=="null"&&a===null||b==typeof a&&a!==null||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||H.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+w.atan2(-i,-h)*180/B+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*B/180},a.deg=function(a){return a*180/B%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,E)){var e=b.length;while(e--)if(z(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};var bn=a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=w.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){eve("raphael.setWindow",a,h.win,b),h.win=b,h.doc=h.win.document,a._engine.initWin&&a._engine.initWin(h.win)};var bo=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var g=d.createTextRange();bo=bv(function(a){try{d.style.color=r(a).replace(c,p);var b=g.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=h.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",h.doc.body.appendChild(i),bo=bv(function(a){i.style.color=a;return h.doc.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bo(b)},bp=function(){return"hsb("+[this.h,this.s,this.b]+")"},bq=function(){return"hsl("+[this.h,this.s,this.l]+")"},br=function(){return this.hex},bs=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,D)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},bt=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:br};a.is(e,"finite")&&(f.opacity=e);return f};a.color=function(b){var c;a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=br;return b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-z(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-z(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=x(a,b,c),g=f-y(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bp}},a.rgb2hsl=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=x(a,b,c),h=y(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bq}},a._path2string=function(){return this.join(",").replace(Y,"$1")};var bw=a._preload=function(a,b){var c=h.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,h.doc.body.removeChild(this)},c.onerror=function(){h.doc.body.removeChild(this)},h.doc.body.appendChild(c),c.src=a};a.getRGB=bv(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:bx};!X[g](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bo(b));var c,d,e,f,h,i,j,k=b.match(L);if(k){k[2]&&(f=R(k[2].substring(5),16),e=R(k[2].substring(3,5),16),d=R(k[2].substring(1,3),16)),k[3]&&(f=R((i=k[3].charAt(3))+i,16),e=R((i=k[3].charAt(2))+i,16),d=R((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,f,h)}if(k[6]){j=k[6][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,f,h)}k={r:d,g:e,b:f,toString:bx},k.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx}},a),a.hsb=bv(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=bv(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=bv(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=function(b){if(!b)return null;var c=bz(b);if(c.arr)return bJ(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];a.is(b,E)&&a.is(b[0],E)&&(e=bJ(b)),e.length||r(b).replace(Z,function(a,b,c){var f=[],g=b.toLowerCase();c.replace(_,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(e.push([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");if(g=="r")e.push([b][n](f));else while(f.length>=d[g]){e.push([b][n](f.splice(0,d[g])));if(!d[g])break}}),e.toString=a._path2string,c.arr=bJ(e);return e},a.parseTransformString=bv(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=bJ(b)),d.length||r(b).replace($,function(a,b,c){var e=[],f=v.call(b);c.replace(_,function(a,b){b&&e.push(+b)}),d.push([b][n](e))}),d.toString=a._path2string;return d});var bz=function(a){var b=bz.ps=bz.ps||{};b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[g](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])});return b[a]};a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3),l=A(j,2),m=i*i,n=m*i,o=k*a+l*3*i*c+j*3*i*i*e+n*g,p=k*b+l*3*i*d+j*3*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,x=j*e+i*g,y=j*f+i*h,z=90-w.atan2(q-s,r-t)*180/B;(q>s||r<t)&&(z+=180);return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:x,y:y},alpha:z}},a.bezierBBox=function(b,c,d,e,f,g,h,i){a.is(b,"array")||(b=[b,c,d,e,f,g,h,i]);var j=bQ.apply(null,b);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},a.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},a.isBBoxIntersect=function(b,c){var d=a.isPointInsideBBox;return d(c,b.x,b.y)||d(c,b.x2,b.y)||d(c,b.x,b.y2)||d(c,b.x2,b.y2)||d(b,c.x,c.y)||d(b,c.x2,c.y)||d(b,c.x,c.y2)||d(b,c.x2,c.y2)||(b.x<c.x2&&b.x>c.x||c.x<b.x2&&c.x>b.x)&&(b.y<c.y2&&b.y>c.y||c.y<b.y2&&c.y>b.y)},a.pathIntersection=function(a,b){return bH(a,b)},a.pathIntersectionNumber=function(a,b){return bH(a,b,1)},a.isPointInsidePath=function(b,c,d){var e=a.pathBBox(b);return a.isPointInsideBBox(e,c,d)&&bH(b,[["M",c,d],["H",e.x2+10]],1)%2==1},a._removedFactory=function(a){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var bI=a.pathBBox=function(a){var b=bz(a);if(b.bbox)return bm(b.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=bR(a);var c=0,d=0,e=[],f=[],g;for(var h=0,i=a.length;h<i;h++){g=a[h];if(g[0]=="M")c=g[1],d=g[2],e.push(c),f.push(d);else{var j=bQ(c,d,g[1],g[2],g[3],g[4],g[5],g[6]);e=e[n](j.min.x,j.max.x),f=f[n](j.min.y,j.max.y),c=g[5],d=g[6]}}var k=y[m](0,e),l=y[m](0,f),o=x[m](0,e),p=x[m](0,f),q={x:k,y:l,x2:o,y2:p,width:o-k,height:p-l};b.bbox=bm(q);return q},bJ=function(b){var c=bm(b);c.toString=a._path2string;return c},bK=a._pathToRelative=function(b){var c=bz(b);if(c.rel)return bJ(c.rel);if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);var d=[],e=0,f=0,g=0,h=0,i=0;b[0][0]=="M"&&(e=b[0][1],f=b[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=b.length;j<k;j++){var l=d[j]=[],m=b[j];if(m[0]!=v.call(m[0])){l[0]=v.call(m[0]);switch(l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;n<o;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}}else{l=d[j]=[],m[0]=="m"&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;p<q;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}d.toString=a._path2string,c.rel=bJ(d);return d},bL=a._pathToAbsolute=function(b){var c=bz(b);if(c.abs)return bJ(c.abs);if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);if(!b||!b.length)return[["M",0,0]];var d=[],e=0,f=0,g=0,h=0,i=0;b[0][0]=="M"&&(e=+b[0][1],f=+b[0][2],g=e,h=f,i++,d[0]=["M",e,f]);var j=b.length==3&&b[0][0]=="M"&&b[1][0].toUpperCase()=="R"&&b[2][0].toUpperCase()=="Z";for(var k,l,m=i,o=b.length;m<o;m++){d.push(k=[]),l=b[m];if(l[0]!=S.call(l[0])){k[0]=S.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":var p=[e,f][n](l.slice(1));for(var q=2,r=p.length;q<r;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[n](by(p,j));break;case"M":g=+l[1]+e,h=+l[2]+f;default:for(q=1,r=l.length;q<r;q++)k[q]=+l[q]+(q%2?e:f)}}else if(l[0]=="R")p=[e,f][n](l.slice(1)),d.pop(),d=d[n](by(p,j)),k=["R"][n](l.slice(-2));else for(var s=0,t=l.length;s<t;s++)k[s]=l[s];switch(k[0]){case"Z":e=g,f=h;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":g=k[k.length-2],h=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}d.toString=a._path2string,c.abs=bJ(d);return d},bM=function(a,b,c,d){return[a,b,c,d,c,d]},bN=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bO=function(a,b,c,d,e,f,g,h,i,j){var k=B*120/180,l=B/180*(+e||0),m=[],o,p=bv(function(a,b,c){var d=a*w.cos(c)-b*w.sin(c),e=a*w.sin(c)+b*w.cos(c);return{x:d,y:e}});if(!j){o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=w.cos(B/180*e),r=w.sin(B/180*e),t=(a-h)/2,u=(b-i)/2,v=t*t/(c*c)+u*u/(d*d);v>1&&(v=w.sqrt(v),c=v*c,d=v*d);var x=c*c,y=d*d,A=(f==g?-1:1)*w.sqrt(z((x*y-x*u*u-y*t*t)/(x*u*u+y*t*t))),C=A*c*u/d+(a+h)/2,D=A*-d*t/c+(b+i)/2,E=w.asin(((b-D)/d).toFixed(9)),F=w.asin(((i-D)/d).toFixed(9));E=a<C?B-E:E,F=h<C?B-F:F,E<0&&(E=B*2+E),F<0&&(F=B*2+F),g&&E>F&&(E=E-B*2),!g&&F>E&&(F=F-B*2)}else E=j[0],F=j[1],C=j[2],D=j[3];var G=F-E;if(z(G)>k){var H=F,I=h,J=i;F=E+k*(g&&F>E?1:-1),h=C+c*w.cos(F),i=D+d*w.sin(F),m=bO(h,i,c,d,e,0,g,I,J,[F,H,C,D])}G=F-E;var K=w.cos(E),L=w.sin(E),M=w.cos(F),N=w.sin(F),O=w.tan(G/4),P=4/3*c*O,Q=4/3*d*O,R=[a,b],S=[a+P*L,b-Q*K],T=[h+P*N,i-Q*M],U=[h,i];S[0]=2*R[0]-S[0],S[1]=2*R[1]-S[1];if(j)return[S,T,U][n](m);m=[S,T,U][n](m).join()[s](",");var V=[];for(var W=0,X=m.length;W<X;W++)V[W]=W%2?p(m[W-1],m[W],l).y:p(m[W],m[W+1],l).x;return V},bP=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,y:A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h}},bQ=bv(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:y[m](0,p),y:y[m](0,o)},max:{x:x[m](0,p),y:x[m](0,o)}}}),bR=a._path2curve=bv(function(a,b){var c=!b&&bz(a);if(!b&&c.curve)return bJ(c.curve);var d=bL(a),e=b&&bL(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bO[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bN(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bN(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bM(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bM(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bM(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bM(b.x,b.y,b.X,b.Y))}return a},i=function(a,b){if(a[b].length>7){a[b].shift();var c=a[b];while(c.length)a.splice(b++,0,["C"][n](c.splice(0,6)));a.splice(b,1),l=x(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=x(d.length,e&&e.length||0))};for(var k=0,l=x(d.length,e&&e.length||0);k<l;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var o=d[k],p=e&&e[k],q=o.length,r=e&&p.length;f.x=o[q-2],f.y=o[q-1],f.bx=Q(o[q-4])||f.x,f.by=Q(o[q-3])||f.y,g.bx=e&&(Q(p[r-4])||g.x),g.by=e&&(Q(p[r-3])||g.y),g.x=e&&p[r-2],g.y=e&&p[r-1]}e||(c.curve=bJ(d));return e?[d,e]:d},null,bJ),bS=a._parseDots=bv(function(b){var c=[];for(var d=0,e=b.length;d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){var h=Q(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=Q(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),bT=a._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bU=a._tofront=function(a,b){b.top!==a&&(bT(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bV=a._toback=function(a,b){b.bottom!==a&&(bT(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bW=a._insertafter=function(a,b,c){bT(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bX=a._insertbefore=function(a,b,c){bT(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bY=a.toMatrix=function(a,b){var c=bI(a),d={_:{transform:p},getBBox:function(){return c}};b$(d,b);return d.matrix},bZ=a.transformPath=function(a,b){return bj(a,bY(a,b))},b$=a._extractTransform=function(b,c){if(c==null)return b._.transform;c=r(c).replace(/\.{3}|\u2026/g,b._.transform||p);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new cb;j.transform=d||[];if(d)for(var l=0,m=d.length;l<m;l++){var n=d[l],o=n.length,q=r(n[0]).toLowerCase(),s=n[0]!=q,t=s?k.invert():0,u,v,w,x,y;q=="t"&&o==3?s?(u=t.x(0,0),v=t.y(0,0),w=t.x(n[1],n[2]),x=t.y(n[1],n[2]),k.translate(w-u,x-v)):k.translate(n[1],n[2]):q=="r"?o==2?(y=y||b.getBBox(1),k.rotate(n[1],y.x+y.width/2,y.y+y.height/2),e+=n[1]):o==4&&(s?(w=t.x(n[2],n[3]),x=t.y(n[2],n[3]),k.rotate(n[1],w,x)):k.rotate(n[1],n[2],n[3]),e+=n[1]):q=="s"?o==2||o==3?(y=y||b.getBBox(1),k.scale(n[1],n[o-1],y.x+y.width/2,y.y+y.height/2),h*=n[1],i*=n[o-1]):o==5&&(s?(w=t.x(n[3],n[4]),x=t.y(n[3],n[4]),k.scale(n[1],n[2],w,x)):k.scale(n[1],n[2],n[3],n[4]),h*=n[1],i*=n[2]):q=="m"&&o==7&&k.add(n[1],n[2],n[3],n[4],n[5],n[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,h==1&&i==1&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1},b_=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return a.length==4?[b,0,a[2],a[3]]:[b,0];case"s":return a.length==5?[b,1,1,a[3],a[4]]:a.length==3?[b,1,1]:[b,1]}},ca=a._equaliseTransform=function(b,c){c=r(c).replace(/\.{3}|\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];var d=x(b.length,c.length),e=[],f=[],g=0,h,i,j,k;for(;g<d;g++){j=b[g]||b_(c[g]),k=c[g]||b_(j);if(j[0]!=k[0]||j[0].toLowerCase()=="r"&&(j[2]!=k[2]||j[3]!=k[3])||j[0].toLowerCase()=="s"&&(j[3]!=k[3]||j[4]!=k[4]))return;e[g]=[],f[g]=[];for(h=0,i=x(j.length,k.length);h<i;h++)h in j&&(e[g][h]=j[h]),h in k&&(f[g][h]=k[h])}return{from:e,to:f}};a._getContainer=function(b,c,d,e){var f;f=e==null&&!a.is(b,"object")?h.doc.getElementById(b):b;if(f!=null){if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d};return{container:1,x:b,y:c,width:d,height:e}}},a.pathToRelative=bK,a._engine={},a.path2curve=bR,a.matrix=function(a,b,c,d,e,f){return new cb(a,b,c,d,e,f)},function(b){function d(a){var b=w.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}function c(a){return a[0]*a[0]+a[1]*a[1]}b.add=function(a,b,c,d,e,f){var g=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],i=[[a,c,e],[b,d,f],[0,0,1]],j,k,l,m;a&&a instanceof cb&&(i=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]);for(j=0;j<3;j++)for(k=0;k<3;k++){m=0;for(l=0;l<3;l++)m+=h[j][l]*i[l][k];g[j][k]=m}this.a=g[0][0],this.b=g[1][0],this.c=g[0][1],this.d=g[1][1],this.e=g[0][2],this.f=g[1][2]},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new cb(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},b.clone=function(){return new cb(this.a,this.b,this.c,this.d,this.e,this.f)},b.translate=function(a,b){this.add(1,0,0,1,a,b)},b.scale=function(a,b,c,d){b==null&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},b.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var e=+w.cos(b).toFixed(9),f=+w.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},b.x=function(a,b){return a*this.a+b*this.c+this.e},b.y=function(a,b){return a*this.b+b*this.d+this.f},b.get=function(a){return+this[r.fromCharCode(97+a)].toFixed(4)},b.toString=function(){return a.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},b.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];b.scalex=w.sqrt(c(e[0])),d(e[0]),b.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*b.shear,e[1][1]-e[0][1]*b.shear],b.scaley=w.sqrt(c(e[1])),d(e[1]),b.shear/=b.scaley;var f=-e[0][1],g=e[1][1];g<0?(b.rotate=a.deg(w.acos(g)),f<0&&(b.rotate=360-b.rotate)):b.rotate=a.deg(w.asin(f)),b.isSimple=!+b.shear.toFixed(9)&&(b.scalex.toFixed(9)==b.scaley.toFixed(9)||!b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate;return b},b.toTransformString=function(a){var b=a||this[s]();if(b.isSimple){b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4);return(b.dx||b.dy?"t"+[b.dx,b.dy]:p)+(b.scalex!=1||b.scaley!=1?"s"+[b.scalex,b.scaley,0,0]:p)+(b.rotate?"r"+[b.rotate,0,0]:p)}return"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(cb.prototype);var cc=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(cc&&cc[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&cc&&cc[1]<8?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:k.safari=be;var cd=function(){this.returnValue=!1},ce=function(){return this.originalEvent.preventDefault()},cf=function(){this.cancelBubble=!0},cg=function(){return this.originalEvent.stopPropagation()},ch=function(){if(h.doc.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,f=function(e){var f=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,i=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,j=e.clientX+i,k=e.clientY+f;if(o&&u[g](b))for(var l=0,m=e.targetTouches&&e.targetTouches.length;l<m;l++)if(e.targetTouches[l].target==a){var n=e;e=e.targetTouches[l],e.originalEvent=n,e.preventDefault=ce,e.stopPropagation=cg;break}return c.call(d,e,j,k)};a.addEventListener(e,f,!1);return function(){a.removeEventListener(e,f,!1);return!0}};if(h.doc.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.win.event;var b=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;a.preventDefault=a.preventDefault||cd,a.stopPropagation=a.stopPropagation||cf;return c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),ci=[],cj=function(a){var b=a.clientX,c=a.clientY,d=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f,g=ci.length;while(g--){f=ci[g];if(o){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();var k=f.el.node,l,m=k.nextSibling,n=k.parentNode,p=k.style.display;h.win.opera&&n.removeChild(k),k.style.display="none",l=f.el.paper.getElementByPoint(b,c),k.style.display=p,h.win.opera&&(m?n.insertBefore(k,m):n.appendChild(k)),l&&eve("raphael.drag.over."+f.el.id,f.el,l),b+=e,c+=d,eve("raphael.drag.move."+f.el.id,f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},ck=function(b){a.unmousemove(cj).unmouseup(ck);var c=ci.length,d;while(c--)d=ci[c],d.el._drag={},eve("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,b);ci=[]},cl=a.el={};for(var cm=t.length;cm--;)(function(b){a[b]=cl[b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:ch(this.shape||this.node||h.doc,b,c,d||this)}));return this},a["un"+b]=cl["un"+b]=function(a){var c=this.events||[],d=c.length;while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(t[cm]);cl.data=function(b,c){var d=bb[this.id]=bb[this.id]||{};if(arguments.length==1){if(a.is(b,"object")){for(var e in b)b[g](e)&&this.data(e,b[e]);return this}eve("raphael.data.get."+this.id,this,d[b],b);return d[b]}d[b]=c,eve("raphael.data.set."+this.id,this,c,b);return this},cl.removeData=function(a){a==null?bb[this.id]={}:bb[this.id]&&delete bb[this.id][a];return this},cl.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},cl.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var cn=[];cl.drag=function(b,c,d,e,f,g){function i(i){(i.originalEvent||i).preventDefault();var j=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,k=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!ci.length&&a.mousemove(cj).mouseup(ck),ci.push({el:this,move_scope:e,start_scope:f,end_scope:g}),c&&eve.on("raphael.drag.start."+this.id,c),b&&eve.on("raphael.drag.move."+this.id,b),d&&eve.on("raphael.drag.end."+this.id,d),eve("raphael.drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}this._drag={},cn.push({el:this,start:i}),this.mousedown(i);return this},cl.onDragOver=function(a){a?eve.on("raphael.drag.over."+this.id,a):eve.unbind("raphael.drag.over."+this.id)},cl.undrag=function(){var b=cn.length;while(b--)cn[b].el==this&&(this.unmousedown(cn[b].start),cn.splice(b,1),eve.unbind("raphael.drag.*."+this.id));!cn.length&&a.unmousemove(cj).unmouseup(ck)},k.circle=function(b,c,d){var e=a._engine.circle(this,b||0,c||0,d||0);this.__set__&&this.__set__.push(e);return e},k.rect=function(b,c,d,e,f){var g=a._engine.rect(this,b||0,c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.ellipse=function(b,c,d,e){var f=a._engine.ellipse(this,b||0,c||0,d||0,e||0);this.__set__&&this.__set__.push(f);return f},k.path=function(b){b&&!a.is(b,D)&&!a.is(b[0],E)&&(b+=p);var c=a._engine.path(a.format[m](a,arguments),this);this.__set__&&this.__set__.push(c);return c},k.image=function(b,c,d,e,f){var g=a._engine.image(this,b||"about:blank",c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.text=function(b,c,d){var e=a._engine.text(this,b||0,c||0,r(d));this.__set__&&this.__set__.push(e);return e},k.set=function(b){!a.is(b,"array")&&(b=Array.prototype.splice.call(arguments,0,arguments.length));var c=new cG(b);this.__set__&&this.__set__.push(c);return c},k.setStart=function(a){this.__set__=a||this.set()},k.setFinish=function(a){var b=this.__set__;delete this.__set__;return b},k.setSize=function(b,c){return a._engine.setSize.call(this,b,c)},k.setViewBox=function(b,c,d,e,f){return a._engine.setViewBox.call(this,b,c,d,e,f)},k.top=k.bottom=null,k.raphael=a;var co=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,i=b.top+(h.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(h.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:i,x:j}};k.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=h.doc.elementFromPoint(a,b);if(h.win.opera&&e.tagName=="svg"){var f=co(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var i=d.getIntersectionList(g,null);i.length&&(e=i[i.length-1])}if(!e)return null;while(e.parentNode&&e!=d.parentNode&&!e.raphael)e=e.parentNode;e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null;return e},k.getById=function(a){var b=this.bottom;while(b){if(b.id==a)return b;b=b.next}return null},k.forEach=function(a,b){var c=this.bottom;while(c){if(a.call(b,c)===!1)return this;c=c.next}return this},k.getElementsByPoint=function(a,b){var c=this.set();this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)});return c},cl.isPointInside=function(b,c){var d=this.realPath=this.realPath||bi[this.type](this);return a.isPointInsidePath(d,b,c)},cl.getBBox=function(a){if(this.removed)return{};var b=this._;if(a){if(b.dirty||!b.bboxwt)this.realPath=bi[this.type](this),b.bboxwt=bI(this.realPath),b.bboxwt.toString=cq,b.dirty=0;return bm(b.bboxwt)}if(b.dirty||b.dirtyT||!b.bbox){if(b.dirty||!this.realPath)b.bboxwt=0,this.realPath=bi[this.type](this);b.bbox=bI(bj(this.realPath,this.matrix)),b.bbox.toString=cq,b.dirty=b.dirtyT=0}return bm(b.bbox)},cl.getBBoxWOTransform=function(){return this.getBBox(1)},cl.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());this.__set__&&this.__set__.push(a);return a},cl.glow=function(a){if(this.type=="text")return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||bi[this.type](this);f=this.matrix?bj(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cr={},cs=function(b,c,d,e,f,g,h,i,j){return j==null?bB(b,c,d,e,f,g,h,i):a.findDotsAtSegment(b,c,d,e,f,g,h,i,bC(b,c,d,e,f,g,h,i,j))},ct=function(b,c){return function(d,e,f){d=bR(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cu=ct(1),cv=ct(),cw=ct(0,1);a.getTotalLength=cu,a.getPointAtLength=cv,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return cw(a,b).end;var d=cw(a,c,1);return b?cw(d,b).end:d},cl.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return cu(this.attrs.path)}},cl.getPointAtLength=function(a){if(this.type=="path")return cv(this.attrs.path,a)},cl.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var cx=a.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,1.7)},">":function(a){return A(a,.48)},"<>":function(a){var b=.48-a/1.04,c=w.sqrt(.1734+b*b),d=c-b,e=A(z(d),1/3)*(d<0?-1:1),f=-c-b,g=A(z(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return A(2,-10*a)*w.sin((a-.075)*2*B/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};cx.easeIn=cx["ease-in"]=cx["<"],cx.easeOut=cx["ease-out"]=cx[">"],cx.easeInOut=cx["ease-in-out"]=cx["<>"],cx["back-in"]=cx.backIn,cx["back-out"]=cx.backOut;var cy=[],cz=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cA=function(){var b=+(new Date),c=0;for(;c<cy.length;c++){var d=cy[c];if(d.el.removed||d.paused)continue;var e=b-d.start,f=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,o={},p,r={},s;d.initstatus?(e=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*f,d.status=d.initstatus,delete d.initstatus,d.stop&&cy.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(e/f))/d.anim.top;if(e<0)continue;if(e<f){var t=h(e/f);for(var u in i)if(i[g](u)){switch(U[u]){case C:p=+i[u]+t*f*j[u];break;case"colour":p="rgb("+[cB(O(i[u].r+t*f*j[u].r)),cB(O(i[u].g+t*f*j[u].g)),cB(O(i[u].b+t*f*j[u].b))].join(",")+")";break;case"path":p=[];for(var v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(var x=1,y=i[u][v].length;x<y;x++)p[v][x]=+i[u][v][x]+t*f*j[u][v][x];p[v]=p[v].join(q)}p=p.join(q);break;case"transform":if(j[u].real){p=[];for(v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(x=1,y=i[u][v].length;x<y;x++)p[v][x]=i[u][v][x]+t*f*j[u][v][x]}}else{var z=function(a){return+i[u][a]+t*f*j[u][a]};p=[["m",z(0),z(1),z(2),z(3),z(4),z(5)]]}break;case"csv":if(u=="clip-rect"){p=[],v=4;while(v--)p[v]=+i[u][v]+t*f*j[u][v]}break;default:var A=[][n](i[u]);p=[],v=m.paper.customAttributes[u].length;while(v--)p[v]=+A[v]+t*f*j[u][v]}o[u]=p}m.attr(o),function(a,b,c){setTimeout(function(){eve("raphael.anim.frame."+a,b,c)})}(m.id,m,d.anim)}else{(function(b,c,d){setTimeout(function(){eve("raphael.anim.frame."+c.id,c,d),eve("raphael.anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})})(d.callback,m,d.anim),m.attr(k),cy.splice(c--,1);if(d.repeat>1&&!d.next){for(s in k)k[g](s)&&(r[s]=d.totalOrigin[s]);d.el.attr(r),cE(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&cE(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}a.svg&&m&&m.paper&&m.paper.safari(),cy.length&&cz(cA)},cB=function(a){return a>255?255:a<0?0:a};cl.animateWith=function(b,c,d,e,f,g){var h=this;if(h.removed){g&&g.call(h);return h}var i=d instanceof cD?d:a.animation(d,e,f,g),j,k;cE(i,h,i.percents[0],null,h.attr());for(var l=0,m=cy.length;l<m;l++)if(cy[l].anim==c&&cy[l].el==b){cy[m-1].start=cy[l].start;break}return h},cl.onAnimation=function(a){a?eve.on("raphael.anim.frame."+this.id,a):eve.unbind("raphael.anim.frame."+this.id);return this},cD.prototype.delay=function(a){var b=new cD(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cD.prototype.repeat=function(a){var b=new cD(this.anim,this.ms);b.del=this.del,b.times=w.floor(x(a,0))||1;return b},a.animation=function(b,c,d,e){if(b instanceof cD)return b;if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var f={},h,i;for(i in b)b[g](i)&&Q(i)!=i&&Q(i)+"%"!=i&&(h=!0,f[i]=b[i]);if(!h)return new cD(b,c);d&&(f.easing=d),e&&(f.callback=e);return new cD({100:f},c)},cl.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cD?b:a.animation(b,c,d,e);cE(g,f,g.percents[0],null,f.attr());return f},cl.setTime=function(a,b){a&&b!=null&&this.status(a,y(b,a.ms)/a.ms);return this},cl.status=function(a,b){var c=[],d=0,e,f;if(b!=null){cE(a,this,-1,y(b,1));return this}e=cy.length;for(;d<e;d++){f=cy[d];if(f.el.id==this.id&&(!a||f.anim==a)){if(a)return f.status;c.push({anim:f.anim,status:f.status})}}if(a)return 0;return c},cl.pause=function(a){for(var b=0;b<cy.length;b++)cy[b].el.id==this.id&&(!a||cy[b].anim==a)&&eve("raphael.anim.pause."+this.id,this,cy[b].anim)!==!1&&(cy[b].paused=!0);return this},cl.resume=function(a){for(var b=0;b<cy.length;b++)if(cy[b].el.id==this.id&&(!a||cy[b].anim==a)){var c=cy[b];eve("raphael.anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},cl.stop=function(a){for(var b=0;b<cy.length;b++)cy[b].el.id==this.id&&(!a||cy[b].anim==a)&&eve("raphael.anim.stop."+this.id,this,cy[b].anim)!==!1&&cy.splice(b--,1);return this},eve.on("raphael.remove",cF),eve.on("raphael.clear",cF),cl.toString=function(){return"Raphaël’s object"};var cG=function(a){this.items=[],this.length=0,this.type="set";if(a)for(var b=0,c=a.length;b<c;b++)a[b]&&(a[b].constructor==cl.constructor||a[b].constructor==cG)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},cH=cG.prototype;cH.push=function(){var a,b;for(var c=0,d=arguments.length;c<d;c++)a=arguments[c],a&&(a.constructor==cl.constructor||a.constructor==cG)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},cH.pop=function(){this.length&&delete this[this.length--];return this.items.pop()},cH.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var cI in cl)cl[g](cI)&&(cH[cI]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][m](c,b)})}}(cI));cH.attr=function(b,c){if(b&&a.is(b,E)&&a.is(b[0],"object"))for(var d=0,e=b.length;d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(b,c);return this},cH.clear=function(){while(this.length)this.pop()},cH.splice=function(a,b,c){a=a<0?x(this.length+a,0):a,b=x(0,y(this.length-a,b));var d=[],e=[],f=[],g;for(g=2;g<arguments.length;g++)f.push(arguments[g]);for(g=0;g<b;g++)e.push(this[a+g]);for(;g<this.length-a;g++)d.push(this[a+g]);var h=f.length;for(g=0;g<h+d.length;g++)this.items[a+g]=this[a+g]=g<h?f[g]:d[g-h];g=this.items.length=this.length-=b-h;while(this[g])delete this[g++];return new cG(e)},cH.exclude=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]==a){this.splice(b,1);return!0}},cH.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items.length,g=f,h,i=this,j;if(!f)return this;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,D)?d:j;var k=a.animation(b,c,d,j);h=this.items[--g].animate(k);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,k,k);return this},cH.insertAfter=function(a){var b=this.items.length;while(b--)this.items[b].insertAfter(a);return this},cH.getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}a=y[m](0,a),b=y[m](0,b),c=x[m](0,c),d=x[m](0,d);return{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},cH.clone=function(a){a=new cG;for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},cH.toString=function(){return"Raphaël‘s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[g](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=R(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[g](e)){var f=a.glyphs[e];b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"};if(f.k)for(var h in f.k)f[g](h)&&(b.glyphs[e].k[h]=f.k[h])}}return a},k.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400;if(!!a.fonts){var f=a.fonts[b];if(!f){var h=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,p)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[g](i)&&h.test(i)){f=a.fonts[i];break}}var j;if(f)for(var k=0,l=f.length;k<l;k++){j=f[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},k.print=function(b,d,e,f,g,h,i){h=h||"middle",i=x(y(i||0,1),-1);var j=r(e)[s](p),k=0,l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox[s](c),q=+o[0],t=o[3]-o[1],u=0,v=+o[1]+(h=="baseline"?t+ +f.face.descent:t/2);for(var w=0,z=j.length;w<z;w++){if(j[w]=="\n")k=0,B=0,l=0,u+=t;else{var A=l&&f.glyphs[j[w-1]]||{},B=f.glyphs[j[w]];k+=l?(A.w||f.w)+(A.k&&A.k[j[w]]||0)+f.w*i:0,l=1}B&&B.d&&(m+=a.transformPath(B.d,["t",k*n,u*n,"s",n,n,q,v,"t",(b-q)/n,(d-v)/n]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},k.add=function(b){if(a.is(b,"array")){var c=this.set(),e=0,f=b.length,h;for(;e<f;e++)h=b[e]||{},d[g](h.type)&&c.push(this[h.type]().attr(h))}return c},a.format=function(b,c){var d=a.is(c,E)?[0][n](c):arguments;b&&a.is(b,D)&&d.length-1&&(b=b.replace(e,function(a,b){return d[++b]==null?p:d[b]}));return b||p},a.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),typeof e=="function"&&f&&(e=e()))}),e=(e==null||e==d?a:e)+"";return e};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),a.ninja=function(){i.was?h.win.Raphael=i.is:delete Raphael;return a},a.st=cH,function(b,c,d){function e(){/in/.test(b.readyState)?setTimeout(e,9):a.eve("raphael.DOMload")}b.readyState==null&&b.addEventListener&&(b.addEventListener(c,d=function(){b.removeEventListener(c,d,!1),b.readyState="complete"},!1),b.readyState="loading"),e()}(document,"DOMContentLoaded"),i.was?h.win.Raphael=a:Raphael=a,eve.on("raphael.DOMload",function(){b=!0})}(),window.Raphael.svg&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var q=function(d,e){if(e){typeof d=="string"&&(d=q(d));for(var f in e)e[b](f)&&(f.substring(0,6)=="xlink:"?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){e=c(e).replace(a._radial_gradient,function(a,b,c){j="radial";if(b&&c){m=d(b),n=d(c);var e=(n>.5)*2-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&n!=.5&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/);if(j=="linear"){var t=e.shift();t=-d(t);if(isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient);if(!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,j=="radial"?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x<y;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}q(o,{fill:"url(#"+k+")",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1;return 1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if(d.type=="path"){var g=c(e).toLowerCase().split("-"),h=d.paper,i=f?"end":"start",j=d.node,k=d.attrs,m=k["stroke-width"],n=g.length,r="classic",s,t,u,v,w,x=3,y=3,z=5;while(n--)switch(g[n]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":r=g[n];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}r=="open"?(x+=2,y+=2,z+=2,u=1,v=f?4:1,w={fill:"none",stroke:k.stroke}):(v=u=x/2,w={fill:k.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={};if(r!="none"){var A="raphael-marker-"+r,B="raphael-marker-"+i+r+x+y;a._g.doc.getElementById(A)?p[A]++:(h.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[r],id:A})),p[A]=1);var C=a._g.doc.getElementById(B),D;C?(p[B]++,D=C.getElementsByTagName("use")[0]):(C=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:v,refY:y/2}),D=q(q("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),C.appendChild(D),h.defs.appendChild(C),p[B]=1),q(D,w);var F=u*(r!="diamond"&&r!="oval");f?(s=d._.arrows.startdx*m||0,t=a.getTotalLength(k.path)-F*m):(s=F*m,t=a.getTotalLength(k.path)-(d._.arrows.enddx*m||0)),w={},w["marker-"+i]="url(#"+B+")";if(t||s)w.d=Raphael.getSubpath(k.path,s,t);q(j,w),d._.arrows[i+"Path"]=A,d._.arrows[i+"Marker"]=B,d._.arrows[i+"dx"]=F,d._.arrows[i+"Type"]=r,d._.arrows[i+"String"]=e}else f?(s=d._.arrows.startdx*m||0,t=a.getTotalLength(k.path)-s):(s=0,t=a.getTotalLength(k.path)-(d._.arrows.enddx*m||0)),d._.arrows[i+"Path"]&&q(j,{d:Raphael.getSubpath(k.path,s,t)}),delete d._.arrows[i+"Path"],delete d._.arrows[i+"Marker"],delete d._.arrows[i+"dx"],delete d._.arrows[i+"Type"],delete d._.arrows[i+"String"];for(w in p)if(p[b](w)&&!p[w]){var G=a._g.doc.getElementById(w);G&&G.parentNode.removeChild(G)}}},u={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){b=u[c(b).toLowerCase()];if(b){var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;while(h--)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}};k.on("raphael.util.attr.blur",function(a){this.blur(a)}),k.on("raphael.util.attr.cursor",function(a){this.node.style.cursor=a});var w=function(d,f){var i=d.node,m=d.attrs,o=i.style.visibility;i.style.visibility="hidden";for(var p in f){k("raphael.util.attr."+p,d,f[p]);if(f[b](p)){if(!a._availableAttrs[b](p))continue;var u=f[p];m[p]=u;switch(p){case"blur":d.blur(u);break;case"href":case"title":case"target":var w=i.parentNode;if(w.tagName.toLowerCase()!="a"){var x=q("a");w.insertBefore(x,i),x.appendChild(i),w=x}p=="target"?w.setAttributeNS(n,"show",u=="blank"?"new":u):w.setAttributeNS(n,p,u);break;case"cursor":break;case"transform":d.transform(u);break;case"arrow-start":t(d,u);break;case"arrow-end":t(d,u,1);break;case"clip-rect":var z=c(u).split(j);if(z.length==4){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var A=q("clipPath"),B=q("rect");A.id=a.createUUID(),q(B,{x:z[0],y:z[1],width:z[2],height:z[3]}),A.appendChild(B),d.paper.defs.appendChild(A),q(i,{"clip-path":"url(#"+A.id+")"}),d.clip=B}if(!u){var C=i.getAttribute("clip-path");if(C){var D=a._g.doc.getElementById(C.replace(/(^url\(#|\)$)/g,l));D&&D.parentNode.removeChild(D),q(i,{"clip-path":l}),delete d.clip}}break;case"path":d.type=="path"&&(q(i,{d:u?m.path=a._pathToAbsolute(u):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":i.setAttribute(p,u),d._.dirty=1;if(m.fx)p="x",u=m.x;else break;case"x":m.fx&&(u=-m.x-(m.width||0));case"rx":if(p=="rx"&&d.type=="rect")break;case"cx":i.setAttribute(p,u),d.pattern&&s(d),d._.dirty=1;break;case"height":i.setAttribute(p,u),d._.dirty=1;if(m.fy)p="y",u=m.y;else break;case"y":m.fy&&(u=-m.y-(m.height||0));case"ry":if(p=="ry"&&d.type=="rect")break;case"cy":i.setAttribute(p,u),d.pattern&&s(d),d._.dirty=1;break;case"r":d.type=="rect"?q(i,{rx:u,ry:u}):i.setAttribute(p,u),d._.dirty=1;break;case"src":d.type=="image"&&i.setAttributeNS(n,"href",u);break;case"stroke-width":if(d._.sx!=1||d._.sy!=1)u/=g(h(d._.sx),h(d._.sy))||1;d.paper._vbSize&&(u*=d.paper._vbSize),i.setAttribute(p,u),m["stroke-dasharray"]&&v(d,m["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,u,f);break;case"fill":var F=c(u).match(a._ISURL);if(F){A=q("pattern");var G=q("image");A.id=a.createUUID(),q(A,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(G,{x:0,y:0,"xlink:href":F[1]}),A.appendChild(G),function(b){a._preload(F[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(G,{width:a,height:c}),d.paper.safari()})}(A),d.paper.defs.appendChild(A),q(i,{fill:"url(#"+A.id+")"}),d.pattern=A,d.pattern&&s(d);break}var H=a.getRGB(u);if(!H.error)delete f.gradient,delete m.gradient,!a.is(m.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:m.opacity}),!a.is(m["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":m["fill-opacity"]});else if((d.type=="circle"||d.type=="ellipse"||c(u).charAt()!="r")&&r(d,u)){if("opacity"in m||"fill-opacity"in m){var I=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(I){var J=I.getElementsByTagName("stop");q(J[J.length-1],{"stop-opacity":("opacity"in m?m.opacity:1)*("fill-opacity"in m?m["fill-opacity"]:1)})}}m.gradient=u,m.fill="none";break}H[b]("opacity")&&q(i,{"fill-opacity":H.opacity>1?H.opacity/100:H.opacity});case"stroke":H=a.getRGB(u),i.setAttribute(p,H.hex),p=="stroke"&&H[b]("opacity")&&q(i,{"stroke-opacity":H.opacity>1?H.opacity/100:H.opacity}),p=="stroke"&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":(d.type=="circle"||d.type=="ellipse"||c(u).charAt()!="r")&&r(d,u);break;case"opacity":m.gradient&&!m[b]("stroke-opacity")&&q(i,{"stroke-opacity":u>1?u/100:u});case"fill-opacity":if(m.gradient){I=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),I&&(J=I.getElementsByTagName("stop"),q(J[J.length-1],{"stop-opacity":u}));break};default:p=="font-size"&&(u=e(u,10)+"px");var K=p.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[K]=u,d._.dirty=1,i.setAttribute(p,u)}}}y(d,f),i.style.visibility=o},x=1.2,y=function(d,f){if(d.type=="text"&&!!(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){g.text=f.text;while(h.firstChild)h.removeChild(h.firstChild);var j=c(f.text).split("\n"),k=[],m;for(var n=0,o=j.length;n<o;n++)m=q("tspan"),n&&q(m,{dy:i*x,x:g.x}),m.appendChild(a._g.doc.createTextNode(j[n])),h.appendChild(m),k[n]=m}else{k=h.getElementsByTagName("tspan");for(n=0,o=k.length;n<o;n++)n?q(k[n],{dy:i*x,x:g.x}):q(k[0],{dy:0})}q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(k[0],{dy:r})}},z=function(b,c){var d=0,e=0;this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},A=a.el;z.prototype=A,A.constructor=z,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);d.type="path",w(d,{fill:"none",stroke:"#000",path:a});return d},A.rotate=function(a,b,e){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this.transform(this._.transform.concat([["r",a,b,e]]));return this},A.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]]));return this},A.translate=function(a,b){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]]));return this},A.transform=function(c){var d=this._;if(c==null)return d.transform;a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix});if(d.sx!=1||d.sy!=1){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){!this.removed&&this.paper.safari(this.node.style.display="none");return this},A.show=function(){!this.removed&&this.paper.safari(this.node.style.display="");return this},A.remove=function(){if(!this.removed&&!!this.node.parentNode){var b=this.paper;b.__set__&&b.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&b.defs.removeChild(this.gradient),a._tear(this,b),this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var c in this)this[c]=typeof this[c]=="function"?a._removedFactory(c):null;this.removed=!0}},A._getBBox=function(){if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}a&&this.hide();return b},A.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(c=="transform")return this._.transform;var g=c.split(j),h={};for(var i=0,l=g.length;i<l;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return l-1?h:h[g[0]]}if(d==null&&a.is(c,"array")){h={};for(i=0,l=c.length;i<l;i++)h[c[i]]=this.attr(c[i]);return h}if(d!=null){var m={};m[c]=d}else c!=null&&a.is(c,"object")&&(m=c);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}w(this,m);return this},A.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var b=this.paper;b.top!=this&&a._tofront(this,b);return this},A.toBack=function(){if(this.removed)return this;var b=this.node.parentNode;b.tagName.toLowerCase()=="a"?b.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):b.firstChild!=this.node&&b.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper);var c=this.paper;return this},A.insertAfter=function(b){if(this.removed)return this;var c=b.node||b[b.length-1].node;c.nextSibling?c.parentNode.insertBefore(this.node,c.nextSibling):c.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},A.insertBefore=function(b){if(this.removed)return this;var c=b.node||b[0].node;c.parentNode.insertBefore(this.node,c),a._insertbefore(this,b,this.paper);return this},A.blur=function(b){var c=this;if(+b!==0){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter")},a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs);return f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs);return h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs);return g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new z(f,b);g.attrs={x:c,y:d,"text-anchor":"middle",text:e,font:a._availableAttrs.font,stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs);return g},a._engine.setSize=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h=q("svg"),i="overflow:hidden;",j;d=d||0,e=e||0,f=f||512,g=g||342,q(h,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),c==1?(h.style.cssText=i+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(h),j=1):(h.style.cssText=i+"position:relative",c.firstChild?c.insertBefore(h,c.firstChild):c.appendChild(h)),c=new a._Paper,c.width=f,c.height=g,c.canvas=h,c.clear(),c._left=c._top=0,j&&(c.renderfix=function(){}),c.renderfix();return c},a._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=g(c/this.width,d/this.height),h=this.top,i=e?"meet":"xMinYMin",j,l;a==null?(this._vbSize&&(f=1),delete this._vbSize,j="0 0 "+this.width+m+this.height):(this._vbSize=f,j=a+m+b+m+c+m+d),q(this.canvas,{viewBox:j,preserveAspectRatio:i});while(f&&h)l="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":l}),h._.dirty=1,h._.dirtyT=1,h=h.prev;this._viewBox=[a,b,c,d,!!e];return this},a.prototype.renderfix=function(){var a=this.canvas,b=a.style,c;try{c=a.getScreenCTM()||a.createSVGMatrix()}catch(d){c=a.createSVGMatrix()}var e=-c.e%1,f=-c.f%1;if(e||f)e&&(this._left=(this._left+e)%1,b.left=this._left+"px"),f&&(this._top=(this._top+f)%1,b.top=this._top+"px")},a.prototype.clear=function(){a.eve("raphael.clear",this);var b=this.canvas;while(b.firstChild)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null};var B=a.st;for(var C in A)A[b](C)&&!B[b](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}(window.Raphael),window.Raphael.vml&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/ig,e=a._pathToAbsolute;c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g;if(e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e=b.toLowerCase()=="m",g=p[b];c.replace(s,function(a){e&&d.length==2&&(g+=d+p[b=="m"?"l":"L"],d=[]),d.push(f(a*u))});return g+d});return g}var h=e(b),i,j;g=[];for(var k=0,l=h.length;k<l;k++){i=h[k],j=h[k][0].toLowerCase(),j=="z"&&(j="x");for(var m=1,r=i.length;m<r;m++)j+=f(i[m]*u)+(m!=r-1?",":o);g.push(j)}return g.join(n)},y=function(b,c,d){var e=a.matrix();e.rotate(-b,.5,.5);return{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q,r=u/b,s=u/c;m.visibility="hidden";if(!!b&&!!c){l.coordsize=i(r)+n+i(s),m.rotation=f*(b*c<0?-1:1);if(f){var t=y(f,d,e);d=t.dx,e=t.dy}b<0&&(p+="x"),c<0&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-r+n+e*-s;if(k||g.fillsize){var v=l.getElementsByTagName(j);v=v&&v[0],l.removeChild(v),k&&(t=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),v.position=t.dx*o+n+t.dy*o),g.fillsize&&(v.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(v)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var A=function(a,b,d){var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";while(g--)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q,r=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),s=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),t=e;for(var y in i)i[b](y)&&(m[y]=i[y]);r&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur);if(i.path&&e.type=="path"||r)l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),e.type=="image"&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0));"transform"in i&&e.transform(i.transform);if(s){var B=+m.cx,D=+m.cy,E=+m.rx||+m.r||0,G=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((B-E)*u),f((D-G)*u),f((B+E)*u),f((D+G)*u),f(B*u))}if("clip-rect"in i){var H=c(i["clip-rect"]).split(k);if(H.length==4){H[2]=+H[2]+ +H[0],H[3]=+H[3]+ +H[1];var I=l.clipRect||a._g.doc.createElement("div"),J=I.style;J.clip=a.format("rect({1}px {2}px {3}px {0}px)",H),l.clipRect||(J.position="absolute",J.top=0,J.left=0,J.width=e.paper.width+"px",J.height=e.paper.height+"px",l.parentNode.insertBefore(I,l),I.appendChild(l),l.clipRect=I)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var K=e.textpath.style;i.font&&(K.font=i.font),i["font-family"]&&(K.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(K.fontSize=i["font-size"]),i["font-weight"]&&(K.fontWeight=i["font-weight"]),i["font-style"]&&(K.fontStyle=i["font-style"])}"arrow-start"in i&&A(t,i["arrow-start"]),"arrow-end"in i&&A(t,i["arrow-end"],1);if(i.opacity!=null||i["stroke-width"]!=null||i.fill!=null||i.src!=null||i.stroke!=null||i["stroke-width"]!=null||i["stroke-opacity"]!=null||i["fill-opacity"]!=null||i["stroke-dasharray"]!=null||i["stroke-miterlimit"]!=null||i["stroke-linejoin"]!=null||i["stroke-linecap"]!=null){var L=l.getElementsByTagName(j),M=!1;L=L&&L[0],!L&&(M=L=F(j)),e.type=="image"&&i.src&&(L.src=i.src),i.fill&&(L.on=!0);if(L.on==null||i.fill=="none"||i.fill===null)L.on=!1;if(L.on&&i.fill){var N=c(i.fill).match(a._ISURL);if(N){L.parentNode==l&&l.removeChild(L),L.rotate=!0,L.src=N[1],L.type="tile";var O=e.getBBox(1);L.position=O.x+n+O.y,e._.fillpos=[O.x,O.y],a._preload(N[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else L.color=a.getRGB(i.fill).hex,L.src=o,L.type="solid",a.getRGB(i.fill).error&&(t.type in{circle:1,ellipse:1}||c(i.fill).charAt()!="r")&&C(t,i.fill,L)&&(m.fill="none",m.gradient=i.fill,L.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var P=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);P=h(g(P,0),1),L.opacity=P,L.src&&(L.color="none")}l.appendChild(L);var Q=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],T=!1;!Q&&(T=Q=F("stroke"));if(i.stroke&&i.stroke!="none"||i["stroke-width"]||i["stroke-opacity"]!=null||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])Q.on=!0;(i.stroke=="none"||i.stroke===null||Q.on==null||i.stroke==0||i["stroke-width"]==0)&&(Q.on=!1);var U=a.getRGB(i.stroke);Q.on&&i.stroke&&(Q.color=U.hex),P=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+U.o+1||2)-1);var V=(d(i["stroke-width"])||1)*.75;P=h(g(P,0),1),i["stroke-width"]==null&&(V=m["stroke-width"]),i["stroke-width"]&&(Q.weight=V),V&&V<1&&(P*=V)&&(Q.weight=1),Q.opacity=P,i["stroke-linejoin"]&&(Q.joinstyle=i["stroke-linejoin"]||"miter"),Q.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(Q.endcap=i["stroke-linecap"]=="butt"?"flat":i["stroke-linecap"]=="square"?"square":"round");if(i["stroke-dasharray"]){var W={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Q.dashstyle=W[b](i["stroke-dasharray"])?W[i["stroke-dasharray"]]:o}T&&l.appendChild(Q)}if(t.type=="text"){t.paper.canvas.style.display=o;var X=t.paper.span,Y=100,Z=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=X.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),Z=d(m["font-size"]||Z&&Z[0])||10,p.fontSize=Z*Y+"px",t.textpath.string&&(X.innerHTML=c(t.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var $=X.getBoundingClientRect();t.W=m.w=($.right-$.left)/Y,t.H=m.h=($.bottom-$.top)/Y,t.X=m.x,t.Y=m.y+t.H/2,("x"in i||"y"in i)&&(t.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));var _=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var ba=0,bb=_.length;ba<bb;ba++)if(_[ba]in i){t._.dirty=1;break}switch(m["text-anchor"]){case"start":t.textpath.style["v-text-align"]="left",t.bbx=t.W/2;break;case"end":t.textpath.style["v-text-align"]="right",t.bbx=-t.W/2;break;default:t.textpath.style["v-text-align"]="center",t.bbx=0}t.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=b.attrs,i=Math.pow,j,k,l="linear",m=".5 .5";b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){l="radial",b&&c&&(b=d(b),c=d(c),i(b-.5,2)+i(c-.5,2)>.25&&(c=e.sqrt(.25-i(b-.5,2))*((c>.5)*2-1)+.5),m=b+n+c);return o}),f=f.split(/\s*\-\s*/);if(l=="linear"){var p=f.shift();p=-d(p);if(isNaN(p))return null}var q=a._parseDots(f);if(!q)return null;b=b.shape||b.node;if(q.length){b.removeChild(g),g.on=!0,g.method="none",g.color=q[0].color,g.color2=q[q.length-1].color;var r=[];for(var s=0,t=q.length;s<t;s++)q[s].offset&&r.push(q[s].offset+n+q[s].color);g.colors=r.length?r.join():"0% "+g.color,l=="radial"?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=m,g.angle=0):(g.type="gradient",g.angle=(270-p)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(b==null)return this._.transform;var d=this.paper._viewBoxShift,e=d?"s"+[d.scale,d.scale]+"-1-1t"+[d.dx,d.dy]:o,f;d&&(f=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,e+b);var g=this.matrix.clone(),h=this.skew,i=this.node,j,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");g.translate(-0.5,-0.5);if(l||k||this.type=="image"){h.matrix="1 0 0 1",h.offset="0 0",j=g.split();if(k&&j.noRotation||!j.isSimple){i.style.filter=g.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;i.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else i.style.filter=o,z(this,j.scalex,j.scaley,j.dx,j.dy,j.rotate)}else i.style.filter=o,h.matrix=c(g),h.offset=g.offset();f&&(this._.transform=f);return this},E.rotate=function(a,b,e){if(this.removed)return this;if(a!=null){a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]]));return this}},E.translate=function(a,b){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]]));return this},E.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1;return this},E.hide=function(){!this.removed&&(this.node.style.display="none");return this},E.show=function(){!this.removed&&(this.node.style.display=o);return this},E._getBBox=function(){if(this.removed)return{};return{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&!!this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c==j&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;var g=c.split(k),h={};for(var i=0,m=g.length;i<m;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&d==null&&a.is(c,"array")){h={};for(i=0,m=c.length;i<m;i++)h[c[i]]=this.attr(c[i]);return h}var n;d!=null&&(n={},n[c]=d),d==null&&a.is(c,"object")&&(n=c);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&this.type=="text"&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper);return this},E.toBack=function(){if(this.removed)return this;this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper));return this},E.insertAfter=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},E.insertBefore=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper);return this},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(r,o),+b!==0?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");f.on=!0,c.appendChild(f),d.skew=f,d.transform(o);return d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect";return i},a._engine.ellipse=function(a,b,c,d,e){var f=a.path(),g=f.attrs;f.X=b-d,f.Y=c-e,f.W=d*2,f.H=e*2,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e});return f},a._engine.circle=function(a,b,c,d){var e=a.path(),f=e.attrs;e.X=b-d,e.Y=c-d,e.W=e.H=d*2,e.type="circle",B(e,{cx:b,cy:c,r:d});return e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0);return i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");m.on=!0,h.appendChild(m),k.skew=m,k.transform(o);return k},a._engine.setSize=function(b,c){var d=this.canvas.style;this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox);return this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("raphael.setViewBox",this,this._viewBox,[b,c,d,e,f]);var h=this.width,i=this.height,j=1/g(d/h,e/i),k,l;f&&(k=i/e,l=h/d,d*k<h&&(b-=(h-d*k)/2/k),e*l<i&&(c-=(i-e*l)/2/l)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:j},this.forEach(function(a){a.transform("...")});return this};var F;a._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e,f=b.width,g=b.x,h=b.y;if(!c)throw new Error("VML container not found.");var i=new a._Paper,j=i.canvas=a._g.doc.createElement("div"),k=j.style;g=g||0,h=h||0,f=f||512,d=d||342,i.width=f,i.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),i.coordsize=u*1e3+n+u*1e3,i.coordorigin="0 0",i.span=a._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",j.appendChild(i.span),k.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(a._g.doc.body.appendChild(j),k.left=g+"px",k.top=h+"px",k.position="absolute"):c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j),i.renderfix=function(){};return i},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael) \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael_uncompressed.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael_uncompressed.js new file mode 100644 index 0000000..d03dcf6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/raphael_uncompressed.js @@ -0,0 +1,5815 @@ +// ┌────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\ +// ├────────────────────────────────────────────────────────────────────┤ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\ +// └────────────────────────────────────────────────────────────────────┘ \\ + +// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\ +// │ Eve 0.3.4 - JavaScript Events Library │ \\ +// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\ +// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\ +// └──────────────────────────────────────────────────────────────────────────────────────┘ \\ + +(function (glob) { + var version = "0.3.4", + has = "hasOwnProperty", + separator = /[\.\/]/, + wildcard = "*", + fun = function () {}, + numsort = function (a, b) { + return a - b; + }, + current_event, + stop, + events = {n: {}}, + + eve = function (name, scope) { + var e = events, + oldstop = stop, + args = Array.prototype.slice.call(arguments, 2), + listeners = eve.listeners(name), + z = 0, + f = false, + l, + indexed = [], + queue = {}, + out = [], + ce = current_event, + errors = []; + current_event = name; + stop = 0; + for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { + indexed.push(listeners[i].zIndex); + if (listeners[i].zIndex < 0) { + queue[listeners[i].zIndex] = listeners[i]; + } + } + indexed.sort(numsort); + while (indexed[z] < 0) { + l = queue[indexed[z++]]; + out.push(l.apply(scope, args)); + if (stop) { + stop = oldstop; + return out; + } + } + for (i = 0; i < ii; i++) { + l = listeners[i]; + if ("zIndex" in l) { + if (l.zIndex == indexed[z]) { + out.push(l.apply(scope, args)); + if (stop) { + break; + } + do { + z++; + l = queue[indexed[z]]; + l && out.push(l.apply(scope, args)); + if (stop) { + break; + } + } while (l) + } else { + queue[l.zIndex] = l; + } + } else { + out.push(l.apply(scope, args)); + if (stop) { + break; + } + } + } + stop = oldstop; + current_event = ce; + return out.length ? out : null; + }; + + eve.listeners = function (name) { + var names = name.split(separator), + e = events, + item, + items, + k, + i, + ii, + j, + jj, + nes, + es = [e], + out = []; + for (i = 0, ii = names.length; i < ii; i++) { + nes = []; + for (j = 0, jj = es.length; j < jj; j++) { + e = es[j].n; + items = [e[names[i]], e[wildcard]]; + k = 2; + while (k--) { + item = items[k]; + if (item) { + nes.push(item); + out = out.concat(item.f || []); + } + } + } + es = nes; + } + return out; + }; + + + eve.on = function (name, f) { + var names = name.split(separator), + e = events; + for (var i = 0, ii = names.length; i < ii; i++) { + e = e.n; + !e[names[i]] && (e[names[i]] = {n: {}}); + e = e[names[i]]; + } + e.f = e.f || []; + for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { + return fun; + } + e.f.push(f); + return function (zIndex) { + if (+zIndex == +zIndex) { + f.zIndex = +zIndex; + } + }; + }; + + eve.stop = function () { + stop = 1; + }; + + eve.nt = function (subname) { + if (subname) { + return new RegExp("(?:\\.|\\/|^)" + subname + "(?:\\.|\\/|$)").test(current_event); + } + return current_event; + }; + + + eve.off = eve.unbind = function (name, f) { + var names = name.split(separator), + e, + key, + splice, + i, ii, j, jj, + cur = [events]; + for (i = 0, ii = names.length; i < ii; i++) { + for (j = 0; j < cur.length; j += splice.length - 2) { + splice = [j, 1]; + e = cur[j].n; + if (names[i] != wildcard) { + if (e[names[i]]) { + splice.push(e[names[i]]); + } + } else { + for (key in e) if (e[has](key)) { + splice.push(e[key]); + } + } + cur.splice.apply(cur, splice); + } + } + for (i = 0, ii = cur.length; i < ii; i++) { + e = cur[i]; + while (e.n) { + if (f) { + if (e.f) { + for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { + e.f.splice(j, 1); + break; + } + !e.f.length && delete e.f; + } + for (key in e.n) if (e.n[has](key) && e.n[key].f) { + var funcs = e.n[key].f; + for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { + funcs.splice(j, 1); + break; + } + !funcs.length && delete e.n[key].f; + } + } else { + delete e.f; + for (key in e.n) if (e.n[has](key) && e.n[key].f) { + delete e.n[key].f; + } + } + e = e.n; + } + } + }; + + eve.once = function (name, f) { + var f2 = function () { + var res = f.apply(this, arguments); + eve.unbind(name, f2); + return res; + }; + return eve.on(name, f2); + }; + + eve.version = version; + eve.toString = function () { + return "You are running Eve " + version; + }; + (typeof module != "undefined" && module.exports) ? (module.exports = eve) : (typeof define != "undefined" ? (define("eve", [], function() { return eve; })) : (glob.eve = eve)); +})(this); + + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ "Raphaël 2.1.0" - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ +(function () { + + function R(first) { + if (R.is(first, "function")) { + return loaded ? first() : eve.on("raphael.DOMload", first); + } else if (R.is(first, array)) { + return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first); + } else { + var args = Array.prototype.slice.call(arguments, 0); + if (R.is(args[args.length - 1], "function")) { + var f = args.pop(); + return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () { + f.call(R._engine.create[apply](R, args)); + }); + } else { + return R._engine.create[apply](R, arguments); + } + } + } + R.version = "2.1.0"; + R.eve = eve; + var loaded, + separator = /[, ]+/, + elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1}, + formatrg = /\{(\d+)\}/g, + proto = "prototype", + has = "hasOwnProperty", + g = { + doc: document, + win: window + }, + oldRaphael = { + was: Object.prototype[has].call(g.win, "Raphael"), + is: g.win.Raphael + }, + Paper = function () { + + + this.ca = this.customAttributes = {}; + }, + paperproto, + appendChild = "appendChild", + apply = "apply", + concat = "concat", + supportsTouch = "createTouch" in g.doc, + E = "", + S = " ", + Str = String, + split = "split", + events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S), + touchMap = { + mousedown: "touchstart", + mousemove: "touchmove", + mouseup: "touchend" + }, + lowerCase = Str.prototype.toLowerCase, + math = Math, + mmax = math.max, + mmin = math.min, + abs = math.abs, + pow = math.pow, + PI = math.PI, + nu = "number", + string = "string", + array = "array", + toString = "toString", + fillString = "fill", + objectToString = Object.prototype.toString, + paper = {}, + push = "push", + ISURL = R._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i, + colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, + isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, + bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, + round = math.round, + setAttribute = "setAttribute", + toFloat = parseFloat, + toInt = parseInt, + upperCase = Str.prototype.toUpperCase, + availableAttrs = R._availableAttrs = { + "arrow-end": "none", + "arrow-start": "none", + blur: 0, + "clip-rect": "0 0 1e9 1e9", + cursor: "default", + cx: 0, + cy: 0, + fill: "#fff", + "fill-opacity": 1, + font: '10px "Arial"', + "font-family": '"Arial"', + "font-size": "10", + "font-style": "normal", + "font-weight": 400, + gradient: 0, + height: 0, + href: "http://raphaeljs.com/", + "letter-spacing": 0, + opacity: 1, + path: "M0,0", + r: 0, + rx: 0, + ry: 0, + src: "", + stroke: "#000", + "stroke-dasharray": "", + "stroke-linecap": "butt", + "stroke-linejoin": "butt", + "stroke-miterlimit": 0, + "stroke-opacity": 1, + "stroke-width": 1, + target: "_blank", + "text-anchor": "middle", + title: "Raphael", + transform: "", + width: 0, + x: 0, + y: 0 + }, + availableAnimAttrs = R._availableAnimAttrs = { + blur: nu, + "clip-rect": "csv", + cx: nu, + cy: nu, + fill: "colour", + "fill-opacity": nu, + "font-size": nu, + height: nu, + opacity: nu, + path: "path", + r: nu, + rx: nu, + ry: nu, + stroke: "colour", + "stroke-opacity": nu, + "stroke-width": nu, + transform: "transform", + width: nu, + x: nu, + y: nu + }, + whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g, + commaSpaces = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, + hsrg = {hs: 1, rg: 1}, + p2s = /,?([achlmqrstvxz]),?/gi, + pathCommand = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + tCommand = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig, + pathValues = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig, + radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/, + eldata = {}, + sortByKey = function (a, b) { + return a.key - b.key; + }, + sortByNumber = function (a, b) { + return toFloat(a) - toFloat(b); + }, + fun = function () {}, + pipe = function (x) { + return x; + }, + rectPath = R._rectPath = function (x, y, w, h, r) { + if (r) { + return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]]; + } + return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]]; + }, + ellipsePath = function (x, y, rx, ry) { + if (ry == null) { + ry = rx; + } + return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]]; + }, + getPath = R._getPath = { + path: function (el) { + return el.attr("path"); + }, + circle: function (el) { + var a = el.attrs; + return ellipsePath(a.cx, a.cy, a.r); + }, + ellipse: function (el) { + var a = el.attrs; + return ellipsePath(a.cx, a.cy, a.rx, a.ry); + }, + rect: function (el) { + var a = el.attrs; + return rectPath(a.x, a.y, a.width, a.height, a.r); + }, + image: function (el) { + var a = el.attrs; + return rectPath(a.x, a.y, a.width, a.height); + }, + text: function (el) { + var bbox = el._getBBox(); + return rectPath(bbox.x, bbox.y, bbox.width, bbox.height); + } + }, + + mapPath = R.mapPath = function (path, matrix) { + if (!matrix) { + return path; + } + var x, y, i, j, ii, jj, pathi; + path = path2curve(path); + for (i = 0, ii = path.length; i < ii; i++) { + pathi = path[i]; + for (j = 1, jj = pathi.length; j < jj; j += 2) { + x = matrix.x(pathi[j], pathi[j + 1]); + y = matrix.y(pathi[j], pathi[j + 1]); + pathi[j] = x; + pathi[j + 1] = y; + } + } + return path; + }; + + R._g = g; + + R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); + if (R.type == "VML") { + var d = g.doc.createElement("div"), + b; + d.innerHTML = '<v:shape adj="1"/>'; + b = d.firstChild; + b.style.behavior = "url(#default#VML)"; + if (!(b && typeof b.adj == "object")) { + return (R.type = E); + } + d = null; + } + + + R.svg = !(R.vml = R.type == "VML"); + R._Paper = Paper; + + R.fn = paperproto = Paper.prototype = R.prototype; + R._id = 0; + R._oid = 0; + + R.is = function (o, type) { + type = lowerCase.call(type); + if (type == "finite") { + return !isnan[has](+o); + } + if (type == "array") { + return o instanceof Array; + } + return (type == "null" && o === null) || + (type == typeof o && o !== null) || + (type == "object" && o === Object(o)) || + (type == "array" && Array.isArray && Array.isArray(o)) || + objectToString.call(o).slice(8, -1).toLowerCase() == type; + }; + + function clone(obj) { + if (Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) if (obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + } + + + R.angle = function (x1, y1, x2, y2, x3, y3) { + if (x3 == null) { + var x = x1 - x2, + y = y1 - y2; + if (!x && !y) { + return 0; + } + return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; + } else { + return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); + } + }; + + R.rad = function (deg) { + return deg % 360 * PI / 180; + }; + + R.deg = function (rad) { + return rad * 180 / PI % 360; + }; + + R.snapTo = function (values, value, tolerance) { + tolerance = R.is(tolerance, "finite") ? tolerance : 10; + if (R.is(values, array)) { + var i = values.length; + while (i--) if (abs(values[i] - value) <= tolerance) { + return values[i]; + } + } else { + values = +values; + var rem = value % values; + if (rem < tolerance) { + return value - rem; + } + if (rem > values - tolerance) { + return value - rem + values; + } + } + return value; + }; + + + var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) { + return function () { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); + }; + })(/[xy]/g, function (c) { + var r = math.random() * 16 | 0, + v = c == "x" ? r : (r & 3 | 8); + return v.toString(16); + }); + + + R.setWindow = function (newwin) { + eve("raphael.setWindow", R, g.win, newwin); + g.win = newwin; + g.doc = g.win.document; + if (R._engine.initWin) { + R._engine.initWin(g.win); + } + }; + var toHex = function (color) { + if (R.vml) { + // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/ + var trim = /^\s+|\s+$/g; + var bod; + try { + var docum = new ActiveXObject("htmlfile"); + docum.write("<body>"); + docum.close(); + bod = docum.body; + } catch(e) { + bod = createPopup().document.body; + } + var range = bod.createTextRange(); + toHex = cacher(function (color) { + try { + bod.style.color = Str(color).replace(trim, E); + var value = range.queryCommandValue("ForeColor"); + value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16); + return "#" + ("000000" + value.toString(16)).slice(-6); + } catch(e) { + return "none"; + } + }); + } else { + var i = g.doc.createElement("i"); + i.title = "Rapha\xebl Colour Picker"; + i.style.display = "none"; + g.doc.body.appendChild(i); + toHex = cacher(function (color) { + i.style.color = color; + return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color"); + }); + } + return toHex(color); + }, + hsbtoString = function () { + return "hsb(" + [this.h, this.s, this.b] + ")"; + }, + hsltoString = function () { + return "hsl(" + [this.h, this.s, this.l] + ")"; + }, + rgbtoString = function () { + return this.hex; + }, + prepareRGB = function (r, g, b) { + if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) { + b = r.b; + g = r.g; + r = r.r; + } + if (g == null && R.is(r, string)) { + var clr = R.getRGB(r); + r = clr.r; + g = clr.g; + b = clr.b; + } + if (r > 1 || g > 1 || b > 1) { + r /= 255; + g /= 255; + b /= 255; + } + + return [r, g, b]; + }, + packageRGB = function (r, g, b, o) { + r *= 255; + g *= 255; + b *= 255; + var rgb = { + r: r, + g: g, + b: b, + hex: R.rgb(r, g, b), + toString: rgbtoString + }; + R.is(o, "finite") && (rgb.opacity = o); + return rgb; + }; + + + R.color = function (clr) { + var rgb; + if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) { + rgb = R.hsb2rgb(clr); + clr.r = rgb.r; + clr.g = rgb.g; + clr.b = rgb.b; + clr.hex = rgb.hex; + } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) { + rgb = R.hsl2rgb(clr); + clr.r = rgb.r; + clr.g = rgb.g; + clr.b = rgb.b; + clr.hex = rgb.hex; + } else { + if (R.is(clr, "string")) { + clr = R.getRGB(clr); + } + if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) { + rgb = R.rgb2hsl(clr); + clr.h = rgb.h; + clr.s = rgb.s; + clr.l = rgb.l; + rgb = R.rgb2hsb(clr); + clr.v = rgb.b; + } else { + clr = {hex: "none"}; + clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1; + } + } + clr.toString = rgbtoString; + return clr; + }; + + R.hsb2rgb = function (h, s, v, o) { + if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { + v = h.b; + s = h.s; + h = h.h; + o = h.o; + } + h *= 360; + var R, G, B, X, C; + h = (h % 360) / 60; + C = v * s; + X = C * (1 - abs(h % 2 - 1)); + R = G = B = v - C; + + h = ~~h; + R += [C, X, 0, 0, X, C][h]; + G += [X, C, C, X, 0, 0][h]; + B += [0, 0, X, C, C, X][h]; + return packageRGB(R, G, B, o); + }; + + R.hsl2rgb = function (h, s, l, o) { + if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) { + l = h.l; + s = h.s; + h = h.h; + } + if (h > 1 || s > 1 || l > 1) { + h /= 360; + s /= 100; + l /= 100; + } + h *= 360; + var R, G, B, X, C; + h = (h % 360) / 60; + C = 2 * s * (l < .5 ? l : 1 - l); + X = C * (1 - abs(h % 2 - 1)); + R = G = B = l - C / 2; + + h = ~~h; + R += [C, X, 0, 0, X, C][h]; + G += [X, C, C, X, 0, 0][h]; + B += [0, 0, X, C, C, X][h]; + return packageRGB(R, G, B, o); + }; + + R.rgb2hsb = function (r, g, b) { + b = prepareRGB(r, g, b); + r = b[0]; + g = b[1]; + b = b[2]; + + var H, S, V, C; + V = mmax(r, g, b); + C = V - mmin(r, g, b); + H = (C == 0 ? null : + V == r ? (g - b) / C : + V == g ? (b - r) / C + 2 : + (r - g) / C + 4 + ); + H = ((H + 360) % 6) * 60 / 360; + S = C == 0 ? 0 : C / V; + return {h: H, s: S, b: V, toString: hsbtoString}; + }; + + R.rgb2hsl = function (r, g, b) { + b = prepareRGB(r, g, b); + r = b[0]; + g = b[1]; + b = b[2]; + + var H, S, L, M, m, C; + M = mmax(r, g, b); + m = mmin(r, g, b); + C = M - m; + H = (C == 0 ? null : + M == r ? (g - b) / C : + M == g ? (b - r) / C + 2 : + (r - g) / C + 4); + H = ((H + 360) % 6) * 60 / 360; + L = (M + m) / 2; + S = (C == 0 ? 0 : + L < .5 ? C / (2 * L) : + C / (2 - 2 * L)); + return {h: H, s: S, l: L, toString: hsltoString}; + }; + R._path2string = function () { + return this.join(",").replace(p2s, "$1"); + }; + function repush(array, item) { + for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { + return array.push(array.splice(i, 1)[0]); + } + } + function cacher(f, scope, postprocessor) { + function newf() { + var arg = Array.prototype.slice.call(arguments, 0), + args = arg.join("\u2400"), + cache = newf.cache = newf.cache || {}, + count = newf.count = newf.count || []; + if (cache[has](args)) { + repush(count, args); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + count.length >= 1e3 && delete cache[count.shift()]; + count.push(args); + cache[args] = f[apply](scope, arg); + return postprocessor ? postprocessor(cache[args]) : cache[args]; + } + return newf; + } + + var preload = R._preload = function (src, f) { + var img = g.doc.createElement("img"); + img.style.cssText = "position:absolute;left:-9999em;top:-9999em"; + img.onload = function () { + f.call(this); + this.onload = null; + g.doc.body.removeChild(this); + }; + img.onerror = function () { + g.doc.body.removeChild(this); + }; + g.doc.body.appendChild(img); + img.src = src; + }; + + function clrToString() { + return this.hex; + } + + + R.getRGB = cacher(function (colour) { + if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) { + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; + } + if (colour == "none") { + return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString}; + } + !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour)); + var res, + red, + green, + blue, + opacity, + t, + values, + rgb = colour.match(colourRegExp); + if (rgb) { + if (rgb[2]) { + blue = toInt(rgb[2].substring(5), 16); + green = toInt(rgb[2].substring(3, 5), 16); + red = toInt(rgb[2].substring(1, 3), 16); + } + if (rgb[3]) { + blue = toInt((t = rgb[3].charAt(3)) + t, 16); + green = toInt((t = rgb[3].charAt(2)) + t, 16); + red = toInt((t = rgb[3].charAt(1)) + t, 16); + } + if (rgb[4]) { + values = rgb[4][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + } + if (rgb[5]) { + values = rgb[5][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); + rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + return R.hsb2rgb(red, green, blue, opacity); + } + if (rgb[6]) { + values = rgb[6][split](commaSpaces); + red = toFloat(values[0]); + values[0].slice(-1) == "%" && (red *= 2.55); + green = toFloat(values[1]); + values[1].slice(-1) == "%" && (green *= 2.55); + blue = toFloat(values[2]); + values[2].slice(-1) == "%" && (blue *= 2.55); + (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360); + rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3])); + values[3] && values[3].slice(-1) == "%" && (opacity /= 100); + return R.hsl2rgb(red, green, blue, opacity); + } + rgb = {r: red, g: green, b: blue, toString: clrToString}; + rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1); + R.is(opacity, "finite") && (rgb.opacity = opacity); + return rgb; + } + return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString}; + }, R); + + R.hsb = cacher(function (h, s, b) { + return R.hsb2rgb(h, s, b).hex; + }); + + R.hsl = cacher(function (h, s, l) { + return R.hsl2rgb(h, s, l).hex; + }); + + R.rgb = cacher(function (r, g, b) { + return "#" + (16777216 | b | (g << 8) | (r << 16)).toString(16).slice(1); + }); + + R.getColor = function (value) { + var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75}, + rgb = this.hsb2rgb(start.h, start.s, start.b); + start.h += .075; + if (start.h > 1) { + start.h = 0; + start.s -= .2; + start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b}); + } + return rgb.hex; + }; + + R.getColor.reset = function () { + delete this.start; + }; + + // http://schepers.cc/getting-to-the-point + function catmullRom2bezier(crp, z) { + var d = []; + for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) { + var p = [ + {x: +crp[i - 2], y: +crp[i - 1]}, + {x: +crp[i], y: +crp[i + 1]}, + {x: +crp[i + 2], y: +crp[i + 3]}, + {x: +crp[i + 4], y: +crp[i + 5]} + ]; + if (z) { + if (!i) { + p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]}; + } else if (iLen - 4 == i) { + p[3] = {x: +crp[0], y: +crp[1]}; + } else if (iLen - 2 == i) { + p[2] = {x: +crp[0], y: +crp[1]}; + p[3] = {x: +crp[2], y: +crp[3]}; + } + } else { + if (iLen - 4 == i) { + p[3] = p[2]; + } else if (!i) { + p[0] = {x: +crp[i], y: +crp[i + 1]}; + } + } + d.push(["C", + (-p[0].x + 6 * p[1].x + p[2].x) / 6, + (-p[0].y + 6 * p[1].y + p[2].y) / 6, + (p[1].x + 6 * p[2].x - p[3].x) / 6, + (p[1].y + 6*p[2].y - p[3].y) / 6, + p[2].x, + p[2].y + ]); + } + + return d; + } + + R.parsePathString = function (pathString) { + if (!pathString) { + return null; + } + var pth = paths(pathString); + if (pth.arr) { + return pathClone(pth.arr); + } + + var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0}, + data = []; + if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption + data = pathClone(pathString); + } + if (!data.length) { + Str(pathString).replace(pathCommand, function (a, b, c) { + var params = [], + name = b.toLowerCase(); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + if (name == "m" && params.length > 2) { + data.push([b][concat](params.splice(0, 2))); + name = "l"; + b = b == "m" ? "l" : "L"; + } + if (name == "r") { + data.push([b][concat](params)); + } else while (params.length >= paramCounts[name]) { + data.push([b][concat](params.splice(0, paramCounts[name]))); + if (!paramCounts[name]) { + break; + } + } + }); + } + data.toString = R._path2string; + pth.arr = pathClone(data); + return data; + }; + + R.parseTransformString = cacher(function (TString) { + if (!TString) { + return null; + } + var paramCounts = {r: 3, s: 4, t: 2, m: 6}, + data = []; + if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption + data = pathClone(TString); + } + if (!data.length) { + Str(TString).replace(tCommand, function (a, b, c) { + var params = [], + name = lowerCase.call(b); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + data.push([b][concat](params)); + }); + } + data.toString = R._path2string; + return data; + }); + // PATHS + var paths = function (ps) { + var p = paths.ps = paths.ps || {}; + if (p[ps]) { + p[ps].sleep = 100; + } else { + p[ps] = { + sleep: 100 + }; + } + setTimeout(function () { + for (var key in p) if (p[has](key) && key != ps) { + p[key].sleep--; + !p[key].sleep && delete p[key]; + } + }); + return p[ps]; + }; + + R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t, + t13 = pow(t1, 3), + t12 = pow(t1, 2), + t2 = t * t, + t3 = t2 * t, + x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, + y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y, + mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x), + my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y), + nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x), + ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y), + ax = t1 * p1x + t * c1x, + ay = t1 * p1y + t * c1y, + cx = t1 * c2x + t * p2x, + cy = t1 * c2y + t * p2y, + alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI); + (mx > nx || my < ny) && (alpha += 180); + return { + x: x, + y: y, + m: {x: mx, y: my}, + n: {x: nx, y: ny}, + start: {x: ax, y: ay}, + end: {x: cx, y: cy}, + alpha: alpha + }; + }; + + R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + if (!R.is(p1x, "array")) { + p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y]; + } + var bbox = curveDim.apply(null, p1x); + return { + x: bbox.min.x, + y: bbox.min.y, + x2: bbox.max.x, + y2: bbox.max.y, + width: bbox.max.x - bbox.min.x, + height: bbox.max.y - bbox.min.y + }; + }; + + R.isPointInsideBBox = function (bbox, x, y) { + return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2; + }; + + R.isBBoxIntersect = function (bbox1, bbox2) { + var i = R.isPointInsideBBox; + return i(bbox2, bbox1.x, bbox1.y) + || i(bbox2, bbox1.x2, bbox1.y) + || i(bbox2, bbox1.x, bbox1.y2) + || i(bbox2, bbox1.x2, bbox1.y2) + || i(bbox1, bbox2.x, bbox2.y) + || i(bbox1, bbox2.x2, bbox2.y) + || i(bbox1, bbox2.x, bbox2.y2) + || i(bbox1, bbox2.x2, bbox2.y2) + || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) + && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); + }; + function base3(t, p1, p2, p3, p4) { + var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4, + t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; + return t * t2 - 3 * p1 + 3 * p2; + } + function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) { + if (z == null) { + z = 1; + } + z = z > 1 ? 1 : z < 0 ? 0 : z; + var z2 = z / 2, + n = 12, + Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816], + Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472], + sum = 0; + for (var i = 0; i < n; i++) { + var ct = z2 * Tvalues[i] + z2, + xbase = base3(ct, x1, x2, x3, x4), + ybase = base3(ct, y1, y2, y3, y4), + comb = xbase * xbase + ybase * ybase; + sum += Cvalues[i] * math.sqrt(comb); + } + return z2 * sum; + } + function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) { + if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) { + return; + } + var t = 1, + step = t / 2, + t2 = t - step, + l, + e = .01; + l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); + while (abs(l - ll) > e) { + step /= 2; + t2 += (l < ll ? 1 : -1) * step; + l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2); + } + return t2; + } + function intersect(x1, y1, x2, y2, x3, y3, x4, y4) { + if ( + mmax(x1, x2) < mmin(x3, x4) || + mmin(x1, x2) > mmax(x3, x4) || + mmax(y1, y2) < mmin(y3, y4) || + mmin(y1, y2) > mmax(y3, y4) + ) { + return; + } + var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), + ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), + denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + + if (!denominator) { + return; + } + var px = nx / denominator, + py = ny / denominator, + px2 = +px.toFixed(2), + py2 = +py.toFixed(2); + if ( + px2 < +mmin(x1, x2).toFixed(2) || + px2 > +mmax(x1, x2).toFixed(2) || + px2 < +mmin(x3, x4).toFixed(2) || + px2 > +mmax(x3, x4).toFixed(2) || + py2 < +mmin(y1, y2).toFixed(2) || + py2 > +mmax(y1, y2).toFixed(2) || + py2 < +mmin(y3, y4).toFixed(2) || + py2 > +mmax(y3, y4).toFixed(2) + ) { + return; + } + return {x: px, y: py}; + } + function inter(bez1, bez2) { + return interHelper(bez1, bez2); + } + function interCount(bez1, bez2) { + return interHelper(bez1, bez2, 1); + } + function interHelper(bez1, bez2, justCount) { + var bbox1 = R.bezierBBox(bez1), + bbox2 = R.bezierBBox(bez2); + if (!R.isBBoxIntersect(bbox1, bbox2)) { + return justCount ? 0 : []; + } + var l1 = bezlen.apply(0, bez1), + l2 = bezlen.apply(0, bez2), + n1 = ~~(l1 / 5), + n2 = ~~(l2 / 5), + dots1 = [], + dots2 = [], + xy = {}, + res = justCount ? 0 : []; + for (var i = 0; i < n1 + 1; i++) { + var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1)); + dots1.push({x: p.x, y: p.y, t: i / n1}); + } + for (i = 0; i < n2 + 1; i++) { + p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2)); + dots2.push({x: p.x, y: p.y, t: i / n2}); + } + for (i = 0; i < n1; i++) { + for (var j = 0; j < n2; j++) { + var di = dots1[i], + di1 = dots1[i + 1], + dj = dots2[j], + dj1 = dots2[j + 1], + ci = abs(di1.x - di.x) < .001 ? "y" : "x", + cj = abs(dj1.x - dj.x) < .001 ? "y" : "x", + is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y); + if (is) { + if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) { + continue; + } + xy[is.x.toFixed(4)] = is.y.toFixed(4); + var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t), + t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); + if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) { + if (justCount) { + res++; + } else { + res.push({ + x: is.x, + y: is.y, + t1: t1, + t2: t2 + }); + } + } + } + } + } + return res; + } + + R.pathIntersection = function (path1, path2) { + return interPathHelper(path1, path2); + }; + R.pathIntersectionNumber = function (path1, path2) { + return interPathHelper(path1, path2, 1); + }; + function interPathHelper(path1, path2, justCount) { + path1 = R._path2curve(path1); + path2 = R._path2curve(path2); + var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2, + res = justCount ? 0 : []; + for (var i = 0, ii = path1.length; i < ii; i++) { + var pi = path1[i]; + if (pi[0] == "M") { + x1 = x1m = pi[1]; + y1 = y1m = pi[2]; + } else { + if (pi[0] == "C") { + bez1 = [x1, y1].concat(pi.slice(1)); + x1 = bez1[6]; + y1 = bez1[7]; + } else { + bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; + x1 = x1m; + y1 = y1m; + } + for (var j = 0, jj = path2.length; j < jj; j++) { + var pj = path2[j]; + if (pj[0] == "M") { + x2 = x2m = pj[1]; + y2 = y2m = pj[2]; + } else { + if (pj[0] == "C") { + bez2 = [x2, y2].concat(pj.slice(1)); + x2 = bez2[6]; + y2 = bez2[7]; + } else { + bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; + x2 = x2m; + y2 = y2m; + } + var intr = interHelper(bez1, bez2, justCount); + if (justCount) { + res += intr; + } else { + for (var k = 0, kk = intr.length; k < kk; k++) { + intr[k].segment1 = i; + intr[k].segment2 = j; + intr[k].bez1 = bez1; + intr[k].bez2 = bez2; + } + res = res.concat(intr); + } + } + } + } + } + return res; + } + + R.isPointInsidePath = function (path, x, y) { + var bbox = R.pathBBox(path); + return R.isPointInsideBBox(bbox, x, y) && + interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1; + }; + R._removedFactory = function (methodname) { + return function () { + eve("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + methodname + "\u201d of removed object", methodname); + }; + }; + + var pathDimensions = R.pathBBox = function (path) { + var pth = paths(path); + if (pth.bbox) { + return pth.bbox; + } + if (!path) { + return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0}; + } + path = path2curve(path); + var x = 0, + y = 0, + X = [], + Y = [], + p; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = p[1]; + y = p[2]; + X.push(x); + Y.push(y); + } else { + var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + X = X[concat](dim.min.x, dim.max.x); + Y = Y[concat](dim.min.y, dim.max.y); + x = p[5]; + y = p[6]; + } + } + var xmin = mmin[apply](0, X), + ymin = mmin[apply](0, Y), + xmax = mmax[apply](0, X), + ymax = mmax[apply](0, Y), + bb = { + x: xmin, + y: ymin, + x2: xmax, + y2: ymax, + width: xmax - xmin, + height: ymax - ymin + }; + pth.bbox = clone(bb); + return bb; + }, + pathClone = function (pathArray) { + var res = clone(pathArray); + res.toString = R._path2string; + return res; + }, + pathToRelative = R._pathToRelative = function (pathArray) { + var pth = paths(pathArray); + if (pth.rel) { + return pathClone(pth.rel); + } + if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = pathArray[0][1]; + y = pathArray[0][2]; + mx = x; + my = y; + start++; + res.push(["M", x, y]); + } + for (var i = start, ii = pathArray.length; i < ii; i++) { + var r = res[i] = [], + pa = pathArray[i]; + if (pa[0] != lowerCase.call(pa[0])) { + r[0] = lowerCase.call(pa[0]); + switch (r[0]) { + case "a": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] - x).toFixed(3); + r[7] = +(pa[7] - y).toFixed(3); + break; + case "v": + r[1] = +(pa[1] - y).toFixed(3); + break; + case "m": + mx = pa[1]; + my = pa[2]; + default: + for (var j = 1, jj = pa.length; j < jj; j++) { + r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3); + } + } + } else { + r = res[i] = []; + if (pa[0] == "m") { + mx = pa[1] + x; + my = pa[2] + y; + } + for (var k = 0, kk = pa.length; k < kk; k++) { + res[i][k] = pa[k]; + } + } + var len = res[i].length; + switch (res[i][0]) { + case "z": + x = mx; + y = my; + break; + case "h": + x += +res[i][len - 1]; + break; + case "v": + y += +res[i][len - 1]; + break; + default: + x += +res[i][len - 2]; + y += +res[i][len - 1]; + } + } + res.toString = R._path2string; + pth.rel = pathClone(res); + return res; + }, + pathToAbsolute = R._pathToAbsolute = function (pathArray) { + var pth = paths(pathArray); + if (pth.abs) { + return pathClone(pth.abs); + } + if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption + pathArray = R.parsePathString(pathArray); + } + if (!pathArray || !pathArray.length) { + return [["M", 0, 0]]; + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0; + if (pathArray[0][0] == "M") { + x = +pathArray[0][1]; + y = +pathArray[0][2]; + mx = x; + my = y; + start++; + res[0] = ["M", x, y]; + } + var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z"; + for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { + res.push(r = []); + pa = pathArray[i]; + if (pa[0] != upperCase.call(pa[0])) { + r[0] = upperCase.call(pa[0]); + switch (r[0]) { + case "A": + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +(pa[6] + x); + r[7] = +(pa[7] + y); + break; + case "V": + r[1] = +pa[1] + y; + break; + case "H": + r[1] = +pa[1] + x; + break; + case "R": + var dots = [x, y][concat](pa.slice(1)); + for (var j = 2, jj = dots.length; j < jj; j++) { + dots[j] = +dots[j] + x; + dots[++j] = +dots[j] + y; + } + res.pop(); + res = res[concat](catmullRom2bezier(dots, crz)); + break; + case "M": + mx = +pa[1] + x; + my = +pa[2] + y; + default: + for (j = 1, jj = pa.length; j < jj; j++) { + r[j] = +pa[j] + ((j % 2) ? x : y); + } + } + } else if (pa[0] == "R") { + dots = [x, y][concat](pa.slice(1)); + res.pop(); + res = res[concat](catmullRom2bezier(dots, crz)); + r = ["R"][concat](pa.slice(-2)); + } else { + for (var k = 0, kk = pa.length; k < kk; k++) { + r[k] = pa[k]; + } + } + switch (r[0]) { + case "Z": + x = mx; + y = my; + break; + case "H": + x = r[1]; + break; + case "V": + y = r[1]; + break; + case "M": + mx = r[r.length - 2]; + my = r[r.length - 1]; + default: + x = r[r.length - 2]; + y = r[r.length - 1]; + } + } + res.toString = R._path2string; + pth.abs = pathClone(res); + return res; + }, + l2c = function (x1, y1, x2, y2) { + return [x1, y1, x2, y2, x2, y2]; + }, + q2c = function (x1, y1, ax, ay, x2, y2) { + var _13 = 1 / 3, + _23 = 2 / 3; + return [ + _13 * x1 + _23 * ax, + _13 * y1 + _23 * ay, + _13 * x2 + _23 * ax, + _13 * y2 + _23 * ay, + x2, + y2 + ]; + }, + a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { + // for more information of where this math came from visit: + // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + var _120 = PI * 120 / 180, + rad = PI / 180 * (+angle || 0), + res = [], + xy, + rotate = cacher(function (x, y, rad) { + var X = x * math.cos(rad) - y * math.sin(rad), + Y = x * math.sin(rad) + y * math.cos(rad); + return {x: X, y: Y}; + }); + if (!recursive) { + xy = rotate(x1, y1, -rad); + x1 = xy.x; + y1 = xy.y; + xy = rotate(x2, y2, -rad); + x2 = xy.x; + y2 = xy.y; + var cos = math.cos(PI / 180 * angle), + sin = math.sin(PI / 180 * angle), + x = (x1 - x2) / 2, + y = (y1 - y2) / 2; + var h = (x * x) / (rx * rx) + (y * y) / (ry * ry); + if (h > 1) { + h = math.sqrt(h); + rx = h * rx; + ry = h * ry; + } + var rx2 = rx * rx, + ry2 = ry * ry, + k = (large_arc_flag == sweep_flag ? -1 : 1) * + math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), + cx = k * rx * y / ry + (x1 + x2) / 2, + cy = k * -ry * x / rx + (y1 + y2) / 2, + f1 = math.asin(((y1 - cy) / ry).toFixed(9)), + f2 = math.asin(((y2 - cy) / ry).toFixed(9)); + + f1 = x1 < cx ? PI - f1 : f1; + f2 = x2 < cx ? PI - f2 : f2; + f1 < 0 && (f1 = PI * 2 + f1); + f2 < 0 && (f2 = PI * 2 + f2); + if (sweep_flag && f1 > f2) { + f1 = f1 - PI * 2; + } + if (!sweep_flag && f2 > f1) { + f2 = f2 - PI * 2; + } + } else { + f1 = recursive[0]; + f2 = recursive[1]; + cx = recursive[2]; + cy = recursive[3]; + } + var df = f2 - f1; + if (abs(df) > _120) { + var f2old = f2, + x2old = x2, + y2old = y2; + f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); + x2 = cx + rx * math.cos(f2); + y2 = cy + ry * math.sin(f2); + res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); + } + df = f2 - f1; + var c1 = math.cos(f1), + s1 = math.sin(f1), + c2 = math.cos(f2), + s2 = math.sin(f2), + t = math.tan(df / 4), + hx = 4 / 3 * rx * t, + hy = 4 / 3 * ry * t, + m1 = [x1, y1], + m2 = [x1 + hx * s1, y1 - hy * c1], + m3 = [x2 + hx * s2, y2 - hy * c2], + m4 = [x2, y2]; + m2[0] = 2 * m1[0] - m2[0]; + m2[1] = 2 * m1[1] - m2[1]; + if (recursive) { + return [m2, m3, m4][concat](res); + } else { + res = [m2, m3, m4][concat](res).join()[split](","); + var newres = []; + for (var i = 0, ii = res.length; i < ii; i++) { + newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; + } + return newres; + } + }, + findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t; + return { + x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x, + y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y + }; + }, + curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x), + b = 2 * (c1x - p1x) - 2 * (c2x - c1x), + c = p1x - c1x, + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a, + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a, + y = [p1y, p2y], + x = [p1x, p2x], + dot; + abs(t1) > "1e12" && (t1 = .5); + abs(t2) > "1e12" && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x.push(dot.x); + y.push(dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x.push(dot.x); + y.push(dot.y); + } + a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y); + b = 2 * (c1y - p1y) - 2 * (c2y - c1y); + c = p1y - c1y; + t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a; + t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a; + abs(t1) > "1e12" && (t1 = .5); + abs(t2) > "1e12" && (t2 = .5); + if (t1 > 0 && t1 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1); + x.push(dot.x); + y.push(dot.y); + } + if (t2 > 0 && t2 < 1) { + dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2); + x.push(dot.x); + y.push(dot.y); + } + return { + min: {x: mmin[apply](0, x), y: mmin[apply](0, y)}, + max: {x: mmax[apply](0, x), y: mmax[apply](0, y)} + }; + }), + path2curve = R._path2curve = cacher(function (path, path2) { + var pth = !path2 && paths(path); + if (!path2 && pth.curve) { + return pathClone(pth.curve); + } + var p = pathToAbsolute(path), + p2 = path2 && pathToAbsolute(path2), + attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null}, + processPath = function (path, d) { + var nx, ny; + if (!path) { + return ["C", d.x, d.y, d.x, d.y, d.x, d.y]; + } + !(path[0] in {T:1, Q:1}) && (d.qx = d.qy = null); + switch (path[0]) { + case "M": + d.X = path[1]; + d.Y = path[2]; + break; + case "A": + path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1)))); + break; + case "S": + nx = d.x + (d.x - (d.bx || d.x)); + ny = d.y + (d.y - (d.by || d.y)); + path = ["C", nx, ny][concat](path.slice(1)); + break; + case "T": + d.qx = d.x + (d.x - (d.qx || d.x)); + d.qy = d.y + (d.y - (d.qy || d.y)); + path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2])); + break; + case "Q": + d.qx = path[1]; + d.qy = path[2]; + path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4])); + break; + case "L": + path = ["C"][concat](l2c(d.x, d.y, path[1], path[2])); + break; + case "H": + path = ["C"][concat](l2c(d.x, d.y, path[1], d.y)); + break; + case "V": + path = ["C"][concat](l2c(d.x, d.y, d.x, path[1])); + break; + case "Z": + path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y)); + break; + } + return path; + }, + fixArc = function (pp, i) { + if (pp[i].length > 7) { + pp[i].shift(); + var pi = pp[i]; + while (pi.length) { + pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6))); + } + pp.splice(i, 1); + ii = mmax(p.length, p2 && p2.length || 0); + } + }, + fixM = function (path1, path2, a1, a2, i) { + if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") { + path2.splice(i, 0, ["M", a2.x, a2.y]); + a1.bx = 0; + a1.by = 0; + a1.x = path1[i][1]; + a1.y = path1[i][2]; + ii = mmax(p.length, p2 && p2.length || 0); + } + }; + for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) { + p[i] = processPath(p[i], attrs); + fixArc(p, i); + p2 && (p2[i] = processPath(p2[i], attrs2)); + p2 && fixArc(p2, i); + fixM(p, p2, attrs, attrs2, i); + fixM(p2, p, attrs2, attrs, i); + var seg = p[i], + seg2 = p2 && p2[i], + seglen = seg.length, + seg2len = p2 && seg2.length; + attrs.x = seg[seglen - 2]; + attrs.y = seg[seglen - 1]; + attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; + attrs.by = toFloat(seg[seglen - 3]) || attrs.y; + attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x); + attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y); + attrs2.x = p2 && seg2[seg2len - 2]; + attrs2.y = p2 && seg2[seg2len - 1]; + } + if (!p2) { + pth.curve = pathClone(p); + } + return p2 ? [p, p2] : p; + }, null, pathClone), + parseDots = R._parseDots = cacher(function (gradient) { + var dots = []; + for (var i = 0, ii = gradient.length; i < ii; i++) { + var dot = {}, + par = gradient[i].match(/^([^:]*):?([\d\.]*)/); + dot.color = R.getRGB(par[1]); + if (dot.color.error) { + return null; + } + dot.color = dot.color.hex; + par[2] && (dot.offset = par[2] + "%"); + dots.push(dot); + } + for (i = 1, ii = dots.length - 1; i < ii; i++) { + if (!dots[i].offset) { + var start = toFloat(dots[i - 1].offset || 0), + end = 0; + for (var j = i + 1; j < ii; j++) { + if (dots[j].offset) { + end = dots[j].offset; + break; + } + } + if (!end) { + end = 100; + j = ii; + } + end = toFloat(end); + var d = (end - start) / (j - i + 1); + for (; i < j; i++) { + start += d; + dots[i].offset = start + "%"; + } + } + } + return dots; + }), + tear = R._tear = function (el, paper) { + el == paper.top && (paper.top = el.prev); + el == paper.bottom && (paper.bottom = el.next); + el.next && (el.next.prev = el.prev); + el.prev && (el.prev.next = el.next); + }, + tofront = R._tofront = function (el, paper) { + if (paper.top === el) { + return; + } + tear(el, paper); + el.next = null; + el.prev = paper.top; + paper.top.next = el; + paper.top = el; + }, + toback = R._toback = function (el, paper) { + if (paper.bottom === el) { + return; + } + tear(el, paper); + el.next = paper.bottom; + el.prev = null; + paper.bottom.prev = el; + paper.bottom = el; + }, + insertafter = R._insertafter = function (el, el2, paper) { + tear(el, paper); + el2 == paper.top && (paper.top = el); + el2.next && (el2.next.prev = el); + el.next = el2.next; + el.prev = el2; + el2.next = el; + }, + insertbefore = R._insertbefore = function (el, el2, paper) { + tear(el, paper); + el2 == paper.bottom && (paper.bottom = el); + el2.prev && (el2.prev.next = el); + el.prev = el2.prev; + el2.prev = el; + el.next = el2; + }, + + toMatrix = R.toMatrix = function (path, transform) { + var bb = pathDimensions(path), + el = { + _: { + transform: E + }, + getBBox: function () { + return bb; + } + }; + extractTransform(el, transform); + return el.matrix; + }, + + transformPath = R.transformPath = function (path, transform) { + return mapPath(path, toMatrix(path, transform)); + }, + extractTransform = R._extractTransform = function (el, tstr) { + if (tstr == null) { + return el._.transform; + } + tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E); + var tdata = R.parseTransformString(tstr), + deg = 0, + dx = 0, + dy = 0, + sx = 1, + sy = 1, + _ = el._, + m = new Matrix; + _.transform = tdata || []; + if (tdata) { + for (var i = 0, ii = tdata.length; i < ii; i++) { + var t = tdata[i], + tlen = t.length, + command = Str(t[0]).toLowerCase(), + absolute = t[0] != command, + inver = absolute ? m.invert() : 0, + x1, + y1, + x2, + y2, + bb; + if (command == "t" && tlen == 3) { + if (absolute) { + x1 = inver.x(0, 0); + y1 = inver.y(0, 0); + x2 = inver.x(t[1], t[2]); + y2 = inver.y(t[1], t[2]); + m.translate(x2 - x1, y2 - y1); + } else { + m.translate(t[1], t[2]); + } + } else if (command == "r") { + if (tlen == 2) { + bb = bb || el.getBBox(1); + m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2); + deg += t[1]; + } else if (tlen == 4) { + if (absolute) { + x2 = inver.x(t[2], t[3]); + y2 = inver.y(t[2], t[3]); + m.rotate(t[1], x2, y2); + } else { + m.rotate(t[1], t[2], t[3]); + } + deg += t[1]; + } + } else if (command == "s") { + if (tlen == 2 || tlen == 3) { + bb = bb || el.getBBox(1); + m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2); + sx *= t[1]; + sy *= t[tlen - 1]; + } else if (tlen == 5) { + if (absolute) { + x2 = inver.x(t[3], t[4]); + y2 = inver.y(t[3], t[4]); + m.scale(t[1], t[2], x2, y2); + } else { + m.scale(t[1], t[2], t[3], t[4]); + } + sx *= t[1]; + sy *= t[2]; + } + } else if (command == "m" && tlen == 7) { + m.add(t[1], t[2], t[3], t[4], t[5], t[6]); + } + _.dirtyT = 1; + el.matrix = m; + } + } + + + el.matrix = m; + + _.sx = sx; + _.sy = sy; + _.deg = deg; + _.dx = dx = m.e; + _.dy = dy = m.f; + + if (sx == 1 && sy == 1 && !deg && _.bbox) { + _.bbox.x += +dx; + _.bbox.y += +dy; + } else { + _.dirtyT = 1; + } + }, + getEmpty = function (item) { + var l = item[0]; + switch (l.toLowerCase()) { + case "t": return [l, 0, 0]; + case "m": return [l, 1, 0, 0, 1, 0, 0]; + case "r": if (item.length == 4) { + return [l, 0, item[2], item[3]]; + } else { + return [l, 0]; + } + case "s": if (item.length == 5) { + return [l, 1, 1, item[3], item[4]]; + } else if (item.length == 3) { + return [l, 1, 1]; + } else { + return [l, 1]; + } + } + }, + equaliseTransform = R._equaliseTransform = function (t1, t2) { + t2 = Str(t2).replace(/\.{3}|\u2026/g, t1); + t1 = R.parseTransformString(t1) || []; + t2 = R.parseTransformString(t2) || []; + var maxlength = mmax(t1.length, t2.length), + from = [], + to = [], + i = 0, j, jj, + tt1, tt2; + for (; i < maxlength; i++) { + tt1 = t1[i] || getEmpty(t2[i]); + tt2 = t2[i] || getEmpty(tt1); + if ((tt1[0] != tt2[0]) || + (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) || + (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4])) + ) { + return; + } + from[i] = []; + to[i] = []; + for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) { + j in tt1 && (from[i][j] = tt1[j]); + j in tt2 && (to[i][j] = tt2[j]); + } + } + return { + from: from, + to: to + }; + }; + R._getContainer = function (x, y, w, h) { + var container; + container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x; + if (container == null) { + return; + } + if (container.tagName) { + if (y == null) { + return { + container: container, + width: container.style.pixelWidth || container.offsetWidth, + height: container.style.pixelHeight || container.offsetHeight + }; + } else { + return { + container: container, + width: y, + height: w + }; + } + } + return { + container: 1, + x: x, + y: y, + width: w, + height: h + }; + }; + + R.pathToRelative = pathToRelative; + R._engine = {}; + + R.path2curve = path2curve; + + R.matrix = function (a, b, c, d, e, f) { + return new Matrix(a, b, c, d, e, f); + }; + function Matrix(a, b, c, d, e, f) { + if (a != null) { + this.a = +a; + this.b = +b; + this.c = +c; + this.d = +d; + this.e = +e; + this.f = +f; + } else { + this.a = 1; + this.b = 0; + this.c = 0; + this.d = 1; + this.e = 0; + this.f = 0; + } + } + (function (matrixproto) { + + matrixproto.add = function (a, b, c, d, e, f) { + var out = [[], [], []], + m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]], + matrix = [[a, c, e], [b, d, f], [0, 0, 1]], + x, y, z, res; + + if (a && a instanceof Matrix) { + matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]]; + } + + for (x = 0; x < 3; x++) { + for (y = 0; y < 3; y++) { + res = 0; + for (z = 0; z < 3; z++) { + res += m[x][z] * matrix[z][y]; + } + out[x][y] = res; + } + } + this.a = out[0][0]; + this.b = out[1][0]; + this.c = out[0][1]; + this.d = out[1][1]; + this.e = out[0][2]; + this.f = out[1][2]; + }; + + matrixproto.invert = function () { + var me = this, + x = me.a * me.d - me.b * me.c; + return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x); + }; + + matrixproto.clone = function () { + return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f); + }; + + matrixproto.translate = function (x, y) { + this.add(1, 0, 0, 1, x, y); + }; + + matrixproto.scale = function (x, y, cx, cy) { + y == null && (y = x); + (cx || cy) && this.add(1, 0, 0, 1, cx, cy); + this.add(x, 0, 0, y, 0, 0); + (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy); + }; + + matrixproto.rotate = function (a, x, y) { + a = R.rad(a); + x = x || 0; + y = y || 0; + var cos = +math.cos(a).toFixed(9), + sin = +math.sin(a).toFixed(9); + this.add(cos, sin, -sin, cos, x, y); + this.add(1, 0, 0, 1, -x, -y); + }; + + matrixproto.x = function (x, y) { + return x * this.a + y * this.c + this.e; + }; + + matrixproto.y = function (x, y) { + return x * this.b + y * this.d + this.f; + }; + matrixproto.get = function (i) { + return +this[Str.fromCharCode(97 + i)].toFixed(4); + }; + matrixproto.toString = function () { + return R.svg ? + "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" : + [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join(); + }; + matrixproto.toFilter = function () { + return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + + ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + + ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')"; + }; + matrixproto.offset = function () { + return [this.e.toFixed(4), this.f.toFixed(4)]; + }; + function norm(a) { + return a[0] * a[0] + a[1] * a[1]; + } + function normalize(a) { + var mag = math.sqrt(norm(a)); + a[0] && (a[0] /= mag); + a[1] && (a[1] /= mag); + } + + matrixproto.split = function () { + var out = {}; + // translation + out.dx = this.e; + out.dy = this.f; + + // scale and shear + var row = [[this.a, this.c], [this.b, this.d]]; + out.scalex = math.sqrt(norm(row[0])); + normalize(row[0]); + + out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1]; + row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear]; + + out.scaley = math.sqrt(norm(row[1])); + normalize(row[1]); + out.shear /= out.scaley; + + // rotation + var sin = -row[0][1], + cos = row[1][1]; + if (cos < 0) { + out.rotate = R.deg(math.acos(cos)); + if (sin < 0) { + out.rotate = 360 - out.rotate; + } + } else { + out.rotate = R.deg(math.asin(sin)); + } + + out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate); + out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate; + out.noRotation = !+out.shear.toFixed(9) && !out.rotate; + return out; + }; + + matrixproto.toTransformString = function (shorter) { + var s = shorter || this[split](); + if (s.isSimple) { + s.scalex = +s.scalex.toFixed(4); + s.scaley = +s.scaley.toFixed(4); + s.rotate = +s.rotate.toFixed(4); + return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) + + (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) + + (s.rotate ? "r" + [s.rotate, 0, 0] : E); + } else { + return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; + } + }; + })(Matrix.prototype); + + // WebKit rendering bug workaround method + var version = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/); + if ((navigator.vendor == "Apple Computer, Inc.") && (version && version[1] < 4 || navigator.platform.slice(0, 2) == "iP") || + (navigator.vendor == "Google Inc." && version && version[1] < 8)) { + + paperproto.safari = function () { + var rect = this.rect(-99, -99, this.width + 99, this.height + 99).attr({stroke: "none"}); + setTimeout(function () {rect.remove();}); + }; + } else { + paperproto.safari = fun; + } + + var preventDefault = function () { + this.returnValue = false; + }, + preventTouch = function () { + return this.originalEvent.preventDefault(); + }, + stopPropagation = function () { + this.cancelBubble = true; + }, + stopTouch = function () { + return this.originalEvent.stopPropagation(); + }, + addEvent = (function () { + if (g.doc.addEventListener) { + return function (obj, type, fn, element) { + var realName = supportsTouch && touchMap[type] ? touchMap[type] : type, + f = function (e) { + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + x = e.clientX + scrollX, + y = e.clientY + scrollY; + if (supportsTouch && touchMap[has](type)) { + for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) { + if (e.targetTouches[i].target == obj) { + var olde = e; + e = e.targetTouches[i]; + e.originalEvent = olde; + e.preventDefault = preventTouch; + e.stopPropagation = stopTouch; + break; + } + } + } + return fn.call(element, e, x, y); + }; + obj.addEventListener(realName, f, false); + return function () { + obj.removeEventListener(realName, f, false); + return true; + }; + }; + } else if (g.doc.attachEvent) { + return function (obj, type, fn, element) { + var f = function (e) { + e = e || g.win.event; + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + x = e.clientX + scrollX, + y = e.clientY + scrollY; + e.preventDefault = e.preventDefault || preventDefault; + e.stopPropagation = e.stopPropagation || stopPropagation; + return fn.call(element, e, x, y); + }; + obj.attachEvent("on" + type, f); + var detacher = function () { + obj.detachEvent("on" + type, f); + return true; + }; + return detacher; + }; + } + })(), + drag = [], + dragMove = function (e) { + var x = e.clientX, + y = e.clientY, + scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft, + dragi, + j = drag.length; + while (j--) { + dragi = drag[j]; + if (supportsTouch) { + var i = e.touches.length, + touch; + while (i--) { + touch = e.touches[i]; + if (touch.identifier == dragi.el._drag.id) { + x = touch.clientX; + y = touch.clientY; + (e.originalEvent ? e.originalEvent : e).preventDefault(); + break; + } + } + } else { + e.preventDefault(); + } + var node = dragi.el.node, + o, + next = node.nextSibling, + parent = node.parentNode, + display = node.style.display; + g.win.opera && parent.removeChild(node); + node.style.display = "none"; + o = dragi.el.paper.getElementByPoint(x, y); + node.style.display = display; + g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node)); + o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o); + x += scrollX; + y += scrollY; + eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e); + } + }, + dragUp = function (e) { + R.unmousemove(dragMove).unmouseup(dragUp); + var i = drag.length, + dragi; + while (i--) { + dragi = drag[i]; + dragi.el._drag = {}; + eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e); + } + drag = []; + }, + + elproto = R.el = {}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for (var i = events.length; i--;) { + (function (eventName) { + R[eventName] = elproto[eventName] = function (fn, scope) { + if (R.is(fn, "function")) { + this.events = this.events || []; + this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)}); + } + return this; + }; + R["un" + eventName] = elproto["un" + eventName] = function (fn) { + var events = this.events || [], + l = events.length; + while (l--) if (events[l].name == eventName && events[l].f == fn) { + events[l].unbind(); + events.splice(l, 1); + !events.length && delete this.events; + return this; + } + return this; + }; + })(events[i]); + } + + + elproto.data = function (key, value) { + var data = eldata[this.id] = eldata[this.id] || {}; + if (arguments.length == 1) { + if (R.is(key, "object")) { + for (var i in key) if (key[has](i)) { + this.data(i, key[i]); + } + return this; + } + eve("raphael.data.get." + this.id, this, data[key], key); + return data[key]; + } + data[key] = value; + eve("raphael.data.set." + this.id, this, value, key); + return this; + }; + + elproto.removeData = function (key) { + if (key == null) { + eldata[this.id] = {}; + } else { + eldata[this.id] && delete eldata[this.id][key]; + } + return this; + }; + + elproto.hover = function (f_in, f_out, scope_in, scope_out) { + return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in); + }; + + elproto.unhover = function (f_in, f_out) { + return this.unmouseover(f_in).unmouseout(f_out); + }; + var draggable = []; + + elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) { + function start(e) { + (e.originalEvent || e).preventDefault(); + var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop, + scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft; + this._drag.x = e.clientX + scrollX; + this._drag.y = e.clientY + scrollY; + this._drag.id = e.identifier; + !drag.length && R.mousemove(dragMove).mouseup(dragUp); + drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope}); + onstart && eve.on("raphael.drag.start." + this.id, onstart); + onmove && eve.on("raphael.drag.move." + this.id, onmove); + onend && eve.on("raphael.drag.end." + this.id, onend); + eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e); + } + this._drag = {}; + draggable.push({el: this, start: start}); + this.mousedown(start); + return this; + }; + + elproto.onDragOver = function (f) { + f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id); + }; + + elproto.undrag = function () { + var i = draggable.length; + while (i--) if (draggable[i].el == this) { + this.unmousedown(draggable[i].start); + draggable.splice(i, 1); + eve.unbind("raphael.drag.*." + this.id); + } + !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp); + }; + + paperproto.circle = function (x, y, r) { + var out = R._engine.circle(this, x || 0, y || 0, r || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.rect = function (x, y, w, h, r) { + var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.ellipse = function (x, y, rx, ry) { + var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.path = function (pathString) { + pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E); + var out = R._engine.path(R.format[apply](R, arguments), this); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.image = function (src, x, y, w, h) { + var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.text = function (x, y, text) { + var out = R._engine.text(this, x || 0, y || 0, Str(text)); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.set = function (itemsArray) { + !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length)); + var out = new Set(itemsArray); + this.__set__ && this.__set__.push(out); + return out; + }; + + paperproto.setStart = function (set) { + this.__set__ = set || this.set(); + }; + + paperproto.setFinish = function (set) { + var out = this.__set__; + delete this.__set__; + return out; + }; + + paperproto.setSize = function (width, height) { + return R._engine.setSize.call(this, width, height); + }; + + paperproto.setViewBox = function (x, y, w, h, fit) { + return R._engine.setViewBox.call(this, x, y, w, h, fit); + }; + + + paperproto.top = paperproto.bottom = null; + + paperproto.raphael = R; + var getOffset = function (elem) { + var box = elem.getBoundingClientRect(), + doc = elem.ownerDocument, + body = doc.body, + docElem = doc.documentElement, + clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, + top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop, + left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft; + return { + y: top, + x: left + }; + }; + + paperproto.getElementByPoint = function (x, y) { + var paper = this, + svg = paper.canvas, + target = g.doc.elementFromPoint(x, y); + if (g.win.opera && target.tagName == "svg") { + var so = getOffset(svg), + sr = svg.createSVGRect(); + sr.x = x - so.x; + sr.y = y - so.y; + sr.width = sr.height = 1; + var hits = svg.getIntersectionList(sr, null); + if (hits.length) { + target = hits[hits.length - 1]; + } + } + if (!target) { + return null; + } + while (target.parentNode && target != svg.parentNode && !target.raphael) { + target = target.parentNode; + } + target == paper.canvas.parentNode && (target = svg); + target = target && target.raphael ? paper.getById(target.raphaelid) : null; + return target; + }; + + paperproto.getById = function (id) { + var bot = this.bottom; + while (bot) { + if (bot.id == id) { + return bot; + } + bot = bot.next; + } + return null; + }; + + paperproto.forEach = function (callback, thisArg) { + var bot = this.bottom; + while (bot) { + if (callback.call(thisArg, bot) === false) { + return this; + } + bot = bot.next; + } + return this; + }; + + paperproto.getElementsByPoint = function (x, y) { + var set = this.set(); + this.forEach(function (el) { + if (el.isPointInside(x, y)) { + set.push(el); + } + }); + return set; + }; + function x_y() { + return this.x + S + this.y; + } + function x_y_w_h() { + return this.x + S + this.y + S + this.width + " \xd7 " + this.height; + } + + elproto.isPointInside = function (x, y) { + var rp = this.realPath = this.realPath || getPath[this.type](this); + return R.isPointInsidePath(rp, x, y); + }; + + elproto.getBBox = function (isWithoutTransform) { + if (this.removed) { + return {}; + } + var _ = this._; + if (isWithoutTransform) { + if (_.dirty || !_.bboxwt) { + this.realPath = getPath[this.type](this); + _.bboxwt = pathDimensions(this.realPath); + _.bboxwt.toString = x_y_w_h; + _.dirty = 0; + } + return _.bboxwt; + } + if (_.dirty || _.dirtyT || !_.bbox) { + if (_.dirty || !this.realPath) { + _.bboxwt = 0; + this.realPath = getPath[this.type](this); + } + _.bbox = pathDimensions(mapPath(this.realPath, this.matrix)); + _.bbox.toString = x_y_w_h; + _.dirty = _.dirtyT = 0; + } + return _.bbox; + }; + + elproto.clone = function () { + if (this.removed) { + return null; + } + var out = this.paper[this.type]().attr(this.attr()); + this.__set__ && this.__set__.push(out); + return out; + }; + + elproto.glow = function (glow) { + if (this.type == "text") { + return null; + } + glow = glow || {}; + var s = { + width: (glow.width || 10) + (+this.attr("stroke-width") || 1), + fill: glow.fill || false, + opacity: glow.opacity || .5, + offsetx: glow.offsetx || 0, + offsety: glow.offsety || 0, + color: glow.color || "#000" + }, + c = s.width / 2, + r = this.paper, + out = r.set(), + path = this.realPath || getPath[this.type](this); + path = this.matrix ? mapPath(path, this.matrix) : path; + for (var i = 1; i < c + 1; i++) { + out.push(r.path(path).attr({ + stroke: s.color, + fill: s.fill ? s.color : "none", + "stroke-linejoin": "round", + "stroke-linecap": "round", + "stroke-width": +(s.width / c * i).toFixed(3), + opacity: +(s.opacity / c).toFixed(3) + })); + } + return out.insertBefore(this).translate(s.offsetx, s.offsety); + }; + var curveslengths = {}, + getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { + if (length == null) { + return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); + } else { + return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)); + } + }, + getLengthFactory = function (istotal, subpath) { + return function (path, length, onlystart) { + path = path2curve(path); + var x, y, p, l, sp = "", subpaths = {}, point, + len = 0; + for (var i = 0, ii = path.length; i < ii; i++) { + p = path[i]; + if (p[0] == "M") { + x = +p[1]; + y = +p[2]; + } else { + l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]); + if (len + l > length) { + if (subpath && !subpaths.start) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y]; + if (onlystart) {return sp;} + subpaths.start = sp; + sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join(); + len += l; + x = +p[5]; + y = +p[6]; + continue; + } + if (!istotal && !subpath) { + point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len); + return {x: point.x, y: point.y, alpha: point.alpha}; + } + } + len += l; + x = +p[5]; + y = +p[6]; + } + sp += p.shift() + p; + } + subpaths.end = sp; + point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1); + point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha}); + return point; + }; + }; + var getTotalLength = getLengthFactory(1), + getPointAtLength = getLengthFactory(), + getSubpathsAtLength = getLengthFactory(0, 1); + + R.getTotalLength = getTotalLength; + + R.getPointAtLength = getPointAtLength; + + R.getSubpath = function (path, from, to) { + if (this.getTotalLength(path) - to < 1e-6) { + return getSubpathsAtLength(path, from).end; + } + var a = getSubpathsAtLength(path, to, 1); + return from ? getSubpathsAtLength(a, from).end : a; + }; + + elproto.getTotalLength = function () { + if (this.type != "path") {return;} + if (this.node.getTotalLength) { + return this.node.getTotalLength(); + } + return getTotalLength(this.attrs.path); + }; + + elproto.getPointAtLength = function (length) { + if (this.type != "path") {return;} + return getPointAtLength(this.attrs.path, length); + }; + + elproto.getSubpath = function (from, to) { + if (this.type != "path") {return;} + return R.getSubpath(this.attrs.path, from, to); + }; + + var ef = R.easing_formulas = { + linear: function (n) { + return n; + }, + "<": function (n) { + return pow(n, 1.7); + }, + ">": function (n) { + return pow(n, .48); + }, + "<>": function (n) { + var q = .48 - n / 1.04, + Q = math.sqrt(.1734 + q * q), + x = Q - q, + X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1), + y = -Q - q, + Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1), + t = X + Y + .5; + return (1 - t) * 3 * t * t + t * t * t; + }, + backIn: function (n) { + var s = 1.70158; + return n * n * ((s + 1) * n - s); + }, + backOut: function (n) { + n = n - 1; + var s = 1.70158; + return n * n * ((s + 1) * n + s) + 1; + }, + elastic: function (n) { + if (n == !!n) { + return n; + } + return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1; + }, + bounce: function (n) { + var s = 7.5625, + p = 2.75, + l; + if (n < (1 / p)) { + l = s * n * n; + } else { + if (n < (2 / p)) { + n -= (1.5 / p); + l = s * n * n + .75; + } else { + if (n < (2.5 / p)) { + n -= (2.25 / p); + l = s * n * n + .9375; + } else { + n -= (2.625 / p); + l = s * n * n + .984375; + } + } + } + return l; + } + }; + ef.easeIn = ef["ease-in"] = ef["<"]; + ef.easeOut = ef["ease-out"] = ef[">"]; + ef.easeInOut = ef["ease-in-out"] = ef["<>"]; + ef["back-in"] = ef.backIn; + ef["back-out"] = ef.backOut; + + var animationElements = [], + requestAnimFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + setTimeout(callback, 16); + }, + animation = function () { + var Now = +new Date, + l = 0; + for (; l < animationElements.length; l++) { + var e = animationElements[l]; + if (e.el.removed || e.paused) { + continue; + } + var time = Now - e.start, + ms = e.ms, + easing = e.easing, + from = e.from, + diff = e.diff, + to = e.to, + t = e.t, + that = e.el, + set = {}, + now, + init = {}, + key; + if (e.initstatus) { + time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms; + e.status = e.initstatus; + delete e.initstatus; + e.stop && animationElements.splice(l--, 1); + } else { + e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top; + } + if (time < 0) { + continue; + } + if (time < ms) { + var pos = easing(time / ms); + for (var attr in from) if (from[has](attr)) { + switch (availableAnimAttrs[attr]) { + case nu: + now = +from[attr] + pos * ms * diff[attr]; + break; + case "colour": + now = "rgb(" + [ + upto255(round(from[attr].r + pos * ms * diff[attr].r)), + upto255(round(from[attr].g + pos * ms * diff[attr].g)), + upto255(round(from[attr].b + pos * ms * diff[attr].b)) + ].join(",") + ")"; + break; + case "path": + now = []; + for (var i = 0, ii = from[attr].length; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (var j = 1, jj = from[attr][i].length; j < jj; j++) { + now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + now[i] = now[i].join(S); + } + now = now.join(S); + break; + case "transform": + if (diff[attr].real) { + now = []; + for (i = 0, ii = from[attr].length; i < ii; i++) { + now[i] = [from[attr][i][0]]; + for (j = 1, jj = from[attr][i].length; j < jj; j++) { + now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j]; + } + } + } else { + var get = function (i) { + return +from[attr][i] + pos * ms * diff[attr][i]; + }; + // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]]; + now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]]; + } + break; + case "csv": + if (attr == "clip-rect") { + now = []; + i = 4; + while (i--) { + now[i] = +from[attr][i] + pos * ms * diff[attr][i]; + } + } + break; + default: + var from2 = [][concat](from[attr]); + now = []; + i = that.paper.customAttributes[attr].length; + while (i--) { + now[i] = +from2[i] + pos * ms * diff[attr][i]; + } + break; + } + set[attr] = now; + } + that.attr(set); + (function (id, that, anim) { + setTimeout(function () { + eve("raphael.anim.frame." + id, that, anim); + }); + })(that.id, that, e.anim); + } else { + (function(f, el, a) { + setTimeout(function() { + eve("raphael.anim.frame." + el.id, el, a); + eve("raphael.anim.finish." + el.id, el, a); + R.is(f, "function") && f.call(el); + }); + })(e.callback, that, e.anim); + that.attr(to); + animationElements.splice(l--, 1); + if (e.repeat > 1 && !e.next) { + for (key in to) if (to[has](key)) { + init[key] = e.totalOrigin[key]; + } + e.el.attr(init); + runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); + } + if (e.next && !e.stop) { + runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat); + } + } + } + R.svg && that && that.paper && that.paper.safari(); + animationElements.length && requestAnimFrame(animation); + }, + upto255 = function (color) { + return color > 255 ? 255 : color < 0 ? 0 : color; + }; + + elproto.animateWith = function (el, anim, params, ms, easing, callback) { + var element = this; + if (element.removed) { + callback && callback.call(element); + return element; + } + var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback), + x, y; + runAnimation(a, element, a.percents[0], null, element.attr()); + for (var i = 0, ii = animationElements.length; i < ii; i++) { + if (animationElements[i].anim == anim && animationElements[i].el == el) { + animationElements[ii - 1].start = animationElements[i].start; + break; + } + } + return element; + // + // + // var a = params ? R.animation(params, ms, easing, callback) : anim, + // status = element.status(anim); + // return this.animate(a).status(a, status * anim.ms / a.ms); + }; + function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { + var cx = 3 * p1x, + bx = 3 * (p2x - p1x) - cx, + ax = 1 - cx - bx, + cy = 3 * p1y, + by = 3 * (p2y - p1y) - cy, + ay = 1 - cy - by; + function sampleCurveX(t) { + return ((ax * t + bx) * t + cx) * t; + } + function solve(x, epsilon) { + var t = solveCurveX(x, epsilon); + return ((ay * t + by) * t + cy) * t; + } + function solveCurveX(x, epsilon) { + var t0, t1, t2, x2, d2, i; + for(t2 = x, i = 0; i < 8; i++) { + x2 = sampleCurveX(t2) - x; + if (abs(x2) < epsilon) { + return t2; + } + d2 = (3 * ax * t2 + 2 * bx) * t2 + cx; + if (abs(d2) < 1e-6) { + break; + } + t2 = t2 - x2 / d2; + } + t0 = 0; + t1 = 1; + t2 = x; + if (t2 < t0) { + return t0; + } + if (t2 > t1) { + return t1; + } + while (t0 < t1) { + x2 = sampleCurveX(t2); + if (abs(x2 - x) < epsilon) { + return t2; + } + if (x > x2) { + t0 = t2; + } else { + t1 = t2; + } + t2 = (t1 - t0) / 2 + t0; + } + return t2; + } + return solve(t, 1 / (200 * duration)); + } + elproto.onAnimation = function (f) { + f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id); + return this; + }; + function Animation(anim, ms) { + var percents = [], + newAnim = {}; + this.ms = ms; + this.times = 1; + if (anim) { + for (var attr in anim) if (anim[has](attr)) { + newAnim[toFloat(attr)] = anim[attr]; + percents.push(toFloat(attr)); + } + percents.sort(sortByNumber); + } + this.anim = newAnim; + this.top = percents[percents.length - 1]; + this.percents = percents; + } + + Animation.prototype.delay = function (delay) { + var a = new Animation(this.anim, this.ms); + a.times = this.times; + a.del = +delay || 0; + return a; + }; + + Animation.prototype.repeat = function (times) { + var a = new Animation(this.anim, this.ms); + a.del = this.del; + a.times = math.floor(mmax(times, 0)) || 1; + return a; + }; + function runAnimation(anim, element, percent, status, totalOrigin, times) { + percent = toFloat(percent); + var params, + isInAnim, + isInAnimSet, + percents = [], + next, + prev, + timestamp, + ms = anim.ms, + from = {}, + to = {}, + diff = {}; + if (status) { + for (i = 0, ii = animationElements.length; i < ii; i++) { + var e = animationElements[i]; + if (e.el.id == element.id && e.anim == anim) { + if (e.percent != percent) { + animationElements.splice(i, 1); + isInAnimSet = 1; + } else { + isInAnim = e; + } + element.attr(e.totalOrigin); + break; + } + } + } else { + status = +to; // NaN + } + for (var i = 0, ii = anim.percents.length; i < ii; i++) { + if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) { + percent = anim.percents[i]; + prev = anim.percents[i - 1] || 0; + ms = ms / anim.top * (percent - prev); + next = anim.percents[i + 1]; + params = anim.anim[percent]; + break; + } else if (status) { + element.attr(anim.anim[anim.percents[i]]); + } + } + if (!params) { + return; + } + if (!isInAnim) { + for (var attr in params) if (params[has](attr)) { + if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { + from[attr] = element.attr(attr); + (from[attr] == null) && (from[attr] = availableAttrs[attr]); + to[attr] = params[attr]; + switch (availableAnimAttrs[attr]) { + case nu: + diff[attr] = (to[attr] - from[attr]) / ms; + break; + case "colour": + from[attr] = R.getRGB(from[attr]); + var toColour = R.getRGB(to[attr]); + diff[attr] = { + r: (toColour.r - from[attr].r) / ms, + g: (toColour.g - from[attr].g) / ms, + b: (toColour.b - from[attr].b) / ms + }; + break; + case "path": + var pathes = path2curve(from[attr], to[attr]), + toPath = pathes[1]; + from[attr] = pathes[0]; + diff[attr] = []; + for (i = 0, ii = from[attr].length; i < ii; i++) { + diff[attr][i] = [0]; + for (var j = 1, jj = from[attr][i].length; j < jj; j++) { + diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms; + } + } + break; + case "transform": + var _ = element._, + eq = equaliseTransform(_[attr], to[attr]); + if (eq) { + from[attr] = eq.from; + to[attr] = eq.to; + diff[attr] = []; + diff[attr].real = true; + for (i = 0, ii = from[attr].length; i < ii; i++) { + diff[attr][i] = [from[attr][i][0]]; + for (j = 1, jj = from[attr][i].length; j < jj; j++) { + diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms; + } + } + } else { + var m = (element.matrix || new Matrix), + to2 = { + _: {transform: _.transform}, + getBBox: function () { + return element.getBBox(1); + } + }; + from[attr] = [ + m.a, + m.b, + m.c, + m.d, + m.e, + m.f + ]; + extractTransform(to2, to[attr]); + to[attr] = to2._.transform; + diff[attr] = [ + (to2.matrix.a - m.a) / ms, + (to2.matrix.b - m.b) / ms, + (to2.matrix.c - m.c) / ms, + (to2.matrix.d - m.d) / ms, + (to2.matrix.e - m.e) / ms, + (to2.matrix.f - m.f) / ms + ]; + // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy]; + // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }}; + // extractTransform(to2, to[attr]); + // diff[attr] = [ + // (to2._.sx - _.sx) / ms, + // (to2._.sy - _.sy) / ms, + // (to2._.deg - _.deg) / ms, + // (to2._.dx - _.dx) / ms, + // (to2._.dy - _.dy) / ms + // ]; + } + break; + case "csv": + var values = Str(params[attr])[split](separator), + from2 = Str(from[attr])[split](separator); + if (attr == "clip-rect") { + from[attr] = from2; + diff[attr] = []; + i = from2.length; + while (i--) { + diff[attr][i] = (values[i] - from[attr][i]) / ms; + } + } + to[attr] = values; + break; + default: + values = [][concat](params[attr]); + from2 = [][concat](from[attr]); + diff[attr] = []; + i = element.paper.customAttributes[attr].length; + while (i--) { + diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms; + } + break; + } + } + } + var easing = params.easing, + easyeasy = R.easing_formulas[easing]; + if (!easyeasy) { + easyeasy = Str(easing).match(bezierrg); + if (easyeasy && easyeasy.length == 5) { + var curve = easyeasy; + easyeasy = function (t) { + return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms); + }; + } else { + easyeasy = pipe; + } + } + timestamp = params.start || anim.start || +new Date; + e = { + anim: anim, + percent: percent, + timestamp: timestamp, + start: timestamp + (anim.del || 0), + status: 0, + initstatus: status || 0, + stop: false, + ms: ms, + easing: easyeasy, + from: from, + diff: diff, + to: to, + el: element, + callback: params.callback, + prev: prev, + next: next, + repeat: times || anim.times, + origin: element.attr(), + totalOrigin: totalOrigin + }; + animationElements.push(e); + if (status && !isInAnim && !isInAnimSet) { + e.stop = true; + e.start = new Date - ms * status; + if (animationElements.length == 1) { + return animation(); + } + } + if (isInAnimSet) { + e.start = new Date - e.ms * status; + } + animationElements.length == 1 && requestAnimFrame(animation); + } else { + isInAnim.initstatus = status; + isInAnim.start = new Date - isInAnim.ms * status; + } + eve("raphael.anim.start." + element.id, element, anim); + } + + R.animation = function (params, ms, easing, callback) { + if (params instanceof Animation) { + return params; + } + if (R.is(easing, "function") || !easing) { + callback = callback || easing || null; + easing = null; + } + params = Object(params); + ms = +ms || 0; + var p = {}, + json, + attr; + for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { + json = true; + p[attr] = params[attr]; + } + if (!json) { + return new Animation(params, ms); + } else { + easing && (p.easing = easing); + callback && (p.callback = callback); + return new Animation({100: p}, ms); + } + }; + + elproto.animate = function (params, ms, easing, callback) { + var element = this; + if (element.removed) { + callback && callback.call(element); + return element; + } + var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback); + runAnimation(anim, element, anim.percents[0], null, element.attr()); + return element; + }; + + elproto.setTime = function (anim, value) { + if (anim && value != null) { + this.status(anim, mmin(value, anim.ms) / anim.ms); + } + return this; + }; + + elproto.status = function (anim, value) { + var out = [], + i = 0, + len, + e; + if (value != null) { + runAnimation(anim, this, -1, mmin(value, 1)); + return this; + } else { + len = animationElements.length; + for (; i < len; i++) { + e = animationElements[i]; + if (e.el.id == this.id && (!anim || e.anim == anim)) { + if (anim) { + return e.status; + } + out.push({ + anim: e.anim, + status: e.status + }); + } + } + if (anim) { + return 0; + } + return out; + } + }; + + elproto.pause = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) { + animationElements[i].paused = true; + } + } + return this; + }; + + elproto.resume = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + var e = animationElements[i]; + if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) { + delete e.paused; + this.status(e.anim, e.status); + } + } + return this; + }; + + elproto.stop = function (anim) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { + if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) { + animationElements.splice(i--, 1); + } + } + return this; + }; + function stopAnimation(paper) { + for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) { + animationElements.splice(i--, 1); + } + } + eve.on("raphael.remove", stopAnimation); + eve.on("raphael.clear", stopAnimation); + elproto.toString = function () { + return "Rapha\xebl\u2019s object"; + }; + + // Set + var Set = function (items) { + this.items = []; + this.length = 0; + this.type = "set"; + if (items) { + for (var i = 0, ii = items.length; i < ii; i++) { + if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) { + this[this.items.length] = this.items[this.items.length] = items[i]; + this.length++; + } + } + } + }, + setproto = Set.prototype; + + setproto.push = function () { + var item, + len; + for (var i = 0, ii = arguments.length; i < ii; i++) { + item = arguments[i]; + if (item && (item.constructor == elproto.constructor || item.constructor == Set)) { + len = this.items.length; + this[len] = this.items[len] = item; + this.length++; + } + } + return this; + }; + + setproto.pop = function () { + this.length && delete this[this.length--]; + return this.items.pop(); + }; + + setproto.forEach = function (callback, thisArg) { + for (var i = 0, ii = this.items.length; i < ii; i++) { + if (callback.call(thisArg, this.items[i], i) === false) { + return this; + } + } + return this; + }; + for (var method in elproto) if (elproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname][apply](el, arg); + }); + }; + })(method); + } + setproto.attr = function (name, value) { + if (name && R.is(name, array) && R.is(name[0], "object")) { + for (var j = 0, jj = name.length; j < jj; j++) { + this.items[j].attr(name[j]); + } + } else { + for (var i = 0, ii = this.items.length; i < ii; i++) { + this.items[i].attr(name, value); + } + } + return this; + }; + + setproto.clear = function () { + while (this.length) { + this.pop(); + } + }; + + setproto.splice = function (index, count, insertion) { + index = index < 0 ? mmax(this.length + index, 0) : index; + count = mmax(0, mmin(this.length - index, count)); + var tail = [], + todel = [], + args = [], + i; + for (i = 2; i < arguments.length; i++) { + args.push(arguments[i]); + } + for (i = 0; i < count; i++) { + todel.push(this[index + i]); + } + for (; i < this.length - index; i++) { + tail.push(this[index + i]); + } + var arglen = args.length; + for (i = 0; i < arglen + tail.length; i++) { + this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen]; + } + i = this.items.length = this.length -= count - arglen; + while (this[i]) { + delete this[i++]; + } + return new Set(todel); + }; + + setproto.exclude = function (el) { + for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { + this.splice(i, 1); + return true; + } + }; + setproto.animate = function (params, ms, easing, callback) { + (R.is(easing, "function") || !easing) && (callback = easing || null); + var len = this.items.length, + i = len, + item, + set = this, + collector; + if (!len) { + return this; + } + callback && (collector = function () { + !--len && callback.call(set); + }); + easing = R.is(easing, string) ? easing : collector; + var anim = R.animation(params, ms, easing, collector); + item = this.items[--i].animate(anim); + while (i--) { + this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim); + } + return this; + }; + setproto.insertAfter = function (el) { + var i = this.items.length; + while (i--) { + this.items[i].insertAfter(el); + } + return this; + }; + setproto.getBBox = function () { + var x = [], + y = [], + x2 = [], + y2 = []; + for (var i = this.items.length; i--;) if (!this.items[i].removed) { + var box = this.items[i].getBBox(); + x.push(box.x); + y.push(box.y); + x2.push(box.x + box.width); + y2.push(box.y + box.height); + } + x = mmin[apply](0, x); + y = mmin[apply](0, y); + x2 = mmax[apply](0, x2); + y2 = mmax[apply](0, y2); + return { + x: x, + y: y, + x2: x2, + y2: y2, + width: x2 - x, + height: y2 - y + }; + }; + setproto.clone = function (s) { + s = new Set; + for (var i = 0, ii = this.items.length; i < ii; i++) { + s.push(this.items[i].clone()); + } + return s; + }; + setproto.toString = function () { + return "Rapha\xebl\u2018s set"; + }; + + + R.registerFont = function (font) { + if (!font.face) { + return font; + } + this.fonts = this.fonts || {}; + var fontcopy = { + w: font.w, + face: {}, + glyphs: {} + }, + family = font.face["font-family"]; + for (var prop in font.face) if (font.face[has](prop)) { + fontcopy.face[prop] = font.face[prop]; + } + if (this.fonts[family]) { + this.fonts[family].push(fontcopy); + } else { + this.fonts[family] = [fontcopy]; + } + if (!font.svg) { + fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); + for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { + var path = font.glyphs[glyph]; + fontcopy.glyphs[glyph] = { + w: path.w, + k: {}, + d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) { + return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M"; + }) + "z" + }; + if (path.k) { + for (var k in path.k) if (path[has](k)) { + fontcopy.glyphs[glyph].k[k] = path.k[k]; + } + } + } + } + return font; + }; + + paperproto.getFont = function (family, weight, style, stretch) { + stretch = stretch || "normal"; + style = style || "normal"; + weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400; + if (!R.fonts) { + return; + } + var font = R.fonts[family]; + if (!font) { + var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); + for (var fontName in R.fonts) if (R.fonts[has](fontName)) { + if (name.test(fontName)) { + font = R.fonts[fontName]; + break; + } + } + } + var thefont; + if (font) { + for (var i = 0, ii = font.length; i < ii; i++) { + thefont = font[i]; + if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) { + break; + } + } + } + return thefont; + }; + + paperproto.print = function (x, y, string, font, size, origin, letter_spacing) { + origin = origin || "middle"; // baseline|middle + letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1); + var letters = Str(string)[split](E), + shift = 0, + notfirst = 0, + path = E, + scale; + R.is(font, string) && (font = this.getFont(font)); + if (font) { + scale = (size || 16) / font.face["units-per-em"]; + var bb = font.face.bbox[split](separator), + top = +bb[0], + lineHeight = bb[3] - bb[1], + shifty = 0, + height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2); + for (var i = 0, ii = letters.length; i < ii; i++) { + if (letters[i] == "\n") { + shift = 0; + curr = 0; + notfirst = 0; + shifty += lineHeight; + } else { + var prev = notfirst && font.glyphs[letters[i - 1]] || {}, + curr = font.glyphs[letters[i]]; + shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0; + notfirst = 1; + } + if (curr && curr.d) { + path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]); + } + } + } + return this.path(path).attr({ + fill: "#000", + stroke: "none" + }); + }; + + + paperproto.add = function (json) { + if (R.is(json, "array")) { + var res = this.set(), + i = 0, + ii = json.length, + j; + for (; i < ii; i++) { + j = json[i] || {}; + elements[has](j.type) && res.push(this[j.type]().attr(j)); + } + } + return res; + }; + + + R.format = function (token, params) { + var args = R.is(params, array) ? [0][concat](params) : arguments; + token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) { + return args[++i] == null ? E : args[i]; + })); + return token || E; + }; + + R.fullfill = (function () { + var tokenRegex = /\{([^\}]+)\}/g, + objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties + replacer = function (all, key, obj) { + var res = obj; + key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { + name = name || quotedName; + if (res) { + if (name in res) { + res = res[name]; + } + typeof res == "function" && isFunc && (res = res()); + } + }); + res = (res == null || res == obj ? all : res) + ""; + return res; + }; + return function (str, obj) { + return String(str).replace(tokenRegex, function (all, key) { + return replacer(all, key, obj); + }); + }; + })(); + + R.ninja = function () { + oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael; + return R; + }; + + R.st = setproto; + // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html + (function (doc, loaded, f) { + if (doc.readyState == null && doc.addEventListener){ + doc.addEventListener(loaded, f = function () { + doc.removeEventListener(loaded, f, false); + doc.readyState = "complete"; + }, false); + doc.readyState = "loading"; + } + function isLoaded() { + (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload"); + } + isLoaded(); + })(document, "DOMContentLoaded"); + + oldRaphael.was ? (g.win.Raphael = R) : (Raphael = R); + + eve.on("raphael.DOMload", function () { + loaded = true; + }); +})(); + + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ SVG Module │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ +window.Raphael.svg && function (R) { + var has = "hasOwnProperty", + Str = String, + toFloat = parseFloat, + toInt = parseInt, + math = Math, + mmax = math.max, + abs = math.abs, + pow = math.pow, + separator = /[, ]+/, + eve = R.eve, + E = "", + S = " "; + var xlink = "http://www.w3.org/1999/xlink", + markers = { + block: "M5,0 0,2.5 5,5z", + classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z", + diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z", + open: "M6,1 1,3.5 6,6", + oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z" + }, + markerCounter = {}; + R.toString = function () { + return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version; + }; + var $ = function (el, attr) { + if (attr) { + if (typeof el == "string") { + el = $(el); + } + for (var key in attr) if (attr[has](key)) { + if (key.substring(0, 6) == "xlink:") { + el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); + } else { + el.setAttribute(key, Str(attr[key])); + } + } + } else { + el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); + el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); + } + return el; + }, + addGradientFill = function (element, gradient) { + var type = "linear", + id = element.id + gradient, + fx = .5, fy = .5, + o = element.node, + SVG = element.paper, + s = o.style, + el = R._g.doc.getElementById(id); + if (!el) { + gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) { + type = "radial"; + if (_fx && _fy) { + fx = toFloat(_fx); + fy = toFloat(_fy); + var dir = ((fy > .5) * 2 - 1); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && + (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) && + fy != .5 && + (fy = fy.toFixed(5) - 1e-5 * dir); + } + return E; + }); + gradient = gradient.split(/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))], + max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1); + vector[2] *= max; + vector[3] *= max; + if (vector[2] < 0) { + vector[0] = -vector[2]; + vector[2] = 0; + } + if (vector[3] < 0) { + vector[1] = -vector[3]; + vector[3] = 0; + } + } + var dots = R._parseDots(gradient); + if (!dots) { + return null; + } + id = id.replace(/[\(\)\s,\xb0#]/g, "_"); + + if (element.gradient && id != element.gradient.id) { + SVG.defs.removeChild(element.gradient); + delete element.gradient; + } + + if (!element.gradient) { + el = $(type + "Gradient", {id: id}); + element.gradient = el; + $(el, type == "radial" ? { + fx: fx, + fy: fy + } : { + x1: vector[0], + y1: vector[1], + x2: vector[2], + y2: vector[3], + gradientTransform: element.matrix.invert() + }); + SVG.defs.appendChild(el); + for (var i = 0, ii = dots.length; i < ii; i++) { + el.appendChild($("stop", { + offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%", + "stop-color": dots[i].color || "#fff" + })); + } + } + } + $(o, { + fill: "url(#" + id + ")", + opacity: 1, + "fill-opacity": 1 + }); + s.fill = E; + s.opacity = 1; + s.fillOpacity = 1; + return 1; + }, + updatePosition = function (o) { + var bbox = o.getBBox(1); + $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"}); + }, + addArrow = function (o, value, isEnd) { + if (o.type == "path") { + var values = Str(value).toLowerCase().split("-"), + p = o.paper, + se = isEnd ? "end" : "start", + node = o.node, + attrs = o.attrs, + stroke = attrs["stroke-width"], + i = values.length, + type = "classic", + from, + to, + dx, + refX, + attr, + w = 3, + h = 3, + t = 5; + while (i--) { + switch (values[i]) { + case "block": + case "classic": + case "oval": + case "diamond": + case "open": + case "none": + type = values[i]; + break; + case "wide": h = 5; break; + case "narrow": h = 2; break; + case "long": w = 5; break; + case "short": w = 2; break; + } + } + if (type == "open") { + w += 2; + h += 2; + t += 2; + dx = 1; + refX = isEnd ? 4 : 1; + attr = { + fill: "none", + stroke: attrs.stroke + }; + } else { + refX = dx = w / 2; + attr = { + fill: attrs.stroke, + stroke: "none" + }; + } + if (o._.arrows) { + if (isEnd) { + o._.arrows.endPath && markerCounter[o._.arrows.endPath]--; + o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--; + } else { + o._.arrows.startPath && markerCounter[o._.arrows.startPath]--; + o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--; + } + } else { + o._.arrows = {}; + } + if (type != "none") { + var pathId = "raphael-marker-" + type, + markerId = "raphael-marker-" + se + type + w + h; + if (!R._g.doc.getElementById(pathId)) { + p.defs.appendChild($($("path"), { + "stroke-linecap": "round", + d: markers[type], + id: pathId + })); + markerCounter[pathId] = 1; + } else { + markerCounter[pathId]++; + } + var marker = R._g.doc.getElementById(markerId), + use; + if (!marker) { + marker = $($("marker"), { + id: markerId, + markerHeight: h, + markerWidth: w, + orient: "auto", + refX: refX, + refY: h / 2 + }); + use = $($("use"), { + "xlink:href": "#" + pathId, + transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")", + "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4) + }); + marker.appendChild(use); + p.defs.appendChild(marker); + markerCounter[markerId] = 1; + } else { + markerCounter[markerId]++; + use = marker.getElementsByTagName("use")[0]; + } + $(use, attr); + var delta = dx * (type != "diamond" && type != "oval"); + if (isEnd) { + from = o._.arrows.startdx * stroke || 0; + to = R.getTotalLength(attrs.path) - delta * stroke; + } else { + from = delta * stroke; + to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); + } + attr = {}; + attr["marker-" + se] = "url(#" + markerId + ")"; + if (to || from) { + attr.d = Raphael.getSubpath(attrs.path, from, to); + } + $(node, attr); + o._.arrows[se + "Path"] = pathId; + o._.arrows[se + "Marker"] = markerId; + o._.arrows[se + "dx"] = delta; + o._.arrows[se + "Type"] = type; + o._.arrows[se + "String"] = value; + } else { + if (isEnd) { + from = o._.arrows.startdx * stroke || 0; + to = R.getTotalLength(attrs.path) - from; + } else { + from = 0; + to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0); + } + o._.arrows[se + "Path"] && $(node, {d: Raphael.getSubpath(attrs.path, from, to)}); + delete o._.arrows[se + "Path"]; + delete o._.arrows[se + "Marker"]; + delete o._.arrows[se + "dx"]; + delete o._.arrows[se + "Type"]; + delete o._.arrows[se + "String"]; + } + for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { + var item = R._g.doc.getElementById(attr); + item && item.parentNode.removeChild(item); + } + } + }, + dasharray = { + "": [0], + "none": [0], + "-": [3, 1], + ".": [1, 1], + "-.": [3, 1, 1, 1], + "-..": [3, 1, 1, 1, 1, 1], + ". ": [1, 3], + "- ": [4, 3], + "--": [8, 3], + "- .": [4, 3, 1, 3], + "--.": [8, 3, 1, 3], + "--..": [8, 3, 1, 3, 1, 3] + }, + addDashes = function (o, value, params) { + value = dasharray[Str(value).toLowerCase()]; + if (value) { + var width = o.attrs["stroke-width"] || "1", + butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0, + dashes = [], + i = value.length; + while (i--) { + dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; + } + $(o.node, {"stroke-dasharray": dashes.join(",")}); + } + }, + setFillAndStroke = function (o, params) { + var node = o.node, + attrs = o.attrs, + vis = node.style.visibility; + node.style.visibility = "hidden"; + for (var att in params) { + if (params[has](att)) { + if (!R._availableAttrs[has](att)) { + continue; + } + var value = params[att]; + attrs[att] = value; + switch (att) { + case "blur": + o.blur(value); + break; + case "href": + case "title": + case "target": + var pn = node.parentNode; + if (pn.tagName.toLowerCase() != "a") { + var hl = $("a"); + pn.insertBefore(hl, node); + hl.appendChild(node); + pn = hl; + } + if (att == "target") { + pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value); + } else { + pn.setAttributeNS(xlink, att, value); + } + break; + case "cursor": + node.style.cursor = value; + break; + case "transform": + o.transform(value); + break; + case "arrow-start": + addArrow(o, value); + break; + case "arrow-end": + addArrow(o, value, 1); + break; + case "clip-rect": + var rect = Str(value).split(separator); + if (rect.length == 4) { + o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode); + var el = $("clipPath"), + rc = $("rect"); + el.id = R.createUUID(); + $(rc, { + x: rect[0], + y: rect[1], + width: rect[2], + height: rect[3] + }); + el.appendChild(rc); + o.paper.defs.appendChild(el); + $(node, {"clip-path": "url(#" + el.id + ")"}); + o.clip = rc; + } + if (!value) { + var path = node.getAttribute("clip-path"); + if (path) { + var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E)); + clip && clip.parentNode.removeChild(clip); + $(node, {"clip-path": E}); + delete o.clip; + } + } + break; + case "path": + if (o.type == "path") { + $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"}); + o._.dirty = 1; + if (o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + } + break; + case "width": + node.setAttribute(att, value); + o._.dirty = 1; + if (attrs.fx) { + att = "x"; + value = attrs.x; + } else { + break; + } + case "x": + if (attrs.fx) { + value = -attrs.x - (attrs.width || 0); + } + case "rx": + if (att == "rx" && o.type == "rect") { + break; + } + case "cx": + node.setAttribute(att, value); + o.pattern && updatePosition(o); + o._.dirty = 1; + break; + case "height": + node.setAttribute(att, value); + o._.dirty = 1; + if (attrs.fy) { + att = "y"; + value = attrs.y; + } else { + break; + } + case "y": + if (attrs.fy) { + value = -attrs.y - (attrs.height || 0); + } + case "ry": + if (att == "ry" && o.type == "rect") { + break; + } + case "cy": + node.setAttribute(att, value); + o.pattern && updatePosition(o); + o._.dirty = 1; + break; + case "r": + if (o.type == "rect") { + $(node, {rx: value, ry: value}); + } else { + node.setAttribute(att, value); + } + o._.dirty = 1; + break; + case "src": + if (o.type == "image") { + node.setAttributeNS(xlink, "href", value); + } + break; + case "stroke-width": + if (o._.sx != 1 || o._.sy != 1) { + value /= mmax(abs(o._.sx), abs(o._.sy)) || 1; + } + if (o.paper._vbSize) { + value *= o.paper._vbSize; + } + node.setAttribute(att, value); + if (attrs["stroke-dasharray"]) { + addDashes(o, attrs["stroke-dasharray"], params); + } + if (o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + break; + case "stroke-dasharray": + addDashes(o, value, params); + break; + case "fill": + var isURL = Str(value).match(R._ISURL); + if (isURL) { + el = $("pattern"); + var ig = $("image"); + el.id = R.createUUID(); + $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1}); + $(ig, {x: 0, y: 0, "xlink:href": isURL[1]}); + el.appendChild(ig); + + (function (el) { + R._preload(isURL[1], function () { + var w = this.offsetWidth, + h = this.offsetHeight; + $(el, {width: w, height: h}); + $(ig, {width: w, height: h}); + o.paper.safari(); + }); + })(el); + o.paper.defs.appendChild(el); + $(node, {fill: "url(#" + el.id + ")"}); + o.pattern = el; + o.pattern && updatePosition(o); + break; + } + var clr = R.getRGB(value); + if (!clr.error) { + delete params.gradient; + delete attrs.gradient; + !R.is(attrs.opacity, "undefined") && + R.is(params.opacity, "undefined") && + $(node, {opacity: attrs.opacity}); + !R.is(attrs["fill-opacity"], "undefined") && + R.is(params["fill-opacity"], "undefined") && + $(node, {"fill-opacity": attrs["fill-opacity"]}); + } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) { + if ("opacity" in attrs || "fill-opacity" in attrs) { + var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); + if (gradient) { + var stops = gradient.getElementsByTagName("stop"); + $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)}); + } + } + attrs.gradient = value; + attrs.fill = "none"; + break; + } + clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + case "stroke": + clr = R.getRGB(value); + node.setAttribute(att, clr.hex); + att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + if (att == "stroke" && o._.arrows) { + "startString" in o._.arrows && addArrow(o, o._.arrows.startString); + "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1); + } + break; + case "gradient": + (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value); + break; + case "opacity": + if (attrs.gradient && !attrs[has]("stroke-opacity")) { + $(node, {"stroke-opacity": value > 1 ? value / 100 : value}); + } + // fall + case "fill-opacity": + if (attrs.gradient) { + gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E)); + if (gradient) { + stops = gradient.getElementsByTagName("stop"); + $(stops[stops.length - 1], {"stop-opacity": value}); + } + break; + } + default: + att == "font-size" && (value = toInt(value, 10) + "px"); + var cssrule = att.replace(/(\-.)/g, function (w) { + return w.substring(1).toUpperCase(); + }); + node.style[cssrule] = value; + o._.dirty = 1; + node.setAttribute(att, value); + break; + } + } + } + + tuneText(o, params); + node.style.visibility = vis; + }, + leading = 1.2, + tuneText = function (el, params) { + if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) { + return; + } + var a = el.attrs, + node = el.node, + fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10; + + if (params[has]("text")) { + a.text = params.text; + while (node.firstChild) { + node.removeChild(node.firstChild); + } + var texts = Str(params.text).split("\n"), + tspans = [], + tspan; + for (var i = 0, ii = texts.length; i < ii; i++) { + tspan = $("tspan"); + i && $(tspan, {dy: fontSize * leading, x: a.x}); + tspan.appendChild(R._g.doc.createTextNode(texts[i])); + node.appendChild(tspan); + tspans[i] = tspan; + } + } else { + tspans = node.getElementsByTagName("tspan"); + for (i = 0, ii = tspans.length; i < ii; i++) if (i) { + $(tspans[i], {dy: fontSize * leading, x: a.x}); + } else { + $(tspans[0], {dy: 0}); + } + } + $(node, {x: a.x, y: a.y}); + el._.dirty = 1; + var bb = el._getBBox(), + dif = a.y - (bb.y + bb.height / 2); + dif && R.is(dif, "finite") && $(tspans[0], {dy: dif}); + }, + Element = function (node, svg) { + var X = 0, + Y = 0; + + this[0] = this.node = node; + + node.raphael = true; + + this.id = R._oid++; + node.raphaelid = this.id; + this.matrix = R.matrix(); + this.realPath = null; + + this.paper = svg; + this.attrs = this.attrs || {}; + this._ = { + transform: [], + sx: 1, + sy: 1, + deg: 0, + dx: 0, + dy: 0, + dirty: 1 + }; + !svg.bottom && (svg.bottom = this); + + this.prev = svg.top; + svg.top && (svg.top.next = this); + svg.top = this; + + this.next = null; + }, + elproto = R.el; + + Element.prototype = elproto; + elproto.constructor = Element; + + R._engine.path = function (pathString, SVG) { + var el = $("path"); + SVG.canvas && SVG.canvas.appendChild(el); + var p = new Element(el, SVG); + p.type = "path"; + setFillAndStroke(p, { + fill: "none", + stroke: "#000", + path: pathString + }); + return p; + }; + + elproto.rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + deg = Str(deg).split(separator); + if (deg.length - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + cx = bbox.x + bbox.width / 2; + cy = bbox.y + bbox.height / 2; + } + this.transform(this._.transform.concat([["r", deg, cx, cy]])); + return this; + }; + + elproto.scale = function (sx, sy, cx, cy) { + if (this.removed) { + return this; + } + sx = Str(sx).split(separator); + if (sx.length - 1) { + sy = toFloat(sx[1]); + cx = toFloat(sx[2]); + cy = toFloat(sx[3]); + } + sx = toFloat(sx[0]); + (sy == null) && (sy = sx); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + } + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); + return this; + }; + + elproto.translate = function (dx, dy) { + if (this.removed) { + return this; + } + dx = Str(dx).split(separator); + if (dx.length - 1) { + dy = toFloat(dx[1]); + } + dx = toFloat(dx[0]) || 0; + dy = +dy || 0; + this.transform(this._.transform.concat([["t", dx, dy]])); + return this; + }; + + elproto.transform = function (tstr) { + var _ = this._; + if (tstr == null) { + return _.transform; + } + R._extractTransform(this, tstr); + + this.clip && $(this.clip, {transform: this.matrix.invert()}); + this.pattern && updatePosition(this); + this.node && $(this.node, {transform: this.matrix}); + + if (_.sx != 1 || _.sy != 1) { + var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1; + this.attr({"stroke-width": sw}); + } + + return this; + }; + + elproto.hide = function () { + !this.removed && this.paper.safari(this.node.style.display = "none"); + return this; + }; + + elproto.show = function () { + !this.removed && this.paper.safari(this.node.style.display = ""); + return this; + }; + + elproto.remove = function () { + if (this.removed || !this.node.parentNode) { + return; + } + var paper = this.paper; + paper.__set__ && paper.__set__.exclude(this); + eve.unbind("raphael.*.*." + this.id); + if (this.gradient) { + paper.defs.removeChild(this.gradient); + } + R._tear(this, paper); + if (this.node.parentNode.tagName.toLowerCase() == "a") { + this.node.parentNode.parentNode.removeChild(this.node.parentNode); + } else { + this.node.parentNode.removeChild(this.node); + } + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + this.removed = true; + }; + elproto._getBBox = function () { + if (this.node.style.display == "none") { + this.show(); + var hide = true; + } + var bbox = {}; + try { + bbox = this.node.getBBox(); + } catch(e) { + // Firefox 3.0.x plays badly here + } finally { + bbox = bbox || {}; + } + hide && this.hide(); + return bbox; + }; + + elproto.attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var a in this.attrs) if (this.attrs[has](a)) { + res[a] = this.attrs[a]; + } + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + res.transform = this._.transform; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + if (name == "transform") { + return this._.transform; + } + var names = name.split(separator), + out = {}; + for (var i = 0, ii = names.length; i < ii; i++) { + name = names[i]; + if (name in this.attrs) { + out[name] = this.attrs[name]; + } else if (R.is(this.paper.customAttributes[name], "function")) { + out[name] = this.paper.customAttributes[name].def; + } else { + out[name] = R._availableAttrs[name]; + } + } + return ii - 1 ? out : out[names[0]]; + } + if (value == null && R.is(name, "array")) { + out = {}; + for (i = 0, ii = name.length; i < ii; i++) { + out[name[i]] = this.attr(name[i]); + } + return out; + } + if (value != null) { + var params = {}; + params[name] = value; + } else if (name != null && R.is(name, "object")) { + params = name; + } + for (var key in params) { + eve("raphael.attr." + key + "." + this.id, this, params[key]); + } + for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } + } + setFillAndStroke(this, params); + return this; + }; + + elproto.toFront = function () { + if (this.removed) { + return this; + } + if (this.node.parentNode.tagName.toLowerCase() == "a") { + this.node.parentNode.parentNode.appendChild(this.node.parentNode); + } else { + this.node.parentNode.appendChild(this.node); + } + var svg = this.paper; + svg.top != this && R._tofront(this, svg); + return this; + }; + + elproto.toBack = function () { + if (this.removed) { + return this; + } + var parent = this.node.parentNode; + if (parent.tagName.toLowerCase() == "a") { + parent.parentNode.insertBefore(this.node.parentNode, this.node.parentNode.parentNode.firstChild); + } else if (parent.firstChild != this.node) { + parent.insertBefore(this.node, this.node.parentNode.firstChild); + } + R._toback(this, this.paper); + var svg = this.paper; + return this; + }; + + elproto.insertAfter = function (element) { + if (this.removed) { + return this; + } + var node = element.node || element[element.length - 1].node; + if (node.nextSibling) { + node.parentNode.insertBefore(this.node, node.nextSibling); + } else { + node.parentNode.appendChild(this.node); + } + R._insertafter(this, element, this.paper); + return this; + }; + + elproto.insertBefore = function (element) { + if (this.removed) { + return this; + } + var node = element.node || element[0].node; + node.parentNode.insertBefore(this.node, node); + R._insertbefore(this, element, this.paper); + return this; + }; + elproto.blur = function (size) { + // Experimental. No Safari support. Use it on your own risk. + var t = this; + if (+size !== 0) { + var fltr = $("filter"), + blur = $("feGaussianBlur"); + t.attrs.blur = size; + fltr.id = R.createUUID(); + $(blur, {stdDeviation: +size || 1.5}); + fltr.appendChild(blur); + t.paper.defs.appendChild(fltr); + t._blur = fltr; + $(t.node, {filter: "url(#" + fltr.id + ")"}); + } else { + if (t._blur) { + t._blur.parentNode.removeChild(t._blur); + delete t._blur; + delete t.attrs.blur; + } + t.node.removeAttribute("filter"); + } + }; + R._engine.circle = function (svg, x, y, r) { + var el = $("circle"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"}; + res.type = "circle"; + $(el, res.attrs); + return res; + }; + R._engine.rect = function (svg, x, y, w, h, r) { + var el = $("rect"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, r: r || 0, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"}; + res.type = "rect"; + $(el, res.attrs); + return res; + }; + R._engine.ellipse = function (svg, x, y, rx, ry) { + var el = $("ellipse"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"}; + res.type = "ellipse"; + $(el, res.attrs); + return res; + }; + R._engine.image = function (svg, src, x, y, w, h) { + var el = $("image"); + $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"}); + el.setAttributeNS(xlink, "href", src); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = {x: x, y: y, width: w, height: h, src: src}; + res.type = "image"; + return res; + }; + R._engine.text = function (svg, x, y, text) { + var el = $("text"); + svg.canvas && svg.canvas.appendChild(el); + var res = new Element(el, svg); + res.attrs = { + x: x, + y: y, + "text-anchor": "middle", + text: text, + font: R._availableAttrs.font, + stroke: "none", + fill: "#000" + }; + res.type = "text"; + setFillAndStroke(res, res.attrs); + return res; + }; + R._engine.setSize = function (width, height) { + this.width = width || this.width; + this.height = height || this.height; + this.canvas.setAttribute("width", this.width); + this.canvas.setAttribute("height", this.height); + if (this._viewBox) { + this.setViewBox.apply(this, this._viewBox); + } + return this; + }; + R._engine.create = function () { + var con = R._getContainer.apply(0, arguments), + container = con && con.container, + x = con.x, + y = con.y, + width = con.width, + height = con.height; + if (!container) { + throw new Error("SVG container not found."); + } + var cnvs = $("svg"), + css = "overflow:hidden;", + isFloating; + x = x || 0; + y = y || 0; + width = width || 512; + height = height || 342; + $(cnvs, { + height: height, + version: 1.1, + width: width, + xmlns: "http://www.w3.org/2000/svg" + }); + if (container == 1) { + cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; + R._g.doc.body.appendChild(cnvs); + isFloating = 1; + } else { + cnvs.style.cssText = css + "position:relative"; + if (container.firstChild) { + container.insertBefore(cnvs, container.firstChild); + } else { + container.appendChild(cnvs); + } + } + container = new R._Paper; + container.width = width; + container.height = height; + container.canvas = cnvs; + container.clear(); + container._left = container._top = 0; + isFloating && (container.renderfix = function () {}); + container.renderfix(); + return container; + }; + R._engine.setViewBox = function (x, y, w, h, fit) { + eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); + var size = mmax(w / this.width, h / this.height), + top = this.top, + aspectRatio = fit ? "meet" : "xMinYMin", + vb, + sw; + if (x == null) { + if (this._vbSize) { + size = 1; + } + delete this._vbSize; + vb = "0 0 " + this.width + S + this.height; + } else { + this._vbSize = size; + vb = x + S + y + S + w + S + h; + } + $(this.canvas, { + viewBox: vb, + preserveAspectRatio: aspectRatio + }); + while (size && top) { + sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1; + top.attr({"stroke-width": sw}); + top._.dirty = 1; + top._.dirtyT = 1; + top = top.prev; + } + this._viewBox = [x, y, w, h, !!fit]; + return this; + }; + + R.prototype.renderfix = function () { + var cnvs = this.canvas, + s = cnvs.style, + pos; + try { + pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(); + } catch (e) { + pos = cnvs.createSVGMatrix(); + } + var left = -pos.e % 1, + top = -pos.f % 1; + if (left || top) { + if (left) { + this._left = (this._left + left) % 1; + s.left = this._left + "px"; + } + if (top) { + this._top = (this._top + top) % 1; + s.top = this._top + "px"; + } + } + }; + + R.prototype.clear = function () { + R.eve("raphael.clear", this); + var c = this.canvas; + while (c.firstChild) { + c.removeChild(c.firstChild); + } + this.bottom = this.top = null; + (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version)); + c.appendChild(this.desc); + c.appendChild(this.defs = $("defs")); + }; + + R.prototype.remove = function () { + eve("raphael.remove", this); + this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + }; + var setproto = R.st; + for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname].apply(el, arg); + }); + }; + })(method); + } +}(window.Raphael); + +// ┌─────────────────────────────────────────────────────────────────────┐ \\ +// │ Raphaël - JavaScript Vector Library │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ VML Module │ \\ +// ├─────────────────────────────────────────────────────────────────────┤ \\ +// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\ +// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ +// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ +// └─────────────────────────────────────────────────────────────────────┘ \\ +window.Raphael.vml && function (R) { + var has = "hasOwnProperty", + Str = String, + toFloat = parseFloat, + math = Math, + round = math.round, + mmax = math.max, + mmin = math.min, + abs = math.abs, + fillString = "fill", + separator = /[, ]+/, + eve = R.eve, + ms = " progid:DXImageTransform.Microsoft", + S = " ", + E = "", + map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"}, + bites = /([clmz]),?([^clmz]*)/gi, + blurregexp = / progid:\S+Blur\([^\)]+\)/g, + val = /-?[^,\s-]+/g, + cssDot = "position:absolute;left:0;top:0;width:1px;height:1px", + zoom = 21600, + pathTypes = {path: 1, rect: 1, image: 1}, + ovalTypes = {circle: 1, ellipse: 1}, + path2vml = function (path) { + var total = /[ahqstv]/ig, + command = R._pathToAbsolute; + Str(path).match(total) && (command = R._path2curve); + total = /[clmz]/g; + if (command == R._pathToAbsolute && !Str(path).match(total)) { + var res = Str(path).replace(bites, function (all, command, args) { + var vals = [], + isMove = command.toLowerCase() == "m", + res = map[command]; + args.replace(val, function (value) { + if (isMove && vals.length == 2) { + res += vals + map[command == "m" ? "l" : "L"]; + vals = []; + } + vals.push(round(value * zoom)); + }); + return res + vals; + }); + return res; + } + var pa = command(path), p, r; + res = []; + for (var i = 0, ii = pa.length; i < ii; i++) { + p = pa[i]; + r = pa[i][0].toLowerCase(); + r == "z" && (r = "x"); + for (var j = 1, jj = p.length; j < jj; j++) { + r += round(p[j] * zoom) + (j != jj - 1 ? "," : E); + } + res.push(r); + } + return res.join(S); + }, + compensation = function (deg, dx, dy) { + var m = R.matrix(); + m.rotate(-deg, .5, .5); + return { + dx: m.x(dx, dy), + dy: m.y(dx, dy) + }; + }, + setCoords = function (p, sx, sy, dx, dy, deg) { + var _ = p._, + m = p.matrix, + fillpos = _.fillpos, + o = p.node, + s = o.style, + y = 1, + flip = "", + dxdy, + kx = zoom / sx, + ky = zoom / sy; + s.visibility = "hidden"; + if (!sx || !sy) { + return; + } + o.coordsize = abs(kx) + S + abs(ky); + s.rotation = deg * (sx * sy < 0 ? -1 : 1); + if (deg) { + var c = compensation(deg, dx, dy); + dx = c.dx; + dy = c.dy; + } + sx < 0 && (flip += "x"); + sy < 0 && (flip += " y") && (y = -1); + s.flip = flip; + o.coordorigin = (dx * -kx) + S + (dy * -ky); + if (fillpos || _.fillsize) { + var fill = o.getElementsByTagName(fillString); + fill = fill && fill[0]; + o.removeChild(fill); + if (fillpos) { + c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1])); + fill.position = c.dx * y + S + c.dy * y; + } + if (_.fillsize) { + fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy); + } + o.appendChild(fill); + } + s.visibility = "visible"; + }; + R.toString = function () { + return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version; + }; + var addArrow = function (o, value, isEnd) { + var values = Str(value).toLowerCase().split("-"), + se = isEnd ? "end" : "start", + i = values.length, + type = "classic", + w = "medium", + h = "medium"; + while (i--) { + switch (values[i]) { + case "block": + case "classic": + case "oval": + case "diamond": + case "open": + case "none": + type = values[i]; + break; + case "wide": + case "narrow": h = values[i]; break; + case "long": + case "short": w = values[i]; break; + } + } + var stroke = o.node.getElementsByTagName("stroke")[0]; + stroke[se + "arrow"] = type; + stroke[se + "arrowlength"] = w; + stroke[se + "arrowwidth"] = h; + }, + setFillAndStroke = function (o, params) { + // o.paper.canvas.style.display = "none"; + o.attrs = o.attrs || {}; + var node = o.node, + a = o.attrs, + s = node.style, + xy, + newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r), + isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry), + res = o; + + + for (var par in params) if (params[has](par)) { + a[par] = params[par]; + } + if (newpath) { + a.path = R._getPath[o.type](o); + o._.dirty = 1; + } + params.href && (node.href = params.href); + params.title && (node.title = params.title); + params.target && (node.target = params.target); + params.cursor && (s.cursor = params.cursor); + "blur" in params && o.blur(params.blur); + if (params.path && o.type == "path" || newpath) { + node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path); + if (o.type == "image") { + o._.fillpos = [a.x, a.y]; + o._.fillsize = [a.width, a.height]; + setCoords(o, 1, 1, 0, 0, 0); + } + } + "transform" in params && o.transform(params.transform); + if (isOval) { + var cx = +a.cx, + cy = +a.cy, + rx = +a.rx || +a.r || 0, + ry = +a.ry || +a.r || 0; + node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom)); + } + if ("clip-rect" in params) { + var rect = Str(params["clip-rect"]).split(separator); + if (rect.length == 4) { + rect[2] = +rect[2] + (+rect[0]); + rect[3] = +rect[3] + (+rect[1]); + var div = node.clipRect || R._g.doc.createElement("div"), + dstyle = div.style; + dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); + if (!node.clipRect) { + dstyle.position = "absolute"; + dstyle.top = 0; + dstyle.left = 0; + dstyle.width = o.paper.width + "px"; + dstyle.height = o.paper.height + "px"; + node.parentNode.insertBefore(div, node); + div.appendChild(node); + node.clipRect = div; + } + } + if (!params["clip-rect"]) { + node.clipRect && (node.clipRect.style.clip = "auto"); + } + } + if (o.textpath) { + var textpathStyle = o.textpath.style; + params.font && (textpathStyle.font = params.font); + params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); + params["font-size"] && (textpathStyle.fontSize = params["font-size"]); + params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); + params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); + } + if ("arrow-start" in params) { + addArrow(res, params["arrow-start"]); + } + if ("arrow-end" in params) { + addArrow(res, params["arrow-end"], 1); + } + if (params.opacity != null || + params["stroke-width"] != null || + params.fill != null || + params.src != null || + params.stroke != null || + params["stroke-width"] != null || + params["stroke-opacity"] != null || + params["fill-opacity"] != null || + params["stroke-dasharray"] != null || + params["stroke-miterlimit"] != null || + params["stroke-linejoin"] != null || + params["stroke-linecap"] != null) { + var fill = node.getElementsByTagName(fillString), + newfill = false; + fill = fill && fill[0]; + !fill && (newfill = fill = createNode(fillString)); + if (o.type == "image" && params.src) { + fill.src = params.src; + } + params.fill && (fill.on = true); + if (fill.on == null || params.fill == "none" || params.fill === null) { + fill.on = false; + } + if (fill.on && params.fill) { + var isURL = Str(params.fill).match(R._ISURL); + if (isURL) { + fill.parentNode == node && node.removeChild(fill); + fill.rotate = true; + fill.src = isURL[1]; + fill.type = "tile"; + var bbox = o.getBBox(1); + fill.position = bbox.x + S + bbox.y; + o._.fillpos = [bbox.x, bbox.y]; + + R._preload(isURL[1], function () { + o._.fillsize = [this.offsetWidth, this.offsetHeight]; + }); + } else { + fill.color = R.getRGB(params.fill).hex; + fill.src = E; + fill.type = "solid"; + if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) { + a.fill = "none"; + a.gradient = params.fill; + fill.rotate = false; + } + } + } + if ("fill-opacity" in params || "opacity" in params) { + var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1); + opacity = mmin(mmax(opacity, 0), 1); + fill.opacity = opacity; + if (fill.src) { + fill.color = "none"; + } + } + node.appendChild(fill); + var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]), + newstroke = false; + !stroke && (newstroke = stroke = createNode("stroke")); + if ((params.stroke && params.stroke != "none") || + params["stroke-width"] || + params["stroke-opacity"] != null || + params["stroke-dasharray"] || + params["stroke-miterlimit"] || + params["stroke-linejoin"] || + params["stroke-linecap"]) { + stroke.on = true; + } + (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false); + var strokeColor = R.getRGB(params.stroke); + stroke.on && params.stroke && (stroke.color = strokeColor.hex); + opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1); + var width = (toFloat(params["stroke-width"]) || 1) * .75; + opacity = mmin(mmax(opacity, 0), 1); + params["stroke-width"] == null && (width = a["stroke-width"]); + params["stroke-width"] && (stroke.weight = width); + width && width < 1 && (opacity *= width) && (stroke.weight = 1); + stroke.opacity = opacity; + + params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter"); + stroke.miterlimit = params["stroke-miterlimit"] || 8; + params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round"); + if (params["stroke-dasharray"]) { + var dasharray = { + "-": "shortdash", + ".": "shortdot", + "-.": "shortdashdot", + "-..": "shortdashdotdot", + ". ": "dot", + "- ": "dash", + "--": "longdash", + "- .": "dashdot", + "--.": "longdashdot", + "--..": "longdashdotdot" + }; + stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E; + } + newstroke && node.appendChild(stroke); + } + if (res.type == "text") { + res.paper.canvas.style.display = E; + var span = res.paper.span, + m = 100, + fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/); + s = span.style; + a.font && (s.font = a.font); + a["font-family"] && (s.fontFamily = a["font-family"]); + a["font-weight"] && (s.fontWeight = a["font-weight"]); + a["font-style"] && (s.fontStyle = a["font-style"]); + fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10; + s.fontSize = fontSize * m + "px"; + res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\n/g, "<br>")); + var brect = span.getBoundingClientRect(); + res.W = a.w = (brect.right - brect.left) / m; + res.H = a.h = (brect.bottom - brect.top) / m; + // res.paper.canvas.style.display = "none"; + res.X = a.x; + res.Y = a.y + res.H / 2; + + ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); + var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; + for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { + res._.dirty = 1; + break; + } + + // text-anchor emulation + switch (a["text-anchor"]) { + case "start": + res.textpath.style["v-text-align"] = "left"; + res.bbx = res.W / 2; + break; + case "end": + res.textpath.style["v-text-align"] = "right"; + res.bbx = -res.W / 2; + break; + default: + res.textpath.style["v-text-align"] = "center"; + res.bbx = 0; + break; + } + res.textpath.style["v-text-kern"] = true; + } + // res.paper.canvas.style.display = E; + }, + addGradientFill = function (o, gradient, fill) { + o.attrs = o.attrs || {}; + var attrs = o.attrs, + pow = Math.pow, + opacity, + oindex, + type = "linear", + fxfy = ".5 .5"; + o.attrs.gradient = gradient; + gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) { + type = "radial"; + if (fx && fy) { + fx = toFloat(fx); + fy = toFloat(fy); + pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5); + fxfy = fx + S + fy; + } + return E; + }); + gradient = gradient.split(/\s*\-\s*/); + if (type == "linear") { + var angle = gradient.shift(); + angle = -toFloat(angle); + if (isNaN(angle)) { + return null; + } + } + var dots = R._parseDots(gradient); + if (!dots) { + return null; + } + o = o.shape || o.node; + if (dots.length) { + o.removeChild(fill); + fill.on = true; + fill.method = "none"; + fill.color = dots[0].color; + fill.color2 = dots[dots.length - 1].color; + var clrs = []; + for (var i = 0, ii = dots.length; i < ii; i++) { + dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color); + } + fill.colors = clrs.length ? clrs.join() : "0% " + fill.color; + if (type == "radial") { + fill.type = "gradientTitle"; + fill.focus = "100%"; + fill.focussize = "0 0"; + fill.focusposition = fxfy; + fill.angle = 0; + } else { + // fill.rotate= true; + fill.type = "gradient"; + fill.angle = (270 - angle) % 360; + } + o.appendChild(fill); + } + return 1; + }, + Element = function (node, vml) { + this[0] = this.node = node; + node.raphael = true; + this.id = R._oid++; + node.raphaelid = this.id; + this.X = 0; + this.Y = 0; + this.attrs = {}; + this.paper = vml; + this.matrix = R.matrix(); + this._ = { + transform: [], + sx: 1, + sy: 1, + dx: 0, + dy: 0, + deg: 0, + dirty: 1, + dirtyT: 1 + }; + !vml.bottom && (vml.bottom = this); + this.prev = vml.top; + vml.top && (vml.top.next = this); + vml.top = this; + this.next = null; + }; + var elproto = R.el; + + Element.prototype = elproto; + elproto.constructor = Element; + elproto.transform = function (tstr) { + if (tstr == null) { + return this._.transform; + } + var vbs = this.paper._viewBoxShift, + vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E, + oldt; + if (vbs) { + oldt = tstr = Str(tstr).replace(/\.{3}|\u2026/g, this._.transform || E); + } + R._extractTransform(this, vbt + tstr); + var matrix = this.matrix.clone(), + skew = this.skew, + o = this.node, + split, + isGrad = ~Str(this.attrs.fill).indexOf("-"), + isPatt = !Str(this.attrs.fill).indexOf("url("); + matrix.translate(-.5, -.5); + if (isPatt || isGrad || this.type == "image") { + skew.matrix = "1 0 0 1"; + skew.offset = "0 0"; + split = matrix.split(); + if ((isGrad && split.noRotation) || !split.isSimple) { + o.style.filter = matrix.toFilter(); + var bb = this.getBBox(), + bbt = this.getBBox(1), + dx = bb.x - bbt.x, + dy = bb.y - bbt.y; + o.coordorigin = (dx * -zoom) + S + (dy * -zoom); + setCoords(this, 1, 1, dx, dy, 0); + } else { + o.style.filter = E; + setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate); + } + } else { + o.style.filter = E; + skew.matrix = Str(matrix); + skew.offset = matrix.offset(); + } + oldt && (this._.transform = oldt); + return this; + }; + elproto.rotate = function (deg, cx, cy) { + if (this.removed) { + return this; + } + if (deg == null) { + return; + } + deg = Str(deg).split(separator); + if (deg.length - 1) { + cx = toFloat(deg[1]); + cy = toFloat(deg[2]); + } + deg = toFloat(deg[0]); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + cx = bbox.x + bbox.width / 2; + cy = bbox.y + bbox.height / 2; + } + this._.dirtyT = 1; + this.transform(this._.transform.concat([["r", deg, cx, cy]])); + return this; + }; + elproto.translate = function (dx, dy) { + if (this.removed) { + return this; + } + dx = Str(dx).split(separator); + if (dx.length - 1) { + dy = toFloat(dx[1]); + } + dx = toFloat(dx[0]) || 0; + dy = +dy || 0; + if (this._.bbox) { + this._.bbox.x += dx; + this._.bbox.y += dy; + } + this.transform(this._.transform.concat([["t", dx, dy]])); + return this; + }; + elproto.scale = function (sx, sy, cx, cy) { + if (this.removed) { + return this; + } + sx = Str(sx).split(separator); + if (sx.length - 1) { + sy = toFloat(sx[1]); + cx = toFloat(sx[2]); + cy = toFloat(sx[3]); + isNaN(cx) && (cx = null); + isNaN(cy) && (cy = null); + } + sx = toFloat(sx[0]); + (sy == null) && (sy = sx); + (cy == null) && (cx = cy); + if (cx == null || cy == null) { + var bbox = this.getBBox(1); + } + cx = cx == null ? bbox.x + bbox.width / 2 : cx; + cy = cy == null ? bbox.y + bbox.height / 2 : cy; + + this.transform(this._.transform.concat([["s", sx, sy, cx, cy]])); + this._.dirtyT = 1; + return this; + }; + elproto.hide = function () { + !this.removed && (this.node.style.display = "none"); + return this; + }; + elproto.show = function () { + !this.removed && (this.node.style.display = E); + return this; + }; + elproto._getBBox = function () { + if (this.removed) { + return {}; + } + return { + x: this.X + (this.bbx || 0) - this.W / 2, + y: this.Y - this.H, + width: this.W, + height: this.H + }; + }; + elproto.remove = function () { + if (this.removed || !this.node.parentNode) { + return; + } + this.paper.__set__ && this.paper.__set__.exclude(this); + R.eve.unbind("raphael.*.*." + this.id); + R._tear(this, this.paper); + this.node.parentNode.removeChild(this.node); + this.shape && this.shape.parentNode.removeChild(this.shape); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + this.removed = true; + }; + elproto.attr = function (name, value) { + if (this.removed) { + return this; + } + if (name == null) { + var res = {}; + for (var a in this.attrs) if (this.attrs[has](a)) { + res[a] = this.attrs[a]; + } + res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; + res.transform = this._.transform; + return res; + } + if (value == null && R.is(name, "string")) { + if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) { + return this.attrs.gradient; + } + var names = name.split(separator), + out = {}; + for (var i = 0, ii = names.length; i < ii; i++) { + name = names[i]; + if (name in this.attrs) { + out[name] = this.attrs[name]; + } else if (R.is(this.paper.customAttributes[name], "function")) { + out[name] = this.paper.customAttributes[name].def; + } else { + out[name] = R._availableAttrs[name]; + } + } + return ii - 1 ? out : out[names[0]]; + } + if (this.attrs && value == null && R.is(name, "array")) { + out = {}; + for (i = 0, ii = name.length; i < ii; i++) { + out[name[i]] = this.attr(name[i]); + } + return out; + } + var params; + if (value != null) { + params = {}; + params[name] = value; + } + value == null && R.is(name, "object") && (params = name); + for (var key in params) { + eve("raphael.attr." + key + "." + this.id, this, params[key]); + } + if (params) { + for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } + } + // this.paper.canvas.style.display = "none"; + if (params.text && this.type == "text") { + this.textpath.string = params.text; + } + setFillAndStroke(this, params); + // this.paper.canvas.style.display = E; + } + return this; + }; + elproto.toFront = function () { + !this.removed && this.node.parentNode.appendChild(this.node); + this.paper && this.paper.top != this && R._tofront(this, this.paper); + return this; + }; + elproto.toBack = function () { + if (this.removed) { + return this; + } + if (this.node.parentNode.firstChild != this.node) { + this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); + R._toback(this, this.paper); + } + return this; + }; + elproto.insertAfter = function (element) { + if (this.removed) { + return this; + } + if (element.constructor == R.st.constructor) { + element = element[element.length - 1]; + } + if (element.node.nextSibling) { + element.node.parentNode.insertBefore(this.node, element.node.nextSibling); + } else { + element.node.parentNode.appendChild(this.node); + } + R._insertafter(this, element, this.paper); + return this; + }; + elproto.insertBefore = function (element) { + if (this.removed) { + return this; + } + if (element.constructor == R.st.constructor) { + element = element[0]; + } + element.node.parentNode.insertBefore(this.node, element.node); + R._insertbefore(this, element, this.paper); + return this; + }; + elproto.blur = function (size) { + var s = this.node.runtimeStyle, + f = s.filter; + f = f.replace(blurregexp, E); + if (+size !== 0) { + this.attrs.blur = size; + s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")"; + s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5)); + } else { + s.filter = f; + s.margin = 0; + delete this.attrs.blur; + } + }; + + R._engine.path = function (pathString, vml) { + var el = createNode("shape"); + el.style.cssText = cssDot; + el.coordsize = zoom + S + zoom; + el.coordorigin = vml.coordorigin; + var p = new Element(el, vml), + attr = {fill: "none", stroke: "#000"}; + pathString && (attr.path = pathString); + p.type = "path"; + p.path = []; + p.Path = E; + setFillAndStroke(p, attr); + vml.canvas.appendChild(el); + var skew = createNode("skew"); + skew.on = true; + el.appendChild(skew); + p.skew = skew; + p.transform(E); + return p; + }; + R._engine.rect = function (vml, x, y, w, h, r) { + var path = R._rectPath(x, y, w, h, r), + res = vml.path(path), + a = res.attrs; + res.X = a.x = x; + res.Y = a.y = y; + res.W = a.width = w; + res.H = a.height = h; + a.r = r; + a.path = path; + res.type = "rect"; + return res; + }; + R._engine.ellipse = function (vml, x, y, rx, ry) { + var res = vml.path(), + a = res.attrs; + res.X = x - rx; + res.Y = y - ry; + res.W = rx * 2; + res.H = ry * 2; + res.type = "ellipse"; + setFillAndStroke(res, { + cx: x, + cy: y, + rx: rx, + ry: ry + }); + return res; + }; + R._engine.circle = function (vml, x, y, r) { + var res = vml.path(), + a = res.attrs; + res.X = x - r; + res.Y = y - r; + res.W = res.H = r * 2; + res.type = "circle"; + setFillAndStroke(res, { + cx: x, + cy: y, + r: r + }); + return res; + }; + R._engine.image = function (vml, src, x, y, w, h) { + var path = R._rectPath(x, y, w, h), + res = vml.path(path).attr({stroke: "none"}), + a = res.attrs, + node = res.node, + fill = node.getElementsByTagName(fillString)[0]; + a.src = src; + res.X = a.x = x; + res.Y = a.y = y; + res.W = a.width = w; + res.H = a.height = h; + a.path = path; + res.type = "image"; + fill.parentNode == node && node.removeChild(fill); + fill.rotate = true; + fill.src = src; + fill.type = "tile"; + res._.fillpos = [x, y]; + res._.fillsize = [w, h]; + node.appendChild(fill); + setCoords(res, 1, 1, 0, 0, 0); + return res; + }; + R._engine.text = function (vml, x, y, text) { + var el = createNode("shape"), + path = createNode("path"), + o = createNode("textpath"); + x = x || 0; + y = y || 0; + text = text || ""; + path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1); + path.textpathok = true; + o.string = Str(text); + o.on = true; + el.style.cssText = cssDot; + el.coordsize = zoom + S + zoom; + el.coordorigin = "0 0"; + var p = new Element(el, vml), + attr = { + fill: "#000", + stroke: "none", + font: R._availableAttrs.font, + text: text + }; + p.shape = el; + p.path = path; + p.textpath = o; + p.type = "text"; + p.attrs.text = Str(text); + p.attrs.x = x; + p.attrs.y = y; + p.attrs.w = 1; + p.attrs.h = 1; + setFillAndStroke(p, attr); + el.appendChild(o); + el.appendChild(path); + vml.canvas.appendChild(el); + var skew = createNode("skew"); + skew.on = true; + el.appendChild(skew); + p.skew = skew; + p.transform(E); + return p; + }; + R._engine.setSize = function (width, height) { + var cs = this.canvas.style; + this.width = width; + this.height = height; + width == +width && (width += "px"); + height == +height && (height += "px"); + cs.width = width; + cs.height = height; + cs.clip = "rect(0 " + width + " " + height + " 0)"; + if (this._viewBox) { + R._engine.setViewBox.apply(this, this._viewBox); + } + return this; + }; + R._engine.setViewBox = function (x, y, w, h, fit) { + R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]); + var width = this.width, + height = this.height, + size = 1 / mmax(w / width, h / height), + H, W; + if (fit) { + H = height / h; + W = width / w; + if (w * H < width) { + x -= (width - w * H) / 2 / H; + } + if (h * W < height) { + y -= (height - h * W) / 2 / W; + } + } + this._viewBox = [x, y, w, h, !!fit]; + this._viewBoxShift = { + dx: -x, + dy: -y, + scale: size + }; + this.forEach(function (el) { + el.transform("..."); + }); + return this; + }; + var createNode; + R._engine.initWin = function (win) { + var doc = win.document; + doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); + try { + !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); + createNode = function (tagName) { + return doc.createElement('<rvml:' + tagName + ' class="rvml">'); + }; + } catch (e) { + createNode = function (tagName) { + return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); + }; + } + }; + R._engine.initWin(R._g.win); + R._engine.create = function () { + var con = R._getContainer.apply(0, arguments), + container = con.container, + height = con.height, + s, + width = con.width, + x = con.x, + y = con.y; + if (!container) { + throw new Error("VML container not found."); + } + var res = new R._Paper, + c = res.canvas = R._g.doc.createElement("div"), + cs = c.style; + x = x || 0; + y = y || 0; + width = width || 512; + height = height || 342; + res.width = width; + res.height = height; + width == +width && (width += "px"); + height == +height && (height += "px"); + res.coordsize = zoom * 1e3 + S + zoom * 1e3; + res.coordorigin = "0 0"; + res.span = R._g.doc.createElement("span"); + res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;"; + c.appendChild(res.span); + cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height); + if (container == 1) { + R._g.doc.body.appendChild(c); + cs.left = x + "px"; + cs.top = y + "px"; + cs.position = "absolute"; + } else { + if (container.firstChild) { + container.insertBefore(c, container.firstChild); + } else { + container.appendChild(c); + } + } + res.renderfix = function () {}; + return res; + }; + R.prototype.clear = function () { + R.eve("raphael.clear", this); + this.canvas.innerHTML = E; + this.span = R._g.doc.createElement("span"); + this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; + this.canvas.appendChild(this.span); + this.bottom = this.top = null; + }; + R.prototype.remove = function () { + R.eve("raphael.remove", this); + this.canvas.parentNode.removeChild(this.canvas); + for (var i in this) { + this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; + } + return true; + }; + + var setproto = R.st; + for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { + setproto[method] = (function (methodname) { + return function () { + var arg = arguments; + return this.forEach(function (el) { + el[methodname].apply(el, arg); + }); + }; + })(method); + } +}(window.Raphael); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/js/textlayout.js b/src/main/resources/static/activiti-editor/diagram-viewer/js/textlayout.js new file mode 100644 index 0000000..219ceb2 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/js/textlayout.js @@ -0,0 +1,441 @@ + window.onload = function () { + var paper = Raphael("holder"); + + //var curve = paper.ellipse(100, 100, 1, 1).attr({"stroke-width": 0, fill: Color.red});//FHqq-3-1-3-5-9-6-7-9-0 + + var text = "Betty Botter bought some butter but, she said, the butter's bitter. If I put it in my batter, it will make my batter bitter. But a bit of better butter will make my batter better. So, she bought a bit of butter, better than her bitter butter, and she put it in her batter, and the batter was not bitter. It was better Betty Botter bought a bit better butter."; + var font = {font: "11px Arial", "font-style":"italic", opacity: 1, "fill": LABEL_COLOR, stroke: LABEL_COLOR, "stroke-width":.3}; + var font = {font: "11px Arial", opacity: 1, "fill": LABEL_COLOR}; + var boxWidth = 100 + + var AttributedStringIterator = function(text){ + //this.text = this.rtrim(this.ltrim(text)); + text = text.replace(/(\s)+/, " "); + this.text = this.rtrim(text); + /* + if (beginIndex < 0 || beginIndex > endIndex || endIndex > length()) { + throw new IllegalArgumentException("Invalid substring range"); + } + */ + this.beginIndex = 0; + this.endIndex = this.text.length; + this.currentIndex = this.beginIndex; + + //console.group("[AttributedStringIterator]"); + var i = 0; + var string = this.text; + var fullPos = 0; + + //console.log("string: \"" + string + "\", length: " + string.length); + this.startWordOffsets = []; + this.startWordOffsets.push(fullPos); + + // TODO: remove i 1000 + while (i<1000) { + var pos = string.search(/[ \t\n\f-\.\,]/); + if (pos == -1) + break; + + // whitespace start + fullPos += pos; + string = string.substr(pos); + ////console.log("fullPos: " + fullPos + ", pos: " + pos + ", string: ", string); + + // remove whitespaces + var pos = string.search(/[^ \t\n\f-\.\,]/); + if (pos == -1) + break; + + // whitespace end + fullPos += pos; + string = string.substr(pos); + + ////console.log("fullPos: " + fullPos); + this.startWordOffsets.push(fullPos); + + i++; + } + //console.log("startWordOffsets: ", this.startWordOffsets); + //console.groupEnd(); + }; + AttributedStringIterator.prototype = { + getEndIndex: function(pos){ + if (typeof(pos) == "undefined") + return this.endIndex; + + var string = this.text.substr(pos, this.endIndex - pos); + + var posEndOfLine = string.search(/[\n]/); + if (posEndOfLine == -1) + return this.endIndex; + else + return pos + posEndOfLine; + }, + getBeginIndex: function(){ + return this.beginIndex; + }, + isWhitespace: function(pos){ + var str = this.text[pos]; + var whitespaceChars = " \t\n\f"; + + return (whitespaceChars.indexOf(str) != -1); + }, + isNewLine: function(pos){ + var str = this.text[pos]; + var whitespaceChars = "\n"; + + return (whitespaceChars.indexOf(str) != -1); + }, + preceding: function(pos){ + //console.group("[AttributedStringIterator.preceding]"); + for(var i in this.startWordOffsets) { + var startWordOffset = this.startWordOffsets[i]; + if (pos < startWordOffset && i>0) { + //console.log("startWordOffset: " + this.startWordOffsets[i-1]); + //console.groupEnd(); + return this.startWordOffsets[i-1]; + } + } + //console.log("pos: " + pos); + //console.groupEnd(); + return this.startWordOffsets[i]; + }, + following: function(pos){ + //console.group("[AttributedStringIterator.following]"); + for(var i in this.startWordOffsets) { + var startWordOffset = this.startWordOffsets[i]; + if (pos < startWordOffset && i>0) { + //console.log("startWordOffset: " + this.startWordOffsets[i]); + //console.groupEnd(); + return this.startWordOffsets[i]; + } + } + //console.log("pos: " + pos); + //console.groupEnd(); + return this.startWordOffsets[i]; + }, + ltrim: function(str){ + var patt2=/^\s+/g; + return str.replace(patt2, ""); + }, + rtrim: function(str){ + var patt2=/\s+$/g; + return str.replace(patt2, ""); + }, + getLayout: function(start, limit){ + return this.text.substr(start, limit - start); + }, + getCharAtPos: function(pos) { + return this.text[pos]; + } + }; + + /* + var TextMeasurer = function(paper, text, fontAttrs){ + this.text = text; + this.paper = paper; + this.fontAttrs = fontAttrs; + + this.fStart = this.text.getBeginIndex(); + + }; + TextMeasurer.prototype = { + getLineBreakIndex: function(start, maxAdvance){ + var localStart = start - this.fStart; + }, + getLayout: function(){ + } + } + */ + + + var LineBreakMeasurer = function(paper, text, fontAttrs){ + this.paper = paper; + this.text = new AttributedStringIterator(text); + this.fontAttrs = fontAttrs; + + if (this.text.getEndIndex() - this.text.getBeginIndex() < 1) { + throw {message: "Text must contain at least one character.", code: "IllegalArgumentException"}; + } + + //this.measurer = new TextMeasurer(paper, this.text, this.fontAttrs); + this.limit = this.text.getEndIndex(); + this.pos = this.start = this.text.getBeginIndex(); + + this.rafaelTextObject = this.paper.text(100, 100, this.text.text).attr(fontAttrs).attr("text-anchor", "start"); + this.svgTextObject = this.rafaelTextObject[0]; + }; + LineBreakMeasurer.prototype = { + nextOffset: function(wrappingWidth, offsetLimit, requireNextWord) { + //console.group("[nextOffset]"); + var nextOffset = this.pos; + if (this.pos < this.limit) { + if (offsetLimit <= this.pos) { + throw {message: "offsetLimit must be after current position", code: "IllegalArgumentException"}; + } + + var charAtMaxAdvance = this.getLineBreakIndex(this.pos, wrappingWidth); + //charAtMaxAdvance --; + //console.log("charAtMaxAdvance:", charAtMaxAdvance, ", [" + this.text.getCharAtPos(charAtMaxAdvance) + "]"); + + if (charAtMaxAdvance == this.limit) { + nextOffset = this.limit; + //console.log("charAtMaxAdvance == this.limit"); + } else if (this.text.isNewLine(charAtMaxAdvance)) { + console.log("isNewLine"); + nextOffset = charAtMaxAdvance+1; + } else if (this.text.isWhitespace(charAtMaxAdvance)) { + // TODO: find next noSpaceChar + //return nextOffset; + nextOffset = this.text.following(charAtMaxAdvance); + } else { + // Break is in a word; back up to previous break. + /* + var testPos = charAtMaxAdvance + 1; + if (testPos == this.limit) { + console.error("hbz..."); + } else { + nextOffset = this.text.preceding(charAtMaxAdvance); + } + */ + nextOffset = this.text.preceding(charAtMaxAdvance); + + if (nextOffset <= this.pos) { + nextOffset = Math.max(this.pos+1, charAtMaxAdvance); + } + } + } + if (nextOffset > offsetLimit) { + nextOffset = offsetLimit; + } + //console.log("nextOffset: " + nextOffset); + //console.groupEnd(); + return nextOffset; + }, + nextLayout: function(wrappingWidth) { + //console.groupCollapsed("[nextLayout]"); + if (this.pos < this.limit) { + var requireNextWord = false; + var layoutLimit = this.nextOffset(wrappingWidth, this.limit, requireNextWord); + //console.log("layoutLimit:", layoutLimit); + if (layoutLimit == this.pos) { + //console.groupEnd(); + return null; + } + var result = this.text.getLayout(this.pos, layoutLimit); + //console.log("layout: \"" + result + "\""); + + // remove end of line + + //var posEndOfLine = this.text.getEndIndex(this.pos); + //if (posEndOfLine < result.length) + // result = result.substr(0, posEndOfLine); + + this.pos = layoutLimit; + + //console.groupEnd(); + return result; + } else { + //console.groupEnd(); + return null; + } + }, + getLineBreakIndex: function(pos, wrappingWidth) { + //console.group("[getLineBreakIndex]"); + //console.log("pos:"+pos + ", text: \""+ this.text.text.replace(/\n/g, "_").substr(pos, 1) + "\""); + + var bb = this.rafaelTextObject.getBBox(); + + var charNum = -1; + try { + var svgPoint = this.svgTextObject.getStartPositionOfChar(pos); + //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.blue}); + svgPoint.x = svgPoint.x + wrappingWidth; + //svgPoint.y = bb.y; + //console.log("svgPoint:", svgPoint); + + //var dot = this.paper.ellipse(svgPoint.x, svgPoint.y, 1, 1).attr({"stroke-width": 0, fill: Color.red}); + + charNum = this.svgTextObject.getCharNumAtPosition(svgPoint); + } catch (e){ + console.warn("getStartPositionOfChar error, pos:" + pos); + /* + var testPos = pos + 1; + if (testPos < this.limit) { + return testPos + } + */ + } + //console.log("charNum:", charNum); + if (charNum == -1) { + //console.groupEnd(); + return this.text.getEndIndex(pos); + } else { + // When case there is new line between pos and charnum then use this new line + var newLineIndex = this.text.getEndIndex(pos); + if (newLineIndex < charNum ) { + console.log("newLineIndex <= charNum, newLineIndex:"+newLineIndex+", charNum:"+charNum, "\"" + this.text.text.substr(newLineIndex+1).replace(/\n/g, "↵") + "\""); + //console.groupEnd(); + + return newLineIndex; + } + + //var charAtMaxAdvance = this.text.text.substring(charNum, charNum + 1); + var charAtMaxAdvance = this.text.getCharAtPos(charNum); + //console.log("!!charAtMaxAdvance: " + charAtMaxAdvance); + //console.groupEnd(); + return charNum; + } + }, + getPosition: function() { + return this.pos; + } + }; + + + + // ****** + function drawMultilineText(text, x, y, boxWidth, boxHeight, options) { + var TEXT_PADDING = 3; + var width = boxWidth - (2 * TEXT_PADDING); + if (boxHeight) + var height = boxHeight - (2 * TEXT_PADDING); + + var layouts = []; + + var measurer = new LineBreakMeasurer(paper, text, font); + var lineHeight = measurer.rafaelTextObject.getBBox().height; + console.log("text: ", text.replace(/\n/g, "↵")); + + if (height) { + var availableLinesCount = parseInt(height/lineHeight); + console.log("availableLinesCount: " + availableLinesCount); + } + + var i = 1; + while (measurer.getPosition() < measurer.text.getEndIndex()) { + var layout = measurer.nextLayout(width); + //console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition()); + + if (layout != null) { + if (!availableLinesCount || i < availableLinesCount) { + layouts.push(layout); + } else { + layouts.push(fitTextToWidth(layout + "...", boxWidth)); + break; + } + } + i++; + }; + console.log(layouts); + + measurer.rafaelTextObject.attr({"text": layouts.join("\n")}); + //measurer.rafaelTextObject.attr({"text-anchor": "end"}); + //measurer.rafaelTextObject.attr({"text-anchor": "middle"}); + if (options) + measurer.rafaelTextObject.attr({"text-anchor": options["text-anchor"]}); + + var bb = measurer.rafaelTextObject.getBBox(); + //measurer.rafaelTextObject.attr({"x": x + boxWidth/2}); + if (options["vertical-align"] == "top") + measurer.rafaelTextObject.attr({"y": y + bb.height/2 + TEXT_PADDING}); + else + measurer.rafaelTextObject.attr({"y": y + height/2}); + //var bb = measurer.rafaelTextObject.getBBox(); + + if (measurer.rafaelTextObject.attr("text-anchor") == "middle" ) + measurer.rafaelTextObject.attr("x", x + boxWidth/2 + TEXT_PADDING/2); + else if (measurer.rafaelTextObject.attr("text-anchor") == "end" ) + measurer.rafaelTextObject.attr("x", x + boxWidth + TEXT_PADDING/2); + else + measurer.rafaelTextObject.attr("x", x + boxWidth/2 - bb.width/2 + TEXT_PADDING/2); + + var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "}; + /* + var box = paper.rect(x+.0 + boxWidth/2 - bb.width/2+ TEXT_PADDING/2, y + .5 + boxHeight/2 - bb.height/2, width, height).attr(boxStyle); + box.attr("height", bb.height); + */ + //var box = paper.rect(bb.x - .5 + bb.width/2 + TEXT_PADDING, bb.y + bb.height/2, bb.width, bb.height).attr(boxStyle); + + var textAreaCX = x + boxWidth/2; + var textAreaCY = y + height/2; + var dotLeftTop = paper.ellipse(x, y, 3, 3).attr({"stroke-width": 0, fill: Color.LightSteelBlue, stroke: "none"}); + var dotCenter = paper.ellipse(textAreaCX, textAreaCY, 3, 3).attr({fill: Color.LightSteelBlue2, stroke: "none"}); + + /* + // real bbox + var bb = measurer.rafaelTextObject.getBBox(); + var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1}); + */ + var boxStyle = {stroke: Color.LightSteelBlue2, "stroke-width": 1.0, "stroke-dasharray": "- "}; + var rect = paper.rect(x+.5, y + .5, boxWidth, boxHeight).attr(boxStyle); + } + + + + + /* + for (var i=0; i<1; i++) { + var t = text; + //var t = "Высококвалифицирова"; + + var text = paper.text(300, 100, t).attr(font).attr("text-anchor", "start"); + var bbText = text.getBBox(); + paper.rect(300+.5, 100 + .5, bbText.width, bbText.height).attr({"stroke-width": 1}); + console.log("t: ", t.replace(/\n/g, "↵")); + + while (measurer.getPosition() < measurer.text.getEndIndex()) { + var layout = measurer.nextLayout(width); + //console.log("LAYOUT: " + layout + ", getPosition: " + measurer.getPosition()); + if (layout != null) + layouts.push(layout); + }; + + measurer.rafaelTextObject.attr("text", layouts.join("\n")); + var bb = measurer.rafaelTextObject.getBBox(); + var rect = paper.rect(bb.x+.5, bb.y + .5, bb.width, bb.height).attr({"stroke-width": 1}); + + lay.push(layouts); + console.log(layouts); + } + */ + + + var fitTextToWidth = function(original, width) { + var text = original; + + // TODO: move attr on parameters + var attr = {font: "11px Arial", opacity: 0}; + + // remove length for "..." + var dots = paper.text(0, 0, "...").attr(attr).hide(); + var dotsBB = dots.getBBox(); + + var maxWidth = width - dotsBB.width; + + var textElement = paper.text(0, 0, text).attr(attr).hide(); + var bb = textElement.getBBox(); + + // it's a little bit incorrect with "..." + while (bb.width > maxWidth && text.length > 0) { + text = text.substring(0, text.length - 1); + textElement.attr({"text": text}); + bb = textElement.getBBox(); + } + + // remove element from paper + textElement.remove(); + + if (text != original) { + text = text + "..."; + } + + return text; + } + + + var x=100, y=90, height=20; + var options = {"text-anchor": "middle", "boxHeight": 150, "vertical-align": "top"}; + var options = {"boxHeight": 150, "vertical-align": "top"}; + drawMultilineText(text, x, y, 150, 100, options); + }; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/diagram-viewer/style.css b/src/main/resources/static/activiti-editor/diagram-viewer/style.css new file mode 100644 index 0000000..b4c11c3 --- /dev/null +++ b/src/main/resources/static/activiti-editor/diagram-viewer/style.css @@ -0,0 +1 @@ +body { background: #fafafa; color: #708090; /* font: 300 100.1% "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; */ font-family: Verdana, sans-serif, Arial; font-size: 10px; } .wrapper{ height: 100%; position: relative; width: 100%; } /* #holder { height: 480px; width: 640px; b_ackground: #F8F8FF; //FHqq-3-1-3-5-9-6-7-9-0 -moz-border-radius: 10px; -webkit-border-radius: 10px; -webkit-box-shadow: 0 1px 3px #666; background: #DDD url(./images/bg.png); /* background: #DDD url(./images/checker-bg.png); * / b_order:0px solid #dedede; } */ div.diagramHolder { float:left; } div.diagram{ border:1px solid #dedede; margin: 5px; padding: 5px; background: #FFF; } div.diagram.hidden{ display:none; } svg { background: #DDD url(./images/bg.png); } div.diagram-info { float:left; position: relative; padding: 5px; } /* Breadcrumbs */ #diagramBreadCrumbs { margin-left: 2px; margin-right: 2px; margin-top: 10px; } #diagramBreadCrumbs ul { list-style: none; background-color: white; border: 1px solid #DEDEDE; border-color: #C0C2C5; margin: 0; margin-bottom: 10px; margin-left: 0; -webkit-padding-start: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } #diagramBreadCrumbs li { /*text-decoration: underline;*/ display: inline-block; vertical-align: middle; padding-left: .75em; padding-right: 0; cursor: pointer; } #diagramBreadCrumbs li.selected { color: #9370DB; color: #4876FF; color: #4F94CD; font-weight: bold; } #diagramBreadCrumbs li span { background: url(images/breadcrumbs.png) no-repeat 100% 50%; display: block; padding: .5em 15px .5em 0; } /* Progress bar */ .ui-progressbar { height: 25px; /*height:2em; text-align: left; overflow: hidden; */ background: white; border: 1px solid #949DAD; margin: 2px; overflow: hidden; padding: 1px; position: relative; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .ui-progressbar .ui-progressbar-value { m_argin: -1px; height:100%; background: #D4E4FF; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .ui-widget-header a { color: #222222/*{fcHeader}*/; } .ui-progressbar .ui-progressbar-label{ position: absolute; margin-top: 7px; border:0px solid red; width: 100%; text-align: center; } \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/app-cfg.js b/src/main/resources/static/activiti-editor/editor-app/app-cfg.js new file mode 100644 index 0000000..fb70980 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/app-cfg.js @@ -0,0 +1,28 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * //FHqq-3-1-3-5-9-6-7-9-0 + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var aclocat = (window.location+'').split('/'); +if('activiti-editor'== aclocat[3]){aclocat = aclocat[0]+'//'+aclocat[2];}else{aclocat = aclocat[0]+'//'+aclocat[2]+'/'+aclocat[3];}; + +var ACTIVITI = ACTIVITI || {}; + +ACTIVITI.CONFIG = { + 'contextRoot' : '/fourcal', +}; diff --git a/src/main/resources/static/activiti-editor/editor-app/app.js b/src/main/resources/static/activiti-editor/editor-app/app.js new file mode 100644 index 0000000..efd95e6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/app.js @@ -0,0 +1,435 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * //FHqq-313596790 + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var activitiModeler = angular.module('activitiModeler', [ + 'ngCookies', + 'ngResource', + 'ngSanitize', + 'ngRoute', + 'ngDragDrop', + 'mgcrea.ngStrap', + 'ngGrid', + 'ngAnimate', + 'pascalprecht.translate', + 'duScroll' +]); + +var activitiModule = activitiModeler; + +activitiModeler + // Initialize routes + .config(['$selectProvider', '$translateProvider', function ($selectProvider, $translateProvider) { + + // Override caret for bs-select directive + angular.extend($selectProvider.defaults, { + caretHtml: ' <i class="icon icon-caret-down"></i>' + }); + + // Initialize angular-translate + $translateProvider.useStaticFilesLoader({ + prefix: './editor-app/i18n/', + suffix: '.json' + }); + + $translateProvider.preferredLanguage('en'); + + // remember language + $translateProvider.useCookieStorage(); + + }]) + .run(['$rootScope', '$timeout', '$modal', '$translate', '$location', '$window', '$http', '$q', + function($rootScope, $timeout, $modal, $translate, $location, $window, $http, $q) { + + $rootScope.config = ACTIVITI.CONFIG; + + $rootScope.editorInitialized = false; + + $rootScope.editorFactory = $q.defer(); + + $rootScope.forceSelectionRefresh = false; + + $rootScope.ignoreChanges = false; // by default never ignore changes + + $rootScope.validationErrors = []; + + $rootScope.staticIncludeVersion = Date.now(); + + /** + * A 'safer' apply that avoids concurrent updates (which $apply allows). + */ + $rootScope.safeApply = function(fn) { + var phase = this.$root.$$phase; + if(phase == '$apply' || phase == '$digest') { + if(fn && (typeof(fn) === 'function')) { + fn(); + } + } else { + this.$apply(fn); + } + }; + + + /** + * Initialize the event bus: couple all Oryx events with a dispatch of the + * event of the event bus. This way, it gets much easier to attach custom logic + * to any event. + */ + + /* Helper method to fetch model from server (always needed) */ + function fetchModel(modelId) { + + var modelUrl = KISBPM.URL.getModel(modelId); + $http({method: 'GET', url: modelUrl}). + success(function (data, status, headers, config) { + $rootScope.editor = new ORYX.Editor(data); + $rootScope.modelData = angular.fromJson(data); + $rootScope.editorFactory.resolve(); + }). + error(function (data, status, headers, config) { + console.log('Error loading model with id ' + modelId + ' ' + data); + }); + } + + + function initScrollHandling() { + var canvasSection = jQuery('#canvasSection'); + canvasSection.scroll(function() { + + // Hides the resizer and quick menu items during scrolling + + var selectedElements = $rootScope.editor.selection; + var subSelectionElements = $rootScope.editor._subSelection; + + $rootScope.selectedElements = selectedElements; + $rootScope.subSelectionElements = subSelectionElements; + if (selectedElements && selectedElements.length > 0) { + $rootScope.selectedElementBeforeScrolling = selectedElements[0]; + } + + jQuery('.Oryx_button').each(function(i, obj) { + $rootScope.orginalOryxButtonStyle = obj.style.display; + obj.style.display = 'none'; + }); + + jQuery('.resizer_southeast').each(function(i, obj) { + $rootScope.orginalResizerSEStyle = obj.style.display; + obj.style.display = 'none'; + }); + jQuery('.resizer_northwest').each(function(i, obj) { + $rootScope.orginalResizerNWStyle = obj.style.display; + obj.style.display = 'none'; + }); + $rootScope.editor.handleEvents({type:ORYX.CONFIG.EVENT_CANVAS_SCROLL}); + }); + + canvasSection.scrollStopped(function(){ + + // Puts the quick menu items and resizer back when scroll is stopped. + + $rootScope.editor.setSelection([]); // needed cause it checks for element changes and does nothing if the elements are the same + $rootScope.editor.setSelection($rootScope.selectedElements, $rootScope.subSelectionElements); + $rootScope.selectedElements = undefined; + $rootScope.subSelectionElements = undefined; + + function handleDisplayProperty(obj) { + if (jQuery(obj).position().top > 0) { + obj.style.display = 'block'; + } else { + obj.style.display = 'none'; + } + } + + jQuery('.Oryx_button').each(function(i, obj) { + handleDisplayProperty(obj); + }); + + jQuery('.resizer_southeast').each(function(i, obj) { + handleDisplayProperty(obj); + }); + jQuery('.resizer_northwest').each(function(i, obj) { + handleDisplayProperty(obj); + }); + + }); + } + + /** + * Initialize the Oryx Editor when the content has been loaded + */ + $rootScope.$on('$includeContentLoaded', function (event) { + if (!$rootScope.editorInitialized) { + + ORYX._loadPlugins(); + + var modelId = EDITOR.UTIL.getParameterByName('modelId'); + + modelId=modelId.substr(1); + // modelId=userModelerId; + // alert(modelId); + fetchModel(modelId); + + $rootScope.window = {}; + var updateWindowSize = function() { + $rootScope.window.width = $window.innerWidth; + $rootScope.window.height = $window.innerHeight; + }; + + // Window resize hook + angular.element($window).bind('resize', function() { + $rootScope.safeApply(updateWindowSize()); + }); + + $rootScope.$watch('window.forceRefresh', function(newValue) { + if(newValue) { + $timeout(function() { + updateWindowSize(); + $rootScope.window.forceRefresh = false; + }); + } + }); + + updateWindowSize(); + + // Hook in resizing of main panels when window resizes + // TODO: perhaps move to a separate JS-file? + jQuery(window).resize(function () { + + // Calculate the offset based on the bottom of the module header + var offset = jQuery("#editor-header").offset(); + var propSectionHeight = jQuery('#propertySection').height(); + var canvas = jQuery('#canvasSection'); + var mainHeader = jQuery('#main-header'); + + if (offset == undefined || offset === null + || propSectionHeight === undefined || propSectionHeight === null + || canvas === undefined || canvas === null || mainHeader === null) { + return; + } + + if ($rootScope.editor) + { + var selectedElements = $rootScope.editor.selection; + var subSelectionElements = $rootScope.editor._subSelection; + + $rootScope.selectedElements = selectedElements; + $rootScope.subSelectionElements = subSelectionElements; + if (selectedElements && selectedElements.length > 0) + { + $rootScope.selectedElementBeforeScrolling = selectedElements[0]; + + $rootScope.editor.setSelection([]); // needed cause it checks for element changes and does nothing if the elements are the same + $rootScope.editor.setSelection($rootScope.selectedElements, $rootScope.subSelectionElements); + $rootScope.selectedElements = undefined; + $rootScope.subSelectionElements = undefined; + } + } + + var totalAvailable = jQuery(window).height() - offset.top - mainHeader.height() - 21; + canvas.height(totalAvailable - propSectionHeight); + jQuery('#paletteSection').height(totalAvailable); + + // Update positions of the resize-markers, according to the canvas + + var actualCanvas = null; + if (canvas && canvas[0].children[1]) { + actualCanvas = canvas[0].children[1]; + } + + var canvasTop = canvas.position().top; + var canvasLeft = canvas.position().left; + var canvasHeight = canvas[0].clientHeight; + var canvasWidth = canvas[0].clientWidth; + var iconCenterOffset = 8; + var widthDiff = 0; + + var actualWidth = 0; + if(actualCanvas) { + // In some browsers, the SVG-element clientwidth isn't available, so we revert to the parent + actualWidth = actualCanvas.clientWidth || actualCanvas.parentNode.clientWidth; + } + + + if(actualWidth < canvas[0].clientWidth) { + widthDiff = actualWidth - canvas[0].clientWidth; + // In case the canvas is smaller than the actual viewport, the resizers should be moved + canvasLeft -= widthDiff / 2; + canvasWidth += widthDiff; + } + + var iconWidth = 17; + var iconOffset = 20; + + var north = jQuery('#canvas-grow-N'); + north.css('top', canvasTop + iconOffset + 'px'); + north.css('left', canvasLeft - 10 + (canvasWidth - iconWidth) / 2 + 'px'); + + var south = jQuery('#canvas-grow-S'); + south.css('top', (canvasTop + canvasHeight - iconOffset - iconCenterOffset) + 'px'); + south.css('left', canvasLeft - 10 + (canvasWidth - iconWidth) / 2 + 'px'); + + var east = jQuery('#canvas-grow-E'); + east.css('top', canvasTop - 10 + (canvasHeight - iconWidth) / 2 + 'px'); + east.css('left', (canvasLeft + canvasWidth - iconOffset - iconCenterOffset) + 'px'); + + var west = jQuery('#canvas-grow-W'); + west.css('top', canvasTop -10 + (canvasHeight - iconWidth) / 2 + 'px'); + west.css('left', canvasLeft + iconOffset + 'px'); + + north = jQuery('#canvas-shrink-N'); + north.css('top', canvasTop + iconOffset + 'px'); + north.css('left', canvasLeft + 10 + (canvasWidth - iconWidth) / 2 + 'px'); + + south = jQuery('#canvas-shrink-S'); + south.css('top', (canvasTop + canvasHeight - iconOffset - iconCenterOffset) + 'px'); + south.css('left', canvasLeft +10 + (canvasWidth - iconWidth) / 2 + 'px'); + + east = jQuery('#canvas-shrink-E'); + east.css('top', canvasTop + 10 + (canvasHeight - iconWidth) / 2 + 'px'); + east.css('left', (canvasLeft + canvasWidth - iconOffset - iconCenterOffset) + 'px'); + + west = jQuery('#canvas-shrink-W'); + west.css('top', canvasTop + 10 + (canvasHeight - iconWidth) / 2 + 'px'); + west.css('left', canvasLeft + iconOffset + 'px'); + }); + + jQuery(window).trigger('resize'); + + jQuery.fn.scrollStopped = function(callback) { + jQuery(this).scroll(function(){ + var self = this, $this = jQuery(self); + if ($this.data('scrollTimeout')) { + clearTimeout($this.data('scrollTimeout')); + } + $this.data('scrollTimeout', setTimeout(callback,50,self)); + }); + }; + + // Always needed, cause the DOM element on which the scroll event listeners are attached are changed for every new model + initScrollHandling(); + + $rootScope.editorInitialized = true; + } + }); + + /** + * Initialize the event bus: couple all Oryx events with a dispatch of the + * event of the event bus. This way, it gets much easier to attach custom logic + * to any event. + */ + + $rootScope.editorFactory.promise.then(function() { + + KISBPM.eventBus.editor = $rootScope.editor; + + var eventMappings = [ + { oryxType : ORYX.CONFIG.EVENT_SELECTION_CHANGED, kisBpmType : KISBPM.eventBus.EVENT_TYPE_SELECTION_CHANGE }, + { oryxType : ORYX.CONFIG.EVENT_DBLCLICK, kisBpmType : KISBPM.eventBus.EVENT_TYPE_DOUBLE_CLICK }, + { oryxType : ORYX.CONFIG.EVENT_MOUSEOUT, kisBpmType : KISBPM.eventBus.EVENT_TYPE_MOUSE_OUT }, + { oryxType : ORYX.CONFIG.EVENT_MOUSEOVER, kisBpmType : KISBPM.eventBus.EVENT_TYPE_MOUSE_OVER } + + ]; + + eventMappings.forEach(function(eventMapping) { + $rootScope.editor.registerOnEvent(eventMapping.oryxType, function(event) { + KISBPM.eventBus.dispatch(eventMapping.kisBpmType, event); + }); + }); + + $rootScope.editor.registerOnEvent(ORYX.CONFIG.EVENT_SHAPEREMOVED, function (event) { + var validateButton = document.getElementById(event.shape.resourceId + "-validate-button"); + if (validateButton) + { + validateButton.style.display = 'none'; + } + }); + + // The Oryx canvas is ready (we know since we're in this promise callback) and the + // event bus is ready. The editor is now ready for use + KISBPM.eventBus.dispatch(KISBPM.eventBus.EVENT_TYPE_EDITOR_READY, {type : KISBPM.eventBus.EVENT_TYPE_EDITOR_READY}); + + }); + + // Alerts + $rootScope.alerts = { + queue: [] + }; + + $rootScope.showAlert = function(alert) { + if(alert.queue.length > 0) { + alert.current = alert.queue.shift(); + // Start timout for message-pruning + alert.timeout = $timeout(function() { + if (alert.queue.length == 0) { + alert.current = undefined; + alert.timeout = undefined; + } else { + $rootScope.showAlert(alert); + } + }, (alert.current.type == 'error' ? 5000 : 1000)); + } else { + $rootScope.alerts.current = undefined; + } + }; + + $rootScope.addAlert = function(message, type) { + var newAlert = {message: message, type: type}; + if (!$rootScope.alerts.timeout) { + // Timeout for message queue is not running, start one + $rootScope.alerts.queue.push(newAlert); + $rootScope.showAlert($rootScope.alerts); + } else { + $rootScope.alerts.queue.push(newAlert); + } + }; + + $rootScope.dismissAlert = function() { + if (!$rootScope.alerts.timeout) { + $rootScope.alerts.current = undefined; + } else { + $timeout.cancel($rootScope.alerts.timeout); + $rootScope.alerts.timeout = undefined; + $rootScope.showAlert($rootScope.alerts); + } + }; + + $rootScope.addAlertPromise = function(promise, type) { + if (promise) { + promise.then(function(data) { + $rootScope.addAlert(data, type); + }); + } + }; + + } + ]) + + // Moment-JS date-formatting filter + .filter('dateformat', function() { + return function(date, format) { + if (date) { + if (format) { + return moment(date).format(format); + } else { + return moment(date).calendar(); + } + } + return ''; + }; + }); diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-assignment-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-assignment-controller.js new file mode 100644 index 0000000..6fbfc20 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-assignment-controller.js @@ -0,0 +1,150 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Assignment + */ +var KisBpmAssignmentCtrl = [ '$scope', '$modal', function($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/assignment-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmAssignmentPopupCtrl = [ '$scope', function($scope) { + + // Put json representing assignment on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.assignment !== undefined + && $scope.property.value.assignment !== null) + { + $scope.assignment = $scope.property.value.assignment; + } else { + $scope.assignment = {}; + } + + if ($scope.assignment.candidateUsers == undefined || $scope.assignment.candidateUsers.length == 0) + { + $scope.assignment.candidateUsers = [{value: ''}]; + } + + // Click handler for + button after enum value + var userValueIndex = 1; + $scope.addCandidateUserValue = function(index) { + $scope.assignment.candidateUsers.splice(index + 1, 0, {value: 'value ' + userValueIndex++}); + }; + + // Click handler for - button after enum value + $scope.removeCandidateUserValue = function(index) { + $scope.assignment.candidateUsers.splice(index, 1); + }; + + if ($scope.assignment.candidateGroups == undefined || $scope.assignment.candidateGroups.length == 0) + { + $scope.assignment.candidateGroups = [{value: ''}]; + } + + var groupValueIndex = 1; + $scope.addCandidateGroupValue = function(index) { + $scope.assignment.candidateGroups.splice(index + 1, 0, {value: 'value ' + groupValueIndex++}); + }; + + // Click handler for - button after enum value + $scope.removeCandidateGroupValue = function(index) { + $scope.assignment.candidateGroups.splice(index, 1); + }; + + $scope.save = function() { + + $scope.property.value = {}; + handleAssignmentInput($scope); + $scope.property.value.assignment = $scope.assignment; + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + handleAssignmentInput($scope); + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + var handleAssignmentInput = function($scope) { + if ($scope.assignment.candidateUsers) + { + var emptyUsers = true; + var toRemoveIndexes = []; + for (var i = 0; i < $scope.assignment.candidateUsers.length; i++) + { + if ($scope.assignment.candidateUsers[i].value != '') + { + emptyUsers = false; + } + else + { + toRemoveIndexes[toRemoveIndexes.length] = i; + } + } + + for (var i = 0; i < toRemoveIndexes.length; i++) + { + $scope.assignment.candidateUsers.splice(toRemoveIndexes[i], 1); + } + + if (emptyUsers) + { + $scope.assignment.candidateUsers = undefined; + } + } + + if ($scope.assignment.candidateGroups) + { + var emptyGroups = true; + var toRemoveIndexes = []; + for (var i = 0; i < $scope.assignment.candidateGroups.length; i++) + { + if ($scope.assignment.candidateGroups[i].value != '') + { + emptyGroups = false; + } + else + { + toRemoveIndexes[toRemoveIndexes.length] = i; + } + } + + for (var i = 0; i < toRemoveIndexes.length; i++) + { + $scope.assignment.candidateGroups.splice(toRemoveIndexes[i], 1); + } + + if (emptyGroups) + { + $scope.assignment.candidateGroups = undefined; + } + } + }; +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-condition-expression-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-condition-expression-controller.js new file mode 100644 index 0000000..5b27ccd --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-condition-expression-controller.js @@ -0,0 +1,59 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Condition expression + */ + +var KisBpmConditionExpressionCtrl = [ '$scope', '$modal', function($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/condition-expression-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmConditionExpressionPopupCtrl = [ '$scope', '$translate', '$http', function($scope, $translate, $http) { + + // Put json representing condition on scope + if ($scope.property.value !== undefined && $scope.property.value !== null) { + + $scope.conditionExpression = {value: $scope.property.value}; + + } else { + $scope.conditionExpression = {value: ''}; + } + + $scope.save = function() { + console.log("条件表达式设置"); + $scope.property.value = $scope.conditionExpression.value; + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-custom-controllers.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-custom-controllers.js new file mode 100644 index 0000000..92aa0ba --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-custom-controllers.js @@ -0,0 +1,18 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-default-controllers.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-default-controllers.js new file mode 100644 index 0000000..f3f4760 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-default-controllers.js @@ -0,0 +1,115 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * String controller + */ + +var KisBpmStringPropertyCtrl = [ '$scope', function ($scope) { + + $scope.shapeId = $scope.selectedShape.id; + $scope.valueFlushed = false; + /** Handler called when input field is blurred */ + $scope.inputBlurred = function() { + $scope.valueFlushed = true; + if ($scope.property.value) { + $scope.property.value = $scope.property.value.replace(/(<([^>]+)>)/ig,""); + } + $scope.updatePropertyInModel($scope.property); + }; + + $scope.enterPressed = function(keyEvent) { + if (keyEvent && keyEvent.which === 13) { + keyEvent.preventDefault(); + $scope.inputBlurred(); // we want to do the same as if the user would blur the input field + } + }; + + $scope.$on('$destroy', function controllerDestroyed() { + if(!$scope.valueFlushed) { + if ($scope.property.value) { + $scope.property.value = $scope.property.value.replace(/(<([^>]+)>)/ig,""); + } + $scope.updatePropertyInModel($scope.property, $scope.shapeId); + } + }); + +}]; + +/* + * Boolean controller + */ + +var KisBpmBooleanPropertyCtrl = ['$scope', function ($scope) { + + $scope.changeValue = function() { + if ($scope.property.key === 'oryx-defaultflow' && $scope.property.value) { + var selectedShape = $scope.selectedShape; + if (selectedShape) { + var incomingNodes = selectedShape.getIncomingShapes(); + if (incomingNodes && incomingNodes.length > 0) { + // get first node, since there can be only one for a sequence flow + var rootNode = incomingNodes[0]; + var flows = rootNode.getOutgoingShapes(); + if (flows && flows.length > 1) { + // in case there are more flows, check if another flow is already defined as default + for (var i = 0; i < flows.length; i++) { + if (flows[i].resourceId != selectedShape.resourceId) { + var defaultFlowProp = flows[i].properties['oryx-defaultflow']; + if (defaultFlowProp) { + flows[i].setProperty('oryx-defaultflow', false, true); + } + } + } + } + } + } + } + $scope.updatePropertyInModel($scope.property); + }; + +}]; + +/* + * Text controller + */ + +var KisBpmTextPropertyCtrl = [ '$scope', '$modal', function($scope, $modal) { + + var opts = { + template: 'editor-app/configuration/properties/text-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmTextPropertyPopupCtrl = ['$scope', function($scope) { + + $scope.save = function() { + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-event-listeners-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-event-listeners-controller.js new file mode 100644 index 0000000..6bb0fac --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-event-listeners-controller.js @@ -0,0 +1,266 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +var KisBpmEventListenersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/event-listeners-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 +// Will be fixed in a newer version of Angular UI +var KisBpmEventListenersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.eventListeners !== undefined + && $scope.property.value.eventListeners !== null) { + + if ($scope.property.value.eventListeners.constructor == String) + { + $scope.eventListeners = JSON.parse($scope.property.value.eventListeners); + } + else + { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.eventListeners = angular.copy($scope.property.value.eventListeners); + } + + } else { + $scope.eventListeners = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedListeners = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var eventPromise = $translate('PROPERTY.EXECUTIONLISTENERS.EVENT'); + var implementationPromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION'); + var namePromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME'); + + $q.all([eventPromise, implementationPromise, namePromise]).then(function(results) { + $scope.labels.eventLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.labels.nameLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'eventListeners', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedListeners, + afterSelectionChange: function (rowItem, event) { + + if ($scope.selectedListeners.length > 0) + { + var fields = $scope.selectedListeners[0].fields; + if (fields !== undefined && fields !== null) + { + for (var i = 0; i < fields.length; i++) + { + var field = fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + } + + if (!$scope.selectedListeners[0].events || $scope.selectedListeners[0].events.length == 0) + { + $scope.selectedListeners[0].events = [{event: ''}]; + } + } + }, + columnDefs: [{ field: 'event', displayName: $scope.labels.eventLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel }] + }; + }); + + // Click handler for + button after enum value + $scope.addEventValue = function(index) { + $scope.selectedListeners[0].events.splice(index + 1, 0, {event: ''}); + }; + + // Click handler for - button after enum value + $scope.removeEventValue = function(index) { + $scope.selectedListeners[0].events.splice(index, 1); + $scope.listenerDetailsChanged(); + }; + + $scope.listenerDetailsChanged = function() { + var listener = $scope.selectedListeners[0]; + if (listener.events) + { + var eventText = ''; + for (var i = 0; i < listener.events.length; i++) + { + if (i > 0) + { + eventText += ", "; + } + eventText += listener.events[i].event; + } + $scope.selectedListeners[0].event = eventText; + } + + if (listener.rethrowEvent) + { + var implementationText = ''; + if (listener.rethrowType && listener.rethrowType.length > 0) + { + if (listener.rethrowType === 'error' && listener.errorcode !== '') + { + implementationText = "Rethrow as error " + listener.errorcode; + } + else if (listener.rethrowType === 'message' && listener.messagename !== '') + { + implementationText = "Rethrow as message " + listener.messagename; + } + else if ((listener.rethrowType === 'signal' || listener.rethrowType === 'globalSignal') && listener.signalname !== '') + { + implementationText = "Rethrow as signal " + listener.signalname; + } + } + $scope.selectedListeners[0].implementation = implementationText; + } + else + { + if ($scope.selectedListeners[0].className !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].className; + } + else if ($scope.selectedListeners[0].delegateExpression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].delegateExpression; + } + else + { + $scope.selectedListeners[0].implementation = ''; + } + } + }; + + // Click handler for add button + $scope.addNewListener = function() { + $scope.eventListeners.push({ event : '', + implementation : '', + className : '', + delegateExpression: '', + retrowEvent: false}); + }; + + // Click handler for remove button + $scope.removeListener = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.eventListeners.indexOf($scope.selectedListeners[0]); + $scope.gridOptions.selectItem(index, false); + $scope.eventListeners.splice(index, 1); + + $scope.selectedListeners.length = 0; + if (index < $scope.eventListeners.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.eventListeners.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveListenerUp = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.eventListeners.indexOf($scope.selectedListeners[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.eventListeners[index]; + $scope.eventListeners.splice(index, 1); + $timeout(function(){ + $scope.eventListeners.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveListenerDown = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.eventListeners.indexOf($scope.selectedListeners[0]); + if (index != $scope.eventListeners.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.eventListeners[index]; + $scope.eventListeners.splice(index, 1); + $timeout(function(){ + $scope.eventListeners.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.eventListeners.length > 0) { + $scope.property.value = {}; + $scope.property.value.eventListeners = $scope.eventListeners; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-execution-listeners-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-execution-listeners-controller.js new file mode 100644 index 0000000..abe74e5 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-execution-listeners-controller.js @@ -0,0 +1,326 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +var KisBpmExecutionListenersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/execution-listeners-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmExecutionListenersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.executionListeners !== undefined + && $scope.property.value.executionListeners !== null) { + + if ($scope.property.value.executionListeners.constructor == String) + { + $scope.executionListeners = JSON.parse($scope.property.value.executionListeners); + } + else + { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.executionListeners = angular.copy($scope.property.value.executionListeners); + } + + for (var i = 0; i < $scope.executionListeners.length; i++) + { + var executionListener = $scope.executionListeners[i]; + if (executionListener.className !== undefined && executionListener.className !== '') + { + executionListener.implementation = executionListener.className; + } + else if (executionListener.expression !== undefined && executionListener.expression !== '') + { + executionListener.implementation = executionListener.expression; + } + else if (executionListener.delegateExpression !== undefined && executionListener.delegateExpression !== '') + { + executionListener.implementation = executionListener.delegateExpression; + } + } + } else { + $scope.executionListeners = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedListeners = []; + $scope.selectedFields = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var eventPromise = $translate('PROPERTY.EXECUTIONLISTENERS.EVENT'); + var implementationPromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION'); + var namePromise = $translate('PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME'); + + $q.all([eventPromise, implementationPromise, namePromise]).then(function(results) { + $scope.labels.eventLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.labels.nameLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'executionListeners', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedListeners, + afterSelectionChange: function (rowItem, event) { + $scope.selectedFields.length = 0; + if ($scope.selectedListeners.length > 0) + { + var fields = $scope.selectedListeners[0].fields; + if (fields !== undefined && fields !== null) + { + for (var i = 0; i < fields.length; i++) + { + var field = fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + } + } + }, + columnDefs: [{ field: 'event', displayName: $scope.labels.eventLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel }] + }; + + // Config for field grid + $scope.gridFieldOptions = { + data: 'selectedListeners[0].fields', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedFields, + columnDefs: [{ field: 'name', displayName: $scope.labels.nameLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + }); + + $scope.listenerDetailsChanged = function() { + if ($scope.selectedListeners[0].className !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].className; + } + else if ($scope.selectedListeners[0].expression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].expression; + } + else if ($scope.selectedListeners[0].delegateExpression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].delegateExpression; + } + else + { + $scope.selectedListeners[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewListener = function() { + $scope.executionListeners.push({ event : 'start', + implementation : '', + className : '', + expression: '', + delegateExpression: ''}); + }; + + // Click handler for remove button + $scope.removeListener = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.executionListeners.indexOf($scope.selectedListeners[0]); + $scope.gridOptions.selectItem(index, false); + $scope.executionListeners.splice(index, 1); + + $scope.selectedListeners.length = 0; + if (index < $scope.executionListeners.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.executionListeners.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveListenerUp = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.executionListeners.indexOf($scope.selectedListeners[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.executionListeners[index]; + $scope.executionListeners.splice(index, 1); + $timeout(function(){ + $scope.executionListeners.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveListenerDown = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.executionListeners.indexOf($scope.selectedListeners[0]); + if (index != $scope.executionListeners.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.executionListeners[index]; + $scope.executionListeners.splice(index, 1); + $timeout(function(){ + $scope.executionListeners.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + $scope.fieldDetailsChanged = function() { + if ($scope.selectedFields[0].stringValue !== '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].stringValue; + } + else if ($scope.selectedFields[0].expression !== '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].expression; + } + else if ($scope.selectedFields[0].string !== '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].string; + } + else + { + $scope.selectedFields[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewField = function() { + if ($scope.selectedListeners.length > 0) + { + if ($scope.selectedListeners[0].fields == undefined) + { + $scope.selectedListeners[0].fields = []; + } + $scope.selectedListeners[0].fields.push({ name : 'fieldName', + implementation : '', + stringValue : '', + expression: '', + string: ''}); + } + }; + + // Click handler for remove button + $scope.removeField = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + $scope.gridFieldOptions.selectItem(index, false); + $scope.selectedListeners[0].fields.splice(index, 1); + + $scope.selectedFields.length = 0; + if (index < $scope.selectedListeners[0].fields.length) { + $scope.gridFieldOptions.selectItem(index + 1, true); + } else if ($scope.selectedListeners[0].fields.length > 0) { + $scope.gridFieldOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveFieldUp = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveFieldDown = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != $scope.selectedListeners[0].fields.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.executionListeners.length > 0) { + $scope.property.value = {}; + $scope.property.value.executionListeners = $scope.executionListeners; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + + // Close button handler + $scope.close = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-fields-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-fields-controller.js new file mode 100644 index 0000000..3066c04 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-fields-controller.js @@ -0,0 +1,192 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Task listeners + */ + +var KisBpmFieldsCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/fields-popup.html', + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmFieldsPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.fields !== undefined + && $scope.property.value.fields !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.fields = angular.copy($scope.property.value.fields); + + for (var i = 0; i < $scope.fields.length; i++) + { + var field = $scope.fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + + } else { + $scope.fields = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedFields = []; + $scope.translationsRetrieved = false; + $scope.labels = {}; + + var namePromise = $translate('PROPERTY.FIELDS.NAME'); + var implementationPromise = $translate('PROPERTY.FIELDS.IMPLEMENTATION'); + + $q.all([namePromise, implementationPromise]).then(function(results) { + $scope.labels.nameLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'fields', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected: false, + selectedItems: $scope.selectedFields, + columnDefs: [{field: 'name', displayName: $scope.labels.nameLabel}, + {field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + }); + + $scope.fieldDetailsChanged = function() { + if ($scope.selectedFields[0].stringValue != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].stringValue; + } + else if ($scope.selectedFields[0].expression != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].expression; + } + else if ($scope.selectedFields[0].string != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].string; + } + else + { + $scope.selectedFields[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewField = function() { + $scope.fields.push({ name : 'fieldName', + implementation : '', + stringValue : '', + expression: '', + string: ''}); + }; + + // Click handler for remove button + $scope.removeField = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.fields.indexOf($scope.selectedFields[0]); + $scope.gridOptions.selectItem(index, false); + $scope.fields.splice(index, 1); + + $scope.selectedFields.length = 0; + if (index < $scope.fields.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.fields.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveFieldUp = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.fields.indexOf($scope.selectedFields[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.fields[index]; + $scope.fields.splice(index, 1); + $timeout(function(){ + $scope.fields.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveFieldDown = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.fields.indexOf($scope.selectedFields[0]); + if (index != $scope.fields.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.fields[index]; + $scope.fields.splice(index, 1); + $timeout(function(){ + $scope.fields.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.fields.length > 0) { + $scope.property.value = {}; + $scope.property.value.fields = $scope.fields; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-form-properties-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-form-properties-controller.js new file mode 100644 index 0000000..16f70b1 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-form-properties-controller.js @@ -0,0 +1,276 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Form Properties + */ + +var KisBpmFormPropertiesCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/form-properties-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmFormPropertiesPopupCtrl = ['$scope', '$q', '$translate', '$timeout', function($scope, $q, $translate, $timeout) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.formProperties !== undefined + && $scope.property.value.formProperties !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happended + $scope.formProperties = angular.copy($scope.property.value.formProperties); + + for (var i = 0; i < $scope.formProperties.length; i++) { + var formProperty = $scope.formProperties[i]; + if (formProperty.enumValues && formProperty.enumValues.length > 0) { + for (var j = 0; j < formProperty.enumValues.length; j++) { + var enumValue = formProperty.enumValues[j]; + if (!enumValue.id && !enumValue.name && enumValue.value) { + enumValue.id = enumValue.value; + enumValue.name = enumValue.value; + } + } + } + } + + } else { + $scope.formProperties = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedProperties = []; + $scope.selectedEnumValues = []; + + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var idPromise = $translate('PROPERTY.FORMPROPERTIES.ID'); + var namePromise = $translate('PROPERTY.FORMPROPERTIES.NAME'); + var typePromise = $translate('PROPERTY.FORMPROPERTIES.TYPE'); + + $q.all([idPromise, namePromise, typePromise]).then(function(results) { + $scope.labels.idLabel = results[0]; + $scope.labels.nameLabel = results[1]; + $scope.labels.typeLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'formProperties', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedProperties, + columnDefs: [{ field: 'id', displayName: $scope.labels.idLabel }, + { field: 'name', displayName: $scope.labels.nameLabel}, + { field: 'type', displayName: $scope.labels.typeLabel}] + }; + + $scope.enumGridOptions = { + data: 'selectedProperties[0].enumValues', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedEnumValues, + columnDefs: [{ field: 'id', displayName: $scope.labels.idLabel }, + { field: 'name', displayName: $scope.labels.nameLabel}] + } + }); + + // Handler for when the value of the type dropdown changes + $scope.propertyTypeChanged = function() { + + // Check date. If date, show date pattern + if ($scope.selectedProperties[0].type === 'date') { + $scope.selectedProperties[0].datePattern = 'MM-dd-yyyy hh:mm'; + + } else { + delete $scope.selectedProperties[0].datePattern; + } + + // Check enum. If enum, show list of options + if ($scope.selectedProperties[0].type === 'enum') { + $scope.selectedProperties[0].enumValues = [ {id: 'value1', name: 'Value 1'}, {id: 'value2', name: 'Value 2'}]; + + } else { + delete $scope.selectedProperties[0].enumValues; + } + }; + + // Click handler for add button + var propertyIndex = 1; + $scope.addNewProperty = function() { + $scope.formProperties.push({ id : 'new_property_' + propertyIndex++, + name : '', + type : 'string', + readable: true, + writable: true}); + + $timeout(function(){ + $scope.gridOptions.selectItem($scope.formProperties.length - 1, true); + }); + }; + + // Click handler for remove button + $scope.removeProperty = function() { + if ($scope.selectedProperties.length > 0) { + var index = $scope.formProperties.indexOf($scope.selectedProperties[0]); + $scope.gridOptions.selectItem(index, false); + $scope.formProperties.splice(index, 1); + + $scope.selectedProperties.length = 0; + if (index < $scope.formProperties.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.formProperties.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.movePropertyUp = function() { + if ($scope.selectedProperties.length > 0) { + var index = $scope.formProperties.indexOf($scope.selectedProperties[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.formProperties[index]; + $scope.formProperties.splice(index, 1); + $timeout(function(){ + $scope.formProperties.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.movePropertyDown = function() { + if ($scope.selectedProperties.length > 0) { + var index = $scope.formProperties.indexOf($scope.selectedProperties[0]); + if (index != $scope.formProperties.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.formProperties[index]; + $scope.formProperties.splice(index, 1); + $timeout(function(){ + $scope.formProperties.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + $scope.addNewEnumValue = function() { + if ($scope.selectedProperties.length > 0) { + $scope.selectedProperties[0].enumValues.push({ id : '', name : ''}); + } + + $timeout(function(){ + $scope.enumGridOptions.selectItem($scope.selectedProperties[0].enumValues.length - 1, true); + }); + }; + + // Click handler for remove button + $scope.removeEnumValue = function() { + if ($scope.selectedProperties.length > 0 && $scope.selectedEnumValues.length > 0) { + var index = $scope.selectedProperties[0].enumValues.indexOf($scope.selectedEnumValues[0]); + $scope.enumGridOptions.selectItem(index, false); + $scope.selectedProperties[0].enumValues.splice(index, 1); + + $scope.selectedEnumValues.length = 0; + if (index < $scope.selectedProperties[0].enumValues.length) { + $timeout(function(){ + $scope.enumGridOptions.selectItem(index + 1, true); + }); + + } else if ($scope.selectedProperties[0].enumValues.length > 0) { + $timeout(function(){ + $scope.enumGridOptions.selectItem(index - 1, true); + }); + } + } + }; + + // Click handler for up button + $scope.moveEnumValueUp = function() { + if ($scope.selectedProperties.length > 0 && $scope.selectedEnumValues.length > 0) { + var index = $scope.selectedProperties[0].enumValues.indexOf($scope.selectedEnumValues[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedProperties[0].enumValues[index]; + $scope.selectedProperties[0].enumValues.splice(index, 1); + $timeout(function(){ + $scope.selectedProperties[0].enumValues.splice(index + -1, 0, temp); + }); + + } + } + }; + + // Click handler for down button + $scope.moveEnumValueDown = function() { + if ($scope.selectedProperties.length > 0 && $scope.selectedEnumValues.length > 0) { + var index = $scope.selectedProperties[0].enumValues.indexOf($scope.selectedEnumValues[0]); + if (index != $scope.selectedProperties[0].enumValues.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedProperties[0].enumValues[index]; + $scope.selectedProperties[0].enumValues.splice(index, 1); + $timeout(function(){ + $scope.selectedProperties[0].enumValues.splice(index + 1, 0, temp); + }); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.formProperties.length > 0) { + $scope.property.value = {}; + $scope.property.value.formProperties = $scope.formProperties; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + + // Close button handler + $scope.close = function() { + $scope.$hide(); + $scope.property.mode = 'read'; + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-in-parameters-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-in-parameters-controller.js new file mode 100644 index 0000000..bfb39a7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-in-parameters-controller.js @@ -0,0 +1,158 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Input parameters for call activity + */ + +var KisBpmInParametersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/in-parameters-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmInParametersPopupCtrl = ['$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.inParameters !== undefined + && $scope.property.value.inParameters !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.parameters = angular.copy($scope.property.value.inParameters); + } else { + $scope.parameters = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedParameters = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE'); + var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION'); + var targetPromise = $translate('PROPERTY.PARAMETER.TARGET'); + + $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function(results) { + $scope.labels.sourceLabel = results[0]; + $scope.labels.sourceExpressionLabel = results[1]; + $scope.labels.targetLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'parameters', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedParameters, + columnDefs: [{ field: 'source', displayName: $scope.labels.sourceLabel }, + { field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel }, + { field: 'target', displayName: $scope.labels.targetLabel }] + }; + }); + + // Click handler for add button + $scope.addNewParameter = function() { + $scope.parameters.push({ source : '', + sourceExpression : '', + target : ''}); + }; + + // Click handler for remove button + $scope.removeParameter = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + $scope.gridOptions.selectItem(index, false); + $scope.parameters.splice(index, 1); + + $scope.selectedParameters.length = 0; + if (index < $scope.parameters.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.parameters.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveParameterUp = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveParameterDown = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.parameters.length > 0) { + $scope.property.value = {}; + $scope.property.value.inParameters = $scope.parameters; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-definitions-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-definitions-controller.js new file mode 100644 index 0000000..062230e --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-definitions-controller.js @@ -0,0 +1,137 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +angular.module('activitiModeler').controller('ActivitiMessageDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/message-definitions-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]); + +//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 +// Will be fixed in a newer version of Angular UI +angular.module('activitiModeler').controller('ActivitiMessageDefinitionsPopupCtrl', + ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { + + // Put json representing mesage definitions on scope + if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) { + + if ($scope.property.value.constructor == String) { + $scope.messageDefinitions = JSON.parse($scope.property.value); + } + else { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.messageDefinitions = angular.copy($scope.property.value); + } + + } else { + $scope.messageDefinitions = []; + } + + // Array to contain selected mesage definitions (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedMessages = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var idPromise = $translate('PROPERTY.MESSAGEDEFINITIONS.ID'); + var namePromise = $translate('PROPERTY.MESSAGEDEFINITIONS.NAME'); + + $q.all([idPromise, namePromise]).then(function (results) { + + $scope.labels.idLabel = results[0]; + $scope.labels.nameLabel = results[1]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'messageDefinitions', + headerRowHeight: 28, + enableRowSelection: true, + enableRowHeaderSelection: false, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedMessages, + columnDefs: [ + {field: 'id', displayName: $scope.labels.idLabel}, + {field: 'name', displayName: $scope.labels.nameLabel}] + }; + }); + + // Click handler for add button + $scope.addNewMessageDefinition = function () { + var newMessageDefinition = {id: '', name: ''}; + + $scope.messageDefinitions.push(newMessageDefinition); + $timeout(function () { + $scope.gridOptions.selectItem($scope.messageDefinitions.length - 1, true); + }); + }; + + // Click handler for remove button + $scope.removeMessageDefinition = function () { + if ($scope.selectedMessages && $scope.selectedMessages.length > 0) { + var index = $scope.messageDefinitions.indexOf($scope.selectedMessages[0]); + $scope.gridOptions.selectItem(index, false); + $scope.messageDefinitions.splice(index, 1); + + $scope.selectedMessages.length = 0; + if (index < $scope.messageDefinitions.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.messageDefinitions.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for save button + $scope.save = function () { + + if ($scope.messageDefinitions.length > 0) { + $scope.property.value = $scope.messageDefinitions; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + // Close button handler + $scope.close = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + }]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-scope-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-scope-controller.js new file mode 100644 index 0000000..34e477c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-message-scope-controller.js @@ -0,0 +1,48 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +angular.module('activitiModeler').controller('ActivitiMessageRefCtrl', [ '$scope', function($scope) { + + // Find the parent shape on which the message definitions are defined + var messageDefinitionsProperty = undefined; + var parent = $scope.selectedShape; + while (parent !== null && parent !== undefined && messageDefinitionsProperty === undefined) { + if (parent.properties && parent.properties['oryx-messagedefinitions']) { + messageDefinitionsProperty = parent.properties['oryx-messagedefinitions']; + } else { + parent = parent.parent; + } + } + + try { + messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty); + if (typeof messageDefinitionsProperty == 'string') { + messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty); + } + } catch (err) { + // Do nothing here, just to be sure we try-catch it + } + + $scope.messageDefinitions = messageDefinitionsProperty; + + + $scope.messageChanged = function() { + $scope.updatePropertyInModel($scope.property); + }; +}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-multiinstance-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-multiinstance-controller.js new file mode 100644 index 0000000..7c1386d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-multiinstance-controller.js @@ -0,0 +1,34 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Execution listeners + */ + +var KisBpmMultiInstanceCtrl = [ '$scope', function($scope) { + + if ($scope.property.value == undefined && $scope.property.value == null) + { + $scope.property.value = 'None'; + } + + $scope.multiInstanceChanged = function() { + $scope.updatePropertyInModel($scope.property); + }; +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-out-parameters-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-out-parameters-controller.js new file mode 100644 index 0000000..dbac84a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-out-parameters-controller.js @@ -0,0 +1,158 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Input parameters for call activity + */ + +var KisBpmOutParametersCtrl = [ '$scope' , '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/out-parameters-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmOutParametersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.outParameters !== undefined + && $scope.property.value.outParameters !== null) { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.parameters = angular.copy($scope.property.value.outParameters); + } else { + $scope.parameters = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedParameters = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE'); + var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION'); + var targetPromise = $translate('PROPERTY.PARAMETER.TARGET'); + + $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function(results) { + $scope.labels.sourceLabel = results[0]; + $scope.labels.sourceExpressionLabel = results[1]; + $scope.labels.targetLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'parameters', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedParameters, + columnDefs: [{ field: 'source', displayName: $scope.labels.sourceLabel }, + { field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel }, + { field: 'target', displayName: $scope.labels.targetLabel }] + }; + }); + + // Click handler for add button + $scope.addNewParameter = function() { + $scope.parameters.push({ source : '', + sourceExpression : '', + target : ''}); + }; + + // Click handler for remove button + $scope.removeParameter = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + $scope.gridOptions.selectItem(index, false); + $scope.parameters.splice(index, 1); + + $scope.selectedParameters.length = 0; + if (index < $scope.parameters.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.parameters.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveParameterUp = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveParameterDown = function() { + if ($scope.selectedParameters.length > 0) { + var index = $scope.parameters.indexOf($scope.selectedParameters[0]); + if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.parameters[index]; + $scope.parameters.splice(index, 1); + $timeout(function(){ + $scope.parameters.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.parameters.length > 0) { + $scope.property.value = {}; + $scope.property.value.outParameters = $scope.parameters; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-sequenceflow-order-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-sequenceflow-order-controller.js new file mode 100644 index 0000000..c1a53b0 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-sequenceflow-order-controller.js @@ -0,0 +1,130 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Sequence flow order controller + */ + +var KisBpmSequenceFlowOrderCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/sequenceflow-order-popup.html?version=' + Date.now(), + scope: $scope + }; + + $modal(opts); +}]; + +var KisBpmSequenceFlowOrderPopupCtrl = ['$scope', '$translate', function($scope, $translate) { + + // Find the outgoing sequence flow of the current selected shape + var outgoingSequenceFlow = []; + var selectedShape = $scope.selectedShape; + if (selectedShape) { + var outgoingNodes = selectedShape.getOutgoingShapes(); + for (var i=0; i<outgoingNodes.length; i++) { + if (outgoingNodes[i].getStencil().title() === 'Sequence flow') { + var targetActivity = outgoingNodes[i].getTarget(); + // We need the resourceId of a sequence flow, not the id because that will change with every editor load + outgoingSequenceFlow.push({ + id : outgoingNodes[i].resourceId, + targetTitle : targetActivity.properties['oryx-name'], + targetType : targetActivity.getStencil().title() + }); + } + } + } else { + console.log('Programmatic error: no selected shape found'); + } + + // Now we can apply the order which was (possibly) previously saved + var orderedOutgoingSequenceFlow = []; + if ($scope.property.value && $scope.property.value.sequenceFlowOrder) { + + var sequenceFlowOrderList = $scope.property.value.sequenceFlowOrder; + + // Loop the list of sequence flow that was saved in the json model and match them with the outgoing sequence flow found above + for (var flowIndex=0; flowIndex < sequenceFlowOrderList.length; flowIndex++) { + + // find the sequence flow in the outgoing sequence flows. + + for (var outgoingFlowIndex=0; outgoingFlowIndex < outgoingSequenceFlow.length; outgoingFlowIndex++) { + if (outgoingSequenceFlow[outgoingFlowIndex].id === sequenceFlowOrderList[flowIndex]) { + orderedOutgoingSequenceFlow.push(outgoingSequenceFlow[outgoingFlowIndex]); + outgoingSequenceFlow.splice(outgoingFlowIndex, 1); + break; + } + } + } + + // Now all the matching sequence flow we're removed from the outgoing sequence flow list + // We can simply apply the remaining ones (these are new vs. the time when the values were saved to the model) + orderedOutgoingSequenceFlow = orderedOutgoingSequenceFlow.concat(outgoingSequenceFlow); + + } else { + orderedOutgoingSequenceFlow = outgoingSequenceFlow; + } + + // Now we can put it on the scope + $scope.outgoingSequenceFlow = orderedOutgoingSequenceFlow; + + // Move up click handler + $scope.moveUp = function(index) { + var temp = $scope.outgoingSequenceFlow[index]; + $scope.outgoingSequenceFlow[index] = $scope.outgoingSequenceFlow[index - 1]; + $scope.outgoingSequenceFlow[index - 1] = temp; + }; + + // Move down click handler + $scope.moveDown = function(index) { + var temp = $scope.outgoingSequenceFlow[index]; + $scope.outgoingSequenceFlow[index] = $scope.outgoingSequenceFlow[index + 1]; + $scope.outgoingSequenceFlow[index + 1] = temp; + }; + + // Save click handler + $scope.save = function() { + if ($scope.outgoingSequenceFlow.length > 0) { + $scope.property.value = {}; + $scope.property.value.sequenceFlowOrder = []; + + for (var flowIndex=0; flowIndex < $scope.outgoingSequenceFlow.length; flowIndex++) { + $scope.property.value.sequenceFlowOrder.push($scope.outgoingSequenceFlow[flowIndex].id); + } + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + // Cancel click handler + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-definitions-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-definitions-controller.js new file mode 100644 index 0000000..5581411 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-definitions-controller.js @@ -0,0 +1,136 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +angular.module('activitiModeler').controller('ActivitiSignalDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/signal-definitions-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]); + +//Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259 +// Will be fixed in a newer version of Angular UI +angular.module('activitiModeler').controller('ActivitiSignalDefinitionsPopupCtrl', + ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) { + + // Put json representing signal definitions on scope + if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) { + + if ($scope.property.value.constructor == String) { + $scope.signalDefinitions = JSON.parse($scope.property.value); + } + else { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.signalDefinitions = angular.copy($scope.property.value); + } + + } else { + $scope.signalDefinitions = []; + } + + // Array to contain selected signal definitions (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedSignals = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var idPromise = $translate('PROPERTY.SIGNALDEFINITIONS.ID'); + var namePromise = $translate('PROPERTY.SIGNALDEFINITIONS.NAME'); + var scopePromise = $translate('PROPERTY.SIGNALDEFINITIONS.SCOPE'); + + $q.all([idPromise, namePromise, scopePromise]).then(function (results) { + + $scope.labels.idLabel = results[0]; + $scope.labels.nameLabel = results[1]; + $scope.labels.scopeLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'signalDefinitions', + headerRowHeight: 28, + enableRowSelection: true, + enableRowHeaderSelection: false, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedSignals, + columnDefs: [ + {field: 'id', displayName: $scope.labels.idLabel}, + {field: 'name', displayName: $scope.labels.nameLabel}, + {field: 'scope', displayName: $scope.labels.scopeLabel}] + }; + }); + + // Click handler for add button + $scope.addNewSignalDefinition = function () { + var newSignalDefinition = {id: '', name: '', scope: 'global'}; + + $scope.signalDefinitions.push(newSignalDefinition); + $timeout(function () { + $scope.gridOptions.selectItem($scope.signalDefinitions.length - 1, true); + }); + }; + + // Click handler for remove button + $scope.removeSignalDefinition = function () { + if ($scope.selectedSignals && $scope.selectedSignals.length > 0) { + var index = $scope.signalDefinitions.indexOf($scope.selectedSignals[0]); + $scope.gridOptions.selectItem(index, false); + $scope.signalDefinitions.splice(index, 1); + + $scope.selectedSignals.length = 0; + if (index < $scope.signalDefinitions.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.signalDefinitions.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for save button + $scope.save = function () { + + if ($scope.signalDefinitions.length > 0) { + $scope.property.value = $scope.signalDefinitions; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + // Close button handler + $scope.close = function () { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + + }]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-scope-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-scope-controller.js new file mode 100644 index 0000000..fb97740 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-signal-scope-controller.js @@ -0,0 +1,47 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +angular.module('activitiModeler').controller('ActivitiSignalRefCtrl', [ '$scope', function($scope) { + + // Find the parent shape on which the signal definitions are defined + var signalDefinitionsProperty = undefined; + var parent = $scope.selectedShape; + while (parent !== null && parent !== undefined && signalDefinitionsProperty === undefined) { + if (parent.properties && parent.properties['oryx-signaldefinitions']) { + signalDefinitionsProperty = parent.properties['oryx-signaldefinitions']; + } else { + parent = parent.parent; + } + } + + try { + signalDefinitionsProperty = JSON.parse(signalDefinitionsProperty); + if (typeof signalDefinitionsProperty == 'string') { + signalDefinitionsProperty = JSON.parse(signalDefinitionsProperty); + } + } catch (err) { + // Do nothing here, just to be sure we try-catch it + } + + $scope.signalDefinitions = signalDefinitionsProperty; + + + $scope.signalChanged = function() { + $scope.updatePropertyInModel($scope.property); + }; +}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties-task-listeners-controller.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-task-listeners-controller.js new file mode 100644 index 0000000..33f2dfb --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties-task-listeners-controller.js @@ -0,0 +1,325 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Task listeners + */ + +var KisBpmTaskListenersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) { + + // Config for the modal window + var opts = { + template: 'editor-app/configuration/properties/task-listeners-popup.html?version=' + Date.now(), + scope: $scope + }; + + // Open the dialog + $modal(opts); +}]; + +var KisBpmTaskListenersPopupCtrl = [ '$scope', '$q', '$translate', function($scope, $q, $translate) { + + // Put json representing form properties on scope + if ($scope.property.value !== undefined && $scope.property.value !== null + && $scope.property.value.taskListeners !== undefined + && $scope.property.value.taskListeners !== null) { + + if ($scope.property.value.taskListeners.constructor == String) + { + $scope.taskListeners = JSON.parse($scope.property.value.taskListeners); + } + else + { + // Note that we clone the json object rather then setting it directly, + // this to cope with the fact that the user can click the cancel button and no changes should have happened + $scope.taskListeners = angular.copy($scope.property.value.taskListeners); + } + + for (var i = 0; i < $scope.taskListeners.length; i++) + { + var taskListener = $scope.taskListeners[i]; + if (taskListener.className !== undefined && taskListener.className !== '') + { + taskListener.implementation = taskListener.className; + } + else if (taskListener.expression !== undefined && taskListener.expression !== '') + { + taskListener.implementation = taskListener.expression; + } + else if (taskListener.delegateExpression !== undefined && taskListener.delegateExpression !== '') + { + taskListener.implementation = taskListener.delegateExpression; + } + } + } else { + $scope.taskListeners = []; + } + + // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough) + $scope.selectedListeners = []; + $scope.selectedFields = []; + $scope.translationsRetrieved = false; + + $scope.labels = {}; + + var eventPromise = $translate('PROPERTY.TASKLISTENERS.EVENT'); + var implementationPromise = $translate('PROPERTY.TASKLISTENERS.FIELDS.IMPLEMENTATION'); + var namePromise = $translate('PROPERTY.TASKLISTENERS.FIELDS.NAME'); + + $q.all([eventPromise, implementationPromise, namePromise]).then(function(results) { + $scope.labels.eventLabel = results[0]; + $scope.labels.implementationLabel = results[1]; + $scope.labels.nameLabel = results[2]; + $scope.translationsRetrieved = true; + + // Config for grid + $scope.gridOptions = { + data: 'taskListeners', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedListeners, + afterSelectionChange: function (rowItem, event) { + $scope.selectedFields.length = 0; + if ($scope.selectedListeners.length > 0) + { + var fields = $scope.selectedListeners[0].fields; + if (fields !== undefined && fields !== null) + { + for (var i = 0; i < fields.length; i++) + { + var field = fields[i]; + if (field.stringValue !== undefined && field.stringValue !== '') + { + field.implementation = field.stringValue; + } + else if (field.expression !== undefined && field.expression !== '') + { + field.implementation = field.expression; + } + else if (field.string !== undefined && field.string !== '') + { + field.implementation = field.string; + } + } + } + } + }, + columnDefs: [{ field: 'event', displayName: $scope.labels.eventLabel }, + { field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + + // Config for field grid + $scope.gridFieldOptions = { + data: 'selectedListeners[0].fields', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedFields, + columnDefs: [{ field: 'name', displayName: $scope.labels.name }, + { field: 'implementation', displayName: $scope.labels.implementationLabel}] + }; + }); + + $scope.listenerDetailsChanged = function() { + if ($scope.selectedListeners[0].className !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].className; + } + else if ($scope.selectedListeners[0].expression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].expression; + } + else if ($scope.selectedListeners[0].delegateExpression !== '') + { + $scope.selectedListeners[0].implementation = $scope.selectedListeners[0].delegateExpression; + } + else + { + $scope.selectedListeners[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewListener = function() { + $scope.taskListeners.push({ event : 'create', + implementation : '', + className : '', + expression: '', + delegateExpression: ''}); + }; + + // Click handler for remove button + $scope.removeListener = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.taskListeners.indexOf($scope.selectedListeners[0]); + $scope.gridOptions.selectItem(index, false); + $scope.taskListeners.splice(index, 1); + + $scope.selectedListeners.length = 0; + if (index < $scope.taskListeners.length) { + $scope.gridOptions.selectItem(index + 1, true); + } else if ($scope.taskListeners.length > 0) { + $scope.gridOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveListenerUp = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.taskListeners.indexOf($scope.selectedListeners[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.taskListeners[index]; + $scope.taskListeners.splice(index, 1); + $timeout(function(){ + $scope.taskListeners.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveListenerDown = function() { + if ($scope.selectedListeners.length > 0) { + var index = $scope.taskListeners.indexOf($scope.selectedListeners[0]); + if (index != $scope.taskListeners.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.taskListeners[index]; + $scope.taskListeners.splice(index, 1); + $timeout(function(){ + $scope.taskListeners.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + $scope.fieldDetailsChanged = function() { + if ($scope.selectedFields[0].stringValue != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].stringValue; + } + else if ($scope.selectedFields[0].expression != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].expression; + } + else if ($scope.selectedFields[0].string != '') + { + $scope.selectedFields[0].implementation = $scope.selectedFields[0].string; + } + else + { + $scope.selectedFields[0].implementation = ''; + } + }; + + // Click handler for add button + $scope.addNewField = function() { + if ($scope.selectedListeners.length > 0) + { + if ($scope.selectedListeners[0].fields == undefined) + { + $scope.selectedListeners[0].fields = []; + } + $scope.selectedListeners[0].fields.push({ name : 'fieldName', + implementation : '', + stringValue : '', + expression: '', + string: ''}); + } + }; + + // Click handler for remove button + $scope.removeField = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + $scope.gridFieldOptions.selectItem(index, false); + $scope.selectedListeners[0].fields.splice(index, 1); + + $scope.selectedFields.length = 0; + if (index < $scope.selectedListeners[0].fields.length) { + $scope.gridFieldOptions.selectItem(index + 1, true); + } else if ($scope.selectedListeners[0].fields.length > 0) { + $scope.gridFieldOptions.selectItem(index - 1, true); + } + } + }; + + // Click handler for up button + $scope.moveFieldUp = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != 0) { // If it's the first, no moving up of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + -1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for down button + $scope.moveFieldDown = function() { + if ($scope.selectedFields.length > 0) { + var index = $scope.selectedListeners[0].fields.indexOf($scope.selectedFields[0]); + if (index != $scope.selectedListeners[0].fields.length - 1) { // If it's the last element, no moving down of course + // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272 + var temp = $scope.selectedListeners[0].fields[index]; + $scope.selectedListeners[0].fields.splice(index, 1); + $timeout(function(){ + $scope.selectedListeners[0].fields.splice(index + 1, 0, temp); + }, 100); + + } + } + }; + + // Click handler for save button + $scope.save = function() { + + if ($scope.taskListeners.length > 0) { + $scope.property.value = {}; + $scope.property.value.taskListeners = $scope.taskListeners; + } else { + $scope.property.value = null; + } + + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; + + $scope.cancel = function() { + $scope.close(); + }; + + // Close button handler + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties.js b/src/main/resources/static/activiti-editor/editor-app/configuration/properties.js new file mode 100644 index 0000000..55727c6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties.js @@ -0,0 +1,99 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var KISBPM = KISBPM || {}; +KISBPM.PROPERTY_CONFIG = +{ + "string": { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/string-property-write-mode-template.html" + }, + "boolean": { + "templateUrl": "editor-app/configuration/properties/boolean-property-template.html" + }, + "text" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/text-property-write-template.html" + }, + "kisbpm-multiinstance" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/multiinstance-property-write-template.html" + }, + "oryx-formproperties-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/form-properties-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/form-properties-write-template.html" + }, + "oryx-executionlisteners-multiplecomplex": { + "readModeTemplateUrl": "editor-app/configuration/properties/execution-listeners-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/execution-listeners-write-template.html" + }, + "oryx-tasklisteners-multiplecomplex": { + "readModeTemplateUrl": "editor-app/configuration/properties/task-listeners-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/task-listeners-write-template.html" + }, + "oryx-eventlisteners-multiplecomplex": { + "readModeTemplateUrl": "editor-app/configuration/properties/event-listeners-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/event-listeners-write-template.html" + }, + "oryx-usertaskassignment-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/assignment-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/assignment-write-template.html" + }, + "oryx-servicetaskfields-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/fields-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/fields-write-template.html" + }, + "oryx-callactivityinparameters-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/in-parameters-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/in-parameters-write-template.html" + }, + "oryx-callactivityoutparameters-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/out-parameters-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/out-parameters-write-template.html" + }, + "oryx-subprocessreference-complex": { + "readModeTemplateUrl": "editor-app/configuration/properties/subprocess-reference-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/subprocess-reference-write-template.html" + }, + "oryx-sequencefloworder-complex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/sequenceflow-order-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/sequenceflow-order-write-template.html" + }, + "oryx-conditionsequenceflow-complex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/condition-expression-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/condition-expression-write-template.html" + }, + "oryx-signaldefinitions-multiplecomplex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/signal-definitions-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/signal-definitions-write-template.html" + }, + "oryx-signalref-string" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/signal-property-write-template.html" + }, + "oryx-messagedefinitions-multiplecomplex" : { + "readModeTemplateUrl": "editor-app/configuration/properties/message-definitions-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/message-definitions-write-template.html" + }, + "oryx-messageref-string" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/message-property-write-template.html" + } +}; diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-display-template.html new file mode 100644 index 0000000..40ab69d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-display-template.html @@ -0,0 +1,4 @@ +<span ng-if="property.value.assignment.assignee">{{'PROPERTY.ASSIGNMENT.ASSIGNEE_DISPLAY' | translate:property.value.assignment }} </span> +<span ng-if="property.value.assignment.candidateUsers.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY' | translate:property.value.assignment.candidateUsers}} </span> +<span ng-if="property.value.assignment.candidateGroups.length > 0">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY' | translate:property.value.assignment.candidateGroups}} </span> +<span ng-if="!property.value.assignment.assignee && (!property.value.assignment.candidateUsers || property.value.assignment.candidateUsers.length == 0) && (!property.value.assignment.candidateGroups || property.value.assignment.candidateGroups.length == 0)" translate>PROPERTY.ASSIGNMENT.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-popup.html new file mode 100644 index 0000000..e4b42b3 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-popup.html @@ -0,0 +1,44 @@ +<div class="modal" ng-controller="KisBpmAssignmentPopupCtrl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2 translate>PROPERTY.ASSIGNMENT.TITLE</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="form-group"> + <label for="assigneeField">{{'PROPERTY.ASSIGNMENT.ASSIGNEE' | translate}}</label> + <input type="text" id="assigneeField" class="form-control" ng-model="assignment.assignee" placeholder="{{'PROPERTY.ASSIGNMENT.ASSIGNEE_PLACEHOLDER' | translate}}" /> + </div> + </div> + + <div class="row row-no-gutter"> + <div class="form-group"> + <label for="userField">{{'PROPERTY.ASSIGNMENT.CANDIDATE_USERS' | translate}}</label> + <div ng-repeat="candidateUser in assignment.candidateUsers"> + <input id="userField" class="form-control" type="text" ng-model="candidateUser.value" /> + <i class="glyphicon glyphicon-minus clickable-property" ng-click="removeCandidateUserValue($index)"></i> + <i ng-if="$index == (assignment.candidateUsers.length - 1)" class="glyphicon glyphicon-plus clickable-property" ng-click="addCandidateUserValue($index)"></i> + </div> + </div> + + <div class="form-group"> + <label for="groupField">{{'PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS' | translate}}</label> + <div ng-repeat="candidateGroup in assignment.candidateGroups"> + <input id="groupField" class="form-control" type="text" ng-model="candidateGroup.value" /> + <i class="glyphicon glyphicon-minus clickable-property" ng-click="removeCandidateGroupValue($index)"></i> + <i ng-if="$index == (assignment.candidateGroups.length - 1)" class="glyphicon glyphicon-plus clickable-property" ng-click="addCandidateGroupValue($index)"></i> + </div> + </div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="close()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-write-template.html new file mode 100644 index 0000000..b498b3d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/assignment-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmAssignmentCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/boolean-property-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/boolean-property-template.html new file mode 100644 index 0000000..836dcaa --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/boolean-property-template.html @@ -0,0 +1,4 @@ + +<div ng-controller="KisBpmBooleanPropertyCtrl"> + <input type="checkbox" ng-model="property.value" ng-change="changeValue()"/> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-display-template.html new file mode 100644 index 0000000..37eef24 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-display-template.html @@ -0,0 +1,2 @@ +<span ng-if="property.value">{{property.value|limitTo:20}}</span> +<span ng-if="!property.value">{{'PROPERTY.SEQUENCEFLOW.CONDITION.NO-CONDITION-DISPLAY' | translate}}</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-popup.html new file mode 100644 index 0000000..eea2bda --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-popup.html @@ -0,0 +1,29 @@ + +<div class="modal" ng-controller="KisBpmConditionExpressionPopupCtrl"> +<div class="modal-dialog"> +<div class="modal-content"> +<div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2 translate>PROPERTY.SEQUENCEFLOW.CONDITION.TITLE</h2> +</div> +<div class="modal-body"> + + <div class="detail-group clearfix"> + + <div class="form-group clearfix"> + <div class="col-xs-12"> + <label class="col-xs-3">{{'PROPERTY.SEQUENCEFLOW.CONDITION.STATIC' | translate}}</label> + <div class="col-xs-9"> + <textarea class="form-control" ng-model="conditionExpression.value" style="width:90%; height:100%; max-width: 100%; max-height: 100%; min-height: 100px"/> + </div> + </div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="close()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> +</div> +</div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-write-template.html new file mode 100644 index 0000000..83c64e6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/condition-expression-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmConditionExpressionCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/default-value-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/default-value-display-template.html new file mode 100644 index 0000000..875548c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/default-value-display-template.html @@ -0,0 +1,4 @@ + +<span ng-if="!property.noValue">{{property.value|limitTo:20}}</span> +<span ng-if="!property.noValue && property.value != null && property.value.length > 20">...</span> +<span ng-if="property.noValue" translate>PROPERTY.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-display-template.html new file mode 100644 index 0000000..cfc375d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.EVENTLISTENERS.DISPLAY' | translate:property.value.eventListeners}}</span> +<span ng-if="property.noValue" translate>PROPERTY.EVENTLISTENERS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-popup.html new file mode 100644 index 0000000..36049d2 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-popup.html @@ -0,0 +1,115 @@ + +<div class="modal" ng-controller="KisBpmEventListenersPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-10"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewListener()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeListener()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + </div> + + <div class="row row-no-gutter"> + <div ng-if="translationsRetrieved" ng-show="selectedListeners.length > 0" class="col-xs-6"> + <div class="form-group"> + <label for="userField">{{'PROPERTY.EVENTLISTENERS.EVENTS' | translate}}</label> + <div ng-repeat="eventDefinition in selectedListeners[0].events"> + <select id="eventField" class="form-control" ng-model="eventDefinition.event" ng-change="listenerDetailsChanged()"> + <option title="{{'EVENT_TYPE.ACTIVITY.COMPENSATE.TOOLTIP' | translate}}">ACTIVITY_COMPENSATE</option> + <option title="{{'EVENT_TYPE.ACTIVITY.COMPLETED.TOOLTIP' | translate}}">ACTIVITY_COMPLETED</option> + <option title="bla">ACTIVITY_ERROR_RECEIVED</option> + <option>ACTIVITY_MESSAGE_RECEIVED</option> + <option>ACTIVITY_SIGNALED</option> + <option>ACTIVITY_STARTED</option> + <option>ENGINE_CLOSED</option> + <option>ENGINE_CREATED</option> + <option>ENTITY_ACTIVATED</option> + <option>ENTITY_CREATED</option> + <option>ENTITY_DELETED</option> + <option>ENTITY_INITIALIZED</option> + <option>ENTITY_SUSPENDED</option> + <option>ENTITY_UPDATED</option> + <option>JOB_EXECUTION_FAILURE</option> + <option>JOB_EXECUTION_SUCCESS</option> + <option>JOB_RETRIES_DECREMENTED</option> + <option title="{{'EVENT_TYPE.MEMBERSHIP.CREATED.TOOLTIP' | translate}}">MEMBERSHIP_CREATED</option> + <option title="{{'EVENT_TYPE.MEMBERSHIP.DELETED.TOOLTIP' | translate}}">MEMBERSHIP_DELETED</option> + <option title="{{'EVENT_TYPE.MEMBERSHIPS.DELETED.TOOLTIP' | translate}}">MEMBERSHIPS_DELETED</option> + <option title="{{'EVENT_TYPE.TASK.ASSIGNED.TOOLTIP' | translate}}">TASK_ASSIGNED</option> + <option title="{{'EVENT_TYPE.TASK.COMPLETED.TOOLTIP' | translate}}">TASK_COMPLETED</option> + <option>TIMER_FIRED</option> + <option title="{{'EVENT_TYPE.UNCAUGHT.BPMNERROR.TOOLTIP' | translate}}">UNCAUGHT_BPMN_ERROR</option> + <option title="{{'EVENT_TYPE.VARIABLE.CREATED.TOOLTIP' | translate}}">VARIABLE_CREATED</option> + <option title="{{'EVENT_TYPE.VARIABLE.DELETED.TOOLTIP' | translate}}">VARIABLE_DELETED</option> + <option title="{{'EVENT_TYPE.VARIABLE.UPDATED.TOOLTIP' | translate}}">VARIABLE_UPDATED</option> + </select> + <i ng-if="$index > 0" class="glyphicon glyphicon-minus clickable-property" ng-click="removeEventValue($index)"></i> + <i class="glyphicon glyphicon-plus clickable-property" ng-click="addEventValue($index)"></i> + </div> + <div class="form-group"> + <label for="classField">{{'PROPERTY.EVENTLISTENERS.RETHROW' | translate}}</label> + <input type="checkbox" id="rethrowField" class="form-control" ng-model="selectedListeners[0].rethrowEvent" ng-change="listenerDetailsChanged()" /> + </div> + </div> + </div> + <div ng-show="selectedListeners.length > 0 && selectedListeners[0].events[0].event" class="col-xs-6"> + <div class="form-group" ng-if="!selectedListeners[0].rethrowEvent"> + <label for="classField">{{'PROPERTY.EVENTLISTENERS.CLASS' | translate}}</label> + <input type="text" id="classField" class="form-control" ng-model="selectedListeners[0].className" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EVENTLISTENERS.CLASS.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group" ng-if="!selectedListeners[0].rethrowEvent"> + <label for="delegateExpressionField">{{'PROPERTY.EVENTLISTENERS.DELEGATEEXPRESSION' | translate}}</label> + <input type="text" id="delegateExpressionField" class="form-control" ng-model="selectedListeners[0].delegateExpression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EVENTLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group" ng-if="!selectedListeners[0].rethrowEvent"> + <label for="entityTypeField">{{'PROPERTY.EVENTLISTENERS.ENTITYTYPE' | translate}}</label> + <input type="text" id="entityTypeField" class="form-control" ng-model="selectedListeners[0].entityType" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EVENTLISTENERS.ENTITYTYPE.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group" ng-if="selectedListeners[0].rethrowEvent"> + <label for="delegateExpressionField">{{'PROPERTY.EVENTLISTENERS.RETHROWTYPE' | translate}}</label> + <select id="rethrowTypeField" class="form-control" ng-model="selectedListeners[0].rethrowType" ng-change="rethrowTypeChanged()"> + <option>error</option> + <option>message</option> + <option>signal</option> + <option>globalSignal</option> + </select> + </div> + <div class="form-group" ng-if="selectedListeners[0].rethrowType === 'error'"> + <label for="errorCodeField">{{'PROPERTY.EVENTLISTENERS.ERRORCODE' | translate}}</label> + <input type="text" id="errorCodeField" class="form-control" ng-model="selectedListeners[0].errorcode" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EVENTLISTENERS.ERRORCODE.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group" ng-if="selectedListeners[0].rethrowType === 'message'"> + <label for="messageNameField">{{'PROPERTY.EVENTLISTENERS.MESSAGENAME' | translate}}</label> + <input type="text" id="messageNameField" class="form-control" ng-model="selectedListeners[0].messagename" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EVENTLISTENERS.MESSAGENAME.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group" ng-if="selectedListeners[0].rethrowType === 'signal' || selectedListeners[0].rethrowType === 'globalSignal'"> + <label for="messageNameField">{{'PROPERTY.EVENTLISTENERS.SIGNALNAME' | translate}}</label> + <input type="text" id="signalNameField" class="form-control" ng-model="selectedListeners[0].signalname" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EVENTLISTENERS.SIGNALNAME.PLACEHOLDER' | translate}}" /> + </div> + </div> + <div ng-show="selectedListeners.length == 0" class="col-xs-6 muted no-property-selected" translate>PROPERTY.EVENTLISTENERS.UNSELECTED</div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-write-template.html new file mode 100644 index 0000000..7bb40f7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/event-listeners-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmEventListenersCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-display-template.html new file mode 100644 index 0000000..6637400 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.EXECUTIONLISTENERS.DISPLAY' | translate:property.value.executionListeners}}</span> +<span ng-if="property.noValue" translate>PROPERTY.EXECUTIONLISTENERS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-popup.html new file mode 100644 index 0000000..1b38a19 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-popup.html @@ -0,0 +1,101 @@ + +<div class="modal" ng-controller="KisBpmExecutionListenersPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewListener()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeListener()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedListeners.length > 0"> + + <div class="form-group"> + <label for="eventField">{{'PROPERTY.EXECUTIONLISTENERS.EVENT' | translate}}</label> + <select id="eventField" class="form-control" ng-model="selectedListeners[0].event"> + <option>start</option> + <option>end</option> + <option>take</option> + </select> + </div> + <div class="form-group"> + <label for="classField">{{'PROPERTY.EXECUTIONLISTENERS.CLASS' | translate}}</label> + <input type="text" id="classField" class="form-control" ng-model="selectedListeners[0].className" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.CLASS.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.EXECUTIONLISTENERS.EXPRESSION' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedListeners[0].expression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.EXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="delegateExpressionField">{{'PROPERTY.EXECUTIONLISTENERS.DELEGATEEXPRESSION' | translate}}</label> + <input type="text" id="delegateExpressionField" class="form-control" ng-model="selectedListeners[0].delegateExpression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + </div> + <div ng-show="selectedListeners.length == 0" class="muted no-property-selected" translate>PROPERTY.EXECUTIONLISTENERS.UNSELECTED</div> + </div> + </div> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-field-grid" ng-grid="gridFieldOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewField()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeField()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedFields.length > 0"> + + <div class="form-group"> + <label for="nameField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME' | translate}}</label> + <input type="text" id="nameField" class="form-control" ng-model="selectedFields[0].name" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="stringValueField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRINGVALUE' | translate}}</label> + <input type="text" id="stringValueField" class="form-control" ng-model="selectedFields[0].stringValue" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRINGVALUE.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.EXPRESSION' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedFields[0].expression" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.EXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="stringField">{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRING' | translate}}</label> + <textarea id="stringField" class="form-control" ng-model="selectedFields[0].string" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.EXECUTIONLISTENERS.FIELDS.STRING.PLACEHOLDER' | translate}}"></textarea> + </div> + + </div> + <div ng-show="selectedFields.length == 0" class="muted no-property-selected"translate>PROPERTY.EXECUTIONLISTENERS.FIELDS.EMPTY</div> + </div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-write-template.html new file mode 100644 index 0000000..55a0a52 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/execution-listeners-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmExecutionListenersCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/feedback-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/feedback-popup.html new file mode 100644 index 0000000..17b9126 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/feedback-popup.html @@ -0,0 +1,17 @@ + +<div class="modal" ng-controller="BpmnFeedbackPopupCtrl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h2>{{'PROPERTY.FEEDBACK.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + <p><textarea auto-focus class="form-control" ng-model="model.feedback" style="width:90%; height:100%; max-width: 100%; max-height: 100%; min-height: 300px"/></p> + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate >ACTION.CANCEL</button> + <button ng-click="send()" ng-disabled="model.feedback.length === 0" class="btn btn-primary" translate >ACTION.SEND</button> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-display-template.html new file mode 100644 index 0000000..64af8a0 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.FIELDS' | translate:property.value.fields}}</span> +<span ng-if="property.noValue">{{'PROPERTY.FIELDS.EMPTY' | translate}}</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-popup.html new file mode 100644 index 0000000..5f38bf2 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-popup.html @@ -0,0 +1,61 @@ + +<div class="modal" ng-controller="KisBpmFieldsPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h3>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h3> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a href="#" class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a href="#" class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a href="#" class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewField()"><i class="glyphicon glyphicon-plus"></i></a> + <a href="#" class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeField()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedFields.length > 0"> + + <div class="form-group"> + <label for="fieldName">{{'PROPERTY.FIELDS.NAME' | translate}}</label> + <input type="text" id="fieldName" class="form-control" ng-model="selectedFields[0].name" placeholder="{{'PROPERTY.FIELDS.NAME.PLACEHOLDER' | translate}}" /> + </div> + + <div class="form-group"> + <label for="fieldStringValue">{{'PROPERTY.FIELDS.STRINGVALUE' | translate}}</label> + <input type="text" id="fieldStringValue" class="form-control" ng-model="selectedFields[0].stringValue" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.FIELDS.STRINGVALUE.PLACEHOLDER' | translate}}" /> + </div> + + <div class="form-group"> + <label for="fieldExpression">{{'PROPERTY.FIELDS.EXPRESSION' | translate}}</label> + <input type="text" id="fieldExpression" class="form-control" ng-model="selectedFields[0].expression" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.FIELDS.EXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + + <div class="form-group"> + <label for="fieldString">{{'PROPERTY.FIELDS.STRING' | translate}}</label> + <textarea type="text" id="fieldString" class="form-control" ng-model="selectedFields[0].string" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.FIELDS.STRING.PLACEHOLDER' | translate}}"></textarea> + </div> + + </div> + <div ng-show="selectedFields.length == 0" class="muted no-property-selected" translate>PROPERTY.FIELDS.EMPTY</div> + </div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-write-template.html new file mode 100644 index 0000000..da9489e --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/fields-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmFieldsCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-display-template.html new file mode 100644 index 0000000..1274342 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.FORMPROPERTIES.VALUE' | translate:property.value.formProperties}}</span> +<span ng-if="property.noValue" translate>PROPERTY.FORMPROPERTIES.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-popup.html new file mode 100644 index 0000000..410ad53 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-popup.html @@ -0,0 +1,117 @@ + +<div class="modal" ng-controller="KisBpmFormPropertiesPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="default-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="movePropertyUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="movePropertyDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewProperty()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeProperty()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedProperties.length > 0"> + + <div class="form-group"> + <label for="idField">{{'PROPERTY.FORMPROPERTIES.ID' | translate}}</label> + <input id="idField" class="form-control" type="text" ng-model="selectedProperties[0].id" placeholder="{{'PROPERTY.FORMPROPERTIES.ID.PLACEHOLDER' | translate }}" /> + </div> + <div class="form-group"> + <label for="nameField">{{'PROPERTY.FORMPROPERTIES.NAME' | translate}}</label> + <input id="nameField" class="form-control" type="text" ng-model="selectedProperties[0].name" placeholder="{{'PROPERTY.FORMPROPERTIES.NAME.PLACEHOLDER' | translate }}" /> + </div> + <div class="form-group"> + <label for="typeField">{{'PROPERTY.FORMPROPERTIES.TYPE' | translate}}</label> + <select id="typeField" class="form-control" ng-model="selectedProperties[0].type" ng-change="propertyTypeChanged()"> + <option>string</option> + <option>long</option> + <option>boolean</option> + <option>date</option> + <option>enum</option> + </select> + </div> + <div class="form-group" ng-show="selectedProperties[0].datePattern"> + <label for="datePatternField">{{'PROPERTY.FORMPROPERTIES.DATEPATTERN' | translate}}</label> + <input id="datePatternField" class="form-control" type="text" ng-model="selectedProperties[0].datePattern" placeholder="{{'PROPERTY.FORMPROPERTIES.DATEPATTERN.PLACEHOLDER' | translate }}" /> + </div> + <div ng-if="selectedProperties[0].type == 'enum'" style="padding-bottom:10px"> + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="enumGridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveEnumValueUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveEnumValueDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewEnumValue()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeEnumValue()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedEnumValues.length > 0"> + + <div class="form-group"> + <label for="classField">{{'PROPERTY.FORMPROPERTIES.VALUES.ID' | translate}}</label> + <input type="text" id="classField" class="form-control" ng-model="selectedEnumValues[0].id" placeholder="{{'PROPERTY.FORMPROPERTIES.VALUES.ID.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="classField">{{'PROPERTY.FORMPROPERTIES.VALUES.NAME' | translate}}</label> + <input type="text" id="classField" class="form-control" ng-model="selectedEnumValues[0].name" placeholder="{{'PROPERTY.FORMPROPERTIES.VALUES.NAME.PLACEHOLDER' | translate}}" /> + </div> + </div> + <div ng-show="selectedEnumValues.length == 0" class="muted no-property-selected" translate>PROPERTY.FORMPROPERTIES.ENUMVALUES.EMPTY</div> + </div> + </div> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.FORMPROPERTIES.EXPRESSION' | translate}}</label> + <input id="expressionField" class="form-control" type="text" ng-model="selectedProperties[0].expression" placeholder="{{'PROPERTY.FORMPROPERTIES.EXPRESSION.PLACEHOLDER' | translate }}" /> + </div> + <div class="form-group"> + <label for="variableField">{{'PROPERTY.FORMPROPERTIES.VARIABLE' | translate}}</label> + <input id="variableField" class="form-control" type="text" ng-model="selectedProperties[0].variable" placeholder="{{'PROPERTY.FORMPROPERTIES.VARIABLE.PLACEHOLDER' | translate }}" /> + </div> + <div class="form-inline"> + <div class="form-group col-xs-2" > + <label for="requiredField">{{'PROPERTY.FORMPROPERTIES.REQUIRED' | translate}}</label> + <input id="requiredField" class="form-control" type="checkbox" ng-model="selectedProperties[0].required" /> + </div> + <div class="form-group col-xs-2"> + <label for="readableField">{{'PROPERTY.FORMPROPERTIES.READABLE' | translate}}</label> + <input id="readableField" class="form-control" type="checkbox" ng-model="selectedProperties[0].readable" /> + </div> + <div class="form-group col-xs-2"> + <label for="writableField">{{'PROPERTY.FORMPROPERTIES.WRITABLE' | translate}}</label> + <input id="writableField" class="form-control" type="checkbox" ng-model="selectedProperties[0].writable" /> + </div> + </div> + </div> + <div ng-show="selectedProperties.length == 0" class="muted no-property-selected" translate>PROPERTY.FORMPROPERTIES.EMPTY</div> + </div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-write-template.html new file mode 100644 index 0000000..c9f49c7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/form-properties-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmFormPropertiesCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-display-template.html new file mode 100644 index 0000000..961e637 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.INPARAMETERS.VALUE' | translate:property.value.inParameters}}</span> +<span ng-if="property.noValue" translate>PROPERTY.INPARAMETERS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-popup.html new file mode 100644 index 0000000..879ab94 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-popup.html @@ -0,0 +1,53 @@ + +<div class="modal" ng-controller="KisBpmInParametersPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewParameter()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="removeParameter()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedParameters.length > 0"> + + <div class="form-group"> + <label for="sourceField">{{'PROPERTY.PARAMETER.SOURCE' | translate}}</label> + <input type="text" id="sourceField" class="form-control" ng-model="selectedParameters[0].source" placeholder="{{'PROPERTY.PARAMETER.SOURCE.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.PARAMETER.SOURCEEXPRESSION' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedParameters[0].sourceExpression" placeholder="{{'PROPERTY.PARAMETER.SOURCEEXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.PARAMETER.TARGET' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedParameters[0].target" placeholder="{{'PROPERTY.PARAMETER.TARGET.PLACEHOLDER' | translate}}" /> + </div> + + </div> + <div ng-show="selectedParameters.length == 0" class="muted no-property-selected" translate>PROPERTY.PARAMETER.EMPTY</div> + </div> + </div> + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-write-template.html new file mode 100644 index 0000000..658e782 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/in-parameters-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmInParametersCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-display-template.html new file mode 100644 index 0000000..2f3b2a1 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-display-template.html @@ -0,0 +1,2 @@ +<span ng-if="!property.noValue">{{'PROPERTY.MESSAGEDEFINITIONS.DISPLAY' | translate:property.value}}</span> +<span ng-if="property.noValue" translate>PROPERTY.MESSAGEDEFINITIONS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-popup.html new file mode 100644 index 0000000..700f4d9 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-popup.html @@ -0,0 +1,50 @@ + +<div class="modal" ng-controller="ActivitiMessageDefinitionsPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + + <div class="modal-body"> + + <div class="row row-no-gutter"> + + <div class="col-xs-8"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewMessageDefinition()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeMessageDefinition()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-4" ng-show="selectedMessages && selectedMessages.length > 0"> + + <div class="form-group"> + <label>{{'PROPERTY.MESSAGEDEFINITIONS.ID' | translate}}</label> + <input type="text" class="form-control" ng-model="selectedMessages[0].id"> + </div> + + <div class="form-group"> + <label>{{'PROPERTY.MESSAGEDEFINITIONS.NAME' | translate}}</label> + <input type="text" class="form-control" ng-model="selectedMessages[0].name"> + </div> + + </div> + + </div> + + </div> + + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-write-template.html new file mode 100644 index 0000000..75a630f --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-definitions-write-template.html @@ -0,0 +1,3 @@ +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="ActivitiMessageDefinitionsCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-property-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-property-write-template.html new file mode 100644 index 0000000..03dc9e4 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/message-property-write-template.html @@ -0,0 +1,4 @@ +<div ng-controller="ActivitiMessageRefCtrl"> + <select ng-model="property.value" ng-change="messageChanged()" ng-options="messageDefinition.id as (messageDefinition.name + ' (' + messageDefinition.id + ')') for messageDefinition in messageDefinitions"> + </select> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/multiinstance-property-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/multiinstance-property-write-template.html new file mode 100644 index 0000000..a76fe5c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/multiinstance-property-write-template.html @@ -0,0 +1,8 @@ + +<div ng-controller="KisBpmMultiInstanceCtrl"> + <select ng-model="property.value" ng-change="multiInstanceChanged()"> + <option>None</option> + <option>Parallel</option> + <option>Sequential</option> + </select> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-display-template.html new file mode 100644 index 0000000..859b2e4 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.OUTPARAMETERS.VALUE' | translate:property.value.outParameters}}</span> +<span ng-if="property.noValue" translate>PROPERTY.OUTPARAMETERS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-popup.html new file mode 100644 index 0000000..72b3656 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-popup.html @@ -0,0 +1,53 @@ + +<div class="modal" ng-controller="KisBpmOutParametersPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.UP' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.MOVE.DOWN' | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveParameterDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.ADD' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewParameter()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{'ACTION.REMOVE' | translate:property}}" data-placement="bottom" data-original-title="" title="" ng-click="removeParameter()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedParameters.length > 0"> + + <div class="form-group"> + <label for="sourceField">{{'PROPERTY.PARAMETER.SOURCE' | translate}}</label> + <input type="text" id="sourceField" class="form-control" ng-model="selectedParameters[0].source" placeholder="{{'PROPERTY.PARAMETER.SOURCE.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.PARAMETER.SOURCEEXPRESSION' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedParameters[0].sourceExpression" placeholder="{{'PROPERTY.PARAMETER.SOURCEEXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.PARAMETER.TARGET' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedParameters[0].target" placeholder="{{'PROPERTY.PARAMETER.TARGET.PLACEHOLDER' | translate}}" /> + </div> + + </div> + <div ng-show="selectedParameters.length == 0" class="muted no-property-selected" translate>PROPERTY.PARAMETER.EMPTY</div> + </div> + </div> + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-write-template.html new file mode 100644 index 0000000..4075594 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/out-parameters-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmOutParametersCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-display-template.html new file mode 100644 index 0000000..90f50e9 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue" translate>PROPERTY.SEQUENCEFLOW.ORDER.NOT.EMPTY</span> +<span ng-if="property.noValue" translate>PROPERTY.SEQUENCEFLOW.ORDER.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-popup.html new file mode 100644 index 0000000..30d3d77 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-popup.html @@ -0,0 +1,47 @@ + +<div class="modal" ng-controller="KisBpmSequenceFlowOrderPopupCtrl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h3>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h3> + </div> + + <div class="modal-body"> + + <div translate>PROPERTY.SEQUENCEFLOW.ORDER.DESCRIPTION</div> + <br/> + <ol> + <li class="sequence-flow-order-element" ng-repeat="sequenceFlow in outgoingSequenceFlow"> + {{'PROPERTY.SEQUENCEFLOW.ORDER.SEQUENCEFLOW.VALUE' | translate:sequenceFlow}} + <a class="btn btn-icon btn-sm" + rel="tooltip" + data-title="{{'ACTION.MOVE.UP' | translate}}" + data-placement="bottom" + data-original-title="" title="" + ng-click="moveUp($index)" + ng-if="$index > 0"> + <i class="glyphicon glyphicon-arrow-up"></i> + </a> + <a class="btn btn-icon btn-sm" + rel="tooltip" + data-title="{{'ACTION.MOVE.DOWN' | translate}}" + data-placement="bottom" + data-original-title="" + title="" + ng-click="moveDown($index)" + ng-if="$index < outgoingSequenceFlow.length - 1"> + <i class="glyphicon glyphicon-arrow-down"></i> + </a> + </li> + </ol> + + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-write-template.html new file mode 100644 index 0000000..2e2ca3a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/sequenceflow-order-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmSequenceFlowOrderCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-display-template.html new file mode 100644 index 0000000..7fa105b --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.SIGNALDEFINITIONS.DISPLAY' | translate:property.value}}</span> +<span ng-if="property.noValue" translate>PROPERTY.SIGNALDEFINITIONS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-popup.html new file mode 100644 index 0000000..4ca3283 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-popup.html @@ -0,0 +1,58 @@ + +<div class="modal" ng-controller="ActivitiSignalDefinitionsPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + + <div class="modal-body"> + + <div class="row row-no-gutter"> + + <div class="col-xs-8"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewSignalDefinition()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeSignalDefinition()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-4" ng-show="selectedSignals && selectedSignals.length > 0"> + + <div class="form-group"> + <label>{{'PROPERTY.SIGNALDEFINITIONS.ID' | translate}}</label> + <input type="text" class="form-control" ng-model="selectedSignals[0].id"> + </div> + + <div class="form-group"> + <label>{{'PROPERTY.SIGNALDEFINITIONS.NAME' | translate}}</label> + <input type="text" class="form-control" ng-model="selectedSignals[0].name"> + </div> + + <div class="form-group"> + <label>{{'PROPERTY.SIGNALDEFINITIONS.SCOPE' | translate}}</label> + <select class="form-control" ng-model="selectedSignals[0].scope"> + <option value="global">{{'PROPERTY.SIGNALDEFINITIONS.SCOPE-GLOBAL' | translate}}</option> + <option value="processInstance">{{'PROPERTY.SIGNALDEFINITIONS.SCOPE-PROCESSINSTANCE' | translate}}</option> + </select> + </div> + + </div> + + </div> + + </div> + + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-write-template.html new file mode 100644 index 0000000..2282b4c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-definitions-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="ActivitiSignalDefinitionsCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-property-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-property-write-template.html new file mode 100644 index 0000000..7505d81 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/signal-property-write-template.html @@ -0,0 +1,4 @@ +<div ng-controller="ActivitiSignalRefCtrl"> + <select ng-model="property.value" ng-change="signalChanged()" ng-options="signalDefinition.id as (signalDefinition.name + ' (' + signalDefinition.id + ')') for signalDefinition in signalDefinitions"> + </select> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/string-property-write-mode-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/string-property-write-mode-template.html new file mode 100644 index 0000000..4fd2d73 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/string-property-write-mode-template.html @@ -0,0 +1,8 @@ + +<div ng-controller="KisBpmStringPropertyCtrl"> + <input type="text" ng-model="property.value" + class="form-control" + auto-focus + ng-blur="inputBlurred()" + ng-keypress="enterPressed($event)"/> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-display-template.html new file mode 100644 index 0000000..9889ea9 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="property.value.name">{{property.value.name}}</span> +<span ng-if="!property.value || !property.value.name" translate>PROPERTY.SUBPROCESSREFERENCE.EMPTY</span> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-popup.html new file mode 100644 index 0000000..818eb1a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-popup.html @@ -0,0 +1,43 @@ + +<div class="modal" ng-controller="KisBpmCollapsedSubprocessReferencePopupCrtl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2> + {{'PROPERTY.SUBPROCESSREFERENCE.TITLE' | translate}} + <span ng-show="selectedSubProcess != null"> - {{selectedSubProcess.name}}</span> + <span ng-show="selectedSubProcess == null"> - {{'PROPERTY.SUBPROCESSREFERENCE.EMPTY' | translate}}</span> + + </h2> + </div> + <div class="modal-body"> + <div class="detail-group clearfix"> + <div class="col-xs-12"> + <div class="alert alert-error" ng-show="(!state.loadingFolders && !state.loadingSubprocesses) && state.subprocessError" translate>PROPERTY.SUBPROCESSREFERENCE.ERROR.SUBPROCESS</div> + </div> + </div> + <div class="detail-group clearfix"> + <div class="col-xs-12 editor-item-picker"> + <div ng-if="!state.loadingSubprocesses && !state.subprocessError" class="col-xs-4 editor-item-picker-component" ng-repeat="sub in subProcesses" ng-class="{'selected' : sub.id == selectedSubProcess.id}" ng-click="selectSubProcess(sub, $event)"> + <div class="controls"> + <input type="checkbox" value="option1" ng-click="selectSubProcess(sub, $event)" ng-checked="sub.id == selectedSubProcess.id" /> + </div> + <h4>{{sub.name}}</h4> + <img src="{{config.contextRoot}}/app/rest/models/{{sub.id}}/thumbnail" /> + </div> + <div ng-show="state.loadingSubprocesses"> + <p class="loading" translate>PROPERTY.SUBPROCESSREFERENCE.SUBPROCESS.LOADING</p> + </div> + <div ng-show="!state.loadingSubprocesses && subProcesses.length == 0"> + <p translate>PROPERTY.SUBPROCESSREFERENCE.SUBPROCESS.EMPTY</p> + </div> + </div> + </div> + </div> + <div class="modal-footer"> + <button ng-disabled="state.subprocessError" ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-write-template.html new file mode 100644 index 0000000..e9ad8ad --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/subprocess-reference-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmCollapsedSubprocessReferenceCrtl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-display-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-display-template.html new file mode 100644 index 0000000..4d07171 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-display-template.html @@ -0,0 +1,3 @@ + +<span ng-if="!property.noValue">{{'PROPERTY.TASKLISTENERS.VALUE' | translate:property.value.taskListeners}}</span> +<span ng-if="property.noValue" translate>PROPERTY.TASKLISTENERS.EMPTY</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-popup.html new file mode 100644 index 0000000..7d83e57 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-popup.html @@ -0,0 +1,102 @@ + +<div class="modal" ng-controller="KisBpmTaskListenersPopupCtrl"> + <div class="modal-dialog modal-wide"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h2> + </div> + <div class="modal-body"> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-listener-grid" ng-grid="gridOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveListenerDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewListener()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeListener()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedListeners.length > 0"> + + <div class="form-group"> + <label for="eventField">{{'PROPERTY.TASKLISTENERS.EVENT' | translate}}</label> + <select id="eventField" class="form-control" ng-model="selectedListeners[0].event"> + <option>create</option> + <option>assignment</option> + <option>complete</option> + <option>delete</option> + </select> + </div> + <div class="form-group"> + <label for="classField">{{'PROPERTY.TASKLISTENERS.CLASS' | translate}}</label> + <input type="text" id="classField" class="form-control" ng-model="selectedListeners[0].className" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.TASKLISTENERS.CLASS.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.TASKLISTENERS.EXPRESSION' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedListeners[0].expression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.TASKLISTENERS.EXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="delegateExpressionField">{{'PROPERTY.TASKLISTENERS.DELEGATEEXPRESSION' | translate}}</label> + <input type="text" id="delegateExpressionField" class="form-control" ng-model="selectedListeners[0].delegateExpression" ng-change="listenerDetailsChanged()" placeholder="{{'PROPERTY.TASKLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + </div> + <div ng-show="selectedListeners.length == 0" class="muted no-property-selected" translate>PROPERTY.TASKLISTENERS.UNSELECTED</div> + </div> + </div> + + <div class="row row-no-gutter"> + <div class="col-xs-6"> + <div ng-if="translationsRetrieved" class="kis-field-grid" ng-grid="gridFieldOptions"></div> + <div class="pull-right"> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.UP | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldUp()"><i class="glyphicon glyphicon-arrow-up"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.MOVE.DOWN | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="moveFieldDown()"><i class="glyphicon glyphicon-arrow-down"></i></a> + </div> + <div class="btn-group"> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.ADD | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="addNewField()"><i class="glyphicon glyphicon-plus"></i></a> + <a class="btn btn-icon btn-lg" rel="tooltip" data-title="{{ACTION.REMOVE | translate}}" data-placement="bottom" data-original-title="" title="" ng-click="removeField()"><i class="glyphicon glyphicon-minus"></i></a> + </div> + </div> + </div> + + <div class="col-xs-6"> + <div ng-show="selectedFields.length > 0"> + + <div class="form-group"> + <label for="nameField">{{'PROPERTY.TASKLISTENERS.FIELDS.NAME' | translate}}</label> + <input type="text" id="nameField" class="form-control" ng-model="selectedFields[0].name" placeholder="{{'PROPERTY.TASKLISTENERS.FIELDS.NAME.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="stringValueField">{{'PROPERTY.TASKLISTENERS.FIELDS.STRINGVALUE' | translate}}</label> + <input type="text" id="stringValueField" class="form-control" ng-model="selectedFields[0].stringValue" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.TASKLISTENERS.FIELDS.STRINGVALUE.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="expressionField">{{'PROPERTY.TASKLISTENERS.FIELDS.EXPRESSION' | translate}}</label> + <input type="text" id="expressionField" class="form-control" ng-model="selectedFields[0].expression" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.TASKLISTENERS.FIELDS.EXPRESSION.PLACEHOLDER' | translate}}" /> + </div> + <div class="form-group"> + <label for="stringField">{{'PROPERTY.TASKLISTENERS.FIELDS.STRING' | translate}}</label> + <textarea id="stringField" class="form-control" ng-model="selectedFields[0].string" ng-change="fieldDetailsChanged()" placeholder="{{'PROPERTY.TASKLISTENERS.FIELDS.STRING.PLACEHOLDER' | translate}}"></textarea> + </div> + + </div> + <div ng-show="selectedFields.length == 0" class="muted no-property-selected"translate>PROPERTY.TASKLISTENERS.FIELDS.EMPTY</div> + </div> + </div> + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="save()" class="btn btn-primary" translate>ACTION.SAVE</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-write-template.html new file mode 100644 index 0000000..8c4d993 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/task-listeners-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmTaskListenersCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-popup.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-popup.html new file mode 100644 index 0000000..d7c67af --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-popup.html @@ -0,0 +1,17 @@ + +<div class="modal" ng-controller="KisBpmTextPropertyPopupCtrl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h3>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate:property}}</h3> + </div> + <div class="modal-body"> + <p><textarea auto-focus class="form-control" ng-model="property.value" style="width:70%; height:100%; max-width: 100%; max-height: 100%; min-height: 200px"/></p> + </div> + <div class="modal-footer"> + <button ng-click="save()" class="btn btn-primary" translate >ACTION.SAVE</button> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-property-write-template.html b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-property-write-template.html new file mode 100644 index 0000000..b4a1d7f --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/properties/text-property-write-template.html @@ -0,0 +1,4 @@ + +<!-- Just need to instantiate the controller, and it will take care of showing the modal dialog --> +<span ng-controller="KisBpmTextPropertyCtrl"> +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-custom-actions.js b/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-custom-actions.js new file mode 100644 index 0000000..92aa0ba --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-custom-actions.js @@ -0,0 +1,18 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-default-actions.js b/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-default-actions.js new file mode 100644 index 0000000..ef4ae41 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar-default-actions.js @@ -0,0 +1,431 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var KISBPM = KISBPM || {}; +KISBPM.TOOLBAR = { + ACTIONS: { + + saveModel: function (services) { + + var modal = services.$modal({ + backdrop: true, + keyboard: true, + template: 'editor-app/popups/save-model.html?version=' + Date.now(), + scope: services.$scope + }); + }, + + undo: function (services) { + + // Get the last commands + var lastCommands = services.$scope.undoStack.pop(); + + if (lastCommands) { + // Add the commands to the redo stack + services.$scope.redoStack.push(lastCommands); + + // Force refresh of selection, might be that the undo command + // impacts properties in the selected item + if (services.$rootScope && services.$rootScope.forceSelectionRefresh) + { + services.$rootScope.forceSelectionRefresh = true; + } + + // Rollback every command + for (var i = lastCommands.length - 1; i >= 0; --i) { + lastCommands[i].rollback(); + } + + // Update and refresh the canvas + services.$scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_UNDO_ROLLBACK, + commands: lastCommands + }); + + // Update + services.$scope.editor.getCanvas().update(); + services.$scope.editor.updateSelection(); + } + + var toggleUndo = false; + if (services.$scope.undoStack.length == 0) + { + toggleUndo = true; + } + + var toggleRedo = false; + if (services.$scope.redoStack.length > 0) + { + toggleRedo = true; + } + + if (toggleUndo || toggleRedo) { + for (var i = 0; i < services.$scope.items.length; i++) { + var item = services.$scope.items[i]; + if (toggleUndo && item.action === 'KISBPM.TOOLBAR.ACTIONS.undo') { + services.$scope.safeApply(function () { + item.enabled = false; + }); + } + else if (toggleRedo && item.action === 'KISBPM.TOOLBAR.ACTIONS.redo') { + services.$scope.safeApply(function () { + item.enabled = true; + }); + } + } + } + }, + + redo: function (services) { + + // Get the last commands from the redo stack + var lastCommands = services.$scope.redoStack.pop(); + + if (lastCommands) { + // Add this commands to the undo stack + services.$scope.undoStack.push(lastCommands); + + // Force refresh of selection, might be that the redo command + // impacts properties in the selected item + if (services.$rootScope && services.$rootScope.forceSelectionRefresh) + { + services.$rootScope.forceSelectionRefresh = true; + } + + // Execute those commands + lastCommands.each(function (command) { + command.execute(); + }); + + // Update and refresh the canvas + services.$scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_UNDO_EXECUTE, + commands: lastCommands + }); + + // Update + services.$scope.editor.getCanvas().update(); + services.$scope.editor.updateSelection(); + } + + var toggleUndo = false; + if (services.$scope.undoStack.length > 0) { + toggleUndo = true; + } + + var toggleRedo = false; + if (services.$scope.redoStack.length == 0) { + toggleRedo = true; + } + + if (toggleUndo || toggleRedo) { + for (var i = 0; i < services.$scope.items.length; i++) { + var item = services.$scope.items[i]; + if (toggleUndo && item.action === 'KISBPM.TOOLBAR.ACTIONS.undo') { + services.$scope.safeApply(function () { + item.enabled = true; + }); + } + else if (toggleRedo && item.action === 'KISBPM.TOOLBAR.ACTIONS.redo') { + services.$scope.safeApply(function () { + item.enabled = false; + }); + } + } + } + }, + + cut: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxEditPlugin(services.$scope).editCut(); + for (var i = 0; i < services.$scope.items.length; i++) { + var item = services.$scope.items[i]; + if (item.action === 'KISBPM.TOOLBAR.ACTIONS.paste') { + services.$scope.safeApply(function () { + item.enabled = true; + }); + } + } + }, + + copy: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxEditPlugin(services.$scope).editCopy(); + for (var i = 0; i < services.$scope.items.length; i++) { + var item = services.$scope.items[i]; + if (item.action === 'KISBPM.TOOLBAR.ACTIONS.paste') { + services.$scope.safeApply(function () { + item.enabled = true; + }); + } + } + }, + + paste: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxEditPlugin(services.$scope).editPaste(); + }, + + deleteItem: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxEditPlugin(services.$scope).editDelete(); + }, + + addBendPoint: function (services) { + + var dockerPlugin = KISBPM.TOOLBAR.ACTIONS._getOryxDockerPlugin(services.$scope); + + var enableAdd = !dockerPlugin.enabledAdd(); + dockerPlugin.setEnableAdd(enableAdd); + if (enableAdd) + { + dockerPlugin.setEnableRemove(false); + document.body.style.cursor = 'pointer'; + } + else + { + document.body.style.cursor = 'default'; + } + }, + + removeBendPoint: function (services) { + + var dockerPlugin = KISBPM.TOOLBAR.ACTIONS._getOryxDockerPlugin(services.$scope); + + var enableRemove = !dockerPlugin.enabledRemove(); + dockerPlugin.setEnableRemove(enableRemove); + if (enableRemove) + { + dockerPlugin.setEnableAdd(false); + document.body.style.cursor = 'pointer'; + } + else + { + document.body.style.cursor = 'default'; + } + }, + + /** + * Helper method: fetches the Oryx Edit plugin from the provided scope, + * if not on the scope, it is created and put on the scope for further use. + * + * It's important to reuse the same EditPlugin while the same scope is active, + * as the clipboard is stored for the whole lifetime of the scope. + */ + _getOryxEditPlugin: function ($scope) { + if ($scope.oryxEditPlugin === undefined || $scope.oryxEditPlugin === null) { + $scope.oryxEditPlugin = new ORYX.Plugins.Edit($scope.editor); + } + return $scope.oryxEditPlugin; + }, + + zoomIn: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxViewPlugin(services.$scope).zoom([1.0 + ORYX.CONFIG.ZOOM_OFFSET]); + }, + + zoomOut: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxViewPlugin(services.$scope).zoom([1.0 - ORYX.CONFIG.ZOOM_OFFSET]); + }, + + zoomActual: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxViewPlugin(services.$scope).setAFixZoomLevel(1); + }, + + zoomFit: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxViewPlugin(services.$scope).zoomFitToModel(); + }, + + alignVertical: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxArrangmentPlugin(services.$scope).alignShapes([ORYX.CONFIG.EDITOR_ALIGN_MIDDLE]); + }, + + alignHorizontal: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxArrangmentPlugin(services.$scope).alignShapes([ORYX.CONFIG.EDITOR_ALIGN_CENTER]); + }, + + sameSize: function (services) { + KISBPM.TOOLBAR.ACTIONS._getOryxArrangmentPlugin(services.$scope).alignShapes([ORYX.CONFIG.EDITOR_ALIGN_SIZE]); + }, + + closeEditor: function(services) { + window.location.href = "./"; + }, + + /** + * Helper method: fetches the Oryx View plugin from the provided scope, + * if not on the scope, it is created and put on the scope for further use. + */ + _getOryxViewPlugin: function ($scope) { + if ($scope.oryxViewPlugin === undefined || $scope.oryxViewPlugin === null) { + $scope.oryxViewPlugin = new ORYX.Plugins.View($scope.editor); + } + return $scope.oryxViewPlugin; + }, + + _getOryxArrangmentPlugin: function ($scope) { + if ($scope.oryxArrangmentPlugin === undefined || $scope.oryxArrangmentPlugin === null) { + $scope.oryxArrangmentPlugin = new ORYX.Plugins.Arrangement($scope.editor); + } + return $scope.oryxArrangmentPlugin; + }, + + _getOryxDockerPlugin: function ($scope) { + if ($scope.oryxDockerPlugin === undefined || $scope.oryxDockerPlugin === null) { + $scope.oryxDockerPlugin = new ORYX.Plugins.AddDocker($scope.editor); + } + return $scope.oryxDockerPlugin; + } + } +}; + +/** Custom controller for the save dialog */ +var SaveModelCtrl = [ '$rootScope', '$scope', '$http', '$route', '$location', + function ($rootScope, $scope, $http, $route, $location) { + + var modelMetaData = $scope.editor.getModelMetaData(); + + var description = ''; + if (modelMetaData.description) { + description = modelMetaData.description; + } + + var saveDialog = { 'name' : modelMetaData.name, + 'description' : description}; + + $scope.saveDialog = saveDialog; + + var json = $scope.editor.getJSON(); + json = JSON.stringify(json); + + var params = { + modeltype: modelMetaData.model.modelType, + json_xml: json, + name: 'model' + }; + + $scope.status = { + loading: false + }; + + $scope.close = function () { + $scope.$hide(); + }; + + $scope.saveAndClose = function () { + $scope.save(function() { + // window.location.href = "./"; + if (window.CloseOwnerWindow) return window.CloseOwnerWindow('ok'); + else window.close(); + }); + }; + $scope.save = function (successCallback) { + + if (!$scope.saveDialog.name || $scope.saveDialog.name.length == 0) { + return; + } + + // Indicator spinner image + $scope.status = { + loading: true + }; + + modelMetaData.name = $scope.saveDialog.name; + modelMetaData.description = $scope.saveDialog.description; + + var json = $scope.editor.getJSON(); + json = JSON.stringify(json); + + var selection = $scope.editor.getSelection(); + $scope.editor.setSelection([]); + + // Get the serialized svg image source + var svgClone = $scope.editor.getCanvas().getSVGRepresentation(true); + $scope.editor.setSelection(selection); + if ($scope.editor.getCanvas().properties["oryx-showstripableelements"] === false) { + var stripOutArray = jQuery(svgClone).find(".stripable-element"); + for (var i = stripOutArray.length - 1; i >= 0; i--) { + stripOutArray[i].remove(); + } + } + + // Remove all forced stripable elements + var stripOutArray = jQuery(svgClone).find(".stripable-element-force"); + for (var i = stripOutArray.length - 1; i >= 0; i--) { + stripOutArray[i].remove(); + } + + // Parse dom to string + var svgDOM = DataManager.serialize(svgClone); + + var params = { + json_xml: json, + svg_xml: svgDOM, + name: $scope.saveDialog.name, + description: $scope.saveDialog.description + }; + + // Update + $http({ method: 'PUT', + data: params, + ignoreErrors: true, + headers: {'Accept': 'application/json', + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + transformRequest: function (obj) { + var str = []; + for (var p in obj) { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + } + return str.join("&"); + }, + url: KISBPM.URL.putModel(modelMetaData.modelId)}) + + .success(function (data, status, headers, config) { + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_SAVED + }); + $scope.modelData.name = $scope.saveDialog.name; + $scope.modelData.lastUpdated = data.lastUpdated; + + $scope.status.loading = false; + $scope.$hide(); + + // Fire event to all who is listening + var saveEvent = { + type: KISBPM.eventBus.EVENT_TYPE_MODEL_SAVED, + model: params, + modelId: modelMetaData.modelId, + eventType: 'update-model' + }; + KISBPM.eventBus.dispatch(KISBPM.eventBus.EVENT_TYPE_MODEL_SAVED, saveEvent); + + // Reset state + $scope.error = undefined; + $scope.status.loading = false; + + // Execute any callback + if (successCallback) { + successCallback(); + } + + }) + .error(function (data, status, headers, config) { + $scope.error = {}; + console.log('Something went wrong when updating the process model:' + JSON.stringify(data)); + $scope.status.loading = false; + }); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar.js b/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar.js new file mode 100644 index 0000000..8fca04a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/toolbar.js @@ -0,0 +1,176 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var KISBPM = KISBPM || {}; +KISBPM.TOOLBAR_CONFIG = { + "items" : [ + { + "type" : "button", + "title" : "TOOLBAR.ACTION.SAVE", + "cssClass" : "editor-icon editor-icon-save", + "action" : "KISBPM.TOOLBAR.ACTIONS.saveModel" + }, + { + "type" : "separator", + "title" : "", + "cssClass" : "toolbar-separator" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.CUT", + "cssClass" : "editor-icon editor-icon-cut", + "action" : "KISBPM.TOOLBAR.ACTIONS.cut", + "enabled" : false, + "enabledAction" : "element" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.COPY", + "cssClass" : "editor-icon editor-icon-copy", + "action" : "KISBPM.TOOLBAR.ACTIONS.copy", + "enabled" : false, + "enabledAction" : "element" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.PASTE", + "cssClass" : "editor-icon editor-icon-paste", + "action" : "KISBPM.TOOLBAR.ACTIONS.paste", + "enabled" : false + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.DELETE", + "cssClass" : "editor-icon editor-icon-delete", + "action" : "KISBPM.TOOLBAR.ACTIONS.deleteItem", + "enabled" : false, + "enabledAction" : "element" + }, + { + "type" : "separator", + "title" : "TOOLBAR.ACTION.SAVE", + "cssClass" : "toolbar-separator" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.REDO", + "cssClass" : "editor-icon editor-icon-redo", + "action" : "KISBPM.TOOLBAR.ACTIONS.redo", + "enabled" : false + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.UNDO", + "cssClass" : "editor-icon editor-icon-undo", + "action" : "KISBPM.TOOLBAR.ACTIONS.undo", + "enabled" : false + }, + { + "type" : "separator", + "title" : "TOOLBAR.ACTION.SAVE", + "cssClass" : "toolbar-separator" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.ALIGNVERTICAL", + "cssClass" : "editor-icon editor-icon-align-vertical", + "action" : "KISBPM.TOOLBAR.ACTIONS.alignVertical", + "enabled" : false, + "enabledAction" : "element", + "minSelectionCount" : 2 + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.ALIGNHORIZONTAL", + "cssClass" : "editor-icon editor-icon-align-horizontal", + "action" : "KISBPM.TOOLBAR.ACTIONS.alignHorizontal", + "enabledAction" : "element", + "enabled" : false, + "minSelectionCount" : 2 + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.SAMESIZE", + "cssClass" : "editor-icon editor-icon-same-size", + "action" : "KISBPM.TOOLBAR.ACTIONS.sameSize", + "enabledAction" : "element", + "enabled" : false, + "minSelectionCount" : 2 + }, + { + "type" : "separator", + "title" : "TOOLBAR.ACTION.SAVE", + "cssClass" : "toolbar-separator" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.ZOOMIN", + "cssClass" : "editor-icon editor-icon-zoom-in", + "action" : "KISBPM.TOOLBAR.ACTIONS.zoomIn" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.ZOOMOUT", + "cssClass" : "editor-icon editor-icon-zoom-out", + "action" : "KISBPM.TOOLBAR.ACTIONS.zoomOut" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.ZOOMACTUAL", + "cssClass" : "editor-icon editor-icon-zoom-actual", + "action" : "KISBPM.TOOLBAR.ACTIONS.zoomActual" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.ZOOMFIT", + "cssClass" : "editor-icon editor-icon-zoom-fit", + "action" : "KISBPM.TOOLBAR.ACTIONS.zoomFit" + }, + { + "type" : "separator", + "title" : "TOOLBAR.ACTION.SAVE", + "cssClass" : "toolbar-separator" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.BENDPOINT.ADD", + "cssClass" : "editor-icon editor-icon-bendpoint-add", + "action" : "KISBPM.TOOLBAR.ACTIONS.addBendPoint", + "id" : "add-bendpoint-button" + }, + { + "type" : "button", + "title" : "TOOLBAR.ACTION.BENDPOINT.REMOVE", + "cssClass" : "editor-icon editor-icon-bendpoint-remove", + "action" : "KISBPM.TOOLBAR.ACTIONS.removeBendPoint", + "id" : "remove-bendpoint-button" + } + ] + // , + // + // "secondaryItems" : [ + // { + // "type" : "button", + // "title" : "Close", + // "cssClass" : "editor-icon editor-icon-close", + // "action" : "KISBPM.TOOLBAR.ACTIONS.closeEditor" + // } + // ] +}; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/configuration/url-config.js b/src/main/resources/static/activiti-editor/editor-app/configuration/url-config.js new file mode 100644 index 0000000..e0eb851 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/configuration/url-config.js @@ -0,0 +1,34 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +var KISBPM = KISBPM || {}; + +KISBPM.URL = { + + getModel: function(modelId) { + return ACTIVITI.CONFIG.contextRoot + '/model/' + modelId + '/json'; + }, + + getStencilSet: function() { + return ACTIVITI.CONFIG.contextRoot + '/editor/stencilset?version=' + Date.now(); + }, + + putModel: function(modelId) { + return ACTIVITI.CONFIG.contextRoot + '/model/' + modelId + '/save'; + } +}; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/css/style-common.css b/src/main/resources/static/activiti-editor/editor-app/css/style-common.css new file mode 100644 index 0000000..1d266e8 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/css/style-common.css @@ -0,0 +1,1517 @@ +/** + Colors: + + - Header: #333333 + - Subheader: #e8edf1 + - Subheader border: #a4acb9 + - Highlight buttons/text: #36a7c4 + - Text color: #1a1a1a + - Filter color: #373e48 + - Dark highlight: #606b7d +*/ + +.form-control { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + padding: 4px 8px; +} + +body { + font-family: 'Lato', sans-serif; +} + +.label { + font-size: 18px; + font-weight: normal; + margin-bottom: 0; + color: #1a1a1a; +} + +.subtle { + color: #999999; + font-size: 13px; +} + + +.simple-list { + list-style: none inside; + padding: 0; + margin: 5px 0; +} + +.simple-list.pack { + max-height: 250px; + overflow: auto; +} + +.simple-list li { + padding: 6px; + position: relative; +} + +.simple-list li > .icon { + padding-right: 5px; +} + +.simple-list li:hover { + background-color: #f8f8f9; +} + +.simple-list li.nothing-to-see:hover { + background-color: transparent; +} + +.simple-list li.active { + background-color: #eeeeee; +} + +.simple-list li >.actions { + visibility: hidden; + position: absolute; + top: 3px; + right: 5px; + font-size: 20px; + background-color: #f8f8f9; + padding: 0 0 0 4px; +} + +.simple-list li >.actions a { + padding: 4px 4px 0 4px; + } + +.simple-list li >.actions a:hover { + background-color: #ffffff; +} + +.simple-list li:hover >.actions { + visibility: visible; +} + +.simple-list.grid li { + border-bottom: 1px solid #eeeeee; +} + +.simple-list.grid li:first-child { + border-top: 1px solid #eeeeee; +} + +.simple-list li .subtle { + color: #999999; + font-size: 13px; +} + +.simple-list.selectable li { + cursor: pointer; +} + +.simple-list .loading { + position: absolute; + left: 50%; + margin-left: -15px; + line-height: 30px; + top: 8px; + z-index: 1030; +} + + +.lt-ie9 .container { + display: none !important; + visibility: hidden !important; +} + +.unsupported-browser { + margin: 60px 20px 20px 20px; +} + +a { + cursor: pointer; +} + +a:hover { + text-decoration: none; +} + +label { + font-weight: normal; + color: #636363; + font-size: 14px; +} + +[ng\:cloak], [ng-cloak], .ng-cloak { display: none; } + +.nothing-to-see { + padding: 5px 0 20px 0; + cursor: default; +} + +.nothing-to-see span { + font-size: 14px; + color: #aaaaaa; +} + +.fixed-container { + max-width: 1400px; + min-width: 1000px; + margin: 0 auto; +} + +.well { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} + +/** Buttons **/ +button.btn, a.btn { + background-color: #36a7c4; + color: #ffffff; + border-color: #ffffff; + font-size: 15px; +} + +button.btn-subtle, a.btn-subtle { + background-color: #fafafb; + color: #1a1a1a; + font-size: 15px; +} + +.btn-xs { + padding: 1px 8px; +} + +button.btn.btn-danger { + background-color: #d35f5f; +} + +.btn.btn-danger:hover, .btn.btn-danger.active, .btn.btn-danger:focus { + background-color: #c83737; +} + +.btn:hover, .btn.active, .btn:focus { + background-color: #2a8198; + border-color: #ffffff; + color: #ffffff; +} + +.btn.disabled, .btn[disabled], .btn[disabled]:active, .btn[disabled]:hover { + background-color: #668b94; + border-color: #668b94; + color: #ffffff; +} + +.btn-subtle:hover, .btn-subtle.active, .btn-subtle:focus { + background-color: #f6f6f7; + border-color: #ffffff; + color: #000000; +} + +.btn-subtle[disabled] { + background-color: #f6f6f7; + color: #555555; +} + +.modal-header .btn, .header .btn { + border-color: #e8edf1; +} + +.content { + padding: 0 10px; + overflow: auto; +} + +.content.split { + background: transparent url('../../images/line-1px.png') repeat-y 60% 0; +} + +.content .split-left { + float: left; + width: 60%; + padding: 0 10px 0 5px; +} + +.content .split-right { + float: right; + width: 40%; + padding: 0 0 0 15px; +} + + +.form-group .pull-right { + margin: 10px 0 0 5px; +} + +.form-group.box { + padding-bottom: 10px; + margin-bottom: 5px; + border-bottom: 1px dotted #eeeeee; +} + +.form-group .marker { + font-size: 15px; + color: #666666; +} + +/** Dropdowns and dropdown triggers */ + +.dropdown-menu { + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; + box-shadow: none; +} + +.dropdown-menu:focus { + outline: none; +} + +.dropdown-menu > li > a:hover, .dropdown-menu > ul > li > a:hover { + background: #36a7c4; + color: #ffffff; +} + + +.dropdown-menu > li.active > a, .dropdown-menu > li.active > a:hover { + background: #e8edf1; + color: #1a1a1a; +} + +.dropdown-menu > ul > li > a { + display: block; + text-decoration: none; + color: #1a1a1a; + padding: 5px; + cursor: pointer; +} + +.dropdown-menu > ul { + padding: 10px; +} + +.dropdown-menu.large-width { + min-width: 300px; +} + +a.dropdown-toggle { + color: #1a1a1a; + text-decoration: none; +} + +.open a.dropdown-toggle, a.dropdown-toggle:hover { + color: #36a7c4; +} + +.btn-group.open .dropdown-toggle { + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +/** Subtle dropdown (eg. sort) */ + +.dropdown-subtle { + margin-right: 5px; + color: #606b7d; +} + +.dropdown-subtle .btn { + background: transparent; + line-height: 36px; + color: #606b7d; + padding: 0; + font-size: 14px; + border: none; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} + +.dropdown-subtle .btn-group.open .dropdown-toggle { + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} + +.dropdown-subtle .btn:hover, .dropdown-subtle .btn:focus { + background: transparent; + color: #333333; +} + +.dropdown-subtle a { + cursor: pointer; +} + +/** Popovers */ +.popover { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + max-width: 400px; + min-width: 300px; + padding: 0px; +} + +.popover.bottom-left, .popover.bottom-right { + margin-top: 10px; +} + .popover>.arrow, .popover>.arrow { + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0,0,0,.25); + top: -11px; + +} + +.popover.bottom-left>.arrow { + left: 40px; +} + +.popover.bottom-right>.arrow { + right: 40px; +} + +.popover.bottom-left>.arrow:after, .popover.bottom-right>.arrow:after, .popover.bottom>.arrow:after { + content: " "; + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #e8edf1; +} + +.popover-wrapper { + padding: 10px; +} + +.popover-header { + position: relative; + background-color: #e8edf1; + min-height: 30px; + font-size: 18px; + color: #a4acb9; + padding: 10px 0; +} + +.popover-footer { + overflow: hidden; + clear: both; + padding: 5px 10px 10px 10px; +} + +.popover-header .actions { + position: absolute; + top: 6px; + right: 5px; + font-size: 12px; +} + +.popover-header .actions a{ + display: inline-block; + padding: 8px 5px; +} + +.popover-header span { + padding: 0 10px; +} + +.popover-wrapper .form-group { + margin-bottom: 10px; +} + +.popover.wide { + max-width: 1000px; + min-width: 1000px; +} + +.popover.wide .popover-wrapper { + max-height: 400px; + overflow: auto; +} + +.popover.medium { + max-width: 600px; + min-width: 250px; +} + +.popover .section { + border-top: 1px solid #eeeeee; +} + +.center { + text-align: center; +} + +.popover .center .btn, .popover .center .btn-group > .btn:hover, .popover .center .btn-group > .btn:focus { + border-color: #ffffff; +} + +/* Navigation */ + +.navbar { + background-color: #333333; + border: none; + min-height: 40px; +} + + +.navbar .btn-group .btn-default { + border: none; + color: #ffffff; + background-color: transparent; + padding-top: 0px; + padding-bottom: 0px; + line-height: 40px; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; + font-size: 13px; +} + +.navbar .btn-group .btn-default:hover, .navbar .btn-group .btn-default:focus { + background-color: #121212; +} + +.navbar .btn-group .btn-default { + border: none; + color: #ffffff; + background-color: transparent; +} + +.navbar .btn-group .btn-icon { + font-size: 22px; +} + + +.navbar-header .navbar-brand { + padding-top: 0px; + line-height: 40px; + height: 40px; + background: url(../images/logo.png) no-repeat 10px center; + width: 180px; +} + + +.navbar-nav { + height: 40px; +} + +.navbar-nav > li > a { + line-height: 20px; + padding: 10px; + font-size: 17px; + padding: 10px 35px 10px 35px; + color: #ffffff; +} + +.navbar-nav > li.active:after { + top: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-color: rgba(0, 0, 0, 0); + border-top-color: #000000; + border-width: 6px; + margin-left: -6px; +} + +.navbar-nav > li.active { + background-color: #000000; + position: relative; +} + + +.navbar-nav > li.active > a { + color: #36a7c4; +} + +/* Sub header */ +.subheader { + background-color: #e8edf1; + min-height: 60px; + border-bottom: 1px solid #a4acb9; +} + +.subheader > div > .btn-group { + margin: 12px 15px 0px 0px; +} + +.subheader h2 { + font-family: 'Lato', sans-serif; + color: #1a1a1a; + font-size: 20px; + font-weight: normal; + padding: 19px 0px 5px 10px; + margin-top: 0px; +} + +.subheader .version { + font-weight: bold; + color: #36a7c4; + font-size: 110%; + padding-left: 5px; + line-height: 1; + padding-right: 5px; + border-right: 1px solid #a4acb9; + margin-right: 5px; +} +.subheader .btn { + border-color: #e8edf1; +} + +.subheader a.btn:hover, .subheader a.btn:focus { + border-color: #e8edf1; + color: #ffffff; +} + +.subheader .dropdown-menu .detail { + vertical-align:middle; + color: #1a1a1a; +} + +.subheader p { + font-size: 14px; + color: #1a1a1a; + word-wrap:break-word; +} + +.subheader p.hint a { + cursor: pointer; + color: #1a1a1a; +} + +.subheader .details.subheader .details { + margin-bottom: 5px; + margin-left: -1px; + border-right: 1px solid #a4acb9; + border-left: 1px solid #a4acb9; + padding: 0px 15px 5px 15px; +} + +.subheader .details:first-child { + border-left: none; +} + +.subheader .details:last-child { + border-right: none; +} + +.subheader .details > span, span.detail { + font-size: 13px; + display: block; + padding-bottom: 5px; +} + +.subheader .details p { + font-size: 13px; +} + +.subheader .related { + float: right; + margin: 0 -10px 10px 10px; +} + +.subheader .details span i, span.detail i { + font-size: 90%; + padding-right: 8px; +} + +.subheader >div>.pull-right { + margin-top: 12px; + margin-right: 5px; +} + +.subheader a.action { + color: #1a1a1a; + margin-right: 10px; + line-height: 36px; + text-decoration: underline; + font-size: 14px; +} + +.subheader a.action i { + text-decoration: none; + font-style: normal; +} + +.subheader a:hover { + color: #606b7d; +} + +.subheader .highlight { + color: #ffeeaa; +} + + +/** Custom icons **/ + +.icon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'cherokeeregular'; + font-style: normal; + font-weight: 400; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-user-add:before { + content: "\e008"; +} + +.icon-comment-add:before { + content: "\e111"; +} + +.icon-diagram:before { + content: "\e011"; +} + +.icon-caret-down:before { + content: "\e114"; +} + +.icon-caret-left:before { + content: "\e115"; +} + +.icon-caret-right:before { + content: "\e116"; +} + +.icon-remove:before { + content: "\e117"; +} + +.icon-pencil:before { + content: "\270f"; +} + +.icon-caret-up:before { + content: "\e118"; +} + +.icon-user:before { + content: "\e119"; +} + +.icon-choice:before { + content: "\e120"; +} + +.icon-move:before { + content: "\e121"; +} + +.icon-mail:before { + content: "\e122"; +} + +.icon-clock:before { + content: "\e123"; +} + +.icon-download:before { + content: "\e124"; +} + +.icon-word:before { + content: "\e125"; +} + +.icon-excel:before { + content: "\e126"; +} + +.icon-powerpoint:before { + content: "\e127"; +} + +.icon-pdf:before { + content: "\e128"; +} + +.icon-content:before { + content: "\e129"; +} + +.icon-folder:before { + content: "\e130"; +} + +.icon-image:before { + content: "\e131"; +} + +.icon-bpmn-stencil:before { + content: "\e132"; +} + +.icon-kickstart-stencil:before { + content: "\e133"; +} + +.icon-form-stencil:before { + content: "\e134"; +} + +.simple-list .icon-image, .related-content .icon-image { + color: #484b84; +} + +.simple-list .icon-pdf, .related-content .icon-pdf { + color: #ac2020; +} + +.simple-list .icon-powerpoint, .related-content .icon-powerpoint { + color: #dc5b31; +} + +.simple-list .icon-excel, .related-content .icon-excel { + color: #13743d; +} + +.simple-list .icon-word, .related-content .icon-word { + color: #2974b8; +} + +.simple-list .icon-content, .related-content .icon-content { + color: #666666; +} + +.loading { + margin: 0px 15px; + text-align: center; + line-height: 34px; +} + +.loading > div { + width: 10px; + height: 10px; + background-color: #9fd7e5; + margin: 1px; + + border-radius: 100%; + display: inline-block; + -webkit-animation: bouncedelay 1.4s infinite ease-in-out; + animation: bouncedelay 1.4s infinite ease-in-out; + /* Prevent first frame from flickering when animation starts */ + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.loading .l1 { + -webkit-animation-delay: -0.32s; + animation-delay: -0.32s; +} + +.loading .l2 { + -webkit-animation-delay: -0.16s; + animation-delay: -0.16s; +} + +.loading-box { + text-align: center; + margin: 50px auto 10px auto; + padding: 20px 50px; + max-width: 400px; +} + +.loading-box span { + font-size: 16px; + color: #333333; +} + + +@-webkit-keyframes bouncedelay { + 0%, 80%, 100% { -webkit-transform: scale(0.0) } + 40% { -webkit-transform: scale(1.0) } +} + +@keyframes bouncedelay { + 0%, 80%, 100% { + transform: scale(0.0); + -webkit-transform: scale(0.0); + } 40% { + transform: scale(1.0); + -webkit-transform: scale(1.0); + } +} + +/** Alerts */ +.alert-wrapper { + +} + +.alert-wrapper { + position: fixed; + top: 40px; + left: 0; + right: 0; + z-index: 1010; +} + +.alert-wrapper.no-header { + top: 0px; +} + +.alert { + text-align: center; + width: 100%; + min-height: 20px; + background-color: #eef4d7; + background-color: rgba(238, 244, 215, .7); + padding: 8px 10px; + cursor: pointer; + border: none; + border-bottom: 1px solid #bcd35f; + + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + + -webkit-transition: all .5s ease; + -moz-transition: all .5s ease; + -o-transition: all .5s ease; + transition: all .5s ease; +} + +.alert.ng-hide-remove { + opacity: 1; + display:block!important; + } + + +.alert.ng-hide { + opacity: 0; +} + +.alert .badge { + background-color: #bcd35f; + color: #ffffff; + font-size: 12px; + margin-top: 2px; + margin-left: 10px; +} + + +.alert .glyphicon { + padding-right: 8px; + color: #bcd35f; +} + +.alert span { + color: #445016; + font-size: 15px; +} + +.alert.error { + background-color: #e9af9f; + border-color: #e4593d; + background-color: rgba(228, 89, 61, .7); +} +.alert.error .glyphicon { + color: #e4593d; +} + +.alert.error span { + color: #471313; +} + +.alert.error .badge { + background-color: #e4593d; + color: #ffffff; +} + +.wrapper { + padding: 55px 15px 15px 15px; + max-width: 1400px; + min-width: 1024px; + margin: 0 auto; +} + +.wrapper.full { + padding: 0px 0px 0px 0px; + overflow: hidden; + max-width: 100%; + min-width: 100%; +} + +.wrapper.no-header { + padding-top: 10px; +} + +/** Main list **/ +.main-list { + position: relative; + float: left; + width: 400px; + border: 1px solid #cccccc; + background-color: #ffffff; + margin-right: 20px; + + -webkit-box-shadow: 2px 2px 2px 0px rgba(220,220,220,0.50); + -moz-box-shadow: 2px 2px 2px 0px rgba(220,220,220,0.50); + box-shadow: 2px 2px 2px 0px rgba(220,220,220,0.50); +} + +.main-list .sort { + position: absolute; + top: 12px; + right: 5px; +} + +.list-header { + position: absolute; + top: 0; + left: 0; + right: 0; + background-color: #ffffff; + background-color: rgba(255, 255, 255, .9); + border-bottom: 1px solid #cccccc; + + -webkit-box-shadow: 0px 1px 1px 0px rgba(220,220,220,0.65); + -moz-box-shadow: 0px 1px 1px 0px rgba(220,220,220,0.65); + box-shadow: 0px 1px 1px 0px rgba(220,220,220,0.65); + z-index: 2; + +} + +.list-header .loading { + position: absolute; + left: 50%; + margin-left: -15px; + line-height: 30px; +} + +.list-header .summary { + cursor: pointer; + padding: 10px 10px 10px 10px; + min-height: 30px; +} + +.list-header .summary > span { + color: #373e48; +} + +.list-header .summary .divider { + content: '&bull'; + font-size: 70%; + line-height: 1; + font-style: normal; + padding: 0 5px; +} + +.list-header .form-group { + margin-bottom: 10px; + position: relative; +} + +.selection { + position: relative; + margin: 0; + padding: 6px 8px; + + border: 1px solid #cccccc; + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + background-color: #ffffff; + + font-size: 14px; + + cursor: pointer; +} + +.selection .glyphicon, .selection .icon { + padding-right: 5px; +} + +.selection .actions { + float: right; +} +.selection .actions.no-upload { + float: left; + margin-right: 10px; +} + +.selection.narrow { + padding: 0; +} + +.selection .pull-right { + margin: 4px 4px 4px 0; +} + +.selection.narrow .simple-list { + margin-bottom: 0; + padding-bottom: 0; +} + +.selection.narrow .simple-list li { + border-top: 1px dotted #eeeeee; +} + +.selection.narrow .simple-list li:first-child { + border-top: none; +} + + +.selection.narrow .no-results { + padding: 6px 0 0 5px; +} + +.selection.narrow .details { + margin: 5px; + border: none; +} + +.selection.narrow .label { + font-size: 13px; + padding:0 10px 0 0; + margin: 0; + color: #666666; +} + +.selection > .icon-caret-down { + visibility: hidden; + position: absolute; + top: 8px; + right: 5px; +} + +.selection .empty { + color: #666666; +} + +.selection:hover > .icon-caret-down, button.selection:active > .icon-caret-down, button.selection:focus > .icon-caret-down { + visibility: visible; +} + +.selection[disabled]:hover > .icon-caret-down, button.selection[disabled]:active > .icon-caret-down, button[disabled].selection:focus > .icon-caret-down { + visibility: hidden; +} + +.selection[disabled] { + background-color: #f6f6f7; + color: #999999; +} + +.selection+.dropdown-menu { + width: 100%; +} + +button.selection:active, button.selection:focus { + outline: none; + border-color: #acacac; +} + +.selection.toggle { + overflow: hidden; + clear: both; + padding: 0; +} + +.selection.toggle .toggle-2 { + width: 50%; + float: left; +} + + +.selection.toggle .toggle-3 { + width: 33.333%; + float: left; +} + +.selection.toggle .toggle-4 { + width: 25%; + float: left; +} + +.selection.toggle .btn { + border: none; + border-right: 1px solid #bbbbbb; + width: 100%; + background-color: #eeeeee; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + color: #666666; + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075); + +} + +.selection.toggle .btn:active, .selection.toggle .btn:focus { + outline: none; + color: #1a1a1a; + background-color: #f8f8f8; +} + +.selection.toggle > .active .btn { + background-color: #ffffff; + color: #1a1a1a; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.selection.toggle > div:last-child .btn { + border: none; +} + +.subtle-select { + padding: 6px 8px; + background-color: transparent; + color: #1a1a1a; + text-decoration: none; +} + +.subtle-select .icon { + visibility: hidden; +} + +.subtle-select:hover .icon { + visibility: visible; +} + +.subtle-select:hover, .header .detail a.subtle-select:hover { + background-color: #ffffff; + text-decoration: none; + color:#1a1a1a; +} + + +.list-header .summary label, .list-header .summary .filter-action { + font-size: 11px; + font-weight: normal; + text-transform: uppercase; + margin-bottom: 0; + color: #1a1a1a; +} + +.list-wrapper { + overflow: auto; +} + + +.main-list { + height: 100%; + overflow: hidden; +} + +.main-list .nothing-to-see { + text-align: center; + padding:50px 20px; +} + +.main-list .nothing-to-see span { + font-size: 17px; +} +.main-list .popover { + width: 375px; +} + +.list-header .summary .filter-action:hover { + color: #36a7c4; +} + +.main-list .list-subheader { + margin-top: 40px; + position: relative; + z-index: 1; + border-bottom: 1px solid #f2f2f2; +} + +.main-list .list-subheader > .btn-group { + margin: 10px 5px 10px 10px; +} + +.full-list li.more { + padding: 10px 15px; + background-color: #ffffff; + color: #666666; +} + +.full-list li.more i.icon { + font-size: 70%; +} + +.full-list { + list-style: none; + padding: 0; + margin-bottom: 0; +} + +.full-list li { + position: relative; + display: block; + border-bottom: 1px solid #f5f5f5; + cursor: pointer; + padding: 2px 0px 2px 0px; +} + +.full-list li .badge, .simple-list li .badge{ + font-size: 12px; + line-height: 12px; + + padding-right: 0; + border-radius: 3px; + background-color: #e8edf1; + color: #36a7c4; + background-color: transparent; + font-weight: normal; + +} + + +.full-list li.active { + background-color: #fafafb; +} + +.full-list li:hover { + background-color: #fafafb; +} + +.full-list li > div:hover { + border-color: #d8dde1; +} + +.full-list li > div { + margin: 0 6px 0 4px; + border-left: 4px solid #e8edf1; + min-height: 50px; + padding: 5px 5px 5px 5px; +} + +.full-list li.active > div { + border-left-color: #36a7c4; +} + +.full-list li .title { + font-size: 16px; + margin: 0 0 0 5px; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.full-list li .summary { + clear: both; + margin: 3px 5px 0px 5px; + font-size: 13px; + color: #1a1a1a; + white-space: nowrap; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; +} + +.full-list li .detail { + margin: 0 5px; + font-size: 12px; + color: #999999; + white-space: nowrap; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; +} + +.main-content { + border: 1px solid #cccccc; + + + height: 100%; + max-height: 100%; + overflow: hidden; + padding-bottom: 10px; +} + +.main-content-wrapper { + height: 100%; + max-height: 100%; + overflow: hidden; + -webkit-box-shadow: 2px 2px 2px 0px rgba(220,220,220,0.50); + -moz-box-shadow: 2px 2px 2px 0px rgba(220,220,220,0.50); + box-shadow: 2px 2px 2px 0px rgba(220,220,220,0.50); +} + +.main-content > .header { + background-color: #e8edf1; + min-height: 60px; + border-bottom: 1px solid #a4acb9; + padding: 15px 15px; +} + +.main-content > .header h2 { + margin: 0 0 5px 0; + font-size: 26px; +} + +.main-content > .header .btn:hover, .main-content > .header .btn:focus { + border-color: #e8edf1; + color: #ffffff; +} + + .modal-header .label, .header .label { + padding: 0 3px 0 15px; + color: #1a1a1a; + font-weight: normal; + font-size: 13px; + color: #666666; +} + +.header > .detail >.label:first-child { + padding-left: 0; +} + +.header .detail a { + color: #1a1a1a; +} + +.header .detail a:hover { + color: #36a7c4; + text-decoration: underline; +} + +.jumpers { + list-style: none inside; + padding: 0 10px 10px 10px; + margin: 5px 0px 0 0px; + border-bottom: 1px solid #eeeeee; +} + +.jumpers li { + display: inline-block; + border: 1px solid #e8edf1; + margin: 5px 0 0 2px; + padding: 5px 25px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + cursor: pointer; +} + +.jumpers li.pending { + border: 1px dotted #d8dde1; +} + +.jumpers li:hover { + background-color: #f8f8f9; +} + +.jumpers li.selected { + color: white; + background-color: #36a7c4; +} + + +.jumpers li span { + background-color: #f2f2f2; + padding: 1px 5px; + margin-left: 5px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + color: #999999; +} + +.jumpers li:hover span { + background-color: #e2e2e2; +} + + + +.section { + margin: 10px 0; + padding: 10px 0 0px 0; + min-height: 120px; +} + +.section.pack { + min-height: inherit; +} + +.col-xs-12.seperator { + height: 1px; + border-top: 1px solid #eeeeee; + margin: 5px 0; +} + +.section > h3 { + position: relative; + margin: 0px; + font-size: 18px; + cursor: pointer; +} + +.section > h3 .action > a { + font-weight: bold; + padding-left: 5px; + color: #999999; +} + + +.section > .form-group, .section > div > .form-group { + margin: 5px 0; +} + +.modal-backdrop { + background-color: #999999; /** Non alpha-supporting browser fallback */ + background-color: rgba(100, 100, 100, .75); +} +.modal-content { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + border: none; +} + +.modal-dialog.wide { + margin-left: auto; + margin-right: auto; + width: 80%; + max-width: 1200px; +} + +.modal-body { +} + + +.modal .modal-header { + position: relative; + background-color: #e8edf1; + min-height: 60px; + border-bottom: 1px solid #a4acb9; + padding: 15px 15px; +} + +.modal-header .actions { + margin-right: 20px; +} + +.modal-body .form-actions { + border-top: 1px solid #eeeeee; + margin: 0 -30px; + padding: 10px 10px 10px 10px; +} + +.modal-body.includes-footer { + padding-bottom: 0px; +} + +.fullscreen .modal-header h3 { + margin: 0 0 5px 0px; + font-size: 22px; +} + +.fullscreen .modal-header h3 .summary { + font-size: 13px; +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/css/style-editor.css b/src/main/resources/static/activiti-editor/editor-app/css/style-editor.css new file mode 100644 index 0000000..bce6fa7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/css/style-editor.css @@ -0,0 +1,639 @@ +/** + Colors: + + - Header: #333333 + - Subheader: #e8edf1 + - Subheader border: #a4acb9 + - Highlight buttons/text: #36a7c4 + - Text color: #1a1a1a + - Filter color: #373e48 + - Dark highlight: #606b7d + + */ +.container-fluid { + max-width: 1400px; + min-width: 1000px; + margin: 0 auto; +} + +.subtle-select .glyphicon { + visibility: hidden; + padding-left: 5px; +} + +a.subtle-select:hover .glyphicon { + visibility: visible; +} + +.full { + padding: 0 15px; + width: 100%; +} + +.inline { + display: inline; +} + +.greyish { + color: #afafaf; +} + +.roweditor-canvas { + margin-top: 50px; +} + +.no-pad { + margin: 0; + max-width: 1300px; + min-width: 1100px; +} + +.content.no-pad { + max-width: 100%; + min-width: 100%; +} + +.inset .col-sm-3 { + margin-left: -15px; +} +.no-pad > div{ + padding: 0; +} + + +.dropdown-toggle .icon-caret-down { + padding-left: 10px; + font-size: 85%; +} + +h1 { + margin: 0 0 0 15px; + padding: 0; + font-size: 22px; + line-height: 40px; + border: none; + color: #ffffff; + font-family: 'Lato', sans-serif; +} + +.truncate, .truncate > span { + white-space: nowrap; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; +} + +.subheader .details .counter { + top: -1px; + line-height: 1; + display: inline-block; + padding: 2px 6px; + min-width: 20px; + background-color: #e8edf1; + color: #333333; +} + +.subheader .subtle-select { + margin: -6px 0 0 -8px; +} + +.btn .icon-and-label { + padding-right: 5px; +} + +.dropdown-menu .title { + margin: 5px 10px 0px 10px; + font-size: 17px; + min-width: 250px; +} + +.dropdown-menu ul { + list-style: none; + list-style-position: inside; + padding: 5px 10px; +} + +.input-group-addon { + background-color: transparent; +} + +/* List Filter */ +.filter-wrapper { + min-height: 400px; + margin-top: 10px; + margin-left: -15px; +} + +ul.filter-list { + list-style: none; + list-style-position: inside; + padding-left: 0px; + padding-top: 10px; +} + +ul.filter-list li a { + display: block; + color: #373e48; + font-size: 17px; + margin: 10px 5px 10px 0px; + padding-left: 10px; +} + +ul.filter-list li.current a { + color: #36a7c4; + padding-left: 5px; + border-left: 4px solid #36a7c4; +} + +ul.filter-list li a:hover, ul.filter-list li a:focus { + text-decoration: none; + background-color: #e8edf1; +} + +ul.filter-list li.current a:hover, ul.filter-list li.current a:focus { + background-color: transparent; + color: #36a7c4; + cursor: default; + text-decoration: none; +} + + +/* Result items */ + + +.item-wrapper { + padding-left: 0; + margin-top: 5px; +} + +.item-wrapper .message { + text-align: left; + margin-left: 5px; + line-height: 40px; + color: #606b7d; +} +.item-wrapper .message span { + font-size: 14px; +} + +.item-wrapper .item { + width: 25%; + padding: 0; + margin: 0; + float: left; +} + +.item-wrapper .item .btn-default.disabled, +.item-wrapper .item .btn-default[disabled], +.item-wrapper .item .btn-default[disabled]:active, +.item-wrapper .item .btn-default[disabled]:hover { + border-color: #ffffff; + cursor: default; +} + +.item-wrapper .item .item-box { + margin: 5px; + border: 1px solid #e8edf1; + height: 250px; + overflow: hidden; + cursor: pointer; + background-repeat: no-repeat; + background-position: center 20px; + background-size: auto; + position: relative; +} + +.item-box .details { + position: relative; + background-color: #e8edf1; + height: 160px; + margin-top: 120px; + padding: 5px; + color: #373e48; + font-size: 13px; + + transition: margin-top .5s ease; + -moz-transition: margin-top .5s ease; + -webkit-transition: margin-top .5s ease; + -o-transition: margin-top .5s ease; +} + +.item-box:hover .details, .item-box.active .details { + margin-top: 50px; +} + +.item-box .actions { + padding: 5px; + height: 45px; +} + +.item-box .actions .btn-group { + visibility: hidden; +} + +.item-box:hover .actions .btn-group, .item-box.active .actions .btn-group { + visibility: inherit; +} + + +.item-box .details h3 { + font-size: 14px; + margin: 0; + padding: 2px; + color: #373e48; +} + +.item-box .details span { + display: block; + margin-top: 5px; +} + +.item-box .details span i { + padding-right: 10px; + padding-left: 5px; +} + +.item-box .details .basic-details { + min-height: 60px; +} + +.item-box .details p { + width: 100%; + height: 70px; + font-size: 12px; + overflow: hidden; +} + +.create-inline { + padding: 100px 20px 80px 20px; + border: 1px solid #e8edf1; +} +.create-inline span { + display: block; + font-size: 18px; + color: #1a1a1a; + text-align: center; + margin-bottom: 20px; +} + +.create-inline .glyphicon { + margin-right: 10px; +} + +.show-more { + clear: both; + height: 50px; + text-align: center; + padding-top: 5px; + margin: 5px; +} + +.show-more a { + display: block; + padding: 5px; + font-size: 15px; + text-decoration: none; + cursor: pointer; + color: #666666; +} + +.show-more a:hover { + color: #1a1a1a; + background: #e8edf1; +} + +.content-canvas-wrapper { + -moz-box-shadow: inset 0 3px 3px -4px #ababab; + -webkit-box-shadow: inset 0 3px 3px -4px #ababab; + box-shadow: inset 0 3px 3px -4px #ababab; + margin: 15px 7px 0 7px; + z-index: 0; +} +.content-canvas { + background-color: #f9f9f9; + margin: 0 3px 0 3px; + + -moz-box-shadow: inset 0 3px 3px -4px #ababab; + -webkit-box-shadow: inset 0 3px 3px -4px #ababab; + box-shadow: inset 0 3px 3px -4px #ababab; + + padding: 20px; +} + + +.content-canvas h3 { + margin-bottom: 5px; +} + +.content-canvas .no-results{ + color: #999999; + font-size: 16px; + margin: 10px 0px; +} + +.content-canvas .item-wrapper { + margin: 5px 10px; +} + +/* History */ +table.history { + margin: 0; + padding: 0; +} + +.subheader table.history { + min-width: 250px; +} + +table.history td { + vertical-align: middle; +} + +table.history tr td:last-child { + width: 90%; +} + +table.history tr:hover { + background-color: #f3f6f8; + cursor: pointer; +} +table.history tr.current:hover { + background-color: #e8edf1; + cursor: inherit; +} + + +table.history a:hover { + text-decoration: none; + +} + +table.history .version { + font-size: 30px; + display: inline-block; + color: #36a7c4; + padding: 5px 10px; + vertical-align:middle; + color: #36a7c4; +} + +table.history .detail { + padding: 5px 5px; + font-size: 15px; + color: #1a1a1a; + display: inline-block; +} + +table.history tr.current { + font-weight: bold; + background-color: #e8edf1; +} +table.history tr.current td { + background-color: #e8edf1; +} + +.comments { + clear: both; + width: 350px; + border-top: 1px solid #eeeeee; + margin-top: 5px; + max-height: 350px; + overflow: auto; +} + +.comment { + margin: 10px 0px 20px 0px; + font-size: 12px; +} + +.comment .date { + color: #999999; + font-size: 12px; +} + +.comment .author { + color: #36a7c4; + font-size: 18px; +} + +.comment p { + word-wrap: break-word; +} + +.modal.modal-wide .modal-dialog { + width: 1000px; +} + +.modal-dialog.modal-wide { + width: 1000px; +} + +.modal-body p { + font-size: 15px; +} + +.modal-body p.danger { + color: #d35f5f; + margin-top: 10px; +} + +.form-group .inline-help { + font-size: 11px; + color: #666666; + margin-top: 5px; +} + +.form-group .message { + color: #1a1a1a; + font-size: 14px; +} + +.people-select > .selection { + width: 100%; + text-align: left; +} +.popup-wrapper .people-select { + max-height: 160px; +} + +.people-select .nothing-to-see { + padding: 5px 0; + + color: #999999; +} + +.inline-people-select { + max-height: 120px; + overflow: auto; +} + +/** Center tabbed pane */ +.center-pane { + overflow: auto; + padding-bottom: 20px; +} + +.center-pane .content { + overflow: hidden; +} +.center-pane .tab-actions { + padding: 8px; +} + +.center-pane .tabs-wrapper > .pull-right { + margin-right: 5px; +} +.center-pane .content { + padding: 10px; +} + +.center-pane.content { + padding: 0; +} + +.center-pane .content .tabs, .center-pane.content .tabs { + padding-left: 15px; +} + +.center-pane .content .tabs > li a, .center-pane.content .tabs > li a { + padding: 8px 30px; +} + +.center-pane .header h1 { + font-size: 30px; + margin: 0; + padding:0; +} + +.center-pane .header h2 { + font-size: 24px; + margin: 0 0 5px 0; + padding:0; +} + +.center-pane .header { + padding: 5px 10px 25px 10px; +} + + +.center-pane .header.compact { + padding-bottom: 5px; +} + +.center-pane .well { + -moz-border-radius: 0px; + -webkit-border-radius: px; + border-radius: 0px; + background-color: #f9f9f9; + padding: 12px 10px; + margin: 15px 0 0 0; + border: 1px solid #eeeeee; +} + +/** General button styling */ +.btn.btn-clean { + border: none; + background-color: transparent; + font-size: 24px; + padding: 2px 6px; + color: #444444; + + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-clean:hover .icon-remove { + color: #a02828; +} + +.btn-clean:focus, .btn-clean:hover { + color: #5f8dd3; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + + +.btn-clean:active { + color: #2c5aa0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +/* Show list in popup */ + +ul.list { + list-style: none inside; + padding: 0px; + margin-bottom: 3px; +} + +ul.list>li { + line-height: 30px; + margin: 0; + padding: 4px; + cursor: pointer; +} + +.popup-wrapper ul.list>li { + border-top: 1px solid #eeeeee; +} + +.popup-wrapper ul.list>li:last-child { + border-bottom: 1px solid #eeeeee; +} + +ul.list>li:hover, ul.list>li.active { + background-color: #f2f2f2; +} + +ul.list >li .actions { + float:right; + margin: 0px 0px 0px 5px; + visibility: hidden; +} + +ul.list>li:hover .actions { + visibility: inherit; +} + +/** Animations **/ +.fadein.ng-enter, +.fadein.ng-move { + -webkit-transition: 0.5s linear opacity; + transition: 0.5s linear all; +} + +.fadein.ng-enter { + opacity:0; +} +.fadein.ng-enter.ng-enter-active { + opacity:1; +} + +.fadein.ng-move { + opacity:0.5; +} +.fadein.ng-move.ng-move-active { + opacity:1; +} + +.popup-error { + color: red; + padding: 0 5px 8px 0; +} + +/** Passwords */ + +.password-field { + width: 320px; +} + +/** LOADING */ + +.message .loading { + line-height: 40px; + margin-left: 0px; +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/css/style.css b/src/main/resources/static/activiti-editor/editor-app/css/style.css new file mode 100644 index 0000000..b491693 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/css/style.css @@ -0,0 +1,477 @@ +@font-face { + font-family: 'ActivitiModeler'; + src: url('../fonts/activiti-admin-webfont.eot'); + src: url('../fonts/activiti-admin-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/activiti-admin-webfont.woff') format('woff'), + url('../fonts/activiti-admin-webfont.ttf') format('truetype'), + url('../fonts/activiti-admin-webfont.svg#activitimodelerregular') format('svg'); + font-weight: normal; + font-style: normal; +} + +.row-no-gutter .col-xs-9 { + padding-left: 0px; + padding-right: 0px; + z-index: 50; +} + +.row-no-gutter .col-xs-3 { + padding-left: 0px; + padding-right: 0px; + z-index: 100; +} + +.editor-item-picker { + height: 400px; + max-height: 400px; + min-height: 400px; + overflow: auto; +} + +.editor-item-picker-component { + height: 185px; + max-height: 185px; + overflow: hidden; +} + +.editor-toolbar { + padding-left: 5px; +} + +.editor-toolbar > .btn-group { + margin: 12px 15px 0px 0px; +} + +.editor-toolbar > .btn-group.pull-right { + margin: 0; +} + +.editor-toolbar .btn.btn-inverse { + font-size: 24px; + color: #FFFFFF; + border-color: rgba(0, 0, 0, 0); + padding: 3px 6px 0px 6px; + box-shadow: none; + text-shadow: none; + text-align: center; + border: none; + margin: 0px 0px 0px 5px; + height: 36px; + min-width: 36px; +} +.editor-toolbar .btn.btn-inverse.pressed { + background-color: #287d92; + color: #174753; +} + +.editor-toolbar .btn.btn-inverse.disabled, .editor-toolbar .btn.btn-inverse[disabled], .editor-toolbar .btn.btn-inverse[disabled]:active, .editor-toolbar .btn.btn-inverse[disabled]:hover { + background-color: #668b94; + border-color: #668b94; +} + +.editor-toolbar .btn.btn-inverse.separator { + background: transparent; + padding: 4px 5px 0px 5px; + width: 1px; + min-width: 1px; +} + +.editor-toolbar .toolbar-separator { + background: #a4acb9; + width: 1px; + height: 30px; +} + +.stencils { + border-right: 1pt solid #c7cacd; + overflow: auto; + z-index: 5000; +} + +.stencils ul { + padding-left: 0; +} + +.stencils > div { + margin-top: 10px; +} + +.stencil-group { + list-style: none; + list-style-position: outside; + margin: 0px 15px 0px 0px; +} + + +.stencil-group > li { + list-style: none; + list-style-position: outside; + margin: 0px 0px 5px 15px; + background-color: #ffffff; + font-family: Arial, Regular; + font-size: 17px; + color: #323437; +} + +.stencil-group > li > span { + margin-left: 5px; + padding-top:5px; + padding-bottom: 5px; + display: block; + cursor: pointer; +} + +.stencil-group > li > span > i { + font-size: 12px; + line-height: 17px; +} +.stencil-group > li > ul { + list-style: none; + list-style-position: inside; + background-color: transparent; + margin: 0px; + overflow: hidden; + padding-left: 20px; +} + +.stencil-group.collapsed > li { + color: #000000; +} +.stencil-group.collapsed > li > ul { + max-height: 0px; + padding-top: 0; + padding-bottom: 0; +} + +.stencil-group-non-root > li { + background-color: #ffffff; +} + +.stencil-item { + cursor: pointer; + padding: 5px; +} + +.root-stencil-item { + margin: 0 0 0 15px; + font-family: Arial, Regular; + font-size: 17px; +} + +.ui-draggable.stencil-item.stencil-item-dragged { + display: block; + text-overflow: ellipsis; + white-space: nowrap; +} + + +/* Modeling Canvas +-------------------------------- */ +div.canvas-wrapper { + overflow: auto; + background-color: #F8F8F8; +} + +.canvas_resize_indicator i { + font-size: 15px; + color: #ffffff; + cursor: pointer; +} + +.canvas_resize_indicator.N, .canvas_resize_indicator.S, .canvas_resize_indicator.E, .canvas_resize_indicator.W { + background: #5fbcd3; + height: 17px; + width: 17px; + text-align: center; + -webkit-border-radius:3px; + -moz-border-radius:3px; + border-radius:3px; +} + +#canvas-grow-N.canvas_resize_indicator, #canvas-shrink-S.canvas_resize_indicator { + margin: 0; + top: auto; +} + +#canvas-grow-S.canvas_resize_indicator, #canvas-shrink-N.canvas_resize_indicator { + margin: 0; + bottom: auto; +} + +#canvas-grow-E.canvas_resize_indicator, #canvas-shrink-W.canvas_resize_indicator { + margin: 0; + right: auto; +} + +#canvas-grow-W.canvas_resize_indicator, #canvas-shrink-E.canvas_resize_indicator { + margin: 0; + left: auto; +} + +.x-panel-body.x-panel-body-noheader.x-panel-body-noborder, .ORYX_Editor x-panel { + background-color: #F8F8F8; +} + +.canvas-message { + position: absolute; + top: 60px; + right: 10px; + background: transparent; + font-size: 10pt; +} + + +div.propertySection { + height: 250px; + background-color: #e8edf1; + margin-bottom: 0px; +} + +.selected-item-title { + font-size: 25px; + font-weight: bold; + padding: 8px 0 8px 8px; + border-bottom: 1px solid #a4acb9; + cursor: pointer; +} + +.selected-item-title a { + display: block; + color: #1a1a1a; +} + +.selected-item-title .glyphicon { + line-height: 25px; + font-size: 14px; +} + +.selected-item-title a:hover, .selected-item-title a:focus { + color: #1a1a1a; + text-decoration: none; +} + +.selected-item-section > div > .pull-right { + line-height: 50px; + margin: 0px 10px; + font-size: 14px; +} + +.selected-item-body .property-row { + float: left; + width: 50%; + border: 0; + margin: 0; + padding: 0; + font-size: 13px; + overflow: hidden; +} + +.selected-item-body .property-row:hover { + background-color: #d7dfe6; +} + +.selected-item-body { + padding: 0; + overflow: auto; + height: 199px; +} + +.selected-item-body > div { + overflow: hidden; + margin: 5px 20px; +} + +.property-row > span { + display: block; + float: left; + margin: 2px 2%; + padding: 0; + min-height: 25px; +} + +.property-row span.value { + cursor: pointer; + width: 46%; + padding: 0; + margin: 0; +} + +.property-row span.value:hover { + cursor: pointer; +} + +.property-row span.title { + font-size: 13px; + font-weight: bold; + width: 46%; +} + +.property-row span.title-removed { + font-size: 13px; + font-weight: normal; + width: 46%; +} + +.propertySection.collapsed { + max-height: 50px; + height: 50px; + overflow: hidden; +} + +.propertySection.collapsed .selected-item-title { + border: none; +} + +.property-row input[type="text"] { + height: 25px; + margin: 2px 0; + padding: 0px 5px; + width: 100%; + outline: none; + border:none !important; + box-shadow:none !important; +} + +.default-grid { + border: 1px solid rgb(212,212,212); + width: 100%; + height: 300px; + margin-bottom: 10px; +} + +.kis-listener-grid { + border: 1px solid rgb(212,212,212); + width: 100%; + height: 200px; + margin-bottom: 10px; +} + +.kis-field-grid { + border: 1px solid rgb(212,212,212); + width: 100%; + height: 150px; + margin-bottom: 10px; +} + +.saving-text { + display: table; + margin: 0 auto; + padding: 20px 0 0px 0; +} + + +.form-property-checkbox { + margin:0; +} + +/* Oryx overrides +-------------------------------- */ +ul.x-menu-list { + list-style: none; + list-style-position: inside; + width: 200px; + background-color: #FFFFFF; + border: 1px solid #E1E2E5; + -webkit-border-radius:3px; + -moz-border-radius:3px; + border-radius:3px; + padding: 3px; +} + +img.x-menu-item-icon { + width: auto; + height: auto; + margin-right: 5px; +} + +li.x-menu-list-item { + margin: 3px 0px; +} + +li.x-menu-list-item.x-menu-item-active { + background-color: #EFEFEF; +} + +li.x-menu-list-item a { + color: #000000; +} + +li.x-menu-list-item.x-menu-item-active a { + text-decoration: none; +} + +.sequence-flow-order-element { + margin: 12px 0 12px 0; +} + +/* Editor icon font */ +.editor-icon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'ActivitiModeler'; + font-style: normal; + font-weight: 400; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.editor-icon-save:before { + content: 'a'; +} + +.editor-icon-edit:before { + content: 'b'; +} + +.editor-icon-cut:before { + content: 'c'; +} + +.editor-icon-copy:before { + content: 'd'; +} + +.editor-icon-paste:before { + content: 'e'; +} +.editor-icon-delete:before { + content: 'f'; +} +.editor-icon-redo:before { + content: 'h'; +} +.editor-icon-undo:before { + content: 'g'; +} +.editor-icon-same-size:before { + content: 'i'; +} +.editor-icon-zoom-in:before { + content: 'k'; +} +.editor-icon-zoom-out:before { + content: 'l'; +} +.editor-icon-zoom-actual:before { + content: 'm'; +} +.editor-icon-zoom-fit:before { + content: 'j'; +} +.editor-icon-bendpoint-add:before { + content: 'n'; +} +.editor-icon-bendpoint-remove:before { + content: 'o'; +} +.editor-icon-align-horizontal:before { + content: 'p'; +} +.editor-icon-align-vertical:before { + content: 'q'; +} +.editor-icon-close:before { + content: "X"; +} diff --git a/src/main/resources/static/activiti-editor/editor-app/editor-config.js b/src/main/resources/static/activiti-editor/editor-app/editor-config.js new file mode 100644 index 0000000..3bf4720 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor-config.js @@ -0,0 +1,32 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +var KISBPM = KISBPM || {}; + +KISBPM.CONFIG = { + 'showRemovedProperties' : false +}; + +KISBPM.HEADER_CONFIG = { + 'showAppTitle' : true, + 'showHeaderMenu' : true, + 'showMainNavigation' : true, + 'showPageHeader' : true +}; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/editor-controller.js b/src/main/resources/static/activiti-editor/editor-app/editor-controller.js new file mode 100644 index 0000000..d3778d9 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor-controller.js @@ -0,0 +1,65 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +angular.module('activitiModeler') +.controller('EditorUnsavedChangesPopupCrtl', ['$rootScope', '$scope', '$http', '$location', '$window', function ($rootScope, $scope, $http, $location, $window) { + + $scope.ok = function () { + if ($scope.handleResponseFunction) { + $scope.handleResponseFunction(true); + + // Also clear any 'onbeforeunload', added by oryx + $window.onbeforeunload = undefined; + } + $scope.$hide(); + }; + + $scope.cancel = function () { + if ($scope.handleResponseFunction) { + $scope.handleResponseFunction(false); + } + $scope.$hide(); + }; +}]); + +activitiModule +.directive('autoFocus', ['$timeout', '$parse', function($timeout, $parse) { + return { + restrict: 'AC', + compile: function($element, attr) { + + return function(_scope, _element, _attrs) { + var firstChild = (_attrs.focusFirstChild !== undefined); + $timeout(function () { + if (firstChild) { + // look for first input-element in child-tree and focus that + var inputs = _element.find('input'); + if (inputs && inputs.length > 0) { + inputs[0].focus(); + } + } else { + // Focus element where the directive is put on + _element[0].focus(); + } + }, 100); + } + } + }; +}]); diff --git a/src/main/resources/static/activiti-editor/editor-app/editor-utils.js b/src/main/resources/static/activiti-editor/editor-app/editor-utils.js new file mode 100644 index 0000000..e97a4c8 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor-utils.js @@ -0,0 +1,135 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * Utility methods are grouped together here. + */ +var EDITOR = EDITOR || {}; + +EDITOR.UTIL = { + + getParameterByName: function (name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), + results = regex.exec(location.search); + return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); + }, + + /** + * Starts at the provided start element, and walks all preceding elements in the graph. + * Each element is tested to have a certain property and, if it has, adds this property value + * to the return result list. + */ + collectPropertiesFromPrecedingElements: function (startElement, propertyType) { + var visitedElements = []; + var collectedProperties = []; + EDITOR.UTIL._visitElementAndCollectProperty(startElement, propertyType, visitedElements, collectedProperties); + return collectedProperties; + }, + + /** + * Starts at the provided start element, and walks all preceding elements in the graph. + * Each element is tested to be a specific stencil id and, if it has, adds the element + * to the return result list. + */ + collectElementsFromPrecedingElements: function (startElement, stencilId) { + var visitedElements = []; + var collectedElements = []; + + var incomingShapesIterator = startElement.getIncomingShapes(); + if (incomingShapesIterator) { + for (var i = 0; i < incomingShapesIterator.length; i++) { + var incomingShape = incomingShapesIterator[i]; + if (visitedElements.indexOf(incomingShape.id) < 0) { + EDITOR.UTIL._visitElementAndCollectElement(incomingShape, stencilId, visitedElements, collectedElements); + } + } + } + + return collectedElements; + }, + + _visitElementAndCollectProperty: function (element, propertyType, visitedElementsArray, collectedProperties) { + + visitedElementsArray.push(element.id); + + var property = element.properties[propertyType] + if (property) { + collectedProperties.push(property); + } + + var incomingShapesIterator = element.getIncomingShapes(); + if (incomingShapesIterator) { + for (var i = 0; i < incomingShapesIterator.length; i++) { + var incomingShape = incomingShapesIterator[i]; + if (visitedElementsArray.indexOf(incomingShape.id) < 0) { + EDITOR.UTIL._visitElementAndCollectProperty(incomingShape, propertyType, visitedElementsArray, collectedProperties); + } + } + } + }, + + _visitElementAndCollectElement: function (element, stencilId, visitedElementsArray, collectedElements) { + + visitedElementsArray.push(element.id); + + var elementStencilId = element.getStencil().id(); + if (elementStencilId && elementStencilId.indexOf(stencilId) >= 0) { + collectedElements.push(element); + } + + var incomingShapesIterator = element.getIncomingShapes(); + if (incomingShapesIterator) { + for (var i = 0; i < incomingShapesIterator.length; i++) { + var incomingShape = incomingShapesIterator[i]; + if (visitedElementsArray.indexOf(incomingShape.id) < 0) { + EDITOR.UTIL._visitElementAndCollectElement(incomingShape, stencilId, visitedElementsArray, collectedElements); + } + } + } + }, + + /** + * Goes up the chain of parents of the provided element. + * When the property is encountered, its value is immediately returned. + * If the chain of parents is completely walked through, undefined is returned. + */ + getPropertyFromParent: function (element, propertyType) { + if (element.parent) { + return EDITOR.UTIL._getPropertyFromParent(element.parent, propertyType); + } else { + return undefined; + } + + }, + + _getPropertyFromParent: function (parentElement, propertyType) { + var property = parentElement.properties[propertyType]; + if (property) { + return property; + } + + if (parentElement.parent) { + return EDITOR.UTIL._getPropertyFromParent(parentElement.parent, propertyType); + } else { + return undefined; + } + } + +}; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/editor.html b/src/main/resources/static/activiti-editor/editor-app/editor.html new file mode 100644 index 0000000..d8defb7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor.html @@ -0,0 +1,136 @@ +<div ng-controller="StencilController"> + <div class="subheader editor-toolbar" id="editor-header"> + <div class="btn-group"> + <div class="btn-toolbar pull-left" ng-controller="ToolbarController" ng-cloak> + <button id="{{item.id}}" + title="{{item.title | translate}}" + ng-repeat="item in items" + ng-switch on="item.type" + class="btn btn-inverse" ng-class="{'separator': item.type == 'separator'}" + ng-disabled="item.type == 'separator' || item.enabled == false" + ng-click="toolbarButtonClicked($index)"> + <i ng-switch-when="button" ng-class="item.cssClass" class="toolbar-button" data-toggle="tooltip" title="{{item.title | translate}}"></i> + <div ng-switch-when="separator" ng-class="item.cssClass"></div> + </button> + </div> + </div> + <div class="btn-group pull-right" ng-show="!secondaryItems.length"> + <div class="btn-toolbar pull-right" ng-controller="ToolbarController"> + <button title="{{item.title | translate}}" ng-repeat="item in secondaryItems" ng-switch on="item.type" class="btn btn-inverse" ng-class="{'separator': item.type == 'separator'}" + ng-disabled="item.type == 'separator'" ng-click="toolbarSecondaryButtonClicked($index)" id="{{item.id}}"> + <i ng-switch-when="button" ng-class="item.cssClass" class="toolbar-button" data-toggle="tooltip" title="{{item.title | translate}}"></i> + <div ng-switch-when="separator" ng-class="item.cssClass"></div> + </button> + </div> + </div> + </div> + <div class="full"> + <div class="row row-no-gutter"> + <div id="paletteHelpWrapper" class="col-xs-3"> + <div class="stencils" id="paletteSection"> + <div ng-if="stencilItemGroups.length > 1"> + <div ng-repeat="group in stencilItemGroups"> + + <ul ng-if="group.visible && group.items" class="stencil-group" ng-class="{collapsed: !group.expanded, 'first': $first}"> + <li ng-include="'editor-app/partials/stencil-item-template.html?version=4'"></li> + </ul> + + <div ng-if="!group.items" ng-include="'editor-app/partials/root-stencil-item-template.html?version=4'"></div> + + </div> + </div> + <div ng-if="stencilItemGroups.length == 1"> + <ul class="stencil-group"> + <li ng-repeat="item in stencilItemGroups[0].paletteItems" class="stencil-item" + id="{{item.id}}" + title="{{item.description}}" + ng-model="draggedElement" + data-drag="true" + jqyoui-draggable="{onStart:'startDragCallback', onDrag:'dragCallback'}" + data-jqyoui-options="{revert: 'invalid', helper: 'clone', opacity : 0.5}"> + + <img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{item.icon}}" width="16px;" height="16px;"/> + {{item.name}} + </li> + </ul> + </div> + </div> + </div> + <div id="canvasHelpWrapper" class="col-xs-9"> + <div class="canvas-wrapper" id="canvasSection" + ng-model="droppedElement" + ng-model="droppedElement" + data-drop="true" + data-jqyoui-options + jqyoui-droppable="{onDrop:'dropCallback',onOver: 'overCallback', onOut: 'outCallback'}"> + <div class="canvas-message" id="model-modified-date"></div> + <div class="Oryx_button" + id="delete-button" + title="{{'BUTTON.ACTION.DELETE.TOOLTIP' | translate}}" + ng-click="deleteShape()" + style="display:none"> + <img src="editor-app/images/delete.png"/> + </div> + <div class="Oryx_button" + id="morph-button" + title="{{'BUTTON.ACTION.MORPH.TOOLTIP' | translate}}" + ng-click="morphShape()" + style="display:none"> + <img src="editor-app/images/wrench.png"/> + </div> + <div class="Oryx_button" + ng-repeat="item in quickMenuItems" + id="{{item.id}}" + title="{{item.description}}" + ng-click="quickAddItem(item.id)" + ng-model="draggedElement" + data-drag="true" + jqyoui-draggable="{onStart:'startDragCallbackQuickMenu', onDrag:'dragCallbackQuickMenu'}" + data-jqyoui-options="{revert: 'invalid', helper: 'clone', opacity : 0.5}" + style="display:none"> + <img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{item.icon}}"/> + </div> + </div> + </div> + <div id="propertiesHelpWrapper" class="col-xs-9"> + <div class="propertySection" id="propertySection" + ng-class="{collapsed: propertyWindowState.collapsed}"> + <div class="selected-item-section"> + <div class="clearfix"> + <div class="pull-right" ng-if="selectedItem.auditData.createDate"> + <strong>{{'ELEMENT.DATE_CREATED' | translate}}: </strong> {{selectedItem.auditData.createDate}} + </div> + <div class="pull-right" ng-if="selectedItem.auditData.author"> + <strong>{{'ELEMENT.AUTHOR' | translate}}: </strong> {{selectedItem.auditData.author}} + </div> + <div class="selected-item-title"> + <a ng-click="propertyWindowState.toggle()"> + <i class="glyphicon" ng-class="{'glyphicon-chevron-right': propertyWindowState.collapsed, 'glyphicon-chevron-down': !propertyWindowState.collapsed}"></i> + <span ng-show="selectedItem.title != undefined && selectedItem.title != null && selectedItem.title.length > 0">{{selectedItem.title}}</span> + <span ng-show="!selectedItem || selectedItem.title == undefined || selectedItem.title == null || selectedItem.title.length == 0">{{modelData.name}}</span> + </a> + </div> + </div> + <div class="selected-item-body"> + <div> + <div class="property-row" ng-repeat="property in selectedItem.properties" + ng-click="propertyClicked($index)" ng-class="{'clear' : $index%2 == 0}"> + <span class="title" ng-if="!property.hidden">{{ property.title }} :</span> + <span class="title-removed" ng-if="property.hidden"><i>{{ property.title }} ({{'PROPERTY.REMOVED' | translate}}) :</i></span> + <span class="value"> + <ng-include + src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode"></ng-include> + <ng-include src="getPropertyReadModeTemplateUrl($index)" + ng-if="property.hasReadWriteMode && property.mode == 'read'"></ng-include> + <ng-include src="getPropertyWriteModeTemplateUrl($index)" + ng-if="property.hasReadWriteMode && property.mode == 'write'"></ng-include> + </span> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/css/editor.css b/src/main/resources/static/activiti-editor/editor-app/editor/css/editor.css new file mode 100644 index 0000000..0936639 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/css/editor.css @@ -0,0 +1,202 @@ +body, html { + font-family: tahoma,arial,helvetica,sans-serif; + font-size: 12px; +} + +/********* + * SVG Style + */ + +text, +text * { + cursor:default; + -webkit-user-select: none; +} + +/********* + * HEADER SECTION + * + */ + +#oryx_canvas_htmlContainer { + +} + +.ORYX_Editor { + background: white; + border: none; + margin:-5px; + margin-top:0px; + width:1200px; + height:600px; +} + +.icon-large { + width:18px !important; +} + +#oryxcanvas { + width:1200px; + height:600px; +} + +/** Resizer for the Canvas **/ +.canvas_resize_indicator_area { + + margin :auto; + display :block; + height :30px; + left :20%; + position :absolute; + text-align :center; + top :0; + width :60%; + +} + +.canvas_resize_indicator { + + width : 15px; + height : 15px; + position : absolute; + display : block; + margin : auto; + opacity : 0.6; +} + +.canvas_resize_indicator:hover { + + opacity : 1.0; +} +/** End Resizer **/ + +.Oryx_down { + +} + +.Oryx_button img { + width:16px; + height:16px; + top:0px; + left:0px; + line-height: 16px; +} + +.Oryx_Right .Oryx_button, +.Oryx_Left .Oryx_button, +.Oryx_Top .Oryx_button, +.Oryx_Bottom .Oryx_button { + opacity: 0.5; +} + +.Oryx_button.x-opacity-0 { + opacity: 0; + display:none; +} + +.Oryx_button.x-opacity-10 { + opacity: 0.1; +} + +.Oryx_button.x-opacity-20 { + opacity: 0.2; +} + +.Oryx_button.x-opacity-50 { + opacity: 0.5; +} + +.Oryx_Right:hover .Oryx_button, +.Oryx_Left:hover .Oryx_button, +.Oryx_Top:hover .Oryx_button, +.Oryx_Bottom:hover .Oryx_button { + opacity: 0.7; + display:block; +} + + +.Oryx_button img { + top:0px; +} + +.Oryx_Left img { + top:0px; +} + +.Oryx_button { + width:24px; + height:24px; + padding:2px; + position:absolute; + background-color: #ffffff; + background-color: rgba(255,255,255,0.7); + cursor: pointer; +} + +.Oryx_button_with_caption { + width:inherit; + height:16px; + padding:4px; + position:absolute; +} + +/*** Resizer ***/ + +.resizer_southeast, +.resizer_northwest { + width:12px; + height:12px; + position:relative; + background-color: transparent; + background-repeat:no-repeat; +} + +/*** Selection Frame ***/ + +.Oryx_SelectionFrame{ + position:absolute; + border:1px dotted gray; + background:none; +} + +.LoadingIndicator { + background-image: url('../../images/loading.gif'); +} + +.Oryx_hover, .Oryx_button:hover { + background-color: #999999; + background-color: rgba(193, 229, 238, 0.7); + opacity: 1 !important; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.ValidateButton { + width:24px; + height:24px; + padding:2px; + position:absolute; + cursor: pointer; +} + +.ValidateButton:hover { + background-color: #999999; + background-color: rgba(193, 229, 238, 0.7); + opacity: 1 !important; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.resizer_southeast { + background-image:url(../../images/se-handle-dark.gif); + cursor: se-resize; + background-position: 4px 4px; +} + +.resizer_northwest { + background-image:url(../../images/nw-handle-dark.gif); + cursor: nw-resize; + background-position: -2px -2px; +} diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_de.js b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_de.js new file mode 100644 index 0000000..0d588f0 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_de.js @@ -0,0 +1,383 @@ +/** + * @author nicolas.peters + * + * Contains all strings for German language. + * Version 1 - 08/29/08 + */ +if(!ORYX) var ORYX = {}; + +if(!ORYX.I18N) ORYX.I18N = {}; + +ORYX.I18N.Language = "de_DE"; //Pattern <ISO language code>_<ISO country code> in lower case! + +if(!ORYX.I18N.Oryx) ORYX.I18N.Oryx = {}; + +ORYX.I18N.Oryx.pleaseWait = "Editor wird geladen. Bitte warten..."; +ORYX.I18N.Oryx.notLoggedOn = "Nicht angemeldet"; +ORYX.I18N.Oryx.noBackendDefined = "Achtung! \n Es wurde kein Repository definiert.\n Ihr Model kann nicht geladen werden. Bitte nutzen sie eine Editor Konfiguration mit einem Speicher Plugin."; + +if(!ORYX.I18N.AddDocker) ORYX.I18N.AddDocker = {}; + +ORYX.I18N.AddDocker.group = "Docker"; +ORYX.I18N.AddDocker.add = "Docker Hinzufügen"; +ORYX.I18N.AddDocker.addDesc = "Fügen Sie einer Kante einen Docker hinzu, indem Sie auf die Kante klicken"; +ORYX.I18N.AddDocker.del = "Docker Löschen"; +ORYX.I18N.AddDocker.delDesc = "Löscht einen Docker durch Klicken auf den zu löschenden Docker"; + +if(!ORYX.I18N.Arrangement) ORYX.I18N.Arrangement = {}; + +ORYX.I18N.Arrangement.groupZ = "Z-Order"; +ORYX.I18N.Arrangement.btf = "In den Vordergrund"; +ORYX.I18N.Arrangement.btfDesc = "In den Vordergrund"; +ORYX.I18N.Arrangement.btb = "In den Hintergrund"; +ORYX.I18N.Arrangement.btbDesc = "In den Hintergrund"; +ORYX.I18N.Arrangement.bf = "Eine Ebene nach Vorne"; +ORYX.I18N.Arrangement.bfDesc = "Eine Ebene nach Vorne"; +ORYX.I18N.Arrangement.bb = "Eine Ebene nach Hinten"; +ORYX.I18N.Arrangement.bbDesc = "Eine Ebene nach Hinten"; +ORYX.I18N.Arrangement.groupA = "Alignment"; +ORYX.I18N.Arrangement.ab = "Unten ausrichten"; +ORYX.I18N.Arrangement.abDesc = "Unten ausrichten"; +ORYX.I18N.Arrangement.am = "Horizontal ausrichten"; +ORYX.I18N.Arrangement.amDesc = "Horizontal ausrichten"; +ORYX.I18N.Arrangement.at = "Oben ausrichten"; +ORYX.I18N.Arrangement.atDesc = "Oben ausrichten"; +ORYX.I18N.Arrangement.al = "Links ausrichten"; +ORYX.I18N.Arrangement.alDesc = "Links ausrichten"; +ORYX.I18N.Arrangement.ac = "Vertikal ausrichten"; +ORYX.I18N.Arrangement.acDesc = "Vertikal ausrichten"; +ORYX.I18N.Arrangement.ar = "Rechts ausrichten"; +ORYX.I18N.Arrangement.arDesc = "Rechts ausrichten"; +ORYX.I18N.Arrangement.as = "Größenangleichung"; +ORYX.I18N.Arrangement.asDesc = "Größenangleichung"; + +if(!ORYX.I18N.Edit) ORYX.I18N.Edit = {}; + +ORYX.I18N.Edit.group = "Edit"; +ORYX.I18N.Edit.cut = "Ausschneiden"; +ORYX.I18N.Edit.cutDesc = "Ausschneiden der selektierten Elemente"; +ORYX.I18N.Edit.copy = "Kopieren"; +ORYX.I18N.Edit.copyDesc = "Kopieren der selektierten Elemente"; +ORYX.I18N.Edit.paste = "Einfügen"; +ORYX.I18N.Edit.pasteDesc = "Einfügen von kopierten/ausgeschnittenen Elementen"; +ORYX.I18N.Edit.del = "Löschen"; +ORYX.I18N.Edit.delDesc = "Löschen der selektierten Elemente"; + +if(!ORYX.I18N.EPCSupport) ORYX.I18N.EPCSupport = {}; + +ORYX.I18N.EPCSupport.group = "EPC"; +ORYX.I18N.EPCSupport.exp = "EPML Export"; +ORYX.I18N.EPCSupport.expDesc = "Exportieren nach EPML"; +ORYX.I18N.EPCSupport.imp = "EPML Import"; +ORYX.I18N.EPCSupport.impDesc = "Importieren einer EPML Datei"; +ORYX.I18N.EPCSupport.progressExp = "Exportiere Modell"; +ORYX.I18N.EPCSupport.selectFile = "Wählen Sie eine EPML Datei aus, die Sie importieren möchten."; +ORYX.I18N.EPCSupport.file = "Datei"; +ORYX.I18N.EPCSupport.impPanel = "EPML Datei importieren"; +ORYX.I18N.EPCSupport.impBtn = "Importieren"; +ORYX.I18N.EPCSupport.close = "Schließen"; +ORYX.I18N.EPCSupport.error = "Fehler"; +ORYX.I18N.EPCSupport.progressImp = "Importiere..."; + +if(!ORYX.I18N.ERDFSupport) ORYX.I18N.ERDFSupport = {}; + +ORYX.I18N.ERDFSupport.exp = "ERDF Export"; +ORYX.I18N.ERDFSupport.expDesc = "Exportieren nach ERDF"; +ORYX.I18N.ERDFSupport.imp = "ERDF Import"; +ORYX.I18N.ERDFSupport.impDesc = "ERDF Datei importieren"; +ORYX.I18N.ERDFSupport.impFailed = "Anfrage für den Import der ERDF Datei ist fehlgeschlagen."; +ORYX.I18N.ERDFSupport.impFailed2 = "Während des Importierens ist ein Fehler aufgetreten. <br/>Fehlermeldung: <br/><br/>"; +ORYX.I18N.ERDFSupport.error = "Fehler"; +ORYX.I18N.ERDFSupport.noCanvas = "Das XML Dokument enthält keinen Oryx Canvas Knoten."; +ORYX.I18N.ERDFSupport.noSS = "Im XML Dokument ist kein Stencil Set referenziert."; +ORYX.I18N.ERDFSupport.wrongSS = "Das im XML Dokument referenzierte Stencil Set passt nicht zu dem im Editor geladenen Stencil Set."; +ORYX.I18N.ERDFSupport.selectFile = "Wählen sie eine ERDF Datei (.xml) aus oder geben Sie den ERDF Code im Textfeld ein."; +ORYX.I18N.ERDFSupport.file = "Datei"; +ORYX.I18N.ERDFSupport.impERDF = "ERDF importieren"; +ORYX.I18N.ERDFSupport.impBtn = "Importieren"; +ORYX.I18N.ERDFSupport.impProgress = "Importiere..."; +ORYX.I18N.ERDFSupport.close = "Schließen"; +ORYX.I18N.ERDFSupport.deprTitle = "Wirklich nach eRDF exportieren?"; +ORYX.I18N.ERDFSupport.deprText = "Der Export nach eRDF wird nicht empfohlen, da dieses Format in zukünftigen Versionen des Oryx Editors nicht mehr unterstützt wird. Verwenden Sie statt dessen den Export nach JSON, falls möglich. Wollen Sie dennoch das Model nach eRDF exportieren?"; + +if(!ORYX.I18N.jPDLSupport) ORYX.I18N.jPDLSupport = {}; + +ORYX.I18N.jPDLSupport.group = "ExecBPMN"; +ORYX.I18N.jPDLSupport.exp = "jPDL Export"; +ORYX.I18N.jPDLSupport.expDesc = "Exportieren nach jPDL"; +ORYX.I18N.jPDLSupport.imp = "jPDL Import"; +ORYX.I18N.jPDLSupport.impDesc = "jPDL Datei importieren"; +ORYX.I18N.jPDLSupport.impFailedReq = "Anfrage für den Import der jPDL Datei ist fehlgeschlagen."; +ORYX.I18N.jPDLSupport.impFailedJson = "Transformation der jPDL Datei ist fehlgeschlagen."; +ORYX.I18N.jPDLSupport.impFailedJsonAbort = "Import abgebrochen."; +ORYX.I18N.jPDLSupport.loadSseQuestionTitle = "Stencil Set Erweiterung für jBPM muss geladen werden"; +ORYX.I18N.jPDLSupport.loadSseQuestionBody = "Um jPDL importieren zu können, muss die Stencil Set Erweiterung für jBPM geladen werden. Möchten Sie fortfahren?"; +ORYX.I18N.jPDLSupport.expFailedReq = "Anfrage für den Export des Models ist fehlgeschlagen."; +ORYX.I18N.jPDLSupport.expFailedXml = "Export nach jPDL ist fehlgeschlagen. Exporter meldet: "; +ORYX.I18N.jPDLSupport.error = "Fehler"; +ORYX.I18N.jPDLSupport.selectFile = "Wählen sie eine jPDL Datei (.xml) aus oder geben Sie den jPDL Code im Textfeld ein."; +ORYX.I18N.jPDLSupport.file = "Datei"; +ORYX.I18N.jPDLSupport.impJPDL = "jPDL importieren"; +ORYX.I18N.jPDLSupport.impBtn = "Importieren"; +ORYX.I18N.jPDLSupport.impProgress = "Importiere..."; +ORYX.I18N.jPDLSupport.close = "Schließen"; + +if(!ORYX.I18N.Save) ORYX.I18N.Save = {}; + +ORYX.I18N.Save.group = "File"; +ORYX.I18N.Save.save = "Speichern"; +ORYX.I18N.Save.saveDesc = "Speichern"; +ORYX.I18N.Save.saveAs = "Speichern als..."; +ORYX.I18N.Save.saveAsDesc = "Speichern als..."; +ORYX.I18N.Save.unsavedData = "Das Diagramm enthält nicht gespeicherte Daten. Sind Sie sicher, daß Sie den Editor schließen möchten?"; +ORYX.I18N.Save.newProcess = "Neuer Prozess"; +ORYX.I18N.Save.saveAsTitle = "Speichern als..."; +ORYX.I18N.Save.saveBtn = "Speichern"; +ORYX.I18N.Save.close = "Schließen"; +ORYX.I18N.Save.savedAs = "Gespeichert als"; +ORYX.I18N.Save.saved = "Gespeichert"; +ORYX.I18N.Save.failed = "Das Speichern ist fehlgeschlagen."; +ORYX.I18N.Save.noRights = "Sie haben nicht die erforderlichen Rechte, um Änderungen zu speichern."; +ORYX.I18N.Save.saving = "Speichern"; +ORYX.I18N.Save.saveAsHint = "Das Diagramm wurde unter folgendem Link gespeichert:"; + +if(!ORYX.I18N.File) ORYX.I18N.File = {}; + +ORYX.I18N.File.group = "File"; +ORYX.I18N.File.print = "Drucken"; +ORYX.I18N.File.printDesc = "Drucken"; +ORYX.I18N.File.pdf = "PDF Export"; +ORYX.I18N.File.pdfDesc = "Exportieren nach PDF"; +ORYX.I18N.File.info = "Über"; +ORYX.I18N.File.infoDesc = "Über"; +ORYX.I18N.File.genPDF = "PDF wird generiert"; +ORYX.I18N.File.genPDFFailed = "Die Generierung der PDF Datei ist fehlgeschlagen."; +ORYX.I18N.File.printTitle = "Drucken"; +ORYX.I18N.File.printMsg = "Leider arbeitet die Druckfunktion zur Zeit nicht immer korrekt. Bitte nutzen Sie den PDF Export, und drucken Sie das PDF Dokument aus. Möchten Sie dennoch mit dem Drucken fortfahren?"; + +if(!ORYX.I18N.Grouping) ORYX.I18N.Grouping = {}; + +ORYX.I18N.Grouping.grouping = "Grouping"; +ORYX.I18N.Grouping.group = "Gruppieren"; +ORYX.I18N.Grouping.groupDesc = "Gruppierung der selektierten Elemente"; +ORYX.I18N.Grouping.ungroup = "Gruppierung aufheben"; +ORYX.I18N.Grouping.ungroupDesc = "Aufheben aller Gruppierungen der selektierten Elemente"; + +if(!ORYX.I18N.Loading) ORYX.I18N.Loading = {}; + +ORYX.I18N.Loading.waiting ="Bitte warten..."; + +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; + +ORYX.I18N.PropertyWindow.name = "Name"; +ORYX.I18N.PropertyWindow.value = "Wert"; +ORYX.I18N.PropertyWindow.selected = "ausgewählt"; +ORYX.I18N.PropertyWindow.clickIcon = "Symbol anklicken"; +ORYX.I18N.PropertyWindow.add = "Hinzufügen"; +ORYX.I18N.PropertyWindow.rem = "Löschen"; +ORYX.I18N.PropertyWindow.complex = "Editor für komplexe Eigenschaft"; +ORYX.I18N.PropertyWindow.text = "Editor für einen Text"; +ORYX.I18N.PropertyWindow.ok = "Ok"; +ORYX.I18N.PropertyWindow.cancel = "Abbrechen"; +ORYX.I18N.PropertyWindow.dateFormat = "d/m/y"; + +if(!ORYX.I18N.ShapeMenuPlugin) ORYX.I18N.ShapeMenuPlugin = {}; + +ORYX.I18N.ShapeMenuPlugin.drag = "Ziehen"; +ORYX.I18N.ShapeMenuPlugin.clickDrag = "Klicken oder ziehen"; +ORYX.I18N.ShapeMenuPlugin.morphMsg = "Shape morphen"; + +if(!ORYX.I18N.SyntaxChecker) ORYX.I18N.SyntaxChecker = {}; + +ORYX.I18N.SyntaxChecker.group = "Verification"; +ORYX.I18N.SyntaxChecker.name = "Syntax-Checker"; +ORYX.I18N.SyntaxChecker.desc = "Überprüfung der Syntax"; +ORYX.I18N.SyntaxChecker.noErrors = "Es wurden keine Syntaxfehler gefunden."; +ORYX.I18N.SyntaxChecker.invalid = "Ungültige Antwort vom Server."; +ORYX.I18N.SyntaxChecker.checkingMessage = "Überprüfung wird durchgeführt ..."; + +if(!ORYX.I18N.Undo) ORYX.I18N.Undo = {}; + +ORYX.I18N.Undo.group = "Undo"; +ORYX.I18N.Undo.undo = "Rückgängig"; +ORYX.I18N.Undo.undoDesc = "Rückgängig"; +ORYX.I18N.Undo.redo = "Wiederherstellen"; +ORYX.I18N.Undo.redoDesc = "Wiederherstellen"; + +if(!ORYX.I18N.View) ORYX.I18N.View = {}; + +ORYX.I18N.View.group = "Zoom"; +ORYX.I18N.View.zoomIn = "Vergrößern"; +ORYX.I18N.View.zoomInDesc = "Vergrößern"; +ORYX.I18N.View.zoomOut = "Verkleinern"; +ORYX.I18N.View.zoomOutDesc = "Verkleinern"; +ORYX.I18N.View.zoomStandard = "Originalgröße"; +ORYX.I18N.View.zoomStandardDesc = "Originalgröße"; +ORYX.I18N.View.zoomFitToModel = "Modelgröße"; +ORYX.I18N.View.zoomFitToModelDesc = "Modelgröße"; + +/** New Language Properties: 08.12.2008 **/ + +ORYX.I18N.PropertyWindow.title = "Eigenschaften"; + +if(!ORYX.I18N.ShapeRepository) ORYX.I18N.ShapeRepository = {}; +ORYX.I18N.ShapeRepository.title = "Shape Verzeichnis"; + +ORYX.I18N.Save.dialogDesciption = "Bitte geben Sie einen Namen, eine Beschreibung und einen Kommentar ein."; +ORYX.I18N.Save.dialogLabelTitle = "Titel"; +ORYX.I18N.Save.dialogLabelDesc = "Beschreibung"; +ORYX.I18N.Save.dialogLabelType = "Typ"; +ORYX.I18N.Save.dialogLabelComment = "Revisionskommentar"; + +if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {}; +ORYX.I18N.Perspective.no = "Keine Perspektive" +ORYX.I18N.Perspective.noTip = "Zurücksetzen der aktuellen Perspektive" + +/** New Language Properties: 21.04.2009 */ +ORYX.I18N.JSONSupport = { + imp: { + name: "JSON importieren", + desc: "Importiert ein neues Modell aus JSON", + group: "Export", + selectFile: "Wählen Sie eine JSON-Datei (*.json) aus, die Sie importieren möchten, oder fügen Sie JSON in das Textfeld ein.", + file: "Datei", + btnImp: "Importieren", + btnClose: "Schließen", + progress: "Importieren ...", + syntaxError: "Syntaxfehler" + }, + exp: { + name: "Nach JSON exportieren", + desc: "Exportiert das aktuelle Modell nach JSON", + group: "Export" + } +}; + +/** New Language Properties: 09.05.2009 */ +if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {}; + +ORYX.I18N.JSONImport.title = "JSON Import"; +ORYX.I18N.JSONImport.wrongSS = "Das Stencil Set der importierten Datei ({0}) entspricht nicht dem geladenen Stencil Set ({1})." + +/** New Language Properties: 14.05.2009 */ +if(!ORYX.I18N.RDFExport) ORYX.I18N.RDFExport = {}; +ORYX.I18N.RDFExport.group = "Export"; +ORYX.I18N.RDFExport.rdfExport = "Nach RDF exportieren"; +ORYX.I18N.RDFExport.rdfExportDescription = "Exportiert das aktuelle Model in die XML-Serialisierung des Resource Description Frameworks (RDF)"; + +/** New Language Properties: 15.05.2009*/ +if(!ORYX.I18N.SyntaxChecker.BPMN) ORYX.I18N.SyntaxChecker.BPMN={}; +ORYX.I18N.SyntaxChecker.BPMN_NO_SOURCE = "Eine Kante muss einen Ursprung haben."; +ORYX.I18N.SyntaxChecker.BPMN_NO_TARGET = "Eine Kante muss ein Ziel haben."; +ORYX.I18N.SyntaxChecker.BPMN_DIFFERENT_PROCESS = "Ursprungs- und Zielknoten müssen im gleichen Prozess sein."; +ORYX.I18N.SyntaxChecker.BPMN_SAME_PROCESS = "Ursprungs- und Zielknoten müssen in verschiedenen Pools enthalten sein."; +ORYX.I18N.SyntaxChecker.BPMN_FLOWOBJECT_NOT_CONTAINED_IN_PROCESS = "Ein Kontrollflussobjekt muss sich in einem Prozess befinden."; +ORYX.I18N.SyntaxChecker.BPMN_ENDEVENT_WITHOUT_INCOMING_CONTROL_FLOW = "Ein End-Ereignis muss einen eingehenden Sequenzfluss haben."; +ORYX.I18N.SyntaxChecker.BPMN_STARTEVENT_WITHOUT_OUTGOING_CONTROL_FLOW = "Ein Start-Ereignis muss einen ausgehenden Sequenzfluss haben."; +ORYX.I18N.SyntaxChecker.BPMN_STARTEVENT_WITH_INCOMING_CONTROL_FLOW = "Start-Ereignisse dürfen keinen eingehenden Sequenzfluss haben."; +ORYX.I18N.SyntaxChecker.BPMN_ATTACHEDINTERMEDIATEEVENT_WITH_INCOMING_CONTROL_FLOW = "Angeheftete Zwischen-Ereignisse dürfen keinen eingehenden Sequenzfluss haben."; +ORYX.I18N.SyntaxChecker.BPMN_ATTACHEDINTERMEDIATEEVENT_WITHOUT_OUTGOING_CONTROL_FLOW = "Angeheftete Zwischen-Ereignisse müssen genau einen ausgehenden Sequenzfluss haben."; +ORYX.I18N.SyntaxChecker.BPMN_ENDEVENT_WITH_OUTGOING_CONTROL_FLOW = "End-Ereignisse dürfen keinen ausgehenden Sequenzfluss haben."; +ORYX.I18N.SyntaxChecker.BPMN_EVENTBASEDGATEWAY_BADCONTINUATION = "Auf Ereignis-basierte Gateways dürfen weder Gateways noch Subprozesse folgen."; +ORYX.I18N.SyntaxChecker.BPMN_NODE_NOT_ALLOWED = "Knotentyp ist nicht erlaubt."; + +if(!ORYX.I18N.SyntaxChecker.IBPMN) ORYX.I18N.SyntaxChecker.IBPMN={}; +ORYX.I18N.SyntaxChecker.IBPMN_NO_ROLE_SET = "Für Interaktionen muss ein Sender und ein Empfänger definiert sein."; +ORYX.I18N.SyntaxChecker.IBPMN_NO_INCOMING_SEQFLOW = "Dieser Knoten muss eingehenden Sequenzfluss besitzen."; +ORYX.I18N.SyntaxChecker.IBPMN_NO_OUTGOING_SEQFLOW = "Dieser Knoten muss ausgehenden Sequenzfluss besitzen."; + +if(!ORYX.I18N.SyntaxChecker.InteractionNet) ORYX.I18N.SyntaxChecker.InteractionNet={}; +ORYX.I18N.SyntaxChecker.InteractionNet_SENDER_NOT_SET = "Sender ist nicht definiert"; +ORYX.I18N.SyntaxChecker.InteractionNet_RECEIVER_NOT_SET = "Empfänger ist nicht definiert"; +ORYX.I18N.SyntaxChecker.InteractionNet_MESSAGETYPE_NOT_SET = "Nachrichtentyp ist nicht definiert."; +ORYX.I18N.SyntaxChecker.InteractionNet_ROLE_NOT_SET = "Rolle ist nicht definiert."; + +if(!ORYX.I18N.SyntaxChecker.EPC) ORYX.I18N.SyntaxChecker.EPC={}; +ORYX.I18N.SyntaxChecker.EPC_NO_SOURCE = "Eine Kante muss einen Ursprung haben."; +ORYX.I18N.SyntaxChecker.EPC_NO_TARGET = "Eine Kante muss ein Ziel haben."; +ORYX.I18N.SyntaxChecker.EPC_NOT_CONNECTED = "Dieser Knoten muss eingehende oder ausgehende Kanten besitzen."; +ORYX.I18N.SyntaxChecker.EPC_NOT_CONNECTED_2 = "Dieser Knoten muss sowohl eingehende als auch ausgehende Kanten besitzen."; +ORYX.I18N.SyntaxChecker.EPC_TOO_MANY_EDGES = "Knoten ist mit zu vielen Kanten verbunden."; +ORYX.I18N.SyntaxChecker.EPC_NO_CORRECT_CONNECTOR = "Knoten ist kein korrekter Konnektor."; +ORYX.I18N.SyntaxChecker.EPC_MANY_STARTS = "Es darf nur ein Start-Ereignis geben."; +ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_OR = "Funktionen hinter einem OR-/XOR-Split sind nicht erlaubt."; +ORYX.I18N.SyntaxChecker.EPC_PI_AFTER_OR = "Prozessschnittstellen hinter einem OR-/XOR-Split ist nicht erlaubt."; +ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_FUNCTION = "Auf eine Funktion darf keine Funktion folgen."; +ORYX.I18N.SyntaxChecker.EPC_EVENT_AFTER_EVENT = "Auf ein Ereignis darf kein Ereignis folgen."; +ORYX.I18N.SyntaxChecker.EPC_PI_AFTER_FUNCTION = "Auf eine Funktion darf keine Prozessschnittstelle folgen."; +ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_PI = "Auf eine Prozessschnittstelle darf keine Funktion folgen."; +ORYX.I18N.SyntaxChecker.EPC_SOURCE_EQUALS_TARGET = "Eine Kante muss zwei verschiedene Knoten verbinden." + +if(!ORYX.I18N.SyntaxChecker.PetriNet) ORYX.I18N.SyntaxChecker.PetriNet={}; +ORYX.I18N.SyntaxChecker.PetriNet_NOT_BIPARTITE = "Der Graph ist nicht bepartit."; +ORYX.I18N.SyntaxChecker.PetriNet_NO_LABEL = "Bezeichnung für einen bezeichnete Transition ist nicht gesetzt."; +ORYX.I18N.SyntaxChecker.PetriNet_NO_ID = "Ein Knoten besitzt keine ID."; +ORYX.I18N.SyntaxChecker.PetriNet_SAME_SOURCE_AND_TARGET = "Zwei Flussbeziehungen besitzen den gleichen Ursprung und das gleiche Ziel."; +ORYX.I18N.SyntaxChecker.PetriNet_NODE_NOT_SET = "Ein Knoten ist nicht definiert für einen Flussbeziehung."; + +/** New Language Properties: 02.06.2009*/ +ORYX.I18N.Edge = "Kante"; +ORYX.I18N.Node = "Knoten"; + +/** New Language Properties: 02.06.2009*/ +ORYX.I18N.SyntaxChecker.notice = "Bitte bewegen Sie den Mauszeiger über ein rotes Kreuz, um die Details zu erfahren."; + +/** New Language Properties: 15.07.2009*/ +if(!ORYX.I18N.Layouting) ORYX.I18N.Layouting ={}; +ORYX.I18N.Layouting.doing = "Layouten..."; + +/** New Language Properties: 18.08.2009*/ +ORYX.I18N.SyntaxChecker.MULT_ERRORS = "Mehrere Fehler"; + +/** New Language Properties: 08.09.2009*/ +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; +ORYX.I18N.PropertyWindow.oftenUsed = "Hauptattribute"; +ORYX.I18N.PropertyWindow.moreProps = "Mehr Attribute"; + +/** New Language Properties 01.10.2009 */ +if(!ORYX.I18N.SyntaxChecker.BPMN2) ORYX.I18N.SyntaxChecker.BPMN2 = {}; + +ORYX.I18N.SyntaxChecker.BPMN2_DATA_INPUT_WITH_INCOMING_DATA_ASSOCIATION = "Ein Dateninput darf keine ausgehenden Datenassoziationen haben."; +ORYX.I18N.SyntaxChecker.BPMN2_DATA_OUTPUT_WITH_OUTGOING_DATA_ASSOCIATION = "Ein Datenoutput darf keine eingehenden Datenassoziationen haben."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_TARGET_WITH_TOO_MANY_INCOMING_SEQUENCE_FLOWS = "Ziele von Ereignis-basierten Gateways dürfen nicht mehr als einen eingehenden Sequenzfluss haben."; + +/** New Language Properties 02.10.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WITH_TOO_LESS_OUTGOING_SEQUENCE_FLOWS = "Ein Ereignis-basiertes Gateway muss 2 oder mehr ausgehende Sequenzflüsse besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_EVENT_TARGET_CONTRADICTION = "Wenn Nachrichten-Zwischenereignisse im Diagramm verwendet werden, dann dürfen Receive Tasks nicht verwendet werden und umgekehrt."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WRONG_TRIGGER = "Nur die folgenden Zwischen-Ereignis-Auslöser sind hier zulässig: Nachricht, Signal, Timer, Bedingungs und Mehrfach."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WRONG_CONDITION_EXPRESSION = "Die ausgehenden Sequenzflüsse eines Ereignis-Gateways dürfen keinen Bedingungsausdruck besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_NOT_INSTANTIATING = "Das Gateway erfüllt nicht die Voraussetzungen um den Prozess zu instantiieren. Bitte verwenden Sie ein Start-Ereignis oder setzen Sie die Instanziierungs-Attribute korrekt."; + +/** New Language Properties 05.10.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAYDIRECTION_MIXED_FAILURE = "Das Gateway muss mehrere eingehende und ausgehende Sequenzflüsse besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAYDIRECTION_CONVERGING_FAILURE = "Das Gateway muss mehrere eingehende aber darf keine mehrfache ausgehende Sequenzflüsse besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAYDIRECTION_DIVERGING_FAILURE = "Das Gateway darf keine mehrfachen eingehenden aber muss mehrfache ausgehende Sequenzflüsse besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAY_WITH_NO_OUTGOING_SEQUENCE_FLOW = "Ein Gateway muss mindestens einen ausgehenden Sequenzfluss besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_RECEIVE_TASK_WITH_ATTACHED_EVENT = "Empfangende Tasks, die in Ereignis-Gateway-Konfigurationen benutzt werden, dürfen keine angehefteten Zwischen-Ereignisse besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_SUBPROCESS_BAD_CONNECTION = "Ein Ereignis-Unterprozess darf keinen eingehenden oder ausgehenden Sequenzfluss besitzen."; + +/** New Language Properties 13.10.2009 */ +ORYX.I18N.SyntaxChecker.BPMN_MESSAGE_FLOW_NOT_CONNECTED = "Mindestens ein Ende des Nachrichtenflusses muss mit einem anderen Objekt verbunden sein."; + +/** New Language Properties 05.11.2009 */ +if(!ORYX.I18N.RESIZE) ORYX.I18N.RESIZE = {}; +ORYX.I18N.RESIZE.tipGrow = "Zeichenfläche vergrößern:"; +ORYX.I18N.RESIZE.tipShrink = "Zeichenfläche verkleinern:"; +ORYX.I18N.RESIZE.N = "Nach oben"; +ORYX.I18N.RESIZE.W = "Nach links"; +ORYX.I18N.RESIZE.S ="Nach unten"; +ORYX.I18N.RESIZE.E ="Nach rechts"; + +/** New Language Properties 24.11.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_MESSAGES = "Eine Choreographie-Aktivität darf nur eine initiierende Nachricht besitzen."; +ORYX.I18N.SyntaxChecker.BPMN_MESSAGE_FLOW_NOT_ALLOWED = "Ein Nachrichtenfluss ist an dieser Stelle nicht erlaubt."; + +/** New Language Properties 27.11.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WITH_TOO_LESS_INCOMING_SEQUENCE_FLOWS = "Ein Ereignis-basiertes Gateway, dass nicht instanziierend ist, muss mindestens einen eingehenden Kontrollfluss besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_TOO_FEW_INITIATING_PARTICIPANTS = "Eine Choreographie-Aktivität musst genau einen initiierenden Teilnehmer (weiß) besitzen."; +ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_PARTICIPANTS = "Eine Choreographie-Aktivität darf nicht mehr als einen initiierenden Teilnehmer (weiß) besitzen." + +ORYX.I18N.SyntaxChecker.COMMUNICATION_AT_LEAST_TWO_PARTICIPANTS = "Die Kommunikation oder Sub-Konversation muss mit mindestens zwei Teilnehmern verbunden sein."; +ORYX.I18N.SyntaxChecker.MESSAGEFLOW_START_MUST_BE_PARTICIPANT = "Die Nachrichtenflussquelle muss ein Teilnehmer sein."; +ORYX.I18N.SyntaxChecker.MESSAGEFLOW_END_MUST_BE_PARTICIPANT = "Das Nachrichtenflussziel muss ein Teilnehmer sein."; +ORYX.I18N.SyntaxChecker.CONV_LINK_CANNOT_CONNECT_CONV_NODES = "Der Konversationslink muss eine Kommunikation oder Sub-Konversation mit einem Teilnehmer verbinden."; diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_en_us.js b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_en_us.js new file mode 100644 index 0000000..6c3ebc0 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_en_us.js @@ -0,0 +1,423 @@ +/** + * @author nicolas.peters + * + * Contains all strings for the default language (en-us). + * Version 1 - 08/29/08 + */ +if(!ORYX) var ORYX = {}; + +if(!ORYX.I18N) ORYX.I18N = {}; + +ORYX.I18N.Language = "en_us"; //Pattern <ISO language code>_<ISO country code> in lower case! + +if(!ORYX.I18N.Oryx) ORYX.I18N.Oryx = {}; + +ORYX.I18N.Oryx.title = "Oryx"; +ORYX.I18N.Oryx.noBackendDefined = "Caution! \nNo Backend defined.\n The requested model cannot be loaded. Try to load a configuration with a save plugin."; +ORYX.I18N.Oryx.pleaseWait = "Please wait while loading..."; +ORYX.I18N.Oryx.notLoggedOn = "Not logged on"; +ORYX.I18N.Oryx.editorOpenTimeout = "The editor does not seem to be started yet. Please check, whether you have a popup blocker enabled and disable it or allow popups for this site. We will never display any commercials on this site."; + +if(!ORYX.I18N.AddDocker) ORYX.I18N.AddDocker = {}; + +ORYX.I18N.AddDocker.group = "Docker"; +ORYX.I18N.AddDocker.add = "Add Docker"; +ORYX.I18N.AddDocker.addDesc = "Add a Docker to an edge, by clicking on it"; +ORYX.I18N.AddDocker.del = "Delete Docker"; +ORYX.I18N.AddDocker.delDesc = "Delete a Docker"; + +if(!ORYX.I18N.Arrangement) ORYX.I18N.Arrangement = {}; + +ORYX.I18N.Arrangement.groupZ = "Z-Order"; +ORYX.I18N.Arrangement.btf = "Bring To Front"; +ORYX.I18N.Arrangement.btfDesc = "Bring to Front"; +ORYX.I18N.Arrangement.btb = "Bring To Back"; +ORYX.I18N.Arrangement.btbDesc = "Bring To Back"; +ORYX.I18N.Arrangement.bf = "Bring Forward"; +ORYX.I18N.Arrangement.bfDesc = "Bring Forward"; +ORYX.I18N.Arrangement.bb = "Bring Backward"; +ORYX.I18N.Arrangement.bbDesc = "Bring Backward"; +ORYX.I18N.Arrangement.groupA = "Alignment"; +ORYX.I18N.Arrangement.ab = "Alignment Bottom"; +ORYX.I18N.Arrangement.abDesc = "Bottom"; +ORYX.I18N.Arrangement.am = "Alignment Middle"; +ORYX.I18N.Arrangement.amDesc = "Middle"; +ORYX.I18N.Arrangement.at = "Alignment Top"; +ORYX.I18N.Arrangement.atDesc = "Top"; +ORYX.I18N.Arrangement.al = "Alignment Left"; +ORYX.I18N.Arrangement.alDesc = "Left"; +ORYX.I18N.Arrangement.ac = "Alignment Center"; +ORYX.I18N.Arrangement.acDesc = "Center"; +ORYX.I18N.Arrangement.ar = "Alignment Right"; +ORYX.I18N.Arrangement.arDesc = "Right"; +ORYX.I18N.Arrangement.as = "Alignment Same Size"; +ORYX.I18N.Arrangement.asDesc = "Same Size"; + +if(!ORYX.I18N.Edit) ORYX.I18N.Edit = {}; + +ORYX.I18N.Edit.group = "Edit"; +ORYX.I18N.Edit.cut = "Cut"; +ORYX.I18N.Edit.cutDesc = "Cuts the selection into an Oryx clipboard"; +ORYX.I18N.Edit.copy = "Copy"; +ORYX.I18N.Edit.copyDesc = "Copies the selection into an Oryx clipboard"; +ORYX.I18N.Edit.paste = "Paste"; +ORYX.I18N.Edit.pasteDesc = "Pastes the Oryx clipboard to the canvas"; +ORYX.I18N.Edit.del = "Delete"; +ORYX.I18N.Edit.delDesc = "Deletes all selected shapes"; + +if(!ORYX.I18N.EPCSupport) ORYX.I18N.EPCSupport = {}; + +ORYX.I18N.EPCSupport.group = "EPC"; +ORYX.I18N.EPCSupport.exp = "Export EPC"; +ORYX.I18N.EPCSupport.expDesc = "Export diagram to EPML"; +ORYX.I18N.EPCSupport.imp = "Import EPC"; +ORYX.I18N.EPCSupport.impDesc = "Import an EPML file"; +ORYX.I18N.EPCSupport.progressExp = "Exporting model"; +ORYX.I18N.EPCSupport.selectFile = "Select an EPML (.empl) file to import."; +ORYX.I18N.EPCSupport.file = "File"; +ORYX.I18N.EPCSupport.impPanel = "Import EPML File"; +ORYX.I18N.EPCSupport.impBtn = "Import"; +ORYX.I18N.EPCSupport.close = "Close"; +ORYX.I18N.EPCSupport.error = "Error"; +ORYX.I18N.EPCSupport.progressImp = "Import..."; + +if(!ORYX.I18N.ERDFSupport) ORYX.I18N.ERDFSupport = {}; + +ORYX.I18N.ERDFSupport.exp = "Export to ERDF"; +ORYX.I18N.ERDFSupport.expDesc = "Export to ERDF"; +ORYX.I18N.ERDFSupport.imp = "Import from ERDF"; +ORYX.I18N.ERDFSupport.impDesc = "Import from ERDF"; +ORYX.I18N.ERDFSupport.impFailed = "Request for import of ERDF failed."; +ORYX.I18N.ERDFSupport.impFailed2 = "An error while importing occurs! <br/>Please check error message: <br/><br/>"; +ORYX.I18N.ERDFSupport.error = "Error"; +ORYX.I18N.ERDFSupport.noCanvas = "The xml document has no Oryx canvas node included!"; +ORYX.I18N.ERDFSupport.noSS = "The Oryx canvas node has no stencil set definition included!"; +ORYX.I18N.ERDFSupport.wrongSS = "The given stencil set does not fit to the current editor!"; +ORYX.I18N.ERDFSupport.selectFile = "Select an ERDF (.xml) file or type in the ERDF to import it!"; +ORYX.I18N.ERDFSupport.file = "File"; +ORYX.I18N.ERDFSupport.impERDF = "Import ERDF"; +ORYX.I18N.ERDFSupport.impBtn = "Import"; +ORYX.I18N.ERDFSupport.impProgress = "Importing..."; +ORYX.I18N.ERDFSupport.close = "Close"; +ORYX.I18N.ERDFSupport.deprTitle = "Really export to eRDF?"; +ORYX.I18N.ERDFSupport.deprText = "Exporting to eRDF is not recommended anymore because the support will be stopped in future versions of the Oryx editor. If possible, export the model to JSON. Do you want to export anyway?"; + +if(!ORYX.I18N.jPDLSupport) ORYX.I18N.jPDLSupport = {}; + +ORYX.I18N.jPDLSupport.group = "ExecBPMN"; +ORYX.I18N.jPDLSupport.exp = "Export to jPDL"; +ORYX.I18N.jPDLSupport.expDesc = "Export to jPDL"; +ORYX.I18N.jPDLSupport.imp = "Import from jPDL"; +ORYX.I18N.jPDLSupport.impDesc = "Import jPDL File"; +ORYX.I18N.jPDLSupport.impFailedReq = "Request for import of jPDL failed."; +ORYX.I18N.jPDLSupport.impFailedJson = "Transformation of jPDL failed."; +ORYX.I18N.jPDLSupport.impFailedJsonAbort = "Import aborted."; +ORYX.I18N.jPDLSupport.loadSseQuestionTitle = "jBPM stencil set extension needs to be loaded"; +ORYX.I18N.jPDLSupport.loadSseQuestionBody = "In order to import jPDL, the stencil set extension has to be loaded. Do you want to proceed?"; +ORYX.I18N.jPDLSupport.expFailedReq = "Request for export of model failed."; +ORYX.I18N.jPDLSupport.expFailedXml = "Export to jPDL failed. Exporter reported: "; +ORYX.I18N.jPDLSupport.error = "Error"; +ORYX.I18N.jPDLSupport.selectFile = "Select an jPDL (.xml) file or type in the jPDL to import it!"; +ORYX.I18N.jPDLSupport.file = "File"; +ORYX.I18N.jPDLSupport.impJPDL = "Import jPDL"; +ORYX.I18N.jPDLSupport.impBtn = "Import"; +ORYX.I18N.jPDLSupport.impProgress = "Importing..."; +ORYX.I18N.jPDLSupport.close = "Close"; + +if(!ORYX.I18N.Save) ORYX.I18N.Save = {}; + +ORYX.I18N.Save.group = "File"; +ORYX.I18N.Save.save = "Save"; +ORYX.I18N.Save.saveDesc = "Save"; +ORYX.I18N.Save.saveAs = "Save As..."; +ORYX.I18N.Save.saveAsDesc = "Save As..."; +ORYX.I18N.Save.unsavedData = "There are unsaved data, please save before you leave, otherwise your changes get lost!"; +ORYX.I18N.Save.newProcess = "New Process"; +ORYX.I18N.Save.saveAsTitle = "Save as..."; +ORYX.I18N.Save.saveBtn = "Save"; +ORYX.I18N.Save.close = "Close"; +ORYX.I18N.Save.savedAs = "Saved As"; +ORYX.I18N.Save.saved = "Saved!"; +ORYX.I18N.Save.failed = "Saving failed."; +ORYX.I18N.Save.noRights = "You have no rights to save changes."; +ORYX.I18N.Save.saving = "Saving"; +ORYX.I18N.Save.saveAsHint = "The process diagram is stored under:"; + +if(!ORYX.I18N.File) ORYX.I18N.File = {}; + +ORYX.I18N.File.group = "File"; +ORYX.I18N.File.print = "Print"; +ORYX.I18N.File.printDesc = "Print current model"; +ORYX.I18N.File.pdf = "Export as PDF"; +ORYX.I18N.File.pdfDesc = "Export as PDF"; +ORYX.I18N.File.info = "Info"; +ORYX.I18N.File.infoDesc = "Info"; +ORYX.I18N.File.genPDF = "Generating PDF"; +ORYX.I18N.File.genPDFFailed = "Generating PDF failed."; +ORYX.I18N.File.printTitle = "Print"; +ORYX.I18N.File.printMsg = "We are currently experiencing problems with the printing function. We recommend using the PDF Export to print the diagram. Do you really want to continue printing?"; + +if(!ORYX.I18N.Grouping) ORYX.I18N.Grouping = {}; + +ORYX.I18N.Grouping.grouping = "Grouping"; +ORYX.I18N.Grouping.group = "Group"; +ORYX.I18N.Grouping.groupDesc = "Groups all selected shapes"; +ORYX.I18N.Grouping.ungroup = "Ungroup"; +ORYX.I18N.Grouping.ungroupDesc = "Deletes the group of all selected Shapes"; + +if(!ORYX.I18N.Loading) ORYX.I18N.Loading = {}; + +ORYX.I18N.Loading.waiting ="Please wait..."; + +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; + +ORYX.I18N.PropertyWindow.name = "Name"; +ORYX.I18N.PropertyWindow.value = "Value"; +ORYX.I18N.PropertyWindow.selected = "selected"; +ORYX.I18N.PropertyWindow.clickIcon = "Click Icon"; +ORYX.I18N.PropertyWindow.add = "Add"; +ORYX.I18N.PropertyWindow.rem = "Remove"; +ORYX.I18N.PropertyWindow.complex = "Editor for a Complex Type"; +ORYX.I18N.PropertyWindow.text = "Editor for a Text Type"; +ORYX.I18N.PropertyWindow.ok = "Ok"; +ORYX.I18N.PropertyWindow.cancel = "Cancel"; +ORYX.I18N.PropertyWindow.dateFormat = "m/d/y"; + +if(!ORYX.I18N.ShapeMenuPlugin) ORYX.I18N.ShapeMenuPlugin = {}; + +ORYX.I18N.ShapeMenuPlugin.drag = "Drag"; +ORYX.I18N.ShapeMenuPlugin.clickDrag = "Click or drag"; +ORYX.I18N.ShapeMenuPlugin.morphMsg = "Morph shape"; + +if(!ORYX.I18N.SyntaxChecker) ORYX.I18N.SyntaxChecker = {}; + +ORYX.I18N.SyntaxChecker.group = "Verification"; +ORYX.I18N.SyntaxChecker.name = "Syntax Checker"; +ORYX.I18N.SyntaxChecker.desc = "Check Syntax"; +ORYX.I18N.SyntaxChecker.noErrors = "There are no syntax errors."; +ORYX.I18N.SyntaxChecker.invalid = "Invalid answer from server."; +ORYX.I18N.SyntaxChecker.checkingMessage = "Checking ..."; + +if(!ORYX.I18N.FormHandler) ORYX.I18N.FormHandler = {}; + +ORYX.I18N.FormHandler.group = "FormHandling"; +ORYX.I18N.FormHandler.name = "FormHandler"; +ORYX.I18N.FormHandler.desc = "Testing from handling"; + +if(!ORYX.I18N.Deployer) ORYX.I18N.Deployer = {}; + +ORYX.I18N.Deployer.group = "Deployment"; +ORYX.I18N.Deployer.name = "Deployer"; +ORYX.I18N.Deployer.desc = "Deploy to engine"; + +if(!ORYX.I18N.Tester) ORYX.I18N.Tester = {}; + +ORYX.I18N.Tester.group = "Testing"; +ORYX.I18N.Tester.name = "Test process"; +ORYX.I18N.Tester.desc = "Open the test component to test this process definition"; + +if(!ORYX.I18N.Undo) ORYX.I18N.Undo = {}; + +ORYX.I18N.Undo.group = "Undo"; +ORYX.I18N.Undo.undo = "Undo"; +ORYX.I18N.Undo.undoDesc = "Undo the last action"; +ORYX.I18N.Undo.redo = "Redo"; +ORYX.I18N.Undo.redoDesc = "Redo the last undone action"; + +if(!ORYX.I18N.View) ORYX.I18N.View = {}; + +ORYX.I18N.View.group = "Zoom"; +ORYX.I18N.View.zoomIn = "Zoom In"; +ORYX.I18N.View.zoomInDesc = "Zoom into the model"; +ORYX.I18N.View.zoomOut = "Zoom Out"; +ORYX.I18N.View.zoomOutDesc = "Zoom out of the model"; +ORYX.I18N.View.zoomStandard = "Zoom Standard"; +ORYX.I18N.View.zoomStandardDesc = "Zoom to the standard level"; +ORYX.I18N.View.zoomFitToModel = "Zoom fit to model"; +ORYX.I18N.View.zoomFitToModelDesc = "Zoom to fit the model size"; + +if(!ORYX.I18N.XFormsSerialization) ORYX.I18N.XFormsSerialization = {}; + +ORYX.I18N.XFormsSerialization.group = "XForms Serialization"; +ORYX.I18N.XFormsSerialization.exportXForms = "XForms Export"; +ORYX.I18N.XFormsSerialization.exportXFormsDesc = "Export XForms+XHTML markup"; +ORYX.I18N.XFormsSerialization.importXForms = "XForms Import"; +ORYX.I18N.XFormsSerialization.importXFormsDesc = "Import XForms+XHTML markup"; +ORYX.I18N.XFormsSerialization.noClientXFormsSupport = "No XForms support"; +ORYX.I18N.XFormsSerialization.noClientXFormsSupportDesc = "<h2>Your browser does not support XForms. Please install the <a href=\"https://addons.mozilla.org/firefox/addon/824\" target=\"_blank\">Mozilla XForms Add-on</a> for Firefox.</h2>"; +ORYX.I18N.XFormsSerialization.ok = "Ok"; +ORYX.I18N.XFormsSerialization.selectFile = "Select a XHTML (.xhtml) file or type in the XForms+XHTML markup to import it!"; +ORYX.I18N.XFormsSerialization.selectCss = "Please insert url of css file"; +ORYX.I18N.XFormsSerialization.file = "File"; +ORYX.I18N.XFormsSerialization.impFailed = "Request for import of document failed."; +ORYX.I18N.XFormsSerialization.impTitle = "Import XForms+XHTML document"; +ORYX.I18N.XFormsSerialization.expTitle = "Export XForms+XHTML document"; +ORYX.I18N.XFormsSerialization.impButton = "Import"; +ORYX.I18N.XFormsSerialization.impProgress = "Importing..."; +ORYX.I18N.XFormsSerialization.close = "Close"; + +/** New Language Properties: 08.12.2008 */ + +ORYX.I18N.PropertyWindow.title = "Properties"; + +if(!ORYX.I18N.ShapeRepository) ORYX.I18N.ShapeRepository = {}; +ORYX.I18N.ShapeRepository.title = "Shape Repository"; + +ORYX.I18N.Save.dialogDesciption = "Please enter a name, a description and a comment."; +ORYX.I18N.Save.dialogLabelTitle = "Title"; +ORYX.I18N.Save.dialogLabelDesc = "Description"; +ORYX.I18N.Save.dialogLabelType = "Type"; +ORYX.I18N.Save.dialogLabelComment = "Revision comment"; + +if(!ORYX.I18N.Perspective) ORYX.I18N.Perspective = {}; +ORYX.I18N.Perspective.no = "No Perspective" +ORYX.I18N.Perspective.noTip = "Unload the current perspective" + +/** New Language Properties: 21.04.2009 */ +ORYX.I18N.JSONSupport = { + imp: { + name: "Import from JSON", + desc: "Imports a model from JSON", + group: "Export", + selectFile: "Select an JSON (.json) file or type in JSON to import it!", + file: "File", + btnImp: "Import", + btnClose: "Close", + progress: "Importing ...", + syntaxError: "Syntax error" + }, + exp: { + name: "Export to JSON", + desc: "Exports current model to JSON", + group: "Export" + } +}; + +/** New Language Properties: 09.05.2009 */ +if(!ORYX.I18N.JSONImport) ORYX.I18N.JSONImport = {}; + +ORYX.I18N.JSONImport.title = "JSON Import"; +ORYX.I18N.JSONImport.wrongSS = "The stencil set of the imported file ({0}) does not match to the loaded stencil set ({1})." + +/** New Language Properties: 14.05.2009 */ +if(!ORYX.I18N.RDFExport) ORYX.I18N.RDFExport = {}; +ORYX.I18N.RDFExport.group = "Export"; +ORYX.I18N.RDFExport.rdfExport = "Export to RDF"; +ORYX.I18N.RDFExport.rdfExportDescription = "Exports current model to the XML serialization defined for the Resource Description Framework (RDF)"; + +/** New Language Properties: 15.05.2009*/ +if(!ORYX.I18N.SyntaxChecker.BPMN) ORYX.I18N.SyntaxChecker.BPMN={}; +ORYX.I18N.SyntaxChecker.BPMN_NO_SOURCE = "An edge must have a source."; +ORYX.I18N.SyntaxChecker.BPMN_NO_TARGET = "An edge must have a target."; +ORYX.I18N.SyntaxChecker.BPMN_DIFFERENT_PROCESS = "Source and target node must be contained in the same process."; +ORYX.I18N.SyntaxChecker.BPMN_SAME_PROCESS = "Source and target node must be contained in different pools."; +ORYX.I18N.SyntaxChecker.BPMN_FLOWOBJECT_NOT_CONTAINED_IN_PROCESS = "A flow object must be contained in a process."; +ORYX.I18N.SyntaxChecker.BPMN_ENDEVENT_WITHOUT_INCOMING_CONTROL_FLOW = "An end event must have an incoming sequence flow."; +ORYX.I18N.SyntaxChecker.BPMN_STARTEVENT_WITHOUT_OUTGOING_CONTROL_FLOW = "A start event must have an outgoing sequence flow."; +ORYX.I18N.SyntaxChecker.BPMN_STARTEVENT_WITH_INCOMING_CONTROL_FLOW = "Start events must not have incoming sequence flows."; +ORYX.I18N.SyntaxChecker.BPMN_ATTACHEDINTERMEDIATEEVENT_WITH_INCOMING_CONTROL_FLOW = "Attached intermediate events must not have incoming sequence flows."; +ORYX.I18N.SyntaxChecker.BPMN_ATTACHEDINTERMEDIATEEVENT_WITHOUT_OUTGOING_CONTROL_FLOW = "Attached intermediate events must have exactly one outgoing sequence flow."; +ORYX.I18N.SyntaxChecker.BPMN_ENDEVENT_WITH_OUTGOING_CONTROL_FLOW = "End events must not have outgoing sequence flows."; +ORYX.I18N.SyntaxChecker.BPMN_EVENTBASEDGATEWAY_BADCONTINUATION = "Event-based gateways must not be followed by gateways or subprocesses."; +ORYX.I18N.SyntaxChecker.BPMN_NODE_NOT_ALLOWED = "Node type is not allowed."; + +if(!ORYX.I18N.SyntaxChecker.IBPMN) ORYX.I18N.SyntaxChecker.IBPMN={}; +ORYX.I18N.SyntaxChecker.IBPMN_NO_ROLE_SET = "Interactions must have a sender and a receiver role set"; +ORYX.I18N.SyntaxChecker.IBPMN_NO_INCOMING_SEQFLOW = "This node must have incoming sequence flow."; +ORYX.I18N.SyntaxChecker.IBPMN_NO_OUTGOING_SEQFLOW = "This node must have outgoing sequence flow."; + +if(!ORYX.I18N.SyntaxChecker.InteractionNet) ORYX.I18N.SyntaxChecker.InteractionNet={}; +ORYX.I18N.SyntaxChecker.InteractionNet_SENDER_NOT_SET = "Sender not set"; +ORYX.I18N.SyntaxChecker.InteractionNet_RECEIVER_NOT_SET = "Receiver not set"; +ORYX.I18N.SyntaxChecker.InteractionNet_MESSAGETYPE_NOT_SET = "Message type not set"; +ORYX.I18N.SyntaxChecker.InteractionNet_ROLE_NOT_SET = "Role not set"; + +if(!ORYX.I18N.SyntaxChecker.EPC) ORYX.I18N.SyntaxChecker.EPC={}; +ORYX.I18N.SyntaxChecker.EPC_NO_SOURCE = "Each edge must have a source."; +ORYX.I18N.SyntaxChecker.EPC_NO_TARGET = "Each edge must have a target."; +ORYX.I18N.SyntaxChecker.EPC_NOT_CONNECTED = "Node must be connected with edges."; +ORYX.I18N.SyntaxChecker.EPC_NOT_CONNECTED_2 = "Node must be connected with more edges."; +ORYX.I18N.SyntaxChecker.EPC_TOO_MANY_EDGES = "Node has too many connected edges."; +ORYX.I18N.SyntaxChecker.EPC_NO_CORRECT_CONNECTOR = "Node is no correct connector."; +ORYX.I18N.SyntaxChecker.EPC_MANY_STARTS = "There must be only one start event."; +ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_OR = "There must be no functions after a splitting OR/XOR."; +ORYX.I18N.SyntaxChecker.EPC_PI_AFTER_OR = "There must be no process interface after a splitting OR/XOR."; +ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_FUNCTION = "There must be no function after a function."; +ORYX.I18N.SyntaxChecker.EPC_EVENT_AFTER_EVENT = "There must be no event after an event."; +ORYX.I18N.SyntaxChecker.EPC_PI_AFTER_FUNCTION = "There must be no process interface after a function."; +ORYX.I18N.SyntaxChecker.EPC_FUNCTION_AFTER_PI = "There must be no function after a process interface."; +ORYX.I18N.SyntaxChecker.EPC_SOURCE_EQUALS_TARGET = "Edge must connect two distinct nodes." + +if(!ORYX.I18N.SyntaxChecker.PetriNet) ORYX.I18N.SyntaxChecker.PetriNet={}; +ORYX.I18N.SyntaxChecker.PetriNet_NOT_BIPARTITE = "The graph is not bipartite"; +ORYX.I18N.SyntaxChecker.PetriNet_NO_LABEL = "Label not set for a labeled transition"; +ORYX.I18N.SyntaxChecker.PetriNet_NO_ID = "There is a node without id"; +ORYX.I18N.SyntaxChecker.PetriNet_SAME_SOURCE_AND_TARGET = "Two flow relationships have the same source and target"; +ORYX.I18N.SyntaxChecker.PetriNet_NODE_NOT_SET = "A node is not set for a flowrelationship"; + +/** New Language Properties: 02.06.2009*/ +ORYX.I18N.Edge = "Edge"; +ORYX.I18N.Node = "Node"; + +/** New Language Properties: 03.06.2009*/ +ORYX.I18N.SyntaxChecker.notice = "Move the mouse over a red cross icon to see the error message."; + +/** New Language Properties: 05.06.2009*/ +if(!ORYX.I18N.RESIZE) ORYX.I18N.RESIZE = {}; +ORYX.I18N.RESIZE.tipGrow = "Increase canvas size:"; +ORYX.I18N.RESIZE.tipShrink = "Decrease canvas size:"; +ORYX.I18N.RESIZE.N = "Top"; +ORYX.I18N.RESIZE.W = "Left"; +ORYX.I18N.RESIZE.S ="Down"; +ORYX.I18N.RESIZE.E ="Right"; + +/** New Language Properties: 15.07.2009*/ +if(!ORYX.I18N.Layouting) ORYX.I18N.Layouting ={}; +ORYX.I18N.Layouting.doing = "Layouting..."; + +/** New Language Properties: 18.08.2009*/ +ORYX.I18N.SyntaxChecker.MULT_ERRORS = "Multiple Errors"; + +/** New Language Properties: 08.09.2009*/ +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; +ORYX.I18N.PropertyWindow.oftenUsed = "Often used"; +ORYX.I18N.PropertyWindow.moreProps = "More Properties"; + +/** New Language Properties 01.10.2009 */ +if(!ORYX.I18N.SyntaxChecker.BPMN2) ORYX.I18N.SyntaxChecker.BPMN2 = {}; + +ORYX.I18N.SyntaxChecker.BPMN2_DATA_INPUT_WITH_INCOMING_DATA_ASSOCIATION = "A Data Input must not have any incoming Data Associations."; +ORYX.I18N.SyntaxChecker.BPMN2_DATA_OUTPUT_WITH_OUTGOING_DATA_ASSOCIATION = "A Data Output must not have any outgoing Data Associations."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_TARGET_WITH_TOO_MANY_INCOMING_SEQUENCE_FLOWS = "Targets of Event-based Gateways may only have one incoming Sequence Flow."; + +/** New Language Properties 02.10.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WITH_TOO_LESS_OUTGOING_SEQUENCE_FLOWS = "An Event-based Gateway must have two or more outgoing Sequence Flows."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_EVENT_TARGET_CONTRADICTION = "If Message Intermediate Events are used in the configuration, then Receive Tasks must not be used and vice versa."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WRONG_TRIGGER = "Only the following Intermediate Event triggers are valid: Message, Signal, Timer, Conditional and Multiple."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WRONG_CONDITION_EXPRESSION = "The outgoing Sequence Flows of the Event Gateway must not have a condition expression."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_NOT_INSTANTIATING = "The Gateway does not meet the conditions to instantiate the process. Please use a start event or an instantiating attribute for the gateway."; + +/** New Language Properties 05.10.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAYDIRECTION_MIXED_FAILURE = "The Gateway must have both multiple incoming and outgoing Sequence Flows."; +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAYDIRECTION_CONVERGING_FAILURE = "The Gateway must have multiple incoming but most NOT have multiple outgoing Sequence Flows."; +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAYDIRECTION_DIVERGING_FAILURE = "The Gateway must NOT have multiple incoming but must have multiple outgoing Sequence Flows."; +ORYX.I18N.SyntaxChecker.BPMN2_GATEWAY_WITH_NO_OUTGOING_SEQUENCE_FLOW = "A Gateway must have a minimum of one outgoing Sequence Flow."; +ORYX.I18N.SyntaxChecker.BPMN2_RECEIVE_TASK_WITH_ATTACHED_EVENT = "Receive Tasks used in Event Gateway configurations must not have any attached Intermediate Events."; +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_SUBPROCESS_BAD_CONNECTION = "An Event Subprocess must not have any incoming or outgoing Sequence Flow."; + +/** New Language Properties 13.10.2009 */ +ORYX.I18N.SyntaxChecker.BPMN_MESSAGE_FLOW_NOT_CONNECTED = "At least one side of the Message Flow has to be connected."; + +/** New Language Properties 24.11.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_MESSAGES = "A Choreography Activity may only have one initiating message."; +ORYX.I18N.SyntaxChecker.BPMN_MESSAGE_FLOW_NOT_ALLOWED = "A Message Flow is not allowed here."; + +/** New Language Properties 27.11.2009 */ +ORYX.I18N.SyntaxChecker.BPMN2_EVENT_BASED_WITH_TOO_LESS_INCOMING_SEQUENCE_FLOWS = "An Event-based Gateway that is not instantiating must have a minimum of one incoming Sequence Flow."; +ORYX.I18N.SyntaxChecker.BPMN2_TOO_FEW_INITIATING_PARTICIPANTS = "A Choreography Activity must have one initiating Participant (white)."; +ORYX.I18N.SyntaxChecker.BPMN2_TOO_MANY_INITIATING_PARTICIPANTS = "A Choreography Acitivity must not have more than one initiating Participant (white)." + +ORYX.I18N.SyntaxChecker.COMMUNICATION_AT_LEAST_TWO_PARTICIPANTS = "The communication must be connected to at least two participants."; +ORYX.I18N.SyntaxChecker.MESSAGEFLOW_START_MUST_BE_PARTICIPANT = "The message flow's source must be a participant."; +ORYX.I18N.SyntaxChecker.MESSAGEFLOW_END_MUST_BE_PARTICIPANT = "The message flow's target must be a participant."; +ORYX.I18N.SyntaxChecker.CONV_LINK_CANNOT_CONNECT_CONV_NODES = "The conversation link must connect a communication or sub conversation node with a participant."; diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_de.js b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_de.js new file mode 100644 index 0000000..b03e6e7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_de.js @@ -0,0 +1,106 @@ +Ext.PagingToolbar.prototype.firstText = "Erste Seite"; +Ext.PagingToolbar.prototype.prevText = "Vorherige Seite"; +Ext.PagingToolbar.prototype.nextText = "Nächste Seite"; +Ext.PagingToolbar.prototype.lastText = "Letzte Seite"; + + +ORYX.I18N.PropertyWindow.dateFormat = "d.m.y"; + + +ORYX.I18N.View.East = "Attribute"; +ORYX.I18N.View.West = "Modellierungselemente"; + +ORYX.I18N.Oryx.pleaseWait = "Der Signavio Process Editor wird geladen. Bitte warten..."; +ORYX.I18N.AddDocker.add = "Docker hinzufügen"; +ORYX.I18N.AddDocker.del = "Docker löschen"; +ORYX.I18N.ERDFSupport.noCanvas = "Das XML Dokument enthält keinen Canvas Knoten."; +ORYX.I18N.ERDFSupport.deprText = "Der Export nach eRDF wird nicht empfohlen, da dieses Format in zukünftigen Versionen des Signavio Process Editors nicht mehr unterstützt wird. Verwenden Sie stattdessen den Export nach JSON, falls möglich. Wollen Sie dennoch das Model nach eRDF exportieren?"; +ORYX.I18N.Save.unsavedData = "Das Diagramm enthält nicht gespeicherte Daten. Sind Sie sicher, dass Sie den Editor schließen möchten?"; +ORYX.I18N.Save.pleaseWait = "Bitte warten Sie, während<br/>das Diagramm gespeichert wird."; +ORYX.I18N.File.info = "Info"; +ORYX.I18N.File.infoDesc = "Info"; +ORYX.I18N.PropertyWindow.name = "Attribut"; +ORYX.I18N.View.zoomStandard = "Zoom: Originalgröße"; +ORYX.I18N.View.zoomStandardDesc = "Zoom: Originalgröße"; +ORYX.I18N.View.zoomFitToModel = "Zoom: Modellgröße"; +ORYX.I18N.View.zoomFitToModelDesc = "Zoom: Modellgröße"; +ORYX.I18N.ShapeRepository.title = "Modellierungselemente"; +ORYX.I18N.Save.dialogLabelComment = "Änderungs-\nkommentar"; + +ORYX.I18N.Save.saveAs = "Kopie speichern..."; +ORYX.I18N.Save.saveAsDesc = "Kopie speichern..."; +ORYX.I18N.Save.saveAsTitle = "Kopie speichern..."; +ORYX.I18N.Save.savedAs = "Kopie gespeichert"; +ORYX.I18N.Save.savedDescription = "Das kopierte Diagramm ist unter folgendem Link gespeichert"; +ORYX.I18N.Save.notAuthorized = "Sie sind derzeit nicht angemeldet. Bitte melden Sie sich in einem <a href='/p/login' target='_blank'>neuen Fenstern</a> an, damit Sie diese Model speichern können." +ORYX.I18N.Save.transAborted = "Die Anfrage zum Speichern Ihres Diagramms hat zu lange gedauert. Bitte benutzen Sie eine schnellere Internetverbindung. Wenn Sie eine kabellose Internetverbindung benutzen, dann überprüfen Sie bitte die Signalstärke."; +ORYX.I18N.Save.noRights = "Sie haben nicht die benötigten Rechte, um das Diagramm abzuspeichern. Bitte überprüfen Sie im <a href='/p/explorer' target='_blank'>Signavio Explorer</a>, ob Sie noch die benötigten Rechte im Zielordner besitzen."; +ORYX.I18N.Save.comFailed = "Die Kommunikation mit dem Signavio Server ist fehlgeschlagen. Bitte überprüfen Sie Ihre Internetverbindung. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Signavio Support über das Briefumschlagssymbol in der Toolbar."; +ORYX.I18N.Save.failed = "Beim Speichern Ihres Diagramms ist ein Problem aufgetreten. Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Signavio Support über das Briefumschlagssymbol in der Toolbar."; +ORYX.I18N.Save.exception = "Beim Speichern Ihres Diagramms sind einige Probleme aufgetreten. Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an den Signavio Support über das Briefumschlagssymbol in der Toolbar."; +ORYX.I18N.Save.retrieveData = "Bitte warten, Daten werden geladen"; + +/** New Language Properties: 10.6.09*/ +if(!ORYX.I18N.ShapeMenuPlugin) ORYX.I18N.ShapeMenuPlugin = {}; +ORYX.I18N.ShapeMenuPlugin.morphMsg = "Umwandeln"; +ORYX.I18N.ShapeMenuPlugin.morphWarningTitleMsg = "Umwandeln"; +ORYX.I18N.ShapeMenuPlugin.morphWarningMsg = "Einige Kindelemente können nicht im neuen Element enthalten sein.<br/>Möchten Sie dennoch das Element umwandeln?"; + +if (!Signavio) { var Signavio = {}; } +if (!Signavio.I18N) { Signavio.I18N = {} } +if (!Signavio.I18N.Editor) { Signavio.I18N.Editor = {} } + +if (!Signavio.I18N.Editor.Linking) { Signavio.I18N.Editor.Linking = {} } +Signavio.I18N.Editor.Linking.CreateDiagram = "Neues Diagramm erstellen:"; +Signavio.I18N.Editor.Linking.UseDiagram = "Vorhandenes Diagramm verwenden"; +Signavio.I18N.Editor.Linking.UseLink = "Web-Link verwenden"; +Signavio.I18N.Editor.Linking.CreateTitle = "Verlinkung setzen"; +Signavio.I18N.Editor.Linking.Close = "Schließen"; +Signavio.I18N.Editor.Linking.Cancel = "Abbrechen"; +Signavio.I18N.Editor.Linking.UseName = "Diagrammnamen übernehmen"; +Signavio.I18N.Editor.Linking.UseNameHint = "Ersetzt den Bezeichner des aktuellen Elements ({type}) durch den Namen des zu verlinkenden Diagramms."; +Signavio.I18N.Editor.Linking.AlertSelectModel = "Bitte selektieren Sie ein Diagramm."; +Signavio.I18N.Editor.Linking.ButtonLink = "Verlinkung setzen"; +Signavio.I18N.Editor.Linking.LinkNoAccess = "Sie haben keine Berechtigung für das Diagramm."; +Signavio.I18N.Editor.Linking.LinkUnavailable = "Das Diagramm ist nicht verfügbar."; +Signavio.I18N.Editor.Linking.RemoveLink = "Link löschen"; +Signavio.I18N.Editor.Linking.EditLink = "Link ändern"; +Signavio.I18N.Editor.Linking.OpenLink = "Öffnen"; +Signavio.I18N.Editor.Linking.BrokenLink = "Der Link ist nicht verfügbar!"; +Signavio.I18N.Editor.Linking.PreviewTitle = "Vorschau"; + +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; +ORYX.I18N.PropertyWindow.oftenUsed = "Hauptattribute"; +ORYX.I18N.PropertyWindow.moreProps = "Weitere Attribute"; +ORYX.I18N.PropertyWindow.characteristicNr = "Kennzahlen"; +ORYX.I18N.PropertyWindow.meta = "Eigene Attribute"; + +if(!ORYX.I18N.PropertyWindow.Category){ORYX.I18N.PropertyWindow.Category = {}} +ORYX.I18N.PropertyWindow.Category.popular = "Hauptattribute"; +ORYX.I18N.PropertyWindow.Category.characteristicnr = "Kennzahlen"; +ORYX.I18N.PropertyWindow.Category.others = "Weitere Attribute"; +ORYX.I18N.PropertyWindow.Category.meta = "Eigene Attribute"; + +if(!ORYX.I18N.PropertyWindow.ListView) ORYX.I18N.PropertyWindow.ListView = {}; +ORYX.I18N.PropertyWindow.ListView.title = "Attribut: "; +ORYX.I18N.PropertyWindow.ListView.dataViewLabel = "Bereits vorhandene Einträge"; +ORYX.I18N.PropertyWindow.ListView.dataViewEmptyText = "Es sind noch keine Einträge vorhanden."; +ORYX.I18N.PropertyWindow.ListView.addEntryLabel = "Neuen Eintrag hinzufügen"; +ORYX.I18N.PropertyWindow.ListView.buttonAdd = "Hinzufügen"; +ORYX.I18N.PropertyWindow.ListView.save = "Speichern"; +ORYX.I18N.PropertyWindow.ListView.cancel = "Abbrachen"; + +if(!Signavio.I18N.Buttons) Signavio.I18N.Buttons = {}; +Signavio.I18N.Buttons.save = "Speichern"; +Signavio.I18N.Buttons.cancel = "Abbrechen"; +Signavio.I18N.Buttons.remove = "Entfernen"; + +if(!Signavio.I18N.btn) {Signavio.I18N.btn = {};} +Signavio.I18N.btn.btnEdit = "Editieren"; +Signavio.I18N.btn.btnRemove = "Löschen"; +Signavio.I18N.btn.moveUp = "Nach oben"; +Signavio.I18N.btn.moveDown = "Nach unten"; + +if(!Signavio.I18N.field) {Signavio.I18N.field = {};} +Signavio.I18N.field.Url = "URL"; +Signavio.I18N.field.UrlLabel = "Label"; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_en_us.js b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_en_us.js new file mode 100644 index 0000000..e103b21 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/i18n/translation_signavio_en_us.js @@ -0,0 +1,108 @@ +ORYX.I18N.PropertyWindow.dateFormat = "d/m/y"; + +ORYX.I18N.View.East = "Attributes"; +ORYX.I18N.View.West = "Modeling Elements"; + +ORYX.I18N.Oryx.title = "Signavio"; +ORYX.I18N.Oryx.pleaseWait = "Please wait while the Signavio Process Editor is loading..."; +ORYX.I18N.Edit.cutDesc = "Cuts the selection into the clipboard"; +ORYX.I18N.Edit.copyDesc = "Copies the selection into the clipboard"; +ORYX.I18N.Edit.pasteDesc = "Pastes the clipboard to the canvas"; +ORYX.I18N.ERDFSupport.noCanvas = "The xml document has no canvas node included!"; +ORYX.I18N.ERDFSupport.noSS = "The Signavio Process Editor canvas node has no stencil set definition included!"; +ORYX.I18N.ERDFSupport.deprText = "Exporting to eRDF is not recommended anymore because the support will be stopped in future versions of the Signavio Process Editor. If possible, export the model to JSON. Do you want to export anyway?"; +ORYX.I18N.Save.pleaseWait = "Please wait<br/>while saving..."; + +ORYX.I18N.Save.saveAs = "Save a copy..."; +ORYX.I18N.Save.saveAsDesc = "Save a copy..."; +ORYX.I18N.Save.saveAsTitle = "Save a copy..."; +ORYX.I18N.Save.savedAs = "Copy saved"; +ORYX.I18N.Save.savedDescription = "The process diagram is stored under"; +ORYX.I18N.Save.notAuthorized = "You are currently not logged in. Please <a href='/p/login' target='_blank'>log in</a> in a new window so that you can save the current diagram." +ORYX.I18N.Save.transAborted = "The saving request took too long. You may use a faster internet connection. If you use wireless LAN, please check the strength of your connection."; +ORYX.I18N.Save.noRights = "You do not have the required rights to store that model. Please check in the <a href='/p/explorer' target='_blank'>Signavio Explorer</a>, if you still have the rights to write in the target directory."; +ORYX.I18N.Save.comFailed = "The communication with the Signavio server failed. Please check your internet connection. If the problem resides, please contact the Signavio Support via the envelope symbol in the toolbar."; +ORYX.I18N.Save.failed = "Something went wrong when trying to save your diagram. Please try again. If the problem resides, please contact the Signavio Support via the envelope symbol in the toolbar."; +ORYX.I18N.Save.exception = "Some exceptions are raised while trying to save your diagram. Please try again. If the problem resides, please contact the Signavio Support via the envelope symbol in the toolbar."; +ORYX.I18N.Save.retrieveData = "Please wait, data is retrieving."; + +/** New Language Properties: 10.6.09*/ +if(!ORYX.I18N.ShapeMenuPlugin) ORYX.I18N.ShapeMenuPlugin = {}; +ORYX.I18N.ShapeMenuPlugin.morphMsg = "Transform shape"; +ORYX.I18N.ShapeMenuPlugin.morphWarningTitleMsg = "Transform shape"; +ORYX.I18N.ShapeMenuPlugin.morphWarningMsg = "There are child shape which can not be contained in the transformed element.<br/>Do you want to transform anyway?"; + +if (!Signavio) { var Signavio = {}; } +if (!Signavio.I18N) { Signavio.I18N = {} } +if (!Signavio.I18N.Editor) { Signavio.I18N.Editor = {} } + +if (!Signavio.I18N.Editor.Linking) { Signavio.I18N.Editor.Linking = {} } +Signavio.I18N.Editor.Linking.CreateDiagram = "Create a new diagram"; +Signavio.I18N.Editor.Linking.UseDiagram = "Use existing diagram"; +Signavio.I18N.Editor.Linking.UseLink = "Use web link"; +Signavio.I18N.Editor.Linking.Close = "Close"; +Signavio.I18N.Editor.Linking.Cancel = "Cancel"; +Signavio.I18N.Editor.Linking.UseName = "Adopt diagram name"; +Signavio.I18N.Editor.Linking.UseNameHint = "Replaces the current name of the modeling element ({type}) with the name of the linked diagram."; +Signavio.I18N.Editor.Linking.CreateTitle = "Establish link"; +Signavio.I18N.Editor.Linking.AlertSelectModel = "You have to select a model."; +Signavio.I18N.Editor.Linking.ButtonLink = "Link diagram"; +Signavio.I18N.Editor.Linking.LinkNoAccess = "You have no access to this diagram."; +Signavio.I18N.Editor.Linking.LinkUnavailable = "The diagram is unavailable."; +Signavio.I18N.Editor.Linking.RemoveLink = "Remove link"; +Signavio.I18N.Editor.Linking.EditLink = "Edit Link"; +Signavio.I18N.Editor.Linking.OpenLink = "Open"; +Signavio.I18N.Editor.Linking.BrokenLink = "The link is broken!"; +Signavio.I18N.Editor.Linking.PreviewTitle = "Preview"; + +if(!Signavio.I18N.Glossary_Support) { Signavio.I18N.Glossary_Support = {}; } +Signavio.I18N.Glossary_Support.renameEmpty = "No dictionary entry"; +Signavio.I18N.Glossary_Support.renameLoading = "Searching..."; + +/** New Language Properties: 08.09.2009*/ +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; +ORYX.I18N.PropertyWindow.oftenUsed = "Main properties"; +ORYX.I18N.PropertyWindow.moreProps = "More properties"; + +ORYX.I18N.PropertyWindow.btnOpen = "Open"; +ORYX.I18N.PropertyWindow.btnRemove = "Remove"; +ORYX.I18N.PropertyWindow.btnEdit = "Edit"; +ORYX.I18N.PropertyWindow.btnUp = "Move up"; +ORYX.I18N.PropertyWindow.btnDown = "Move down"; +ORYX.I18N.PropertyWindow.createNew = "Create new"; + +if(!ORYX.I18N.PropertyWindow) ORYX.I18N.PropertyWindow = {}; +ORYX.I18N.PropertyWindow.oftenUsed = "Main attributes"; +ORYX.I18N.PropertyWindow.moreProps = "More attributes"; +ORYX.I18N.PropertyWindow.characteristicNr = "Cost & Resource Analysis"; +ORYX.I18N.PropertyWindow.meta = "Custom attributes"; + +if(!ORYX.I18N.PropertyWindow.Category){ORYX.I18N.PropertyWindow.Category = {}} +ORYX.I18N.PropertyWindow.Category.popular = "Main Attributes"; +ORYX.I18N.PropertyWindow.Category.characteristicnr = "Cost & Resource Analysis"; +ORYX.I18N.PropertyWindow.Category.others = "More Attributes"; +ORYX.I18N.PropertyWindow.Category.meta = "Custom Attributes"; + +if(!ORYX.I18N.PropertyWindow.ListView) ORYX.I18N.PropertyWindow.ListView = {}; +ORYX.I18N.PropertyWindow.ListView.title = "Edit: "; +ORYX.I18N.PropertyWindow.ListView.dataViewLabel = "Already existing entries."; +ORYX.I18N.PropertyWindow.ListView.dataViewEmptyText = "No list entries."; +ORYX.I18N.PropertyWindow.ListView.addEntryLabel = "Add a new entry"; +ORYX.I18N.PropertyWindow.ListView.buttonAdd = "Add"; +ORYX.I18N.PropertyWindow.ListView.save = "Save"; +ORYX.I18N.PropertyWindow.ListView.cancel = "Cancel"; + +if(!Signavio.I18N.Buttons) Signavio.I18N.Buttons = {}; +Signavio.I18N.Buttons.save = "Save"; +Signavio.I18N.Buttons.cancel = "Cancel"; +Signavio.I18N.Buttons.remove = "Remove"; + +if(!Signavio.I18N.btn) {Signavio.I18N.btn = {};} +Signavio.I18N.btn.btnEdit = "Edit"; +Signavio.I18N.btn.btnRemove = "Remove"; +Signavio.I18N.btn.moveUp = "Move up"; +Signavio.I18N.btn.moveDown = "Move down"; + +if(!Signavio.I18N.field) {Signavio.I18N.field = {};} +Signavio.I18N.field.Url = "URL"; +Signavio.I18N.field.UrlLabel = "Label"; diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/oryx.debug.js b/src/main/resources/static/activiti-editor/editor-app/editor/oryx.debug.js new file mode 100644 index 0000000..87a4389 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/oryx.debug.js @@ -0,0 +1,24513 @@ +/** + * @namespace Oryx name space for different utility methods + * @name ORYX.Utils +*/ + +if(!ORYX) var ORYX = {}; + +ORYX.Utils = { + /** + * General helper method for parsing a param out of current location url + * @example + * // Current url in Browser => "http://oryx.org?param=value" + * ORYX.Utils.getParamFromUrl("param") // => "value" + * @param {Object} name + */ + getParamFromUrl: function(name){ + name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); + var regexS = "[\\?&]" + name + "=([^&#]*)"; + var regex = new RegExp(regexS); + var results = regex.exec(window.location.href); + if (results == null) { + return null; + } + else { + return results[1]; + } + }, + + adjustLightness: function(){ + return arguments[0]; + }, + + adjustGradient: function(gradient, reference){ + + if (ORYX.CONFIG.DISABLE_GRADIENT && gradient){ + + var col = reference.getAttributeNS(null, "stop-color") || "#ffffff"; + + $A(gradient.getElementsByTagName("stop")).each(function(stop){ + if (stop == reference){ return; } + stop.setAttributeNS(null, "stop-color", col); + }); + } + } +} +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +XMLNS = { + ATOM: "http://www.w3.org/2005/Atom", + XHTML: "http://www.w3.org/1999/xhtml", + ERDF: "http://purl.org/NET/erdf/profile", + RDFS: "http://www.w3.org/2000/01/rdf-schema#", + RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + RAZIEL: "http://b3mn.org/Raziel", + + SCHEMA: "" +}; + +//TODO kann kickstart sich vielleicht auch um die erzeugung von paketen/ +// namespaces k???mmern? z.b. requireNamespace("ORYX.Core.SVG"); +var Kickstart = { + started: false, + callbacks: [], + alreadyLoaded: [], + PATH: '', + + load: function() { Kickstart.kick(); }, + + kick: function() { + //console.profile("loading"); + if(!Kickstart.started) { + Kickstart.started = true; + Kickstart.callbacks.each(function(callback){ + // call the registered callback asynchronously. + window.setTimeout(callback, 1); + }); + } + }, + + register: function(callback) { + //TODO Add some mutual exclusion between kick and register calls. + with(Kickstart) { + if(started) window.setTimeout(callback, 1); + else Kickstart.callbacks.push(callback) + } + }, + + /** + * Loads a js, assuring that it has only been downloaded once. + * @param {String} url the script to load. + */ + require: function(url) { + // if not already loaded, include it. + if(Kickstart.alreadyLoaded.member(url)) + return false; + return Kickstart.include(url); + }, + + /** + * Loads a js, regardless of whether it has only been already downloaded. + * @param {String} url the script to load. + */ + include: function(url) { + + // prepare a script tag and place it in html head. + var head = document.getElementsByTagNameNS(XMLNS.XHTML, 'head')[0]; + var s = document.createElementNS(XMLNS.XHTML, "script"); + s.setAttributeNS(XMLNS.XHTML, 'type', 'text/javascript'); + s.src = Kickstart.PATH + url; + + //TODO macht es sinn, dass neue skript als letztes kind in den head + // einzubinden (stichwort reihenfolge der skript tags)? + head.appendChild(s); + + // remember this url. + Kickstart.alreadyLoaded.push(url); + + return true; + } +} + +// register kickstart as the new onload event listener on current window. +// previous listener(s) are triggered to launch with kickstart. +Event.observe(window, 'load', Kickstart.load);/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +var ERDF = { + + LITERAL: 0x01, + RESOURCE: 0x02, + DELIMITERS: ['.', '-'], + HASH: '#', + HYPHEN: "-", + + schemas: [], + callback: undefined, + log: undefined, + + init: function(callback) { + + // init logging. + //ERDF.log = Log4js.getLogger("oryx"); + //ERDF.log.setLevel(Log4js.Level.ALL); + //ERDF.log.addAppender(new ConsoleAppender(ERDF.log, false)); + + //if(ERDF.log.isTraceEnabled()) + // ERDF.log.trace("ERDF Parser is initialized."); + + // register callbacks and default schemas. + ERDF.callback = callback; + ERDF.registerSchema('schema', XMLNS.SCHEMA); + ERDF.registerSchema('rdfs', XMLNS.RDFS); + }, + + run: function() { + + //if(ERDF.log.isTraceEnabled()) + // ERDF.log.trace("ERDF Parser is running."); + + // do the work. + return ERDF._checkProfile() && ERDF.parse(); + }, + + parse: function() { + + //(ERDF.log.isDebugEnabled()) + // ERDF.log.debug("Begin parsing document metadata."); + + // time measuring + ERDF.__startTime = new Date(); + + var bodies = document.getElementsByTagNameNS(XMLNS.XHTML, 'body'); + var subject = {type: ERDF.RESOURCE, value: ''}; + + var result = ERDF._parseDocumentMetadata() && + ERDF._parseFromTag(bodies[0], subject); + + // time measuring + ERDF.__stopTime = new Date(); + + var duration = (ERDF.__stopTime - ERDF.__startTime)/1000.; + //alert('ERDF parsing took ' + duration + ' s.'); + + return result; + }, + + _parseDocumentMetadata: function() { + + // get links from head element. + var heads = document.getElementsByTagNameNS(XMLNS.XHTML, 'head'); + var links = heads[0].getElementsByTagNameNS(XMLNS.XHTML, 'link'); + var metas = heads[0].getElementsByTagNameNS(XMLNS.XHTML, 'meta'); + + // process links first, since they could contain schema definitions. + $A(links).each(function(link) { + var properties = link.getAttribute('rel'); + var reversedProperties = link.getAttribute('rev'); + var value = link.getAttribute('href'); + + ERDF._parseTriplesFrom( + ERDF.RESOURCE, '', + properties, + ERDF.RESOURCE, value); + + ERDF._parseTriplesFrom( + ERDF.RESOURCE, value, + reversedProperties, + ERDF.RESOURCE, ''); + }); + + // continue with metas. + $A(metas).each(function(meta) { + var property = meta.getAttribute('name'); + var value = meta.getAttribute('content'); + + ERDF._parseTriplesFrom( + ERDF.RESOURCE, '', + property, + ERDF.LITERAL, value); + }); + + return true; + }, + + _parseFromTag: function(node, subject, depth) { + + // avoid parsing non-xhtml content. + if(!node || !node.namespaceURI || node.namespaceURI != XMLNS.XHTML) { return; } + + // housekeeping. + if(!depth) depth=0; + var id = node.getAttribute('id'); + + // some logging. + //if(ERDF.log.isTraceEnabled()) + // ERDF.log.trace(">".times(depth) + " Parsing " + node.nodeName + " ("+node.nodeType+") for data on " + + // ((subject.type == ERDF.RESOURCE) ? ('<' + subject.value + '>') : '') + + // ((subject.type == ERDF.LITERAL) ? '"' + subject.value + '"' : '')); + + /* triple finding! */ + + // in a-tags... + if(node.nodeName.endsWith(':a') || node.nodeName == 'a') { + var properties = node.getAttribute('rel'); + var reversedProperties = node.getAttribute('rev'); + var value = node.getAttribute('href'); + var title = node.getAttribute('title'); + var content = node.textContent; + + // rel triples + ERDF._parseTriplesFrom( + subject.type, subject.value, + properties, + ERDF.RESOURCE, value, + function(triple) { + var label = title? title : content; + + // label triples + ERDF._parseTriplesFrom( + triple.object.type, triple.object.value, + 'rdfs.label', + ERDF.LITERAL, label); + }); + + // rev triples + ERDF._parseTriplesFrom( + subject.type, subject.value, + reversedProperties, + ERDF.RESOURCE, ''); + + // type triples + ERDF._parseTypeTriplesFrom( + subject.type, subject.value, + properties); + + // in img-tags... + } else if(node.nodeName.endsWith(':img') || node.nodeName == 'img') { + var properties = node.getAttribute('class'); + var value = node.getAttribute('src'); + var alt = node.getAttribute('alt'); + + ERDF._parseTriplesFrom( + subject.type, subject.value, + properties, + ERDF.RESOURCE, value, + function(triple) { + var label = alt; + + // label triples + ERDF._parseTriplesFrom( + triple.object.type, triple.object.value, + 'rdfs.label', + ERDF.LITERAL, label); + }); + + } + + // in every tag + var properties = node.getAttribute('class'); + var title = node.getAttribute('title'); + var content = node.textContent; + var label = title ? title : content; + + // regular triples + ERDF._parseTriplesFrom( + subject.type, subject.value, + properties, + ERDF.LITERAL, label); + + if(id) subject = {type: ERDF.RESOURCE, value: ERDF.HASH+id}; + + // type triples + ERDF._parseTypeTriplesFrom( + subject.type, subject.value, + properties); + + // parse all children that are element nodes. + var children = node.childNodes; + if(children) $A(children).each(function(_node) { + if(_node.nodeType == _node.ELEMENT_NODE) + ERDF._parseFromTag(_node, subject, depth+1); }); + }, + + _parseTriplesFrom: function(subjectType, subject, properties, + objectType, object, callback) { + + if(!properties) return; + properties.toLowerCase().split(' ').each( function(property) { + + //if(ERDF.log.isTraceEnabled()) + // ERDF.log.trace("Going for property " + property); + + var schema = ERDF.schemas.find( function(schema) { + return false || ERDF.DELIMITERS.find( function(delimiter) { + return property.startsWith(schema.prefix + delimiter); + }); + }); + + if(schema && object) { + property = property.substring( + schema.prefix.length+1, property.length); + var triple = ERDF.registerTriple( + new ERDF.Resource(subject), + {prefix: schema.prefix, name: property}, + (objectType == ERDF.RESOURCE) ? + new ERDF.Resource(object) : + new ERDF.Literal(object)); + + if(callback) callback(triple); + } + }); + }, + + _parseTypeTriplesFrom: function(subjectType, subject, properties, callback) { + + if(!properties) return; + properties.toLowerCase().split(' ').each( function(property) { + + //if(ERDF.log.isTraceEnabled()) + // ERDF.log.trace("Going for property " + property); + + var schema = ERDF.schemas.find( function(schema) { + return false || ERDF.DELIMITERS.find( function(delimiter) { + return property.startsWith(ERDF.HYPHEN + schema.prefix + delimiter); + }); + }); + + if(schema && subject) { + property = property.substring(schema.prefix.length+2, property.length); + var triple = ERDF.registerTriple( + (subjectType == ERDF.RESOURCE) ? + new ERDF.Resource(subject) : + new ERDF.Literal(subject), + {prefix: 'rdf', name: 'type'}, + new ERDF.Resource(schema.namespace+property)); + if(callback) callback(triple); + } + }); + }, + + /** + * Checks for ERDF profile declaration in head of document. + */ + _checkProfile: function() { + + // get profiles from head element. + var heads = document.getElementsByTagNameNS(XMLNS.XHTML, 'head'); + var profiles = heads[0].getAttribute("profile"); + var found = false; + + // if erdf profile is contained. + if(profiles && profiles.split(" ").member(XMLNS.ERDF)) { + + // pass check. + //if(ERDF.log.isTraceEnabled()) + // ERDF.log.trace("Found ERDF profile " + XMLNS.ERDF); + return true; + + } else { + + // otherwise fail check. + //if(ERDF.log.isFatalEnabled()) + // ERDF.log.fatal("No ERDF profile found."); + return false; + } + }, + + __stripHashes: function(s) { + return (s && (typeof s.substring == 'function') && s.substring(0, 1)=='#') ? s.substring(1, s.length) : s; + }, + + registerSchema: function(prefix, namespace) { + + // TODO check whether already registered, if so, complain. + ERDF.schemas.push({ + prefix: prefix, + namespace: namespace + }); + + //if(ERDF.log.isDebugEnabled()) + // ERDF.log.debug("Prefix '"+prefix+"' for '"+namespace+"' registered."); + }, + + registerTriple: function(subject, predicate, object) { + + // if prefix is schema, this is a schema definition. + if(predicate.prefix.toLowerCase() == 'schema') + this.registerSchema(predicate.name, object.value); + + var triple = new ERDF.Triple(subject, predicate, object); + ERDF.callback(triple); + + //if(ERDF.log.isInfoEnabled()) + // ERDF.log.info(triple) + + // return the registered triple. + return triple; + }, + + __enhanceObject: function() { + + /* Resource state querying methods */ + this.isResource = function() { + return this.type == ERDF.RESOURCE }; + this.isLocal = function() { + return this.isResource() && this.value.startsWith('#') }; + this.isCurrentDocument = function() { + return this.isResource() && (this.value == '') }; + + /* Resource getter methods.*/ + this.getId = function() { + return this.isLocal() ? ERDF.__stripHashes(this.value) : false; }; + + /* Liiteral state querying methods */ + this.isLiteral = function() { + return this.type == ERDF.LIITERAL }; + }, + + serialize: function(literal) { + + if(!literal){ + return ""; + }else if(literal.constructor == String) { + return literal; + } else if(literal.constructor == Boolean) { + return literal? 'true':'false'; + } else { + return literal.toString(); + } + } +}; + + +ERDF.Triple = function(subject, predicate, object) { + + this.subject = subject; + this.predicate = predicate; + this.object = object; + + this.toString = function() { + + return "[ERDF.Triple] " + + this.subject.toString() + ' ' + + this.predicate.prefix + ':' + this.predicate.name + ' ' + + this.object.toString(); + }; +}; + +ERDF.Resource = function(uri) { + + this.type = ERDF.RESOURCE; + this.value = uri; + ERDF.__enhanceObject.apply(this); + + this.toString = function() { + return '<' + this.value + '>'; + } + +}; + +ERDF.Literal = function(literal) { + + this.type = ERDF.LITERAL; + this.value = ERDF.serialize(literal); + ERDF.__enhanceObject.apply(this); + + this.toString = function() { + return '"' + this.value + '"'; + } +};/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/* + * Save and triple generation behaviour. Use this area to configure + * data management to your needs. + */ +var USE_ASYNCHRONOUS_REQUESTS = true; +var DISCARD_UNUSED_TRIPLES = true; +var PREFER_SPANS_OVER_DIVS = true; +var PREFER_TITLE_OVER_TEXTNODE = false; +var RESOURCE_ID_PREFIX = 'resource'; + +var SHOW_DEBUG_ALERTS_WHEN_SAVING = false; +var SHOW_EXTENDED_DEBUG_INFORMATION = false; + +/* + * Back end specific workarounds. + */ + +var USE_ARESS_WORKAROUNDS = true; + +/* + * Data management constants. Do not change these, as they are used + * both internally and externally to communicate on events and to identify + * command object actions in triple production and embedding rules. + */ + +// Resource constants +var RESOURCE_CREATED = 0x01; +var RESOURCE_REMOVED = 0x02; +var RESOURCE_SAVED = 0x04; +var RESOURCE_RELOADED = 0x08; +var RESOURCE_SYNCHRONIZED = 0x10; + +// Triple constants +var TRIPLE_REMOVE = 0x01; +var TRIPLE_ADD = 0x02; +var TRIPLE_RELOAD = 0x04; +var TRIPLE_SAVE = 0x08; + +var PROCESSDATA_REF = 'processdata'; + +// HTTP status code constants +// +//// 2xx +//const 200_OK = 'Ok'; +//const 201_CREATED = 'Created'; +//const 202_ACCEPTED = 'Accepted'; +//const 204_NO_CONTENT = 'No Content'; +// +//// 3xx +//const 301_MOVED_PERMANENTLY = 'Moved Permanently'; +//const 302_MOVED_TEMPORARILY = 'Moved Temporarily'; +//const 304_NOT_MODIFIED = 'Not Modified'; +// +//// 4xx +//const 400_BAD_REQUEST = 'Bad Request'; +//const 401_UNAUTHORIZED = 'Unauthorized'; +//const 403_FORBIDDEN = 'Forbidden'; +//const 404_NOT_FOUND = 'Not Found'; +//const 409_CONFLICT = 'Conflict'; +// +//// 5xx +//const 500_INTERNAL_SERVER_ERROR = 'Internal Server Error'; +//const 501_NOT_IMPLEMENTED = 'Not Implemented'; +//const 502_BAD_GATEWAY = 'Bad Gateway'; +//const 503_SERVICE_UNAVAILABLE = 'Service Unavailable'; +// +/** + * The Data Management object. Use this one when interacting with page internal + * data. Initialize data management by DataManager.init(); + * @class DataManager + */ +var DataManager = { + + /** + * The init method should be called once in the DataManagers lifetime. + * It causes the DataManager to initialize itself, the erdf parser, do all + * neccessary registrations and configurations, to run the parser and + * from then on deliver all resulting triples. + * No parameters needed are needed in a call to this method. + */ + init: function() { + ERDF.init(DataManager._registerTriple); + DataManager.__synclocal(); + }, + + /** + * This triple array is meant to be the whole knowledge of the DataManager. + */ + _triples: [], + + /** + * This method is meant for callback from erdf parsing. It is not to be + * used in another way than to add triples to the triple store. + * @param {Object} triple the triple to add to the triple store. + */ + _registerTriple: function(triple) { + DataManager._triples.push(triple) + }, + + /** + * The __synclocal method is for internal usage only. + * It performs synchronization with the local document, that is, the triple + * store is adjustet to the content of the document, which could have been + * changed by any other applications running on the same page. + */ + __synclocal: function() { + DataManager._triples = []; + ERDF.run(); + }, + + /** + * Makes the shape passed into this method synchronize itself with the DOM. + * This method returns the shapes resource object for further manipulation. + * @param {Object} shape + */ + __synchronizeShape: function(shape) { + + var r = ResourceManager.getResource(shape.resourceId); + var serialize = shape.serialize(); + + // store all serialize values + serialize.each( function(ser) { + + var resource = (ser.type == 'resource'); + var _triple = new ERDF.Triple( + new ERDF.Resource(shape.resourceId), + {prefix: ser.prefix, name: ser.name}, + resource ? + new ERDF.Resource(ser.value) : + new ERDF.Literal(ser.value) + ); + DataManager.setObject(_triple); + }); + + return r; + }, + + __storeShape: function(shape) { + + // first synchronize the shape, + var resource = DataManager.__synchronizeShape(shape); + + // then save the synchronized dom. + resource.save(); + }, + + __forceExistance: function(shape) { + + if(!$(shape.resourceId)) { + + if(!$$('.' + PROCESSDATA_REF)[0]) + DataManager.graft(XMLNS.XHTML, + document.getElementsByTagNameNS(XMLNS.XHTML, 'body').item(0), ['div', {'class': PROCESSDATA_REF, 'style':'display:none;'}]); + + // object is literal + DataManager.graft(XMLNS.XHTML, + $$('.' + PROCESSDATA_REF)[0], [ + + 'div', { + 'id': shape.resourceId, + //This should be done in a more dynamic way!!!!! + 'class': (shape instanceof ORYX.Core.Canvas) ? "-oryx-canvas" : undefined + } + ]); + + } else { + var resource = $(shape.resourceId) + var children = $A(resource.childNodes) + children.each( function(child) { + resource.removeChild(child); + }); + }; + }, + + __persistShape: function(shape) { + + // a shape serialization. + var shapeData = shape.serialize(); + + // initialize a triple array and construct a shape resource + // to be used in triple generation. + var triplesArray = []; + var shapeResource = new ERDF.Resource(shape.resourceId); + + // remove all triples for this particular shape's resource + DataManager.removeTriples( DataManager.query( + shapeResource, undefined, undefined)); + + // for each data set in the shape's serialization + shapeData.each( function(data) { + + // construct a triple's value + var value = (data.type == 'resource') ? + new ERDF.Resource(data.value) : + new ERDF.Literal(data.value); + + // construct triple and add it to the DOM. + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: data.prefix, name: data.name}, + value + )); + }); + }, + + __persistDOM: function(facade) { + + // getChildShapes gets all shapes (nodes AND edges), deep flag + // makes it return a flattened child hierarchy. + + var canvas = facade.getCanvas(); + var shapes = canvas.getChildShapes(true); + var result = ''; + + // persist all shapes. + shapes.each( function(shape) { + DataManager.__forceExistance(shape); + }); + //DataManager.__synclocal(); + + DataManager.__renderCanvas(facade); + result += DataManager.serialize( + $(ERDF.__stripHashes(facade.getCanvas().resourceId)), true); + + shapes.each( function(shape) { + + DataManager.__persistShape(shape); + result += DataManager.serialize( + $(ERDF.__stripHashes(shape.resourceId)), true); + }); + + //result += DataManager.__renderCanvas(facade); + + return result; + }, + + __renderCanvas: function(facade) { + + var canvas = facade.getCanvas(); + var stencilSets = facade.getStencilSets(); + var shapes = canvas.getChildShapes(true); + + DataManager.__forceExistance(canvas); + + DataManager.__persistShape(canvas); + + var shapeResource = new ERDF.Resource(canvas.resourceId); + + // remove all triples for this particular shape's resource + DataManager.removeTriples( DataManager.query( + shapeResource, undefined, undefined)); + + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: "oryx", name: "mode"}, + new ERDF.Literal("writable") + )); + + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: "oryx", name: "mode"}, + new ERDF.Literal("fullscreen") + )); + + stencilSets.values().each(function(stencilset) { + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: "oryx", name: "stencilset"}, + new ERDF.Resource(stencilset.source().replace(/&/g, "%26")) + )); + + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: "oryx", name: "ssnamespace"}, + new ERDF.Resource(stencilset.namespace()) + )); + + stencilset.extensions().keys().each(function(extension) { + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: "oryx", name: "ssextension"}, + new ERDF.Literal(extension) + )); + }); + }); + + shapes.each(function(shape) { + DataManager.addTriple( new ERDF.Triple( + shapeResource, + {prefix: "oryx", name: "render"}, + new ERDF.Resource("#" + shape.resourceId) + )); + }); + }, + + __counter: 0, + __provideId: function() { + + while($(RESOURCE_ID_PREFIX+DataManager.__counter)) + DataManager.__counter++; + + return RESOURCE_ID_PREFIX+DataManager.__counter; + }, + + serializeDOM: function(facade) { + + return DataManager.__persistDOM(facade); + }, + + syncGlobal: function(facade) { + + return DataManager.__syncglobal(facade); + }, + + /** + * This method is used to synchronize local DOM with remote resources. + * Local changes are commited to the server, and remote changes are + * performed to the local document. + * @param {Object} facade The facade of the editor that holds certain + * resource representations as shapes. + */ + __syncglobal: function(facade) { + + // getChildShapes gets all shapes (nodes AND edges), deep flag + // makes it return a flattened child hierarchy. + + var canvas = facade.getCanvas(); + var shapes = canvas.getChildShapes(true); + + // create dummy resource representations in the dom + // for all shapes that were newly created. + + shapes.select( function(shape) { + + // select shapes without resource id. + + return !($(shape.resourceId)); + + }).each( function(shape) { + + // create new resources for them. + if(USE_ARESS_WORKAROUNDS) { + + /* + * This is a workaround due to a bug in aress. Resources are + * ignoring changes to raziel:type property once they are + * created. As long as this is not fixed, the resource is now + * being created using a randomly guessed id, this temporary id + * is then used in references and the appropriate div is being + * populated with properties. + * + * AFTER THIS PHASE THE DATA IS INCONSISTENT AS REFERENCES POINT + * TO IDS THAT ARE UNKNOWN TO THE BACK END. + * + * After the resource is actually created in aress, it gets an id + * that is persistent. All shapes are then being populated with the + * correct id references and stored on the server. + * + * AFTER THE SAVE PROCESS HAS RETURNED, THE DATA IS CONSISTENT + * REGARDING THE ID REFERENCES AGAIN. + */ + + var razielType = shape.properties['raziel-type']; + + var div = '<div xmlns="http://www.w3.org/1999/xhtml">' + + '<span class="raziel-type">'+razielType+'</span></div>'; + + var r = ResourceManager.__createResource(div); + shape.resourceId = r.id(); + + } else { + + var r = ResourceManager.__createResource(); + shape.resourceId = r.id(); + } + + }); + + shapes.each( function(shape) { + + // store all shapes. + DataManager.__storeShape(shape); + }); + }, + + /** + * This method serializes a single div into a string that satisfies the + * client/server communication protocol. It ingnores all elements that have + * an attribute named class that includes 'transient'. + * @param {Object} node the element to serialize. + * @param {Object} preserveNamespace whether to preserve the parent's + * namespace. If you are not sure about namespaces, provide + * just the element to be serialized. + */ + serialize: function(node, preserveNamespace) { + + if (node.nodeType == node.ELEMENT_NODE) { + // serialize an element node. + + var children = $A(node.childNodes); + var attributes = $A(node.attributes); + var clazz = new String(node.getAttribute('class')); + var ignore = clazz.split(' ').member('transient'); + + // ignore transients. + + if(ignore) + return ''; + + // start serialization. + + var result = '<' + node.nodeName; + + // preserve namespace? + if(!preserveNamespace) + result += ' xmlns="' + (node.namespaceURI ? node.namespaceURI : XMLNS.XHTML) + '" xmlns:oryx="http://oryx-editor.org"'; + + // add all attributes. + + attributes.each(function(attribute) { + result += ' ' + attribute.nodeName + '="' + + attribute.nodeValue + '"';}); + + // close if no children. + + if(children.length == 0) + result += '/>'; + + else { + + // serialize all children. + + result += '>'; + children.each(function(_node) { + result += DataManager.serialize(_node, true)}); + result += '</' + node.nodeName + '>' + } + + return result; + + } else if (node.nodeType == node.TEXT_NODE) { + + // serialize a text node. + return node.nodeValue; + } + + //TODO serialize cdata areas also. + //TODO work on namespace awareness. + }, + + addTriple: function(triple) { + + // assert the subject is a resource + + if(!triple.subject.type == ERDF.LITERAL) + throw 'Cannot add the triple ' + triple.toString() + + ' because the subject is not a resource.' + + // get the element which represents this triple's subject. + var elementId = ERDF.__stripHashes(triple.subject.value); + var element = $(elementId); + + // assert the subject is inside this document. + if(!element) + throw 'Cannot add the triple ' + triple.toString() + + ' because the subject "'+elementId+'" is not in the document.'; + + if(triple.object.type == ERDF.LITERAL) + + // object is literal + DataManager.graft(XMLNS.XHTML, element, [ + 'span', {'class': (triple.predicate.prefix + "-" + + triple.predicate.name)}, triple.object.value.escapeHTML() + ]); + + else { + + // object is resource + DataManager.graft(XMLNS.XHTML, element, [ + 'a', {'rel': (triple.predicate.prefix + "-" + + triple.predicate.name), 'href': triple.object.value} + ]); + + } + + return true; + }, + + removeTriples: function(triples) { + + // alert('Removing ' +triples.length+' triples.'); + + // from all the triples select those ... + var removed = triples.select( + + function(triple) { + + // TODO remove also from triple store. + // ... that were actually removed. + return DataManager.__removeTriple(triple); + }); + + // sync and return removed triples. + // DataManager.__synclocal(); + return removed; + }, + + removeTriple: function(triple) { + + // remember whether the triple was actually removed. + var result = DataManager.__removeTriple(triple); + + // sync and return removed triples. + // DataManager.__synclocal(); + return result; + }, + + __removeTriple: function(triple) { + + // assert the subject is a resource + if(!triple.subject.type == ERDF.LITERAL) + + throw 'Cannot remove the triple ' + triple.toString() + + ' because the subject is not a resource.'; + + // get the element which represents this triple's subject. + var elementId = ERDF.__stripHashes(triple.subject.value); + var element = $(elementId); + + // assert the subject is inside this document. + if(!element) + + throw 'Cannot remove the triple ' + triple.toString() + + ' because the subject is not in the document.'; + + if(triple.object.type == ERDF.LITERAL) { + + // continue searching actively for the triple. + var result = DataManager.__removeTripleRecursively(triple, element); + return result; + } + }, + + __removeTripleRecursively: function(triple, continueFrom) { + + // return when this node is not an element node. + if(continueFrom.nodeType != continueFrom.ELEMENT_NODE) + return false; + + var classes = new String(continueFrom.getAttribute('class')); + var children = $A(continueFrom.childNodes); + + if(classes.include(triple.predicate.prefix + '-' + triple.predicate.name)) { + + var content = continueFrom.textContent; + if( (triple.object.type == ERDF.LITERAL) && + (triple.object.value == content)) + + continueFrom.parentNode.removeChild(continueFrom); + + return true; + + } else { + + children.each(function(_node) { + DataManager.__removeTripleRecursively(triple, _node)}); + return false; + } + + }, + + /** + * graft() function + * Originally by Sean M. Burke from interglacial.com, altered for usage with + * SVG and namespace (xmlns) support. Be sure you understand xmlns before + * using this funtion, as it creates all grafted elements in the xmlns + * provided by you and all element's attribures in default xmlns. If you + * need to graft elements in a certain xmlns and wish to assign attributes + * in both that and another xmlns, you will need to do stepwise grafting, + * adding non-default attributes yourself or you'll have to enhance this + * function. Latter, I would appreciate: martin???apfelfabrik.de + * @param {Object} namespace The namespace in which + * elements should be grafted. + * @param {Object} parent The element that should contain the grafted + * structure after the function returned. + * @param {Object} t the crafting structure. + * @param {Object} doc the document in which grafting is performed. + */ + graft: function(namespace, parent, t, doc) { + + doc = (doc || (parent && parent.ownerDocument) || document); + var e; + if(t === undefined) { + echo( "Can't graft an undefined value"); + } else if(t.constructor == String) { + e = doc.createTextNode( t ); + } else { + for(var i = 0; i < t.length; i++) { + if( i === 0 && t[i].constructor == String ) { + var snared = t[i].match( /^([a-z][a-z0-9]*)\.([^\s\.]+)$/i ); + if( snared ) { + e = doc.createElementNS(namespace, snared[1]); + e.setAttributeNS(null, 'class', snared[2] ); + continue; + } + snared = t[i].match( /^([a-z][a-z0-9]*)$/i ); + if( snared ) { + e = doc.createElementNS(namespace, snared[1]); // but no class + continue; + } + + // Otherwise: + e = doc.createElementNS(namespace, "span"); + e.setAttribute(null, "class", "namelessFromLOL" ); + } + + if( t[i] === undefined ) { + echo("Can't graft an undefined value in a list!"); + } else if( t[i].constructor == String || t[i].constructor == Array) { + this.graft(namespace, e, t[i], doc ); + } else if( t[i].constructor == Number ) { + this.graft(namespace, e, t[i].toString(), doc ); + } else if( t[i].constructor == Object ) { + // hash's properties => element's attributes + for(var k in t[i]) { e.setAttributeNS(null, k, t[i][k] ); } + } else if( t[i].constructor == Boolean ) { + this.graft(namespace, e, t[i] ? 'true' : 'false', doc ); + } else + throw "Object " + t[i] + " is inscrutable as an graft arglet."; + } + } + + if(parent) parent.appendChild(e); + + return Element.extend(e); // return the topmost created node + }, + + setObject: function(triple) { + + /** + * Erwartungen von Arvid an diese Funktion: + * - Es existiert genau ein triple mit dem Subjekt und Praedikat, + * das uebergeben wurde, und dieses haelt uebergebenes Objekt. + */ + + var triples = DataManager.query( + triple.subject, + triple.predicate, + undefined + ); + + DataManager.removeTriples(triples); + + DataManager.addTriple(triple); + + return true; + }, + + query: function(subject, predicate, object) { + + /* + * Typical triple. + * {value: subject, type: subjectType}, + * {prefix: schema.prefix, name: property}, + * {value: object, type: objectType}); + */ + + return DataManager._triples.select(function(triple) { + + var select = ((subject) ? + (triple.subject.type == subject.type) && + (triple.subject.value == subject.value) : true); + if(predicate) { + select = select && ((predicate.prefix) ? + (triple.predicate.prefix == predicate.prefix) : true); + select = select && ((predicate.name) ? + (triple.predicate.name == predicate.name) : true); + } + select = select && ((object) ? + (triple.object.type == object.type) && + (triple.object.value == object.value) : true); + return select; + }); + } +} + +Kickstart.register(DataManager.init); + +function assert(expr, m) { if(!expr) throw m; }; + +function DMCommand(action, triple) { + + // store action and triple. + this.action = action; + this.triple = triple; + + this.toString = function() { + return 'Command('+action+', '+triple+')'; + }; +} + +function DMCommandHandler(nextHandler) { + + /** + * Private method to set the next handler in the Chain of Responsibility + * (see http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern for + * details). + * @param {DMCommandHandler} handler The handler that is next in the chain. + */ + this.__setNext = function(handler) { + var _next = this.__next; + this.__next = nextHandler; + return _next ? _next : true; + }; + this.__setNext(nextHandler); + + /** + * Invokes the next handler. If there is no next handler, this method + * returns false, otherwise it forwards the result of the handling. + * @param {Object} command The command object to be processed. + */ + this.__invokeNext = function(command) { + return this.__next ? this.__next.handle(command) : false; + }; + + /** + * Handles a command. The abstract method process() is called with the + * command object that has been passed. If the process method catches the + * command (returns true on completion), the handle() method returns true. + * If the process() method doesn't catch the command, the next handler will + * be invoked. + * @param {Object} command The command object to be processed. + */ + this.handle = function(command) { + return this.process(command) ? true : this.__invokeNext(command); + } + + /** + * Empty process() method returning false. If javascript knew abstract + * class members, this would be one. + * @param {Object} command The command object to process. + */ + this.process = function(command) { return false; }; +}; + +/** + * This Handler manages the addition and the removal of meta elements in the + * head of the document. + * @param {DMCommandHandler} next The handler that is next in the chain. + */ +function MetaTagHandler(next) { + + DMCommandHandler.apply(this, [next]); + this.process = function(command) { + + with(command.triple) { + + /* assert prerequisites */ + if( !( + (subject instanceof ERDF.Resource) && + (subject.isCurrentDocument()) && + (object instanceof ERDF.Literal) + )) return false; + } + + }; +}; + +var chain = new MetaTagHandler(); +var command = new DMCommand(TRIPLE_ADD, new ERDF.Triple( + new ERDF.Resource(''), + 'rdf:tool', + new ERDF.Literal('') +)); + +/* +if(chain.handle(command)) + alert('Handled!'); +*/ + +ResourceManager = { + + __corrupt: false, + __latelyCreatedResource: undefined, + __listeners: $H(), + __token: 1, + + addListener: function(listener, mask) { + + if(!(listener instanceof Function)) + throw 'Resource event listener is not a function!'; + if(!(mask)) + throw 'Invalid mask for resource event listener registration.'; + + // construct controller and token. + var controller = {listener: listener, mask: mask}; + var token = ResourceManager.__token++; + + // add new listener. + ResourceManager.__listeners[token] = controller; + + // return the token generated. + return token; + }, + + removeListener: function(token) { + + // remove the listener with the token and return it. + return ResourceManager.__listners.remove(token); + }, + + __Event: function(action, resourceId) { + this.action = action; + this.resourceId = resourceId; + }, + + __dispatchEvent: function(event) { + + // get all listeners. for each listener, ... + ResourceManager.__listeners.values().each(function(controller) { + + // .. if listener subscribed to this type of event ... + if(event.action & controller.mask) + return controller.listener(event); + }); + }, + + getResource: function(id) { + + // get all possible resources for this. + id = ERDF.__stripHashes(id); + var resources = DataManager.query( + new ERDF.Resource('#'+id), + {prefix: 'raziel', name: 'entry'}, + undefined + ); + + // check for consistency. + if((resources.length == 1) && (resources[0].object.isResource())) { + var entryUrl = resources[0].object.value; + return new ResourceManager.__Resource(id, entryUrl); + } + + // else throw an error message. + throw ('Resource with id ' +id+ ' not recognized as such. ' + + ((resources.length > 1) ? + ' There is more than one raziel:entry URL.' : + ' There is no raziel:entry URL.')); + + return false; + }, + + __createResource: function(alternativeDiv) { + + var collectionUrls = DataManager.query( + new ERDF.Resource(''), + // TODO This will become raziel:collection in near future. + {prefix: 'raziel', name: 'collection'}, + undefined + ); + + // check for consistency. + + if( (collectionUrls.length == 1) && + (collectionUrls[0].object.isResource())) { + + // get the collection url. + + var collectionUrl = collectionUrls[0].object.value; + var resource = undefined; + + // if there is an old id, serialize the dummy div from there, + // otherwise create a dummy div on the fly. + + var serialization = alternativeDiv? alternativeDiv : + '<div xmlns="http://www.w3.org/1999/xhtml"></div>'; + + ResourceManager.__request( + 'POST', collectionUrl, serialization, + + // on success + function() { + + // get div and id that have been generated by the server. + + var response = (this.responseXML); + var div = response.childNodes[0]; + var id = div.getAttribute('id'); + + // store div in DOM + if(!$$('.' + PROCESSDATA_REF)[0]) + DataManager.graft(XMLNS.XHTML, + document.getElementsByTagNameNS(XMLNS.XHTML, 'body').item(0), ['div', {'class': PROCESSDATA_REF, 'style':'display:none;'}]); + + $$('.' + PROCESSDATA_REF)[0].appendChild(div.cloneNode(true)); + + // parse local erdf data once more. + + DataManager.__synclocal(); + + // get new resource object. + + resource = new ResourceManager.getResource(id); + + // set up an action informing of the creation. + + ResourceManager.__resourceActionSucceeded( + this, RESOURCE_CREATED, undefined); + }, + + function() { ResourceManager.__resourceActionFailed( + this, RESOURCE_CREATED, undefined);}, + false + ); + + return resource; + } + + // else + throw 'Could not create resource! raziel:collection URL is missing!'; + return false; + + }, + + __Resource: function(id, url) { + + this.__id = id; + this.__url = url; + + /* + * Process URL is no longer needed to refer to the shape element on the + * canvas. AReSS uses the id's to gather information on fireing + * behaviour now. + */ + +// // find the process url. +// var processUrl = undefined; +// +// var urls = DataManager.query( +// new ERDF.Resource('#'+this.__id), +// {prefix: 'raziel', name: 'process'}, +// undefined +// ); +// +// if(urls.length == 0) { throw 'The resource with the id ' +id+ ' has no process url.'}; +// +// urls.each( function(triple) { +// +// // if there are more urls, use the last one. +// processUrl = triple.object.value; +// }); +// +// this.__processUrl = processUrl; +// +// // convenience function for getting the process url. +// this.processUrl = function() { +// return this.__processUrl; +// } + + + // convenience finction for getting the id. + this.id = function() { + return this.__id; + } + + // convenience finction for getting the entry url. + this.url = function() { + return this.__url; + } + + this.reload = function() { + var _url = this.__url; + var _id = this.__id; + ResourceManager.__request( + 'GET', _url, null, + function() { ResourceManager.__resourceActionSucceeded( + this, RESOURCE_RELOADED, _id); }, + function() { ResourceManager.__resourceActionFailed( + this, RESURCE_RELOADED, _id); }, + USE_ASYNCHRONOUS_REQUESTS + ); + }; + + this.save = function(synchronize) { + var _url = this.__url; + var _id = this.__id; + data = DataManager.serialize($(_id)); + ResourceManager.__request( + 'PUT', _url, data, + function() { ResourceManager.__resourceActionSucceeded( + this, synchronize ? RESOURCE_SAVED | RESOURCE_SYNCHRONIZED : RESOURCE_SAVED, _id); }, + function() { ResourceManager.__resourceActionFailed( + this, synchronize ? RESOURCE_SAVED | RESOURCE_SYNCHRONIZED : RESOURCE.SAVED, _id); }, + USE_ASYNCHRONOUS_REQUESTS + ); + }; + + this.remove = function() { + var _url = this.__url; + var _id = this.__id; + ResourceManager.__request( + 'DELETE', _url, null, + function() { ResourceManager.__resourceActionSucceeded( + this, RESOURCE_REMOVED, _id); }, + function() { ResourceManager.__resourceActionFailed( + this, RESOURCE_REMOVED, _id);}, + USE_ASYNCHRONOUS_REQUESTS + ); + }; + }, + + request: function(url, requestOptions) { + + var options = { + method: 'get', + asynchronous: true, + parameters: {} + }; + + Object.extend(options, requestOptions || {}); + + var params = Hash.toQueryString(options.parameters); + if (params) + url += (url.include('?') ? '&' : '?') + params; + + return ResourceManager.__request( + options.method, + url, + options.data, + (options.onSuccess instanceof Function ? function() { options.onSuccess(this); } : undefined ), + (options.onFailure instanceof Function ? function() { options.onFailure(this); } : undefined ), + options.asynchronous && USE_ASYNCHRONOUS_REQUESTS, + options.headers); + }, + + __request: function(method, url, data, success, error, async, headers) { + + // get a request object + var httpRequest = Try.these( + + /* do the Mozilla/Safari/Opera stuff */ + function() { return new XMLHttpRequest(); }, + + /* do the IE stuff */ + function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, + function() { return new ActiveXObject("Microsoft.XMLHTTP") } + ); + + // if there is no request object ... + if (!httpRequest) { + if(!this.__corrupt) + throw 'This browser does not provide any AJAX functionality. You will not be able to use the software provided with the page you are viewing. Please consider installing appropriate extensions.'; + this.__corrupt = true; + return false; + } + + if(success instanceof Function) + httpRequest.onload = success; + if(error instanceof Function) { + httpRequest.onerror = error; + } + + var h = $H(headers) + h.keys().each(function(key) { + + httpRequest.setRequestHeader(key, h[key]); + }); + + try { + + if(SHOW_DEBUG_ALERTS_WHEN_SAVING) + + alert(method + ' ' + url + '\n' + + SHOW_EXTENDED_DEBUG_INFORMATION ? data : ''); + + // TODO Remove synchronous calls to the server as soon as xenodot + // handles asynchronous requests without failure. + httpRequest.open(method, url, !async?false:true); + httpRequest.send(data); + + } catch(e) { + return false; + } + return true; + }, + + __resourceActionSucceeded: function(transport, action, id) { + + var status = transport.status; + var response = transport.responseText; + + if(SHOW_DEBUG_ALERTS_WHEN_SAVING) + + alert(status + ' ' + url + '\n' + + SHOW_EXTENDED_DEBUG_INFORMATION ? data : ''); + + // if the status code is not in 2xx, throw an error. + if(status >= 300) + throw 'The server responded with an error: ' + status + '\n' + (SHOW_EXTENDED_DEBUG_INFORMATION ? + data : 'If you need additional information here, including the data sent by the server, consider setting SHOW_EXTENDED_DEBUG_INFORMATION to true.'); + + switch(action) { + + case RESOURCE_REMOVED: + + // get div and id + var response = (transport.responseXML); + var div = response.childNodes[0]; + var id = div.getAttribute('id'); + + // remove the resource from DOM + var localDiv = document.getElementById(id); + localDiv.parentNode.removeChild(localDiv); + break; + + case RESOURCE_CREATED: + + // nothing remains to be done. + break; + + case RESOURCE_SAVED | RESOURCE_SYNCHRONIZED: + + DataManager.__synclocal(); + + case RESOURCE_SAVED: + + // nothing remains to be done. + break; + + case RESOURCE_RELOADED: + + // get div and id + var response = (transport.responseXML); + var div = response.childNodes[0]; + var id = div.getAttribute('id'); + + // remove the local resource representation from DOM + var localDiv = document.getElementById(id) + localDiv.parentNode.removeChild(localDiv); + + // store div in DOM + if(!$$(PROCESSDATA_REF)[0]) + DataManager.graft(XMLNS.XHTML, + document.getElementsByTagNameNS(XMLNS.XHTML, 'body').item(0), ['div', {'class': PROCESSDATA_REF, 'style':'display:none;'}]); + + $$(PROCESSDATA_REF)[0].appendChild(div.cloneNode(true)); + DataManager.__synclocal(); + break; + + default: + DataManager.__synclocal(); + + } + + // dispatch to all listeners ... + ResourceManager.__dispatchEvent( + + // ... an event describing the change that happened here. + new ResourceManager.__Event(action, id) + ); + }, + + __resourceActionFailed: function(transport, action, id) { + throw "Fatal: Resource action failed. There is something horribly " + + "wrong with either the server, the transport protocol or your " + + "online status. Sure you're online?"; + } +}/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * The super class for all classes in ORYX. Adds some OOP feeling to javascript. + * See article "Object Oriented Super Class Method Calling with JavaScript" on + * http://truecode.blogspot.com/2006/08/object-oriented-super-class-method.html + * for a documentation on this. Fairly good article that points out errors in + * Douglas Crockford's inheritance and super method calling approach. + * Worth reading. + * @class Clazz + */ +var Clazz = function() {}; + +/** + * Empty constructor. + * @methodOf Clazz.prototype + */ +Clazz.prototype.construct = function() {}; + +/** + * Can be used to build up inheritances of classes. + * @example + * var MyClass = Clazz.extend({ + * construct: function(myParam){ + * // Do sth. + * } + * }); + * var MySubClass = MyClass.extend({ + * construct: function(myParam){ + * // Use this to call constructor of super class + * arguments.callee.$.construct.apply(this, arguments); + * // Do sth. + * } + * }); + * @param {Object} def The definition of the new class. + */ +Clazz.extend = function(def) { + var classDef = function() { + if (arguments[0] !== Clazz) { this.construct.apply(this, arguments); } + }; + + var proto = new this(Clazz); + var superClass = this.prototype; + + for (var n in def) { + var item = def[n]; + if (item instanceof Function) item.$ = superClass; + proto[n] = item; + } + + classDef.prototype = proto; + + //Give this new class the same static extend method + classDef.extend = this.extend; + return classDef; +};/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX) var ORYX = {}; + +if(!ORYX.CONFIG) ORYX.CONFIG = {}; + +/** + * This file contains URI constants that may be used for XMLHTTPRequests. + */ + +ORYX.CONFIG.ROOT_PATH = "editor/"; //TODO: Remove last slash!! +ORYX.CONFIG.EXPLORER_PATH = "explorer"; +ORYX.CONFIG.LIBS_PATH = "libs"; + +/** + * Regular Config + */ +ORYX.CONFIG.SERVER_HANDLER_ROOT = "service"; +ORYX.CONFIG.SERVER_EDITOR_HANDLER = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor"; +ORYX.CONFIG.SERVER_MODEL_HANDLER = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/model"; +ORYX.CONFIG.STENCILSET_HANDLER = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor_stencilset?embedsvg=true&url=true&namespace="; +ORYX.CONFIG.STENCIL_SETS_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor_stencilset"; + +ORYX.CONFIG.PLUGINS_CONFIG = "editor-app/plugins.xml"; +ORYX.CONFIG.SYNTAXCHECKER_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/syntaxchecker"; +ORYX.CONFIG.DEPLOY_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/model/deploy"; +ORYX.CONFIG.MODEL_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/models"; +ORYX.CONFIG.FORM_FLOW_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/formflows"; +ORYX.CONFIG.FORM_FLOW_IMAGE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/formflow"; +ORYX.CONFIG.FORM_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/forms"; +ORYX.CONFIG.FORM_IMAGE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/form"; +ORYX.CONFIG.SUB_PROCESS_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/subprocesses"; +ORYX.CONFIG.SUB_PROCESS_IMAGE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/subprocess"; +ORYX.CONFIG.TEST_SERVICE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/service/"; + +ORYX.CONFIG.SERVICE_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/services"; +ORYX.CONFIG.CONDITION_ELEMENT_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/conditionelements"; +ORYX.CONFIG.VARIABLEDEF_ELEMENT_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/variabledefinitionelements"; +ORYX.CONFIG.VALIDATOR_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/validators"; + +ORYX.CONFIG.SS_EXTENSIONS_FOLDER = ORYX.CONFIG.ROOT_PATH + "stencilsets/extensions/"; +ORYX.CONFIG.SS_EXTENSIONS_CONFIG = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor_ssextensions"; +ORYX.CONFIG.ORYX_NEW_URL = "/new"; +ORYX.CONFIG.BPMN_LAYOUTER = ORYX.CONFIG.ROOT_PATH + "bpmnlayouter"; + +ORYX.CONFIG.EXPRESSION_METADATA_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/expression-metadata"; +ORYX.CONFIG.DATASOURCE_METADATA_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/datasource-metadata";/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX) var ORYX = {}; + +if(!ORYX.CONFIG) ORYX.CONFIG = {}; + +/** + * Signavio specific variables + */ +ORYX.CONFIG.BACKEND_SWITCH = true; +ORYX.CONFIG.PANEL_LEFT_WIDTH = 250; +ORYX.CONFIG.PANEL_RIGHT_COLLAPSED = true; +ORYX.CONFIG.PANEL_RIGHT_WIDTH = 300; +ORYX.CONFIG.APPNAME = 'KISBPM'; +ORYX.CONFIG.WEB_URL = "."; + +ORYX.CONFIG.BLANK_IMAGE = ORYX.CONFIG.LIBS_PATH + '/ext-2.0.2/resources/images/default/s.gif'; + +/* Specify offset of header */ +ORYX.CONFIG.OFFSET_HEADER = 61; + +/* Show grid line while dragging */ +ORYX.CONFIG.SHOW_GRIDLINE = true; + + /* Editor-Mode */ +ORYX.CONFIG.MODE_READONLY = "readonly"; +ORYX.CONFIG.MODE_FULLSCREEN = "fullscreen"; +ORYX.CONFIG.WINDOW_HEIGHT = 800; +ORYX.CONFIG.PREVENT_LOADINGMASK_AT_READY = false; + + /* Plugins */ +ORYX.CONFIG.PLUGINS_ENABLED = true; +ORYX.CONFIG.PLUGINS_FOLDER = "Plugins/"; + +ORYX.CONFIG.BPMN20_SCHEMA_VALIDATION_ON = true; + + /* Namespaces */ +ORYX.CONFIG.NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +ORYX.CONFIG.NAMESPACE_SVG = "http://www.w3.org/2000/svg"; + + /* UI */ +ORYX.CONFIG.CANVAS_WIDTH = 1200; +ORYX.CONFIG.CANVAS_HEIGHT = 1050; +ORYX.CONFIG.CANVAS_RESIZE_INTERVAL = 100; +ORYX.CONFIG.CANVAS_MIN_WIDTH = 800; +ORYX.CONFIG.CANVAS_MIN_HEIGHT = 300; +ORYX.CONFIG.SELECTED_AREA_PADDING = 4; +ORYX.CONFIG.CANVAS_BACKGROUND_COLOR = "none"; +ORYX.CONFIG.GRID_DISTANCE = 30; +ORYX.CONFIG.GRID_ENABLED = true; +ORYX.CONFIG.ZOOM_OFFSET = 0.1; +ORYX.CONFIG.DEFAULT_SHAPE_MARGIN = 60; +ORYX.CONFIG.SCALERS_SIZE = 7; +ORYX.CONFIG.MINIMUM_SIZE = 20; +ORYX.CONFIG.MAXIMUM_SIZE = 10000; +ORYX.CONFIG.OFFSET_MAGNET = 15; +ORYX.CONFIG.OFFSET_EDGE_LABEL_TOP = 8; +ORYX.CONFIG.OFFSET_EDGE_LABEL_BOTTOM = 8; +ORYX.CONFIG.OFFSET_EDGE_BOUNDS = 5; +ORYX.CONFIG.COPY_MOVE_OFFSET = 30; + +ORYX.CONFIG.BORDER_OFFSET = 14; + +ORYX.CONFIG.MAX_NUM_SHAPES_NO_GROUP = 20; // Updated so the form editor shows all elements at once + +ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER = 30; +ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET = 45; + + /* Shape-Menu Align */ +ORYX.CONFIG.SHAPEMENU_RIGHT = "Oryx_Right"; +ORYX.CONFIG.SHAPEMENU_BOTTOM = "Oryx_Bottom"; +ORYX.CONFIG.SHAPEMENU_LEFT = "Oryx_Left"; +ORYX.CONFIG.SHAPEMENU_TOP = "Oryx_Top"; + + + /* Morph-Menu Item */ +ORYX.CONFIG.MORPHITEM_DISABLED = "Oryx_MorphItem_disabled"; + + /* Property type names */ +ORYX.CONFIG.TYPE_STRING = "string"; +ORYX.CONFIG.TYPE_BOOLEAN = "boolean"; +ORYX.CONFIG.TYPE_INTEGER = "integer"; +ORYX.CONFIG.TYPE_FLOAT = "float"; +ORYX.CONFIG.TYPE_COLOR = "color"; +ORYX.CONFIG.TYPE_DATE = "date"; +ORYX.CONFIG.TYPE_CHOICE = "choice"; +ORYX.CONFIG.TYPE_URL = "url"; +ORYX.CONFIG.TYPE_DIAGRAM_LINK = "diagramlink"; +ORYX.CONFIG.TYPE_COMPLEX = "complex"; +ORYX.CONFIG.TYPE_MULTIPLECOMPLEX = "multiplecomplex"; +ORYX.CONFIG.TYPE_TEXT = "text"; +ORYX.CONFIG.TYPE_KISBPM_MULTIINSTANCE = "kisbpm-multiinstance"; +ORYX.CONFIG.TYPE_MODEL_LINK = "modellink"; +ORYX.CONFIG.TYPE_FORM_FLOW_LINK = "formflowlink"; +ORYX.CONFIG.TYPE_FORM_LINK = "formlink"; +ORYX.CONFIG.TYPE_SUB_PROCESS_LINK = "subprocesslink"; +ORYX.CONFIG.TYPE_SERVICE_LINK = "servicelink"; +ORYX.CONFIG.TYPE_CONDITIONS = "conditions"; +ORYX.CONFIG.TYPE_VARIABLES = "variables"; +ORYX.CONFIG.TYPE_LISTENER = "listener"; +ORYX.CONFIG.TYPE_EPC_FREQ = "epcfrequency"; +ORYX.CONFIG.TYPE_GLOSSARY_LINK = "glossarylink"; +ORYX.CONFIG.TYPE_EXPRESSION = "expression"; +ORYX.CONFIG.TYPE_DATASOURCE = "datasource"; +ORYX.CONFIG.TYPE_DATASOURCE_MINIMAL = "datasource-minimal"; +ORYX.CONFIG.TYPE_VALIDATORS = "validators"; + + + /* Vertical line distance of multiline labels */ +ORYX.CONFIG.LABEL_LINE_DISTANCE = 2; +ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT = 12; + + /* Open Morph Menu with Hover */ +ORYX.CONFIG.ENABLE_MORPHMENU_BY_HOVER = false; + + + /* Editor constants come here */ +ORYX.CONFIG.EDITOR_ALIGN_BOTTOM = 0x01; +ORYX.CONFIG.EDITOR_ALIGN_MIDDLE = 0x02; +ORYX.CONFIG.EDITOR_ALIGN_TOP = 0x04; +ORYX.CONFIG.EDITOR_ALIGN_LEFT = 0x08; +ORYX.CONFIG.EDITOR_ALIGN_CENTER = 0x10; +ORYX.CONFIG.EDITOR_ALIGN_RIGHT = 0x20; +ORYX.CONFIG.EDITOR_ALIGN_SIZE = 0x30; + + /* Event types */ +ORYX.CONFIG.EVENT_MOUSEDOWN = "mousedown"; +ORYX.CONFIG.EVENT_MOUSEUP = "mouseup"; +ORYX.CONFIG.EVENT_MOUSEOVER = "mouseover"; +ORYX.CONFIG.EVENT_MOUSEOUT = "mouseout"; +ORYX.CONFIG.EVENT_MOUSEMOVE = "mousemove"; +ORYX.CONFIG.EVENT_DBLCLICK = "dblclick"; +ORYX.CONFIG.EVENT_KEYDOWN = "keydown"; +ORYX.CONFIG.EVENT_KEYUP = "keyup"; + +ORYX.CONFIG.EVENT_LOADED = "editorloaded"; +ORYX.CONFIG.EVENT_SAVED = "editorSaved"; + +ORYX.CONFIG.EVENT_EXECUTE_COMMANDS = "executeCommands"; +ORYX.CONFIG.EVENT_STENCIL_SET_LOADED = "stencilSetLoaded"; +ORYX.CONFIG.EVENT_SELECTION_CHANGED = "selectionchanged"; +ORYX.CONFIG.EVENT_SHAPEADDED = "shapeadded"; +ORYX.CONFIG.EVENT_SHAPEREMOVED = "shaperemoved"; +ORYX.CONFIG.EVENT_PROPERTY_CHANGED = "propertyChanged"; +ORYX.CONFIG.EVENT_DRAGDROP_START = "dragdrop.start"; +ORYX.CONFIG.EVENT_SHAPE_MENU_CLOSE = "shape.menu.close"; +ORYX.CONFIG.EVENT_DRAGDROP_END = "dragdrop.end"; +ORYX.CONFIG.EVENT_RESIZE_START = "resize.start"; +ORYX.CONFIG.EVENT_RESIZE_END = "resize.end"; +ORYX.CONFIG.EVENT_DRAGDOCKER_DOCKED = "dragDocker.docked"; +ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW = "highlight.showHighlight"; +ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE = "highlight.hideHighlight"; +ORYX.CONFIG.EVENT_LOADING_ENABLE = "loading.enable"; +ORYX.CONFIG.EVENT_LOADING_DISABLE = "loading.disable"; +ORYX.CONFIG.EVENT_LOADING_STATUS = "loading.status"; +ORYX.CONFIG.EVENT_OVERLAY_SHOW = "overlay.show"; +ORYX.CONFIG.EVENT_OVERLAY_HIDE = "overlay.hide"; +ORYX.CONFIG.EVENT_ARRANGEMENT_TOP = "arrangement.setToTop"; +ORYX.CONFIG.EVENT_ARRANGEMENT_BACK = "arrangement.setToBack"; +ORYX.CONFIG.EVENT_ARRANGEMENT_FORWARD = "arrangement.setForward"; +ORYX.CONFIG.EVENT_ARRANGEMENT_BACKWARD = "arrangement.setBackward"; +ORYX.CONFIG.EVENT_PROPWINDOW_PROP_CHANGED = "propertyWindow.propertyChanged"; +ORYX.CONFIG.EVENT_LAYOUT_ROWS = "layout.rows"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL = "layout.BPEL"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_VERTICAL = "layout.BPEL.vertical"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_HORIZONTAL = "layout.BPEL.horizontal"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_SINGLECHILD = "layout.BPEL.singlechild"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_AUTORESIZE = "layout.BPEL.autoresize"; +ORYX.CONFIG.EVENT_AUTOLAYOUT_LAYOUT = "autolayout.layout"; +ORYX.CONFIG.EVENT_UNDO_EXECUTE = "undo.execute"; +ORYX.CONFIG.EVENT_UNDO_ROLLBACK = "undo.rollback"; +ORYX.CONFIG.EVENT_BUTTON_UPDATE = "toolbar.button.update"; +ORYX.CONFIG.EVENT_LAYOUT = "layout.dolayout"; +ORYX.CONFIG.EVENT_GLOSSARY_LINK_EDIT = "glossary.link.edit"; +ORYX.CONFIG.EVENT_GLOSSARY_SHOW = "glossary.show.info"; +ORYX.CONFIG.EVENT_GLOSSARY_NEW = "glossary.show.new"; +ORYX.CONFIG.EVENT_DOCKERDRAG = "dragTheDocker"; +ORYX.CONFIG.EVENT_CANVAS_SCROLL = "canvas.scroll"; + +ORYX.CONFIG.EVENT_SHOW_PROPERTYWINDOW = "propertywindow.show"; +ORYX.CONFIG.EVENT_ABOUT_TO_SAVE = "file.aboutToSave"; + + /* Selection Shapes Highlights */ +ORYX.CONFIG.SELECTION_HIGHLIGHT_SIZE = 5; +ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR = "#4444FF"; +ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR2 = "#9999FF"; + +ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_CORNER = "corner"; +ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE = "rectangle"; + +ORYX.CONFIG.SELECTION_VALID_COLOR = "#00FF00"; +ORYX.CONFIG.SELECTION_INVALID_COLOR = "#FF0000"; + + +ORYX.CONFIG.DOCKER_DOCKED_COLOR = "#00FF00"; +ORYX.CONFIG.DOCKER_UNDOCKED_COLOR = "#FF0000"; +ORYX.CONFIG.DOCKER_SNAP_OFFSET = 10; + + /* Copy & Paste */ +ORYX.CONFIG.EDIT_OFFSET_PASTE = 10; + + /* Key-Codes */ +ORYX.CONFIG.KEY_CODE_X = 88; +ORYX.CONFIG.KEY_CODE_C = 67; +ORYX.CONFIG.KEY_CODE_V = 86; +ORYX.CONFIG.KEY_CODE_DELETE = 46; +ORYX.CONFIG.KEY_CODE_META = 224; +ORYX.CONFIG.KEY_CODE_BACKSPACE = 8; +ORYX.CONFIG.KEY_CODE_LEFT = 37; +ORYX.CONFIG.KEY_CODE_RIGHT = 39; +ORYX.CONFIG.KEY_CODE_UP = 38; +ORYX.CONFIG.KEY_CODE_DOWN = 40; + + // TODO Determine where the lowercase constants are still used and remove them from here. +ORYX.CONFIG.KEY_Code_enter = 12; +ORYX.CONFIG.KEY_Code_left = 37; +ORYX.CONFIG.KEY_Code_right = 39; +ORYX.CONFIG.KEY_Code_top = 38; +ORYX.CONFIG.KEY_Code_bottom = 40; + +/* Supported Meta Keys */ + +ORYX.CONFIG.META_KEY_META_CTRL = "metactrl"; +ORYX.CONFIG.META_KEY_ALT = "alt"; +ORYX.CONFIG.META_KEY_SHIFT = "shift"; + +/* Key Actions */ + +ORYX.CONFIG.KEY_ACTION_DOWN = "down"; +ORYX.CONFIG.KEY_ACTION_UP = "up"; + + +/* Form Rowlayouting */ +ORYX.CONFIG.FORM_ROW_WIDTH = 350; +ORYX.CONFIG.FORM_GROUP_MARGIN = 5; +ORYX.CONFIG.FORM_GROUP_EMPTY_HEIGHT = 100; + +/* Form element types */ +ORYX.CONFIG.FORM_ELEMENT_ID_PREFIX = 'http://b3mn.org/stencilset/xforms'; +ORYX.CONFIG.FORM_ELEMENT_TYPE_ROOT = 'http://b3mn.org/stencilset/xforms#XForm'; +ORYX.CONFIG.FORM_ELEMENT_TYPE_GROUP = 'http://b3mn.org/stencilset/xforms#Group'; +ORYX.CONFIG.FORM_ELEMENT_TYPE_REPEATING_GROUP = 'http://b3mn.org/stencilset/xforms#RepeatingGroup'; +ORYX.CONFIG.FORM_ELEMENT_TYPE_LABEL_FIELD = 'http://b3mn.org/stencilset/xforms#LabelField'; + + /* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +function printf() { + + var result = arguments[0]; + for (var i=1; i<arguments.length; i++) + result = result.replace('%' + (i-1), arguments[i]); + return result; +} + +// oryx constants. +var ORYX_LOGLEVEL_TRACE = 5; +var ORYX_LOGLEVEL_DEBUG = 4; +var ORYX_LOGLEVEL_INFO = 3; +var ORYX_LOGLEVEL_WARN = 2; +var ORYX_LOGLEVEL_ERROR = 1; +var ORYX_LOGLEVEL_FATAL = 0; +var ORYX_LOGLEVEL = 3; +var ORYX_CONFIGURATION_DELAY = 100; +var ORYX_CONFIGURATION_WAIT_ATTEMPTS = 10; + +if(!ORYX) var ORYX = {}; + +ORYX = Object.extend(ORYX, { + + //set the path in the config.js file!!!! + PATH: ORYX.CONFIG.ROOT_PATH, + //CONFIGURATION: "config.js", + + URLS: [], + + alreadyLoaded: [], + + configrationRetries: 0, + + Version: '0.1.1', + + availablePlugins: [], + + /** + * The ORYX.Log logger. + */ + Log: { + + __appenders: [ + { + append: function(message) { + if(typeof(console) !== "undefined" && console.log !== undefined) { + console.log(message); + } + } + } + ], + + trace: function() { if(ORYX_LOGLEVEL >= ORYX_LOGLEVEL_TRACE) + ORYX.Log.__log('TRACE', arguments); }, + debug: function() { if(ORYX_LOGLEVEL >= ORYX_LOGLEVEL_DEBUG) + ORYX.Log.__log('DEBUG', arguments); }, + info: function() { if(ORYX_LOGLEVEL >= ORYX_LOGLEVEL_INFO) + ORYX.Log.__log('INFO', arguments); }, + warn: function() { if(ORYX_LOGLEVEL >= ORYX_LOGLEVEL_WARN) + ORYX.Log.__log('WARN', arguments); }, + error: function() { if(ORYX_LOGLEVEL >= ORYX_LOGLEVEL_ERROR) + ORYX.Log.__log('ERROR', arguments); }, + fatal: function() { if(ORYX_LOGLEVEL >= ORYX_LOGLEVEL_FATAL) + ORYX.Log.__log('FATAL', arguments); }, + + __log: function(prefix, messageParts) { + + messageParts[0] = (new Date()).getTime() + " " + + prefix + " " + messageParts[0]; + var message = printf.apply(null, messageParts); + + ORYX.Log.__appenders.each(function(appender) { + appender.append(message); + }); + }, + + addAppender: function(appender) { + ORYX.Log.__appenders.push(appender); + } + }, + + /** + * First bootstrapping layer. The Oryx loading procedure begins. In this + * step, all preliminaries that are not in the responsibility of Oryx to be + * met have to be checked here, such as the existance of the prototpe + * library in the current execution environment. After that, the second + * bootstrapping layer is being invoked. Failing to ensure that any + * preliminary condition is not met has to fail with an error. + */ + load: function() { + + ORYX.Log.debug("Oryx begins loading procedure."); + + // check for prototype + if( (typeof Prototype=='undefined') || + (typeof Element == 'undefined') || + (typeof Element.Methods=='undefined') || + parseFloat(Prototype.Version.split(".")[0] + "." + + Prototype.Version.split(".")[1]) < 1.5) + + throw("Application requires the Prototype JavaScript framework >= 1.5.3"); + + ORYX.Log.debug("Prototype > 1.5 found."); + + // continue loading. + ORYX._load(); + }, + + /** + * Second bootstrapping layer. The oryx configuration is checked. When not + * yet loaded, config.js is being requested from the server. A repeated + * error in retrieving the configuration will result in an error to be + * thrown after a certain time of retries. Once the configuration is there, + * all urls that are registered with oryx loading are being requested from + * the server. Once everything is loaded, the third layer is being invoked. + */ + _load: function() { + /* + // if configuration not there already, + if(!(ORYX.CONFIG)) { + + // if this is the first attempt... + if(ORYX.configrationRetries == 0) { + + // get the path and filename. + var configuration = ORYX.PATH + ORYX.CONFIGURATION; + + ORYX.Log.debug("Configuration not found, loading from '%0'.", + configuration); + + // require configuration file. + Kickstart.require(configuration); + + // else if attempts exceeded ... + } else if(ORYX.configrationRetries >= ORYX_CONFIGURATION_WAIT_ATTEMPTS) { + + throw "Tried to get configuration" + + ORYX_CONFIGURATION_WAIT_ATTEMPTS + + " times from '" + configuration + "'. Giving up." + + } else if(ORYX.configrationRetries > 0){ + + // point out how many attempts are left... + ORYX.Log.debug("Waiting once more (%0 attempts left)", + (ORYX_CONFIGURATION_WAIT_ATTEMPTS - + ORYX.configrationRetries)); + + } + + // any case: continue in a moment with increased retry count. + ORYX.configrationRetries++; + window.setTimeout(ORYX._load, ORYX_CONFIGURATION_DELAY); + return; + } + + ORYX.Log.info("Configuration loaded."); + + // load necessary scripts. + ORYX.URLS.each(function(url) { + ORYX.Log.debug("Requireing '%0'", url); + Kickstart.require(ORYX.PATH + url) }); + */ + // configurate logging and load plugins. + ORYX.loadPlugins(); + }, + + /** + * Third bootstrapping layer. This is where first the plugin coniguration + * file is loaded into oryx, analyzed, and where all plugins are being + * requested by the server. Afterwards, all editor instances will be + * initialized. + */ + loadPlugins: function() { + + // load plugins if enabled. + if(ORYX.CONFIG.PLUGINS_ENABLED) + ORYX._loadPlugins() + else + ORYX.Log.warn("Ignoring plugins, loading Core only."); + + // init the editor instances. + init(); + }, + + _loadPlugins: function() { + + // load plugin configuration file. + var source = ORYX.CONFIG.PLUGINS_CONFIG; + + ORYX.Log.debug("Loading plugin configuration from '%0'.", source); + + new Ajax.Request(source, { + asynchronous: false, + method: 'get', + onSuccess: function(result) { + + /* + * This is the method that is being called when the plugin + * configuration was successfully loaded from the server. The + * file has to be processed and the contents need to be + * considered for further plugin requireation. + */ + + ORYX.Log.info("Plugin configuration file loaded."); + + // get plugins.xml content + var resultXml = result.responseXML; + + // TODO: Describe how properties are handled. + // Get the globale Properties + var globalProperties = []; + var preferences = $A(resultXml.getElementsByTagName("properties")); + preferences.each( function(p) { + + var props = $A(p.childNodes); + props.each( function(prop) { + var property = new Hash(); + + // get all attributes from the node and set to global properties + var attributes = $A(prop.attributes) + attributes.each(function(attr){property[attr.nodeName] = attr.nodeValue}); + if(attributes.length > 0) { globalProperties.push(property) }; + }); + }); + + + // TODO Why are we using XML if we don't respect structure anyway? + // for each plugin element in the configuration.. + var plugin = resultXml.getElementsByTagName("plugin"); + $A(plugin).each( function(node) { + + // get all element's attributes. + // TODO: What about: var pluginData = $H(node.attributes) !? + var pluginData = new Hash(); + $A(node.attributes).each( function(attr){ + pluginData[attr.nodeName] = attr.nodeValue}); + + // ensure there's a name attribute. + if(!pluginData['name']) { + ORYX.Log.error("A plugin is not providing a name. Ingnoring this plugin."); + return; + } + + // ensure there's a source attribute. + if(!pluginData['source']) { + ORYX.Log.error("Plugin with name '%0' doesn't provide a source attribute.", pluginData['name']); + return; + } + + // Get all private Properties + var propertyNodes = node.getElementsByTagName("property"); + var properties = []; + $A(propertyNodes).each(function(prop) { + var property = new Hash(); + + // Get all Attributes from the Node + var attributes = $A(prop.attributes) + attributes.each(function(attr){property[attr.nodeName] = attr.nodeValue}); + if(attributes.length > 0) { properties.push(property) }; + + }); + + // Set all Global-Properties to the Properties + properties = properties.concat(globalProperties); + + // Set Properties to Plugin-Data + pluginData['properties'] = properties; + + // Get the RequieredNodes + var requireNodes = node.getElementsByTagName("requires"); + var requires; + $A(requireNodes).each(function(req) { + var namespace = $A(req.attributes).find(function(attr){ return attr.name == "namespace"}) + if( namespace && namespace.nodeValue ){ + if( !requires ){ + requires = {namespaces:[]} + } + + requires.namespaces.push(namespace.nodeValue) + } + }); + + // Set Requires to the Plugin-Data, if there is one + if( requires ){ + pluginData['requires'] = requires; + } + + + // Get the RequieredNodes + var notUsesInNodes = node.getElementsByTagName("notUsesIn"); + var notUsesIn; + $A(notUsesInNodes).each(function(not) { + var namespace = $A(not.attributes).find(function(attr){ return attr.name == "namespace"}) + if( namespace && namespace.nodeValue ){ + if( !notUsesIn ){ + notUsesIn = {namespaces:[]} + } + + notUsesIn.namespaces.push(namespace.nodeValue) + } + }); + + // Set Requires to the Plugin-Data, if there is one + if( notUsesIn ){ + pluginData['notUsesIn'] = notUsesIn; + } + + + var url = ORYX.PATH + ORYX.CONFIG.PLUGINS_FOLDER + pluginData['source']; + + ORYX.Log.debug("Requireing '%0'", url); + + // Add the Script-Tag to the Site + //Kickstart.require(url); + + ORYX.Log.info("Plugin '%0' successfully loaded.", pluginData['name']); + + // Add the Plugin-Data to all available Plugins + ORYX.availablePlugins.push(pluginData); + + }); + + }, + onFailure:this._loadPluginsOnFails + }); + + }, + + _loadPluginsOnFails: function(result) { + + ORYX.Log.error("Plugin configuration file not available."); + } +}); + + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.SVG) {ORYX.Core.SVG = {};} + + +/** + * EditPathHandler + * + * Edit SVG paths' coordinates according to specified from-to movement and + * horizontal and vertical scaling factors. + * The resulting path's d attribute is stored in instance variable d. + * + * @constructor + */ +ORYX.Core.SVG.EditPathHandler = Clazz.extend({ + + construct: function() { + arguments.callee.$.construct.apply(this, arguments); + + this.x = 0; + this.y = 0; + this.oldX = 0; + this.oldY = 0; + this.deltaWidth = 1; + this.deltaHeight = 1; + + this.d = ""; + }, + + /** + * init + * + * @param {float} x Target point's x-coordinate + * @param {float} y Target point's y-coordinate + * @param {float} oldX Reference point's x-coordinate + * @param {float} oldY Reference point's y-coordinate + * @param {float} deltaWidth Horizontal scaling factor + * @param {float} deltaHeight Vertical scaling factor + */ + init: function(x, y, oldX, oldY, deltaWidth, deltaHeight) { + this.x = x; + this.y = y; + this.oldX = oldX; + this.oldY = oldY; + this.deltaWidth = deltaWidth; + this.deltaHeight = deltaHeight; + + this.d = ""; + }, + + /** + * editPointsAbs + * + * @param {Array} points Array of absolutePoints + */ + editPointsAbs: function(points) { + if(points instanceof Array) { + var newPoints = []; + var x, y; + for(var i = 0; i < points.length; i++) { + x = (parseFloat(points[i]) - this.oldX)*this.deltaWidth + this.x; + i++; + y = (parseFloat(points[i]) - this.oldY)*this.deltaHeight + this.y; + newPoints.push(x); + newPoints.push(y); + } + + return newPoints; + } else { + //TODO error + } + }, + + /** + * editPointsRel + * + * @param {Array} points Array of absolutePoints + */ + editPointsRel: function(points) { + if(points instanceof Array) { + var newPoints = []; + var x, y; + for(var i = 0; i < points.length; i++) { + x = parseFloat(points[i])*this.deltaWidth; + i++; + y = parseFloat(points[i])*this.deltaHeight; + newPoints.push(x); + newPoints.push(y); + } + + return newPoints; + } else { + //TODO error + } + }, + + /** + * arcAbs - A + * + * @param {Number} rx + * @param {Number} ry + * @param {Number} xAxisRotation + * @param {Boolean} largeArcFlag + * @param {Boolean} sweepFlag + * @param {Number} x + * @param {Number} y + */ + arcAbs: function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) { + var pointsAbs = this.editPointsAbs([x, y]); + var pointsRel = this.editPointsRel([rx, ry]); + + this.d = this.d.concat(" A" + pointsRel[0] + " " + pointsRel[1] + + " " + xAxisRotation + " " + largeArcFlag + + " " + sweepFlag + " " + pointsAbs[0] + " " + + pointsAbs[1] + " "); + }, + + /** + * arcRel - a + * + * @param {Number} rx + * @param {Number} ry + * @param {Number} xAxisRotation + * @param {Boolean} largeArcFlag + * @param {Boolean} sweepFlag + * @param {Number} x + * @param {Number} y + */ + arcRel: function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) { + var pointsRel = this.editPointsRel([rx, ry, x, y]); + + this.d = this.d.concat(" a" + pointsRel[0] + " " + pointsRel[1] + + " " + xAxisRotation + " " + largeArcFlag + + " " + sweepFlag + " " + pointsRel[2] + " " + + pointsRel[3] + " "); + }, + + /** + * curvetoCubicAbs - C + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicAbs: function(x1, y1, x2, y2, x, y) { + var pointsAbs = this.editPointsAbs([x1, y1, x2, y2, x, y]); + + this.d = this.d.concat(" C" + pointsAbs[0] + " " + pointsAbs[1] + + " " + pointsAbs[2] + " " + pointsAbs[3] + + " " + pointsAbs[4] + " " + pointsAbs[5] + " "); + }, + + /** + * curvetoCubicRel - c + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicRel: function(x1, y1, x2, y2, x, y) { + var pointsRel = this.editPointsRel([x1, y1, x2, y2, x, y]); + + this.d = this.d.concat(" c" + pointsRel[0] + " " + pointsRel[1] + + " " + pointsRel[2] + " " + pointsRel[3] + + " " + pointsRel[4] + " " + pointsRel[5] + " "); + }, + + /** + * linetoHorizontalAbs - H + * + * @param {Number} x + */ + linetoHorizontalAbs: function(x) { + var pointsAbs = this.editPointsAbs([x, 0]); + + this.d = this.d.concat(" H" + pointsAbs[0] + " "); + }, + + /** + * linetoHorizontalRel - h + * + * @param {Number} x + */ + linetoHorizontalRel: function(x) { + var pointsRel = this.editPointsRel([x, 0]); + + this.d = this.d.concat(" h" + pointsRel[0] + " "); + }, + + /** + * linetoAbs - L + * + * @param {Number} x + * @param {Number} y + */ + linetoAbs: function(x, y) { + var pointsAbs = this.editPointsAbs([x, y]); + + this.d = this.d.concat(" L" + pointsAbs[0] + " " + pointsAbs[1] + " "); + }, + + /** + * linetoRel - l + * + * @param {Number} x + * @param {Number} y + */ + linetoRel: function(x, y) { + var pointsRel = this.editPointsRel([x, y]); + + this.d = this.d.concat(" l" + pointsRel[0] + " " + pointsRel[1] + " "); + }, + + /** + * movetoAbs - M + * + * @param {Number} x + * @param {Number} y + */ + movetoAbs: function(x, y) { + var pointsAbs = this.editPointsAbs([x, y]); + + this.d = this.d.concat(" M" + pointsAbs[0] + " " + pointsAbs[1] + " "); + }, + + /** + * movetoRel - m + * + * @param {Number} x + * @param {Number} y + */ + movetoRel: function(x, y) { + var pointsRel; + if(this.d === "") { + pointsRel = this.editPointsAbs([x, y]); + } else { + pointsRel = this.editPointsRel([x, y]); + } + + this.d = this.d.concat(" m" + pointsRel[0] + " " + pointsRel[1] + " "); + }, + + /** + * curvetoQuadraticAbs - Q + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticAbs: function(x1, y1, x, y) { + var pointsAbs = this.editPointsAbs([x1, y1, x, y]); + + this.d = this.d.concat(" Q" + pointsAbs[0] + " " + pointsAbs[1] + " " + + pointsAbs[2] + " " + pointsAbs[3] + " "); + }, + + /** + * curvetoQuadraticRel - q + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticRel: function(x1, y1, x, y) { + var pointsRel = this.editPointsRel([x1, y1, x, y]); + + this.d = this.d.concat(" q" + pointsRel[0] + " " + pointsRel[1] + " " + + pointsRel[2] + " " + pointsRel[3] + " "); + }, + + /** + * curvetoCubicSmoothAbs - S + * + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicSmoothAbs: function(x2, y2, x, y) { + var pointsAbs = this.editPointsAbs([x2, y2, x, y]); + + this.d = this.d.concat(" S" + pointsAbs[0] + " " + pointsAbs[1] + " " + + pointsAbs[2] + " " + pointsAbs[3] + " "); + }, + + /** + * curvetoCubicSmoothRel - s + * + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicSmoothRel: function(x2, y2, x, y) { + var pointsRel = this.editPointsRel([x2, y2, x, y]); + + this.d = this.d.concat(" s" + pointsRel[0] + " " + pointsRel[1] + " " + + pointsRel[2] + " " + pointsRel[3] + " "); + }, + + /** + * curvetoQuadraticSmoothAbs - T + * + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticSmoothAbs: function(x, y) { + var pointsAbs = this.editPointsAbs([x, y]); + + this.d = this.d.concat(" T" + pointsAbs[0] + " " + pointsAbs[1] + " "); + }, + + /** + * curvetoQuadraticSmoothRel - t + * + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticSmoothRel: function(x, y) { + var pointsRel = this.editPointsRel([x, y]); + + this.d = this.d.concat(" t" + pointsRel[0] + " " + pointsRel[1] + " "); + }, + + /** + * linetoVerticalAbs - V + * + * @param {Number} y + */ + linetoVerticalAbs: function(y) { + var pointsAbs = this.editPointsAbs([0, y]); + + this.d = this.d.concat(" V" + pointsAbs[1] + " "); + }, + + /** + * linetoVerticalRel - v + * + * @param {Number} y + */ + linetoVerticalRel: function(y) { + var pointsRel = this.editPointsRel([0, y]); + + this.d = this.d.concat(" v" + pointsRel[1] + " "); + }, + + /** + * closePath - z or Z + */ + closePath: function() { + this.d = this.d.concat(" z"); + } + +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.SVG) {ORYX.Core.SVG = {};} + + +/** + * MinMaxPathHandler + * + * Determine the minimum and maximum of a SVG path's absolute coordinates. + * For relative coordinates the absolute value is computed for consideration. + * The values are stored in attributes minX, minY, maxX, and maxY. + * + * @constructor + */ +ORYX.Core.SVG.MinMaxPathHandler = Clazz.extend({ + + construct: function() { + arguments.callee.$.construct.apply(this, arguments); + + this.minX = undefined; + this.minY = undefined; + this.maxX = undefined; + this.maxY = undefined; + + this._lastAbsX = undefined; + this._lastAbsY = undefined; + }, + + /** + * Store minimal and maximal coordinates of passed points to attributes minX, maxX, minY, maxY + * + * @param {Array} points Array of absolutePoints + */ + calculateMinMax: function(points) { + if(points instanceof Array) { + var x, y; + for(var i = 0; i < points.length; i++) { + x = parseFloat(points[i]); + i++; + y = parseFloat(points[i]); + + this.minX = (this.minX !== undefined) ? Math.min(this.minX, x) : x; + this.maxX = (this.maxX !== undefined) ? Math.max(this.maxX, x) : x; + this.minY = (this.minY !== undefined) ? Math.min(this.minY, y) : y; + this.maxY = (this.maxY !== undefined) ? Math.max(this.maxY, y) : y; + + this._lastAbsX = x; + this._lastAbsY = y; + } + } else { + //TODO error + } + }, + + /** + * arcAbs - A + * + * @param {Number} rx + * @param {Number} ry + * @param {Number} xAxisRotation + * @param {Boolean} largeArcFlag + * @param {Boolean} sweepFlag + * @param {Number} x + * @param {Number} y + */ + arcAbs: function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) { + this.calculateMinMax([x, y]); + }, + + /** + * arcRel - a + * + * @param {Number} rx + * @param {Number} ry + * @param {Number} xAxisRotation + * @param {Boolean} largeArcFlag + * @param {Boolean} sweepFlag + * @param {Number} x + * @param {Number} y + */ + arcRel: function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) { + this.calculateMinMax([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * curvetoCubicAbs - C + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicAbs: function(x1, y1, x2, y2, x, y) { + this.calculateMinMax([x1, y1, x2, y2, x, y]); + }, + + /** + * curvetoCubicRel - c + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicRel: function(x1, y1, x2, y2, x, y) { + this.calculateMinMax([this._lastAbsX + x1, this._lastAbsY + y1, + this._lastAbsX + x2, this._lastAbsY + y2, + this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * linetoHorizontalAbs - H + * + * @param {Number} x + */ + linetoHorizontalAbs: function(x) { + this.calculateMinMax([x, this._lastAbsY]); + }, + + /** + * linetoHorizontalRel - h + * + * @param {Number} x + */ + linetoHorizontalRel: function(x) { + this.calculateMinMax([this._lastAbsX + x, this._lastAbsY]); + }, + + /** + * linetoAbs - L + * + * @param {Number} x + * @param {Number} y + */ + linetoAbs: function(x, y) { + this.calculateMinMax([x, y]); + }, + + /** + * linetoRel - l + * + * @param {Number} x + * @param {Number} y + */ + linetoRel: function(x, y) { + this.calculateMinMax([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * movetoAbs - M + * + * @param {Number} x + * @param {Number} y + */ + movetoAbs: function(x, y) { + this.calculateMinMax([x, y]); + }, + + /** + * movetoRel - m + * + * @param {Number} x + * @param {Number} y + */ + movetoRel: function(x, y) { + if(this._lastAbsX && this._lastAbsY) { + this.calculateMinMax([this._lastAbsX + x, this._lastAbsY + y]); + } else { + this.calculateMinMax([x, y]); + } + }, + + /** + * curvetoQuadraticAbs - Q + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticAbs: function(x1, y1, x, y) { + this.calculateMinMax([x1, y1, x, y]); + }, + + /** + * curvetoQuadraticRel - q + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticRel: function(x1, y1, x, y) { + this.calculateMinMax([this._lastAbsX + x1, this._lastAbsY + y1, this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * curvetoCubicSmoothAbs - S + * + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicSmoothAbs: function(x2, y2, x, y) { + this.calculateMinMax([x2, y2, x, y]); + }, + + /** + * curvetoCubicSmoothRel - s + * + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicSmoothRel: function(x2, y2, x, y) { + this.calculateMinMax([this._lastAbsX + x2, this._lastAbsY + y2, this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * curvetoQuadraticSmoothAbs - T + * + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticSmoothAbs: function(x, y) { + this.calculateMinMax([x, y]); + }, + + /** + * curvetoQuadraticSmoothRel - t + * + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticSmoothRel: function(x, y) { + this.calculateMinMax([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * linetoVerticalAbs - V + * + * @param {Number} y + */ + linetoVerticalAbs: function(y) { + this.calculateMinMax([this._lastAbsX, y]); + }, + + /** + * linetoVerticalRel - v + * + * @param {Number} y + */ + linetoVerticalRel: function(y) { + this.calculateMinMax([this._lastAbsX, this._lastAbsY + y]); + }, + + /** + * closePath - z or Z + */ + closePath: function() { + return;// do nothing + } + +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.SVG) {ORYX.Core.SVG = {};} + + +/** + * PathHandler + * + * Determine absolute points of a SVG path. The coordinates are stored + * sequentially in the attribute points (x-coordinates at even indices, + * y-coordinates at odd indices). + * + * @constructor + */ +ORYX.Core.SVG.PointsPathHandler = Clazz.extend({ + + construct: function() { + arguments.callee.$.construct.apply(this, arguments); + + this.points = []; + + this._lastAbsX = undefined; + this._lastAbsY = undefined; + }, + + /** + * addPoints + * + * @param {Array} points Array of absolutePoints + */ + addPoints: function(points) { + if(points instanceof Array) { + var x, y; + for(var i = 0; i < points.length; i++) { + x = parseFloat(points[i]); + i++; + y = parseFloat(points[i]); + + this.points.push(x); + this.points.push(y); + //this.points.push({x:x, y:y}); + + this._lastAbsX = x; + this._lastAbsY = y; + } + } else { + //TODO error + } + }, + + /** + * arcAbs - A + * + * @param {Number} rx + * @param {Number} ry + * @param {Number} xAxisRotation + * @param {Boolean} largeArcFlag + * @param {Boolean} sweepFlag + * @param {Number} x + * @param {Number} y + */ + arcAbs: function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) { + this.addPoints([x, y]); + }, + + /** + * arcRel - a + * + * @param {Number} rx + * @param {Number} ry + * @param {Number} xAxisRotation + * @param {Boolean} largeArcFlag + * @param {Boolean} sweepFlag + * @param {Number} x + * @param {Number} y + */ + arcRel: function(rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * curvetoCubicAbs - C + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicAbs: function(x1, y1, x2, y2, x, y) { + this.addPoints([x, y]); + }, + + /** + * curvetoCubicRel - c + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicRel: function(x1, y1, x2, y2, x, y) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * linetoHorizontalAbs - H + * + * @param {Number} x + */ + linetoHorizontalAbs: function(x) { + this.addPoints([x, this._lastAbsY]); + }, + + /** + * linetoHorizontalRel - h + * + * @param {Number} x + */ + linetoHorizontalRel: function(x) { + this.addPoints([this._lastAbsX + x, this._lastAbsY]); + }, + + /** + * linetoAbs - L + * + * @param {Number} x + * @param {Number} y + */ + linetoAbs: function(x, y) { + this.addPoints([x, y]); + }, + + /** + * linetoRel - l + * + * @param {Number} x + * @param {Number} y + */ + linetoRel: function(x, y) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * movetoAbs - M + * + * @param {Number} x + * @param {Number} y + */ + movetoAbs: function(x, y) { + this.addPoints([x, y]); + }, + + /** + * movetoRel - m + * + * @param {Number} x + * @param {Number} y + */ + movetoRel: function(x, y) { + if(this._lastAbsX && this._lastAbsY) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + } else { + this.addPoints([x, y]); + } + }, + + /** + * curvetoQuadraticAbs - Q + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticAbs: function(x1, y1, x, y) { + this.addPoints([x, y]); + }, + + /** + * curvetoQuadraticRel - q + * + * @param {Number} x1 + * @param {Number} y1 + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticRel: function(x1, y1, x, y) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * curvetoCubicSmoothAbs - S + * + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicSmoothAbs: function(x2, y2, x, y) { + this.addPoints([x, y]); + }, + + /** + * curvetoCubicSmoothRel - s + * + * @param {Number} x2 + * @param {Number} y2 + * @param {Number} x + * @param {Number} y + */ + curvetoCubicSmoothRel: function(x2, y2, x, y) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * curvetoQuadraticSmoothAbs - T + * + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticSmoothAbs: function(x, y) { + this.addPoints([x, y]); + }, + + /** + * curvetoQuadraticSmoothRel - t + * + * @param {Number} x + * @param {Number} y + */ + curvetoQuadraticSmoothRel: function(x, y) { + this.addPoints([this._lastAbsX + x, this._lastAbsY + y]); + }, + + /** + * linetoVerticalAbs - V + * + * @param {Number} y + */ + linetoVerticalAbs: function(y) { + this.addPoints([this._lastAbsX, y]); + }, + + /** + * linetoVerticalRel - v + * + * @param {Number} y + */ + linetoVerticalRel: function(y) { + this.addPoints([this._lastAbsX, this._lastAbsY + y]); + }, + + /** + * closePath - z or Z + */ + closePath: function() { + return;// do nothing + } + +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * + * Config variables + */ +NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +NAMESPACE_SVG = "http://www.w3.org/2000/svg/"; + +/** + * @classDescription This class wraps the manipulation of a SVG marker. + * @namespace ORYX.Core.SVG + * uses Inheritance (Clazz) + * uses Prototype 1.5.0 + * + */ + +/** + * Init package + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.SVG) {ORYX.Core.SVG = {};} + +ORYX.Core.SVG.SVGMarker = Clazz.extend({ + + /** + * Constructor + * @param markerElement {SVGMarkerElement} + */ + construct: function(markerElement) { + arguments.callee.$.construct.apply(this, arguments); + + this.id = undefined; + this.element = markerElement; + this.refX = undefined; + this.refY = undefined; + this.markerWidth = undefined; + this.markerHeight = undefined; + this.oldRefX = undefined; + this.oldRefY = undefined; + this.oldMarkerWidth = undefined; + this.oldMarkerHeight = undefined; + this.optional = false; + this.enabled = true; + this.minimumLength = undefined; + this.resize = false; + + this.svgShapes = []; + + this._init(); //initialisation of all the properties declared above. + }, + + /** + * Initializes the values that are defined in the constructor. + */ + _init: function() { + //check if this.element is a SVGMarkerElement + if(!( this.element == "[object SVGMarkerElement]")) { + throw "SVGMarker: Argument is not an instance of SVGMarkerElement."; + } + + this.id = this.element.getAttributeNS(null, "id"); + + //init svg marker attributes + var refXValue = this.element.getAttributeNS(null, "refX"); + if(refXValue) { + this.refX = parseFloat(refXValue); + } else { + this.refX = 0; + } + var refYValue = this.element.getAttributeNS(null, "refY"); + if(refYValue) { + this.refY = parseFloat(refYValue); + } else { + this.refY = 0; + } + var markerWidthValue = this.element.getAttributeNS(null, "markerWidth"); + if(markerWidthValue) { + this.markerWidth = parseFloat(markerWidthValue); + } else { + this.markerWidth = 3; + } + var markerHeightValue = this.element.getAttributeNS(null, "markerHeight"); + if(markerHeightValue) { + this.markerHeight = parseFloat(markerHeightValue); + } else { + this.markerHeight = 3; + } + + this.oldRefX = this.refX; + this.oldRefY = this.refY; + this.oldMarkerWidth = this.markerWidth; + this.oldMarkerHeight = this.markerHeight; + + //init oryx attributes + var optionalAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "optional"); + if(optionalAttr) { + optionalAttr = optionalAttr.strip(); + this.optional = (optionalAttr.toLowerCase() === "yes"); + } else { + this.optional = false; + } + + var enabledAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "enabled"); + if(enabledAttr) { + enabledAttr = enabledAttr.strip(); + this.enabled = !(enabledAttr.toLowerCase() === "no"); + } else { + this.enabled = true; + } + + var minLengthAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "minimumLength"); + if(minLengthAttr) { + this.minimumLength = parseFloat(minLengthAttr); + } + + var resizeAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "resize"); + if(resizeAttr) { + resizeAttr = resizeAttr.strip(); + this.resize = (resizeAttr.toLowerCase() === "yes"); + } else { + this.resize = false; + } + + //init SVGShape objects + //this.svgShapes = this._getSVGShapes(this.element); + }, + + /** + * + */ + _getSVGShapes: function(svgElement) { + if(svgElement.hasChildNodes) { + var svgShapes = []; + var me = this; + $A(svgElement.childNodes).each(function(svgChild) { + try { + var svgShape = new ORYX.Core.SVG.SVGShape(svgChild); + svgShapes.push(svgShape); + } catch (e) { + svgShapes = svgShapes.concat(me._getSVGShapes(svgChild)); + } + }); + return svgShapes; + } + }, + + /** + * Writes the changed values into the SVG marker. + */ + update: function() { + //TODO mache marker resizebar!!! aber erst wenn der rest der connectingshape funzt! + +// //update marker attributes +// if(this.refX != this.oldRefX) { +// this.element.setAttributeNS(null, "refX", this.refX); +// } +// if(this.refY != this.oldRefY) { +// this.element.setAttributeNS(null, "refY", this.refY); +// } +// if(this.markerWidth != this.oldMarkerWidth) { +// this.element.setAttributeNS(null, "markerWidth", this.markerWidth); +// } +// if(this.markerHeight != this.oldMarkerHeight) { +// this.element.setAttributeNS(null, "markerHeight", this.markerHeight); +// } +// +// //update SVGShape objects +// var widthDelta = this.markerWidth / this.oldMarkerWidth; +// var heightDelta = this.markerHeight / this.oldMarkerHeight; +// if(widthDelta != 1 && heightDelta != 1) { +// this.svgShapes.each(function(svgShape) { +// +// }); +// } + + //update old values to prepare the next update + this.oldRefX = this.refX; + this.oldRefY = this.refY; + this.oldMarkerWidth = this.markerWidth; + this.oldMarkerHeight = this.markerHeight; + }, + + toString: function() { return (this.element) ? "SVGMarker " + this.element.id : "SVGMarker " + this.element;} + });/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * + * Config variables + */ +NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +NAMESPACE_SVG = "http://www.w3.org/2000/svg/"; + +/** + * @classDescription This class wraps the manipulation of a SVG basic shape or a path. + * @namespace ORYX.Core.SVG + * uses Inheritance (Clazz) + * uses Prototype 1.5.0 + * uses PathParser by Kevin Lindsey (http://kevlindev.com/) + * uses MinMaxPathHandler + * uses EditPathHandler + * + */ + +//init package +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.SVG) {ORYX.Core.SVG = {};} + +ORYX.Core.SVG.SVGShape = Clazz.extend({ + + /** + * Constructor + * @param svgElem {SVGElement} An SVGElement that is a basic shape or a path. + */ + construct: function(svgElem) { + arguments.callee.$.construct.apply(this, arguments); + + this.type; + this.element = svgElem; + this.x = undefined; + this.y = undefined; + this.width = undefined; + this.height = undefined; + this.oldX = undefined; + this.oldY = undefined; + this.oldWidth = undefined; + this.oldHeight = undefined; + this.radiusX = undefined; + this.radiusY = undefined; + this.isHorizontallyResizable = false; + this.isVerticallyResizable = false; + //this.anchors = []; + this.anchorLeft = false; + this.anchorRight = false; + this.anchorTop = false; + this.anchorBottom = false; + + //attributes of path elements of edge objects + this.allowDockers = true; + this.resizeMarkerMid = false; + + this.editPathParser; + this.editPathHandler; + + this.init(); //initialisation of all the properties declared above. + }, + + /** + * Initializes the values that are defined in the constructor. + */ + init: function() { + + /**initialize position and size*/ + if(ORYX.Editor.checkClassType(this.element, SVGRectElement) || ORYX.Editor.checkClassType(this.element, SVGImageElement)) { + this.type = "Rect"; + + var xAttr = this.element.getAttributeNS(null, "x"); + if(xAttr) { + this.oldX = parseFloat(xAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var yAttr = this.element.getAttributeNS(null, "y"); + if(yAttr) { + this.oldY = parseFloat(yAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var widthAttr = this.element.getAttributeNS(null, "width"); + if(widthAttr) { + this.oldWidth = parseFloat(widthAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var heightAttr = this.element.getAttributeNS(null, "height"); + if(heightAttr) { + this.oldHeight = parseFloat(heightAttr); + } else { + throw "Missing attribute in element " + this.element; + } + + } else if(ORYX.Editor.checkClassType(this.element, SVGCircleElement)) { + this.type = "Circle"; + + var cx = undefined; + var cy = undefined; + //var r = undefined; + + var cxAttr = this.element.getAttributeNS(null, "cx"); + if(cxAttr) { + cx = parseFloat(cxAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var cyAttr = this.element.getAttributeNS(null, "cy"); + if(cyAttr) { + cy = parseFloat(cyAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var rAttr = this.element.getAttributeNS(null, "r"); + if(rAttr) { + //r = parseFloat(rAttr); + this.radiusX = parseFloat(rAttr); + } else { + throw "Missing attribute in element " + this.element; + } + this.oldX = cx - this.radiusX; + this.oldY = cy - this.radiusX; + this.oldWidth = 2*this.radiusX; + this.oldHeight = 2*this.radiusX; + + } else if(ORYX.Editor.checkClassType(this.element, SVGEllipseElement)) { + this.type = "Ellipse"; + + var cx = undefined; + var cy = undefined; + //var rx = undefined; + //var ry = undefined; + var cxAttr = this.element.getAttributeNS(null, "cx"); + if(cxAttr) { + cx = parseFloat(cxAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var cyAttr = this.element.getAttributeNS(null, "cy"); + if(cyAttr) { + cy = parseFloat(cyAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var rxAttr = this.element.getAttributeNS(null, "rx"); + if(rxAttr) { + this.radiusX = parseFloat(rxAttr); + } else { + throw "Missing attribute in element " + this.element; + } + var ryAttr = this.element.getAttributeNS(null, "ry"); + if(ryAttr) { + this.radiusY = parseFloat(ryAttr); + } else { + throw "Missing attribute in element " + this.element; + } + this.oldX = cx - this.radiusX; + this.oldY = cy - this.radiusY; + this.oldWidth = 2*this.radiusX; + this.oldHeight = 2*this.radiusY; + + } else if(ORYX.Editor.checkClassType(this.element, SVGLineElement)) { + this.type = "Line"; + + var x1 = undefined; + var y1 = undefined; + var x2 = undefined; + var y2 = undefined; + var x1Attr = this.element.getAttributeNS(null, "x1"); + if(x1Attr) { + x1 = parseFloat(x1Attr); + } else { + throw "Missing attribute in element " + this.element; + } + var y1Attr = this.element.getAttributeNS(null, "y1"); + if(y1Attr) { + y1 = parseFloat(y1Attr); + } else { + throw "Missing attribute in element " + this.element; + } + var x2Attr = this.element.getAttributeNS(null, "x2"); + if(x2Attr) { + x2 = parseFloat(x2Attr); + } else { + throw "Missing attribute in element " + this.element; + } + var y2Attr = this.element.getAttributeNS(null, "y2"); + if(y2Attr) { + y2 = parseFloat(y2Attr); + } else { + throw "Missing attribute in element " + this.element; + } + this.oldX = Math.min(x1,x2); + this.oldY = Math.min(y1,y2); + this.oldWidth = Math.abs(x1-x2); + this.oldHeight = Math.abs(y1-y2); + + } else if(ORYX.Editor.checkClassType(this.element, SVGPolylineElement) || ORYX.Editor.checkClassType(this.element, SVGPolygonElement)) { + this.type = "Polyline"; + + var pointsArray = []; + if (this.element.points&&this.element.points.numberOfItems){ + for(var i=0, size=this.element.points.numberOfItems; i<size; i++){ + pointsArray.push(this.element.points.getItem(i).x) + pointsArray.push(this.element.points.getItem(i).y) + } + } else { + var points = this.element.getAttributeNS(null, "points"); + if(points) { + points = points.replace(/,/g , " "); + pointsArray = points.split(" "); + pointsArray = pointsArray.without(""); + } else { + throw "Missing attribute in element " + this.element; + } + } + + + if(pointsArray && pointsArray.length && pointsArray.length > 1) { + var minX = parseFloat(pointsArray[0]); + var minY = parseFloat(pointsArray[1]); + var maxX = parseFloat(pointsArray[0]); + var maxY = parseFloat(pointsArray[1]); + + for(var i = 0; i < pointsArray.length; i++) { + minX = Math.min(minX, parseFloat(pointsArray[i])); + maxX = Math.max(maxX, parseFloat(pointsArray[i])); + i++; + minY = Math.min(minY, parseFloat(pointsArray[i])); + maxY = Math.max(maxY, parseFloat(pointsArray[i])); + } + + this.oldX = minX; + this.oldY = minY; + this.oldWidth = maxX-minX; + this.oldHeight = maxY-minY; + } else { + throw "Missing attribute in element " + this.element; + } + + } else if(ORYX.Editor.checkClassType(this.element, SVGPathElement)) { + this.type = "Path"; + + this.editPathParser = new PathParser(); + this.editPathHandler = new ORYX.Core.SVG.EditPathHandler(); + this.editPathParser.setHandler(this.editPathHandler); + + var parser = new PathParser(); + var handler = new ORYX.Core.SVG.MinMaxPathHandler(); + parser.setHandler(handler); + parser.parsePath(this.element); + + this.oldX = handler.minX; + this.oldY = handler.minY; + this.oldWidth = handler.maxX - handler.minX; + this.oldHeight = handler.maxY - handler.minY; + + delete parser; + delete handler; + } else { + throw "Element is not a shape."; + } + + /** initialize attributes of oryx namespace */ + //resize + var resizeAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "resize"); + if(resizeAttr) { + resizeAttr = resizeAttr.toLowerCase(); + if(resizeAttr.match(/horizontal/)) { + this.isHorizontallyResizable = true; + } else { + this.isHorizontallyResizable = false; + } + if(resizeAttr.match(/vertical/)) { + this.isVerticallyResizable = true; + } else { + this.isVerticallyResizable = false; + } + } else { + this.isHorizontallyResizable = false; + this.isVerticallyResizable = false; + } + + //anchors + var anchorAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "anchors"); + if(anchorAttr) { + anchorAttr = anchorAttr.replace("/,/g", " "); + var anchors = anchorAttr.split(" ").without(""); + + for(var i = 0; i < anchors.length; i++) { + switch(anchors[i].toLowerCase()) { + case "left": + this.anchorLeft = true; + break; + case "right": + this.anchorRight = true; + break; + case "top": + this.anchorTop = true; + break; + case "bottom": + this.anchorBottom = true; + break; + } + } + } + + //allowDockers and resizeMarkerMid + if(ORYX.Editor.checkClassType(this.element, SVGPathElement)) { + var allowDockersAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "allowDockers"); + if(allowDockersAttr) { + if(allowDockersAttr.toLowerCase() === "no") { + this.allowDockers = false; + } else { + this.allowDockers = true; + } + } + + var resizeMarkerMidAttr = this.element.getAttributeNS(NAMESPACE_ORYX, "resizeMarker-mid"); + if(resizeMarkerMidAttr) { + if(resizeMarkerMidAttr.toLowerCase() === "yes") { + this.resizeMarkerMid = true; + } else { + this.resizeMarkerMid = false; + } + } + } + + this.x = this.oldX; + this.y = this.oldY; + this.width = this.oldWidth; + this.height = this.oldHeight; + }, + + /** + * Writes the changed values into the SVG element. + */ + update: function() { + + if(this.x !== this.oldX || this.y !== this.oldY || this.width !== this.oldWidth || this.height !== this.oldHeight) { + switch(this.type) { + case "Rect": + if(this.x !== this.oldX) this.element.setAttributeNS(null, "x", this.x); + if(this.y !== this.oldY) this.element.setAttributeNS(null, "y", this.y); + if(this.width !== this.oldWidth) this.element.setAttributeNS(null, "width", this.width); + if(this.height !== this.oldHeight) this.element.setAttributeNS(null, "height", this.height); + break; + case "Circle": + //calculate the radius + //var r; +// if(this.width/this.oldWidth <= this.height/this.oldHeight) { +// this.radiusX = ((this.width > this.height) ? this.width : this.height)/2.0; +// } else { + this.radiusX = ((this.width < this.height) ? this.width : this.height)/2.0; + //} + + this.element.setAttributeNS(null, "cx", this.x + this.width/2.0); + this.element.setAttributeNS(null, "cy", this.y + this.height/2.0); + this.element.setAttributeNS(null, "r", this.radiusX); + break; + case "Ellipse": + this.radiusX = this.width/2; + this.radiusY = this.height/2; + + this.element.setAttributeNS(null, "cx", this.x + this.radiusX); + this.element.setAttributeNS(null, "cy", this.y + this.radiusY); + this.element.setAttributeNS(null, "rx", this.radiusX); + this.element.setAttributeNS(null, "ry", this.radiusY); + break; + case "Line": + if(this.x !== this.oldX) + this.element.setAttributeNS(null, "x1", this.x); + + if(this.y !== this.oldY) + this.element.setAttributeNS(null, "y1", this.y); + + if(this.x !== this.oldX || this.width !== this.oldWidth) + this.element.setAttributeNS(null, "x2", this.x + this.width); + + if(this.y !== this.oldY || this.height !== this.oldHeight) + this.element.setAttributeNS(null, "y2", this.y + this.height); + break; + case "Polyline": + var points = this.element.getAttributeNS(null, "points"); + if(points) { + points = points.replace(/,/g, " ").split(" ").without(""); + + if(points && points.length && points.length > 1) { + + //TODO what if oldWidth == 0? + var widthDelta = (this.oldWidth === 0) ? 0 : this.width / this.oldWidth; + var heightDelta = (this.oldHeight === 0) ? 0 : this.height / this.oldHeight; + + var updatedPoints = ""; + for(var i = 0; i < points.length; i++) { + var x = (parseFloat(points[i])-this.oldX)*widthDelta + this.x; + i++; + var y = (parseFloat(points[i])-this.oldY)*heightDelta + this.y; + updatedPoints += x + " " + y + " "; + } + this.element.setAttributeNS(null, "points", updatedPoints); + } else { + //TODO error + } + } else { + //TODO error + } + break; + case "Path": + //calculate scaling delta + //TODO what if oldWidth == 0? + var widthDelta = (this.oldWidth === 0) ? 0 : this.width / this.oldWidth; + var heightDelta = (this.oldHeight === 0) ? 0 : this.height / this.oldHeight; + + //use path parser to edit each point of the path + this.editPathHandler.init(this.x, this.y, this.oldX, this.oldY, widthDelta, heightDelta); + this.editPathParser.parsePath(this.element); + + //change d attribute of path + this.element.setAttributeNS(null, "d", this.editPathHandler.d); + break; + } + + this.oldX = this.x; + this.oldY = this.y; + this.oldWidth = this.width; + this.oldHeight = this.height; + } + + // Remove cached variables + delete this.visible; + delete this.handler; + }, + + isPointIncluded: function(pointX, pointY) { + + // Check if there are the right arguments and if the node is visible + if(!pointX || !pointY || !this.isVisible()) { + return false; + } + + switch(this.type) { + case "Rect": + return (pointX >= this.x && pointX <= this.x + this.width && + pointY >= this.y && pointY <= this.y+this.height); + break; + case "Circle": + //calculate the radius +// var r; +// if(this.width/this.oldWidth <= this.height/this.oldHeight) { +// r = ((this.width > this.height) ? this.width : this.height)/2.0; +// } else { +// r = ((this.width < this.height) ? this.width : this.height)/2.0; +// } + return ORYX.Core.Math.isPointInEllipse(pointX, pointY, this.x + this.width/2.0, this.y + this.height/2.0, this.radiusX, this.radiusX); + break; + case "Ellipse": + return ORYX.Core.Math.isPointInEllipse(pointX, pointY, this.x + this.radiusX, this.y + this.radiusY, this.radiusX, this.radiusY); + break; + case "Line": + return ORYX.Core.Math.isPointInLine(pointX, pointY, this.x, this.y, this.x + this.width, this.y + this.height); + break; + case "Polyline": + var points = this.element.getAttributeNS(null, "points"); + + if(points) { + points = points.replace(/,/g , " ").split(" ").without(""); + + points = points.collect(function(n) { + return parseFloat(n); + }); + + return ORYX.Core.Math.isPointInPolygone(pointX, pointY, points); + } else { + return false; + } + break; + case "Path": + + // Cache Path handler + if (!this.handler) { + var parser = new PathParser(); + this.handler = new ORYX.Core.SVG.PointsPathHandler(); + parser.setHandler(this.handler); + parser.parsePath(this.element); + } + + return ORYX.Core.Math.isPointInPolygone(pointX, pointY, this.handler.points); + + break; + default: + return false; + } + }, + + /** + * Returns true if the element is visible + * @param {SVGElement} elem + * @return boolean + */ + isVisible: function(elem) { + + if (this.visible !== undefined){ + return this.visible; + } + + if (!elem) { + elem = this.element; + } + + var hasOwnerSVG = false; + try { + hasOwnerSVG = !!elem.ownerSVGElement; + } catch(e){ + var abcdef=1 + } + + // Is SVG context + if ( hasOwnerSVG ) { + // IF G-Element + if (ORYX.Editor.checkClassType(elem, SVGGElement)) { + if (elem.className && elem.className.baseVal == "me") { + this.visible = true; + return this.visible; + } + } + + // Check if fill or stroke is set + var fill = elem.getAttributeNS(null, "fill"); + var stroke = elem.getAttributeNS(null, "stroke"); + if (fill && fill == "none" && stroke && stroke == "none") { + this.visible = false; + } else { + // Check if displayed + var attr = elem.getAttributeNS(null, "display"); + if(!attr) + this.visible = this.isVisible(elem.parentNode); + else if (attr == "none") + this.visible = false; + else + this.visible = true; + } + } else { + this.visible = true; + } + + return this.visible; + }, + + toString: function() { return (this.element) ? "SVGShape " + this.element.id : "SVGShape " + this.element;} + });/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.SVG) {ORYX.Core.SVG = {};} + +/** + * @classDescription Class for adding text to a shape. + * + */ +ORYX.Core.SVG.Label = Clazz.extend({ + + _characterSets:[ + "%W", + "@", + "m", + "wDGMOQ?????#+=<>~^", + "ABCHKNRSUVXZ??????????&", + "bdghnopqux???????????ETY1234567890?????_????${}*????`???????????", + "aeksvyz?????FLP????????????????", + "c-", + "rtJ\"/()[]:;!|\\", + "fjI., ", + "'", + "il" + ], + _characterSetValues:[15,14,13,11,10,9,8,7,6,5,4,3], + + /** + * Constructor + * @param options {Object} : + * textElement + * + */ + construct: function(options) { + arguments.callee.$.construct.apply(this, arguments); + + if(!options.textElement) { + throw "Label: No parameter textElement." + } else if (!ORYX.Editor.checkClassType( options.textElement, SVGTextElement ) ) { + throw "Label: Parameter textElement is not an SVGTextElement." + } + + this.invisibleRenderPoint = -5000; + + this.node = options.textElement; + + + this.node.setAttributeNS(null, 'stroke-width', '0pt'); + this.node.setAttributeNS(null, 'letter-spacing', '-0.01px'); + + this.shapeId = options.shapeId; + + this.id; + + this.fitToElemId; + + this.edgePosition; + + this.x; + this.y; + this.oldX; + this.oldY; + + this.isVisible = true; + + this._text; + this._verticalAlign; + this._horizontalAlign; + this._rotate; + this._rotationPoint; + + //this.anchors = []; + this.anchorLeft; + this.anchorRight; + this.anchorTop; + this.anchorBottom; + + this._isChanged = true; + + //if the text element already has an id, don't change it. + var _id = this.node.getAttributeNS(null, 'id'); + if(_id) { + this.id = _id; + } + + //initialization + + //set referenced element the text is fit to + this.fitToElemId = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'fittoelem'); + if(this.fitToElemId) + this.fitToElemId = this.shapeId + this.fitToElemId; + + //set alignment + var alignValues = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'align'); + if(alignValues) { + alignValues = alignValues.replace(/,/g, " "); + alignValues = alignValues.split(" "); + alignValues = alignValues.without(""); + + alignValues.each((function(alignValue) { + switch (alignValue) { + case 'top': + case 'middle': + case 'bottom': + if(!this._verticalAlign){this._originVerticalAlign = this._verticalAlign = alignValue;} + break; + case 'left': + case 'center': + case 'right': + if(!this._horizontalAlign){this._originHorizontalAlign = this._horizontalAlign = alignValue;} + break; + } + }).bind(this)); + } + + //set edge position (only in case the label belongs to an edge) + this.edgePosition = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'edgePosition'); + if(this.edgePosition) { + this.originEdgePosition = this.edgePosition = this.edgePosition.toLowerCase(); + } + + + //get offset top + this.offsetTop = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'offsetTop') || ORYX.CONFIG.OFFSET_EDGE_LABEL_TOP; + if(this.offsetTop) { + this.offsetTop = parseInt(this.offsetTop); + } + + //get offset top + this.offsetBottom = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'offsetBottom') || ORYX.CONFIG.OFFSET_EDGE_LABEL_BOTTOM; + if(this.offsetBottom) { + this.offsetBottom = parseInt(this.offsetBottom); + } + + + //set rotation + var rotateValue = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'rotate'); + if(rotateValue) { + try { + this._rotate = parseFloat(rotateValue); + } catch (e) { + this._rotate = 0; + } + } else { + this._rotate = 0; + } + + //anchors + var anchorAttr = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "anchors"); + if(anchorAttr) { + anchorAttr = anchorAttr.replace("/,/g", " "); + var anchors = anchorAttr.split(" ").without(""); + + for(var i = 0; i < anchors.length; i++) { + switch(anchors[i].toLowerCase()) { + case "left": + this.originAnchorLeft = this.anchorLeft = true; + break; + case "right": + this.originAnchorRight = this.anchorRight = true; + break; + case "top": + this.originAnchorTop = this.anchorTop = true; + break; + case "bottom": + this.originAnchorBottom = this.anchorBottom = true; + break; + } + } + } + + //if no alignment defined, set default alignment + if(!this._verticalAlign) { this._verticalAlign = 'bottom'; } + if(!this._horizontalAlign) { this._horizontalAlign = 'left'; } + + var xValue = this.node.getAttributeNS(null, 'x'); + if(xValue) { + this.oldX = this.x = parseFloat(xValue); + } else { + //TODO error + } + + var yValue = this.node.getAttributeNS(null, 'y'); + if(yValue) { + this.oldY = this.y = parseFloat(yValue); + } else { + //TODO error + } + + //set initial text + this.text(this.node.textContent); + }, + + /** + * Reset the anchor position to the original value + * which was specified in the stencil set + * + */ + resetAnchorPosition: function(){ + this.anchorLeft = this.originAnchorLeft || false; + this.anchorRight = this.originAnchorRight || false; + this.anchorTop = this.originAnchorTop || false; + this.anchorBottom = this.originAnchorBottom || false; + }, + + isOriginAnchorLeft: function(){ return this.originAnchorLeft || false; }, + isOriginAnchorRight: function(){ return this.originAnchorRight || false; }, + isOriginAnchorTop: function(){ return this.originAnchorTop || false; }, + isOriginAnchorBottom: function(){ return this.originAnchorBottom || false; }, + + + isAnchorLeft: function(){ return this.anchorLeft || false; }, + isAnchorRight: function(){ return this.anchorRight || false; }, + isAnchorTop: function(){ return this.anchorTop || false; }, + isAnchorBottom: function(){ return this.anchorBottom || false; }, + + /** + * Returns the x coordinate + * @return {number} + */ + getX: function(){ + try { + var x = this.node.x.baseVal.getItem(0).value; + switch(this.horizontalAlign()){ + case "left": return x; + case "center": return x - (this.getWidth()/2); + case "right": return x - this.getWidth(); + } + return this.node.getBBox().x; + } catch(e){ + return this.x; + } + }, + + setX: function(x){ + if (this.position) + this.position.x = x; + else + this.setOriginX(x); + }, + + + /** + * Returns the y coordinate + * @return {number} + */ + getY: function(){ + try { + return this.node.getBBox().y; + } catch(e){ + return this.y; + } + }, + + setY: function(y){ + if (this.position) + this.position.y = y; + else + this.setOriginY(y); + }, + + setOriginX: function(x){ + this.x = x; + }, + + setOriginY: function(y){ + this.y = y; + }, + + + /** + * Returns the width of the label + * @return {number} + */ + getWidth: function(){ + try { + try { + var width, cn = this.node.childNodes; + if (cn.length == 0) { + width = this.node.getBBox().width; + } else { + for (var i = 0, size = cn.length; i < size; ++i) { + var w = cn[i].getComputedTextLength(); + if ("undefined" == typeof width || width < w) { + width = w; + } + } + } + return width+(width%2==0?0:1); + } catch (ee) { + return this.node.getBBox().width; + } + } catch(e){ + return 0; + } + }, + + getOriginUpperLeft: function(){ + var x = this.x, y = this.y; + switch (this._horizontalAlign){ + case 'center' : + x -= this.getWidth()/2; + break; + case 'right' : + x -= this.getWidth(); + break; + } + switch (this._verticalAlign){ + case 'middle' : + y -= this.getHeight()/2; + break; + case 'bottom' : + y -= this.getHeight(); + break; + } + return {x:x, y:y}; + }, + + /** + * Returns the height of the label + * @return {number} + */ + getHeight: function(){ + try { + return this.node.getBBox().height; + } catch(e){ + return 0; + } + }, + + /** + * Returns the relative center position of the label + * to its parent shape. + * @return {Object} + */ + getCenter: function(){ + var up = {x: this.getX(), y: this.getY()}; + up.x += this.getWidth()/2; + up.y += this.getHeight()/2; + return up; + }, + + /** + * Sets the position of a label relative to the parent. + * @param {Object} position + */ + setPosition: function(position){ + if (!position || position.x === undefined || position.y === undefined) { + delete this.position; + } else { + this.position = position; + } + + if (this.position){ + delete this._referencePoint; + delete this.edgePosition; + } + + this._isChanged = true; + this.update(); + }, + + /** + * Return the position + */ + getPosition: function(){ + return this.position; + }, + + setReferencePoint: function(ref){ + if (ref) { + this._referencePoint = ref; + } else { + delete this._referencePoint; + } + if (this._referencePoint){ + delete this.position; + } + }, + + getReferencePoint: function(){ + return this._referencePoint || undefined; + }, + + changed: function() { + this._isChanged = true; + }, + + /** + * Register a callback which will be called if the label + * was rendered. + * @param {Object} fn + */ + registerOnChange: function(fn){ + if (!this.changeCallbacks){ + this.changeCallbacks = []; + } + if (fn instanceof Function && !this.changeCallbacks.include(fn)){ + this.changeCallbacks.push(fn); + } + }, + + /** + * Unregister the callback for changes. + * @param {Object} fn + */ + unregisterOnChange: function(fn){ + if (this.changeCallbacks && fn instanceof Function && this.changeCallbacks.include(fn)){ + this.changeCallbacks = this.changeCallbacks.without(fn); + } + }, + + /** + * Returns TRUE if the labe is currently in + * the update mechanism. + * @return {Boolean} + */ + isUpdating: function(){ + return !!this._isUpdating; + }, + + + getOriginEdgePosition: function(){ + return this.originEdgePosition; + }, + + /** + * Returns the edgeposition. + * + * @return {String} "starttop", "startmiddle", "startbottom", + * "midtop", "midbottom", "endtop", "endbottom" or null + */ + getEdgePosition: function(){ + return this.edgePosition || null; + }, + + /** + * Set the edge position, must be one of the valid + * edge positions (see getEdgePosition). + * Removes the reference point and the absolute position as well. + * + * @param {Object} position + */ + setEdgePosition: function(position){ + if (["starttop", "startmiddle", "startbottom", + "midtop", "midbottom", "endtop", "endbottom"].include(position)){ + this.edgePosition = position; + delete this.position; + delete this._referencePoint; + } else { + delete this.edgePosition; + } + }, + + /** + * Update the SVG text element. + */ + update: function(force) { + + var x = this.x, y = this.y; + if (this.position){ + x = this.position.x; + y = this.position.y; + } + x = Math.floor(x); y = Math.floor(y); + + if(this._isChanged || x !== this.oldX || y !== this.oldY || force === true) { + if (this.isVisible) { + this._isChanged = false; + this._isUpdating = true; + + this.node.setAttributeNS(null, 'x', x); + this.node.setAttributeNS(null, 'y', y); + this.node.removeAttributeNS(null, "fill-opacity"); + + //this.node.setAttributeNS(null, 'font-size', this._fontSize); + //this.node.setAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'align', this._horizontalAlign + " " + this._verticalAlign); + + this.oldX = x; + this.oldY = y; + + //set rotation + if (!this.position && !this.getReferencePoint()) { + if (this._rotate !== undefined) { + if (this._rotationPoint) + this.node.setAttributeNS(null, 'transform', 'rotate(' + this._rotate + ' ' + Math.floor(this._rotationPoint.x) + ' ' + Math.floor(this._rotationPoint.y) + ')'); + else + this.node.setAttributeNS(null, 'transform', 'rotate(' + this._rotate + ' ' + Math.floor(x) + ' ' + Math.floor(y) + ')'); + } + } else { + this.node.removeAttributeNS(null, 'transform'); + } + + var textLines = this._text.split("\n"); + while (textLines.last() == "") + textLines.pop(); + + + if (this.node.ownerDocument) { + // Only reset the tspans if the text + // has changed or has to be wrapped + if (this.fitToElemId || this._textHasChanged){ + this.node.textContent = ""; // Remove content + textLines.each((function(textLine, index){ + var tspan = this.node.ownerDocument.createElementNS(ORYX.CONFIG.NAMESPACE_SVG, 'tspan'); + tspan.textContent = textLine.trim(); + if (this.fitToElemId) { + tspan.setAttributeNS(null, 'x', this.invisibleRenderPoint); + tspan.setAttributeNS(null, 'y', this.invisibleRenderPoint); + } + + /* + * Chrome's getBBox() method fails, if a text node contains an empty tspan element. + * So, we add a whitespace to such a tspan element. + */ + if(tspan.textContent === "") { + tspan.textContent = " "; + } + + //append tspan to text node + this.node.appendChild(tspan); + }).bind(this)); + delete this._textHasChanged; + delete this.indices; + } + + //Work around for Mozilla bug 293581 + if (this.isVisible && this.fitToElemId) { + this.node.setAttributeNS(null, 'visibility', 'hidden'); + } + + if (this.fitToElemId) { + window.setTimeout(this._checkFittingToReferencedElem.bind(this), 0); + //this._checkFittingToReferencedElem(); + } else { + window.setTimeout(this._positionText.bind(this), 0); + //this._positionText(); + } + } + } else { + this.node.textContent = ""; + //this.node.setAttributeNS(null, "fill-opacity", "0.2"); + } + } + }, + + _checkFittingToReferencedElem: function() { + try { + var tspans = $A(this.node.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'tspan')); + + //only do this in firefox 3. all other browsers do not support word wrapping!!!!! + //if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent) && new Number(RegExp.$1)>=3) { + var newtspans = []; + + var refNode = this.node.ownerDocument.getElementById(this.fitToElemId); + + if (refNode) { + var refbb = refNode.getBBox(); + + var fontSize = this.getFontSize(); + + for (var j = 0; j < tspans.length; j++) { + var tspan = tspans[j]; + + var textLength = this._getRenderedTextLength(tspan, undefined, undefined, fontSize); + + var refBoxLength = (this._rotate != 0 + && this._rotate % 180 != 0 + && this._rotate % 90 == 0 ? + refbb.height : refbb.width); + + if (textLength > refBoxLength) { + + var startIndex = 0; + var lastSeperatorIndex = 0; + + var numOfChars = this.getTrimmedTextLength(tspan.textContent); + for (var i = 0; i < numOfChars; i++) { + var sslength = this._getRenderedTextLength(tspan, startIndex, i-startIndex, fontSize); + + if (sslength > refBoxLength - 2) { + var newtspan = this.node.ownerDocument.createElementNS(ORYX.CONFIG.NAMESPACE_SVG, 'tspan'); + if (lastSeperatorIndex <= startIndex) { + lastSeperatorIndex = (i == 0) ? i : i-1; + newtspan.textContent = tspan.textContent.slice(startIndex, lastSeperatorIndex).trim(); + //lastSeperatorIndex = i; + } + else { + newtspan.textContent = tspan.textContent.slice(startIndex, ++lastSeperatorIndex).trim(); + } + + newtspan.setAttributeNS(null, 'x', this.invisibleRenderPoint); + newtspan.setAttributeNS(null, 'y', this.invisibleRenderPoint); + + //insert tspan to text node + //this.node.insertBefore(newtspan, tspan); + newtspans.push(newtspan); + + startIndex = lastSeperatorIndex; + } + else { + var curChar = tspan.textContent.charAt(i); + if (curChar == ' ' || + curChar == '-' || + curChar == "." || + curChar == "," || + curChar == ";" || + curChar == ":") { + lastSeperatorIndex = i; + } + } + } + + tspan.textContent = tspan.textContent.slice(startIndex).trim(); + } + + newtspans.push(tspan); + } + + while (this.node.hasChildNodes()) + this.node.removeChild(this.node.childNodes[0]); + + while (newtspans.length > 0) { + this.node.appendChild(newtspans.shift()); + } + } + //} + } catch (e) { + ORYX.Log.fatal("Error " + e); + } + window.setTimeout(this._positionText.bind(this), 0); + //this._positionText(); + }, + + /** + * This is a work around method for Mozilla bug 293581. + * Before the method getComputedTextLength works, the text has to be rendered. + */ + _positionText: function() { + try { + + var tspans = this.node.childNodes; + + var fontSize = this.getFontSize(this.node); + + var invalidTSpans = []; + + var x = this.x, y = this.y; + if (this.position){ + x = this.position.x; + y = this.position.y; + } + x = Math.floor(x); y = Math.floor(y); + + var i = 0, indic = []; // Cache indices if the _positionText is called again, before update is called + var is =(this.indices || $R(0,tspans.length-1).toArray()); + var length = is.length; + is.each((function(index){ + if ("undefined" == typeof index){ + return; + } + + var tspan = tspans[i++]; + + if(tspan.textContent.trim() === "") { + invalidTSpans.push(tspan); + } else { + //set vertical position + var dy = 0; + switch (this._verticalAlign) { + case 'bottom': + dy = -(length - index - 1) * (fontSize); + break; + case 'middle': + dy = -(length / 2.0 - index - 1) * (fontSize); + dy -= ORYX.CONFIG.LABEL_LINE_DISTANCE / 2; + break; + case 'top': + dy = index * (fontSize); + dy += fontSize; + break; + } + tspan.setAttributeNS(null, 'dy', Math.floor(dy)); + + tspan.setAttributeNS(null, 'x', x); + tspan.setAttributeNS(null, 'y', y); + indic.push(index); + } + + }).bind(this)); + + indic.length = tspans.length; + this.indices = this.indices || indic; + + invalidTSpans.each(function(tspan) { + this.node.removeChild(tspan) + }.bind(this)); + + //set horizontal alignment + switch (this._horizontalAlign) { + case 'left': + this.node.setAttributeNS(null, 'text-anchor', 'start'); + break; + case 'center': + this.node.setAttributeNS(null, 'text-anchor', 'middle'); + break; + case 'right': + this.node.setAttributeNS(null, 'text-anchor', 'end'); + break; + } + + } catch(e) { + //console.log(e); + this._isChanged = true; + } + + + if(this.isVisible) { + this.node.removeAttributeNS(null, 'visibility'); + } + + + // Finished + delete this._isUpdating; + + // Raise change event + (this.changeCallbacks||[]).each(function(fn){ + fn.apply(fn); + }) + + }, + + /** + * Returns the text length of the text content of an SVG tspan element. + * For all browsers but Firefox 3 the values are estimated. + * @param {TSpanSVGElement} tspan + * @param {int} startIndex Optional, for sub strings + * @param {int} endIndex Optional, for sub strings + */ + _getRenderedTextLength: function(tspan, startIndex, endIndex, fontSize) { + //if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent) && new Number(RegExp.$1) >= 3) { + if(startIndex === undefined) { +//test string: abcdefghijklmnopqrstuvwxyz????????????????,.-#+ 1234567890?????ABCDEFGHIJKLMNOPQRSTUVWXYZ;:_'*???????????????!"????$%&/()=?[]{}|<>'~????`\^?????????@????????????????? +// for(var i = 0; i < tspan.textContent.length; i++) { +// console.log(tspan.textContent.charAt(i), tspan.getSubStringLength(i,1), this._estimateCharacterWidth(tspan.textContent.charAt(i))*(fontSize/14.0)); +// } + return tspan.getComputedTextLength(); + } else { + return tspan.getSubStringLength(startIndex, endIndex); + } + /*} else { + if(startIndex === undefined) { + return this._estimateTextWidth(tspan.textContent, fontSize); + } else { + return this._estimateTextWidth(tspan.textContent.substr(startIndex, endIndex).trim(), fontSize); + } + }*/ + }, + + /** + * Estimates the text width for a string. + * Used for word wrapping in all browser but FF3. + * @param {Object} text + */ + _estimateTextWidth: function(text, fontSize) { + var sum = 0.0; + for(var i = 0; i < text.length; i++) { + sum += this._estimateCharacterWidth(text.charAt(i)); + } + + return sum*(fontSize/14.0); + }, + + /** + * Estimates the width of a single character for font size 14. + * Used for word wrapping in all browser but FF3. + * @param {Object} character + */ + _estimateCharacterWidth: function(character) { + for(var i = 0; i < this._characterSets.length; i++) { + if(this._characterSets[i].indexOf(character) >= 0) { + return this._characterSetValues[i]; + } + } + return 9; + }, + + getReferencedElementWidth: function() { + var refNode = this.node.ownerDocument.getElementById(this.fitToElemId); + + if(refNode) { + var refbb = refNode.getBBox(); + + if(refbb) { + return (this._rotate != 0 + && this._rotate % 180 != 0 + && this._rotate % 90 == 0 ? + refbb.height : refbb.width); + } + } + + return undefined; + }, + + /** + * If no parameter is provided, this method returns the current text. + * @param text {String} Optional. Replaces the old text with this one. + */ + text: function() { + switch (arguments.length) { + case 0: + return this._text + break; + + case 1: + var oldText = this._text; + if(arguments[0]) { + // Filter out multiple spaces to fix issue in chrome for line-wrapping + this._text = arguments[0].toString(); + if(this._text != null && this._text != undefined) { + this._text = this._text.replace(/ {2,}/g,' '); + } + } else { + this._text = ""; + } + if(oldText !== this._text) { + this._isChanged = true; + this._textHasChanged = true; + } + break; + + default: + //TODO error + break; + } + }, + + getOriginVerticalAlign: function(){ + return this._originVerticalAlign; + }, + + verticalAlign: function() { + switch(arguments.length) { + case 0: + return this._verticalAlign; + case 1: + if(['top', 'middle', 'bottom'].member(arguments[0])) { + var oldValue = this._verticalAlign; + this._verticalAlign = arguments[0]; + if(this._verticalAlign !== oldValue) { + this._isChanged = true; + } + } + break; + + default: + //TODO error + break; + } + }, + + getOriginHorizontalAlign: function(){ + return this._originHorizontalAlign; + }, + + horizontalAlign: function() { + switch(arguments.length) { + case 0: + return this._horizontalAlign; + case 1: + if(['left', 'center', 'right'].member(arguments[0])) { + var oldValue = this._horizontalAlign; + this._horizontalAlign = arguments[0]; + if(this._horizontalAlign !== oldValue) { + this._isChanged = true; + } + } + break; + + default: + //TODO error + break; + } + }, + + rotate: function() { + switch(arguments.length) { + case 0: + return this._rotate; + case 1: + if (this._rotate != arguments[0]) { + this._rotate = arguments[0]; + this._rotationPoint = undefined; + this._isChanged = true; + } + case 2: + if(this._rotate != arguments[0] || + !this._rotationPoint || + this._rotationPoint.x != arguments[1].x || + this._rotationPoint.y != arguments[1].y) { + this._rotate = arguments[0]; + this._rotationPoint = arguments[1]; + this._isChanged = true; + } + + } + }, + + hide: function() { + if(this.isVisible) { + this.isVisible = false; + this._isChanged = true; + } + }, + + show: function() { + if(!this.isVisible) { + this.isVisible = true; + this._isChanged = true; + + // Since text is removed from the tspan when "hidden", mark + // the text as changed to get it redrawn + this._textHasChanged = true; + } + }, + + /** + * iterates parent nodes till it finds a SVG font-size + * attribute. + * @param {SVGElement} node + */ + getInheritedFontSize: function(node) { + if(!node || !node.getAttributeNS) + return; + + var attr = node.getAttributeNS(null, "font-size"); + if(attr) { + return parseFloat(attr); + } else if(!ORYX.Editor.checkClassType(node, SVGSVGElement)) { + return this.getInheritedFontSize(node.parentNode); + } + }, + + getFontSize: function(node) { + var tspans = this.node.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'tspan'); + + //trying to get an inherited font-size attribute + //NO CSS CONSIDERED! + var fontSize = this.getInheritedFontSize(this.node); + + if (!fontSize) { + //because this only works in firefox 3, all other browser use the default line height + if (tspans[0] && /Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent) && new Number(RegExp.$1) >= 3) { + fontSize = tspans[0].getExtentOfChar(0).height; + } + else { + fontSize = ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT; + } + + //handling of unsupported method in webkit + if (fontSize <= 0) { + fontSize = ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT; + } + } + + if(fontSize) + this.node.setAttribute("oryx:fontSize", fontSize); + + return fontSize; + }, + + /** + * Get trimmed text length for use with + * getExtentOfChar and getSubStringLength. + * @param {String} text + */ + getTrimmedTextLength: function(text) { + text = text.strip().gsub(' ', ' '); + + var oldLength; + do { + oldLength = text.length; + text = text.gsub(' ', ' '); + } while (oldLength > text.length); + + return text.length; + }, + + /** + * Returns the offset from + * edge to the label which is + * positioned under the edge + * @return {int} + */ + getOffsetBottom: function(){ + return this.offsetBottom; + }, + + + /** + * Returns the offset from + * edge to the label which is + * positioned over the edge + * @return {int} + */ + getOffsetTop: function(){ + return this.offsetTop; + }, + + /** + * + * @param {Object} obj + */ + deserialize: function(obj, shape){ + if (obj && "undefined" != typeof obj.x && "undefined" != typeof obj.y){ + this.setPosition({x:obj.x, y:obj.y}); + + if ("undefined" != typeof obj.distance){ + var from = shape.dockers[obj.from]; + var to = shape.dockers[obj.to]; + if (from && to){ + this.setReferencePoint({ + dirty : true, + distance : obj.distance, + intersection : {x: obj.x, y: obj.y}, + orientation : obj.orientation, + segment: { + from: from, + fromIndex: obj.from, + fromPosition: from.bounds.center(), + to: to, + toIndex: obj.to, + toPosition: to.bounds.center() + } + }) + } + } + + if (obj.left) this.anchorLeft = true; + if (obj.right) this.anchorRight = true; + if (obj.top) this.anchorTop = true; + if (obj.bottom) this.anchorBottom = true; + if (obj.valign) this.verticalAlign(obj.valign); + if (obj.align) this.horizontalAlign(obj.align); + + } else if (obj && "undefined" != typeof obj.edge){ + this.setEdgePosition(obj.edge); + } + }, + + /** + * + * @return {Object} + */ + serialize: function(){ + + // On edge position + if (this.getEdgePosition()){ + if (this.getOriginEdgePosition() !== this.getEdgePosition()){ + return {edge: this.getEdgePosition()}; + } else { + return null; + } + } + + // On self defined position + if (this.position){ + var pos = {x: this.position.x, y: this.position.y}; + if (this.isAnchorLeft() && this.isAnchorLeft() !== this.isOriginAnchorLeft()){ + pos.left = true; + } + if (this.isAnchorRight() && this.isAnchorRight() !== this.isOriginAnchorRight()){ + pos.right = true; + } + if (this.isAnchorTop() && this.isAnchorTop() !== this.isOriginAnchorTop()){ + pos.top = true; + } + if (this.isAnchorBottom() && this.isAnchorBottom() !== this.isOriginAnchorBottom()){ + pos.bottom = true; + } + + if (this.getOriginVerticalAlign() !== this.verticalAlign()){ + pos.valign = this.verticalAlign(); + } + if (this.getOriginHorizontalAlign() !== this.horizontalAlign()){ + pos.align = this.horizontalAlign(); + } + + return pos; + } + + // On reference point which is interesting for edges + if (this.getReferencePoint()){ + var ref = this.getReferencePoint(); + return { + distance : ref.distance, + x : ref.intersection.x, + y : ref.intersection.y, + from : ref.segment.fromIndex, + to : ref.segment.toIndex, + orientation : ref.orientation, + valign : this.verticalAlign(), + align : this.horizontalAlign() + } + } + return null; + }, + + toString: function() { return "Label " + this.id } + });/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.Math) {ORYX.Core.Math = {};} + +/** + * Calculate the middle point between two given points + * @param {x:double, y:double} point1 + * @param {x:double, y:double} point2 + * @return the middle point + */ +ORYX.Core.Math.midPoint = function(point1, point2) { + return { + x: (point1.x + point2.x) / 2.0, + y: (point1.y + point2.y) / 2.0 + } +} + +/** + * Returns a TRUE if the point is over a line (defined by + * point1 and point 2). In Addition a threshold can be set, + * which defines the weight of those line. + * + * @param {int} pointX - Point X + * @param {int} pointY - Point Y + * @param {int} lPoint1X - Line first Point X + * @param {int} lPoint1Y - Line first Point Y + * @param {int} lPoint2X - Line second Point X + * @param {int} lPoint2Y - Line second Point y + * @param {int} offset {optional} - maximal distance to line + * @class ORYX.Core.Math.prototype + */ +ORYX.Core.Math.isPointInLine = function (pointX, pointY, lPoint1X, lPoint1Y, lPoint2X, lPoint2Y, offset) { + + offset = offset ? Math.abs(offset) : 1; + + // Check if the edge is vertical + if(Math.abs(lPoint1X-lPoint2X)<=offset && Math.abs(pointX-lPoint1X)<=offset && pointY-Math.max(lPoint1Y, lPoint2Y)<=offset && Math.min(lPoint1Y, lPoint2Y)-pointY<=offset) { + return true + } + + // Check if the edge is horizontal + if(Math.abs(lPoint1Y-lPoint2Y)<=offset && Math.abs(pointY-lPoint1Y)<=offset && pointX-Math.max(lPoint1X, lPoint2X)<=offset && Math.min(lPoint1X, lPoint2X)-pointX<=offset) { + return true + } + + if(pointX > Math.max(lPoint1X, lPoint2X) || pointX < Math.min(lPoint1X, lPoint2X)) { + return false + } + + if(pointY > Math.max(lPoint1Y, lPoint2Y) || pointY < Math.min(lPoint1Y, lPoint2Y)) { + return false + } + + var s = (lPoint1Y - lPoint2Y) / (lPoint1X - lPoint2X); + + return Math.abs(pointY - ((s * pointX) + lPoint1Y - s * lPoint1X)) < offset +} + +/** + * Get a boolean if the point is in the polygone + * + */ +ORYX.Core.Math.isPointInEllipse = function (pointX, pointY, cx, cy, rx, ry) { + + if(cx === undefined || cy === undefined || rx === undefined || ry === undefined) { + throw "ORYX.Core.Math.isPointInEllipse needs a ellipse with these properties: x, y, radiusX, radiusY" + } + + var tx = (pointX - cx) / rx; + var ty = (pointY - cy) / ry; + + return tx * tx + ty * ty < 1.0; +} + +/** + * Get a boolean if the point is in the polygone + * @param {int} pointX + * @param {int} pointY + * @param {[int]} Cornerpoints of the Polygone (x,y,x,y,...) + */ +ORYX.Core.Math.isPointInPolygone = function(pointX, pointY, polygone){ + + if (arguments.length < 3) { + throw "ORYX.Core.Math.isPointInPolygone needs two arguments" + } + + var lastIndex = polygone.length-1; + + if (polygone[0] !== polygone[lastIndex - 1] || polygone[1] !== polygone[lastIndex]) { + polygone.push(polygone[0]); + polygone.push(polygone[1]); + } + + var crossings = 0; + + var x1, y1, x2, y2, d; + + for (var i = 0; i < polygone.length - 3; ) { + x1=polygone[i]; + y1=polygone[++i]; + x2=polygone[++i]; + y2=polygone[i+1]; + d=(pointY - y1) * (x2 - x1) - (pointX - x1) * (y2 - y1); + + if ((y1 >= pointY) != (y2 >= pointY)) { + crossings += y2 - y1 >= 0 ? d >= 0 : d <= 0; + } + if (!d && Math.min(x1,x2) <= pointX && pointX <= Math.max(x1,x2) + && Math.min(y1,y2) <= pointY && pointY <= Math.max(y1,y2)) { + return true; + } + } + return (crossings%2)?true:false; +} + +/** + * Calculates the distance between a point and a line. It is also testable, if + * the distance orthogonal to the line, matches the segment of the line. + * + * @param {float} lineP1 + * The starting point of the line segment + * @param {float} lineP2 + * The end point of the line segment + * @param {Point} point + * The point to calculate the distance to. + * @param {boolean} toSegmentOnly + * Flag to signal if only the segment of the line shell be evaluated. + */ +ORYX.Core.Math.distancePointLinie = function( + lineP1, + lineP2, + point, + toSegmentOnly) { + + var intersectionPoint = + ORYX.Core.Math.getPointOfIntersectionPointLine(lineP1, + lineP2, + point, + toSegmentOnly); + + if(!intersectionPoint) { + return null; + } + + return ORYX.Core.Math.getDistancePointToPoint(point, intersectionPoint); +}; + +/** + * Calculates the distance between two points. + * + * @param {point} point1 + * @param {point} point2 + */ +ORYX.Core.Math.getDistancePointToPoint = function(point1, point2) { + return Math.sqrt(Math.pow(point1.x - point2.x, 2) + Math.pow(point1.y - point2.y, 2)); +}; + +/** + * Calculates the relative distance of a point which is between two other points. + * + * @param {point} between1 + * @param {point} between2 + * @param {point} point + */ +ORYX.Core.Math.getDistanceBetweenTwoPoints = function(between1, between2, point) { + return ORYX.Core.Math.getDistancePointToPoint(point, between1) / + ORYX.Core.Math.getDistancePointToPoint(between1, between2); +}; + + +/** + * Returns true, if the point is of the left hand + * side of the regarding the line. + * + * @param {point} lineP1 Line first point + * @param {point} lineP2 Line second point + * @param {point} point + */ +ORYX.Core.Math.pointIsLeftOfLine = function(lineP1, lineP2, point){ + + var vec1 = ORYX.Core.Math.getVector(lineP1, lineP2); + var vec2 = ORYX.Core.Math.getVector(lineP1, point); + // if the cross produkt is more than 0 + return ((vec1.x*vec2.y) - (vec2.x*vec1.y)) > 0 +}; + +/** + * Calculates the a point which is relatively between two other points. + * + * @param {point} point1 + * @param {point} point2 + * @param {number} relative Relative which is between 0 and 1 + */ +ORYX.Core.Math.getPointBetweenTwoPoints = function(point1, point2, relative) { + relative = Math.max(Math.min(relative || 0, 1), 0); + + if (relative === 0){ + return point1; + } else if (relative === 1){ + return point2; + } + + return { + x: point1.x + ((point2.x - point1.x) * relative), + y: point1.y + ((point2.y - point1.y) * relative) + } +}; + + +/** + * Returns the vector of the both points + * + * @param {point} point1 + * @param {point} point2 + */ +ORYX.Core.Math.getVector = function(point1, point2){ + return { + x: point2.x - point1.x, + y: point2.y - point1.y + } +} + +/** + * Returns the an identity vector of the given vector, + * which has the length ot one. + * + * @param {point} vector + * or + * @param {point} point1 + * @param {point} point2 + */ +ORYX.Core.Math.getIdentityVector = function(vector){ + + if (arguments.length == 2){ + vector = ORYX.Core.Math.getVector(arguments[0], arguments[1]); + } + + var length = Math.sqrt((vector.x*vector.x)+(vector.y*vector.y)) + return { + x: vector.x / (length || 1), + y: vector.y / (length || 1) + } +} + + +ORYX.Core.Math.getOrthogonalIdentityVector = function(point1, point2){ + var vec = arguments.length == 1 ? point1 : ORYX.Core.Math.getIdentityVector(point1, point2); + return { + x: vec.y, + y: -vec.x + } +} + + +/** + * Returns the intersection point of a line and a point that defines a line + * orthogonal to the given line. + * + * @param {float} lineP1 + * The starting point of the line segment + * @param {float} lineP2 + * The end point of the line segment + * @param {Point} point + * The point to calculate the distance to. + * @param {boolean} onSegmentOnly + * Flag to signal if only the segment of the line shell be evaluated. + */ +ORYX.Core.Math.getPointOfIntersectionPointLine = function( + lineP1, + lineP2, + point, + onSegmentOnly) { + + /* + * [P3 - P1 - u(P2 - P1)] dot (P2 - P1) = 0 + * u =((x3-x1)(x2-x1)+(y3-y1)(y2-y1))/(p2-p1)?? + */ + var denominator = Math.pow(lineP2.x - lineP1.x, 2) + + Math.pow(lineP2.y - lineP1.y, 2); + if(denominator == 0) { + return undefined; + } + + var u = ((point.x - lineP1.x) * (lineP2.x - lineP1.x) + + (point.y - lineP1.y) * (lineP2.y - lineP1.y)) + / denominator; + + if(onSegmentOnly) { + if (!(0 <= u && u <= 1)) { + return undefined; + } + } + + pointOfIntersection = new Object(); + pointOfIntersection.x = lineP1.x + u * (lineP2.x - lineP1.x); + pointOfIntersection.y = lineP1.y + u * (lineP2.y - lineP1.y); + + return pointOfIntersection; +}; + +/** + * Translated the point with the given matrix. + * @param {Point} point + * @param {Matrix} matrix + * @return {Object} Includes x, y + */ +ORYX.Core.Math.getTranslatedPoint = function(point, matrix){ + var x = matrix.a*point.x+matrix.c*point.y+matrix.e*1; + var y = matrix.b*point.x+matrix.d*point.y+matrix.f*1; + return {x:x, y:y} +} + + +/** + * Returns the inverse matrix of the given SVG transformation matrix + * @param {SVGTransformationMatrix} matrix + * @return {Matrix} + */ +ORYX.Core.Math.getInverseMatrix = function(matrix){ + + var det = ORYX.Core.Math.getDeterminant(matrix), m = matrix; + // +- -+ + // | a c e | + // | b d f | + // | 0 0 1 | + // +- -+ + return { + a: det * ((m.d*1)-(m.f*0)), + b: det * ((m.f*0)-(m.b*1)), + c: det * ((m.e*0)-(m.c*1)), + d: det * ((m.a*1)-(m.e*0)), + e: det * ((m.c*m.f)-(m.e*m.d)), + f: det * ((m.e*m.b)-(m.a*m.f)) + } +} + +/** + * Returns the determinant of the svg transformation matrix + * @param {SVGTranformationMatrix} matrix + * @return {Number} + * + */ +ORYX.Core.Math.getDeterminant = function(m){ + // a11a22a33+a12a23a31+a13a21a32-a13a22a31-a12a21a33-a11a23a32 + return (m.a*m.d*1)+(m.c*m.f*0)+(m.e*m.b*0)-(m.e*m.d*0)-(m.c*m.b*1)-(m.a*m.f*0); +} + +/** + * Returns the bounding box of the given node. Translates the + * origin bounding box with the tranlation matrix. + * @param {SVGElement} node + * @return {Object} Includes x, y, width, height + */ +ORYX.Core.Math.getTranslatedBoundingBox = function(node){ + var matrix = node.getCTM(); + var bb = node.getBBox(); + var ul = ORYX.Core.Math.getTranslatedPoint({x:bb.x, y:bb.y}, matrix); + var ll = ORYX.Core.Math.getTranslatedPoint({x:bb.x, y:bb.y+bb.height}, matrix); + var ur = ORYX.Core.Math.getTranslatedPoint({x:bb.x+bb.width, y:bb.y}, matrix); + var lr = ORYX.Core.Math.getTranslatedPoint({x:bb.x+bb.width, y:bb.y+bb.height}, matrix); + + var minPoint = { + x: Math.min(ul.x, ll.x, ur.x, lr.x), + y: Math.min(ul.y, ll.y, ur.y, lr.y) + } + var maxPoint = { + x: Math.max(ul.x, ll.x, ur.x, lr.x), + y: Math.max(ul.y, ll.y, ur.y, lr.y) + } + return { + x: minPoint.x, + y: minPoint.y, + width: maxPoint.x - minPoint.x, + height: maxPoint.y - minPoint.y + } +}; + + +/** + * Returns the angle of the given line, which is representated by the two points + * @param {Point} p1 + * @param {Point} p2 + * @return {Number} 0 <= x <= 359.99999 + */ +ORYX.Core.Math.getAngle = function(p1, p2){ + if(p1.x == p2.x && p1.y == p2.y) + return 0; + + var angle = Math.asin(Math.sqrt(Math.pow(p1.y-p2.y, 2)) + /(Math.sqrt(Math.pow(p2.x-p1.x, 2)+Math.pow(p1.y-p2.y, 2)))) + *180/Math.PI; + + if(p2.x >= p1.x && p2.y <= p1.y) + return angle; + else if(p2.x < p1.x && p2.y <= p1.y) + return 180 - angle; + else if(p2.x < p1.x && p2.y > p1.y) + return 180 + angle; + else + return 360 - angle; +}; + + +/** + * Implementation of the cohen-sutherland algorithm + */ +new function(){ + + var RIGHT = 2, TOP = 8, BOTTOM = 4, LEFT = 1; + + function computeOutCode (x, y, xmin, ymin, xmax, ymax) { + var code = 0; + if (y > ymax) + code |= TOP; + else if (y < ymin) + code |= BOTTOM; + if (x > xmax) + code |= RIGHT; + else if (x < xmin) + code |= LEFT; + return code; + } + + /** + * Returns TRUE if the rectangle is over the edge and has intersection points or includes it + * @param {Object} x1 Point A of the line + * @param {Object} y1 + * @param {Object} x2 Point B of the line + * @param {Object} y2 + * @param {Object} xmin Point A of the rectangle + * @param {Object} ymin + * @param {Object} xmax Point B of the rectangle + * @param {Object} ymax + */ + ORYX.Core.Math.isRectOverLine = function(x1, y1, x2, y2, xmin, ymin, xmax, ymax){ + return !!ORYX.Core.Math.clipLineOnRect.apply(ORYX.Core.Math, arguments); + } + + /** + * Returns the clipped line on the given rectangle. If there is + * no intersection, it will return NULL. + * + * @param {Object} x1 Point A of the line + * @param {Object} y1 + * @param {Object} x2 Point B of the line + * @param {Object} y2 + * @param {Object} xmin Point A of the rectangle + * @param {Object} ymin + * @param {Object} xmax Point B of the rectangle + * @param {Object} ymax + */ + ORYX.Core.Math.clipLineOnRect = function(x1, y1, x2, y2, xmin, ymin, xmax, ymax){ + //Outcodes for P0, P1, and whatever point lies outside the clip rectangle + var outcode0, outcode1, outcodeOut, hhh = 0; + var accept = false, done = false; + + //compute outcodes + outcode0 = computeOutCode(x1, y1, xmin, ymin, xmax, ymax); + outcode1 = computeOutCode(x2, y2, xmin, ymin, xmax, ymax); + + do { + if ((outcode0 | outcode1) == 0 ){ + accept = true; + done = true; + } else if ( (outcode0 & outcode1) > 0 ) { + done = true; + } else { + //failed both tests, so calculate the line segment to clip + //from an outside point to an intersection with clip edge + var x = 0, y = 0; + //At least one endpoint is outside the clip rectangle; pick it. + outcodeOut = outcode0 != 0 ? outcode0: outcode1; + //Now find the intersection point; + //use formulas y = y0 + slope * (x - x0), x = x0 + (1/slope)* (y - y0) + if ( (outcodeOut & TOP) > 0 ) { + x = x1 + (x2 - x1) * (ymax - y1)/(y2 - y1); + y = ymax; + } else if ((outcodeOut & BOTTOM) > 0 ) { + x = x1 + (x2 - x1) * (ymin - y1)/(y2 - y1); + y = ymin; + } else if ((outcodeOut & RIGHT)> 0) { + y = y1 + (y2 - y1) * (xmax - x1)/(x2 - x1); + x = xmax; + } else if ((outcodeOut & LEFT) > 0) { + y = y1 + (y2 - y1) * (xmin - x1)/(x2 - x1); + x = xmin; + } + + //Now we move outside point to intersection point to clip + //and get ready for next pass. + if (outcodeOut == outcode0) { + x1 = x; + y1 = y; + outcode0 = computeOutCode (x1, y1, xmin, ymin, xmax, ymax); + } else { + x2 = x; + y2 = y; + outcode1 = computeOutCode (x2, y2, xmin, ymin, xmax, ymax); + } + } + hhh ++; + } while (done != true && hhh < 5000); + + if(accept) { + return {a:{x:x1, y:y1}, b:{x:x2, y:y2}}; + } + return null; + } +}(); + + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespace + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.StencilSet) {ORYX.Core.StencilSet = {};} + +/** + * Class Stencil + * uses Prototpye 1.5.0 + * uses Inheritance + * + * This class represents one stencil of a stencil set. + */ +ORYX.Core.StencilSet.Stencil = { + + /** + * Constructor + */ + construct: function(jsonStencil, namespace, source, stencilSet, propertyPackages, defaultPosition) { + arguments.callee.$.construct.apply(this, arguments); // super(); + + // check arguments and set defaults. + if(!jsonStencil) throw "Stencilset seems corrupt."; + if(!namespace) throw "Stencil does not provide namespace."; + if(!source) throw "Stencil does not provide SVG source."; + if(!stencilSet) throw "Fatal internal error loading stencilset."; + //if(!propertyPackages) throw "Fatal internal error loading stencilset."; + + this._source = source; + this._jsonStencil = jsonStencil; + this._stencilSet = stencilSet; + this._namespace = namespace; + this._propertyPackages = propertyPackages; + + if(defaultPosition && !this._jsonStencil.position) + this._jsonStencil.position = defaultPosition; + + this._view; + this._properties = new Hash(); + + // check stencil consistency and set defaults. + /*with(this._jsonStencil) { + + if(!type) throw "Stencil does not provide type."; + if((type != "edge") && (type != "node")) + throw "Stencil type must be 'edge' or 'node'."; + if(!id || id == "") throw "Stencil does not provide valid id."; + if(!title || title == "") + throw "Stencil does not provide title"; + if(!description) { description = ""; }; + if(!groups) { groups = []; } + if(!roles) { roles = []; } + + // add id of stencil to its roles + roles.push(id); + }*/ + + //init all JSON values + if(!this._jsonStencil.type || !(this._jsonStencil.type === "edge" || this._jsonStencil.type === "node")) { + throw "ORYX.Core.StencilSet.Stencil(construct): Type is not defined."; + } + if(!this._jsonStencil.id || this._jsonStencil.id === "") { + throw "ORYX.Core.StencilSet.Stencil(construct): Id is not defined."; + } + if(!this._jsonStencil.title || this._jsonStencil.title === "") { + throw "ORYX.Core.StencilSet.Stencil(construct): Title is not defined."; + } + + if(!this._jsonStencil.description) { this._jsonStencil.description = ""; }; + if(!this._jsonStencil.groups) { this._jsonStencil.groups = []; } + if(!this._jsonStencil.roles) { this._jsonStencil.roles = []; } + + //add id of stencil to its roles + this._jsonStencil.roles.push(this._jsonStencil.id); + + //prepend namespace to each role + this._jsonStencil.roles.each((function(role, index) { + this._jsonStencil.roles[index] = namespace + role; + }).bind(this)); + + //delete duplicate roles + this._jsonStencil.roles = this._jsonStencil.roles.uniq(); + + //make id unique by prepending namespace of stencil set + this._jsonStencil.id = namespace + this._jsonStencil.id; + + this.postProcessProperties(); + + // init serialize callback + if(!this._jsonStencil.serialize) { + this._jsonStencil.serialize = {}; + //this._jsonStencil.serialize = function(shape, data) { return data;}; + } + + // init deserialize callback + if(!this._jsonStencil.deserialize) { + this._jsonStencil.deserialize = {}; + //this._jsonStencil.deserialize = function(shape, data) { return data;}; + } + + // init layout callback + if(!this._jsonStencil.layout) { + this._jsonStencil.layout = [] + //this._jsonStencil.layout = function() {return true;} + } + + //TODO does not work correctly, if the url does not exist + //How to guarantee that the view is loaded correctly before leaving the constructor??? + var url = source + "view/" + jsonStencil.view; + // override content type when this is webkit. + + if(this._jsonStencil.view.trim().match(/</)) { + var parser = new DOMParser(); + var xml = parser.parseFromString( this._jsonStencil.view ,"text/xml"); + + //check if result is a SVG document + if( ORYX.Editor.checkClassType( xml.documentElement, SVGSVGElement )) { + + this._view = xml.documentElement; + + } else { + throw "ORYX.Core.StencilSet.Stencil(_loadSVGOnSuccess): The response is not a SVG document." + } + } else { + new Ajax.Request( + url, { + asynchronous:false, method:'get', + onSuccess:this._loadSVGOnSuccess.bind(this), + onFailure:this._loadSVGOnFailure.bind(this) + }); + } + }, + + postProcessProperties: function() { + + // init property packages + if(this._jsonStencil.propertyPackages && this._jsonStencil.propertyPackages instanceof Array) { + + this._jsonStencil.propertyPackages.each((function(ppId) { + var pp = this._propertyPackages[ppId]; + + if(pp) { + pp.each((function(prop){ + var oProp = new ORYX.Core.StencilSet.Property(prop, this._namespace, this); + this._properties[oProp.prefix() + "-" + oProp.id()] = oProp; + + }).bind(this)); + } + }).bind(this)); + } + + // init properties + if(this._jsonStencil.properties && this._jsonStencil.properties instanceof Array) { + this._jsonStencil.properties.each((function(prop) { + var oProp = new ORYX.Core.StencilSet.Property(prop, this._namespace, this); + this._properties[oProp.prefix() + "-" + oProp.id()] = oProp; + }).bind(this)); + } + + }, + + /** + * @param {ORYX.Core.StencilSet.Stencil} stencil + * @return {Boolean} True, if stencil has the same namespace and type. + */ + equals: function(stencil) { + return (this.id() === stencil.id()); + }, + + stencilSet: function() { + return this._stencilSet; + }, + + type: function() { + return this._jsonStencil.type; + }, + + namespace: function() { + return this._namespace; + }, + + id: function() { + return this._jsonStencil.id; + }, + + idWithoutNs: function(){ + return this.id().replace(this.namespace(),""); + }, + + title: function() { + return ORYX.Core.StencilSet.getTranslation(this._jsonStencil, "title"); + }, + + description: function() { + return ORYX.Core.StencilSet.getTranslation(this._jsonStencil, "description"); + }, + + groups: function() { + return ORYX.Core.StencilSet.getTranslation(this._jsonStencil, "groups"); + }, + + position: function() { + return (isNaN(this._jsonStencil.position) ? 0 : this._jsonStencil.position); + }, + + view: function() { + return this._view.cloneNode(true) || this._view; + }, + + icon: function() { + return this._jsonStencil.icon; + }, + + fixedAspectRatio: function() { + return this._jsonStencil.fixedAspectRatio === true; + }, + + hasMultipleRepositoryEntries: function() { + return (this.getRepositoryEntries().length > 0); + }, + + getRepositoryEntries: function() { + return (this._jsonStencil.repositoryEntries) ? + $A(this._jsonStencil.repositoryEntries) : $A([]); + }, + + properties: function() { + return this._properties.values(); + }, + + property: function(id) { + return this._properties[id]; + }, + + roles: function() { + return this._jsonStencil.roles; + }, + + defaultAlign: function() { + if(!this._jsonStencil.defaultAlign) + return "east"; + return this._jsonStencil.defaultAlign; + }, + + serialize: function(shape, data) { + return this._jsonStencil.serialize; + //return this._jsonStencil.serialize(shape, data); + }, + + deserialize: function(shape, data) { + return this._jsonStencil.deserialize; + //return this._jsonStencil.deserialize(shape, data); + }, + + // in which case is targetShape used? +// layout: function(shape, targetShape) { +// return this._jsonStencil.layout(shape, targetShape); +// }, + // layout property to store events for layouting in plugins + layout: function(shape) { + return this._jsonStencil.layout + }, + + addProperty: function(property, namespace) { + if(property && namespace) { + var oProp = new ORYX.Core.StencilSet.Property(property, namespace, this); + this._properties[oProp.prefix() + "-" + oProp.id()] = oProp; + } + }, + + removeProperty: function(propertyId) { + if(propertyId) { + var oProp = this._properties.values().find(function(prop) { + return (propertyId == prop.id()); + }); + if(oProp) + delete this._properties[oProp.prefix() + "-" + oProp.id()]; + } + }, + + _loadSVGOnSuccess: function(result) { + + var xml = null; + + /* + * We want to get a dom object for the requested file. Unfortunately, + * safari has some issues here. this is meant as a fallback for all + * browsers that don't recognize the svg mimetype as XML but support + * data: urls on Ajax calls. + */ + + // responseXML != undefined. + // if(!(result.responseXML)) + + // get the dom by data: url. + // xml = _evenMoreEvilHack(result.responseText, 'text/xml'); + + // else + + // get it the usual way. + xml = result.responseXML; + + //check if result is a SVG document + if( ORYX.Editor.checkClassType( xml.documentElement, SVGSVGElement )) { + + this._view = xml.documentElement; + + } else { + throw "ORYX.Core.StencilSet.Stencil(_loadSVGOnSuccess): The response is not a SVG document." + } + }, + + _loadSVGOnFailure: function(result) { + throw "ORYX.Core.StencilSet.Stencil(_loadSVGOnFailure): Loading SVG document failed." + }, + + toString: function() { return "Stencil " + this.title() + " (" + this.id() + ")"; } +}; + +ORYX.Core.StencilSet.Stencil = Clazz.extend(ORYX.Core.StencilSet.Stencil); + +/** + * Transform a string into an xml document, the Safari way, as long as + * the nightlies are broken. Even more evil version. + * @param {Object} str + * @param {Object} contentType + */ +function _evenMoreEvilHack(str, contentType) { + + /* + * This even more evil hack was taken from + * http://web-graphics.com/mtarchive/001606.php#chatty004999 + */ + + if (window.ActiveXObject) { + var d = new ActiveXObject("MSXML.DomDocument"); + d.loadXML(str); + return d; + } else if (window.XMLHttpRequest) { + var req = new XMLHttpRequest; + req.open("GET", "data:" + (contentType || "application/xml") + + ";charset=utf-8," + encodeURIComponent(str), false); + if (req.overrideMimeType) { + req.overrideMimeType(contentType); + } + req.send(null); + return req.responseXML; + } +} + +/** + * Transform a string into an xml document, the Safari way, as long as + * the nightlies are broken. + * @param {Object} result the xml document object. + */ +function _evilSafariHack(serializedXML) { + + /* + * The Dave way. Taken from: + * http://web-graphics.com/mtarchive/001606.php + * + * There is another possibility to parse XML in Safari, by implementing + * the DOMParser in javascript. However, in the latest nightlies of + * WebKit, DOMParser is already available, but still buggy. So, this is + * the best compromise for the time being. + */ + + var xml = serializedXML; + var url = "data:text/xml;charset=utf-8," + encodeURIComponent(xml); + var dom = null; + + // your standard AJAX stuff + var req = new XMLHttpRequest(); + req.open("GET", url); + req.onload = function() { dom = req.responseXML; } + req.send(null); + + return dom; +} + /* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespace + */ +if (!ORYX) { + var ORYX = {}; +} +if (!ORYX.Core) { + ORYX.Core = {}; +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {}; +} + +/** + * Class Property + * uses Prototpye 1.5.0 + * uses Inheritance + */ +ORYX.Core.StencilSet.Property = Clazz.extend({ + + /** + * Constructor + */ + construct: function(jsonProp, namespace, stencil){ + arguments.callee.$.construct.apply(this, arguments); + + this._jsonProp = jsonProp || ORYX.Log.error("Parameter jsonProp is not defined."); + this._namespace = namespace || ORYX.Log.error("Parameter namespace is not defined."); + this._stencil = stencil || ORYX.Log.error("Parameter stencil is not defined."); + + this._items = {}; + this._complexItems = {}; + + // Flag to indicate whether or not the property should be hidden + // This can be for example when the stencil set is upgraded, but the model + // has a value for that specific property filled in which we still want to show. + // If the value is missing, the property can simply be not shown. + this._hidden = false; + + jsonProp.id = jsonProp.id || ORYX.Log.error("ORYX.Core.StencilSet.Property(construct): Id is not defined."); + jsonProp.id = jsonProp.id.toLowerCase(); + + if (!jsonProp.type) { + ORYX.Log.info("Type is not defined for stencil '%0', id '%1'. Falling back to 'String'.", stencil, jsonProp.id); + jsonProp.type = "string"; + } + else { + jsonProp.type = jsonProp.type.toLowerCase(); + } + + jsonProp.prefix = jsonProp.prefix || "oryx"; + jsonProp.title = jsonProp.title || ""; + jsonProp.value = jsonProp.value || ""; + jsonProp.description = jsonProp.description || ""; + jsonProp.readonly = jsonProp.readonly || false; + jsonProp.optional = jsonProp.optional !== false; + + //init refToView + if (this._jsonProp.refToView) { + if (!(this._jsonProp.refToView instanceof Array)) { + this._jsonProp.refToView = [this._jsonProp.refToView]; + } + } + else { + this._jsonProp.refToView = []; + } + + var globalMin = this.getMinForType(jsonProp.type); + if (jsonProp.min === undefined || jsonProp.min === null) { + jsonProp.min =globalMin; + } else if (jsonProp.min < globalMin) { + jsonProp.min = globalMin; + } + + var globalMax = this.getMaxForType(jsonProp.type); + if (jsonProp.max === undefined || jsonProp.max === null) { + jsonProp.max = globalMax; + } else if (jsonProp.max > globalMax) { + jsonProp.min = globalMax; + } + + if (!jsonProp.fillOpacity) { + jsonProp.fillOpacity = false; + } + + if ("number" != typeof jsonProp.lightness) { + jsonProp.lightness = 1; + } else { + jsonProp.lightness = Math.max(0, Math.min(1, jsonProp.lightness)); + } + + if (!jsonProp.strokeOpacity) { + jsonProp.strokeOpacity = false; + } + + if (jsonProp.length === undefined || jsonProp.length === null) { + jsonProp.length = Number.MAX_VALUE; + } + + if (!jsonProp.wrapLines) { + jsonProp.wrapLines = false; + } + + if (!jsonProp.dateFormat) { + jsonProp.dateFormat = ORYX.I18N.PropertyWindow.dateFormat || "m/d/y"; + } + + if (!jsonProp.fill) { + jsonProp.fill = false; + } + + if (!jsonProp.stroke) { + jsonProp.stroke = false; + } + + if(!jsonProp.inverseBoolean) { + jsonProp.inverseBoolean = false; + } + + if(!jsonProp.directlyEditable && jsonProp.directlyEditable != false) { + jsonProp.directlyEditable = true; + } + + if(jsonProp.visible !== false) { + jsonProp.visible = true; + } + + if(jsonProp.isList !== true) { + jsonProp.isList = false; + + if(!jsonProp.list || !(jsonProp.list instanceof Array)) { + jsonProp.list = []; + } + } + + if(!jsonProp.category) { + if (jsonProp.popular) { + jsonProp.category = "popular"; + } else { + jsonProp.category = "others"; + } + } + + if(!jsonProp.alwaysAppearInMultiselect) { + jsonProp.alwaysAppearInMultiselect = false; + } + + if (jsonProp.type === ORYX.CONFIG.TYPE_CHOICE) { + if (jsonProp.items && jsonProp.items instanceof Array) { + jsonProp.items.each((function(jsonItem){ + // why is the item's value used as the key??? + this._items[jsonItem.value.toLowerCase()] = new ORYX.Core.StencilSet.PropertyItem(jsonItem, namespace, this); + }).bind(this)); + } + else { + throw "ORYX.Core.StencilSet.Property(construct): No property items defined." + } + // extended by Kerstin (start) + } + else + if (jsonProp.type === ORYX.CONFIG.TYPE_COMPLEX || jsonProp.type == ORYX.CONFIG.TYPE_MULTIPLECOMPLEX) { + if (jsonProp.complexItems && jsonProp.complexItems instanceof Array) { + jsonProp.complexItems.each((function(jsonComplexItem){ + this._complexItems[jsonComplexItem.id.toLowerCase()] = new ORYX.Core.StencilSet.ComplexPropertyItem(jsonComplexItem, namespace, this); + }).bind(this)); + } + } + // extended by Kerstin (end) + }, + + getMinForType : function(type) { + if (type.toLowerCase() == ORYX.CONFIG.TYPE_INTEGER) { + return -Math.pow(2,31) + } else { + return -Number.MAX_VALUE+1; + } + }, + getMaxForType : function(type) { + if (type.toLowerCase() == ORYX.CONFIG.TYPE_INTEGER) { + return Math.pow(2,31)-1 + } else { + return Number.MAX_VALUE; + } + }, + + /** + * @param {ORYX.Core.StencilSet.Property} property + * @return {Boolean} True, if property has the same namespace and id. + */ + equals: function(property){ + return (this._namespace === property.namespace() && + this.id() === property.id()) ? true : false; + }, + + namespace: function(){ + return this._namespace; + }, + + stencil: function(){ + return this._stencil; + }, + + id: function(){ + return this._jsonProp.id; + }, + + prefix: function(){ + return this._jsonProp.prefix; + }, + + type: function(){ + return this._jsonProp.type; + }, + + inverseBoolean: function() { + return this._jsonProp.inverseBoolean; + }, + + category: function() { + return this._jsonProp.category; + }, + + setCategory: function(value) { + this._jsonProp.category = value; + }, + + directlyEditable: function() { + return this._jsonProp.directlyEditable; + }, + + visible: function() { + return this._jsonProp.visible; + }, + + title: function(){ + return ORYX.Core.StencilSet.getTranslation(this._jsonProp, "title"); + }, + + value: function(){ + return this._jsonProp.value; + }, + + readonly: function(){ + return this._jsonProp.readonly; + }, + + optional: function(){ + return this._jsonProp.optional; + }, + + description: function(){ + return ORYX.Core.StencilSet.getTranslation(this._jsonProp, "description"); + }, + + /** + * An optional link to a SVG element so that the property affects the + * graphical representation of the stencil. + */ + refToView: function(){ + return this._jsonProp.refToView; + }, + + /** + * If type is integer or float, min is the lower bounds of value. + */ + min: function(){ + return this._jsonProp.min; + }, + + /** + * If type ist integer or float, max is the upper bounds of value. + */ + max: function(){ + return this._jsonProp.max; + }, + + /** + * If type is float, this method returns if the fill-opacity property should + * be set. + * @return {Boolean} + */ + fillOpacity: function(){ + return this._jsonProp.fillOpacity; + }, + + /** + * If type is float, this method returns if the stroke-opacity property should + * be set. + * @return {Boolean} + */ + strokeOpacity: function(){ + return this._jsonProp.strokeOpacity; + }, + + /** + * If type is string or richtext, length is the maximum length of the text. + * TODO how long can a string be. + */ + length: function(){ + return this._jsonProp.length ? this._jsonProp.length : Number.MAX_VALUE; + }, + + wrapLines: function(){ + return this._jsonProp.wrapLines; + }, + + /** + * If type is date, dateFormat specifies the format of the date. The format + * specification of the ext library is used: + * + * Format Output Description + * ------ ---------- -------------------------------------------------------------- + * d 10 Day of the month, 2 digits with leading zeros + * D Wed A textual representation of a day, three letters + * j 10 Day of the month without leading zeros + * l Wednesday A full textual representation of the day of the week + * S th English ordinal day of month suffix, 2 chars (use with j) + * w 3 Numeric representation of the day of the week + * z 9 The julian date, or day of the year (0-365) + * W 01 ISO-8601 2-digit week number of year, weeks starting on Monday (00-52) + * F January A full textual representation of the month + * m 01 Numeric representation of a month, with leading zeros + * M Jan Month name abbreviation, three letters + * n 1 Numeric representation of a month, without leading zeros + * t 31 Number of days in the given month + * L 0 Whether its a leap year (1 if it is a leap year, else 0) + * Y 2007 A full numeric representation of a year, 4 digits + * y 07 A two digit representation of a year + * a pm Lowercase Ante meridiem and Post meridiem + * A PM Uppercase Ante meridiem and Post meridiem + * g 3 12-hour format of an hour without leading zeros + * G 15 24-hour format of an hour without leading zeros + * h 03 12-hour format of an hour with leading zeros + * H 15 24-hour format of an hour with leading zeros + * i 05 Minutes with leading zeros + * s 01 Seconds, with leading zeros + * O -0600 Difference to Greenwich time (GMT) in hours + * T CST Timezone setting of the machine running the code + * Z -21600 Timezone offset in seconds (negative if west of UTC, positive if east) + * + * Example: + * F j, Y, g:i a -> January 10, 2007, 3:05 pm + */ + dateFormat: function(){ + return this._jsonProp.dateFormat; + }, + + /** + * If type is color, this method returns if the fill property should + * be set. + * @return {Boolean} + */ + fill: function(){ + return this._jsonProp.fill; + }, + + /** + * Lightness defines the satiation of the color + * 0 is the pure color + * 1 is white + * @return {Integer} lightness + */ + lightness: function(){ + return this._jsonProp.lightness; + }, + + /** + * If type is color, this method returns if the stroke property should + * be set. + * @return {Boolean} + */ + stroke: function(){ + return this._jsonProp.stroke; + }, + + /** + * If type is choice, items is a hash map with all alternative values + * (PropertyItem objects) with id as keys. + */ + items: function(){ + return $H(this._items).values(); + }, + + item: function(value){ + if (value) { + return this._items[value.toLowerCase()]; + } else { + return null; + } + }, + + toString: function(){ + return "Property " + this.title() + " (" + this.id() + ")"; + }, + + complexItems: function(){ + return $H(this._complexItems).values(); + }, + + complexItem: function(id){ + if(id) { + return this._complexItems[id.toLowerCase()]; + } else { + return null; + } + + }, + + complexAttributeToView: function(){ + return this._jsonProp.complexAttributeToView || ""; + }, + + isList: function() { + return !!this._jsonProp.isList; + }, + + getListItems: function() { + return this._jsonProp.list; + }, + + /** + * If type is glossary link, the + * type of category can be defined where + * the link only can go to. + * @return {String} The glossary category id + */ + linkableType: function(){ + return this._jsonProp.linkableType || ""; + }, + + alwaysAppearInMultiselect : function() { + return this._jsonProp.alwaysAppearInMultiselect; + }, + + popular: function() { + return this._jsonProp.popular || false; + }, + + setPopular: function() { + this._jsonProp.popular = true; + }, + + hide: function() { + this._hidden = true; + }, + + isHidden: function() { + return this._hidden; + } + +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespace + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.StencilSet) {ORYX.Core.StencilSet = {};} + +/** + * Class Stencil + * uses Prototpye 1.5.0 + * uses Inheritance + */ +ORYX.Core.StencilSet.PropertyItem = Clazz.extend({ + + /** + * Constructor + */ + construct: function(jsonItem, namespace, property) { + arguments.callee.$.construct.apply(this, arguments); + + if(!jsonItem) { + throw "ORYX.Core.StencilSet.PropertyItem(construct): Parameter jsonItem is not defined."; + } + if(!namespace) { + throw "ORYX.Core.StencilSet.PropertyItem(construct): Parameter namespace is not defined."; + } + if(!property) { + throw "ORYX.Core.StencilSet.PropertyItem(construct): Parameter property is not defined."; + } + + this._jsonItem = jsonItem; + this._namespace = namespace; + this._property = property; + + //init all values + if(!jsonItem.value) { + throw "ORYX.Core.StencilSet.PropertyItem(construct): Value is not defined."; + } + + if(this._jsonItem.refToView) { + if(!(this._jsonItem.refToView instanceof Array)) { + this._jsonItem.refToView = [this._jsonItem.refToView]; + } + } else { + this._jsonItem.refToView = []; + } + }, + + /** + * @param {ORYX.Core.StencilSet.PropertyItem} item + * @return {Boolean} True, if item has the same namespace and id. + */ + equals: function(item) { + return (this.property().equals(item.property()) && + this.value() === item.value()); + }, + + namespace: function() { + return this._namespace; + }, + + property: function() { + return this._property; + }, + + value: function() { + return this._jsonItem.value; + }, + + title: function() { + return ORYX.Core.StencilSet.getTranslation(this._jsonItem, "title"); + }, + + refToView: function() { + return this._jsonItem.refToView; + }, + + icon: function() { + return (this._jsonItem.icon) ? this.property().stencil()._source + "icons/" + this._jsonItem.icon : ""; + }, + + toString: function() { return "PropertyItem " + this.property() + " (" + this.value() + ")"; } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.StencilSet) {ORYX.Core.StencilSet = {};} + +/** + * Class Stencil + * uses Prototpye 1.5.0 + * uses Inheritance + */ +ORYX.Core.StencilSet.ComplexPropertyItem = Clazz.extend({ + + /** + * Constructor + */ + construct: function(jsonItem, namespace, property) { + arguments.callee.$.construct.apply(this, arguments); + + if(!jsonItem) { + throw "ORYX.Core.StencilSet.ComplexPropertyItem(construct): Parameter jsonItem is not defined."; + } + if(!namespace) { + throw "ORYX.Core.StencilSet.ComplexPropertyItem(construct): Parameter namespace is not defined."; + } + if(!property) { + throw "ORYX.Core.StencilSet.ComplexPropertyItem(construct): Parameter property is not defined."; + } + + this._jsonItem = jsonItem; + this._namespace = namespace; + this._property = property; + this._items = new Hash(); + this._complexItems = new Hash(); + + //init all values + if(!jsonItem.name) { + throw "ORYX.Core.StencilSet.ComplexPropertyItem(construct): Name is not defined."; + } + + if(!jsonItem.type) { + throw "ORYX.Core.StencilSet.ComplexPropertyItem(construct): Type is not defined."; + } else { + jsonItem.type = jsonItem.type.toLowerCase(); + } + + if(jsonItem.type === ORYX.CONFIG.TYPE_CHOICE) { + if(jsonItem.items && jsonItem.items instanceof Array) { + jsonItem.items.each((function(item) { + this._items[item.value] = new ORYX.Core.StencilSet.PropertyItem(item, namespace, this); + }).bind(this)); + } else { + throw "ORYX.Core.StencilSet.Property(construct): No property items defined." + } + } else if(jsonItem.type === ORYX.CONFIG.TYPE_COMPLEX) { + if(jsonItem.complexItems && jsonItem.complexItems instanceof Array) { + jsonItem.complexItems.each((function(complexItem) { + this._complexItems[complexItem.id] = new ORYX.Core.StencilSet.ComplexPropertyItem(complexItem, namespace, this); + }).bind(this)); + } else { + throw "ORYX.Core.StencilSet.Property(construct): No property items defined." + } + } + }, + + /** + * @param {ORYX.Core.StencilSet.PropertyItem} item + * @return {Boolean} True, if item has the same namespace and id. + */ + equals: function(item) { + return (this.property().equals(item.property()) && + this.name() === item.name()); + }, + + namespace: function() { + return this._namespace; + }, + + property: function() { + return this._property; + }, + + name: function() { + return ORYX.Core.StencilSet.getTranslation(this._jsonItem, "name"); + }, + + id: function() { + return this._jsonItem.id; + }, + + type: function() { + return this._jsonItem.type; + }, + + optional: function() { + return this._jsonItem.optional; + }, + + width: function() { + return this._jsonItem.width; + }, + + value: function() { + return this._jsonItem.value; + }, + + items: function() { + return this._items.values(); + }, + + complexItems: function() { + return this._complexItems.values(); + }, + + disable: function() { + return this._jsonItem.disable; + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.StencilSet) {ORYX.Core.StencilSet = {};} + +/** + * Class Rules uses Prototpye 1.5.0 uses Inheritance + * + * This class implements the API to check the stencil sets' rules. + */ +ORYX.Core.StencilSet.Rules = { + + /** + * Constructor + */ + construct: function() { + arguments.callee.$.construct.apply(this, arguments); + + this._stencilSets = []; + this._stencils = []; + this._containerStencils = []; + + this._cachedConnectSET = new Hash(); + this._cachedConnectSE = new Hash(); + this._cachedConnectTE = new Hash(); + this._cachedCardSE = new Hash(); + this._cachedCardTE = new Hash(); + this._cachedContainPC = new Hash(); + this._cachedMorphRS = new Hash(); + + this._connectionRules = new Hash(); + this._cardinalityRules = new Hash(); + this._containmentRules = new Hash(); + this._morphingRules = new Hash(); + this._layoutRules = new Hash(); + }, + + /** + * Call this method to initialize the rules for a stencil set and all of its + * active extensions. + * + * @param {Object} + * stencilSet + */ + initializeRules: function(stencilSet) { + + var existingSS = this._stencilSets.find(function(ss) { + return (ss.namespace() == stencilSet.namespace()); + }); + if (existingSS) { + // reinitialize all rules + var stencilsets = this._stencilSets.clone(); + stencilsets = stencilsets.without(existingSS); + stencilsets.push(stencilSet); + + this._stencilSets = []; + this._stencils = []; + this._containerStencils = []; + + this._cachedConnectSET = new Hash(); + this._cachedConnectSE = new Hash(); + this._cachedConnectTE = new Hash(); + this._cachedCardSE = new Hash(); + this._cachedCardTE = new Hash(); + this._cachedContainPC = new Hash(); + this._cachedMorphRS = new Hash(); + + this._connectionRules = new Hash(); + this._cardinalityRules = new Hash(); + this._containmentRules = new Hash(); + this._morphingRules = new Hash(); + this._layoutRules = new Hash(); + + stencilsets.each(function(ss){ + this.initializeRules(ss); + }.bind(this)); + return; + } + else { + this._stencilSets.push(stencilSet); + + var jsonRules = new Hash(stencilSet.jsonRules()); + var namespace = stencilSet.namespace(); + var stencils = stencilSet.stencils(); + + stencilSet.extensions().values().each(function(extension) { + if(extension.rules) { + if(extension.rules.connectionRules) + jsonRules.connectionRules = jsonRules.connectionRules.concat(extension.rules.connectionRules); + if(extension.rules.cardinalityRules) + jsonRules.cardinalityRules = jsonRules.cardinalityRules.concat(extension.rules.cardinalityRules); + if(extension.rules.containmentRules) + jsonRules.containmentRules = jsonRules.containmentRules.concat(extension.rules.containmentRules); + if(extension.rules.morphingRules) + jsonRules.morphingRules = jsonRules.morphingRules.concat(extension.rules.morphingRules); + } + if(extension.stencils) + stencils = stencils.concat(extension.stencils); + }); + + this._stencils = this._stencils.concat(stencilSet.stencils()); + + // init connection rules + var cr = this._connectionRules; + if (jsonRules.connectionRules) { + jsonRules.connectionRules.each((function(rules){ + if (this._isRoleOfOtherNamespace(rules.role)) { + if (!cr[rules.role]) { + cr[rules.role] = new Hash(); + } + } + else { + if (!cr[namespace + rules.role]) + cr[namespace + rules.role] = new Hash(); + } + + rules.connects.each((function(connect){ + var toRoles = []; + if (connect.to) { + if (!(connect.to instanceof Array)) { + connect.to = [connect.to]; + } + connect.to.each((function(to){ + if (this._isRoleOfOtherNamespace(to)) { + toRoles.push(to); + } + else { + toRoles.push(namespace + to); + } + }).bind(this)); + } + + var role, from; + if (this._isRoleOfOtherNamespace(rules.role)) + role = rules.role; + else + role = namespace + rules.role; + + if (this._isRoleOfOtherNamespace(connect.from)) + from = connect.from; + else + from = namespace + connect.from; + + if (!cr[role][from]) + cr[role][from] = toRoles; + else + cr[role][from] = cr[role][from].concat(toRoles); + + }).bind(this)); + }).bind(this)); + } + + // init cardinality rules + var cardr = this._cardinalityRules; + if (jsonRules.cardinalityRules) { + jsonRules.cardinalityRules.each((function(rules){ + var cardrKey; + if (this._isRoleOfOtherNamespace(rules.role)) { + cardrKey = rules.role; + } + else { + cardrKey = namespace + rules.role; + } + + if (!cardr[cardrKey]) { + cardr[cardrKey] = {}; + for (i in rules) { + cardr[cardrKey][i] = rules[i]; + } + } + + var oe = new Hash(); + if (rules.outgoingEdges) { + rules.outgoingEdges.each((function(rule){ + if (this._isRoleOfOtherNamespace(rule.role)) { + oe[rule.role] = rule; + } + else { + oe[namespace + rule.role] = rule; + } + }).bind(this)); + } + cardr[cardrKey].outgoingEdges = oe; + var ie = new Hash(); + if (rules.incomingEdges) { + rules.incomingEdges.each((function(rule){ + if (this._isRoleOfOtherNamespace(rule.role)) { + ie[rule.role] = rule; + } + else { + ie[namespace + rule.role] = rule; + } + }).bind(this)); + } + cardr[cardrKey].incomingEdges = ie; + }).bind(this)); + } + + // init containment rules + var conr = this._containmentRules; + if (jsonRules.containmentRules) { + jsonRules.containmentRules.each((function(rules){ + var conrKey; + if (this._isRoleOfOtherNamespace(rules.role)) { + conrKey = rules.role; + } + else { + this._containerStencils.push(namespace + rules.role); + conrKey = namespace + rules.role; + } + if (!conr[conrKey]) { + conr[conrKey] = []; + } + (rules.contains||[]).each((function(containRole){ + if (this._isRoleOfOtherNamespace(containRole)) { + conr[conrKey].push(containRole); + } + else { + conr[conrKey].push(namespace + containRole); + } + }).bind(this)); + }).bind(this)); + } + + // init morphing rules + var morphr = this._morphingRules; + if (jsonRules.morphingRules) { + jsonRules.morphingRules.each((function(rules){ + var morphrKey; + if (this._isRoleOfOtherNamespace(rules.role)) { + morphrKey = rules.role; + } + else { + morphrKey = namespace + rules.role; + } + if (!morphr[morphrKey]) { + morphr[morphrKey] = []; + } + if(!rules.preserveBounds) { + rules.preserveBounds = false; + } + rules.baseMorphs.each((function(baseMorphStencilId){ + var morphStencil = this._getStencilById(namespace + baseMorphStencilId); + if(morphStencil) { + morphr[morphrKey].push(morphStencil); + } + }).bind(this)); + }).bind(this)); + } + + // init layouting rules + var layoutRules = this._layoutRules; + if (jsonRules.layoutRules) { + + var getDirections = function(o){ + return { + "edgeRole":o.edgeRole||undefined, + "t": o["t"]||1, + "r": o["r"]||1, + "b": o["b"]||1, + "l": o["l"]||1 + } + } + + jsonRules.layoutRules.each(function(rules){ + var layoutKey; + if (this._isRoleOfOtherNamespace(rules.role)) { + layoutKey = rules.role; + } + else { + layoutKey = namespace + rules.role; + } + if (!layoutRules[layoutKey]) { + layoutRules[layoutKey] = {}; + } + if (rules["in"]){ + layoutRules[layoutKey]["in"] = getDirections(rules["in"]); + } + if (rules["ins"]){ + layoutRules[layoutKey]["ins"] = (rules["ins"]||[]).map(function(e){ return getDirections(e) }) + } + if (rules["out"]) { + layoutRules[layoutKey]["out"] = getDirections(rules["out"]); + } + if (rules["outs"]){ + layoutRules[layoutKey]["outs"] = (rules["outs"]||[]).map(function(e){ return getDirections(e) }) + } + }.bind(this)); + } + } + }, + + _getStencilById: function(id) { + return this._stencils.find(function(stencil) { + return stencil.id()==id; + }); + }, + + _cacheConnect: function(args) { + result = this._canConnect(args); + + if (args.sourceStencil && args.targetStencil) { + var source = this._cachedConnectSET[args.sourceStencil.id()]; + + if(!source) { + source = new Hash(); + this._cachedConnectSET[args.sourceStencil.id()] = source; + } + + var edge = source[args.edgeStencil.id()]; + + if(!edge) { + edge = new Hash(); + source[args.edgeStencil.id()] = edge; + } + + edge[args.targetStencil.id()] = result; + + } else if (args.sourceStencil) { + var source = this._cachedConnectSE[args.sourceStencil.id()]; + + if(!source) { + source = new Hash(); + this._cachedConnectSE[args.sourceStencil.id()] = source; + } + + source[args.edgeStencil.id()] = result; + + } else { + var target = this._cachedConnectTE[args.targetStencil.id()]; + + if(!target) { + target = new Hash(); + this._cachedConnectTE[args.targetStencil.id()] = target; + } + + target[args.edgeStencil.id()] = result; + } + + return result; + }, + + _cacheCard: function(args) { + + if(args.sourceStencil) { + var source = this._cachedCardSE[args.sourceStencil.id()] + + if(!source) { + source = new Hash(); + this._cachedCardSE[args.sourceStencil.id()] = source; + } + + var max = this._getMaximumNumberOfOutgoingEdge(args); + if(max == undefined) + max = -1; + + source[args.edgeStencil.id()] = max; + } + + if(args.targetStencil) { + var target = this._cachedCardTE[args.targetStencil.id()] + + if(!target) { + target = new Hash(); + this._cachedCardTE[args.targetStencil.id()] = target; + } + + var max = this._getMaximumNumberOfIncomingEdge(args); + if(max == undefined) + max = -1; + + target[args.edgeStencil.id()] = max; + } + }, + + _cacheContain: function(args) { + + var result = [this._canContain(args), + this._getMaximumOccurrence(args.containingStencil, args.containedStencil)] + + if(result[1] == undefined) + result[1] = -1; + + var children = this._cachedContainPC[args.containingStencil.id()]; + + if(!children) { + children = new Hash(); + this._cachedContainPC[args.containingStencil.id()] = children; + } + + children[args.containedStencil.id()] = result; + + return result; + }, + + /** + * Returns all stencils belonging to a morph group. (calculation result is + * cached) + */ + _cacheMorph: function(role) { + + var morphs = this._cachedMorphRS[role]; + + if(!morphs) { + morphs = []; + + if(this._morphingRules.keys().include(role)) { + morphs = this._stencils.select(function(stencil) { + return stencil.roles().include(role); + }); + } + + this._cachedMorphRS[role] = morphs; + } + return morphs; + }, + + /** Begin connection rules' methods */ + + /** + * + * @param {Object} + * args sourceStencil: ORYX.Core.StencilSet.Stencil | undefined + * sourceShape: ORYX.Core.Shape | undefined + * + * At least sourceStencil or sourceShape has to be specified + * + * @return {Array} Array of stencils of edges that can be outgoing edges of + * the source. + */ + outgoingEdgeStencils: function(args) { + // check arguments + if(!args.sourceShape && !args.sourceStencil) { + return []; + } + + // init arguments + if(args.sourceShape) { + args.sourceStencil = args.sourceShape.getStencil(); + } + + var _edges = []; + + // test each edge, if it can connect to source + this._stencils.each((function(stencil) { + if(stencil.type() === "edge") { + var newArgs = Object.clone(args); + newArgs.edgeStencil = stencil; + if(this.canConnect(newArgs)) { + _edges.push(stencil); + } + } + }).bind(this)); + + return _edges; + }, + + /** + * + * @param {Object} + * args targetStencil: ORYX.Core.StencilSet.Stencil | undefined + * targetShape: ORYX.Core.Shape | undefined + * + * At least targetStencil or targetShape has to be specified + * + * @return {Array} Array of stencils of edges that can be incoming edges of + * the target. + */ + incomingEdgeStencils: function(args) { + // check arguments + if(!args.targetShape && !args.targetStencil) { + return []; + } + + // init arguments + if(args.targetShape) { + args.targetStencil = args.targetShape.getStencil(); + } + + var _edges = []; + + // test each edge, if it can connect to source + this._stencils.each((function(stencil) { + if(stencil.type() === "edge") { + var newArgs = Object.clone(args); + newArgs.edgeStencil = stencil; + if(this.canConnect(newArgs)) { + _edges.push(stencil); + } + } + }).bind(this)); + + return _edges; + }, + + /** + * + * @param {Object} + * args edgeStencil: ORYX.Core.StencilSet.Stencil | undefined + * edgeShape: ORYX.Core.Edge | undefined targetStencil: + * ORYX.Core.StencilSet.Stencil | undefined targetShape: + * ORYX.Core.Node | undefined + * + * At least edgeStencil or edgeShape has to be specified!!! + * + * @return {Array} Returns an array of stencils that can be source of the + * specified edge. + */ + sourceStencils: function(args) { + // check arguments + if(!args || + !args.edgeShape && !args.edgeStencil) { + return []; + } + + // init arguments + if(args.targetShape) { + args.targetStencil = args.targetShape.getStencil(); + } + + if(args.edgeShape) { + args.edgeStencil = args.edgeShape.getStencil(); + } + + var _sources = []; + + // check each stencil, if it can be a source + this._stencils.each((function(stencil) { + var newArgs = Object.clone(args); + newArgs.sourceStencil = stencil; + if(this.canConnect(newArgs)) { + _sources.push(stencil); + } + }).bind(this)); + + return _sources; + }, + + /** + * + * @param {Object} + * args edgeStencil: ORYX.Core.StencilSet.Stencil | undefined + * edgeShape: ORYX.Core.Edge | undefined sourceStencil: + * ORYX.Core.StencilSet.Stencil | undefined sourceShape: + * ORYX.Core.Node | undefined + * + * At least edgeStencil or edgeShape has to be specified!!! + * + * @return {Array} Returns an array of stencils that can be target of the + * specified edge. + */ + targetStencils: function(args) { + // check arguments + if(!args || + !args.edgeShape && !args.edgeStencil) { + return []; + } + + // init arguments + if(args.sourceShape) { + args.sourceStencil = args.sourceShape.getStencil(); + } + + if(args.edgeShape) { + args.edgeStencil = args.edgeShape.getStencil(); + } + + var _targets = []; + + // check stencil, if it can be a target + this._stencils.each((function(stencil) { + var newArgs = Object.clone(args); + newArgs.targetStencil = stencil; + if(this.canConnect(newArgs)) { + _targets.push(stencil); + } + }).bind(this)); + + return _targets; + }, + + /** + * + * @param {Object} + * args edgeStencil: ORYX.Core.StencilSet.Stencil edgeShape: + * ORYX.Core.Edge |undefined sourceStencil: + * ORYX.Core.StencilSet.Stencil | undefined sourceShape: + * ORYX.Core.Node |undefined targetStencil: + * ORYX.Core.StencilSet.Stencil | undefined targetShape: + * ORYX.Core.Node |undefined + * + * At least source or target has to be specified!!! + * + * @return {Boolean} Returns, if the edge can connect source and target. + */ + canConnect: function(args) { + // check arguments + if(!args || + (!args.sourceShape && !args.sourceStencil && + !args.targetShape && !args.targetStencil) || + !args.edgeShape && !args.edgeStencil) { + return false; + } + + // init arguments + if(args.sourceShape) { + args.sourceStencil = args.sourceShape.getStencil(); + } + if(args.targetShape) { + args.targetStencil = args.targetShape.getStencil(); + } + if(args.edgeShape) { + args.edgeStencil = args.edgeShape.getStencil(); + } + + var result; + + if(args.sourceStencil && args.targetStencil) { + var source = this._cachedConnectSET[args.sourceStencil.id()]; + + if(!source) + result = this._cacheConnect(args); + else { + var edge = source[args.edgeStencil.id()]; + + if(!edge) + result = this._cacheConnect(args); + else { + var target = edge[args.targetStencil.id()]; + + if(target == undefined) + result = this._cacheConnect(args); + else + result = target; + } + } + } else if (args.sourceStencil) { + var source = this._cachedConnectSE[args.sourceStencil.id()]; + + if(!source) + result = this._cacheConnect(args); + else { + var edge = source[args.edgeStencil.id()]; + + if(edge == undefined) + result = this._cacheConnect(args); + else + result = edge; + } + } else { // args.targetStencil + var target = this._cachedConnectTE[args.targetStencil.id()]; + + if(!target) + result = this._cacheConnect(args); + else { + var edge = target[args.edgeStencil.id()]; + + if(edge == undefined) + result = this._cacheConnect(args); + else + result = edge; + } + } + + // check cardinality + if (result) { + if(args.sourceShape) { + var source = this._cachedCardSE[args.sourceStencil.id()]; + + if(!source) { + this._cacheCard(args); + source = this._cachedCardSE[args.sourceStencil.id()]; + } + + var max = source[args.edgeStencil.id()]; + + if(max == undefined) { + this._cacheCard(args); + } + + max = source[args.edgeStencil.id()]; + + if(max != -1) { + result = args.sourceShape.getOutgoingShapes().all(function(cs) { + if((cs.getStencil().id() === args.edgeStencil.id()) && + ((args.edgeShape) ? cs !== args.edgeShape : true)) { + max--; + return (max > 0) ? true : false; + } else { + return true; + } + }); + } + } + + if (args.targetShape) { + var target = this._cachedCardTE[args.targetStencil.id()]; + + if(!target) { + this._cacheCard(args); + target = this._cachedCardTE[args.targetStencil.id()]; + } + + var max = target[args.edgeStencil.id()]; + + if(max == undefined) { + this._cacheCard(args); + } + + max = target[args.edgeStencil.id()]; + + if(max != -1) { + result = args.targetShape.getIncomingShapes().all(function(cs){ + if ((cs.getStencil().id() === args.edgeStencil.id()) && + ((args.edgeShape) ? cs !== args.edgeShape : true)) { + max--; + return (max > 0) ? true : false; + } + else { + return true; + } + }); + } + } + } + + return result; + }, + + /** + * + * @param {Object} + * args edgeStencil: ORYX.Core.StencilSet.Stencil edgeShape: + * ORYX.Core.Edge |undefined sourceStencil: + * ORYX.Core.StencilSet.Stencil | undefined sourceShape: + * ORYX.Core.Node |undefined targetStencil: + * ORYX.Core.StencilSet.Stencil | undefined targetShape: + * ORYX.Core.Node |undefined + * + * At least source or target has to be specified!!! + * + * @return {Boolean} Returns, if the edge can connect source and target. + */ + _canConnect: function(args) { + // check arguments + if(!args || + (!args.sourceShape && !args.sourceStencil && + !args.targetShape && !args.targetStencil) || + !args.edgeShape && !args.edgeStencil) { + return false; + } + + // init arguments + if(args.sourceShape) { + args.sourceStencil = args.sourceShape.getStencil(); + } + if(args.targetShape) { + args.targetStencil = args.targetShape.getStencil(); + } + if(args.edgeShape) { + args.edgeStencil = args.edgeShape.getStencil(); + } + + // 1. check connection rules + var resultCR; + + // get all connection rules for this edge + var edgeRules = this._getConnectionRulesOfEdgeStencil(args.edgeStencil); + + // check connection rules, if the source can be connected to the target + // with the specified edge. + if(edgeRules.keys().length === 0) { + resultCR = false; + } else { + if(args.sourceStencil) { + resultCR = args.sourceStencil.roles().any(function(sourceRole) { + var targetRoles = edgeRules[sourceRole]; + + if(!targetRoles) {return false;} + + if(args.targetStencil) { + return (targetRoles.any(function(targetRole) { + return args.targetStencil.roles().member(targetRole); + })); + } else { + return true; + } + }); + } else { // !args.sourceStencil -> there is args.targetStencil + resultCR = edgeRules.values().any(function(targetRoles) { + return args.targetStencil.roles().any(function(targetRole) { + return targetRoles.member(targetRole); + }); + }); + } + } + + return resultCR; + }, + + /** End connection rules' methods */ + + + /** Begin containment rules' methods */ + + isContainer: function(shape) { + return this._containerStencils.member(shape.getStencil().id()); + }, + + /** + * + * @param {Object} + * args containingStencil: ORYX.Core.StencilSet.Stencil + * containingShape: ORYX.Core.AbstractShape containedStencil: + * ORYX.Core.StencilSet.Stencil containedShape: ORYX.Core.Shape + */ + canContain: function(args) { + if(!args || + !args.containingStencil && !args.containingShape || + !args.containedStencil && !args.containedShape) { + return false; + } + + // init arguments + if(args.containedShape) { + args.containedStencil = args.containedShape.getStencil(); + } + + if(args.containingShape) { + args.containingStencil = args.containingShape.getStencil(); + } + + //if(args.containingStencil.type() == 'edge' || args.containedStencil.type() == 'edge') + // return false; + if(args.containedStencil.type() == 'edge') + return false; + + var childValues; + + var parent = this._cachedContainPC[args.containingStencil.id()]; + + if(!parent) + childValues = this._cacheContain(args); + else { + childValues = parent[args.containedStencil.id()]; + + if(!childValues) + childValues = this._cacheContain(args); + } + + if(!childValues[0]) + return false; + else if (childValues[1] == -1) + return true; + else { + if(args.containingShape) { + var max = childValues[1]; + return args.containingShape.getChildShapes(false).all(function(as) { + if(as.getStencil().id() === args.containedStencil.id()) { + max--; + return (max > 0) ? true : false; + } else { + return true; + } + }); + } else { + return true; + } + } + }, + + /** + * + * @param {Object} + * args containingStencil: ORYX.Core.StencilSet.Stencil + * containingShape: ORYX.Core.AbstractShape containedStencil: + * ORYX.Core.StencilSet.Stencil containedShape: ORYX.Core.Shape + */ + _canContain: function(args) { + if(!args || + !args.containingStencil && !args.containingShape || + !args.containedStencil && !args.containedShape) { + return false; + } + + // init arguments + if(args.containedShape) { + args.containedStencil = args.containedShape.getStencil(); + } + + if(args.containingShape) { + args.containingStencil = args.containingShape.getStencil(); + } + +// if(args.containingShape) { +// if(args.containingShape instanceof ORYX.Core.Edge) { +// // edges cannot contain other shapes +// return false; +// } +// } + + + var result; + + // check containment rules + result = args.containingStencil.roles().any((function(role) { + var roles = this._containmentRules[role]; + if(roles) { + return roles.any(function(role) { + return args.containedStencil.roles().member(role); + }); + } else { + return false; + } + }).bind(this)); + + return result; + }, + + /** End containment rules' methods */ + + + /** Begin morphing rules' methods */ + + /** + * + * @param {Object} + * args + * stencil: ORYX.Core.StencilSet.Stencil | undefined + * shape: ORYX.Core.Shape | undefined + * + * At least stencil or shape has to be specified + * + * @return {Array} Array of stencils that the passed stencil/shape can be + * transformed to (including the current stencil itself) + */ + morphStencils: function(args) { + // check arguments + if(!args.stencil && !args.shape) { + return []; + } + + // init arguments + if(args.shape) { + args.stencil = args.shape.getStencil(); + } + + var _morphStencils = []; + args.stencil.roles().each(function(role) { + this._cacheMorph(role).each(function(stencil) { + _morphStencils.push(stencil); + }) + }.bind(this)); + + + var baseMorphs = this.baseMorphs(); + // BaseMorphs should be in the front of the array + _morphStencils = _morphStencils.uniq().sort(function(a,b){ return baseMorphs.include(a)&&!baseMorphs.include(b) ? -1 : (baseMorphs.include(b)&&!baseMorphs.include(a) ? 1 : 0)}) + return _morphStencils; + }, + + /** + * @return {Array} An array of all base morph stencils + */ + baseMorphs: function() { + var _baseMorphs = []; + this._morphingRules.each(function(pair) { + pair.value.each(function(baseMorph) { + _baseMorphs.push(baseMorph); + }); + }); + return _baseMorphs; + }, + + /** + * Returns true if there are morphing rules defines + * @return {boolean} + */ + containsMorphingRules: function(){ + return this._stencilSets.any(function(ss){ return !!ss.jsonRules().morphingRules}); + }, + + /** + * + * @param {Object} + * args + * sourceStencil: + * ORYX.Core.StencilSet.Stencil | undefined + * sourceShape: + * ORYX.Core.Node |undefined + * targetStencil: + * ORYX.Core.StencilSet.Stencil | undefined + * targetShape: + * ORYX.Core.Node |undefined + * + * + * @return {Stencil} Returns, the stencil for the connecting edge + * or null if connection is not possible + */ + connectMorph: function(args) { + // check arguments + if(!args || + (!args.sourceShape && !args.sourceStencil && + !args.targetShape && !args.targetStencil)) { + return false; + } + + // init arguments + if(args.sourceShape) { + args.sourceStencil = args.sourceShape.getStencil(); + } + if(args.targetShape) { + args.targetStencil = args.targetShape.getStencil(); + } + + var incoming = this.incomingEdgeStencils(args); + var outgoing = this.outgoingEdgeStencils(args); + + var edgeStencils = incoming.select(function(e) { return outgoing.member(e); }); // intersection of sets + var baseEdgeStencils = this.baseMorphs().select(function(e) { return edgeStencils.member(e); }); // again: intersection of sets + + if(baseEdgeStencils.size()>0) + return baseEdgeStencils[0]; // return any of the possible base morphs + else if(edgeStencils.size()>0) + return edgeStencils[0]; // return any of the possible stencils + + return null; //connection not possible + }, + + /** + * Return true if the stencil should be located in the shape menu + * @param {ORYX.Core.StencilSet.Stencil} morph + * @return {Boolean} Returns true if the morphs in the morph group of the + * specified morph shall be displayed in the shape menu + */ + showInShapeMenu: function(stencil) { + return this._stencilSets.any(function(ss){ + return ss.jsonRules().morphingRules + .any(function(r){ + return stencil.roles().include(ss.namespace() + r.role) + && r.showInShapeMenu !== false; + }) + }); + }, + + preserveBounds: function(stencil) { + return this._stencilSets.any(function(ss) { + return ss.jsonRules().morphingRules.any(function(r) { + + + return stencil.roles().include(ss.namespace() + r.role) + && r.preserveBounds; + }) + }) + }, + + /** End morphing rules' methods */ + + + /** Begin layouting rules' methods */ + + /** + * Returns a set on "in" and "out" layouting rules for a given shape + * @param {Object} shape + * @param {Object} edgeShape (Optional) + * @return {Object} "in" and "out" with a default value of {"t":1, "r":1, "b":1, "r":1} if not specified in the json + */ + getLayoutingRules : function(shape, edgeShape){ + + if (!shape||!(shape instanceof ORYX.Core.Shape)){ return } + + var layout = {"in":{},"out":{}}; + + var parseValues = function(o, v){ + if (o && o[v]){ + ["t","r","b","l"].each(function(d){ + layout[v][d]=Math.max(o[v][d],layout[v][d]||0); + }); + } + if (o && o[v+"s"] instanceof Array){ + ["t","r","b","l"].each(function(d){ + var defaultRule = o[v+"s"].find(function(e){ return !e.edgeRole }); + var edgeRule; + if (edgeShape instanceof ORYX.Core.Edge) { + edgeRule = o[v + "s"].find(function(e){return this._hasRole(edgeShape, e.edgeRole) }.bind(this)); + } + layout[v][d]=Math.max(edgeRule?edgeRule[d]:defaultRule[d],layout[v][d]||0); + }.bind(this)); + } + }.bind(this) + + // For each role + shape.getStencil().roles().each(function(role) { + // check if there are layout information + if (this._layoutRules[role]){ + // if so, parse those information to the 'layout' variable + parseValues(this._layoutRules[role], "in"); + parseValues(this._layoutRules[role], "out"); + } + }.bind(this)); + + // Make sure, that every attribute has an value, + // otherwise set 1 + ["in","out"].each(function(v){ + ["t","r","b","l"].each(function(d){ + layout[v][d]=layout[v][d]!==undefined?layout[v][d]:1; + }); + }) + + return layout; + }, + + /** End layouting rules' methods */ + + /** Helper methods */ + + /** + * Checks wether a shape contains the given role or the role is equal the stencil id + * @param {ORYX.Core.Shape} shape + * @param {String} role + */ + _hasRole: function(shape, role){ + if (!(shape instanceof ORYX.Core.Shape)||!role){ return } + var isRole = shape.getStencil().roles().any(function(r){ return r == role}); + + return isRole || shape.getStencil().id() == (shape.getStencil().namespace()+role); + }, + + /** + * + * @param {String} + * role + * + * @return {Array} Returns an array of stencils that can act as role. + */ + _stencilsWithRole: function(role) { + return this._stencils.findAll(function(stencil) { + return (stencil.roles().member(role)) ? true : false; + }); + }, + + /** + * + * @param {String} + * role + * + * @return {Array} Returns an array of stencils that can act as role and + * have the type 'edge'. + */ + _edgesWithRole: function(role) { + return this._stencils.findAll(function(stencil) { + return (stencil.roles().member(role) && stencil.type() === "edge") ? true : false; + }); + }, + + /** + * + * @param {String} + * role + * + * @return {Array} Returns an array of stencils that can act as role and + * have the type 'node'. + */ + _nodesWithRole: function(role) { + return this._stencils.findAll(function(stencil) { + return (stencil.roles().member(role) && stencil.type() === "node") ? true : false; + }); + }, + + /** + * + * @param {ORYX.Core.StencilSet.Stencil} + * parent + * @param {ORYX.Core.StencilSet.Stencil} + * child + * + * @returns {Boolean} Returns the maximum occurrence of shapes of the + * stencil's type inside the parent. + */ + _getMaximumOccurrence: function(parent, child) { + var max; + child.roles().each((function(role) { + var cardRule = this._cardinalityRules[role]; + if(cardRule && cardRule.maximumOccurrence) { + if(max) { + max = Math.min(max, cardRule.maximumOccurrence); + } else { + max = cardRule.maximumOccurrence; + } + } + }).bind(this)); + + return max; + }, + + + /** + * + * @param {Object} + * args sourceStencil: ORYX.Core.Node edgeStencil: + * ORYX.Core.StencilSet.Stencil + * + * @return {Boolean} Returns, the maximum number of outgoing edges of the + * type specified by edgeStencil of the sourceShape. + */ + _getMaximumNumberOfOutgoingEdge: function(args) { + if(!args || + !args.sourceStencil || + !args.edgeStencil) { + return false; + } + + var max; + args.sourceStencil.roles().each((function(role) { + var cardRule = this._cardinalityRules[role]; + + if(cardRule && cardRule.outgoingEdges) { + args.edgeStencil.roles().each(function(edgeRole) { + var oe = cardRule.outgoingEdges[edgeRole]; + + if(oe && oe.maximum) { + if(max) { + max = Math.min(max, oe.maximum); + } else { + max = oe.maximum; + } + } + }); + } + }).bind(this)); + + return max; + }, + + /** + * + * @param {Object} + * args targetStencil: ORYX.Core.StencilSet.Stencil edgeStencil: + * ORYX.Core.StencilSet.Stencil + * + * @return {Boolean} Returns the maximum number of incoming edges of the + * type specified by edgeStencil of the targetShape. + */ + _getMaximumNumberOfIncomingEdge: function(args) { + if(!args || + !args.targetStencil || + !args.edgeStencil) { + return false; + } + + var max; + args.targetStencil.roles().each((function(role) { + var cardRule = this._cardinalityRules[role]; + if(cardRule && cardRule.incomingEdges) { + args.edgeStencil.roles().each(function(edgeRole) { + var ie = cardRule.incomingEdges[edgeRole]; + if(ie && ie.maximum) { + if(max) { + max = Math.min(max, ie.maximum); + } else { + max = ie.maximum; + } + } + }); + } + }).bind(this)); + + return max; + }, + + /** + * + * @param {ORYX.Core.StencilSet.Stencil} + * edgeStencil + * + * @return {Hash} Returns a hash map of all connection rules for + * edgeStencil. + */ + _getConnectionRulesOfEdgeStencil: function(edgeStencil) { + var edgeRules = new Hash(); + edgeStencil.roles().each((function(role) { + if(this._connectionRules[role]) { + this._connectionRules[role].each(function(cr) { + if(edgeRules[cr.key]) { + edgeRules[cr.key] = edgeRules[cr.key].concat(cr.value); + } else { + edgeRules[cr.key] = cr.value; + } + }); + } + }).bind(this)); + + return edgeRules; + }, + + _isRoleOfOtherNamespace: function(role) { + return (role.indexOf("#") > 0); + }, + + toString: function() { return "Rules"; } +} +ORYX.Core.StencilSet.Rules = Clazz.extend(ORYX.Core.StencilSet.Rules); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespace + */ +if (!ORYX) { + var ORYX = {}; +} +if (!ORYX.Core) { + ORYX.Core = {}; +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {}; +} + +/** + * This class represents a stencil set. It offers methods for accessing + * the attributes of the stencil set description JSON file and the stencil set's + * stencils. + */ +ORYX.Core.StencilSet.StencilSet = Clazz.extend({ + + /** + * Constructor + * @param source {URL} A reference to the stencil set specification. + * + */ + construct: function(source, modelMetaData, editorId){ + arguments.callee.$.construct.apply(this, arguments); + + if (!source) { + throw "ORYX.Core.StencilSet.StencilSet(construct): Parameter 'source' is not defined."; + } + + if (source.endsWith("/")) { + source = source.substr(0, source.length - 1); + } + + this._extensions = new Hash(); + + this._source = source; + this._baseUrl = source.substring(0, source.lastIndexOf("/") + 1); + + this._jsonObject = {}; + + this._stencils = new Hash(); + this._availableStencils = new Hash(); + + if(ORYX.CONFIG.BACKEND_SWITCH) { + this._baseUrl = "editor/stencilsets/bpmn2.0/"; + this._source = "stencilsets/bpmn2.0/bpmn2.0.json"; + + new Ajax.Request(ACTIVITI.CONFIG.contextRoot + '/editor/stencilset?version=' + Date.now(), { + asynchronous: false, + method: 'get', + onSuccess: this._init.bind(this), + onFailure: this._cancelInit.bind(this) + }); + + } else { + new Ajax.Request(source, { + asynchronous: false, + method: 'get', + onSuccess: this._init.bind(this), + onFailure: this._cancelInit.bind(this) + }); + } + + if (this.errornous) + throw "Loading stencil set " + source + " failed."; + }, + + /** + * Finds a root stencil in this stencil set. There may be many of these. If + * there are, the first one found will be used. In Firefox, this is the + * topmost definition in the stencil set description file. + */ + findRootStencilName: function(){ + + // find any stencil that may be root. + var rootStencil = this._stencils.values().find(function(stencil){ + return stencil._jsonStencil.mayBeRoot + }); + + // if there is none, just guess the first. + if (!rootStencil) { + ORYX.Log.warn("Did not find any stencil that may be root. Taking a guess."); + rootStencil = this._stencils.values()[0]; + } + + // return its id. + return rootStencil.id(); + }, + + /** + * @param {ORYX.Core.StencilSet.StencilSet} stencilSet + * @return {Boolean} True, if stencil set has the same namespace. + */ + equals: function(stencilSet){ + return (this.namespace() === stencilSet.namespace()); + }, + + /** + * + * @param {Oryx.Core.StencilSet.Stencil} rootStencil If rootStencil is defined, it only returns stencils + * that could be (in)direct child of that stencil. + */ + stencils: function(rootStencil, rules, sortByGroup){ + if(rootStencil && rules) { + var stencils = this._availableStencils.values(); + var containers = [rootStencil]; + var checkedContainers = []; + + var result = []; + + while (containers.size() > 0) { + var container = containers.pop(); + checkedContainers.push(container); + var children = stencils.findAll(function(stencil){ + var args = { + containingStencil: container, + containedStencil: stencil + }; + return rules.canContain(args); + }); + for(var i = 0; i < children.size(); i++) { + if (!checkedContainers.member(children[i])) { + containers.push(children[i]); + } + } + result = result.concat(children).uniq(); + } + + // Sort the result to the origin order + result = result.sortBy(function(stencil) { + return stencils.indexOf(stencil); + }); + + + if(sortByGroup) { + result = result.sortBy(function(stencil) { + return stencil.groups().first(); + }); + } + + var edges = stencils.findAll(function(stencil) { + return stencil.type() == "edge"; + }); + result = result.concat(edges); + + return result; + + } else { + if(sortByGroup) { + return this._availableStencils.values().sortBy(function(stencil) { + return stencil.groups().first(); + }); + } else { + return this._availableStencils.values(); + } + } + }, + + nodes: function(){ + return this._availableStencils.values().findAll(function(stencil){ + return (stencil.type() === 'node') + }); + }, + + edges: function(){ + return this._availableStencils.values().findAll(function(stencil){ + return (stencil.type() === 'edge') + }); + }, + + stencil: function(id){ + return this._stencils[id]; + }, + + title: function(){ + return ORYX.Core.StencilSet.getTranslation(this._jsonObject, "title"); + }, + + description: function(){ + return ORYX.Core.StencilSet.getTranslation(this._jsonObject, "description"); + }, + + namespace: function(){ + return this._jsonObject ? this._jsonObject.namespace : null; + }, + + jsonRules: function(){ + return this._jsonObject ? this._jsonObject.rules : null; + }, + + source: function(){ + return this._source; + }, + + extensions: function() { + return this._extensions; + }, + + addExtension: function(url) { + + new Ajax.Request(url, { + method: 'GET', + asynchronous: false, + onSuccess: (function(transport) { + this.addExtensionDirectly(transport.responseText); + }).bind(this), + onFailure: (function(transport) { + ORYX.Log.debug("Loading stencil set extension file failed. The request returned an error." + transport); + }).bind(this), + onException: (function(transport) { + ORYX.Log.debug("Loading stencil set extension file failed. The request returned an error." + transport); + }).bind(this) + + }); + }, + + addExtensionDirectly: function(str){ + + try { + eval("var jsonExtension = " + str); + + if(!(jsonExtension["extends"].endsWith("#"))) + jsonExtension["extends"] += "#"; + + if(jsonExtension["extends"] == this.namespace()) { + this._extensions[jsonExtension.namespace] = jsonExtension; + + var defaultPosition = this._stencils.keys().size(); + //load new stencils + if(jsonExtension.stencils) { + $A(jsonExtension.stencils).each(function(stencil) { + defaultPosition++; + var oStencil = new ORYX.Core.StencilSet.Stencil(stencil, this.namespace(), this._baseUrl, this, undefined, defaultPosition); + this._stencils[oStencil.id()] = oStencil; + this._availableStencils[oStencil.id()] = oStencil; + }.bind(this)); + } + + //load additional properties + if (jsonExtension.properties) { + var stencils = this._stencils.values(); + + stencils.each(function(stencil){ + var roles = stencil.roles(); + + jsonExtension.properties.each(function(prop){ + prop.roles.any(function(role){ + role = jsonExtension["extends"] + role; + if (roles.member(role)) { + prop.properties.each(function(property){ + stencil.addProperty(property, jsonExtension.namespace); + }); + + return true; + } + else + return false; + }) + }) + }.bind(this)); + } + + //remove stencil properties + if(jsonExtension.removeproperties) { + jsonExtension.removeproperties.each(function(remprop) { + var stencil = this.stencil(jsonExtension["extends"] + remprop.stencil); + if(stencil) { + remprop.properties.each(function(propId) { + stencil.removeProperty(propId); + }); + } + }.bind(this)); + } + + //remove stencils + if(jsonExtension.removestencils) { + $A(jsonExtension.removestencils).each(function(remstencil) { + delete this._availableStencils[jsonExtension["extends"] + remstencil]; + }.bind(this)); + } + } + } catch (e) { + ORYX.Log.debug("StencilSet.addExtension: Something went wrong when initialising the stencil set extension. " + e); + } + }, + + removeExtension: function(namespace) { + var jsonExtension = this._extensions[namespace]; + if(jsonExtension) { + + //unload extension's stencils + if(jsonExtension.stencils) { + $A(jsonExtension.stencils).each(function(stencil) { + var oStencil = new ORYX.Core.StencilSet.Stencil(stencil, this.namespace(), this._baseUrl, this); + delete this._stencils[oStencil.id()]; // maybe not ?? + delete this._availableStencils[oStencil.id()]; + }.bind(this)); + } + + //unload extension's properties + if (jsonExtension.properties) { + var stencils = this._stencils.values(); + + stencils.each(function(stencil){ + var roles = stencil.roles(); + + jsonExtension.properties.each(function(prop){ + prop.roles.any(function(role){ + role = jsonExtension["extends"] + role; + if (roles.member(role)) { + prop.properties.each(function(property){ + stencil.removeProperty(property.id); + }); + + return true; + } + else + return false; + }) + }) + }.bind(this)); + } + + //restore removed stencil properties + if(jsonExtension.removeproperties) { + jsonExtension.removeproperties.each(function(remprop) { + var stencil = this.stencil(jsonExtension["extends"] + remprop.stencil); + if(stencil) { + var stencilJson = $A(this._jsonObject.stencils).find(function(s) { return s.id == stencil.id() }); + remprop.properties.each(function(propId) { + var propertyJson = $A(stencilJson.properties).find(function(p) { return p.id == propId }); + stencil.addProperty(propertyJson, this.namespace()); + }.bind(this)); + } + }.bind(this)); + } + + //restore removed stencils + if(jsonExtension.removestencils) { + $A(jsonExtension.removestencils).each(function(remstencil) { + var sId = jsonExtension["extends"] + remstencil; + this._availableStencils[sId] = this._stencils[sId]; + }.bind(this)); + } + } + delete this._extensions[namespace]; + }, + + __handleStencilset: function(response){ + + try { + // using eval instead of prototype's parsing, + // since there are functions in this JSON. + eval("this._jsonObject =" + response.responseText); + } + catch (e) { + throw "Stenciset corrupt: " + e; + } + + // assert it was parsed. + if (!this._jsonObject) { + throw "Error evaluating stencilset. It may be corrupt."; + } + + with (this._jsonObject) { + + // assert there is a namespace. + if (!namespace || namespace === "") + throw "Namespace definition missing in stencilset."; + + if (!(stencils instanceof Array)) + throw "Stencilset corrupt."; + + // assert namespace ends with '#'. + if (!namespace.endsWith("#")) + namespace = namespace + "#"; + + // assert title and description are strings. + if (!title) + title = ""; + if (!description) + description = ""; + } + }, + + /** + * This method is called when the HTTP request to get the requested stencil + * set succeeds. The response is supposed to be a JSON representation + * according to the stencil set specification. + * @param {Object} response The JSON representation according to the + * stencil set specification. + */ + _init: function(response){ + + // init and check consistency. + this.__handleStencilset(response); + + var pps = new Hash(); + + // init property packages + if(this._jsonObject.propertyPackages) { + $A(this._jsonObject.propertyPackages).each((function(pp) { + pps[pp.name] = pp.properties; + }).bind(this)); + } + + var defaultPosition = 0; + + // init each stencil + $A(this._jsonObject.stencils).each((function(stencil){ + defaultPosition++; + + // instantiate normally. + var oStencil = new ORYX.Core.StencilSet.Stencil(stencil, this.namespace(), this._baseUrl, this, pps, defaultPosition); + this._stencils[oStencil.id()] = oStencil; + this._availableStencils[oStencil.id()] = oStencil; + + }).bind(this)); + }, + + _cancelInit: function(response){ + this.errornous = true; + }, + + toString: function(){ + return "StencilSet " + this.title() + " (" + this.namespace() + ")"; + } +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespace + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.StencilSet) {ORYX.Core.StencilSet = {};} + +/** + * Class StencilSets + * uses Prototpye 1.5.0 + * uses Inheritance + * + * Singleton + */ +//storage for loaded stencil sets by namespace +ORYX.Core.StencilSet._stencilSetsByNamespace = new Hash(); + +//storage for stencil sets by url +ORYX.Core.StencilSet._stencilSetsByUrl = new Hash(); + +//storage for stencil set namespaces by editor instances +ORYX.Core.StencilSet._StencilSetNSByEditorInstance = new Hash(); + +//storage for rules by editor instances +ORYX.Core.StencilSet._rulesByEditorInstance = new Hash(); + +/** + * + * @param {String} editorId + * + * @return {Hash} Returns a hash map with all stencil sets that are loaded by + * the editor with the editorId. + */ +ORYX.Core.StencilSet.stencilSets = function(editorId) { + var stencilSetNSs = ORYX.Core.StencilSet._StencilSetNSByEditorInstance[editorId]; + var stencilSets = new Hash(); + if(stencilSetNSs) { + stencilSetNSs.each(function(stencilSetNS) { + var stencilSet = ORYX.Core.StencilSet.stencilSet(stencilSetNS) + stencilSets[stencilSet.namespace()] = stencilSet; + }); + } + return stencilSets; +}; + +/** + * + * @param {String} namespace + * + * @return {ORYX.Core.StencilSet.StencilSet} Returns the stencil set with the specified + * namespace. + * + * The method can handle namespace strings like + * http://www.example.org/stencilset + * http://www.example.org/stencilset# + * http://www.example.org/stencilset#ANode + */ +ORYX.Core.StencilSet.stencilSet = function(namespace) { + ORYX.Log.trace("Getting stencil set %0", namespace); + var splitted = namespace.split("#", 1); + if(splitted.length === 1) { + ORYX.Log.trace("Getting stencil set %0", splitted[0]); + return ORYX.Core.StencilSet._stencilSetsByNamespace[splitted[0] + "#"]; + } else { + return undefined; + } +}; + +/** + * + * @param {String} id + * + * @return {ORYX.Core.StencilSet.Stencil} Returns the stencil specified by the id. + * + * The id must be unique and contains the namespace of the stencil's stencil set. + * e.g. http://www.example.org/stencilset#ANode + */ +ORYX.Core.StencilSet.stencil = function(id) { + ORYX.Log.trace("Getting stencil for %0", id); + var ss = ORYX.Core.StencilSet.stencilSet(id); + if(ss) { + return ss.stencil(id); + } else { + + ORYX.Log.trace("Cannot fild stencil for %0", id); + return undefined; + } +}; + +/** + * + * @param {String} editorId + * + * @return {ORYX.Core.StencilSet.Rules} Returns the rules object for the editor + * specified by its editor id. + */ +ORYX.Core.StencilSet.rules = function(editorId) { + if(!ORYX.Core.StencilSet._rulesByEditorInstance[editorId]) { + ORYX.Core.StencilSet._rulesByEditorInstance[editorId] = new ORYX.Core.StencilSet.Rules(); + } + return ORYX.Core.StencilSet._rulesByEditorInstance[editorId]; +}; + +/** + * + * @param {String} url + * @param {String} editorId + * + * Loads a stencil set from url, if it is not already loaded. + * It also stores which editor instance loads the stencil set and + * initializes the Rules object for the editor instance. + */ +ORYX.Core.StencilSet.loadStencilSet = function(url, modelMetaData, editorId) { + + // Alfresco: disable cache, because stencil sets are now flexible + + //var stencilSet = ORYX.Core.StencilSet._stencilSetsByUrl[url]; + + //if(!stencilSet) { + //load stencil set + stencilSet = new ORYX.Core.StencilSet.StencilSet(url, modelMetaData, editorId); + + //store stencil set + ORYX.Core.StencilSet._stencilSetsByNamespace[stencilSet.namespace()] = stencilSet; + + //store stencil set by url + ORYX.Core.StencilSet._stencilSetsByUrl[url] = stencilSet; + //} + + var namespace = stencilSet.namespace(); + + //store which editorInstance loads the stencil set + if(ORYX.Core.StencilSet._StencilSetNSByEditorInstance[editorId]) { + ORYX.Core.StencilSet._StencilSetNSByEditorInstance[editorId].push(namespace); + } else { + ORYX.Core.StencilSet._StencilSetNSByEditorInstance[editorId] = [namespace]; + } + + //store the rules for the editor instance + if(ORYX.Core.StencilSet._rulesByEditorInstance[editorId]) { + ORYX.Core.StencilSet._rulesByEditorInstance[editorId].initializeRules(stencilSet); + } else { + var rules = new ORYX.Core.StencilSet.Rules(); + rules.initializeRules(stencilSet); + ORYX.Core.StencilSet._rulesByEditorInstance[editorId] = rules; + } +}; + +/** + * Returns the translation of an attribute in jsonObject specified by its name + * according to navigator.language + */ +ORYX.Core.StencilSet.getTranslation = function(jsonObject, name) { + var lang = ORYX.I18N.Language.toLowerCase(); + + var result = jsonObject[name + "_" + lang]; + + if(result) + return result; + + result = jsonObject[name + "_" + lang.substr(0, 2)]; + + if(result) + return result; + + return jsonObject[name]; +}; +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} + + +/** + * @classDescription With Bounds you can set and get position and size of UIObjects. + */ +ORYX.Core.Command = Clazz.extend({ + + /** + * Constructor + */ + construct: function() { + + }, + + execute: function(){ + throw "Command.execute() has to be implemented!" + }, + + rollback: function(){ + throw "Command.rollback() has to be implemented!" + } + + + });/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} + + +/** + * @classDescription With Bounds you can set and get position and size of UIObjects. + */ +ORYX.Core.Bounds = { + + /** + * Constructor + */ + construct: function() { + this._changedCallbacks = []; //register a callback with changedCallacks.push(this.method.bind(this)); + this.a = {}; + this.b = {}; + this.set.apply(this, arguments); + this.suspendChange = false; + this.changedWhileSuspend = false; + }, + + /** + * Calls all registered callbacks. + */ + _changed: function(sizeChanged) { + if(!this.suspendChange) { + this._changedCallbacks.each(function(callback) { + callback(this, sizeChanged); + }.bind(this)); + this.changedWhileSuspend = false; + } else + this.changedWhileSuspend = true; + }, + + /** + * Registers a callback that is called, if the bounds changes. + * @param callback {Function} The callback function. + */ + registerCallback: function(callback) { + if(!this._changedCallbacks.member(callback)) { + this._changedCallbacks.push(callback); + } + }, + + /** + * Unregisters a callback. + * @param callback {Function} The callback function. + */ + unregisterCallback: function(callback) { + this._changedCallbacks = this._changedCallbacks.without(callback); + }, + + /** + * Sets position and size of the shape dependent of four coordinates + * (set(ax, ay, bx, by);), two points (set({x: ax, y: ay}, {x: bx, y: by});) + * or one bound (set({a: {x: ax, y: ay}, b: {x: bx, y: by}});). + */ + set: function() { + + var changed = false; + + switch (arguments.length) { + + case 1: + if(this.a.x !== arguments[0].a.x) { + changed = true; + this.a.x = arguments[0].a.x; + } + if(this.a.y !== arguments[0].a.y) { + changed = true; + this.a.y = arguments[0].a.y; + } + if(this.b.x !== arguments[0].b.x) { + changed = true; + this.b.x = arguments[0].b.x; + } + if(this.b.y !== arguments[0].b.y) { + changed = true; + this.b.y = arguments[0].b.y; + } + break; + + case 2: + var ax = Math.min(arguments[0].x, arguments[1].x); + var ay = Math.min(arguments[0].y, arguments[1].y); + var bx = Math.max(arguments[0].x, arguments[1].x); + var by = Math.max(arguments[0].y, arguments[1].y); + if(this.a.x !== ax) { + changed = true; + this.a.x = ax; + } + if(this.a.y !== ay) { + changed = true; + this.a.y = ay; + } + if(this.b.x !== bx) { + changed = true; + this.b.x = bx; + } + if(this.b.y !== by) { + changed = true; + this.b.y = by; + } + break; + + case 4: + var ax = Math.min(arguments[0], arguments[2]); + var ay = Math.min(arguments[1], arguments[3]); + var bx = Math.max(arguments[0], arguments[2]); + var by = Math.max(arguments[1], arguments[3]); + if(this.a.x !== ax) { + changed = true; + this.a.x = ax; + } + if(this.a.y !== ay) { + changed = true; + this.a.y = ay; + } + if(this.b.x !== bx) { + changed = true; + this.b.x = bx; + } + if(this.b.y !== by) { + changed = true; + this.b.y = by; + } + break; + } + + if(changed) { + this._changed(true); + } + }, + + /** + * Moves the bounds so that the point p will be the new upper left corner. + * @param {Point} p + * or + * @param {Number} x + * @param {Number} y + */ + moveTo: function() { + + var currentPosition = this.upperLeft(); + switch (arguments.length) { + case 1: + this.moveBy({ + x: arguments[0].x - currentPosition.x, + y: arguments[0].y - currentPosition.y + }); + break; + case 2: + this.moveBy({ + x: arguments[0] - currentPosition.x, + y: arguments[1] - currentPosition.y + }); + break; + default: + //TODO error + } + + }, + + /** + * Moves the bounds relatively by p. + * @param {Point} p + * or + * @param {Number} x + * @param {Number} y + * + */ + moveBy: function() { + var changed = false; + + switch (arguments.length) { + case 1: + var p = arguments[0]; + if(p.x !== 0 || p.y !== 0) { + changed = true; + this.a.x += p.x; + this.b.x += p.x; + this.a.y += p.y; + this.b.y += p.y; + } + break; + case 2: + var x = arguments[0]; + var y = arguments[1]; + if(x !== 0 || y !== 0) { + changed = true; + this.a.x += x; + this.b.x += x; + this.a.y += y; + this.b.y += y; + } + break; + default: + //TODO error + } + + if(changed) { + this._changed(); + } + }, + + /*** + * Includes the bounds b into the current bounds. + * @param {Bounds} b + */ + include: function(b) { + + if( (this.a.x === undefined) && (this.a.y === undefined) && + (this.b.x === undefined) && (this.b.y === undefined)) { + return b; + }; + + var cx = Math.min(this.a.x,b.a.x); + var cy = Math.min(this.a.y,b.a.y); + + var dx = Math.max(this.b.x,b.b.x); + var dy = Math.max(this.b.y,b.b.y); + + + this.set(cx, cy, dx, dy); + }, + + /** + * Relatively extends the bounds by p. + * @param {Point} p + */ + extend: function(p) { + + if(p.x !== 0 || p.y !== 0) { + // this is over cross for the case that a and b have same coordinates. + //((this.a.x > this.b.x) ? this.a : this.b).x += p.x; + //((this.b.y > this.a.y) ? this.b : this.a).y += p.y; + this.b.x += p.x; + this.b.y += p.y; + + this._changed(true); + } + }, + + /** + * Widens the scope of the bounds by x. + * @param {Number} x + */ + widen: function(x) { + if (x !== 0) { + this.suspendChange = true; + this.moveBy({x: -x, y: -x}); + this.extend({x: 2*x, y: 2*x}); + this.suspendChange = false; + if(this.changedWhileSuspend) { + this._changed(true); + } + } + }, + + /** + * Returns the upper left corner's point regardless of the + * bound delimiter points. + */ + upperLeft: function() { + var result = {}; + result.x = this.a.x; + result.y = this.a.y; + return result; + }, + + /** + * Returns the lower Right left corner's point regardless of the + * bound delimiter points. + */ + lowerRight: function() { + var result = {}; + result.x = this.b.x; + result.y = this.b.y; + return result; + }, + + /** + * @return {Number} Width of bounds. + */ + width: function() { + return this.b.x - this.a.x; + }, + + /** + * @return {Number} Height of bounds. + */ + height: function() { + return this.b.y - this.a.y; + }, + + /** + * @return {Point} The center point of this bounds. + */ + center: function() { + var center = {}; + center.x =(this.a.x + this.b.x)/2.0; + center.y =(this.a.y + this.b.y)/2.0; + return center; + }, + + + /** + * @return {Point} The center point of this bounds relative to upperLeft. + */ + midPoint: function() { + + var midpoint = {}; + midpoint.x = (this.b.x - this.a.x)/2.0; + midpoint.y = (this.b.y - this.a.y)/2.0; + return midpoint; + }, + + /** + * Moves the center point of this bounds to the new position. + * @param p {Point} + * or + * @param x {Number} + * @param y {Number} + */ + centerMoveTo: function() { + var currentPosition = this.center(); + + switch (arguments.length) { + + case 1: + this.moveBy(arguments[0].x - currentPosition.x, + arguments[0].y - currentPosition.y); + break; + + case 2: + this.moveBy(arguments[0] - currentPosition.x, + arguments[1] - currentPosition.y); + break; + } + }, + + isIncluded: function(point, offset) { + + var pointX, pointY, offset; + + // Get the the two Points + switch(arguments.length) { + case 1: + pointX = arguments[0].x; + pointY = arguments[0].y; + offset = 0; + + break; + case 2: + if(arguments[0].x && arguments[0].y) { + pointX = arguments[0].x; + pointY = arguments[0].y; + offset = Math.abs(arguments[1]); + } else { + pointX = arguments[0]; + pointY = arguments[1]; + offset = 0; + } + break; + case 3: + pointX = arguments[0]; + pointY = arguments[1]; + offset = Math.abs(arguments[2]); + break; + default: + throw "isIncluded needs one, two or three arguments"; + } + + var ul = this.upperLeft(); + var lr = this.lowerRight(); + + if(pointX >= ul.x - offset + && pointX <= lr.x + offset && pointY >= ul.y - offset + && pointY <= lr.y + offset) + return true; + else + return false; + }, + + /** + * @return {Bounds} A copy of this bounds. + */ + clone: function() { + + //Returns a new bounds object without the callback + // references of the original bounds + return new ORYX.Core.Bounds(this); + }, + + toString: function() { + + return "( "+this.a.x+" | "+this.a.y+" )/( "+this.b.x+" | "+this.b.y+" )"; + }, + + serializeForERDF: function() { + + return this.a.x+","+this.a.y+","+this.b.x+","+this.b.y; + } + }; + +ORYX.Core.Bounds = Clazz.extend(ORYX.Core.Bounds);/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} + + +/** + * @classDescription Abstract base class for all objects that have a graphical representation + * within the editor. + * @extends Clazz + */ +ORYX.Core.UIObject = { + /** + * Constructor of the UIObject class. + */ + construct: function(options) { + + this.isChanged = true; //Flag, if UIObject has been changed since last update. + this.isResized = true; + this.isVisible = true; //Flag, if UIObject's display attribute is set to 'inherit' or 'none' + this.isSelectable = false; //Flag, if UIObject is selectable. + this.isResizable = false; //Flag, if UIObject is resizable. + this.isMovable = false; //Flag, if UIObject is movable. + + this.id = ORYX.Editor.provideId(); //get unique id + this.parent = undefined; //parent is defined, if this object is added to another uiObject. + this.node = undefined; //this is a reference to the SVG representation, either locally or in DOM. + this.children = []; //array for all add uiObjects + + this.bounds = new ORYX.Core.Bounds(); //bounds with undefined values + + this._changedCallback = this._changed.bind(this); //callback reference for calling _changed + this.bounds.registerCallback(this._changedCallback); //set callback in bounds + + if(options && options.eventHandlerCallback) { + this.eventHandlerCallback = options.eventHandlerCallback; + } + }, + + /** + * Sets isChanged flag to true. Callback for the bounds object. + */ + _changed: function(bounds, isResized) { + this.isChanged = true; + if(this.bounds == bounds) + this.isResized = isResized || this.isResized; + }, + + /** + * If something changed, this method calls the refresh method that must be implemented by subclasses. + */ + update: function() { + if(this.isChanged) { + this.refresh(); + this.isChanged = false; + + //call update of all children + this.children.each(function(value) { + value.update(); + }); + } + }, + + /** + * Is called in update method, if isChanged is set to true. Sub classes should call the super class method. + */ + refresh: function() { + + }, + + /** + * @return {Array} Array of all child UIObjects. + */ + getChildren: function() { + return this.children.clone(); + }, + + /** + * @return {Array} Array of all parent UIObjects. + */ + getParents: function(){ + var parents = []; + var parent = this.parent; + while(parent){ + parents.push(parent); + parent = parent.parent; + } + return parents; + }, + + /** + * Returns TRUE if the given parent is one of the UIObjects parents or the UIObject themselves, otherwise FALSE. + * @param {UIObject} parent + * @return {Boolean} + */ + isParent: function(parent){ + var cparent = this; + while(cparent){ + if (cparent === parent){ + return true; + } + cparent = cparent.parent; + } + return false; + }, + + /** + * @return {String} Id of this UIObject + */ + getId: function() { + return this.id; + }, + + /** + * Method for accessing child uiObjects by id. + * @param {String} id + * @param {Boolean} deep + * + * @return {UIObject} If found, it returns the UIObject with id. + */ + getChildById: function(id, deep) { + return this.children.find(function(uiObj) { + if(uiObj.getId() === id) { + return uiObj; + } else { + if(deep) { + var obj = uiObj.getChildById(id, deep); + if(obj) { + return obj; + } + } + } + }); + }, + + /** + * Adds an UIObject to this UIObject and sets the parent of the + * added UIObject. It is also added to the SVG representation of this + * UIObject. + * @param {UIObject} uiObject + */ + add: function(uiObject) { + //add uiObject, if it is not already a child of this object + if (!(this.children.member(uiObject))) { + //if uiObject is child of another parent, remove it from that parent. + if(uiObject.parent) { + uiObject.remove(uiObject); + } + + //add uiObject to children + this.children.push(uiObject); + + //set parent reference + uiObject.parent = this; + + //add uiObject.node to this.node + uiObject.node = this.node.appendChild(uiObject.node); + + //register callback to get informed, if child is changed + uiObject.bounds.registerCallback(this._changedCallback); + + //uiObject.update(); + } else { + ORYX.Log.info("add: ORYX.Core.UIObject is already a child of this object."); + } + }, + + /** + * Removes UIObject from this UIObject. The SVG representation will also + * be removed from this UIObject's SVG representation. + * @param {UIObject} uiObject + */ + remove: function(uiObject) { + //if uiObject is a child of this object, remove it. + if (this.children.member(uiObject)) { + //remove uiObject from children + this.children = this._uiObjects.without(uiObject); + + //delete parent reference of uiObject + uiObject.parent = undefined; + + //delete uiObject.node from this.node + uiObject.node = this.node.removeChild(uiObject.node); + + //unregister callback to get informed, if child is changed + uiObject.bounds.unregisterCallback(this._changedCallback); + } else { + ORYX.Log.info("remove: ORYX.Core.UIObject is not a child of this object."); + } + + }, + + /** + * Calculates absolute bounds of this UIObject. + */ + absoluteBounds: function() { + if(this.parent) { + var absUL = this.absoluteXY(); + return new ORYX.Core.Bounds(absUL.x, absUL.y, + absUL.x + this.bounds.width(), + absUL.y + this.bounds.height()); + } else { + return this.bounds.clone(); + } + }, + + /** + * @return {Point} The absolute position of this UIObject. + */ + absoluteXY: function() { + if(this.parent) { + var pXY = this.parent.absoluteXY(); + var result = {}; + result.x = pXY.x + this.bounds.upperLeft().x; + result.y = pXY.y + this.bounds.upperLeft().y; + return result; + } else { + var result = {}; + result.x = this.bounds.upperLeft().x; + result.y = this.bounds.upperLeft().y; + return result; + } + }, + + /** + * @return {Point} The absolute position from the Center of this UIObject. + */ + absoluteCenterXY: function() { + if(this.parent) { + var pXY = this.parent.absoluteXY(); + var result = {}; + result.x = pXY.x + this.bounds.center().x; + result.y = pXY.y + this.bounds.center().y; + return result; + + } else { + var result = {}; + result.x = this.bounds.center().x; + result.y = this.bounds.center().y; + return result; + } + }, + + /** + * Hides this UIObject and all its children. + */ + hide: function() { + this.node.setAttributeNS(null, 'display', 'none'); + this.isVisible = false; + this.children.each(function(uiObj) { + uiObj.hide(); + }); + }, + + /** + * Enables visibility of this UIObject and all its children. + */ + show: function() { + this.node.setAttributeNS(null, 'display', 'inherit'); + this.isVisible = true; + this.children.each(function(uiObj) { + uiObj.show(); + }); + }, + + addEventHandlers: function(node) { + + node.addEventListener(ORYX.CONFIG.EVENT_MOUSEDOWN, this._delegateEvent.bind(this), false); + node.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this._delegateEvent.bind(this), false); + node.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this._delegateEvent.bind(this), false); + node.addEventListener(ORYX.CONFIG.EVENT_MOUSEOVER, this._delegateEvent.bind(this), false); + node.addEventListener(ORYX.CONFIG.EVENT_MOUSEOUT, this._delegateEvent.bind(this), false); + node.addEventListener('click', this._delegateEvent.bind(this), false); + node.addEventListener(ORYX.CONFIG.EVENT_DBLCLICK, this._delegateEvent.bind(this), false); + + }, + + _delegateEvent: function(event) { + if(this.eventHandlerCallback) { + this.eventHandlerCallback(event, this); + } + }, + + toString: function() { return "UIObject " + this.id } + }; + ORYX.Core.UIObject = Clazz.extend(ORYX.Core.UIObject);/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} + +/** + * Top Level uiobject. + * @class ORYX.Core.AbstractShape + * @extends ORYX.Core.UIObject + */ +ORYX.Core.AbstractShape = ORYX.Core.UIObject.extend( +/** @lends ORYX.Core.AbstractShape.prototype */ +{ + + /** + * Constructor + */ + construct: function(options, stencil, facade) { + + arguments.callee.$.construct.apply(this, arguments); + + this.resourceId = ORYX.Editor.provideId(); //Id of resource in DOM + + // stencil reference + this._stencil = stencil; + // if the stencil defines a super stencil that should be used for its instances, set it. + if (this._stencil._jsonStencil.superId){ + stencilId = this._stencil.id() + superStencilId = stencilId.substring(0, stencilId.indexOf("#") + 1) + stencil._jsonStencil.superId; + stencilSet = this._stencil.stencilSet(); + this._stencil = stencilSet.stencil(superStencilId); + } + + //Hash map for all properties. Only stores the values of the properties. + this.properties = new Hash(); + this.propertiesChanged = new Hash(); + + // List of properties which are not included in the stencilset, + // but which gets (de)serialized + this.hiddenProperties = new Hash(); + + + //Initialization of property map and initial value. + this._stencil.properties().each((function(property) { + var key = property.prefix() + "-" + property.id(); + this.properties[key] = property.value(); + this.propertiesChanged[key] = true; + }).bind(this)); + + // if super stencil was defined, also regard stencil's properties: + if (stencil._jsonStencil.superId) { + stencil.properties().each((function(property) { + var key = property.prefix() + "-" + property.id(); + var value = property.value(); + var oldValue = this.properties[key]; + this.properties[key] = value; + this.propertiesChanged[key] = true; + + // Raise an event, to show that the property has changed + // required for plugins like processLink.js + //window.setTimeout( function(){ + + this._delegateEvent({ + type : ORYX.CONFIG.EVENT_PROPERTY_CHANGED, + name : key, + value : value, + oldValue: oldValue + }); + + //}.bind(this), 10) + + }).bind(this)); + } + + }, + + layout: function() { + + }, + + /** + * Returns the stencil object specifiing the type of the shape. + */ + getStencil: function() { + return this._stencil; + }, + + /** + * + * @param {Object} resourceId + */ + getChildShapeByResourceId: function(resourceId) { + + resourceId = ERDF.__stripHashes(resourceId); + + return this.getChildShapes(true).find(function(shape) { + return shape.resourceId == resourceId + }); + }, + /** + * + * @param {Object} deep + * @param {Object} iterator + */ + getChildShapes: function(deep, iterator) { + var result = []; + + this.children.each(function(uiObject) { + if(uiObject instanceof ORYX.Core.Shape && uiObject.isVisible ) { + if(iterator) { + iterator(uiObject); + } + result.push(uiObject); + if(deep) { + result = result.concat(uiObject.getChildShapes(deep, iterator)); + } + } + }); + + return result; + }, + + /** + * @param {Object} shape + * @return {boolean} true if any of shape's childs is given shape + */ + hasChildShape: function(shape){ + return this.getChildShapes().any(function(child){ + return (child === shape) || child.hasChildShape(shape); + }); + }, + + /** + * + * @param {Object} deep + * @param {Object} iterator + */ + getChildNodes: function(deep, iterator) { + var result = []; + + this.children.each(function(uiObject) { + if(uiObject instanceof ORYX.Core.Node && uiObject.isVisible) { + if(iterator) { + iterator(uiObject); + } + result.push(uiObject); + } + if(uiObject instanceof ORYX.Core.Shape) { + if(deep) { + result = result.concat(uiObject.getChildNodes(deep, iterator)); + } + } + }); + + return result; + }, + + /** + * + * @param {Object} deep + * @param {Object} iterator + */ + getChildEdges: function(deep, iterator) { + var result = []; + + this.children.each(function(uiObject) { + if(uiObject instanceof ORYX.Core.Edge && uiObject.isVisible) { + if(iterator) { + iterator(uiObject); + } + result.push(uiObject); + } + if(uiObject instanceof ORYX.Core.Shape) { + if(deep) { + result = result.concat(uiObject.getChildEdges(deep, iterator)); + } + } + }); + + return result; + }, + + /** + * Returns a sorted array of ORYX.Core.Node objects. + * Ordered in z Order, the last object has the highest z Order. + */ + //TODO deep iterator + getAbstractShapesAtPosition: function() { + var x, y; + switch (arguments.length) { + case 1: + x = arguments[0].x; + y = arguments[0].y; + break; + case 2: //two or more arguments + x = arguments[0]; + y = arguments[1]; + break; + default: + throw "getAbstractShapesAtPosition needs 1 or 2 arguments!" + } + + if(this.isPointIncluded(x, y)) { + + var result = []; + result.push(this); + + //check, if one child is at that position + + + var childNodes = this.getChildNodes(); + var childEdges = this.getChildEdges(); + + [childNodes, childEdges].each(function(ne){ + var nodesAtPosition = new Hash(); + + ne.each(function(node) { + if(!node.isVisible){ return } + var candidates = node.getAbstractShapesAtPosition( x , y ); + if(candidates.length > 0) { + var nodesInZOrder = $A(node.node.parentNode.childNodes); + var zOrderIndex = nodesInZOrder.indexOf(node.node); + nodesAtPosition[zOrderIndex] = candidates; + } + }); + + nodesAtPosition.keys().sort().each(function(key) { + result = result.concat(nodesAtPosition[key]); + }); + }); + + return result; + + } else { + return []; + } + }, + + /** + * + * @param key {String} Must be 'prefix-id' of property + * @param value {Object} Can be of type String or Number according to property type. + */ + setProperty: function(key, value, force) { + var oldValue = this.properties[key]; + if(oldValue !== value || force === true) { + this.properties[key] = value; + this.propertiesChanged[key] = true; + this._changed(); + + // Raise an event, to show that the property has changed + //window.setTimeout( function(){ + + if (!this._isInSetProperty) { + this._isInSetProperty = true; + + this._delegateEvent({ + type : ORYX.CONFIG.EVENT_PROPERTY_CHANGED, + elements : [this], + name : key, + value : value, + oldValue: oldValue + }); + + delete this._isInSetProperty; + } + //}.bind(this), 10) + } + }, + + /** + * Returns TRUE if one of the properties is flagged as dirty + * @return {boolean} + */ + isPropertyChanged: function(){ + return this.propertiesChanged.any(function(property){ return property.value }); + }, + + /** + * + * @param {String} Must be 'prefix-id' of property + * @param {Object} Can be of type String or Number according to property type. + */ + setHiddenProperty: function(key, value) { + // IF undefined, Delete + if (value === undefined) { + delete this.hiddenProperties[key]; + return; + } + var oldValue = this.hiddenProperties[key]; + if (oldValue !== value) { + this.hiddenProperties[key] = value; + } + }, + /** + * Calculate if the point is inside the Shape + * @param {Point} + */ + isPointIncluded: function(pointX, pointY, absoluteBounds) { + var absBounds = absoluteBounds ? absoluteBounds : this.absoluteBounds(); + return absBounds.isIncluded(pointX, pointY); + + }, + + /** + * Get the serialized object + * return Array with hash-entrees (prefix, name, value) + * Following values will given: + * Type + * Properties + */ + serialize: function() { + var serializedObject = []; + + // Add the type + serializedObject.push({name: 'type', prefix:'oryx', value: this.getStencil().id(), type: 'literal'}); + + // Add hidden properties + this.hiddenProperties.each(function(prop){ + serializedObject.push({name: prop.key.replace("oryx-", ""), prefix: "oryx", value: prop.value, type: 'literal'}); + }.bind(this)); + + // Add all properties + this.getStencil().properties().each((function(property){ + + var prefix = property.prefix(); // Get prefix + var name = property.id(); // Get name + + //if(typeof this.properties[prefix+'-'+name] == 'boolean' || this.properties[prefix+'-'+name] != "") + serializedObject.push({name: name, prefix: prefix, value: this.properties[prefix+'-'+name], type: 'literal'}); + + }).bind(this)); + + return serializedObject; + }, + + + deserialize: function(serialize){ + // Search in Serialize + var initializedDocker = 0; + + // Sort properties so that the hidden properties are first in the list + serialize = serialize.sort(function(a,b){ a = Number(this.properties.keys().member(a.prefix+"-"+a.name)); b = Number(this.properties.keys().member(b.prefix+"-"+b.name)); return a > b ? 1 : (a < b ? -1 : 0) }.bind(this)); + + serialize.each((function(obj){ + + var name = obj.name; + var prefix = obj.prefix; + var value = obj.value; + + // Complex properties can be real json objects, encode them to a string + if (Object.prototype.toString.call(value) === "Object") value = JSON.stringify(value); + + switch(prefix + "-" + name){ + case 'raziel-parent': + // Set parent + if(!this.parent) {break}; + + // Set outgoing Shape + var parent = this.getCanvas().getChildShapeByResourceId(value); + if(parent) { + parent.add(this); + } + + break; + default: + // If list, eval as an array + var prop = this.getStencil().property(prefix+"-"+name); + if (prop && prop.isList() && typeof value === "string"){ + if ((value||"").strip()&&!value.startsWith("[")&&!value.startsWith("]")) + value = "[\""+value.strip()+"\"]"; + value = ((value||"").strip()||"[]").evalJSON(); + } + + // Set property + if(this.properties.keys().member(prefix+"-"+name)) { + this.setProperty(prefix+"-"+name, value); + } else if(!(name === "bounds"||name === "parent"||name === "target"||name === "dockers"||name === "docker"||name === "outgoing"||name === "incoming")) { + this.setHiddenProperty(prefix+"-"+name, value); + } + + } + }).bind(this)); + }, + + toString: function() { return "ORYX.Core.AbstractShape " + this.id }, + + /** + * Converts the shape to a JSON representation. + * @return {Object} A JSON object with included ORYX.Core.AbstractShape.JSONHelper and getShape() method. + */ + toJSON: function(){ + var json = { + resourceId: this.resourceId, + properties: jQuery.extend({}, this.properties, this.hiddenProperties).inject({}, function(props, prop){ + var key = prop[0]; + var value = prop[1]; + + //If complex property, value should be a json object + if ( this.getStencil().property(key) + && this.getStencil().property(key).type() === ORYX.CONFIG.TYPE_COMPLEX + && Object.prototype.toString.call(value) === "String"){ + + try {value = JSON.parse(value);} catch(error){var abcdef=1} + //try {value = JSON.parse(value);} catch(error){} + + // Parse date + } else if (value instanceof Date&&this.getStencil().property(key)){ + try { + value = value.format(this.getStencil().property(key).dateFormat()); + } catch(e){var abcdef=1} + } + + //Takes "my_property" instead of "oryx-my_property" as key + key = key.replace(/^[\w_]+-/, ""); + props[key] = value; + + return props; + }.bind(this)), + stencil: { + id: this.getStencil().idWithoutNs() + }, + childShapes: this.getChildShapes().map(function(shape){ + return shape.toJSON(); + }) + }; + + if(this.getOutgoingShapes){ + json.outgoing = this.getOutgoingShapes().map(function(shape){ + return { + resourceId: shape.resourceId + }; + }); + } + + if(this.bounds){ + json.bounds = { + lowerRight: this.bounds.lowerRight(), + upperLeft: this.bounds.upperLeft() + }; + } + + if(this.dockers){ + json.dockers = this.dockers.map(function(docker){ + var d = docker.getDockedShape() && docker.referencePoint ? docker.referencePoint : docker.bounds.center(); + d.getDocker = function(){return docker;}; + return d; + }); + } + + jQuery.extend(json, ORYX.Core.AbstractShape.JSONHelper); + + // do not pollute the json attributes (for serialization), so put the corresponding + // shape is encapsulated in a method + json.getShape = function(){ + return this; + }.bind(this); + + return json; + } + }); + +/** + * @namespace Collection of methods which can be used on a shape json object (ORYX.Core.AbstractShape#toJSON()). + * @example + * jQuery.extend(shapeAsJson, ORYX.Core.AbstractShape.JSONHelper); + */ +ORYX.Core.AbstractShape.JSONHelper = { + /** + * Iterates over each child shape. + * @param {Object} iterator Iterator function getting a child shape and his parent as arguments. + * @param {boolean} [deep=false] Iterate recursively (childShapes of childShapes) + * @param {boolean} [modify=false] If true, the result of the iterator function is taken as new shape, return false to delete it. This enables modifying the object while iterating through the child shapes. + * @example + * // Increases the lowerRight x value of each direct child shape by one. + * myShapeAsJson.eachChild(function(shape, parentShape){ + * shape.bounds.lowerRight.x = shape.bounds.lowerRight.x + 1; + * return shape; + * }, false, true); + */ + eachChild: function(iterator, deep, modify){ + if(!this.childShapes) return; + + var newChildShapes = []; //needed if modify = true + + this.childShapes.each(function(shape){ + if (!(shape.eachChild instanceof Function)){ + jQuery.extend(shape, ORYX.Core.AbstractShape.JSONHelper); + } + var res = iterator(shape, this); + if(res) newChildShapes.push(res); //if false is returned, and modify = true, current shape is deleted. + + if(deep) shape.eachChild(iterator, deep, modify); + }.bind(this)); + + if(modify) this.childShapes = newChildShapes; + }, + + getShape: function(){ + return null; + }, + getChildShapes: function(deep){ + var allShapes = this.childShapes; + + if(deep){ + this.eachChild(function(shape){ + if (!(shape.getChildShapes instanceof Function)){ + jQuery.extend(shape, ORYX.Core.AbstractShape.JSONHelper); + } + allShapes = allShapes.concat(shape.getChildShapes(deep)); + }, true); + } + + return allShapes; + }, + + /** + * @return {String} Serialized JSON object + */ + serialize: function(){ + return JSON.stringify(this); + } + } +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} + +/** + @namespace Namespace for the Oryx core elements. + @name ORYX.Core +*/ +if(!ORYX.Core) {ORYX.Core = {};} + +/** + * @class Oryx canvas. + * @extends ORYX.Core.AbstractShape + * + */ +ORYX.Core.Canvas = ORYX.Core.AbstractShape.extend({ + /** @lends ORYX.Core.Canvas.prototype */ + + /** + * Defines the current zoom level + */ + zoomLevel:1, + + /** + * Constructor + */ + construct: function(options, stencil, facade) { + arguments.callee.$.construct.apply(this, arguments); + + if(!(options && options.width && options.height)) { + + ORYX.Log.fatal("Canvas is missing mandatory parameters options.width and options.height."); + return; + } + this.facade = facade; + //TODO: set document resource id + this.resourceId = options.id; + + this.nodes = []; + + this.edges = []; + + // Row highlighting states + this.colHighlightState = 0; + + this.colHighlightEnabled = false; + + //init svg document + this.rootNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", options.parentNode, + ['svg', {id: this.id, width: options.width, height: options.height}, + ['defs', {}] + ]); + + this.rootNode.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); + this.rootNode.setAttribute("xmlns:svg", "http://www.w3.org/2000/svg"); + + this._htmlContainer = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", options.parentNode, + ['div', {id: "oryx_canvas_htmlContainer", style:"position:absolute; top:5px"}]); + + // Additional SVG-node BELOW the stencils to allow underlays (if that is even a word) by plugins + this.underlayNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.rootNode, + ['svg', {id: "underlay-container"}]); + + // Create 2 svg-elements in the svg-container + this.columnHightlight1 = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.underlayNode, + ['rect', {x: 0, width: ORYX.CONFIG.FORM_ROW_WIDTH + 35, height: "100%", style: "fill: #fff6d5", visibility: "hidden"}]); + + this.columnHightlight2 = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.underlayNode, + ['rect', {x: ORYX.CONFIG.FORM_ROW_WIDTH + 35, width: ORYX.CONFIG.FORM_ROW_WIDTH + 25, height: "100%", style: "fill: #fff6d5", visibility: "hidden"}]); + + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.rootNode, + ['g', {}, + ['g', {"class": "stencils"}, + ['g', {"class": "me"}], + ['g', {"class": "children"}], + ['g', {"class": "edge"}] + ], + ['g', {"class":"svgcontainer"}] + ]); + + /* + var off = 2 * ORYX.CONFIG.GRID_DISTANCE; + var size = 3; + var d = ""; + for(var i = 0; i <= options.width; i += off) + for(var j = 0; j <= options.height; j += off) + d = d + "M" + (i - size) + " " + j + " l" + (2*size) + " 0 m" + (-size) + " " + (-size) + " l0 " + (2*size) + " m0" + (-size) + " "; + + ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node.firstChild.firstChild, + ['path', {d:d , stroke:'#000000', 'stroke-width':'0.15px'},]); + */ + + //Global definition of default font for shapes + //Definitions in the SVG definition of a stencil will overwrite these settings for + // that stencil. + /*if(navigator.platform.indexOf("Mac") > -1) { + this.node.setAttributeNS(null, 'stroke', 'black'); + this.node.setAttributeNS(null, 'stroke-width', '0.5px'); + this.node.setAttributeNS(null, 'font-family', 'Skia'); + //this.node.setAttributeNS(null, 'letter-spacing', '2px'); + this.node.setAttributeNS(null, 'font-size', ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT); + } else { + this.node.setAttributeNS(null, 'stroke', 'none'); + this.node.setAttributeNS(null, 'font-family', 'Verdana'); + this.node.setAttributeNS(null, 'font-size', ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT); + }*/ + + this.node.setAttributeNS(null, 'stroke', 'none'); + this.node.setAttributeNS(null, 'font-family', 'Verdana, sans-serif'); + this.node.setAttributeNS(null, 'font-size-adjust', 'none'); + this.node.setAttributeNS(null, 'font-style', 'normal'); + this.node.setAttributeNS(null, 'font-variant', 'normal'); + this.node.setAttributeNS(null, 'font-weight', 'normal'); + this.node.setAttributeNS(null, 'line-heigth', 'normal'); + + this.node.setAttributeNS(null, 'font-size', ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT); + + this.bounds.set(0,0,options.width, options.height); + + this.addEventHandlers(this.rootNode.parentNode); + + //disable context menu + this.rootNode.oncontextmenu = function() {return false;}; + }, + + focus: function(){ + + try { + // Get a href + if (!this.focusEl) + { + this.focusEl = jQuery('body').append(jQuery('<a href="#" class="x-grid3-focus x-grid3-focus-canvas"/>')); + this.focusEl.swallowEvent("click", true); + } + + // Focus it + this.focusEl.focus.defer(1, this.focusEl); + this.focusEl.blur.defer(3, this.focusEl); + + } catch(e){} + }, + + setHightlightState: function(state) { + if(this.colHighlightEnabled && this.colHighlightState != state) { + if(state == 0) { + this.columnHightlight1.setAttribute("visibility", "hidden"); + this.columnHightlight2.setAttribute("visibility", "hidden"); + } else if(state == 1) { + this.columnHightlight1.setAttribute("visibility", "visible"); + this.columnHightlight2.setAttribute("visibility", "hidden"); + } else if(state == 2) { + this.columnHightlight1.setAttribute("visibility", "hidden"); + this.columnHightlight2.setAttribute("visibility", "visible"); + } else if(state == 3) { + this.columnHightlight1.setAttribute("visibility", "visible"); + this.columnHightlight2.setAttribute("visibility", "visible"); + } + this.colHighlightState = state; + } + }, + + setHightlightStateBasedOnX : function(x) { + if(x > ORYX.CONFIG.FORM_ROW_WIDTH + 30) { + this.setHightlightState(2); + } else { + this.setHightlightState(1); + } + }, + + update: function() { + + this.nodes.each(function(node) { + this._traverseForUpdate(node); + }.bind(this)); + + // call stencil's layout callback + // (needed for row layouting of xforms) + //this.getStencil().layout(this); + + var layoutEvents = this.getStencil().layout(); + + if(layoutEvents) { + layoutEvents.each(function(event) { + + // setup additional attributes + event.shape = this; + event.forceExecution = true; + event.target = this.rootNode; + + // do layouting + + this._delegateEvent(event); + }.bind(this)) + } + + this.nodes.invoke("_update"); + + this.edges.invoke("_update", true); + + /*this.children.each(function(child) { + child._update(); + });*/ + }, + + _traverseForUpdate: function(shape) { + var childRet = shape.isChanged; + shape.getChildNodes(false, function(child) { + if(this._traverseForUpdate(child)) { + childRet = true; + } + }.bind(this)); + + if(childRet) { + shape.layout(); + return true; + } else { + return false; + } + }, + + layout: function() { + + + + }, + + /** + * + * @param {Object} deep + * @param {Object} iterator + */ + getChildNodes: function(deep, iterator) { + if(!deep && !iterator) { + return this.nodes.clone(); + } else { + var result = []; + this.nodes.each(function(uiObject) { + if(iterator) { + iterator(uiObject); + } + result.push(uiObject); + + if(deep && uiObject instanceof ORYX.Core.Shape) { + result = result.concat(uiObject.getChildNodes(deep, iterator)); + } + }); + + return result; + } + }, + + /** + * buggy crap! use base class impl instead! + * @param {Object} iterator + */ +/* getChildEdges: function(iterator) { + if(iterator) { + this.edges.each(function(edge) { + iterator(edge); + }); + } + + return this.edges.clone(); + }, +*/ + /** + * Overrides the UIObject.add method. Adds uiObject to the correct sub node. + * @param {UIObject} uiObject + */ + add: function(uiObject, index, silent) { + //if uiObject is child of another UIObject, remove it. + if(uiObject instanceof ORYX.Core.UIObject) { + if (!(this.children.member(uiObject))) { + //if uiObject is child of another parent, remove it from that parent. + if(uiObject.parent) { + uiObject.parent.remove(uiObject, true); + } + + //add uiObject to the Canvas + //add uiObject to this Shape + if(index != undefined) + this.children.splice(index, 0, uiObject); + else + this.children.push(uiObject); + + //set parent reference + uiObject.parent = this; + + //add uiObject.node to this.node depending on the type of uiObject + if(uiObject instanceof ORYX.Core.Shape) { + if(uiObject instanceof ORYX.Core.Edge) { + uiObject.addMarkers(this.rootNode.getElementsByTagNameNS(NAMESPACE_SVG, "defs")[0]); + uiObject.node = this.node.childNodes[0].childNodes[2].appendChild(uiObject.node); + this.edges.push(uiObject); + } else { + uiObject.node = this.node.childNodes[0].childNodes[1].appendChild(uiObject.node); + this.nodes.push(uiObject); + } + } else { //UIObject + uiObject.node = this.node.appendChild(uiObject.node); + } + + uiObject.bounds.registerCallback(this._changedCallback); + + if(this.eventHandlerCallback && silent !== true) + this.eventHandlerCallback({type:ORYX.CONFIG.EVENT_SHAPEADDED,shape:uiObject}) + } else { + + ORYX.Log.warn("add: ORYX.Core.UIObject is already a child of this object."); + } + } else { + + ORYX.Log.fatal("add: Parameter is not of type ORYX.Core.UIObject."); + } + }, + + /** + * Overrides the UIObject.remove method. Removes uiObject. + * @param {UIObject} uiObject + */ + remove: function(uiObject, silent) { + //if uiObject is a child of this object, remove it. + if (this.children.member(uiObject)) { + //remove uiObject from children + var parent = uiObject.parent; + + this.children = this.children.without(uiObject); + + //delete parent reference of uiObject + uiObject.parent = undefined; + + //delete uiObject.node from this.node + if(uiObject instanceof ORYX.Core.Shape) { + if(uiObject instanceof ORYX.Core.Edge) { + uiObject.removeMarkers(); + uiObject.node = this.node.childNodes[0].childNodes[2].removeChild(uiObject.node); + this.edges = this.edges.without(uiObject); + } else { + uiObject.node = this.node.childNodes[0].childNodes[1].removeChild(uiObject.node); + this.nodes = this.nodes.without(uiObject); + } + } else { //UIObject + uiObject.node = this.node.removeChild(uiObject.node); + } + + if(this.eventHandlerCallback && silent !== true) + this.eventHandlerCallback({type:ORYX.CONFIG.EVENT_SHAPEREMOVED,shape:uiObject, parent:parent}); + + uiObject.bounds.unregisterCallback(this._changedCallback); + } else { + + ORYX.Log.warn("remove: ORYX.Core.UIObject is not a child of this object."); + } + }, + + /** + * Creates shapes out of the given collection of shape objects and adds them to the canvas. + * @example + * canvas.addShapeObjects({ + bounds:{ lowerRight:{ y:510, x:633 }, upperLeft:{ y:146, x:210 } }, + resourceId:"oryx_F0715955-50F2-403D-9851-C08CFE70F8BD", + childShapes:[], + properties:{}, + stencil:{ + id:"Subprocess" + }, + outgoing:[{resourceId: 'aShape'}], + target: {resourceId: 'aShape'} + }); + * @param {Object} shapeObjects + * @param {Function} [eventHandler] An event handler passed to each newly created shape (as eventHandlerCallback) + * @return {Array} A collection of ORYX.Core.Shape + * @methodOf ORYX.Core.Canvas.prototype + */ + addShapeObjects: function(shapeObjects, eventHandler){ + if(!shapeObjects) return; + + this.initializingShapes = true; + + /*FIXME This implementation is very evil! At first, all shapes are created on + canvas. In a second step, the attributes are applied. There must be a distinction + between the configuration phase (where the outgoings, for example, are just named), + and the creation phase (where the outgoings are evaluated). This must be reflected + in code to provide a nicer API/ implementation!!! */ + + var addShape = function(shape, parent){ + // Create a new Stencil + var stencil = ORYX.Core.StencilSet.stencil(this.getStencil().namespace() + shape.stencil.id ); + + // Create a new Shape + var ShapeClass = (stencil.type() == "node") ? ORYX.Core.Node : ORYX.Core.Edge; + var newShape = new ShapeClass( + {'eventHandlerCallback': eventHandler}, + stencil, this.facade); + + // Set the resource id + newShape.resourceId = shape.resourceId; + newShape.node.id = "svg-" + shape.resourceId; + + // Set parent to json object to be used later + // Due to the nested json structure, normally shape.parent is not set/ must not be set. + // In special cases, it can be easier to set this directly instead of a nested structure. + shape.parent = "#" + ((shape.parent && shape.parent.resourceId) || parent.resourceId); + + // Add the shape to the canvas + this.add( newShape ); + + return { + json: shape, + object: newShape + }; + }.bind(this); + + /** Builds up recursively a flatted array of shapes, including a javascript object and json representation + * @param {Object} shape Any object that has Object#childShapes + */ + var addChildShapesRecursively = function(shape){ + var addedShapes = []; + + if (shape.childShapes && shape.childShapes.constructor == String) + { + shape.childShapes = JSON.parse(shape.childShapes); + } + + shape.childShapes.each(function(childShape){ + addedShapes.push(addShape(childShape, shape)); + addedShapes = addedShapes.concat(addChildShapesRecursively(childShape)); + }); + + return addedShapes; + }.bind(this); + + var shapes = addChildShapesRecursively({ + childShapes: shapeObjects, + resourceId: this.resourceId + }); + + + // prepare deserialisation parameter + shapes.each( + function(shape){ + var properties = []; + for(field in shape.json.properties){ + properties.push({ + prefix: 'oryx', + name: field, + value: shape.json.properties[field] + }); + } + + // Outgoings + shape.json.outgoing.each(function(out){ + properties.push({ + prefix: 'raziel', + name: 'outgoing', + value: "#"+out.resourceId + }); + }); + + // Target + // (because of a bug, the first outgoing is taken when there is no target, + // can be removed after some time) + if(shape.object instanceof ORYX.Core.Edge) { + var target = shape.json.target || shape.json.outgoing[0]; + if(target){ + properties.push({ + prefix: 'raziel', + name: 'target', + value: "#"+target.resourceId + }); + } + } + + // Bounds + if (shape.json.bounds) { + properties.push({ + prefix: 'oryx', + name: 'bounds', + value: shape.json.bounds.upperLeft.x + "," + shape.json.bounds.upperLeft.y + "," + shape.json.bounds.lowerRight.x + "," + shape.json.bounds.lowerRight.y + }); + } + + //Dockers [{x:40, y:50}, {x:30, y:60}] => "40 50 30 60 #" + if(shape.json.dockers){ + properties.push({ + prefix: 'oryx', + name: 'dockers', + value: shape.json.dockers.inject("", function(dockersStr, docker){ + return dockersStr + docker.x + " " + docker.y + " "; + }) + " #" + }); + } + + //Parent + properties.push({ + prefix: 'raziel', + name: 'parent', + value: shape.json.parent + }); + + shape.__properties = properties; + }.bind(this) + ); + + // Deserialize the properties from the shapes + // This can't be done earlier because Shape#deserialize expects that all referenced nodes are already there + + // first, deserialize all nodes + shapes.each(function(shape) { + if(shape.object instanceof ORYX.Core.Node) { + shape.object.deserialize(shape.__properties, shape.json); + } + }); + + // second, deserialize all edges + shapes.each(function(shape) { + if(shape.object instanceof ORYX.Core.Edge) { + shape.object.deserialize(shape.__properties, shape.json); + shape.object._oldBounds = shape.object.bounds.clone(); + shape.object._update(); + } + }); + + delete this.initializingShapes; + return shapes.pluck("object"); + }, + + /** + * Updates the size of the canvas, regarding to the containg shapes. + */ + updateSize: function(){ + // Check the size for the canvas + var maxWidth = 0; + var maxHeight = 0; + var offset = 100; + this.getChildShapes(true, function(shape){ + var b = shape.bounds; + maxWidth = Math.max( maxWidth, b.lowerRight().x + offset) + maxHeight = Math.max( maxHeight, b.lowerRight().y + offset) + }); + + if( this.bounds.width() < maxWidth || this.bounds.height() < maxHeight ){ + this.setSize({width: Math.max(this.bounds.width(), maxWidth), height: Math.max(this.bounds.height(), maxHeight)}) + } + }, + + getRootNode: function() { + return this.rootNode; + }, + + getUnderlayNode: function() { + return this.underlayNode; + }, + + getSvgContainer: function() { + return this.node.childNodes[1]; + }, + + getHTMLContainer: function() { + return this._htmlContainer; + }, + + /** + * Return all elements of the same highest level + * @param {Object} elements + */ + getShapesWithSharedParent: function(elements) { + + // If there is no elements, return [] + if(!elements || elements.length < 1) { return []; } + // If there is one element, return this element + if(elements.length == 1) { return elements;} + + return elements.findAll(function(value){ + var parentShape = value.parent; + while(parentShape){ + if(elements.member(parentShape)) return false; + parentShape = parentShape.parent; + } + return true; + }); + + }, + + setSize: function(size, dontSetBounds) { + if(!size || !size.width || !size.height){return;}; + + if(this.rootNode.parentNode){ + this.rootNode.parentNode.style.width = size.width + 'px'; + this.rootNode.parentNode.style.height = size.height + 'px'; + } + + this.rootNode.setAttributeNS(null, 'width', size.width); + this.rootNode.setAttributeNS(null, 'height', size.height); + + //this._htmlContainer.style.top = "-" + (size.height + 4) + 'px'; + if( !dontSetBounds ){ + this.bounds.set({a:{x:0,y:0},b:{x:size.width/this.zoomLevel,y:size.height/this.zoomLevel}}); + } + }, + + /** + * Returns an SVG document of the current process. + * @param {Boolean} escapeText Use true, if you want to parse it with an XmlParser, + * false, if you want to use the SVG document in browser on client side. + */ + getSVGRepresentation: function(escapeText) { + // Get the serialized svg image source + var svgClone = this.getRootNode().cloneNode(true); + + this._removeInvisibleElements(svgClone); + + var x1, y1, x2, y2; + this.getChildShapes(true).each(function(shape) { + var absBounds = shape.absoluteBounds(); + var ul = absBounds.upperLeft(); + var lr = absBounds.lowerRight(); + if(x1 == undefined) { + x1 = ul.x; + y1 = ul.y; + x2 = lr.x; + y2 = lr.y; + } else { + x1 = Math.min(x1, ul.x); + y1 = Math.min(y1, ul.y); + x2 = Math.max(x2, lr.x); + y2 = Math.max(y2, lr.y); + } + }); + + var margin = 50; + var width, height, tx, ty; + if(x1 == undefined) { + width = 0; + height = 0; + tx = 0; + ty = 0; + } else { + width = x2; + height = y2; + tx = -x1+margin/2; + ty = -y1+margin/2; + } + + // Set the width and height + svgClone.setAttributeNS(null, 'width', width + margin); + svgClone.setAttributeNS(null, 'height', height + margin); + + //remove scale factor + svgClone.childNodes[1].removeAttributeNS(null, 'transform'); + + try{ + var svgCont = svgClone.childNodes[1].childNodes[1]; + svgCont.parentNode.removeChild(svgCont); + } catch(e) {var abcdef=1} + + if(escapeText) { + $A(svgClone.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'tspan')).each(function(elem) { + elem.textContent = elem.textContent.escapeHTML(); + }); + + $A(svgClone.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'text')).each(function(elem) { + if(elem.childNodes.length == 0) + elem.textContent = elem.textContent.escapeHTML(); + }); + } + + // generating absolute urls for the pdf-exporter + $A(svgClone.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'image')).each(function(elem) { + var href = elem.getAttributeNS("http://www.w3.org/1999/xlink","href"); + + if(!href.match("^(http|https)://")) { + href = window.location.protocol + "//" + window.location.host + href; + elem.setAttributeNS("http://www.w3.org/1999/xlink", "href", href); + } + }); + + + // escape all links + $A(svgClone.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'a')).each(function(elem) { + elem.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", (elem.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").escapeHTML()); + }); + + return svgClone; + }, + + /** + * Removes all nodes (and its children) that has the + * attribute visibility set to "hidden" + */ + _removeInvisibleElements: function(element) { + var index = 0; + while(index < element.childNodes.length) { + var child = element.childNodes[index]; + if(child.getAttributeNS && + child.getAttributeNS(null, "visibility") === "hidden") { + element.removeChild(child); + } else { + this._removeInvisibleElements(child); + index++; + } + } + + }, + + /** + * This method checks all shapes on the canvas and removes all shapes that + * contain invalid bounds values or dockers values(NaN) + */ + /*cleanUp: function(parent) { + if (!parent) { + parent = this; + } + parent.getChildShapes().each(function(shape){ + var a = shape.bounds.a; + var b = shape.bounds.b; + if (isNaN(a.x) || isNaN(a.y) || isNaN(b.x) || isNaN(b.y)) { + parent.remove(shape); + } + else { + shape.getDockers().any(function(docker) { + a = docker.bounds.a; + b = docker.bounds.b; + if (isNaN(a.x) || isNaN(a.y) || isNaN(b.x) || isNaN(b.y)) { + parent.remove(shape); + return true; + } + return false; + }); + shape.getMagnets().any(function(magnet) { + a = magnet.bounds.a; + b = magnet.bounds.b; + if (isNaN(a.x) || isNaN(a.y) || isNaN(b.x) || isNaN(b.y)) { + parent.remove(shape); + return true; + } + return false; + }); + this.cleanUp(shape); + } + }.bind(this)); + },*/ + + _delegateEvent: function(event) { + if(this.eventHandlerCallback && ( event.target == this.rootNode || event.target == this.rootNode.parentNode )) { + this.eventHandlerCallback(event, this); + } + }, + + toString: function() { return "Canvas " + this.id }, + + /** + * Calls {@link ORYX.Core.AbstractShape#toJSON} and adds some stencil set information. + */ + toJSON: function() { + var json = arguments.callee.$.toJSON.apply(this, arguments); + +// if(ORYX.CONFIG.STENCILSET_HANDLER.length > 0) { +// json.stencilset = { +// url: this.getStencil().stencilSet().namespace() +// }; +// } else { + json.stencilset = { + url: this.getStencil().stencilSet().source(), + namespace: this.getStencil().stencilSet().namespace() + }; +// } + + + return json; + } + });/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +var idCounter = 0; +var ID_PREFIX = "resource"; + +/** + * Main initialization method. To be called when loading + * of the document, including all scripts, is completed. + */ +function init() { + + ORYX.Log.debug("Querying editor instances"); + + // Hack for WebKit to set the SVGElement-Classes + ORYX.Editor.setMissingClasses(); + + // If someone wants to create the editor instance himself + if (window.onOryxResourcesLoaded) { + window.onOryxResourcesLoaded(); + } + // Else fetch the model from server and display editor + else { + var modelId = window.location.search.substring(4); + var modelUrl = "./service/model/" + modelId + "/json"; + + ORYX.Editor.createByUrl(modelUrl); + } +} + +/** + @namespace Global Oryx name space + @name ORYX +*/ +if(!ORYX) {var ORYX = {};} + +/** + * The Editor class. + * @class ORYX.Editor + * @extends Clazz + * @param {Object} config An editor object, passed to {@link ORYX.Editor#loadSerialized} + * @param {String} config.id Any ID that can be used inside the editor. If fullscreen=false, any HTML node with this id must be present to render the editor to this node. + * @param {boolean} [config.fullscreen=true] Render editor in fullscreen mode or not. + * @param {String} config.stencilset.url Stencil set URL. + * @param {String} [config.stencil.id] Stencil type used for creating the canvas. + * @param {Object} config.properties Any properties applied to the canvas. +*/ +ORYX.Editor = { + /** @lends ORYX.Editor.prototype */ + // Defines the global dom event listener + DOMEventListeners: new Hash(), + + // Defines the selection + selection: [], + + // Defines the current zoom level + zoomLevel:1.0, + + construct: function(config) { + + // initialization. + this._eventsQueue = []; + this.loadedPlugins = []; + this.pluginsData = []; + + + //meta data about the model for the signavio warehouse + //directory, new, name, description, revision, model (the model data) + + this.modelMetaData = config; + + var model = config; + + this.id = model.modelId; + + if(config.model) { + model = config.model; + } + + if(!this.id) { + this.id = model.id; + if(!this.id) { + this.id = ORYX.Editor.provideId(); + } + } + + // Defines if the editor should be fullscreen or not + this.fullscreen = config.fullscreen !== false; + + // Initialize the eventlistener + this._initEventListener(); + + // Load particular stencilset + if(ORYX.CONFIG.BACKEND_SWITCH) { + var ssUrl = (model.stencilset.namespace||model.stencilset.url).replace("#", "%23"); + ORYX.Core.StencilSet.loadStencilSet(ssUrl, this.modelMetaData, this.id); + } else { + var ssUrl = model.stencilset.url; + ORYX.Core.StencilSet.loadStencilSet(ssUrl, this.modelMetaData, this.id); + } + + // CREATES the canvas + this._createCanvas(model.stencil ? model.stencil.id : null, model.properties); + + // GENERATES the whole EXT.VIEWPORT + this._generateGUI(); + + // Initializing of a callback to check loading ends + var loadPluginFinished = false; + var loadContentFinished = false; + var initFinished = function(){ + if( !loadPluginFinished || !loadContentFinished ){ return } + this._finishedLoading(); + }.bind(this) + + // LOAD the plugins + window.setTimeout(function(){ + this.loadPlugins(); + loadPluginFinished = true; + initFinished(); + }.bind(this), 100); + + // LOAD the content of the current editor instance + window.setTimeout(function(){ + this.loadSerialized(model, true); // Request the meta data as well + this.getCanvas().update(); + loadContentFinished = true; + initFinished(); + }.bind(this), 200); + }, + + _finishedLoading: function() { + // Raise Loaded Event + this.handleEvents( {type:ORYX.CONFIG.EVENT_LOADED} ) + }, + + _initEventListener: function(){ + + // Register on Events + + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_KEYDOWN, this.catchKeyDownEvents.bind(this), false); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_KEYUP, this.catchKeyUpEvents.bind(this), false); + + // Enable Key up and down Event + this._keydownEnabled = true; + this._keyupEnabled = true; + + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEDOWN] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEUP] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEOVER] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEOUT] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_SELECTION_CHANGED] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEMOVE] = []; + + }, + + /** + * Generate the whole viewport of the + * Editor and initialized the Ext-Framework + * + */ + _generateGUI: function() { + + // Defines the layout height if it's NOT fullscreen + var layoutHeight = ORYX.CONFIG.WINDOW_HEIGHT; + var canvasParent = this.getCanvas().rootNode.parentNode; + + jQuery("#canvasSection").append(canvasParent); + + // Set the editor to the center, and refresh the size + canvasParent.parentNode.setAttributeNS(null, 'align', 'center'); + canvasParent.setAttributeNS(null, 'align', 'left'); + this.getCanvas().setSize({ + width : ORYX.CONFIG.CANVAS_WIDTH, + height : ORYX.CONFIG.CANVAS_HEIGHT + }); + + }, + + getAvailablePlugins: function(){ + var curAvailablePlugins=ORYX.availablePlugins.clone(); + curAvailablePlugins.each(function(plugin){ + if(this.loadedPlugins.find(function(loadedPlugin){ + return loadedPlugin.type==this.name; + }.bind(plugin))){ + plugin.engaged=true; + }else{ + plugin.engaged=false; + } + }.bind(this)); + return curAvailablePlugins; + }, + + loadScript: function (url, callback){ + var script = document.createElement("script") + script.type = "text/javascript"; + if (script.readyState){ //IE + script.onreadystatechange = function(){ + if (script.readyState == "loaded" || script.readyState == "complete"){ + script.onreadystatechange = null; + callback(); + } + }; + } else { //Others + script.onload = function(){ + callback(); + }; + } + script.src = url; + document.getElementsByTagName("head")[0].appendChild(script); + }, + /** + * activate Plugin + * + * @param {String} name + * @param {Function} callback + * callback(sucess, [errorCode]) + * errorCodes: NOTUSEINSTENCILSET, REQUIRESTENCILSET, NOTFOUND, YETACTIVATED + */ + activatePluginByName: function(name, callback, loadTry){ + + var match=this.getAvailablePlugins().find(function(value){return value.name==name}); + if(match && (!match.engaged || (match.engaged==='false'))){ + var loadedStencilSetsNamespaces = this.getStencilSets().keys(); + var facade = this._getPluginFacade(); + var newPlugin; + var me=this; + ORYX.Log.debug("Initializing plugin '%0'", match.name); + + if (!match.requires || !match.requires.namespaces || match.requires.namespaces.any(function(req){ return loadedStencilSetsNamespaces.indexOf(req) >= 0 }) ){ + if(!match.notUsesIn || !match.notUsesIn.namespaces || !match.notUsesIn.namespaces.any(function(req){ return loadedStencilSetsNamespaces.indexOf(req) >= 0 })){ + + try { + + var className = eval(match.name); + var newPlugin = new className(facade, match); + newPlugin.type = match.name; + + // If there is an GUI-Plugin, they get all Plugins-Offer-Meta-Data + if (newPlugin.registryChanged) + newPlugin.registryChanged(me.pluginsData); + + // If there have an onSelection-Method it will pushed to the Editor Event-Handler + if (newPlugin.onSelectionChanged) + me.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, newPlugin.onSelectionChanged.bind(newPlugin)); + this.loadedPlugins.push(newPlugin); + this.loadedPlugins.each(function(loaded){ + if(loaded.registryChanged) + loaded.registryChanged(this.pluginsData); + }.bind(me)); + callback(true); + + } catch(e) { + ORYX.Log.warn("Plugin %0 is not available", match.name); + if(!!loadTry){ + callback(false,"INITFAILED"); + return; + } + this.loadScript("plugins/scripts/"+match.source, this.activatePluginByName.bind(this,match.name,callback,true)); + } + }else{ + callback(false,"NOTUSEINSTENCILSET"); + ORYX.Log.info("Plugin need a stencilset which is not loaded'", match.name); + } + + } else { + callback(false,"REQUIRESTENCILSET"); + ORYX.Log.info("Plugin need a stencilset which is not loaded'", match.name); + } + + + }else{ + callback(false, match?"NOTFOUND":"YETACTIVATED"); + //TODO error handling + } + }, + + /** + * Laden der Plugins + */ + loadPlugins: function() { + + // if there should be plugins but still are none, try again. + // TODO this should wait for every plugin respectively. + /*if (!ORYX.Plugins && ORYX.availablePlugins.length > 0) { + window.setTimeout(this.loadPlugins.bind(this), 100); + return; + }*/ + + var me = this; + var newPlugins = []; + + + var loadedStencilSetsNamespaces = this.getStencilSets().keys(); + + // Available Plugins will be initalize + var facade = this._getPluginFacade(); + + // If there is an Array where all plugins are described, than only take those + // (that comes from the usage of oryx with a mashup api) + if( ORYX.MashupAPI && ORYX.MashupAPI.loadablePlugins && ORYX.MashupAPI.loadablePlugins instanceof Array ){ + + // Get the plugins from the available plugins (those who are in the plugins.xml) + ORYX.availablePlugins = $A(ORYX.availablePlugins).findAll(function(value){ + return ORYX.MashupAPI.loadablePlugins.include( value.name ) + }) + + // Add those plugins to the list, which are only in the loadablePlugins list + ORYX.MashupAPI.loadablePlugins.each(function( className ){ + if( !(ORYX.availablePlugins.find(function(val){ return val.name == className }))){ + ORYX.availablePlugins.push( {name: className } ); + } + }) + } + + + ORYX.availablePlugins.each(function(value) { + ORYX.Log.debug("Initializing plugin '%0'", value.name); + if( (!value.requires || !value.requires.namespaces || value.requires.namespaces.any(function(req){ return loadedStencilSetsNamespaces.indexOf(req) >= 0 }) ) && + (!value.notUsesIn || !value.notUsesIn.namespaces || !value.notUsesIn.namespaces.any(function(req){ return loadedStencilSetsNamespaces.indexOf(req) >= 0 }) )&& + /*only load activated plugins or undefined */ + (value.engaged || (value.engaged===undefined)) ){ + + try { + var className = eval(value.name); + if( className ){ + var plugin = new className(facade, value); + plugin.type = value.name; + newPlugins.push( plugin ); + plugin.engaged=true; + } + } catch(e) { + ORYX.Log.warn("Plugin %0 is not available %1", value.name, e); + } + + } else { + ORYX.Log.info("Plugin need a stencilset which is not loaded'", value.name); + } + + }); + + newPlugins.each(function(value) { + // If there is an GUI-Plugin, they get all Plugins-Offer-Meta-Data + if(value.registryChanged) + value.registryChanged(me.pluginsData); + + // If there have an onSelection-Method it will pushed to the Editor Event-Handler + if(value.onSelectionChanged) + me.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, value.onSelectionChanged.bind(value)); + }); + + this.loadedPlugins = newPlugins; + + this.registerPluginsOnKeyEvents(); + + this.setSelection(); + + }, + + /** + * Creates the Canvas + * @param {String} [stencilType] The stencil type used for creating the canvas. If not given, a stencil with myBeRoot = true from current stencil set is taken. + * @param {Object} [canvasConfig] Any canvas properties (like language). + */ + _createCanvas: function(stencilType, canvasConfig) { + if (stencilType) { + // Add namespace to stencilType + if (stencilType.search(/^http/) === -1) { + stencilType = this.getStencilSets().values()[0].namespace() + stencilType; + } + } + else { + // Get any root stencil type + stencilType = this.getStencilSets().values()[0].findRootStencilName(); + } + + // get the stencil associated with the type + var canvasStencil = ORYX.Core.StencilSet.stencil(stencilType); + + if (!canvasStencil) + ORYX.Log.fatal("Initialisation failed, because the stencil with the type %0 is not part of one of the loaded stencil sets.", stencilType); + + // create all dom + // TODO fix border, so the visible canvas has a double border and some spacing to the scrollbars + var div = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", null, ['div']); + // set class for custom styling + div.addClassName("ORYX_Editor"); + + // create the canvas + this._canvas = new ORYX.Core.Canvas({ + width : ORYX.CONFIG.CANVAS_WIDTH, + height : ORYX.CONFIG.CANVAS_HEIGHT, + 'eventHandlerCallback' : this.handleEvents.bind(this), + id : this.id, + parentNode : div + }, canvasStencil, this._getPluginFacade()); + + if (canvasConfig) { + // Migrate canvasConfig to an RDF-like structure + //FIXME this isn't nice at all because we don't want rdf any longer + var properties = []; + for(field in canvasConfig){ + properties.push({ + prefix: 'oryx', + name: field, + value: canvasConfig[field] + }); + } + + this._canvas.deserialize(properties); + } + + }, + + /** + * Returns a per-editor singleton plugin facade. + * To be used in plugin initialization. + */ + _getPluginFacade: function() { + + // if there is no pluginfacade already created: + if(!(this._pluginFacade)) + + // create it. + this._pluginFacade = { + + activatePluginByName: this.activatePluginByName.bind(this), + //deactivatePluginByName: this.deactivatePluginByName.bind(this), + getAvailablePlugins: this.getAvailablePlugins.bind(this), + offer: this.offer.bind(this), + getStencilSets: this.getStencilSets.bind(this), + getStencilSetExtensionDefinition:function(){ return Object.clone(this.ss_extensions_def||{})}.bind(this), + getRules: this.getRules.bind(this), + loadStencilSet: this.loadStencilSet.bind(this), + createShape: this.createShape.bind(this), + deleteShape: this.deleteShape.bind(this), + getSelection: this.getSelection.bind(this), + setSelection: this.setSelection.bind(this), + updateSelection: this.updateSelection.bind(this), + getCanvas: this.getCanvas.bind(this), + + importJSON: this.importJSON.bind(this), + getJSON: this.getJSON.bind(this), + getSerializedJSON: this.getSerializedJSON.bind(this), + + executeCommands: this.executeCommands.bind(this), + isExecutingCommands: this.isExecutingCommands.bind(this), + + registerOnEvent: this.registerOnEvent.bind(this), + unregisterOnEvent: this.unregisterOnEvent.bind(this), + raiseEvent: this.handleEvents.bind(this), + enableEvent: this.enableEvent.bind(this), + disableEvent: this.disableEvent.bind(this), + + eventCoordinates: this.eventCoordinates.bind(this), + eventCoordinatesXY: this.eventCoordinatesXY.bind(this), + + getModelMetaData: this.getModelMetaData.bind(this) + }; + + // return it. + return this._pluginFacade; + }, + + isExecutingCommands: function(){ + return !!this.commandExecuting; + }, + + /** + * Implementes the command pattern + * (The real usage of the command pattern + * is implemented and shown in the Plugins/undo.js) + * + * @param <Oryx.Core.Command>[] Array of commands + */ + executeCommands: function(commands){ + + if (!this.commandStack){ + this.commandStack = []; + } + if (!this.commandStackExecuted){ + this.commandStackExecuted = []; + } + + + this.commandStack = [].concat(this.commandStack) + .concat(commands); + + // Check if already executes + if (this.commandExecuting){ return; } + + // Start execution + this.commandExecuting = true; + + // Iterate over all commands + while(this.commandStack.length > 0){ + var command = this.commandStack.shift(); + // and execute it + command.execute(); + this.commandStackExecuted.push(command); + } + + // Raise event for executing commands + this.handleEvents({ + type : ORYX.CONFIG.EVENT_EXECUTE_COMMANDS, + commands : this.commandStackExecuted + }); + + // Remove temporary vars + delete this.commandStack; + delete this.commandStackExecuted; + delete this.commandExecuting; + + + this.updateSelection(); + + }, + + /** + * Returns JSON of underlying canvas (calls ORYX.Canvas#toJSON()). + * @return {Object} Returns JSON representation as JSON object. + */ + getJSON: function(){ + delete Array.prototype.toJSON; + var canvasJSON = this.getCanvas().toJSON(); + canvasJSON.ssextensions = this.getStencilSets().values()[0].extensions().keys().findAll(function(sse){ return !sse.endsWith('/meta#') }); + return canvasJSON; + }, + + /** + * Serializes a call to toJSON(). + * @return {String} Returns JSON representation as string. + */ + getSerializedJSON: function(){ + return JSON.stringify(this.getJSON()); + }, + + /** + * Imports shapes in JSON as expected by {@link ORYX.Editor#loadSerialized} + * @param {Object|String} jsonObject The (serialized) json object to be imported + * @param {boolean } [noSelectionAfterImport=false] Set to true if no shapes should be selected after import + * @throws {SyntaxError} If the serialized json object contains syntax errors + */ + importJSON: function(jsonObject, noSelectionAfterImport) { + + try { + jsonObject = this.renewResourceIds(jsonObject); + } catch(error){ + throw error; + } + //check, if the imported json model can be loaded in this editor + // (stencil set has to fit) + if(jsonObject.stencilset.namespace && jsonObject.stencilset.namespace !== this.getCanvas().getStencil().stencilSet().namespace()) { + alert(String.format(ORYX.I18N.JSONImport.wrongSS, jsonObject.stencilset.namespace, this.getCanvas().getStencil().stencilSet().namespace())); + return null; + } else { + var commandClass = ORYX.Core.Command.extend({ + construct: function(jsonObject, loadSerializedCB, noSelectionAfterImport, facade){ + this.jsonObject = jsonObject; + this.noSelection = noSelectionAfterImport; + this.facade = facade; + this.shapes; + this.connections = []; + this.parents = new Hash(); + this.selection = this.facade.getSelection(); + this.loadSerialized = loadSerializedCB; + }, + execute: function(){ + + if (!this.shapes) { + // Import the shapes out of the serialization + this.shapes = this.loadSerialized( this.jsonObject ); + + //store all connections + this.shapes.each(function(shape) { + + if (shape.getDockers) { + var dockers = shape.getDockers(); + if (dockers) { + if (dockers.length > 0) { + this.connections.push([dockers.first(), dockers.first().getDockedShape(), dockers.first().referencePoint]); + } + if (dockers.length > 1) { + this.connections.push([dockers.last(), dockers.last().getDockedShape(), dockers.last().referencePoint]); + } + } + } + + //store parents + this.parents[shape.id] = shape.parent; + }.bind(this)); + } else { + this.shapes.each(function(shape) { + this.parents[shape.id].add(shape); + }.bind(this)); + + this.connections.each(function(con) { + con[0].setDockedShape(con[1]); + con[0].setReferencePoint(con[2]); + con[0].update(); + }); + } + + //this.parents.values().uniq().invoke("update"); + this.facade.getCanvas().update(); + + if(!this.noSelection) + this.facade.setSelection(this.shapes); + else + this.facade.updateSelection(); + + // call updateSize again, because during loadSerialized the edges' bounds + // are not yet initialized properly + this.facade.getCanvas().updateSize(); + + }, + rollback: function(){ + var selection = this.facade.getSelection(); + + this.shapes.each(function(shape) { + selection = selection.without(shape); + this.facade.deleteShape(shape); + }.bind(this)); + + /*this.parents.values().uniq().each(function(parent) { + if(!this.shapes.member(parent)) + parent.update(); + }.bind(this));*/ + + this.facade.getCanvas().update(); + + this.facade.setSelection(selection); + } + }) + + var command = new commandClass(jsonObject, + this.loadSerialized.bind(this), + noSelectionAfterImport, + this._getPluginFacade()); + + this.executeCommands([command]); + + return command.shapes.clone(); + } + }, + + /** + * This method renew all resource Ids and according references. + * Warning: The implementation performs a substitution on the serialized object for + * easier implementation. This results in a low performance which is acceptable if this + * is only used when importing models. + * @param {Object|String} jsonObject + * @throws {SyntaxError} If the serialized json object contains syntax errors. + * @return {Object} The jsonObject with renewed ids. + * @private + */ + renewResourceIds: function(jsonObject){ + // For renewing resource ids, a serialized and object version is needed + if(Object.prototype.toString.call(jsonObject) === "String"){ + try { + var serJsonObject = jsonObject; + jsonObject = JSON.parse(jsonObject); + } catch(error){ + throw new SyntaxError(error.message); + } + } else { + var serJsonObject = JSON.stringify(jsonObject); + } + + // collect all resourceIds recursively + var collectResourceIds = function(shapes){ + if(!shapes) return []; + + return shapes.map(function(shape){ + return collectResourceIds(shape.childShapes).concat(shape.resourceId); + }).flatten(); + } + var resourceIds = collectResourceIds(jsonObject.childShapes); + + // Replace each resource id by a new one + resourceIds.each(function(oldResourceId){ + var newResourceId = ORYX.Editor.provideId(); + serJsonObject = serJsonObject.replace(new RegExp(oldResourceId, 'g'), newResourceId); + }); + + return JSON.parse(serJsonObject); + }, + + /** + * Loads serialized model to the oryx. + * @example + * editor.loadSerialized({ + * resourceId: "mymodel1", + * childShapes: [ + * { + * stencil:{ id:"Subprocess" }, + * outgoing:[{resourceId: 'aShape'}], + * target: {resourceId: 'aShape'}, + * bounds:{ lowerRight:{ y:510, x:633 }, upperLeft:{ y:146, x:210 } }, + * resourceId: "myshape1", + * childShapes:[], + * properties:{}, + * } + * ], + * properties:{ + * language: "English" + * }, + * stencilset:{ + * url:"http://localhost:8080/oryx/stencilsets/bpmn1.1/bpmn1.1.json" + * }, + * stencil:{ + * id:"BPMNDiagram" + * } + * }); + * @param {Object} model Description of the model to load. + * @param {Array} [model.ssextensions] List of stenctil set extensions. + * @param {String} model.stencilset.url + * @param {String} model.stencil.id + * @param {Array} model.childShapes + * @param {Array} [model.properties] + * @param {String} model.resourceId + * @return {ORYX.Core.Shape[]} List of created shapes + * @methodOf ORYX.Editor.prototype + */ + loadSerialized: function(model, requestMeta){ + var canvas = this.getCanvas(); + + // Bugfix (cf. http://code.google.com/p/oryx-editor/issues/detail?id=240) + // Deserialize the canvas' stencil set extensions properties first! + this.loadSSExtensions(model.ssextensions); + + // Load Meta Data Extension if available + // #Signavio + if (requestMeta === true) { + var metaDataExtension = this.getExtensionForMetaData(); + if (metaDataExtension) { + this.loadSSExtension(metaDataExtension); + } + } + + var shapes = this.getCanvas().addShapeObjects(model.childShapes, this.handleEvents.bind(this)); + + if(model.properties) { + for(key in model.properties) { + var value = model.properties[key]; + var prop = this.getCanvas().getStencil().property("oryx-"+key); + if (!(typeof value === "string") && (!prop || !prop.isList())) { + value = JSON.stringify(value); + } + this.getCanvas().setProperty("oryx-" + key, value); + } + } + + + this.getCanvas().updateSize(); + + // Force to update the selection + this.selection = [null]; + this.setSelection([]); + + return shapes; + }, + + /** + * Return the namespace of the extension which + * provided all the self defined meta data + * @return {String} Returns null if no extension is defined, otherwise the namespace + * + */ + getExtensionForMetaData: function(){ + if (!this.ss_extensions_def||!(this.ss_extensions_def.extensions instanceof Array)){ + return null; + } + + var stencilsets = this.getStencilSets(); + var extension = this.ss_extensions_def.extensions.find(function(ex){ + return !!stencilsets[ex["extends"]] && ex.namespace.endsWith("/meta#"); + }); + + return extension ? extension.namespace || null : null; + }, + + /** + * Calls ORYX.Editor.prototype.ss_extension_namespace for each element + * @param {Array} ss_extension_namespaces An array of stencil set extension namespaces. + */ + loadSSExtensions: function(ss_extension_namespaces){ + if(!ss_extension_namespaces) return; + + ss_extension_namespaces.each(function(ss_extension_namespace){ + this.loadSSExtension(ss_extension_namespace); + }.bind(this)); + }, + + /** + * Loads a stencil set extension. + * The stencil set extensions definiton file must already + * be loaded when the editor is initialized. + */ + loadSSExtension: function(ss_extension_namespace) { + + if (this.ss_extensions_def) { + var extension = this.ss_extensions_def.extensions.find(function(ex){ + return (ex.namespace == ss_extension_namespace); + }); + + if (!extension) { + return; + } + + var stencilset = this.getStencilSets()[extension["extends"]]; + + if (!stencilset) { + return; + } + + // Check if absolute or relative url + if ((extension["definition"]||"").startsWith("/")){ + stencilset.addExtension(extension["definition"]) + } else { + stencilset.addExtension(ORYX.CONFIG.SS_EXTENSIONS_FOLDER + extension["definition"]) + } + + //stencilset.addExtension("/oryx/build/stencilsets/extensions/" + extension["definition"]) + this.getRules().initializeRules(stencilset); + + this._getPluginFacade().raiseEvent({ + type: ORYX.CONFIG.EVENT_STENCIL_SET_LOADED + }); + } + + }, + + disableEvent: function(eventType){ + if(eventType == ORYX.CONFIG.EVENT_KEYDOWN) { + this._keydownEnabled = false; + } + if(eventType == ORYX.CONFIG.EVENT_KEYUP) { + this._keyupEnabled = false; + } + if(this.DOMEventListeners.keys().member(eventType)) { + var value = this.DOMEventListeners.remove(eventType); + this.DOMEventListeners['disable_' + eventType] = value; + } + }, + + enableEvent: function(eventType){ + if(eventType == ORYX.CONFIG.EVENT_KEYDOWN) { + this._keydownEnabled = true; + } + + if(eventType == ORYX.CONFIG.EVENT_KEYUP) { + this._keyupEnabled = true; + } + + if(this.DOMEventListeners.keys().member("disable_" + eventType)) { + var value = this.DOMEventListeners.remove("disable_" + eventType); + this.DOMEventListeners[eventType] = value; + } + }, + + /** + * Methods for the PluginFacade + */ + registerOnEvent: function(eventType, callback) { + if(!(this.DOMEventListeners.keys().member(eventType))) { + this.DOMEventListeners[eventType] = []; + } + + this.DOMEventListeners[eventType].push(callback); + }, + + unregisterOnEvent: function(eventType, callback) { + if(this.DOMEventListeners.keys().member(eventType)) { + this.DOMEventListeners[eventType] = this.DOMEventListeners[eventType].without(callback); + } else { + // Event is not supported + // TODO: Error Handling + } + }, + + getSelection: function() { + return this.selection || []; + }, + + getStencilSets: function() { + return ORYX.Core.StencilSet.stencilSets(this.id); + }, + + getRules: function() { + return ORYX.Core.StencilSet.rules(this.id); + }, + + loadStencilSet: function(source) { + try { + ORYX.Core.StencilSet.loadStencilSet(source, this.modelMetaData, this.id); + this.handleEvents({type:ORYX.CONFIG.EVENT_STENCIL_SET_LOADED}); + } catch (e) { + ORYX.Log.warn("Requesting stencil set file failed. (" + e + ")"); + } + }, + + offer: function(pluginData) { + if(!this.pluginsData.member(pluginData)){ + this.pluginsData.push(pluginData); + } + }, + + /** + * It creates an new event or adds the callback, if already existing, + * for the key combination that the plugin passes in keyCodes attribute + * of the offer method. + * + * The new key down event fits the schema: + * key.event[.metactrl][.alt][.shift].'thekeyCode' + */ + registerPluginsOnKeyEvents: function() { + this.pluginsData.each(function(pluginData) { + + if(pluginData.keyCodes) { + + pluginData.keyCodes.each(function(keyComb) { + var eventName = "key.event"; + + /* Include key action */ + eventName += '.' + keyComb.keyAction; + + if(keyComb.metaKeys) { + /* Register on ctrl or apple meta key as meta key */ + if(keyComb.metaKeys. + indexOf(ORYX.CONFIG.META_KEY_META_CTRL) > -1) { + eventName += "." + ORYX.CONFIG.META_KEY_META_CTRL; + } + + /* Register on alt key as meta key */ + if(keyComb.metaKeys. + indexOf(ORYX.CONFIG.META_KEY_ALT) > -1) { + eventName += '.' + ORYX.CONFIG.META_KEY_ALT; + } + + /* Register on shift key as meta key */ + if(keyComb.metaKeys. + indexOf(ORYX.CONFIG.META_KEY_SHIFT) > -1) { + eventName += '.' + ORYX.CONFIG.META_KEY_SHIFT; + } + } + + /* Register on the actual key */ + if(keyComb.keyCode) { + eventName += '.' + keyComb.keyCode; + } + + /* Register the event */ + ORYX.Log.debug("Register Plugin on Key Event: %0", eventName); + if (pluginData.toggle === true && pluginData.buttonInstance) { + this.registerOnEvent(eventName, function(){ + pluginData.buttonInstance.toggle(!pluginData.buttonInstance.pressed); // Toggle + pluginData.functionality.call(pluginData, pluginData.buttonInstance, pluginData.buttonInstance.pressed); // Call function + }); + } else { + this.registerOnEvent(eventName, pluginData.functionality) + } + + }.bind(this)); + } + }.bind(this)); + }, + + isEqual: function(a,b){ + return a === b || (a.length === b.length && a.all(function(r){ return b.include(r) })) + }, + + isDirty: function(a){ + return a.any(function(shape){ return shape.isPropertyChanged() }) + }, + + setSelection: function(elements, subSelectionElement, force) { + + if (!elements) { elements = []; } + if (!(elements instanceof Array)) { elements = [elements]; } + + elements = elements.findAll(function(n){ return n && n instanceof ORYX.Core.Shape }); + + if (elements[0] instanceof ORYX.Core.Canvas) { + elements = []; + } + + if (!force && this.isEqual(this.selection, elements) && !this.isDirty(elements)){ + return; + } + + this.selection = elements; + this._subSelection = subSelectionElement; + + this.handleEvents({type:ORYX.CONFIG.EVENT_SELECTION_CHANGED, elements:elements, subSelection: subSelectionElement, force: !!force}) + }, + + updateSelection: function() { + this.setSelection(this.selection, this._subSelection, true); + /*var s = this.selection; + this.setSelection(); + this.setSelection(s);*/ + }, + + getCanvas: function() { + return this._canvas; + }, + + + /** + * option = { + * type: string, + * position: {x:int, y:int}, + * connectingType: uiObj-Class + * connectedShape: uiObj + * draggin: bool + * namespace: url + * parent: ORYX.Core.AbstractShape + * template: a template shape that the newly created inherits properties from. + * } + */ + createShape: function(option) { + + if(option && option.serialize && option.serialize instanceof Array){ + + var type = option.serialize.find(function(obj){return (obj.prefix+"-"+obj.name) == "oryx-type"}); + var stencil = ORYX.Core.StencilSet.stencil(type.value); + + if(stencil.type() == 'node'){ + var newShapeObject = new ORYX.Core.Node({'eventHandlerCallback':this.handleEvents.bind(this)}, stencil, this._getPluginFacade()); + } else { + var newShapeObject = new ORYX.Core.Edge({'eventHandlerCallback':this.handleEvents.bind(this)}, stencil, this._getPluginFacade()); + } + + this.getCanvas().add(newShapeObject); + newShapeObject.deserialize(option.serialize); + + return newShapeObject; + } + + // If there is no argument, throw an exception + if(!option || !option.type || !option.namespace) { throw "To create a new shape you have to give an argument with type and namespace";} + + var canvas = this.getCanvas(); + var newShapeObject; + + // Get the shape type + var shapetype = option.type; + + // Get the stencil set + var sset = ORYX.Core.StencilSet.stencilSet(option.namespace); + // Create an New Shape, dependents on an Edge or a Node + if(sset.stencil(shapetype).type() == "node") { + newShapeObject = new ORYX.Core.Node({'eventHandlerCallback':this.handleEvents.bind(this)}, sset.stencil(shapetype), this._getPluginFacade()) + } else { + newShapeObject = new ORYX.Core.Edge({'eventHandlerCallback':this.handleEvents.bind(this)}, sset.stencil(shapetype), this._getPluginFacade()) + } + + // when there is a template, inherit the properties. + if(option.template) { + + newShapeObject._jsonStencil.properties = option.template._jsonStencil.properties; + newShapeObject.postProcessProperties(); + } + + // Add to the canvas + if(option.parent && newShapeObject instanceof ORYX.Core.Node) { + option.parent.add(newShapeObject); + } else { + canvas.add(newShapeObject); + } + + + // Set the position + var point = option.position ? option.position : {x:100, y:200}; + + + var con; + // If there is create a shape and in the argument there is given an ConnectingType and is instance of an edge + if(option.connectingType && option.connectedShape && !(newShapeObject instanceof ORYX.Core.Edge)) { + + // there will be create a new Edge + con = new ORYX.Core.Edge({'eventHandlerCallback':this.handleEvents.bind(this)}, sset.stencil(option.connectingType)); + + // And both endings dockers will be referenced to the both shapes + con.dockers.first().setDockedShape(option.connectedShape); + + var magnet = option.connectedShape.getDefaultMagnet() + var cPoint = magnet ? magnet.bounds.center() : option.connectedShape.bounds.midPoint(); + con.dockers.first().setReferencePoint( cPoint ); + con.dockers.last().setDockedShape(newShapeObject); + con.dockers.last().setReferencePoint(newShapeObject.getDefaultMagnet().bounds.center()); + + // The Edge will be added to the canvas and be updated + canvas.add(con); + //con.update(); + + } + + // Move the new Shape to the position + if(newShapeObject instanceof ORYX.Core.Edge && option.connectedShape) { + + newShapeObject.dockers.first().setDockedShape(option.connectedShape); + + if( option.connectedShape instanceof ORYX.Core.Node ){ + newShapeObject.dockers.first().setReferencePoint(option.connectedShape.getDefaultMagnet().bounds.center()); + newShapeObject.dockers.last().bounds.centerMoveTo(point); + } else { + newShapeObject.dockers.first().setReferencePoint(option.connectedShape.bounds.midPoint()); + } + + var start = newShapeObject.dockers.first(); + var end = newShapeObject.dockers.last(); + + if(start.getDockedShape() && end.getDockedShape()) { + var startPoint = start.getAbsoluteReferencePoint(); + var endPoint = end.getAbsoluteReferencePoint(); + + var docker = newShapeObject.createDocker(); + docker.bounds.centerMoveTo({ + x: startPoint.x + (endPont.x - startPoint.x) / 2, + y: startPoint.y + (endPont.y - startPoint.y) / 2 + }); + } + + } else { + + var b = newShapeObject.bounds + if( newShapeObject instanceof ORYX.Core.Node && newShapeObject.dockers.length == 1){ + b = newShapeObject.dockers.first().bounds + } + + b.centerMoveTo(point); + + var upL = b.upperLeft(); + b.moveBy( -Math.min(upL.x, 0) , -Math.min(upL.y, 0) ) + + var lwR = b.lowerRight(); + b.moveBy( -Math.max(lwR.x-canvas.bounds.width(), 0) , -Math.max(lwR.y-canvas.bounds.height(), 0) ) + + } + + // Update the shape + if (newShapeObject instanceof ORYX.Core.Edge) { + newShapeObject._update(false); + } + + // And refresh the selection + if(!(newShapeObject instanceof ORYX.Core.Edge)&&!(option.dontUpdateSelection)) { + this.setSelection([newShapeObject]); + } + + if(con && con.alignDockers) { + //con.alignDockers(); + } + if(newShapeObject.alignDockers) { + newShapeObject.alignDockers(); + } + + return newShapeObject; + }, + + deleteShape: function(shape) { + + if (!shape || !shape.parent){ return } + + //remove shape from parent + // this also removes it from DOM + shape.parent.remove(shape); + + //delete references to outgoing edges + shape.getOutgoingShapes().each(function(os) { + var docker = os.getDockers().first(); + if(docker && docker.getDockedShape() == shape) { + docker.setDockedShape(undefined); + } + }); + + //delete references to incoming edges + shape.getIncomingShapes().each(function(is) { + var docker = is.getDockers().last(); + if(docker && docker.getDockedShape() == shape) { + docker.setDockedShape(undefined); + } + }); + + //delete references of the shape's dockers + shape.getDockers().each(function(docker) { + docker.setDockedShape(undefined); + }); + }, + + /** + * Returns an object with meta data about the model. + * Like name, description, ... + * + * Empty object with the current backend. + * + * @return {Object} Meta data about the model + */ + getModelMetaData: function() { + return this.modelMetaData; + }, + + /* Event-Handler Methods */ + + /** + * Helper method to execute an event immediately. The event is not + * scheduled in the _eventsQueue. Needed to handle Layout-Callbacks. + */ + _executeEventImmediately: function(eventObj) { + if(this.DOMEventListeners.keys().member(eventObj.event.type)) { + this.DOMEventListeners[eventObj.event.type].each((function(value) { + value(eventObj.event, eventObj.arg); + }).bind(this)); + } + }, + + _executeEvents: function() { + this._queueRunning = true; + while(this._eventsQueue.length > 0) { + var val = this._eventsQueue.shift(); + this._executeEventImmediately(val); + } + this._queueRunning = false; + }, + + /** + * Leitet die Events an die Editor-Spezifischen Event-Methoden weiter + * @param {Object} event Event , welches gefeuert wurde + * @param {Object} uiObj Target-UiObj + */ + handleEvents: function(event, uiObj) { + + ORYX.Log.trace("Dispatching event type %0 on %1", event.type, uiObj); + + switch(event.type) { + case ORYX.CONFIG.EVENT_MOUSEDOWN: + this._handleMouseDown(event, uiObj); + break; + case ORYX.CONFIG.EVENT_MOUSEMOVE: + this._handleMouseMove(event, uiObj); + break; + case ORYX.CONFIG.EVENT_MOUSEUP: + this._handleMouseUp(event, uiObj); + break; + case ORYX.CONFIG.EVENT_MOUSEOVER: + this._handleMouseHover(event, uiObj); + break; + case ORYX.CONFIG.EVENT_MOUSEOUT: + this._handleMouseOut(event, uiObj); + break; + } + /* Force execution if necessary. Used while handle Layout-Callbacks. */ + if(event.forceExecution) { + this._executeEventImmediately({event: event, arg: uiObj}); + } else { + this._eventsQueue.push({event: event, arg: uiObj}); + } + + if(!this._queueRunning) { + this._executeEvents(); + } + + // TODO: Make this return whether no listener returned false. + // So that, when one considers bubbling undesireable, it won't happen. + return false; + }, + + isValidEvent: function(e){ + try { + var isInput = ["INPUT", "TEXTAREA"].include(e.target.tagName.toUpperCase()); + var gridHasFocus = e.target.className.include("x-grid3-focus") && !e.target.className.include("x-grid3-focus-canvas"); + return !isInput && !gridHasFocus; + } catch(e){ + return false; + } + }, + + catchKeyUpEvents: function(event) { + if(!this._keyupEnabled) { + return; + } + /* assure we have the current event. */ + if (!event) + event = window.event; + + // Checks if the event comes from some input field + if (!this.isValidEvent(event)){ + return; + } + + /* Create key up event type */ + var keyUpEvent = this.createKeyCombEvent(event, ORYX.CONFIG.KEY_ACTION_UP); + + ORYX.Log.debug("Key Event to handle: %0", keyUpEvent); + + /* forward to dispatching. */ + this.handleEvents({type: keyUpEvent, event:event}); + }, + + /** + * Catches all key down events and forward the appropriated event to + * dispatching concerning to the pressed keys. + * + * @param {Event} + * The key down event to handle + */ + catchKeyDownEvents: function(event) { + if(!this._keydownEnabled) { + return; + } + /* Assure we have the current event. */ + if (!event) + event = window.event; + + /* Fixed in FF3 */ + // This is a mac-specific fix. The mozilla event object has no knowledge + // of meta key modifier on osx, however, it is needed for certain + // shortcuts. This fix adds the metaKey field to the event object, so + // that all listeners that registered per Oryx plugin facade profit from + // this. The original bug is filed in + // https://bugzilla.mozilla.org/show_bug.cgi?id=418334 + //if (this.__currentKey == ORYX.CONFIG.KEY_CODE_META) { + // event.appleMetaKey = true; + //} + //this.__currentKey = pressedKey; + + // Checks if the event comes from some input field + if (!this.isValidEvent(event)){ + return; + } + + /* Create key up event type */ + var keyDownEvent = this.createKeyCombEvent(event, ORYX.CONFIG.KEY_ACTION_DOWN); + + ORYX.Log.debug("Key Event to handle: %0", keyDownEvent); + + /* Forward to dispatching. */ + this.handleEvents({type: keyDownEvent,event: event}); + }, + + /** + * Creates the event type name concerning to the pressed keys. + * + * @param {Event} keyDownEvent + * The source keyDownEvent to build up the event name + */ + createKeyCombEvent: function(keyEvent, keyAction) { + + /* Get the currently pressed key code. */ + var pressedKey = keyEvent.which || keyEvent.keyCode; + //this.__currentKey = pressedKey; + + /* Event name */ + var eventName = "key.event"; + + /* Key action */ + if(keyAction) { + eventName += "." + keyAction; + } + + /* Ctrl or apple meta key is pressed */ + if(keyEvent.ctrlKey || keyEvent.metaKey) { + eventName += "." + ORYX.CONFIG.META_KEY_META_CTRL; + } + + /* Alt key is pressed */ + if(keyEvent.altKey) { + eventName += "." + ORYX.CONFIG.META_KEY_ALT; + } + + /* Alt key is pressed */ + if(keyEvent.shiftKey) { + eventName += "." + ORYX.CONFIG.META_KEY_SHIFT; + } + + /* Return the composed event name */ + return eventName + "." + pressedKey; + }, + + _handleMouseDown: function(event, uiObj) { + + // get canvas. + var canvas = this.getCanvas(); + // Try to get the focus + canvas.focus() + + // find the shape that is responsible for this element's id. + var element = event.currentTarget; + var elementController = uiObj; + + // gather information on selection. + var currentIsSelectable = (elementController !== null) && + (elementController !== undefined) && (elementController.isSelectable); + var currentIsMovable = (elementController !== null) && + (elementController !== undefined) && (elementController.isMovable); + var modifierKeyPressed = event.shiftKey || event.ctrlKey; + var noObjectsSelected = this.selection.length === 0; + var currentIsSelected = this.selection.member(elementController); + + + // Rule #1: When there is nothing selected, select the clicked object. + if(currentIsSelectable && noObjectsSelected) { + + this.setSelection([elementController]); + + ORYX.Log.trace("Rule #1 applied for mouse down on %0", element.id); + + // Rule #3: When at least one element is selected, and there is no + // control key pressed, and the clicked object is not selected, select + // the clicked object. + } else if(currentIsSelectable && !noObjectsSelected && + !modifierKeyPressed && !currentIsSelected) { + + this.setSelection([elementController]); + + //var objectType = elementController.readAttributes(); + //alert(objectType[0] + ": " + objectType[1]); + + ORYX.Log.trace("Rule #3 applied for mouse down on %0", element.id); + + // Rule #4: When the control key is pressed, and the current object is + // not selected, add it to the selection. + } else if(currentIsSelectable && modifierKeyPressed + && !currentIsSelected) { + + var newSelection = this.selection.clone(); + newSelection.push(elementController) + this.setSelection(newSelection) + + ORYX.Log.trace("Rule #4 applied for mouse down on %0", element.id); + + // Rule #6 + } else if(currentIsSelectable && currentIsSelected && + modifierKeyPressed) { + + var newSelection = this.selection.clone(); + this.setSelection(newSelection.without(elementController)) + + ORYX.Log.trace("Rule #6 applied for mouse down on %0", elementController.id); + + // Rule #5: When there is at least one object selected and no control + // key pressed, we're dragging. + /*} else if(currentIsSelectable && !noObjectsSelected + && !modifierKeyPressed) { + + if(this.log.isTraceEnabled()) + this.log.trace("Rule #5 applied for mouse down on "+element.id); +*/ + // Rule #2: When clicked on something that is neither + // selectable nor movable, clear the selection, and return. + } else if (!currentIsSelectable && !currentIsMovable) { + + this.setSelection([]); + + ORYX.Log.trace("Rule #2 applied for mouse down on %0", element.id); + + return; + + // Rule #7: When the current object is not selectable but movable, + // it is probably a control. Leave the selection unchanged but set + // the movedObject to the current one and enable Drag. Dockers will + // be processed in the dragDocker plugin. + } else if(!currentIsSelectable && currentIsMovable && !(elementController instanceof ORYX.Core.Controls.Docker)) { + + // TODO: If there is any moveable elements, do this in a plugin + //ORYX.Core.UIEnableDrag(event, elementController); + + ORYX.Log.trace("Rule #7 applied for mouse down on %0", element.id); + + // Rule #8: When the element is selectable and is currently selected and no + // modifier key is pressed + } else if(currentIsSelectable && currentIsSelected && + !modifierKeyPressed) { + + this._subSelection = this._subSelection != elementController ? elementController : undefined; + + this.setSelection(this.selection, this._subSelection); + + ORYX.Log.trace("Rule #8 applied for mouse down on %0", element.id); + } + + + // prevent event from bubbling, return. + //Event.stop(event); + return; + }, + + _handleMouseMove: function(event, uiObj) { + return; + }, + + _handleMouseUp: function(event, uiObj) { + // get canvas. + var canvas = this.getCanvas(); + + // find the shape that is responsible for this elemement's id. + var elementController = uiObj; + + //get event position + var evPos = this.eventCoordinates(event); + + //Event.stop(event); + }, + + _handleMouseHover: function(event, uiObj) { + return; + }, + + _handleMouseOut: function(event, uiObj) { + return; + }, + + /** + * Calculates the event coordinates to SVG document coordinates. + * @param {Event} event + * @return {SVGPoint} The event coordinates in the SVG document + */ + eventCoordinates: function(event) { + + var canvas = this.getCanvas(); + + var svgPoint = canvas.node.ownerSVGElement.createSVGPoint(); + svgPoint.x = event.clientX; + svgPoint.y = event.clientY; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + svgPoint.x = svgPoint.x * additionalIEZoom; + svgPoint.y = svgPoint.y * additionalIEZoom; + } + + var matrix = canvas.node.getScreenCTM(); + return svgPoint.matrixTransform(matrix.inverse()); + }, + + eventCoordinatesXY: function(x, y) { + + var canvas = this.getCanvas(); + + var svgPoint = canvas.node.ownerSVGElement.createSVGPoint(); + svgPoint.x = x; + svgPoint.y = y; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + svgPoint.x = svgPoint.x * additionalIEZoom; + svgPoint.y = svgPoint.y * additionalIEZoom; + } + + var matrix = canvas.node.getScreenCTM(); + return svgPoint.matrixTransform(matrix.inverse()); + } +}; +ORYX.Editor = Clazz.extend(ORYX.Editor); + +/** + * Creates a new ORYX.Editor instance by fetching a model from given url and passing it to the constructur + * @param {String} modelUrl The JSON URL of a model. + * @param {Object} config Editor config passed to the constructur, merged with the response of the request to modelUrl + */ +ORYX.Editor.createByUrl = function(modelUrl){ + new Ajax.Request(modelUrl, { + method: 'GET', + onSuccess: function(transport) { + var editorConfig = JSON.parse(transport.responseText); + new ORYX.Editor(editorConfig); + }.bind(this) + }); +} + +// TODO Implement namespace awareness on attribute level. +/** + * graft() function + * Originally by Sean M. Burke from interglacial.com, altered for usage with + * SVG and namespace (xmlns) support. Be sure you understand xmlns before + * using this funtion, as it creates all grafted elements in the xmlns + * provided by you and all element's attribures in default xmlns. If you + * need to graft elements in a certain xmlns and wish to assign attributes + * in both that and another xmlns, you will need to do stepwise grafting, + * adding non-default attributes yourself or you'll have to enhance this + * function. Latter, I would appreciate: martin???apfelfabrik.de + * @param {Object} namespace The namespace in which + * elements should be grafted. + * @param {Object} parent The element that should contain the grafted + * structure after the function returned. + * @param {Object} t the crafting structure. + * @param {Object} doc the document in which grafting is performed. + */ +ORYX.Editor.graft = function(namespace, parent, t, doc) { + + doc = (doc || (parent && parent.ownerDocument) || document); + var e; + if(t === undefined) { + throw "Can't graft an undefined value"; + } else if(t.constructor == String) { + e = doc.createTextNode( t ); + } else { + for(var i = 0; i < t.length; i++) { + if( i === 0 && t[i].constructor == String ) { + var snared; + snared = t[i].match( /^([a-z][a-z0-9]*)\.([^\s\.]+)$/i ); + if( snared ) { + e = doc.createElementNS(namespace, snared[1] ); + e.setAttributeNS(null, 'class', snared[2] ); + continue; + } + snared = t[i].match( /^([a-z][a-z0-9]*)$/i ); + if( snared ) { + e = doc.createElementNS(namespace, snared[1] ); // but no class + continue; + } + + // Otherwise: + e = doc.createElementNS(namespace, "span" ); + e.setAttribute(null, "class", "namelessFromLOL" ); + } + + if( t[i] === undefined ) { + throw "Can't graft an undefined value in a list!"; + } else if( t[i].constructor == String || t[i].constructor == Array ) { + this.graft(namespace, e, t[i], doc ); + } else if( t[i].constructor == Number ) { + this.graft(namespace, e, t[i].toString(), doc ); + } else if( t[i].constructor == Object ) { + // hash's properties => element's attributes + for(var k in t[i]) { e.setAttributeNS(null, k, t[i][k] ); } + } else { + + } + } + } + if(parent && parent.appendChild) { + parent.appendChild( e ); + } else { + + } + return e; // return the topmost created node +}; + +ORYX.Editor.provideId = function() { + var res = [], hex = '0123456789ABCDEF'; + + for (var i = 0; i < 36; i++) res[i] = Math.floor(Math.random()*0x10); + + res[14] = 4; + res[19] = (res[19] & 0x3) | 0x8; + + for (var i = 0; i < 36; i++) res[i] = hex[res[i]]; + + res[8] = res[13] = res[18] = res[23] = '-'; + + return "oryx_" + res.join(''); +}; + +/** + * When working with Ext, conditionally the window needs to be resized. To do + * so, use this class method. Resize is deferred until 100ms, and all subsequent + * resizeBugFix calls are ignored until the initially requested resize is + * performed. + */ +ORYX.Editor.resizeFix = function() { + if (!ORYX.Editor._resizeFixTimeout) { + ORYX.Editor._resizeFixTimeout = window.setTimeout(function() { + window.resizeBy(1,1); + window.resizeBy(-1,-1); + ORYX.Editor._resizefixTimeout = null; + }, 100); + } +}; + +ORYX.Editor.Cookie = { + + callbacks:[], + + onChange: function( callback, interval ){ + + this.callbacks.push(callback); + this.start( interval ) + + }, + + start: function( interval ){ + + if( this.pe ){ + return; + } + + var currentString = document.cookie; + + this.pe = new PeriodicalExecuter( function(){ + + if( currentString != document.cookie ){ + currentString = document.cookie; + this.callbacks.each(function(callback){ callback(this.getParams()) }.bind(this)); + } + + }.bind(this), ( interval || 10000 ) / 1000); + }, + + stop: function(){ + + if( this.pe ){ + this.pe.stop(); + this.pe = null; + } + }, + + getParams: function(){ + var res = {}; + + var p = document.cookie; + p.split("; ").each(function(param){ res[param.split("=")[0]] = param.split("=")[1];}); + + return res; + }, + + toString: function(){ + return document.cookie; + } +}; + +/** + * Workaround for SAFARI/Webkit, because + * when trying to check SVGSVGElement of instanceof there is + * raising an error + * + */ +ORYX.Editor.SVGClassElementsAreAvailable = true; +ORYX.Editor.setMissingClasses = function() { + + try { + SVGElement; + } catch(e) { + ORYX.Editor.SVGClassElementsAreAvailable = false; + SVGSVGElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg').toString(); + SVGGElement = document.createElementNS('http://www.w3.org/2000/svg', 'g').toString(); + SVGPathElement = document.createElementNS('http://www.w3.org/2000/svg', 'path').toString(); + SVGTextElement = document.createElementNS('http://www.w3.org/2000/svg', 'text').toString(); + //SVGMarkerElement = document.createElementNS('http://www.w3.org/2000/svg', 'marker').toString(); + SVGRectElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect').toString(); + SVGImageElement = document.createElementNS('http://www.w3.org/2000/svg', 'image').toString(); + SVGCircleElement = document.createElementNS('http://www.w3.org/2000/svg', 'circle').toString(); + SVGEllipseElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse').toString(); + SVGLineElement = document.createElementNS('http://www.w3.org/2000/svg', 'line').toString(); + SVGPolylineElement = document.createElementNS('http://www.w3.org/2000/svg', 'polyline').toString(); + SVGPolygonElement = document.createElementNS('http://www.w3.org/2000/svg', 'polygon').toString(); + + } + +} +ORYX.Editor.checkClassType = function( classInst, classType ) { + + if( ORYX.Editor.SVGClassElementsAreAvailable ){ + return classInst instanceof classType + } else { + return classInst == classType + } +}; +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} + + +new function(){ + + ORYX.Core.UIEnableDrag = function(event, uiObj, option) { + + this.uiObj = uiObj; + var upL = uiObj.bounds.upperLeft(); + + var a = uiObj.node.getScreenCTM(); + this.faktorXY= {x: a.a, y: a.d}; + + this.scrollNode = uiObj.node.ownerSVGElement.parentNode.parentNode; + + this.offSetPosition = { + x: Event.pointerX(event) - (upL.x * this.faktorXY.x), + y: Event.pointerY(event) - (upL.y * this.faktorXY.y)}; + + this.offsetScroll = {x:this.scrollNode.scrollLeft,y:this.scrollNode.scrollTop}; + + this.dragCallback = ORYX.Core.UIDragCallback.bind(this); + this.disableCallback = ORYX.Core.UIDisableDrag.bind(this); + + this.movedCallback = option ? option.movedCallback : undefined; + this.upCallback = option ? option.upCallback : undefined; + + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.disableCallback, true); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.dragCallback , false); + + }; + + ORYX.Core.UIDragCallback = function(event) { + + var position = { + x: Event.pointerX(event) - this.offSetPosition.x, + y: Event.pointerY(event) - this.offSetPosition.y} + + position.x -= this.offsetScroll.x - this.scrollNode.scrollLeft; + position.y -= this.offsetScroll.y - this.scrollNode.scrollTop; + + position.x /= this.faktorXY.x; + position.y /= this.faktorXY.y; + + this.uiObj.bounds.moveTo(position); + //this.uiObj.update(); + + if(this.movedCallback) + this.movedCallback(event); + + //Event.stop(event); + + }; + + ORYX.Core.UIDisableDrag = function(event) { + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.dragCallback, false); + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.disableCallback, true); + + if(this.upCallback) + this.upCallback(event); + + this.upCallback = undefined; + this.movedCallback = undefined; + + Event.stop(event); + }; + + + + + /** + * Implements a command to move docker by an offset. + * + * @class ORYX.Core.MoveDockersCommand + * @param {Object} object An object with the docker id as key and docker and offset as object value + * + */ + ORYX.Core.MoveDockersCommand = ORYX.Core.Command.extend({ + construct: function(dockers){ + this.dockers = $H(dockers); + this.edges = $H({}); + }, + execute: function(){ + if (this.changes) { + this.executeAgain(); + return; + } else { + this.changes = $H({}); + } + + this.dockers.values().each(function(docker){ + var edge = docker.docker.parent; + if (!edge){ return } + + if (!this.changes[edge.getId()]) { + this.changes[edge.getId()] = { + edge : edge, + oldDockerPositions : edge.dockers.map(function(r){ return r.bounds.center() }) + } + } + docker.docker.bounds.moveBy(docker.offset); + this.edges[edge.getId()] = edge; + docker.docker.update(); + }.bind(this)); + this.edges.each(function(edge){ + this.updateEdge(edge.value); + if (this.changes[edge.value.getId()]) + this.changes[edge.value.getId()].dockerPositions = edge.value.dockers.map(function(r){ return r.bounds.center() }) + }.bind(this)); + }, + updateEdge: function(edge){ + edge._update(true); + [edge.getOutgoingShapes(), edge.getIncomingShapes()].flatten().invoke("_update", [true]) + }, + executeAgain: function(){ + this.changes.values().each(function(change){ + // Reset the dockers + this.removeAllDocker(change.edge); + change.dockerPositions.each(function(pos, i){ + if (i==0||i==change.dockerPositions.length-1){ return } + var docker = change.edge.createDocker(undefined, pos); + docker.bounds.centerMoveTo(pos); + docker.update(); + }.bind(this)); + this.updateEdge(change.edge); + }.bind(this)); + }, + rollback: function(){ + this.changes.values().each(function(change){ + // Reset the dockers + this.removeAllDocker(change.edge); + change.oldDockerPositions.each(function(pos, i){ + if (i==0||i==change.oldDockerPositions.length-1){ return } + var docker = change.edge.createDocker(undefined, pos); + docker.bounds.centerMoveTo(pos); + docker.update(); + }.bind(this)); + this.updateEdge(change.edge); + }.bind(this)); + }, + removeAllDocker: function(edge){ + edge.dockers.slice(1, edge.dockers.length-1).each(function(docker){ + edge.removeDocker(docker); + }) + } + }); + +}(); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} + +/** + * @classDescription Base class for Shapes. + * @extends ORYX.Core.AbstractShape + */ +ORYX.Core.Shape = { + + /** + * Constructor + */ + construct: function(options, stencil, facade) { + // call base class constructor + arguments.callee.$.construct.apply(this, arguments); + + this.facade = facade; + this.dockers = []; + this.magnets = []; + + this._defaultMagnet; + + this.incoming = []; + this.outgoing = []; + + this.nodes = []; + + this._dockerChangedCallback = this._dockerChanged.bind(this); + + //Hash map for all labels. Labels are not treated as children of shapes. + this._labels = new Hash(); + + // create SVG node + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", + null, + ['g', {id:"svg-" + this.resourceId}, + ['g', {"class": "stencils"}, + ['g', {"class": "me"}], + ['g', {"class": "children", style:"overflow:hidden"}], + ['g', {"class": "edge"}] + ], + ['g', {"class": "controls"}, + ['g', {"class": "dockers"}], + ['g', {"class": "magnets"}] + ] + ]); + }, + + /** + * If changed flag is set, refresh method is called. + */ + update: function() { + //if(this.isChanged) { + //this.layout(); + //} + }, + + /** + * !!!Not called from any sub class!!! + */ + _update: function() { + + }, + + /** + * Calls the super class refresh method + * and updates the svg elements that are referenced by a property. + */ + refresh: function() { + //call base class refresh method + arguments.callee.$.refresh.apply(this, arguments); + + if(this.node.ownerDocument) { + //adjust SVG to properties' values + var me = this; + this.propertiesChanged.each((function(propChanged) { + if(propChanged.value) { + var prop = this.properties[propChanged.key]; + var property = this.getStencil().property(propChanged.key); + if (property != undefined) { + this.propertiesChanged[propChanged.key] = false; + + //handle choice properties + if(property.type() == ORYX.CONFIG.TYPE_CHOICE) { + //iterate all references to SVG elements + property.refToView().each((function(ref) { + //if property is referencing a label, update the label + if(ref !== "") { + var label = this._labels[this.id + ref]; + if (label && property.item(prop)) { + label.text(property.item(prop).title()); + } + } + }).bind(this)); + + //if the choice's items are referencing SVG elements + // show the selected and hide all other referenced SVG + // elements + var refreshedSvgElements = new Hash(); + property.items().each((function(item) { + item.refToView().each((function(itemRef) { + if(itemRef == "") { return; } + + var svgElem = this.node.ownerDocument.getElementById(this.id + itemRef); + + if(!svgElem) { return; } + + + /* Do not refresh the same svg element multiple times */ + if(!refreshedSvgElements[svgElem.id] || prop == item.value()) { + svgElem.setAttributeNS(null, 'display', ((prop == item.value()) ? 'inherit' : 'none')); + refreshedSvgElements[svgElem.id] = svgElem; + } + + // Reload the href if there is an image-tag + if(ORYX.Editor.checkClassType(svgElem, SVGImageElement)) { + svgElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', svgElem.getAttributeNS('http://www.w3.org/1999/xlink', 'href')); + } + }).bind(this)); + }).bind(this)); + + } else { //handle properties that are not of type choice + //iterate all references to SVG elements + property.refToView().each((function(ref) { + //if the property does not reference an SVG element, + // do nothing + + if(ref === "") { return; } + + var refId = this.id + ref; + + if (property.type() === ORYX.CONFIG.TYPE_KISBPM_MULTIINSTANCE) + { + if (ref === "multiinstance") { + + var svgElemParallel = this.node.ownerDocument.getElementById(this.id + 'parallel'); + if(svgElemParallel) + { + if (prop === 'Parallel') + { + svgElemParallel.setAttributeNS(null, 'display', 'inherit'); + } + else + { + svgElemParallel.setAttributeNS(null, 'display', 'none'); + } + } + + var svgElemSequential = this.node.ownerDocument.getElementById(this.id + 'sequential'); + + if(svgElemSequential) + { + if (prop === 'Sequential') + { + svgElemSequential.setAttributeNS(null, 'display', 'inherit'); + } + else + { + svgElemSequential.setAttributeNS(null, 'display', 'none'); + } + } + } + return; + + } + else if (property.type() === "cancelactivity") + { + var svgElemFrame = this.node.ownerDocument.getElementById(this.id + 'frame'); + var svgElemFrame2 = this.node.ownerDocument.getElementById(this.id + 'frame2'); + + if (prop === 'true') + { + svgElemFrame.setAttributeNS(null, 'display', 'inherit'); + svgElemFrame2.setAttributeNS(null, 'display', 'inherit'); + } + else + { + svgElemFrame.setAttributeNS(null, 'display', 'none'); + svgElemFrame2.setAttributeNS(null, 'display', 'none'); + } + } + + //get the SVG element + var svgElem = this.node.ownerDocument.getElementById(refId); + + //if the SVG element can not be found + if(!svgElem || !(svgElem.ownerSVGElement)) { + //if the referenced SVG element is a SVGAElement, it cannot + // be found with getElementById (Firefox bug). + // this is a work around + if(property.type() === ORYX.CONFIG.TYPE_URL || property.type() === ORYX.CONFIG.TYPE_DIAGRAM_LINK) { + var svgElems = this.node.ownerDocument.getElementsByTagNameNS('http://www.w3.org/2000/svg', 'a'); + + svgElem = $A(svgElems).find(function(elem) { + return elem.getAttributeNS(null, 'id') === refId; + }); + + if(!svgElem) { return; } + } else { + //this.propertiesChanged[propChanged.key] = true; + return; + } + } + + if (property.complexAttributeToView()) { + var label = this._labels[refId]; + if (label) { + try { + propJson = prop.evalJSON(); + var value = propJson[property.complexAttributeToView()] + label.text(value ? value : prop); + } catch (e) { + label.text(prop); + } + } + + } else { + switch (property.type()) { + case ORYX.CONFIG.TYPE_BOOLEAN: + if (typeof prop == "string") + prop = prop === "true" + + svgElem.setAttributeNS(null, 'display', (!(prop === property.inverseBoolean())) ? 'inherit' : 'none'); + + break; + case ORYX.CONFIG.TYPE_COLOR: + if(property.fill()) { + if (svgElem.tagName.toLowerCase() === "stop"){ + if (prop){ + + if (property.lightness() && property.lightness() !== 1){ + prop = ORYX.Utils.adjustLightness(prop, property.lightness()); + } + + svgElem.setAttributeNS(null, "stop-color", prop); + + // Adjust stop color of the others + if (svgElem.parentNode.tagName.toLowerCase() === "radialgradient"){ + ORYX.Utils.adjustGradient(svgElem.parentNode, svgElem); + } + } + + // If there is no value, set opaque + if (svgElem.parentNode.tagName.toLowerCase() === "radialgradient"){ + $A(svgElem.parentNode.getElementsByTagName('stop')).each(function(stop){ + stop.setAttributeNS(null, "stop-opacity", prop ? stop.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, 'default-stop-opacity') || 1 : 0); + }.bind(this)) + } + } else { + svgElem.setAttributeNS(null, 'fill', prop); + } + } + if(property.stroke()) { + svgElem.setAttributeNS(null, 'stroke', prop); + } + break; + case ORYX.CONFIG.TYPE_STRING: + var label = this._labels[refId]; + if (label) { + label.text(prop); + } + break; + case ORYX.CONFIG.TYPE_EXPRESSION: + var label = this._labels[refId]; + if (label) { + label.text(prop); + } + break; + case ORYX.CONFIG.TYPE_DATASOURCE: + var label = this._labels[refId]; + if (label) { + label.text(prop); + } + break; + case ORYX.CONFIG.TYPE_INTEGER: + var label = this._labels[refId]; + if (label) { + label.text(prop); + } + break; + case ORYX.CONFIG.TYPE_FLOAT: + if(property.fillOpacity()) { + svgElem.setAttributeNS(null, 'fill-opacity', prop); + } + if(property.strokeOpacity()) { + svgElem.setAttributeNS(null, 'stroke-opacity', prop); + } + if(!property.fillOpacity() && !property.strokeOpacity()) { + var label = this._labels[refId]; + if (label) { + label.text(prop); + } + } + break; + + case ORYX.CONFIG.TYPE_FORM_LINK: + if (ref == "pimg") { + var onclickAttr = svgElem.getAttributeNodeNS('', 'onclick'); + if(onclickAttr) { + if(prop && ("" + prop).length > 0) { + onclickAttr.textContent = "window.location = '../service/editor?id=" + prop + "_form'"; + } else { + newFormFacade = this.facade; + onclickAttr.textContent = "displayNewFormDialog('" + this.resourceId + "');"; + } + } + } else if (ref == "linkIndicator") { + if (prop && prop.length > 0) { + svgElem.setAttributeNS(null, 'display', 'inherit'); + } else { + svgElem.setAttributeNS(null, 'display', 'none'); + } + } + break; + case ORYX.CONFIG.TYPE_URL: + case ORYX.CONFIG.TYPE_DIAGRAM_LINK: + //TODO what is the dafault path? + var hrefAttr = svgElem.getAttributeNodeNS('http://www.w3.org/1999/xlink', 'xlink:href'); + if(hrefAttr) { + hrefAttr.textContent = prop; + } else { + svgElem.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', prop); + } + break; + + } + } + }).bind(this)); + + + } + } + + } + }).bind(this)); + + //update labels + this._labels.values().each(function(label) { + label.update(); + }); + } + }, + + layout: function() { + //this.getStencil().layout(this) + var layoutEvents = this.getStencil().layout() + if (layoutEvents) { + layoutEvents.each(function(event) { + + // setup additional attributes + event.shape = this; + event.forceExecution = true; + + // do layouting + this._delegateEvent(event); + }.bind(this)) + + } + }, + + /** + * Returns an array of Label objects. + */ + getLabels: function() { + return this._labels.values(); + }, + + /** + * Returns the label for a given ref + * @return {ORYX.Core.Label} Returns null if there is no label + */ + getLabel: function(ref){ + if (!ref){ + return null; + } + return (this._labels.find(function(o){ + return o.key.endsWith(ref); + })||{}).value || null; + }, + + /** + * Hides all related labels + * + */ + hideLabels: function(){ + this.getLabels().invoke("hide"); + }, + + /** + * Shows all related labels + * + */ + showLabels: function(){ + var labels = this.getLabels(); + labels.invoke("show"); + labels.each(function(label) { + label.update(); + }); + }, + + setOpacity: function(value, animate){ + + value = Math.max(Math.min((typeof value == "number" ? value : 1.0), 1.0), 0.0); + + if (value !== 1.0){ + value = String(value); + this.node.setAttributeNS(null, "fill-opacity", value) + this.node.setAttributeNS(null, "stroke-opacity", value) + } else { + this.node.removeAttributeNS(null, "fill-opacity"); + this.node.removeAttributeNS(null, "stroke-opacity"); + } + }, + + /** + * Returns an array of dockers of this object. + */ + getDockers: function() { + return this.dockers; + }, + + getMagnets: function() { + return this.magnets; + }, + + getDefaultMagnet: function() { + if(this._defaultMagnet) { + return this._defaultMagnet; + } else if (this.magnets.length > 0) { + return this.magnets[0]; + } else { + return undefined; + } + }, + + getParentShape: function() { + return this.parent; + }, + + getIncomingShapes: function(iterator) { + if(iterator) { + this.incoming.each(iterator); + } + return this.incoming; + }, + + getIncomingNodes: function(iterator) { + return this.incoming.select(function(incoming){ + var isNode = (incoming instanceof ORYX.Core.Node); + if(isNode && iterator) iterator(incoming); + return isNode; + }); + }, + + + getOutgoingShapes: function(iterator) { + if(iterator) { + this.outgoing.each(iterator); + } + return this.outgoing; + }, + + getOutgoingNodes: function(iterator) { + return this.outgoing.select(function(out){ + var isNode = (out instanceof ORYX.Core.Node); + if(isNode && iterator) iterator(out); + return isNode; + }); + }, + + getAllDockedShapes: function(iterator) { + var result = this.incoming.concat(this.outgoing); + if(iterator) { + result.each(iterator); + } + return result + }, + + getCanvas: function() { + if(this.parent instanceof ORYX.Core.Canvas) { + return this.parent; + } else if(this.parent instanceof ORYX.Core.Shape) { + return this.parent.getCanvas(); + } else { + return undefined; + } + }, + + /** + * + * @param {Object} deep + * @param {Object} iterator + */ + getChildNodes: function(deep, iterator) { + if(!deep && !iterator) { + return this.nodes.clone(); + } else { + var result = []; + this.nodes.each(function(uiObject) { + if(!uiObject.isVisible){return} + if(iterator) { + iterator(uiObject); + } + result.push(uiObject); + + if(deep && uiObject instanceof ORYX.Core.Shape) { + result = result.concat(uiObject.getChildNodes(deep, iterator)); + } + }); + + return result; + } + }, + + /** + * Overrides the UIObject.add method. Adds uiObject to the correct sub node. + * @param {UIObject} uiObject + * @param {Number} index + */ + add: function(uiObject, index, silent) { + //parameter has to be an UIObject, but + // must not be an Edge. + if(uiObject instanceof ORYX.Core.UIObject + && !(uiObject instanceof ORYX.Core.Edge)) { + + if (!(this.children.member(uiObject))) { + //if uiObject is child of another parent, remove it from that parent. + if(uiObject.parent) { + uiObject.parent.remove(uiObject, true); + } + + //add uiObject to this Shape + if(index != undefined) + this.children.splice(index, 0, uiObject); + else + this.children.push(uiObject); + + //set parent reference + uiObject.parent = this; + + //add uiObject.node to this.node depending on the type of uiObject + var parent; + if(uiObject instanceof ORYX.Core.Node) { + parent = this.node.childNodes[0].childNodes[1]; + this.nodes.push(uiObject); + } else if(uiObject instanceof ORYX.Core.Controls.Control) { + var ctrls = this.node.childNodes[1]; + if(uiObject instanceof ORYX.Core.Controls.Docker) { + parent = ctrls.childNodes[0]; + if (this.dockers.length >= 2){ + this.dockers.splice(index!==undefined?Math.min(index, this.dockers.length-1):this.dockers.length-1, 0, uiObject); + } else { + this.dockers.push(uiObject); + } + } else if(uiObject instanceof ORYX.Core.Controls.Magnet) { + parent = ctrls.childNodes[1]; + this.magnets.push(uiObject); + } else { + parent = ctrls; + } + } else { //UIObject + parent = this.node; + } + + if(index != undefined && index < parent.childNodes.length) + uiObject.node = parent.insertBefore(uiObject.node, parent.childNodes[index]); + else + uiObject.node = parent.appendChild(uiObject.node); + + this._changed(); + //uiObject.bounds.registerCallback(this._changedCallback); + + + if(this.eventHandlerCallback && silent !== true) + this.eventHandlerCallback({type:ORYX.CONFIG.EVENT_SHAPEADDED,shape:uiObject}) + + } else { + + ORYX.Log.warn("add: ORYX.Core.UIObject is already a child of this object."); + } + } else { + + ORYX.Log.warn("add: Parameter is not of type ORYX.Core.UIObject."); + } + }, + + /** + * Overrides the UIObject.remove method. Removes uiObject. + * @param {UIObject} uiObject + */ + remove: function(uiObject, silent) { + //if uiObject is a child of this object, remove it. + if (this.children.member(uiObject)) { + //remove uiObject from children + var parent = uiObject.parent; + + this.children = this.children.without(uiObject); + + //delete parent reference of uiObject + uiObject.parent = undefined; + + //delete uiObject.node from this.node + if(uiObject instanceof ORYX.Core.Shape) { + if(uiObject instanceof ORYX.Core.Edge) { + uiObject.removeMarkers(); + uiObject.node = this.node.childNodes[0].childNodes[2].removeChild(uiObject.node); + } else { + uiObject.node = this.node.childNodes[0].childNodes[1].removeChild(uiObject.node); + this.nodes = this.nodes.without(uiObject); + } + } else if(uiObject instanceof ORYX.Core.Controls.Control) { + if (uiObject instanceof ORYX.Core.Controls.Docker) { + uiObject.node = this.node.childNodes[1].childNodes[0].removeChild(uiObject.node); + this.dockers = this.dockers.without(uiObject); + } else if (uiObject instanceof ORYX.Core.Controls.Magnet) { + uiObject.node = this.node.childNodes[1].childNodes[1].removeChild(uiObject.node); + this.magnets = this.magnets.without(uiObject); + } else { + uiObject.node = this.node.childNodes[1].removeChild(uiObject.node); + } + } + + if(this.eventHandlerCallback && silent !== true) + this.eventHandlerCallback({type: ORYX.CONFIG.EVENT_SHAPEREMOVED, shape: uiObject, parent: parent}); + + this._changed(); + //uiObject.bounds.unregisterCallback(this._changedCallback); + } else { + + ORYX.Log.warn("remove: ORYX.Core.UIObject is not a child of this object."); + } + }, + + /** + * Calculate the Border Intersection Point between two points + * @param {PointA} + * @param {PointB} + */ + getIntersectionPoint: function() { + + var pointAX, pointAY, pointBX, pointBY; + + // Get the the two Points + switch(arguments.length) { + case 2: + pointAX = arguments[0].x; + pointAY = arguments[0].y; + pointBX = arguments[1].x; + pointBY = arguments[1].y; + break; + case 4: + pointAX = arguments[0]; + pointAY = arguments[1]; + pointBX = arguments[2]; + pointBY = arguments[3]; + break; + default: + throw "getIntersectionPoints needs two or four arguments"; + } + + + + // Defined an include and exclude point + var includePointX, includePointY, excludePointX, excludePointY; + + var bounds = this.absoluteBounds(); + + if(this.isPointIncluded(pointAX, pointAY, bounds)){ + includePointX = pointAX; + includePointY = pointAY; + } else { + excludePointX = pointAX; + excludePointY = pointAY; + } + + if(this.isPointIncluded(pointBX, pointBY, bounds)){ + includePointX = pointBX; + includePointY = pointBY; + } else { + excludePointX = pointBX; + excludePointY = pointBY; + } + + // If there is no inclue or exclude Shape, than return + if(!includePointX || !includePointY || !excludePointX || !excludePointY) { + return undefined; + } + + var midPointX = 0; + var midPointY = 0; + + var refPointX, refPointY; + + var minDifferent = 1; + // Get the UpperLeft and LowerRight + //var ul = bounds.upperLeft(); + //var lr = bounds.lowerRight(); + + var i = 0; + + while(true) { + // Calculate the midpoint of the current to points + var midPointX = Math.min(includePointX, excludePointX) + ((Math.max(includePointX, excludePointX) - Math.min(includePointX, excludePointX)) / 2.0); + var midPointY = Math.min(includePointY, excludePointY) + ((Math.max(includePointY, excludePointY) - Math.min(includePointY, excludePointY)) / 2.0); + + + // Set the new midpoint by the means of the include of the bounds + if(this.isPointIncluded(midPointX, midPointY, bounds)){ + includePointX = midPointX; + includePointY = midPointY; + } else { + excludePointX = midPointX; + excludePointY = midPointY; + } + + // Calc the length of the line + var length = Math.sqrt(Math.pow(includePointX - excludePointX, 2) + Math.pow(includePointY - excludePointY, 2)) + // Calc a point one step from the include point + refPointX = includePointX + ((excludePointX - includePointX) / length), + refPointY = includePointY + ((excludePointY - includePointY) / length) + + + // If the reference point not in the bounds, break + if(!this.isPointIncluded(refPointX, refPointY, bounds)) { + break + } + + + } + + // Return the last includepoint + return {x:refPointX , y:refPointY}; + }, + + + + /** + * Calculate if the point is inside the Shape + * @param {PointX} + * @param {PointY} + */ + isPointIncluded: function(){ + return false + }, + + /** + * Returns TRUE if the given node + * is a child node of the shapes node + * @param {Element} node + * @return {Boolean} + * + */ + containsNode: function(node){ + var me = this.node.firstChild.firstChild; + while(node){ + if (node == me){ + return true; + } + node = node.parentNode; + } + return false + }, + + /** + * Calculate if the point is over an special offset area + * @param {Point} + */ + isPointOverOffset: function(){ + return this.isPointIncluded.apply( this , arguments ) + }, + + _dockerChanged: function() { + + }, + + /** + * Create a Docker for this Edge + * + */ + createDocker: function(index, position) { + var docker = new ORYX.Core.Controls.Docker({eventHandlerCallback: this.eventHandlerCallback}); + docker.bounds.registerCallback(this._dockerChangedCallback); + if (position) { + docker.bounds.centerMoveTo(position); + } + this.add(docker, index); + + return docker + }, + + /** + * Get the serialized object + * return Array with hash-entrees (prefix, name, value) + * Following values will given: + * Bounds + * Outgoing Shapes + * Parent + */ + serialize: function() { + var serializedObject = arguments.callee.$.serialize.apply(this); + + // Add the bounds + serializedObject.push({name: 'bounds', prefix:'oryx', value: this.bounds.serializeForERDF(), type: 'literal'}); + + // Add the outgoing shapes + this.getOutgoingShapes().each((function(followingShape){ + serializedObject.push({name: 'outgoing', prefix:'raziel', value: '#'+ERDF.__stripHashes(followingShape.resourceId), type: 'resource'}); + }).bind(this)); + + // Add the parent shape, if the parent not the canvas + //if(this.parent instanceof ORYX.Core.Shape){ + serializedObject.push({name: 'parent', prefix:'raziel', value: '#'+ERDF.__stripHashes(this.parent.resourceId), type: 'resource'}); + //} + + return serializedObject; + }, + + + deserialize: function(serialize, json){ + arguments.callee.$.deserialize.apply(this, arguments); + + // Set the Bounds + var bounds = serialize.find(function(ser){ return 'oryx-bounds' === (ser.prefix+"-"+ser.name) }); + if (bounds) { + var b = bounds.value.replace(/,/g, " ").split(" ").without(""); + if (this instanceof ORYX.Core.Edge) { + if (!this.dockers.first().isChanged) + this.dockers.first().bounds.centerMoveTo(parseFloat(b[0]), parseFloat(b[1])); + if (!this.dockers.last().isChanged) + this.dockers.last().bounds.centerMoveTo(parseFloat(b[2]), parseFloat(b[3])); + } else { + this.bounds.set(parseFloat(b[0]), parseFloat(b[1]), parseFloat(b[2]), parseFloat(b[3])); + } + } + + if (json && json.labels instanceof Array){ + json.labels.each(function(slabel){ + var label = this.getLabel(slabel.ref); + if (label){ + label.deserialize(slabel, this); + } + }.bind(this)) + } + }, + + toJSON: function(){ + var json = arguments.callee.$.toJSON.apply(this, arguments); + + var labels = [], id = this.id; + this._labels.each(function(obj){ + var slabel = obj.value.serialize(); + if (slabel){ + slabel.ref = obj.key.replace(id, ''); + labels.push(slabel); + } + }); + + if (labels.length > 0){ + json.labels = labels; + } + return json; + }, + + + /** + * Private methods. + */ + + /** + * Child classes have to overwrite this method for initializing a loaded + * SVG representation. + * @param {SVGDocument} svgDocument + */ + _init: function(svgDocument) { + //adjust ids + this._adjustIds(svgDocument, 0); + }, + + _adjustIds: function(element, idIndex) { + if(element instanceof Element) { + var eid = element.getAttributeNS(null, 'id'); + if(eid && eid !== "") { + element.setAttributeNS(null, 'id', this.id + eid); + } else { + element.setAttributeNS(null, 'id', this.id + "_" + this.id + "_" + idIndex); + idIndex++; + } + + // Replace URL in fill attribute + var fill = element.getAttributeNS(null, 'fill'); + if (fill&&fill.include("url(#")){ + fill = fill.replace(/url\(#/g, 'url(#'+this.id); + element.setAttributeNS(null, 'fill', fill); + } + + if(element.hasChildNodes()) { + for(var i = 0; i < element.childNodes.length; i++) { + idIndex = this._adjustIds(element.childNodes[i], idIndex); + } + } + } + return idIndex; + }, + + toString: function() { return "ORYX.Core.Shape " + this.getId() } +}; +ORYX.Core.Shape = ORYX.Core.AbstractShape.extend(ORYX.Core.Shape);/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.Controls) {ORYX.Core.Controls = {};} + + +/** + * @classDescription Abstract base class for all Controls. + */ +ORYX.Core.Controls.Control = ORYX.Core.UIObject.extend({ + + toString: function() { return "Control " + this.id; } + });/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.Controls) {ORYX.Core.Controls = {};} + + +/** + * @classDescription Represents a movable docker that can be bound to a shape. Dockers are used + * for positioning shape objects. + * @extends {Control} + * + * TODO absoluteXY und absoluteCenterXY von einem Docker liefern falsche Werte!!! + */ +ORYX.Core.Controls.Docker = ORYX.Core.Controls.Control.extend({ + /** + * Constructor + */ + construct: function() { + arguments.callee.$.construct.apply(this, arguments); + + this.isMovable = true; // Enables movability + this.bounds.set(0, 0, 16, 16); // Set the bounds + this.referencePoint = undefined; // Refrenzpoint + this._dockedShapeBounds = undefined; + this._dockedShape = undefined; + this._oldRefPoint1 = undefined; + this._oldRefPoint2 = undefined; + + //this.anchors = []; + this.anchorLeft; + this.anchorRight; + this.anchorTop; + this.anchorBottom; + + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", + null, + ['g']); + + // The DockerNode reprasentation + this._dockerNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", + this.node, + ['g', {"pointer-events":"all"}, + ['circle', {cx:"8", cy:"8", r:"8", stroke:"none", fill:"none"}], + ['circle', {cx:"8", cy:"8", r:"3", stroke:"black", fill:"red", "stroke-width":"1"}] + ]); + + // The ReferenzNode reprasentation + this._referencePointNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", + this.node, + ['g', {"pointer-events":"none"}, + ['circle', {cx: this.bounds.upperLeft().x, cy: this.bounds.upperLeft().y, r: 3, fill:"red", "fill-opacity":0.4}]]); + + // Hide the Docker + this.hide(); + + //Add to the EventHandler + this.addEventHandlers(this._dockerNode); + + // Buffer the Update Callback for un-/register on Event-Handler + this._updateCallback = this._changed.bind(this); + }, + + update: function() { + // If there have an DockedShape + if(this._dockedShape) { + if(this._dockedShapeBounds && this._dockedShape instanceof ORYX.Core.Node) { + // Calc the delta of width and height of the lastBounds and the current Bounds + var dswidth = this._dockedShapeBounds.width(); + var dsheight = this._dockedShapeBounds.height(); + if(!dswidth) + dswidth = 1; + if(!dsheight) + dsheight = 1; + var widthDelta = this._dockedShape.bounds.width() / dswidth; + var heightDelta = this._dockedShape.bounds.height() / dsheight; + + // If there is an different + if(widthDelta !== 1.0 || heightDelta !== 1.0) { + // Set the delta + this.referencePoint.x *= widthDelta; + this.referencePoint.y *= heightDelta; + } + + // Clone these bounds + this._dockedShapeBounds = this._dockedShape.bounds.clone(); + } + + // Get the first and the last Docker of the parent Shape + var dockerIndex = this.parent.dockers.indexOf(this) + var dock1 = this; + var dock2 = this.parent.dockers.length > 1 ? + (dockerIndex === 0? // If there is the first element + this.parent.dockers[dockerIndex + 1]: // then take the next docker + this.parent.dockers[dockerIndex - 1]): // if not, then take the docker before + undefined; + + // Calculate the first absolute Refenzpoint + var absoluteReferenzPoint1 = dock1.getDockedShape() ? + dock1.getAbsoluteReferencePoint() : + dock1.bounds.center(); + + // Calculate the last absolute Refenzpoint + var absoluteReferenzPoint2 = dock2 && dock2.getDockedShape() ? + dock2.getAbsoluteReferencePoint() : + dock2 ? + dock2.bounds.center() : + undefined; + + // If there is no last absolute Referenzpoint + if(!absoluteReferenzPoint2) { + // Calculate from the middle of the DockedShape + var center = this._dockedShape.absoluteCenterXY(); + var minDimension = this._dockedShape.bounds.width() * this._dockedShape.bounds.height(); + absoluteReferenzPoint2 = { + x: absoluteReferenzPoint1.x + (center.x - absoluteReferenzPoint1.x) * -minDimension, + y: absoluteReferenzPoint1.y + (center.y - absoluteReferenzPoint1.y) * -minDimension + } + } + + var newPoint = undefined; + + /*if (!this._oldRefPoint1 || !this._oldRefPoint2 || + absoluteReferenzPoint1.x !== this._oldRefPoint1.x || + absoluteReferenzPoint1.y !== this._oldRefPoint1.y || + absoluteReferenzPoint2.x !== this._oldRefPoint2.x || + absoluteReferenzPoint2.y !== this._oldRefPoint2.y) {*/ + + // Get the new point for the Docker, calucalted by the intersection point of the Shape and the two points + newPoint = this._dockedShape.getIntersectionPoint(absoluteReferenzPoint1, absoluteReferenzPoint2); + + // If there is new point, take the referencepoint as the new point + if(!newPoint) { + newPoint = this.getAbsoluteReferencePoint(); + } + + if(this.parent && this.parent.parent) { + var grandParentPos = this.parent.parent.absoluteXY(); + newPoint.x -= grandParentPos.x; + newPoint.y -= grandParentPos.y; + } + + // Set the bounds to the new point + this.bounds.centerMoveTo(newPoint) + + this._oldRefPoint1 = absoluteReferenzPoint1; + this._oldRefPoint2 = absoluteReferenzPoint2; + } + /*else { + newPoint = this.bounds.center(); + }*/ + + + // } + + // Call the super class + arguments.callee.$.update.apply(this, arguments); + }, + + /** + * Calls the super class refresh method and updates the view of the docker. + */ + refresh: function() { + arguments.callee.$.refresh.apply(this, arguments); + + // Refresh the dockers node + var p = this.bounds.upperLeft(); + this._dockerNode.setAttributeNS(null, 'transform','translate(' + p.x + ', ' + p.y + ')'); + + // Refresh the referencepoints node + p = Object.clone(this.referencePoint); + + if(p && this._dockedShape){ + var upL + if(this.parent instanceof ORYX.Core.Edge) { + upL = this._dockedShape.absoluteXY(); + } else { + upL = this._dockedShape.bounds.upperLeft(); + } + p.x += upL.x; + p.y += upL.y; + } else { + p = this.bounds.center(); + } + + this._referencePointNode.setAttributeNS(null, 'transform','translate(' + p.x + ', ' + p.y + ')'); + }, + + /** + * Set the reference point + * @param {Object} point + */ + setReferencePoint: function(point) { + // Set the referencepoint + if(this.referencePoint !== point && + (!this.referencePoint || + !point || + this.referencePoint.x !== point.x || + this.referencePoint.y !== point.y)) { + + this.referencePoint = point; + this._changed(); + } + + + // Update directly, because the referencepoint has no influence of the bounds + //this.refresh(); + }, + + /** + * Get the absolute referencepoint + */ + getAbsoluteReferencePoint: function() { + if(!this.referencePoint || !this._dockedShape) { + return undefined; + } else { + var absUL = this._dockedShape.absoluteXY(); + return { + x: this.referencePoint.x + absUL.x, + y: this.referencePoint.y + absUL.y + } + } + }, + + /** + * Set the docked Shape from the docker + * @param {Object} shape + */ + setDockedShape: function(shape) { + + // If there is an old docked Shape + if(this._dockedShape) { + this._dockedShape.bounds.unregisterCallback(this._updateCallback) + + // Delete the Shapes from the incoming and outgoing array + // If this Docker the incoming of the Shape + if(this === this.parent.dockers.first()) { + + this.parent.incoming = this.parent.incoming.without(this._dockedShape); + this._dockedShape.outgoing = this._dockedShape.outgoing.without(this.parent); + + // If this Docker the outgoing of the Shape + } else if (this === this.parent.dockers.last()){ + + this.parent.outgoing = this.parent.outgoing.without(this._dockedShape); + this._dockedShape.incoming = this._dockedShape.incoming.without(this.parent); + + } + + } + + + // Set the new Shape + this._dockedShape = shape; + this._dockedShapeBounds = undefined; + var referencePoint = undefined; + + // If there is an Shape, register the updateCallback if there are changes in the shape bounds + if(this._dockedShape) { + + // Add the Shapes to the incoming and outgoing array + // If this Docker the incoming of the Shape + if(this === this.parent.dockers.first()) { + + this.parent.incoming.push(shape); + shape.outgoing.push(this.parent); + + // If this Docker the outgoing of the Shape + } else if (this === this.parent.dockers.last()){ + + this.parent.outgoing.push(shape); + shape.incoming.push(this.parent); + + } + + // Get the bounds and set the new referencepoint + var bounds = this.bounds; + var absUL = shape.absoluteXY(); + + /*if(shape.parent){ + var b = shape.parent.bounds.upperLeft(); + absUL.x -= b.x; + absUL.y -= b.y; + }*/ + + referencePoint = { + x: bounds.center().x - absUL.x, + y: bounds.center().y - absUL.y + } + + this._dockedShapeBounds = this._dockedShape.bounds.clone(); + + this._dockedShape.bounds.registerCallback(this._updateCallback); + + // Set the color of the docker as docked + this.setDockerColor(ORYX.CONFIG.DOCKER_DOCKED_COLOR); + } else { + // Set the color of the docker as undocked + this.setDockerColor(ORYX.CONFIG.DOCKER_UNDOCKED_COLOR); + } + + // Set the referencepoint + this.setReferencePoint(referencePoint); + this._changed(); + //this.update(); + }, + + /** + * Get the docked Shape + */ + getDockedShape: function() { + return this._dockedShape; + }, + + /** + * Returns TRUE if the docker has a docked shape + */ + isDocked: function() { + return !!this._dockedShape; + }, + + /** + * Set the Color of the Docker + * @param {Object} color + */ + setDockerColor: function(color) { + this._dockerNode.lastChild.setAttributeNS(null, "fill", color); + }, + + preventHiding: function(prevent){ + this._preventHiding = Math.max(0, (this._preventHiding||0) + (prevent ? 1 : -1)); + }, + + /** + * Hides this UIObject and all its children. + */ + hide: function() { + if (this._preventHiding){ + return false; + } + + // Hide docker and reference point + this.node.setAttributeNS(null, 'visibility', 'hidden'); + this._referencePointNode.setAttributeNS(null, 'visibility', 'hidden'); + + this.children.each(function(uiObj) { + uiObj.hide(); + }); + }, + + /** + * Enables visibility of this UIObject and all its children. + */ + show: function() { + // Show docker + this.node.setAttributeNS(null, 'visibility', 'visible'); + + // Hide reference point if the connected shape is an edge + if (this.getDockedShape() instanceof ORYX.Core.Edge){ + this._referencePointNode.setAttributeNS(null, 'visibility', 'hidden'); + } else { + this._referencePointNode.setAttributeNS(null, 'visibility', 'visible'); + } + + this.children.each(function(uiObj) { + uiObj.show(); + }); + }, + + toString: function() { return "Docker " + this.id } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if(!ORYX) {var ORYX = {};} +if(!ORYX.Core) {ORYX.Core = {};} +if(!ORYX.Core.Controls) {ORYX.Core.Controls = {};} + + +/** + * @classDescription Represents a magnet that is part of another shape and can + * be attached to dockers. Magnets are used for linking edge objects + * to other Shape objects. + * @extends {Control} + */ +ORYX.Core.Controls.Magnet = ORYX.Core.Controls.Control.extend({ + + /** + * Constructor + */ + construct: function() { + arguments.callee.$.construct.apply(this, arguments); + + //this.anchors = []; + this.anchorLeft; + this.anchorRight; + this.anchorTop; + this.anchorBottom; + + this.bounds.set(0, 0, 16, 16); + + //graft magnet's root node into owner's control group. + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", + null, + ['g', {"pointer-events":"all"}, + ['circle', {cx:"8", cy:"8", r:"4", stroke:"none", fill:"red", "fill-opacity":"0.3"}], + ]); + + this.hide(); + }, + + update: function() { + arguments.callee.$.update.apply(this, arguments); + + //this.isChanged = true; + }, + + _update: function() { + arguments.callee.$.update.apply(this, arguments); + + //this.isChanged = true; + }, + + refresh: function() { + arguments.callee.$.refresh.apply(this, arguments); + + var p = this.bounds.upperLeft(); + /*if(this.parent) { + var parentPos = this.parent.bounds.upperLeft(); + p.x += parentPos.x; + p.y += parentPos.y; + }*/ + + this.node.setAttributeNS(null, 'transform','translate(' + p.x + ', ' + p.y + ')'); + }, + + show: function() { + //this.refresh(); + arguments.callee.$.show.apply(this, arguments); + }, + + toString: function() { + return "Magnet " + this.id; + } +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * Init namespaces + */ +if (!ORYX) { + var ORYX = {}; +} +if (!ORYX.Core) { + ORYX.Core = {}; +} + +/** + * @classDescription Abstract base class for all Nodes. + * @extends ORYX.Core.Shape + */ +ORYX.Core.Node = { + + /** + * Constructor + * @param options {Object} A container for arguments. + * @param stencil {Stencil} + */ + construct: function(options, stencil, facade){ + arguments.callee.$.construct.apply(this, arguments); + + this.isSelectable = true; + this.isMovable = true; + this._dockerUpdated = false; + this.facade = facade; + + this._oldBounds = new ORYX.Core.Bounds(); //init bounds with undefined values + this._svgShapes = []; //array of all SVGShape objects of + // SVG representation + + //TODO vielleicht in shape verschieben? + this.minimumSize = undefined; // {width:..., height:...} + this.maximumSize = undefined; + + //TODO vielleicht in shape oder uiobject verschieben? + // vielleicht sogar isResizable ersetzen? + this.isHorizontallyResizable = false; + this.isVerticallyResizable = false; + + this.dataId = undefined; + + this._init(this._stencil.view()); + this.forcedHeight = -1; + }, + + /** + * This method checks whether the shape is resized correctly and calls the + * super class update method. + */ + _update: function(){ + + this.dockers.invoke("update"); + if (this.isChanged) { + + var bounds = this.bounds; + var oldBounds = this._oldBounds; + + if (this.isResized) { + + var widthDelta = bounds.width() / oldBounds.width(); + var heightDelta = bounds.height() / oldBounds.height(); + + //iterate over all relevant svg elements and resize them + this._svgShapes.each(function(svgShape){ + //adjust width + if (svgShape.isHorizontallyResizable) { + svgShape.width = svgShape.oldWidth * widthDelta; + } + //adjust height + if (svgShape.isVerticallyResizable) { + svgShape.height = svgShape.oldHeight * heightDelta; + } + + //check, if anchors are set + var anchorOffset; + var leftIncluded = svgShape.anchorLeft; + var rightIncluded = svgShape.anchorRight; + + if (rightIncluded) { + anchorOffset = oldBounds.width() - (svgShape.oldX + svgShape.oldWidth); + if (leftIncluded) { + svgShape.width = bounds.width() - svgShape.x - anchorOffset; + } + else { + svgShape.x = bounds.width() - (anchorOffset + svgShape.width); + } + } + else + if (!leftIncluded) { + svgShape.x = widthDelta * svgShape.oldX; + if (!svgShape.isHorizontallyResizable) { + svgShape.x = svgShape.x + svgShape.width * widthDelta / 2 - svgShape.width / 2; + } + } + + var topIncluded = svgShape.anchorTop; + var bottomIncluded = svgShape.anchorBottom; + + if (bottomIncluded) { + anchorOffset = oldBounds.height() - (svgShape.oldY + svgShape.oldHeight); + if (topIncluded) { + svgShape.height = bounds.height() - svgShape.y - anchorOffset; + } + else { + // Hack for choreography task layouting + if (!svgShape._isYLocked) { + svgShape.y = bounds.height() - (anchorOffset + svgShape.height); + } + } + } + else + if (!topIncluded) { + svgShape.y = heightDelta * svgShape.oldY; + if (!svgShape.isVerticallyResizable) { + svgShape.y = svgShape.y + svgShape.height * heightDelta / 2 - svgShape.height / 2; + } + } + }); + + //check, if the current bounds is unallowed horizontally or vertically resized + var p = { + x: 0, + y: 0 + }; + if (!this.isHorizontallyResizable && bounds.width() !== oldBounds.width()) { + p.x = oldBounds.width() - bounds.width(); + } + if (!this.isVerticallyResizable && bounds.height() !== oldBounds.height()) { + p.y = oldBounds.height() - bounds.height(); + } + if (p.x !== 0 || p.y !== 0) { + bounds.extend(p); + } + + //check, if the current bounds are between maximum and minimum bounds + p = { + x: 0, + y: 0 + }; + var widthDifference, heightDifference; + if (this.minimumSize) { + + ORYX.Log.debug("Shape (%0)'s min size: (%1x%2)", this, this.minimumSize.width, this.minimumSize.height); + widthDifference = this.minimumSize.width - bounds.width(); + if (widthDifference > 0) { + p.x += widthDifference; + } + heightDifference = this.minimumSize.height - bounds.height(); + if (heightDifference > 0) { + p.y += heightDifference; + } + } + if (this.maximumSize) { + + ORYX.Log.debug("Shape (%0)'s max size: (%1x%2)", this, this.maximumSize.width, this.maximumSize.height); + widthDifference = bounds.width() - this.maximumSize.width; + if (widthDifference > 0) { + p.x -= widthDifference; + } + heightDifference = bounds.height() - this.maximumSize.height; + if (heightDifference > 0) { + p.y -= heightDifference; + } + } + if (p.x !== 0 || p.y !== 0) { + bounds.extend(p); + } + + //update magnets + + var widthDelta = bounds.width() / oldBounds.width(); + var heightDelta = bounds.height() / oldBounds.height(); + + var leftIncluded, rightIncluded, topIncluded, bottomIncluded, center, newX, newY; + + this.magnets.each(function(magnet){ + leftIncluded = magnet.anchorLeft; + rightIncluded = magnet.anchorRight; + topIncluded = magnet.anchorTop; + bottomIncluded = magnet.anchorBottom; + + center = magnet.bounds.center(); + + if (leftIncluded) { + newX = center.x; + } + else + if (rightIncluded) { + newX = bounds.width() - (oldBounds.width() - center.x) + } + else { + newX = center.x * widthDelta; + } + + if (topIncluded) { + newY = center.y; + } + else + if (bottomIncluded) { + newY = bounds.height() - (oldBounds.height() - center.y); + } + else { + newY = center.y * heightDelta; + } + + if (center.x !== newX || center.y !== newY) { + magnet.bounds.centerMoveTo(newX, newY); + } + }); + + //set new position of labels + this.getLabels().each(function(label){ + // Set the position dependings on it anchor + if (!label.isAnchorLeft()) { + if (label.isAnchorRight()) { + label.setX(bounds.width() - (oldBounds.width() - label.oldX)) + } else { + label.setX((label.position?label.position.x:label.x) * widthDelta); + } + } + if (!label.isAnchorTop()) { + if (label.isAnchorBottom()) { + label.setY(bounds.height() - (oldBounds.height() - label.oldY)); + } else { + label.setY((label.position?label.position.y:label.y) * heightDelta); + } + } + + // If there is an position, + // set the origin position as well + if (label.position){ + if (!label.isOriginAnchorLeft()) { + if (label.isOriginAnchorRight()) { + label.setOriginX(bounds.width() - (oldBounds.width() - label.oldX)) + } else { + label.setOriginX(label.x * widthDelta); + } + } + if (!label.isOriginAnchorTop()) { + if (label.isOriginAnchorBottom()) { + label.setOriginY(bounds.height() - (oldBounds.height() - label.oldY)); + } else { + label.setOriginY(label.y * heightDelta); + } + } + } + }); + + //update docker + var docker = this.dockers[0]; + if (docker) { + docker.bounds.unregisterCallback(this._dockerChangedCallback); + if (!this._dockerUpdated) { + docker.bounds.centerMoveTo(this.bounds.center()); + this._dockerUpdated = false; + } + + docker.update(); + docker.bounds.registerCallback(this._dockerChangedCallback); + } + this.isResized = false; + } + + this.refresh(); + + this.isChanged = false; + + this._oldBounds = this.bounds.clone(); + } + + this.children.each(function(value) { + if(!(value instanceof ORYX.Core.Controls.Docker)) { + value._update(); + } + }); + + if (this.dockers.length > 0&&!this.dockers.first().getDockedShape()) { + this.dockers.each(function(docker){ + docker.bounds.centerMoveTo(this.bounds.center()) + }.bind(this)) + } + + /*this.incoming.each((function(edge) { + if(!(this.dockers[0] && this.dockers[0].getDockedShape() instanceof ORYX.Core.Node)) + edge._update(true); + }).bind(this)); + + this.outgoing.each((function(edge) { + if(!(this.dockers[0] && this.dockers[0].getDockedShape() instanceof ORYX.Core.Node)) + edge._update(true); + }).bind(this)); */ + }, + + /** + * This method repositions and resizes the SVG representation + * of the shape. + */ + refresh: function(){ + arguments.callee.$.refresh.apply(this, arguments); + + /** Movement */ + var x = this.bounds.upperLeft().x; + var y = this.bounds.upperLeft().y; + + // Move owner element + this.node.firstChild.setAttributeNS(null, "transform", "translate(" + x + ", " + y + ")"); + // Move magnets + this.node.childNodes[1].childNodes[1].setAttributeNS(null, "transform", "translate(" + x + ", " + y + ")"); + + /** Resize */ + + //iterate over all relevant svg elements and update them + this._svgShapes.each(function(svgShape){ + svgShape.update(); + }); + }, + + _dockerChanged: function(){ + var docker = this.dockers[0]; + + //set the bounds of the the association + this.bounds.centerMoveTo(docker.bounds.center()); + + this._dockerUpdated = true; + //this._update(true); + }, + + /** + * This method traverses a tree of SVGElements and returns + * all SVGShape objects. For each basic shape or path element + * a SVGShape object is initialized. + * + * @param svgNode {SVGElement} + * @return {Array} Array of SVGShape objects + */ + _initSVGShapes: function(svgNode){ + var svgShapes = []; + try { + var svgShape = new ORYX.Core.SVG.SVGShape(svgNode); + svgShapes.push(svgShape); + } + catch (e) { + var abcdef=1 + //do nothing + } + + if (svgNode.hasChildNodes()) { + for (var i = 0; i < svgNode.childNodes.length; i++) { + svgShapes = svgShapes.concat(this._initSVGShapes(svgNode.childNodes[i])); + } + } + + return svgShapes; + }, + + /** + * Calculate if the point is inside the Shape + * @param {PointX} + * @param {PointY} + * @param {absoluteBounds} optional: for performance + */ + isPointIncluded: function(pointX, pointY, absoluteBounds){ + // If there is an arguments with the absoluteBounds + var absBounds = absoluteBounds && absoluteBounds instanceof ORYX.Core.Bounds ? absoluteBounds : this.absoluteBounds(); + + if (!absBounds.isIncluded(pointX, pointY)) { + return false; + } else { + + } + + + //point = Object.clone(point); + var ul = absBounds.upperLeft(); + var x = pointX - ul.x; + var y = pointY - ul.y; + + var i=0; + do { + var isPointIncluded = this._svgShapes[i++].isPointIncluded( x, y ); + } while( !isPointIncluded && i < this._svgShapes.length) + + return isPointIncluded; + + /*return this._svgShapes.any(function(svgShape){ + return svgShape.isPointIncluded(point); + });*/ + }, + + + /** + * Calculate if the point is over an special offset area + * @param {Point} + */ + isPointOverOffset: function( pointX, pointY ){ + var isOverEl = arguments.callee.$.isPointOverOffset.apply( this , arguments ); + + if (isOverEl) { + + // If there is an arguments with the absoluteBounds + var absBounds = this.absoluteBounds(); + absBounds.widen( - ORYX.CONFIG.BORDER_OFFSET ); + + if ( !absBounds.isIncluded( pointX, pointY )) { + return true; + } + } + + return false; + + }, + + serialize: function(){ + var result = arguments.callee.$.serialize.apply(this); + + // Add the docker's bounds + // nodes only have at most one docker! + this.dockers.each((function(docker){ + if (docker.getDockedShape()) { + var center = docker.referencePoint; + center = center ? center : docker.bounds.center(); + result.push({ + name: 'docker', + prefix: 'oryx', + value: $H(center).values().join(','), + type: 'literal' + }); + } + }).bind(this)); + + // Get the spezific serialized object from the stencil + try { + //result = this.getStencil().serialize(this, result); + + var serializeEvent = this.getStencil().serialize(); + + /* + * call serialize callback by reference, result should be found + * in serializeEvent.result + */ + if(serializeEvent.type) { + serializeEvent.shape = this; + serializeEvent.data = result; + serializeEvent.result = undefined; + serializeEvent.forceExecution = true; + + this._delegateEvent(serializeEvent); + + if(serializeEvent.result) { + result = serializeEvent.result; + } + } + } + catch (e) {var abcdef=1 + } + return result; + }, + + deserialize: function(data){ + arguments.callee.$.deserialize.apply(this, arguments); + + try { + //data = this.getStencil().deserialize(this, data); + + var deserializeEvent = this.getStencil().deserialize(); + + /* + * call serialize callback by reference, result should be found + * in serializeEventInfo.result + */ + if(deserializeEvent.type) { + deserializeEvent.shape = this; + deserializeEvent.data = data; + deserializeEvent.result = undefined; + deserializeEvent.forceExecution = true; + + this._delegateEvent(deserializeEvent); + if(deserializeEvent.result) { + data = deserializeEvent.result; + } + } + } + catch (e) {var abcdef=1 + } + + // Set the outgoing shapes + var outgoing = data.findAll(function(ser){ return (ser.prefix+"-"+ser.name) == 'raziel-outgoing'}); + outgoing.each((function(obj){ + // TODO: Look at Canvas + if(!this.parent) {return}; + + // Set outgoing Shape + var next = this.getCanvas().getChildShapeByResourceId(obj.value); + + if(next){ + if(next instanceof ORYX.Core.Edge) { + //Set the first docker of the next shape + next.dockers.first().setDockedShape(this); + next.dockers.first().setReferencePoint(next.dockers.first().bounds.center()); + } else if(next.dockers.length > 0) { //next is a node and next has a docker + next.dockers.first().setDockedShape(this); + //next.dockers.first().setReferencePoint({x: this.bounds.width() / 2.0, y: this.bounds.height() / 2.0}); + } + } + + }).bind(this)); + + if (this.dockers.length === 1) { + var dockerPos; + dockerPos = data.find(function(entry){ + return (entry.prefix + "-" + entry.name === "oryx-dockers"); + }); + + if (dockerPos) { + var points = dockerPos.value.replace(/,/g, " ").split(" ").without("").without("#"); + if (points.length === 2 && this.dockers[0].getDockedShape()) { + this.dockers[0].setReferencePoint({ + x: parseFloat(points[0]), + y: parseFloat(points[1]) + }); + } + else { + this.dockers[0].bounds.centerMoveTo(parseFloat(points[0]), parseFloat(points[1])); + } + } + } + }, + + /** + * This method excepts the SVGDoucment that is the SVG representation + * of this shape. + * The bounds of the shape are calculated, the SVG representation's upper left point + * is moved to 0,0 and it the method sets if this shape is resizable. + * + * @param {SVGDocument} svgDocument + */ + _init: function(svgDocument){ + arguments.callee.$._init.apply(this, arguments); + + var svgNode = svgDocument.getElementsByTagName("g")[0]; //outer most g node + // set all required attributes + var attributeTitle = svgDocument.ownerDocument.createAttribute("title"); + attributeTitle.nodeValue = this.getStencil().title(); + svgNode.setAttributeNode(attributeTitle); + + var attributeId = svgDocument.ownerDocument.createAttribute("id"); + attributeId.nodeValue = this.id; + svgNode.setAttributeNode(attributeId); + + // + var stencilTargetNode = this.node.childNodes[0].childNodes[0]; //<g class=me>" + svgNode = stencilTargetNode.appendChild(svgNode); + + // Add to the EventHandler + this.addEventHandlers(svgNode.parentNode); + + /**set minimum and maximum size*/ + var minSizeAttr = svgNode.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "minimumSize"); + if (minSizeAttr) { + minSizeAttr = minSizeAttr.replace("/,/g", " "); + var minSizeValues = minSizeAttr.split(" "); + minSizeValues = minSizeValues.without(""); + + if (minSizeValues.length > 1) { + this.minimumSize = { + width: parseFloat(minSizeValues[0]), + height: parseFloat(minSizeValues[1]) + }; + } + else { + //set minimumSize to (1,1), so that width and height of the stencil can never be (0,0) + this.minimumSize = { + width: 1, + height: 1 + }; + } + } + + var maxSizeAttr = svgNode.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "maximumSize"); + if (maxSizeAttr) { + maxSizeAttr = maxSizeAttr.replace("/,/g", " "); + var maxSizeValues = maxSizeAttr.split(" "); + maxSizeValues = maxSizeValues.without(""); + + if (maxSizeValues.length > 1) { + this.maximumSize = { + width: parseFloat(maxSizeValues[0]), + height: parseFloat(maxSizeValues[1]) + }; + } + } + + if (this.minimumSize && this.maximumSize && + (this.minimumSize.width > this.maximumSize.width || + this.minimumSize.height > this.maximumSize.height)) { + + //TODO wird verschluckt!!! + throw this + ": Minimum Size must be greater than maxiumSize."; + } + + /**get current bounds and adjust it to upperLeft == (0,0)*/ + //initialize all SVGShape objects + this._svgShapes = this._initSVGShapes(svgNode); + + //get upperLeft and lowerRight of stencil + var upperLeft = { + x: undefined, + y: undefined + }; + var lowerRight = { + x: undefined, + y: undefined + }; + var me = this; + this._svgShapes.each(function(svgShape){ + upperLeft.x = (upperLeft.x !== undefined) ? Math.min(upperLeft.x, svgShape.x) : svgShape.x; + upperLeft.y = (upperLeft.y !== undefined) ? Math.min(upperLeft.y, svgShape.y) : svgShape.y; + lowerRight.x = (lowerRight.x !== undefined) ? Math.max(lowerRight.x, svgShape.x + svgShape.width) : svgShape.x + svgShape.width; + lowerRight.y = (lowerRight.y !== undefined) ? Math.max(lowerRight.y, svgShape.y + svgShape.height) : svgShape.y + svgShape.height; + + /** set if resizing is enabled */ + //TODO isResizable durch die beiden anderen booleans ersetzen? + if (svgShape.isHorizontallyResizable) { + me.isHorizontallyResizable = true; + me.isResizable = true; + } + if (svgShape.isVerticallyResizable) { + me.isVerticallyResizable = true; + me.isResizable = true; + } + if (svgShape.anchorTop && svgShape.anchorBottom) { + me.isVerticallyResizable = true; + me.isResizable = true; + } + if (svgShape.anchorLeft && svgShape.anchorRight) { + me.isHorizontallyResizable = true; + me.isResizable = true; + } + }); + + //move all SVGShapes by -upperLeft + this._svgShapes.each(function(svgShape){ + svgShape.x -= upperLeft.x; + svgShape.y -= upperLeft.y; + svgShape.update(); + }); + + //set bounds of shape + //the offsets are also needed for positioning the magnets and the docker + var offsetX = upperLeft.x; + var offsetY = upperLeft.y; + + lowerRight.x -= offsetX; + lowerRight.y -= offsetY; + upperLeft.x = 0; + upperLeft.y = 0; + + //prevent that width or height of initial bounds is 0 + if (lowerRight.x === 0) { + lowerRight.x = 1; + } + if (lowerRight.y === 0) { + lowerRight.y = 1; + } + + this._oldBounds.set(upperLeft, lowerRight); + this.bounds.set(upperLeft, lowerRight); + + /**initialize magnets */ + + var magnets = svgDocument.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_ORYX, "magnets"); + + if (magnets && magnets.length > 0) { + + magnets = $A(magnets[0].getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_ORYX, "magnet")); + + var me = this; + magnets.each(function(magnetElem){ + var magnet = new ORYX.Core.Controls.Magnet({ + eventHandlerCallback: me.eventHandlerCallback + }); + var cx = parseFloat(magnetElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cx")); + var cy = parseFloat(magnetElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cy")); + magnet.bounds.centerMoveTo({ + x: cx - offsetX, + y: cy - offsetY + }); + + //get anchors + var anchors = magnetElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "anchors"); + if (anchors) { + anchors = anchors.replace("/,/g", " "); + anchors = anchors.split(" ").without(""); + for(var i = 0; i < anchors.length; i++) { + switch(anchors[i].toLowerCase()) { + case "left": + magnet.anchorLeft = true; + break; + case "right": + magnet.anchorRight = true; + break; + case "top": + magnet.anchorTop = true; + break; + case "bottom": + magnet.anchorBottom = true; + break; + } + } + } + + me.add(magnet); + + //check, if magnet is default magnet + if (!this._defaultMagnet) { + var defaultAttr = magnetElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "default"); + if (defaultAttr && defaultAttr.toLowerCase() === "yes") { + me._defaultMagnet = magnet; + } + } + }); + } + else { + // Add a Magnet in the Center of Shape + var magnet = new ORYX.Core.Controls.Magnet(); + magnet.bounds.centerMoveTo(this.bounds.width() / 2, this.bounds.height() / 2); + this.add(magnet); + } + + /**initialize docker */ + var dockerElem = svgDocument.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_ORYX, "docker"); + + if (dockerElem && dockerElem.length > 0) { + dockerElem = dockerElem[0]; + var docker = this.createDocker(); + var cx = parseFloat(dockerElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cx")); + var cy = parseFloat(dockerElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cy")); + docker.bounds.centerMoveTo({ + x: cx - offsetX, + y: cy - offsetY + }); + + //get anchors + var anchors = dockerElem.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "anchors"); + if (anchors) { + anchors = anchors.replace("/,/g", " "); + anchors = anchors.split(" ").without(""); + + for(var i = 0; i < anchors.length; i++) { + switch(anchors[i].toLowerCase()) { + case "left": + docker.anchorLeft = true; + break; + case "right": + docker.anchorRight = true; + break; + case "top": + docker.anchorTop = true; + break; + case "bottom": + docker.anchorBottom = true; + break; + } + } + } + } + + /**initialize labels*/ + var textElems = svgNode.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'text'); + $A(textElems).each((function(textElem){ + var label = new ORYX.Core.SVG.Label({ + textElement: textElem, + shapeId: this.id + }); + label.x -= offsetX; + label.y -= offsetY; + this._labels[label.id] = label; + + label.registerOnChange(this.layout.bind(this)); + + // Only apply fitting on form-components + if(this._stencil.id().indexOf(ORYX.CONFIG.FORM_ELEMENT_ID_PREFIX) == 0) { + label.registerOnChange(this.fitToLabels.bind(this)); + } + + }).bind(this)); + }, + + fitToLabels: function() { + var y = 0; + + this.getLabels().each(function(label){ + var lr = label.getY() + label.getHeight(); + if(lr > y) { + y = lr; + } + }); + + var bounds = this.bounds; + var boundsChanged = false; + + if(this.minimumSize) { + // Check if y-value exceeds the min-value. If not, stick to this value. + var minHeight = this.minimumSize.height; + if(y < minHeight && bounds.height() > minHeight && minHeight > this.forcedHeight) { + bounds.set(bounds.upperLeft().x, bounds.upperLeft().y, bounds.lowerRight().x, bounds.upperLeft().y + minHeight); + boundsChanged = true; + } else if(y > minHeight && bounds.height() != y && y > this.forcedHeight){ + bounds.set(bounds.upperLeft().x, bounds.upperLeft().y, bounds.lowerRight().x, bounds.upperLeft().y + y); + boundsChanged = true; + } else if(bounds.height() > this.forcedHeight && this.forcedHeight > 0) { + bounds.set(bounds.upperLeft().x, bounds.upperLeft().y, bounds.lowerRight().x, bounds.upperLeft().y + this.forcedHeight); + boundsChanged = true; + } + } + + if(boundsChanged) { + // Force facade to re-layout since bounds are changed AFTER layout has been performed + if(this.facade.getCanvas() != null) { + this.facade.getCanvas().update(); + } + + // Re-select if needed to force the select + if(this.facade.getSelection().member(this)) { + var selectedNow = this.facade.getSelection(); + this.facade.setSelection([]); + this.facade.setSelection(selectedNow); + } + } + }, + + /** + * Override the Method, that a docker is not shown + * + */ + createDocker: function() { + var docker = new ORYX.Core.Controls.Docker({eventHandlerCallback: this.eventHandlerCallback}); + docker.bounds.registerCallback(this._dockerChangedCallback); + + this.dockers.push( docker ); + docker.parent = this; + docker.bounds.registerCallback(this._changedCallback); + + return docker + }, + + toString: function(){ + return this._stencil.title() + " " + this.id + } +}; +ORYX.Core.Node = ORYX.Core.Shape.extend(ORYX.Core.Node); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +NAMESPACE_SVG = "http://www.w3.org/2000/svg"; +NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; + + +/** + * Init namespaces + */ +if (!ORYX) { + var ORYX = {}; +} +if (!ORYX.Core) { + ORYX.Core = {}; +} + + +/** + * @classDescription Abstract base class for all connections. + * @extends {ORYX.Core.Shape} + * @param options {Object} + * + * TODO da die verschiebung der Edge nicht ueber eine + * translation gemacht wird, die sich auch auf alle kind UIObjects auswirkt, + * muessen die kinder hier beim verschieben speziell betrachtet werden. + * Das sollte ueberarbeitet werden. + * + */ +ORYX.Core.Edge = { + /** + * Constructor + * @param {Object} options + * @param {Stencil} stencil + */ + construct: function(options, stencil, facade){ + arguments.callee.$.construct.apply(this, arguments); + + this.isMovable = true; + this.isSelectable = true; + + this._dockerUpdated = false; + + this._markers = new Hash(); //a hash map of SVGMarker objects where keys are the marker ids + this._paths = []; + this._interactionPaths = []; + this._dockersByPath = new Hash(); + this._markersByPath = new Hash(); + + /* Data structures to store positioning information of attached child nodes */ + this.attachedNodePositionData = new Hash(); + + //TODO was muss hier initial erzeugt werden? + var stencilNode = this.node.childNodes[0].childNodes[0]; + stencilNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", stencilNode, ['g', { + "pointer-events": "painted" + }]); + + //Add to the EventHandler + this.addEventHandlers(stencilNode.parentNode); + + + this._oldBounds = this.bounds.clone(); + + //load stencil + this._init(this._stencil.view()); + + if (stencil instanceof Array) { + this.deserialize(stencil); + } + + }, + + _update: function(force){ + if(this._dockerUpdated || this.isChanged || force) { + + this.dockers.invoke("update"); + + if (false && (this.bounds.width() === 0 || this.bounds.height() === 0)) { + var width = this.bounds.width(); + var height = this.bounds.height(); + this.bounds.extend({ + x: width === 0 ? 2 : 0, + y: height === 0 ? 2 : 0 + }); + this.bounds.moveBy({ + x: width === 0 ? -1 : 0, + y: height === 0 ? -1 : 0 + }); + + } + + // TODO: Bounds muss abhaengig des Eltern-Shapes gesetzt werden + var upL = this.bounds.upperLeft(); + var oldUpL = this._oldBounds.upperLeft(); + var oldWidth = this._oldBounds.width() === 0 ? this.bounds.width() : this._oldBounds.width(); + var oldHeight = this._oldBounds.height() === 0 ? this.bounds.height() : this._oldBounds.height(); + var diffX = upL.x - oldUpL.x; + var diffY = upL.y - oldUpL.y; + var diffWidth = (this.bounds.width() / oldWidth) || 1; + var diffHeight = (this.bounds.height() / oldHeight) || 1; + + this.dockers.each((function(docker){ + // Unregister on BoundsChangedCallback + docker.bounds.unregisterCallback(this._dockerChangedCallback); + + // If there is any changes at the edge and is there is not an DockersUpdate + // set the new bounds to the docker + if (!this._dockerUpdated) { + docker.bounds.moveBy(diffX, diffY); + + if (diffWidth !== 1 || diffHeight !== 1) { + var relX = docker.bounds.upperLeft().x - upL.x; + var relY = docker.bounds.upperLeft().y - upL.y; + + docker.bounds.moveTo(upL.x + relX * diffWidth, upL.y + relY * diffHeight); + } + } + // Do Docker update and register on DockersBoundChange + docker.update(); + docker.bounds.registerCallback(this._dockerChangedCallback); + + }).bind(this)); + + if (this._dockerUpdated) { + var a = this.dockers.first().bounds.center(); + var b = this.dockers.first().bounds.center(); + + this.dockers.each((function(docker){ + var center = docker.bounds.center(); + a.x = Math.min(a.x, center.x); + a.y = Math.min(a.y, center.y); + b.x = Math.max(b.x, center.x); + b.y = Math.max(b.y, center.y); + }).bind(this)); + + //set the bounds of the the association + this.bounds.set(Object.clone(a), Object.clone(b)); + } + + upL = this.bounds.upperLeft(); oldUpL = this._oldBounds.upperLeft(); + diffWidth = (this.bounds.width() / (oldWidth||this.bounds.width())); diffHeight = (this.bounds.height() / (oldHeight||this.bounds.height())); + diffX = upL.x - oldUpL.x; diffY = upL.y - oldUpL.y; + + //reposition labels + this.getLabels().each(function(label) { + + if (label.getReferencePoint()){ + var ref = label.getReferencePoint(); + var from = ref.segment.from, to = ref.segment.to; + if (!from || !from.parent || !to || !to.parent) { + return; + } + + var fromPosition = from.bounds.center(), toPosition = to.bounds.center(); + + if (fromPosition.x === ref.segment.fromPosition.x && fromPosition.y === ref.segment.fromPosition.y && + toPosition.x === ref.segment.toPosition.x && toPosition.y === ref.segment.toPosition.y && !ref.dirty){ + return; + } + + if (!this.parent.initializingShapes) { + var oldDistance = ORYX.Core.Math.getDistanceBetweenTwoPoints(ref.segment.fromPosition, ref.segment.toPosition, ref.intersection); + var newIntersection = ORYX.Core.Math.getPointBetweenTwoPoints(fromPosition, toPosition, isNaN(oldDistance) ? 0.5 : oldDistance); + + /** + * Set position + */ + // Get the orthogonal identity vector of the current segment + var oiv = ORYX.Core.Math.getOrthogonalIdentityVector(fromPosition, toPosition); + var isHor = Math.abs(oiv.y)===1, isVer = Math.abs(oiv.x)===1; + oiv.x *= ref.distance; oiv.y *= ref.distance; // vector * distance + oiv.x += newIntersection.x; oiv.y += newIntersection.y; // vector + the intersection point + var mx = isHor && ref.orientation && (ref.iorientation||ref.orientation).endsWith("r") ? -label.getWidth() : 0; + var my = isVer && ref.orientation && (ref.iorientation||ref.orientation).startsWith("l") ? -label.getHeight()+2 : 0; + label.setX(oiv.x+mx); label.setY(oiv.y+my); + + // Update the reference point + this.updateReferencePointOfLabel(label, newIntersection, from, to); + } else { + var oiv = ORYX.Core.Math.getOrthogonalIdentityVector(fromPosition, toPosition); + oiv.x *= ref.distance; oiv.y *= ref.distance; // vector * distance + oiv.x += ref.intersection.x; oiv.y += ref.intersection.y; // vector + the intersection point + label.setX(oiv.x); label.setY(oiv.y); + ref.segment.fromPosition = fromPosition; ref.segment.toPosition = toPosition; + } + + return; + } + + // Update label position if no reference point is set + if (label.position && !this.parent.initializingShapes){ + var x = label.position.x + (diffX * (diffWidth||1)); + if (x > this.bounds.lowerRight().x){ + x += this.bounds.width()-(this.bounds.width()/(diffWidth||1)); + } + + var y = label.position.y + (diffY * (diffHeight||1)); + if (y > this.bounds.lowerRight().y){ + y += this.bounds.height()-(this.bounds.height()/(diffHeight||1)); + } + label.setX(x);label.setY(y); + return; + } + + switch (label.getEdgePosition()) { + case "starttop": + var angle = this._getAngle(this.dockers[0], this.dockers[1]); + var pos = this.dockers.first().bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("left"); + label.verticalAlign("bottom"); + label.x = pos.x + label.getOffsetTop(); + label.y = pos.y - label.getOffsetTop(); + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("right"); + label.verticalAlign("bottom"); + label.x = pos.x - label.getOffsetTop(); + label.y = pos.y - label.getOffsetTop(); + label.rotate(180 - angle, pos); + } + + break; + + case "startmiddle": + var angle = this._getAngle(this.dockers[0], this.dockers[1]); + var pos = this.dockers.first().bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("left"); + label.verticalAlign("bottom"); + label.x = pos.x + 2; + label.y = pos.y + 4; + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("right"); + label.verticalAlign("bottom"); + label.x = pos.x + 1; + label.y = pos.y + 4; + label.rotate(180 - angle, pos); + } + + break; + + case "startbottom": + var angle = this._getAngle(this.dockers[0], this.dockers[1]); + var pos = this.dockers.first().bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("left"); + label.verticalAlign("top"); + label.x = pos.x + label.getOffsetBottom(); + label.y = pos.y + label.getOffsetBottom(); + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("right"); + label.verticalAlign("top"); + label.x = pos.x - label.getOffsetBottom(); + label.y = pos.y + label.getOffsetBottom(); + label.rotate(180 - angle, pos); + } + + break; + case "midtop": + var numOfDockers = this.dockers.length; + if(numOfDockers%2 == 0) { + var angle = this._getAngle(this.dockers[numOfDockers/2-1], this.dockers[numOfDockers/2]) + var pos1 = this.dockers[numOfDockers/2-1].bounds.center(); + var pos2 = this.dockers[numOfDockers/2].bounds.center(); + var pos = {x:(pos1.x + pos2.x)/2.0, y:(pos1.y+pos2.y)/2.0}; + + label.horizontalAlign("center"); + label.verticalAlign("bottom"); + label.x = pos.x; + label.y = pos.y - label.getOffsetTop(); + + if (angle <= 90 || angle > 270) { + label.rotate(360 - angle, pos); + } else { + label.rotate(180 - angle, pos); + } + } else { + var index = parseInt(numOfDockers/2); + var angle = this._getAngle(this.dockers[index], this.dockers[index+1]) + var pos = this.dockers[index].bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("left"); + label.verticalAlign("bottom"); + label.x = pos.x + label.getOffsetTop(); + label.y = pos.y - label.getOffsetTop(); + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("right"); + label.verticalAlign("bottom"); + label.x = pos.x - label.getOffsetTop(); + label.y = pos.y - label.getOffsetTop(); + label.rotate(180 - angle, pos); + } + } + + break; + case "midbottom": + var numOfDockers = this.dockers.length; + if(numOfDockers%2 == 0) { + var angle = this._getAngle(this.dockers[numOfDockers/2-1], this.dockers[numOfDockers/2]) + var pos1 = this.dockers[numOfDockers/2-1].bounds.center(); + var pos2 = this.dockers[numOfDockers/2].bounds.center(); + var pos = {x:(pos1.x + pos2.x)/2.0, y:(pos1.y+pos2.y)/2.0}; + + label.horizontalAlign("center"); + label.verticalAlign("top"); + label.x = pos.x; + label.y = pos.y + label.getOffsetTop(); + + if (angle <= 90 || angle > 270) { + label.rotate(360 - angle, pos); + } else { + label.rotate(180 - angle, pos); + } + } else { + var index = parseInt(numOfDockers/2); + var angle = this._getAngle(this.dockers[index], this.dockers[index+1]) + var pos = this.dockers[index].bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("left"); + label.verticalAlign("top"); + label.x = pos.x + label.getOffsetBottom(); + label.y = pos.y + label.getOffsetBottom(); + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("right"); + label.verticalAlign("top"); + label.x = pos.x - label.getOffsetBottom(); + label.y = pos.y + label.getOffsetBottom(); + label.rotate(180 - angle, pos); + } + } + + break; + case "endtop": + var length = this.dockers.length; + var angle = this._getAngle(this.dockers[length-2], this.dockers[length-1]); + var pos = this.dockers.last().bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("right"); + label.verticalAlign("bottom"); + label.x = pos.x - label.getOffsetTop(); + label.y = pos.y - label.getOffsetTop(); + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("left"); + label.verticalAlign("bottom"); + label.x = pos.x + label.getOffsetTop(); + label.y = pos.y - label.getOffsetTop(); + label.rotate(180 - angle, pos); + } + + break; + case "endbottom": + var length = this.dockers.length; + var angle = this._getAngle(this.dockers[length-2], this.dockers[length-1]); + var pos = this.dockers.last().bounds.center(); + + if (angle <= 90 || angle > 270) { + label.horizontalAlign("right"); + label.verticalAlign("top"); + label.x = pos.x - label.getOffsetBottom(); + label.y = pos.y + label.getOffsetBottom(); + label.rotate(360 - angle, pos); + } else { + label.horizontalAlign("left"); + label.verticalAlign("top"); + label.x = pos.x + label.getOffsetBottom(); + label.y = pos.y + label.getOffsetBottom(); + label.rotate(180 - angle, pos); + } + + break; + } + }.bind(this)); + + this.children.each(function(value) { + if(value instanceof ORYX.Core.Node) { + this.calculatePositionOfAttachedChildNode.call(this, value); + } + }.bind(this)); + + this.refreshAttachedNodes(); + this.refresh(); + + this.isChanged = false; + this._dockerUpdated = false; + + this._oldBounds = this.bounds.clone(); + } + + + // IE10 specific fix, start and end-markes get left behind when moving path + var userAgent = navigator.userAgent; + if (navigator.appVersion.indexOf("MSIE 10") !== -1 || (userAgent.indexOf('Trident') !== -1 && userAgent.indexOf('rv:11') !== -1)) + { + this.node.parentNode.insertBefore(this.node, this.node); + } + }, + + /** + * Moves a point to the upperLeft of a node's bounds. + * + * @param {point} point + * The point to move + * @param {ORYX.Core.Bounds} bounds + * The Bounds of the related noe + */ + movePointToUpperLeftOfNode: function(point, bounds) { + point.x -= bounds.width()/2; + point.y -= bounds.height()/2; + }, + + /** + * Refreshes the visual representation of edge's attached nodes. + */ + refreshAttachedNodes: function() { + this.attachedNodePositionData.values().each(function(nodeData) { + var startPoint = nodeData.segment.docker1.bounds.center(); + var endPoint = nodeData.segment.docker2.bounds.center(); + this.relativizePoint(startPoint); + this.relativizePoint(endPoint); + + var newNodePosition = new Object(); + + /* Calculate new x-coordinate */ + newNodePosition.x = startPoint.x + + nodeData.relativDistanceFromDocker1 + * (endPoint.x - startPoint.x); + + /* Calculate new y-coordinate */ + newNodePosition.y = startPoint.y + + nodeData.relativDistanceFromDocker1 + * (endPoint.y - startPoint.y); + + /* Convert new position to the upper left of the node */ + this.movePointToUpperLeftOfNode(newNodePosition, nodeData.node.bounds); + + /* Move node to its new position */ + nodeData.node.bounds.moveTo(newNodePosition); + nodeData.node._update(); + + }.bind(this)); + }, + + /** + * Calculates the position of an edge's child node. The node is placed on + * the path of the edge. + * + * @param {node} + * The node to calculate the new position + * @return {Point} + * The calculated upper left point of the node's shape. + */ + calculatePositionOfAttachedChildNode: function(node) { + /* Initialize position */ + var position = new Object(); + position.x = 0; + position.y = 0; + + /* Case: Node was just added */ + if(!this.attachedNodePositionData[node.getId()]) { + this.attachedNodePositionData[node.getId()] = new Object(); + this.attachedNodePositionData[node.getId()] + .relativDistanceFromDocker1 = 0; + this.attachedNodePositionData[node.getId()].node = node; + this.attachedNodePositionData[node.getId()].segment = new Object(); + this.findEdgeSegmentForNode(node); + }else if(node.isChanged) { + this.findEdgeSegmentForNode(node); + } + + + + }, + + /** + * Finds the appropriate edge segement for a node. + * The segment is choosen, which has the smallest distance to the node. + * + * @param {ORYX.Core.Node} node + * The concerning node + */ + findEdgeSegmentForNode: function(node) { + var length = this.dockers.length; + var smallestDistance = undefined; + + for(i=1;i<length;i++) { + var lineP1 = this.dockers[i-1].bounds.center(); + var lineP2 = this.dockers[i].bounds.center(); + this.relativizePoint(lineP1); + this.relativizePoint(lineP2); + + var nodeCenterPoint = node.bounds.center(); + var distance = ORYX.Core.Math.distancePointLinie( + lineP1, + lineP2, + nodeCenterPoint, + true); + + if((distance || distance == 0) && ((!smallestDistance && smallestDistance != 0) + || distance < smallestDistance)) { + + smallestDistance = distance; + + this.attachedNodePositionData[node.getId()].segment.docker1 = + this.dockers[i-1]; + this.attachedNodePositionData[node.getId()].segment.docker2 = + this.dockers[i]; + + } + + /* Either the distance does not match the segment or the distance + * between docker1 and docker2 is 0 + * + * In this case choose the nearest docker as attaching point. + * + */ + if(!distance && !smallestDistance && smallestDistance != 0) { + (ORYX.Core.Math.getDistancePointToPoint(nodeCenterPoint, lineP1) + < ORYX.Core.Math.getDistancePointToPoint(nodeCenterPoint, lineP2)) ? + this.attachedNodePositionData[node.getId()].relativDistanceFromDocker1 = 0 : + this.attachedNodePositionData[node.getId()].relativDistanceFromDocker1 = 1; + this.attachedNodePositionData[node.getId()].segment.docker1 = + this.dockers[i-1]; + this.attachedNodePositionData[node.getId()].segment.docker2 = + this.dockers[i]; + } + } + + /* Calculate position on edge segment for the node */ + if(smallestDistance || smallestDistance == 0) { + this.attachedNodePositionData[node.getId()].relativDistanceFromDocker1 = + this.getLineParameterForPosition( + this.attachedNodePositionData[node.getId()].segment.docker1, + this.attachedNodePositionData[node.getId()].segment.docker2, + node); + } + }, + + + /** + * + * @param {ORYX.Core.Node|Object} node or position + * @return {Object} An object with the following attribute: {ORYX.Core.Docker} fromDocker, {ORYX.Core.Docker} toDocker, {X/Y} position, {int} distance + */ + findSegment: function(node){ + + var length = this.dockers.length; + var result; + + var nodeCenterPoint = node instanceof ORYX.Core.UIObject ? node.bounds.center() : node; + + for (i = 1; i < length; i++) { + var lineP1 = this.dockers[i - 1].bounds.center(); + var lineP2 = this.dockers[i].bounds.center(); + + var distance = ORYX.Core.Math.distancePointLinie(lineP1, lineP2, nodeCenterPoint, true); + + if (typeof distance == "number" && (result === undefined || distance < result.distance)) { + result = { + distance: distance, + fromDocker: this.dockers[i - 1], + toDocker: this.dockers[i] + } + + } + } + return result; + }, + + /** + * Returns the value of the scalar to determine the position of the node on + * line defined by docker1 and docker2. + * + * @param {point} docker1 + * The docker that defines the start of the line segment + * @param {point} docker2 + * The docker that defines the end of the line segment + * @param {ORYX.Core.Node} node + * The concerning node + * + * @return {float} positionParameter + * The scalar value to determine the position on the line + */ + getLineParameterForPosition: function(docker1, docker2, node) { + var dockerPoint1 = docker1.bounds.center(); + var dockerPoint2 = docker2.bounds.center(); + this.relativizePoint(dockerPoint1); + this.relativizePoint(dockerPoint2); + + var intersectionPoint = ORYX.Core.Math.getPointOfIntersectionPointLine( + dockerPoint1, + dockerPoint2, + node.bounds.center(), true); + if(!intersectionPoint) { + return 0; + } + + var relativeDistance = + ORYX.Core.Math.getDistancePointToPoint(intersectionPoint, dockerPoint1) / + ORYX.Core.Math.getDistancePointToPoint(dockerPoint1, dockerPoint2); + + return relativeDistance; + }, + /** + * Makes point relative to the upper left of the edge's bound. + * + * @param {point} point + * The point to relativize + */ + relativizePoint: function(point) { + point.x -= this.bounds.upperLeft().x; + point.y -= this.bounds.upperLeft().y; + }, + + /** + * Move the first and last docker and calls the refresh method. + * Attention: This does not calculates intersection point between the + * edge and the bounded nodes. This only works if only the nodes are + * moves. + * + */ + optimizedUpdate: function(){ + + var updateDocker = function(docker){ + if (!docker._dockedShape || !docker._dockedShapeBounds) + return; + var off = { + x: docker._dockedShape.bounds.a.x - docker._dockedShapeBounds.a.x, + y: docker._dockedShape.bounds.a.y - docker._dockedShapeBounds.a.y + }; + docker.bounds.moveBy(off); + docker._dockedShapeBounds.moveBy(off); + } + + updateDocker(this.dockers.first()); + updateDocker(this.dockers.last()); + + this.refresh(); + }, + + refresh: function(){ + //call base class refresh method + arguments.callee.$.refresh.apply(this, arguments); + + //TODO consider points for marker mids + var lastPoint; + this._paths.each((function(path, index){ + var dockers = this._dockersByPath[path.id]; + var c = undefined; + var d = undefined; + if (lastPoint) { + d = "M" + lastPoint.x + " " + lastPoint.y; + } + else { + c = dockers[0].bounds.center(); + lastPoint = c; + + d = "M" + c.x + " " + c.y; + } + + for (var i = 1; i < dockers.length; i++) { + // for each docker, draw a line to the center + c = dockers[i].bounds.center(); + d = d + "L" + c.x + " " + c.y + " "; + lastPoint = c; + } + + path.setAttributeNS(null, "d", d); + this._interactionPaths[index].setAttributeNS(null, "d", d); + + }).bind(this)); + + + /* move child shapes of an edge */ + if(this.getChildNodes().length > 0) { + var x = this.bounds.upperLeft().x; + var y = this.bounds.upperLeft().y; + + this.node.firstChild.childNodes[1].setAttributeNS(null, "transform", "translate(" + x + ", " + y + ")"); + } + + }, + + /** + * Calculate the Border Intersection Point between two points + * @param {PointA} + * @param {PointB} + */ + getIntersectionPoint: function(){ + + var length = Math.floor(this.dockers.length / 2) + + return ORYX.Core.Math.midPoint(this.dockers[length - 1].bounds.center(), this.dockers[length].bounds.center()) + }, + + /** + * Returns TRUE if the bounds is over the edge + * @param {Bounds} + * + */ + isBoundsIncluded: function(bounds){ + var dockers = this.dockers, size = dockers.length; + return dockers.any(function(docker, i){ + if (i == size-1){ return false; } + var a = docker.bounds.center(); + var b = dockers[i+1].bounds.center(); + + return ORYX.Core.Math.isRectOverLine(a.x, a.y, b.x, b.y, bounds.a.x, bounds.a.y, bounds.b.x, bounds.b.y); + }); + }, + + /** + * Calculate if the point is inside the Shape + * @param {PointX} + * @param {PointY} + */ + isPointIncluded: function(pointX, pointY){ + + var isbetweenAB = this.absoluteBounds().isIncluded(pointX, pointY, + ORYX.CONFIG.OFFSET_EDGE_BOUNDS); + + var isPointIncluded = undefined; + + if (isbetweenAB && this.dockers.length > 0) { + + var i = 0; + var point1, point2; + + + do { + + point1 = this.dockers[i].bounds.center(); + point2 = this.dockers[++i].bounds.center(); + + isPointIncluded = ORYX.Core.Math.isPointInLine(pointX, pointY, + point1.x, point1.y, + point2.x, point2.y, + ORYX.CONFIG.OFFSET_EDGE_BOUNDS); + + } while (!isPointIncluded && i < this.dockers.length - 1) + + } + + return isPointIncluded; + + }, + + + /** + * Calculate if the point is over an special offset area + * @param {Point} + */ + isPointOverOffset: function(){ + return false + }, + + /** + * Returns TRUE if the given node + * is a child node of the shapes node + * @param {Element} node + * @return {Boolean} + * + */ + containsNode: function(node){ + if (this._paths.include(node) || + this._interactionPaths.include(node)){ + return true; + } + return false; + }, + + /** + * Returns the angle of the line between two dockers + * (0 - 359.99999999) + */ + _getAngle: function(docker1, docker2) { + var p1 = docker1 instanceof ORYX.Core.Controls.Docker ? docker1.absoluteCenterXY() : docker1; + var p2 = docker2 instanceof ORYX.Core.Controls.Docker ? docker2.absoluteCenterXY() : docker2; + + return ORYX.Core.Math.getAngle(p1, p2); + }, + + alignDockers: function(){ + this._update(true); + + var firstPoint = this.dockers.first().bounds.center(); + var lastPoint = this.dockers.last().bounds.center(); + + var deltaX = lastPoint.x - firstPoint.x; + var deltaY = lastPoint.y - firstPoint.y; + + var numOfDockers = this.dockers.length - 1; + + this.dockers.each((function(docker, index){ + var part = index / numOfDockers; + docker.bounds.unregisterCallback(this._dockerChangedCallback); + docker.bounds.moveTo(firstPoint.x + part * deltaX, firstPoint.y + part * deltaY); + docker.bounds.registerCallback(this._dockerChangedCallback); + }).bind(this)); + + this._dockerChanged(); + }, + + add: function(shape){ + arguments.callee.$.add.apply(this, arguments); + + // If the new shape is a Docker which is not contained + if (shape instanceof ORYX.Core.Controls.Docker && this.dockers.include(shape)){ + // Add it to the dockers list ordered by paths + var pathArray = this._dockersByPath.values()[0]; + if (pathArray) { + pathArray.splice(this.dockers.indexOf(shape), 0, shape); + } + + /* Perform nessary adjustments on the edge's child shapes */ + this.handleChildShapesAfterAddDocker(shape); + } + }, + + /** + * Performs nessary adjustments on the edge's child shapes. + * + * @param {ORYX.Core.Controls.Docker} docker + * The added docker + */ + handleChildShapesAfterAddDocker: function(docker) { + /* Ensure type of Docker */ + if(!docker instanceof ORYX.Core.Controls.Docker) {return undefined;} + + var index = this.dockers.indexOf(docker); + if(!(0 < index && index < this.dockers.length - 1)) { + /* Exception: Expect added docker between first and last node of the edge */ + return undefined; + } + + /* Get child nodes concerning the segment of the new docker */ + var startDocker = this.dockers[index-1]; + var endDocker = this.dockers[index+1]; + + /* Adjust the position of edge's child nodes */ + var segmentElements = + this.getAttachedNodePositionDataForSegment(startDocker, endDocker); + + var lengthSegmentPart1 = ORYX.Core.Math.getDistancePointToPoint( + startDocker.bounds.center(), + docker.bounds.center()); + var lengthSegmentPart2 = ORYX.Core.Math.getDistancePointToPoint( + endDocker.bounds.center(), + docker.bounds.center()); + + if(!(lengthSegmentPart1 + lengthSegmentPart2)) {return;} + + var relativDockerPosition = lengthSegmentPart1 / (lengthSegmentPart1 + lengthSegmentPart2); + + segmentElements.each(function(nodePositionData) { + /* Assign child node to the new segment */ + if(nodePositionData.value.relativDistanceFromDocker1 < relativDockerPosition) { + /* Case: before added Docker */ + nodePositionData.value.segment.docker2 = docker; + nodePositionData.value.relativDistanceFromDocker1 = + nodePositionData.value.relativDistanceFromDocker1 / relativDockerPosition; + } else { + /* Case: after added Docker */ + nodePositionData.value.segment.docker1 = docker; + var newFullDistance = 1 - relativDockerPosition; + var relativPartOfSegment = + nodePositionData.value.relativDistanceFromDocker1 + - relativDockerPosition; + + nodePositionData.value.relativDistanceFromDocker1 = + relativPartOfSegment / newFullDistance; + + } + }) + + + // Update all labels reference points + this.getLabels().each(function(label){ + + var ref = label.getReferencePoint(); + if (!ref) { + return; + } + var index = this.dockers.indexOf(docker); + if (index >= ref.segment.fromIndex && index <= ref.segment.toIndex){ + + var segment = this.findSegment(ref.intersection); + if (!segment){ + // Choose whether the first of the last segment + segment.fromDocker = ref.segment.fromIndex >= (this.dockers.length/2) ? this.dockers[0] : this.dockers[this.dockers.length-2]; + segment.toDocker = this.dockers[this.dockers.indexOf(from)+1]; // The next one if the to docker + } + + var fromPosition = segment.fromDocker.bounds.center(), toPosition = segment.toDocker.bounds.center(); + + var intersection = ORYX.Core.Math.getPointOfIntersectionPointLine( + fromPosition, // P1 - Center of the first docker + toPosition, // P2 - Center of the second docker + ref.intersection, // P3 - Center of the label + true); + //var oldDistance = ORYX.Core.Math.getDistanceBetweenTwoPoints(ref.segment.fromPosition, ref.segment.toPosition, ref.intersection); + //intersection = ORYX.Core.Math.getPointBetweenTwoPoints(fromPosition, toPosition, isNaN(oldDistance) ? 0.5 : (lengthOld*oldDistance)/lengthNew); + + // Update the reference point + this.updateReferencePointOfLabel(label, intersection, segment.fromDocker, segment.toDocker, true); + } + }.bind(this)); + + /* Update attached nodes visual representation */ + this.refreshAttachedNodes(); + }, + + /** + * Returns elements from {@link attachedNodePositiondata} that match the + * segement defined by startDocker and endDocker. + * + * @param {ORYX.Core.Controls.Docker} startDocker + * The docker defining the begin of the segment. + * @param {ORYX.Core.Controls.Docker} endDocker + * The docker defining the begin of the segment. + * + * @return {Hash} attachedNodePositionData + * Child elements matching the segment + */ + getAttachedNodePositionDataForSegment: function(startDocker, endDocker) { + /* Ensure that the segment is defined correctly */ + if(!((startDocker instanceof ORYX.Core.Controls.Docker) + && (endDocker instanceof ORYX.Core.Controls.Docker))) { + return []; + } + + /* Get elements of the segment */ + var elementsOfSegment = + this.attachedNodePositionData.findAll(function(nodePositionData) { + return nodePositionData.value.segment.docker1 === startDocker && + nodePositionData.value.segment.docker2 === endDocker; + }); + + /* Return a Hash in each case */ + if(!elementsOfSegment) {return [];} + + return elementsOfSegment; + }, + + /** + * Removes an edge's child shape + */ + remove: function(shape) { + arguments.callee.$.remove.apply(this, arguments); + + if(this.attachedNodePositionData[shape.getId()]) { + delete this.attachedNodePositionData[shape.getId()]; + } + + /* Adjust child shapes if neccessary */ + if(shape instanceof ORYX.Core.Controls.Docker) { + this.handleChildShapesAfterRemoveDocker(shape); + } + }, + + updateReferencePointOfLabel: function(label, intersection, from, to, dirty){ + if (!label.getReferencePoint() || !label.isVisible) { + return; + } + + var ref = label.getReferencePoint(); + + // + if (ref.orientation && ref.orientation !== "ce"){ + var angle = this._getAngle(from, to); + if (ref.distance >= 0){ + if(angle == 0){ + label.horizontalAlign("left");//ref.orientation == "lr" ? "right" : "left"); + label.verticalAlign("bottom"); + } else if (angle > 0 && angle < 90){ + label.horizontalAlign("right"); + label.verticalAlign("bottom"); + } else if (angle == 90){ + label.horizontalAlign("right"); + label.verticalAlign("top");//ref.orientation == "lr" ? "bottom" : "top"); + } else if (angle > 90 && angle < 180){ + label.horizontalAlign("right"); + label.verticalAlign("top"); + } else if (angle == 180){ + label.horizontalAlign("left");//ref.orientation == "ur" ? "right" : "left"); + label.verticalAlign("top"); + } else if (angle > 180 && angle < 270){ + label.horizontalAlign("left"); + label.verticalAlign("top"); + } else if (angle == 270){ + label.horizontalAlign("left"); + label.verticalAlign("top");//ref.orientation == "ll" ? "bottom" : "top"); + } else if (angle > 270 && angle <= 360){ + label.horizontalAlign("left"); + label.verticalAlign("bottom"); + } + } else { + if(angle == 0){ + label.horizontalAlign("left");//ref.orientation == "ur" ? "right" : "left"); + label.verticalAlign("top"); + } else if (angle > 0 && angle < 90){ + label.horizontalAlign("left"); + label.verticalAlign("top"); + } else if (angle == 90){ + label.horizontalAlign("left"); + label.verticalAlign("top");//ref.orientation == "ll" ? "bottom" : "top"); + } else if (angle > 90 && angle < 180){ + label.horizontalAlign("left"); + label.verticalAlign("bottom"); + } else if (angle == 180){ + label.horizontalAlign("left");//ref.orientation == "lr" ? "right" : "left"); + label.verticalAlign("bottom"); + } else if (angle > 180 && angle < 270){ + label.horizontalAlign("right"); + label.verticalAlign("bottom"); + } else if (angle == 270){ + label.horizontalAlign("right"); + label.verticalAlign("top");//ref.orientation == "lr" ? "bottom" : "top"); + } else if (angle > 270 && angle <= 360){ + label.horizontalAlign("right"); + label.verticalAlign("top"); + } + } + ref.iorientation = ref.iorientation || ref.orientation; + ref.orientation = (label.verticalAlign()=="top"?"u":"l") + (label.horizontalAlign()=="left"?"l":"r"); + } + + label.setReferencePoint(jQuery.extend({},{ + intersection: intersection, + segment: { + from: from, + fromIndex: this.dockers.indexOf(from), + fromPosition: from.bounds.center(), + to: to, + toIndex: this.dockers.indexOf(to), + toPosition: to.bounds.center() + }, + dirty: dirty || false + },ref)) + }, + /** + * Adjusts the child shapes of an edges after a docker was removed. + * + * @param{ORYX.Core.Controls.Docker} docker + * The removed docker. + */ + handleChildShapesAfterRemoveDocker: function(docker) { + /* Ensure docker type */ + if(!(docker instanceof ORYX.Core.Controls.Docker)) {return;} + + this.attachedNodePositionData.each(function(nodePositionData) { + if(nodePositionData.value.segment.docker1 === docker) { + /* The new start of the segment is the predecessor of docker2. */ + var index = this.dockers.indexOf(nodePositionData.value.segment.docker2); + if(index == -1) {return;} + nodePositionData.value.segment.docker1 = this.dockers[index - 1]; + } + else if(nodePositionData.value.segment.docker2 === docker) { + /* The new end of the segment is the successor of docker1. */ + var index = this.dockers.indexOf(nodePositionData.value.segment.docker1); + if(index == -1) {return;} + nodePositionData.value.segment.docker2 = this.dockers[index + 1]; + } + }.bind(this)); + + // Update all labels reference points + this.getLabels().each(function(label){ + + var ref = label.getReferencePoint(); + if (!ref) { + return; + } + var from = ref.segment.from; + var to = ref.segment.to; + + if (from !== docker && to !== docker){ + return; + } + + var segment = this.findSegment(ref.intersection); + if (!segment){ + from = segment.fromDocker; + to = segment.toDocker; + } else { + from = from === docker ? this.dockers[this.dockers.indexOf(to)-1] : from; + to = this.dockers[this.dockers.indexOf(from)+1]; + } + + var intersection = ORYX.Core.Math.getPointOfIntersectionPointLine(from.bounds.center(), to.bounds.center(), ref.intersection, true); + // Update the reference point + this.updateReferencePointOfLabel(label, intersection, from, to, true); + }.bind(this)); + + /* Update attached nodes visual representation */ + this.refreshAttachedNodes(); + }, + + /** + *@deprecated Use the .createDocker() Method and set the point via the bounds + */ + addDocker: function(position, exDocker){ + var lastDocker; + var result; + this._dockersByPath.any((function(pair){ + return pair.value.any((function(docker, index){ + if (!lastDocker) { + lastDocker = docker; + return false; + } + else { + var point1 = lastDocker.bounds.center(); + var point2 = docker.bounds.center(); + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + position.x = position.x / additionalIEZoom; + position.y = position.y / additionalIEZoom; + } + + if (ORYX.Core.Math.isPointInLine(position.x, position.y, point1.x, point1.y, point2.x, point2.y, 10)) { + var path = this._paths.find(function(path){ + return path.id === pair.key; + }); + if (path) { + var allowAttr = path.getAttributeNS(NAMESPACE_ORYX, 'allowDockers'); + if (allowAttr && allowAttr.toLowerCase() === "no") { + return true; + } + } + + var newDocker = (exDocker) ? exDocker : this.createDocker(this.dockers.indexOf(lastDocker) + 1, position); + newDocker.bounds.centerMoveTo(position); + if(exDocker) + this.add(newDocker, this.dockers.indexOf(lastDocker) + 1); + result = newDocker; + return true; + } + else { + lastDocker = docker; + return false; + } + } + }).bind(this)); + }).bind(this)); + return result; + }, + + removeDocker: function(docker){ + if (this.dockers.length > 2 && !(this.dockers.first() === docker)) { + this._dockersByPath.any((function(pair){ + if (pair.value.member(docker)) { + if (docker === pair.value.last()) { + return true; + } + else { + this.remove(docker); + this._dockersByPath[pair.key] = pair.value.without(docker); + this.isChanged = true; + this._dockerChanged(); + return true; + } + } + return false; + }).bind(this)); + } + }, + + /** + * Removes all dockers from the edge which are on + * the line between two dockers + * @return {Object} Removed dockers in an indicied array + * (key is the removed position of the docker, value is docker themselve) + */ + removeUnusedDockers:function(){ + var marked = $H({}); + + this.dockers.each(function(docker, i){ + if (i==0||i==this.dockers.length-1){ return } + var previous = this.dockers[i-1]; + + /* Do not consider already removed dockers */ + if(marked.values().indexOf(previous) != -1 && this.dockers[i-2]) { + previous = this.dockers[i-2]; + } + var next = this.dockers[i+1]; + + var cp = previous.getDockedShape() && previous.referencePoint ? previous.getAbsoluteReferencePoint() : previous.bounds.center(); + var cn = next.getDockedShape() && next.referencePoint ? next.getAbsoluteReferencePoint() : next.bounds.center(); + var cd = docker.bounds.center(); + + if (ORYX.Core.Math.isPointInLine(cd.x, cd.y, cp.x, cp.y, cn.x, cn.y, 1)){ + marked[i] = docker; + } + }.bind(this)) + + marked.each(function(docker){ + this.removeDocker(docker.value); + }.bind(this)) + + if (marked.values().length > 0){ + this._update(true); + } + + return marked; + }, + + /** + * Initializes the Edge after loading the SVG representation of the edge. + * @param {SVGDocument} svgDocument + */ + _init: function(svgDocument){ + arguments.callee.$._init.apply(this, arguments); + + var minPointX, minPointY, maxPointX, maxPointY; + + //init markers + var defs = svgDocument.getElementsByTagNameNS(NAMESPACE_SVG, "defs"); + if (defs.length > 0) { + defs = defs[0]; + var markerElements = $A(defs.getElementsByTagNameNS(NAMESPACE_SVG, "marker")); + var marker; + var me = this; + markerElements.each(function(markerElement){ + try { + marker = new ORYX.Core.SVG.SVGMarker(markerElement.cloneNode(true)); + me._markers[marker.id] = marker; + var textElements = $A(marker.element.getElementsByTagNameNS(NAMESPACE_SVG, "text")); + var label; + textElements.each(function(textElement){ + label = new ORYX.Core.SVG.Label({ + textElement: textElement, + shapeId: this.id + }); + me._labels[label.id] = label; + }); + } + catch (e) {var abcdef=1 + } + }); + } + + + var gs = svgDocument.getElementsByTagNameNS(NAMESPACE_SVG, "g"); + if (gs.length <= 0) { + throw "Edge: No g element found."; + } + var g = gs[0]; + + + g.setAttributeNS(null, "id", null); + + var isFirst = true; + + $A(g.childNodes).each((function(path, index){ + if (ORYX.Editor.checkClassType(path, SVGPathElement)) { + path = path.cloneNode(false); + + var pathId = this.id + "_" + index; + path.setAttributeNS(null, "id", pathId); + this._paths.push(path); + + //check, if markers are set and update the id + var markersByThisPath = []; + var markerUrl = path.getAttributeNS(null, "marker-start"); + + if (markerUrl && markerUrl !== "") { + markerUrl = markerUrl.strip(); + markerUrl = markerUrl.replace(/^url\(#/, ''); + + var markerStartId = this.getValidMarkerId(markerUrl); + path.setAttributeNS(null, "marker-start", "url(#" + markerStartId + ")"); + + markersByThisPath.push(this._markers[markerStartId]); + } + + markerUrl = path.getAttributeNS(null, "marker-mid"); + + if (markerUrl && markerUrl !== "") { + markerUrl = markerUrl.strip(); + markerUrl = markerUrl.replace(/^url\(#/, ''); + var markerMidId = this.getValidMarkerId(markerUrl); + path.setAttributeNS(null, "marker-mid", "url(#" + markerMidId + ")"); + + markersByThisPath.push(this._markers[markerMidId]); + } + + markerUrl = path.getAttributeNS(null, "marker-end"); + + if (markerUrl && markerUrl !== "") { + markerUrl = markerUrl.strip(); + + var markerEndId = this.getValidMarkerId(markerUrl); + path.setAttributeNS(null, "marker-end", "url(#" + markerEndId + ")"); + + markersByThisPath.push(this._markers[markerEndId]); + } + + this._markersByPath[pathId] = markersByThisPath; + + //init dockers + var parser = new PathParser(); + var handler = new ORYX.Core.SVG.PointsPathHandler(); + parser.setHandler(handler); + parser.parsePath(path); + + if (handler.points.length < 4) { + throw "Edge: Path has to have two or more points specified."; + } + + this._dockersByPath[pathId] = []; + + for (var i = 0; i < handler.points.length; i += 2) { + //handler.points.each((function(point, pIndex){ + var x = handler.points[i]; + var y = handler.points[i+1]; + if (isFirst || i > 0) { + var docker = new ORYX.Core.Controls.Docker({ + eventHandlerCallback: this.eventHandlerCallback + }); + docker.bounds.centerMoveTo(x,y); + docker.bounds.registerCallback(this._dockerChangedCallback); + this.add(docker, this.dockers.length); + + //this._dockersByPath[pathId].push(docker); + + //calculate minPoint and maxPoint + if (minPointX) { + minPointX = Math.min(x, minPointX); + minPointY = Math.min(y, minPointY); + } + else { + minPointX = x; + minPointY = y; + } + + if (maxPointX) { + maxPointX = Math.max(x, maxPointX); + maxPointY = Math.max(y, maxPointY); + } + else { + maxPointX = x; + maxPointY = y; + } + } + //}).bind(this)); + } + isFirst = false; + } + }).bind(this)); + + this.bounds.set(minPointX, minPointY, maxPointX, maxPointY); + + if (false&&(this.bounds.width() === 0 || this.bounds.height() === 0)) { + var width = this.bounds.width(); + var height = this.bounds.height(); + + this.bounds.extend({ + x: width === 0 ? 2 : 0, + y: height === 0 ? 2 : 0 + }); + + this.bounds.moveBy({ + x: width === 0 ? -1 : 0, + y: height === 0 ? -1 : 0 + }); + + } + + this._oldBounds = this.bounds.clone(); + + //add paths to this.node + this._paths.reverse(); + var paths = []; + this._paths.each((function(path){ + paths.push(this.node.childNodes[0].childNodes[0].childNodes[0].appendChild(path)); + }).bind(this)); + + this._paths = paths; + + //init interaction path + this._paths.each((function(path){ + var iPath = path.cloneNode(false); + iPath.setAttributeNS(null, "id", undefined); + iPath.setAttributeNS(null, "stroke-width", 10); + iPath.setAttributeNS(null, "visibility", "hidden"); + iPath.setAttributeNS(null, "stroke-dasharray", null); + iPath.setAttributeNS(null, "stroke", "black"); + iPath.setAttributeNS(null, "fill", "none"); + iPath.setAttributeNS(null, "title", this.getStencil().title()); + this._interactionPaths.push(this.node.childNodes[0].childNodes[0].childNodes[0].appendChild(iPath)); + }).bind(this)); + + this._paths.reverse(); + this._interactionPaths.reverse(); + + /**initialize labels*/ + var textElems = svgDocument.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, 'text'); + + $A(textElems).each((function(textElem){ + var label = new ORYX.Core.SVG.Label({ + textElement: textElem, + shapeId: this.id + }); + this.node.childNodes[0].childNodes[0].appendChild(label.node); + this._labels[label.id] = label; + + label.registerOnChange(this.layout.bind(this)); + }).bind(this)); + + + this.propertiesChanged.each(function(pair){ + pair.value = true; + }); + + + //if(this.dockers.length == 2) { + + + + // } + + //this._update(true); + }, + + getValidMarkerId: function(markerUrl) { + if(markerUrl.indexOf("url(\"#") >= 0) { + // Fix for IE9, additional quotes are added to the <id + var rawId = markerUrl.replace(/^url\(\"#/, "").replace(/\"\)$/, ''); + return this.id + rawId; + } else { + markerUrl = markerUrl.replace(/^url\(#/, ''); + return this.id.concat(markerUrl.replace(/\)$/, '')); + } + }, + + /** + * Adds all necessary markers of this Edge to the SVG document. + * Has to be called, while this.node is part of DOM. + */ + addMarkers: function(defs){ + this._markers.each(function(marker){ + if (!defs.ownerDocument.getElementById(marker.value.id)) { + marker.value.element = defs.appendChild(marker.value.element); + } + }); + }, + + /** + * Removes all necessary markers of this Edge from the SVG document. + * Has to be called, while this.node is part of DOM. + */ + removeMarkers: function(){ + var svgElement = this.node.ownerSVGElement; + if (svgElement) { + var defs = svgElement.getElementsByTagNameNS(NAMESPACE_SVG, "defs"); + if (defs.length > 0) { + defs = defs[0]; + this._markers.each(function(marker){ + var foundMarker = defs.ownerDocument.getElementById(marker.value.id); + if (foundMarker) { + marker.value.element = defs.removeChild(marker.value.element); + } + }); + } + } + }, + + /** + * Calls when a docker has changed + */ + _dockerChanged: function(){ + + //this._update(true); + this._dockerUpdated = true; + + }, + + serialize: function(){ + var result = arguments.callee.$.serialize.apply(this); + + //add dockers triple + var value = ""; + this._dockersByPath.each((function(pair){ + pair.value.each(function(docker){ + var position = docker.getDockedShape() && docker.referencePoint ? docker.referencePoint : docker.bounds.center(); + value = value.concat(position.x + " " + position.y + " "); + }); + + value += " # "; + }).bind(this)); + result.push({ + name: 'dockers', + prefix: 'oryx', + value: value, + type: 'literal' + }); + + //add parent triple dependant on the dockedShapes + //TODO change this when canvas becomes a resource +/* var source = this.dockers.first().getDockedShape(); + var target = this.dockers.last().getDockedShape(); + var sharedParent; + if (source && target) { + //get shared parent + while (source.parent) { + source = source.parent; + if (source instanceof ORYX.Core.Canvas) { + sharedParent = source; + break; + } + else { + var targetParent = target.parent; + var found; + while (targetParent) { + if (source === targetParent) { + sharedParent = source; + found = true; + break; + } + else { + targetParent = targetParent.parent; + } + } + if (found) { + break; + } + } + } + } + else + if (source) { + sharedParent = source.parent; + } + else + if (target) { + sharedParent = target.parent; + } +*/ + //if (sharedParent) { +/* result.push({ + name: 'parent', + prefix: 'raziel', + //value: '#' + ERDF.__stripHashes(sharedParent.resourceId), + value: '#' + ERDF.__stripHashes(this.getCanvas().resourceId), + type: 'resource' + });*/ + //} + + //serialize target and source + var lastDocker = this.dockers.last(); + + var target = lastDocker.getDockedShape(); + + if(target) { + result.push({ + name: 'target', + prefix: 'raziel', + value: '#' + ERDF.__stripHashes(target.resourceId), + type: 'resource' + }); + } + + try { + //result = this.getStencil().serialize(this, result); + var serializeEvent = this.getStencil().serialize(); + + /* + * call serialize callback by reference, result should be found + * in serializeEvent.result + */ + if(serializeEvent.type) { + serializeEvent.shape = this; + serializeEvent.data = result; + serializeEvent.result = undefined; + serializeEvent.forceExecution = true; + + this._delegateEvent(serializeEvent); + + if(serializeEvent.result) { + result = serializeEvent.result; + } + } + } + catch (e) {var abcdef=1 + } + return result; + }, + + deserialize: function(data){ + try { + //data = this.getStencil().deserialize(this, data); + + var deserializeEvent = this.getStencil().deserialize(); + + /* + * call serialize callback by reference, result should be found + * in serializeEventInfo.result + */ + if(deserializeEvent.type) { + deserializeEvent.shape = this; + deserializeEvent.data = data; + deserializeEvent.result = undefined; + deserializeEvent.forceExecution = true; + + this._delegateEvent(deserializeEvent); + if(deserializeEvent.result) { + data = deserializeEvent.result; + } + } + } + catch (e) {var abcdef=1 + } + + // Set the outgoing shapes + var target = data.find(function(ser) {return (ser.prefix+"-"+ser.name) == 'raziel-target'}); + var targetShape; + if(target) { + targetShape = this.getCanvas().getChildShapeByResourceId(target.value); + } + + var outgoing = data.findAll(function(ser){ return (ser.prefix+"-"+ser.name) == 'raziel-outgoing'}); + outgoing.each((function(obj){ + // TODO: Look at Canvas + if(!this.parent) {return}; + + // Set outgoing Shape + var next = this.getCanvas().getChildShapeByResourceId(obj.value); + + if(next){ + if(next == targetShape) { + // If this is an edge, set the last docker to the next shape + this.dockers.last().setDockedShape(next); + this.dockers.last().setReferencePoint({x: next.bounds.width() / 2.0, y: next.bounds.height() / 2.0}); + } else if(next instanceof ORYX.Core.Edge) { + //Set the first docker of the next shape + next.dockers.first().setDockedShape(this); + //next.dockers.first().setReferencePoint({x: this.bounds.width() / 2.0, y: this.bounds.height() / 2.0}); + } /*else if(next.dockers.length > 0) { //next is a node and next has a docker + next.dockers.first().setDockedShape(this); + next.dockers.first().setReferencePoint({x: this.bounds.width() / 2.0, y: this.bounds.height() / 2.0}); + }*/ + } + + }).bind(this)); + + + var oryxDockers = data.find(function(obj){ + return (obj.prefix === "oryx" && + obj.name === "dockers"); + }); + + if (oryxDockers) { + var dataByPath = oryxDockers.value.split("#").without("").without(" "); + + dataByPath.each((function(data, index){ + var values = data.replace(/,/g, " ").split(" ").without(""); + + //for each docker two values must be defined + if (values.length % 2 === 0) { + var path = this._paths[index]; + + if (path) { + if (index === 0) { + while (this._dockersByPath[path.id].length > 2) { + this.removeDocker(this._dockersByPath[path.id][1]); + } + } + else { + while (this._dockersByPath[path.id].length > 1) { + this.removeDocker(this._dockersByPath[path.id][0]); + } + } + + var dockersByPath = this._dockersByPath[path.id]; + + if (index === 0) { + //set position of first docker + var x = parseFloat(values.shift()); + var y = parseFloat(values.shift()); + + if (dockersByPath.first().getDockedShape()) { + dockersByPath.first().setReferencePoint({ + x: x, + y: y + }); + } + else { + dockersByPath.first().bounds.centerMoveTo(x, y); + } + } + + //set position of last docker + y = parseFloat(values.pop()); + x = parseFloat(values.pop()); + + if (dockersByPath.last().getDockedShape()) { + dockersByPath.last().setReferencePoint({ + x: x, + y: y + }); + } else { + dockersByPath.last().bounds.centerMoveTo(x, y); + } + + //add additional dockers + for (var i = 0; i < values.length; i++) { + x = parseFloat(values[i]); + y = parseFloat(values[++i]); + + var newDocker = this.createDocker(); + newDocker.bounds.centerMoveTo(x, y); + + //this.dockers = this.dockers.without(newDocker); + //this.dockers.splice(this.dockers.indexOf(dockersByPath.last()), 0, newDocker); + //dockersByPath.splice(this.dockers.indexOf(dockersByPath.last()), 0, newDocker); + } + } + } + }).bind(this)); + } else { + this.alignDockers(); + } + + arguments.callee.$.deserialize.apply(this, arguments); + + this._changed(); + }, + + toString: function(){ + return this.getStencil().title() + " " + this.id; + }, + + /** + * @return {ORYX.Core.Shape} Returns last docked shape or null. + */ + getTarget: function(){ + return this.dockers.last() ? this.dockers.last().getDockedShape() : null; + }, + + /** + * @return {ORYX.Core.Shape} Returns the first docked shape or null + */ + getSource: function() { + return this.dockers.first() ? this.dockers.first().getDockedShape() : null; + }, + + /** + * Checks whether the edge is at least docked to one shape. + * + * @return {boolean} True if edge is docked + */ + isDocked: function() { + var isDocked = false; + this.dockers.each(function(docker) { + if(docker.isDocked()) { + isDocked = true; + throw $break; + } + }); + return isDocked; + }, + + /** + * Calls {@link ORYX.Core.AbstractShape#toJSON} and add a some stencil set information. + */ + toJSON: function() { + var json = arguments.callee.$.toJSON.apply(this, arguments); + + if(this.getTarget()) { + json.target = { + resourceId: this.getTarget().resourceId + }; + } + + return json; + } +}; +ORYX.Core.Edge = ORYX.Core.Shape.extend(ORYX.Core.Edge); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX){ var ORYX = {} } +if(!ORYX.Plugins){ ORYX.Plugins = {} } + +/** + This abstract plugin class can be used to build plugins on. + It provides some more basic functionality like registering events (on*-handlers)... + @example + ORYX.Plugins.MyPlugin = ORYX.Plugins.AbstractPlugin.extend({ + construct: function() { + // Call super class constructor + arguments.callee.$.construct.apply(this, arguments); + + [...] + }, + [...] + }); + + @class ORYX.Plugins.AbstractPlugin + @constructor Creates a new instance + @author Willi Tscheschner +*/ +ORYX.Plugins.AbstractPlugin = Clazz.extend({ + /** + * The facade which offer editor-specific functionality + * @type Facade + * @memberOf ORYX.Plugins.AbstractPlugin.prototype + */ + facade: null, + + construct: function( facade ){ + this.facade = facade; + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADED, this.onLoaded.bind(this)); + }, + + /** + Overwrite to handle load event. TODO: Document params!!! + @methodOf ORYX.Plugins.AbstractPlugin.prototype + */ + onLoaded: function(){}, + + /** + Overwrite to handle selection changed event. TODO: Document params!!! + @methodOf ORYX.Plugins.AbstractPlugin.prototype + */ + onSelectionChanged: function(){}, + + /** + Show overlay on given shape. + @methodOf ORYX.Plugins.AbstractPlugin.prototype + @example + showOverlay( + myShape, + { stroke: "green" }, + ORYX.Editor.graft("http://www.w3.org/2000/svg", null, ['path', { + "title": "Click the element to execute it!", + "stroke-width": 2.0, + "stroke": "black", + "d": "M0,-5 L5,0 L0,5 Z", + "line-captions": "round" + }]) + ) + @param {Oryx.XXX.Shape[]} shapes One shape or array of shapes the overlay should be put on + @param {Oryx.XXX.Attributes} attributes some attributes... + @param {Oryx.svg.node} svgNode The svg node which should be used as overlay + @param {String} [svgNode="NW"] The svg node position where the overlay should be placed + */ + showOverlay: function(shapes, attributes, svgNode, svgNodePosition ){ + + if( !(shapes instanceof Array) ){ + shapes = [shapes] + } + + // Define Shapes + shapes = shapes.map(function(shape){ + var el = shape; + if( typeof shape == "string" ){ + el = this.facade.getCanvas().getChildShapeByResourceId( shape ); + el = el || this.facade.getCanvas().getChildById( shape, true ); + } + return el; + }.bind(this)).compact(); + + // Define unified id + if( !this.overlayID ){ + this.overlayID = this.type + ORYX.Editor.provideId(); + } + + this.facade.raiseEvent({ + type : ORYX.CONFIG.EVENT_OVERLAY_SHOW, + id : this.overlayID, + shapes : shapes, + attributes : attributes, + node : svgNode, + nodePosition: svgNodePosition || "NW" + }); + + }, + + /** + Hide current overlay. + @methodOf ORYX.Plugins.AbstractPlugin.prototype + */ + hideOverlay: function(){ + this.facade.raiseEvent({ + type : ORYX.CONFIG.EVENT_OVERLAY_HIDE, + id : this.overlayID + }); + }, + + /** + Does a transformation with the given xslt stylesheet. + @methodOf ORYX.Plugins.AbstractPlugin.prototype + @param {String} data The data (e.g. eRDF) which should be transformed + @param {String} stylesheet URL of a stylesheet which should be used for transforming data. + */ + doTransform: function( data, stylesheet ) { + + if( !stylesheet || !data ){ + return "" + } + + var parser = new DOMParser(); + var parsedData = parser.parseFromString(data, "text/xml"); + source=stylesheet; + new Ajax.Request(source, { + asynchronous: false, + method: 'get', + onSuccess: function(transport){ + xsl = transport.responseText + }.bind(this), + onFailure: (function(transport){ + ORYX.Log.error("XSL load failed" + transport); + }).bind(this) + }); + var xsltProcessor = new XSLTProcessor(); + var domParser = new DOMParser(); + var xslObject = domParser.parseFromString(xsl, "text/xml"); + xsltProcessor.importStylesheet(xslObject); + + try { + + var newData = xsltProcessor.transformToFragment(parsedData, document); + var serializedData = (new XMLSerializer()).serializeToString(newData); + + /* Firefox 2 to 3 problem?! */ + serializedData = !serializedData.startsWith("<?xml") ? "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + serializedData : serializedData; + + return serializedData; + + }catch (error) { + return -1; + } + + }, + + /** + * Opens a new window that shows the given XML content. + * @methodOf ORYX.Plugins.AbstractPlugin.prototype + * @param {Object} content The XML content to be shown. + * @example + * openDownloadWindow( "my.xml", "<exampleXML />" ); + */ + openXMLWindow: function(content) { + var win = window.open( + 'data:application/xml,' + encodeURIComponent( + content + ), + '_blank', "resizable=yes,width=600,height=600,toolbar=0,scrollbars=yes" + ); + }, + + /** + * Opens a download window for downloading the given content. + * @methodOf ORYX.Plugins.AbstractPlugin.prototype + * @param {String} filename The content's file name + * @param {String} content The content to download + */ + openDownloadWindow: function(filename, content) { + var win = window.open(""); + if (win != null) { + win.document.open(); + win.document.write("<html><body>"); + var submitForm = win.document.createElement("form"); + win.document.body.appendChild(submitForm); + + var createHiddenElement = function(name, value) { + var newElement = document.createElement("input"); + newElement.name=name; + newElement.type="hidden"; + newElement.value = value; + return newElement + } + + submitForm.appendChild( createHiddenElement("download", content) ); + submitForm.appendChild( createHiddenElement("file", filename) ); + + + submitForm.method = "POST"; + win.document.write("</body></html>"); + win.document.close(); + submitForm.action= ORYX.PATH + "/download"; + submitForm.submit(); + } + }, + + /** + * Serializes DOM. + * @methodOf ORYX.Plugins.AbstractPlugin.prototype + * @type {String} Serialized DOM + */ + getSerializedDOM: function(){ + // Force to set all resource IDs + var serializedDOM = DataManager.serializeDOM( this.facade ); + + //add namespaces + serializedDOM = '<?xml version="1.0" encoding="utf-8"?>' + + '<html xmlns="http://www.w3.org/1999/xhtml" ' + + 'xmlns:b3mn="http://b3mn.org/2007/b3mn" ' + + 'xmlns:ext="http://b3mn.org/2007/ext" ' + + 'xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ' + + 'xmlns:atom="http://b3mn.org/2007/atom+xhtml">' + + '<head profile="http://purl.org/NET/erdf/profile">' + + '<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />' + + '<link rel="schema.dcTerms" href="http://purl.org/dc/terms/ " />' + + '<link rel="schema.b3mn" href="http://b3mn.org" />' + + '<link rel="schema.oryx" href="http://oryx-editor.org/" />' + + '<link rel="schema.raziel" href="http://raziel.org/" />' + + '<base href="' + + location.href.split("?")[0] + + '" />' + + '</head><body>' + + serializedDOM + + '</body></html>'; + + return serializedDOM; + }, + + /** + * Sets the editor in read only mode: Edges/ dockers cannot be moved anymore, + * shapes cannot be selected anymore. + * @methodOf ORYX.Plugins.AbstractPlugin.prototype + */ + enableReadOnlyMode: function(){ + //Edges cannot be moved anymore + this.facade.disableEvent(ORYX.CONFIG.EVENT_MOUSEDOWN); + + // Stop the user from editing the diagram while the plugin is active + this._stopSelectionChange = function(){ + if(this.facade.getSelection().length > 0) { + this.facade.setSelection([]); + } + }; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, this._stopSelectionChange.bind(this)); + }, + /** + * Disables read only mode, see @see + * @methodOf ORYX.Plugins.AbstractPlugin.prototype + * @see ORYX.Plugins.AbstractPlugin.prototype.enableReadOnlyMode + */ + disableReadOnlyMode: function(){ + // Edges can be moved now again + this.facade.enableEvent(ORYX.CONFIG.EVENT_MOUSEDOWN); + + if (this._stopSelectionChange) { + this.facade.unregisterOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, this._stopSelectionChange.bind(this)); + this._stopSelectionChange = undefined; + } + }, + + /** + * Extracts RDF from DOM. + * @methodOf ORYX.Plugins.AbstractPlugin.prototype + * @type {String} Extracted RFD. Null if there are transformation errors. + */ + getRDFFromDOM: function(){ + //convert to RDF + try { + var xsl = ""; + source=ORYX.PATH + "lib/extract-rdf.xsl"; + new Ajax.Request(source, { + asynchronous: false, + method: 'get', + onSuccess: function(transport){ + xsl = transport.responseText + }.bind(this), + onFailure: (function(transport){ + ORYX.Log.error("XSL load failed" + transport); + }).bind(this) + }); + + var domParser = new DOMParser(); + var xmlObject = domParser.parseFromString(this.getSerializedDOM(), "text/xml"); + var xslObject = domParser.parseFromString(xsl, "text/xml"); + var xsltProcessor = new XSLTProcessor(); + xsltProcessor.importStylesheet(xslObject); + var result = xsltProcessor.transformToFragment(xmlObject, document); + + var serializer = new XMLSerializer(); + + return serializer.serializeToString(result); + } catch(e){ + console.log("error serializing " + e); + return ""; + } + + + }, + + /** + * Checks if a certain stencil set is loaded right now. + * + */ + isStencilSetExtensionLoaded: function(stencilSetExtensionNamespace) { + return this.facade.getStencilSets().values().any( + function(ss){ + return ss.extensions().keys().any( + function(extensionKey) { + return extensionKey == stencilSetExtensionNamespace; + }.bind(this) + ); + }.bind(this) + ); + }, + + /** + * Raises an event so that registered layouters does + * have the posiblility to layout the given shapes + * For further reading, have a look into the AbstractLayouter + * class + * @param {Object} shapes + */ + doLayout: function(shapes){ + // Raises a do layout event + if (this.facade.raiseEvent) + { + this.facade.raiseEvent({ + type : ORYX.CONFIG.EVENT_LAYOUT, + shapes : shapes + }); + } + else + { + this.facade.handleEvents({ + type : ORYX.CONFIG.EVENT_LAYOUT, + shapes : shapes + }); + } + }, + + + /** + * Does a primitive layouting with the incoming/outgoing + * edges (set the dockers to the right position) and if + * necessary, it will be called the real layouting + * @param {ORYX.Core.Node} node + * @param {Array} edges + */ + layoutEdges : function(node, allEdges, offset){ + + if (!this.facade.isExecutingCommands()){ return } + + var Command = ORYX.Core.Command.extend({ + construct: function(edges, node, offset, plugin){ + this.edges = edges; + this.node = node; + this.plugin = plugin; + this.offset = offset; + + // Get the new absolute center + var center = node.absoluteXY(); + this.ulo = {x: center.x - offset.x, y:center.y - offset.y}; + + + }, + execute: function(){ + + if (this.changes){ + this.executeAgain(); + return; + } else { + this.changes = []; + this.edges.each(function(edge){ + this.changes.push({ + edge: edge, + oldDockerPositions: edge.dockers.map(function(r){ return r.bounds.center() }) + }) + }.bind(this)); + } + + // Find all edges, which are related to the node and + // have more than two dockers + this.edges + // Find all edges with more than two dockers + .findAll(function(r){ return r.dockers.length > 2 }.bind(this)) + // For every edge, check second and one before last docker + // if there are horizontal/vertical on the same level + // and if so, align the the bounds + .each(function(edge){ + if (edge.dockers.first().getDockedShape() === this.node){ + var second = edge.dockers[1]; + if (this.align(second.bounds, edge.dockers.first())){ second.update(); } + } else if (edge.dockers.last().getDockedShape() === this.node) { + var beforeLast = edge.dockers[edge.dockers.length-2]; + if (this.align(beforeLast.bounds, edge.dockers.last())){ beforeLast.update(); } + } + edge._update(true); + edge.removeUnusedDockers(); + if (this.isBendPointIncluded(edge)){ + this.plugin.doLayout(edge); + return; + } + }.bind(this)); + + + // Find all edges, which have only to dockers + // and is located horizontal/vertical. + // Do layout with those edges + this.edges + // Find all edges with exactly two dockers + .each(function(edge){ + if (edge.dockers.length == 2){ + var p1 = edge.dockers.first().getAbsoluteReferencePoint() || edge.dockers.first().bounds.center(); + var p2 = edge.dockers.last().getAbsoluteReferencePoint() || edge.dockers.first().bounds.center(); + // Find all horizontal/vertical edges + if (Math.abs(-Math.abs(p1.x - p2.x) + Math.abs(this.offset.x)) < 2 || Math.abs(-Math.abs(p1.y - p2.y) + Math.abs(this.offset.y)) < 2){ + this.plugin.doLayout(edge); + } + } + }.bind(this)); + + this.edges.each(function(edge, i){ + this.changes[i].dockerPositions = edge.dockers.map(function(r){ return r.bounds.center() }); + }.bind(this)); + + }, + /** + * Align the bounds if the center is + * the same than the old center + * @params {Object} bounds + * @params {Object} bounds2 + */ + align: function(bounds, refDocker){ + + var abRef = refDocker.getAbsoluteReferencePoint() || refDocker.bounds.center(); + + var xdif = bounds.center().x-abRef.x; + var ydif = bounds.center().y-abRef.y; + if (Math.abs(-Math.abs(xdif) + Math.abs(this.offset.x)) < 3 && this.offset.xs === undefined){ + bounds.moveBy({x:-xdif, y:0}) + } + if (Math.abs(-Math.abs(ydif) + Math.abs(this.offset.y)) < 3 && this.offset.ys === undefined){ + bounds.moveBy({y:-ydif, x:0}) + } + + if (this.offset.xs !== undefined || this.offset.ys !== undefined){ + var absPXY = refDocker.getDockedShape().absoluteXY(); + xdif = bounds.center().x-(absPXY.x+((abRef.x-absPXY.x)/this.offset.xs)); + ydif = bounds.center().y-(absPXY.y+((abRef.y-absPXY.y)/this.offset.ys)); + + if (Math.abs(-Math.abs(xdif) + Math.abs(this.offset.x)) < 3){ + bounds.moveBy({x:-(bounds.center().x-abRef.x), y:0}) + } + + if (Math.abs(-Math.abs(ydif) + Math.abs(this.offset.y)) < 3){ + bounds.moveBy({y:-(bounds.center().y-abRef.y), x:0}) + } + } + }, + + /** + * Returns a TRUE if there are bend point which overlay the shape + */ + isBendPointIncluded: function(edge){ + // Get absolute bounds + var ab = edge.dockers.first().getDockedShape(); + var bb = edge.dockers.last().getDockedShape(); + + if (ab) { + ab = ab.absoluteBounds(); + ab.widen(5); + } + + if (bb) { + bb = bb.absoluteBounds(); + bb.widen(20); // Wide with 20 because of the arrow from the edge + } + + return edge.dockers + .any(function(docker, i){ + var c = docker.bounds.center(); + // Dont count first and last + return i != 0 && i != edge.dockers.length-1 && + // Check if the point is included to the absolute bounds + ((ab && ab.isIncluded(c)) || (bb && bb.isIncluded(c))) + }) + }, + + removeAllDocker: function(edge){ + edge.dockers.slice(1, edge.dockers.length-1).each(function(docker){ + edge.removeDocker(docker); + }) + }, + executeAgain: function(){ + this.changes.each(function(change){ + // Reset the dockers + this.removeAllDocker(change.edge); + change.dockerPositions.each(function(pos, i){ + if (i==0||i==change.dockerPositions.length-1){ return } + var docker = change.edge.createDocker(undefined, pos); + docker.bounds.centerMoveTo(pos); + docker.update(); + }.bind(this)); + change.edge._update(true); + }.bind(this)); + }, + rollback: function(){ + this.changes.each(function(change){ + // Reset the dockers + this.removeAllDocker(change.edge); + change.oldDockerPositions.each(function(pos, i){ + if (i==0||i==change.oldDockerPositions.length-1){ return } + var docker = change.edge.createDocker(undefined, pos); + docker.bounds.centerMoveTo(pos); + docker.update(); + }.bind(this)); + change.edge._update(true); + }.bind(this)); + } + }); + + this.facade.executeCommands([new Command(allEdges, node, offset, this)]); + + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX){ var ORYX = {} } +if(!ORYX.Plugins){ ORYX.Plugins = {} } + +/** + This abstract plugin implements the core behaviour of layout + + @class ORYX.Plugins.AbstractLayouter + @constructor Creates a new instance + @author Willi Tscheschner +*/ +ORYX.Plugins.AbstractLayouter = ORYX.Plugins.AbstractPlugin.extend({ + + /** + * 'layouted' defined all types of shapes which will be layouted. + * It can be one value or an array of values. The value + * can be a Stencil ID (as String) or an class type of either + * a ORYX.Core.Node or ORYX.Core.Edge + * @type Array|String|Object + * @memberOf ORYX.Plugins.AbstractLayouter.prototype + */ + layouted : [], + + /** + * Constructor + * @param {Object} facade + * @memberOf ORYX.Plugins.AbstractLayouter.prototype + */ + construct: function( facade ){ + arguments.callee.$.construct.apply(this, arguments); + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LAYOUT, this._initLayout.bind(this)); + }, + + /** + * Proofs if this shape should be layouted or not + * @param {Object} shape + * @memberOf ORYX.Plugins.AbstractLayouter.prototype + */ + isIncludedInLayout: function(shape){ + if (!(this.layouted instanceof Array)){ + this.layouted = [this.layouted].compact(); + } + + // If there are no elements + if (this.layouted.length <= 0) { + // Return TRUE + return true; + } + + // Return TRUE if there is any correlation between + // the 'layouted' attribute and the shape themselve. + return this.layouted.any(function(s){ + if (typeof s == "string") { + return shape.getStencil().id().include(s); + } else { + return shape instanceof s; + } + }) + }, + + /** + * Callback to start the layouting + * @param {Object} event Layout event + * @param {Object} shapes Given shapes + * @memberOf ORYX.Plugins.AbstractLayouter.prototype + */ + _initLayout: function(event){ + + // Get the shapes + var shapes = [event.shapes].flatten().compact(); + + // Find all shapes which should be layouted + var toLayout = shapes.findAll(function(shape){ + return this.isIncludedInLayout(shape) + }.bind(this)) + + // If there are shapes left + if (toLayout.length > 0){ + // Do layout + this.layout(toLayout); + } + }, + + /** + * Implementation of layouting a set on shapes + * @param {Object} shapes Given shapes + * @memberOf ORYX.Plugins.AbstractLayouter.prototype + */ + layout: function(shapes){ + throw new Error("Layouter has to implement the layout function.") + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.Edit = Clazz.extend({ + + construct: function(facade){ + + this.facade = facade; + this.clipboard = new ORYX.Plugins.Edit.ClipBoard(); + + //this.facade.registerOnEvent(ORYX.CONFIG.EVENT_KEYDOWN, this.keyHandler.bind(this)); + + this.facade.offer({ + name: ORYX.I18N.Edit.cut, + description: ORYX.I18N.Edit.cutDesc, + icon: ORYX.PATH + "images/cut.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 88, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.callEdit.bind(this, this.editCut), + group: ORYX.I18N.Edit.group, + index: 1, + minShape: 1 + }); + + this.facade.offer({ + name: ORYX.I18N.Edit.copy, + description: ORYX.I18N.Edit.copyDesc, + icon: ORYX.PATH + "images/page_copy.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 67, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.callEdit.bind(this, this.editCopy, [true, false]), + group: ORYX.I18N.Edit.group, + index: 2, + minShape: 1 + }); + + this.facade.offer({ + name: ORYX.I18N.Edit.paste, + description: ORYX.I18N.Edit.pasteDesc, + icon: ORYX.PATH + "images/page_paste.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 86, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.callEdit.bind(this, this.editPaste), + isEnabled: this.clipboard.isOccupied.bind(this.clipboard), + group: ORYX.I18N.Edit.group, + index: 3, + minShape: 0, + maxShape: 0 + }); + + this.facade.offer({ + name: ORYX.I18N.Edit.del, + description: ORYX.I18N.Edit.delDesc, + icon: ORYX.PATH + "images/cross.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 8, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }, + { + keyCode: 46, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.callEdit.bind(this, this.editDelete), + group: ORYX.I18N.Edit.group, + index: 4, + minShape: 1 + }); + }, + + callEdit: function(fn, args){ + window.setTimeout(function(){ + fn.apply(this, (args instanceof Array ? args : [])); + }.bind(this), 1); + }, + + /** + * Handles the mouse down event and starts the copy-move-paste action, if + * control or meta key is pressed. + */ + handleMouseDown: function(event) { + if(this._controlPressed) { + this._controlPressed = false; + this.editCopy(); +// console.log("copiedEle: %0",this.clipboard.shapesAsJson) +// console.log("mousevent: %o",event) + this.editPaste(); + event.forceExecution = true; + this.facade.raiseEvent(event, this.clipboard.shapesAsJson); + + } + }, + + /** + * The key handler for this plugin. Every action from the set of cut, copy, + * paste and delete should be accessible trough simple keyboard shortcuts. + * This method checks whether any event triggers one of those actions. + * + * @param {Object} event The keyboard event that should be analysed for + * triggering of this plugin. + */ +// keyHandler: function(event){ +// //TODO document what event.which is. +// +// ORYX.Log.debug("edit.js handles a keyEvent."); +// +// // assure we have the current event. +// if (!event) +// event = window.event; +// +// +// // get the currently pressed key and state of control key. +// var pressedKey = event.which || event.keyCode; +// var ctrlPressed = event.ctrlKey; +// +// // if the object is to be deleted, do so, and return immediately. +// if ((pressedKey == ORYX.CONFIG.KEY_CODE_DELETE) || +// ((pressedKey == ORYX.CONFIG.KEY_CODE_BACKSPACE) && +// (event.metaKey || event.appleMetaKey))) { +// +// ORYX.Log.debug("edit.js deletes the shape."); +// this.editDelete(); +// return; +// } +// +// // if control key is not pressed, we're not interested anymore. +// if (!ctrlPressed) +// return; +// +// // when ctrl is pressed, switch trough the possibilities. +// switch (pressedKey) { +// +// // cut. +// case ORYX.CONFIG.KEY_CODE_X: +// this.editCut(); +// break; +// +// // copy. +// case ORYX.CONFIG.KEY_CODE_C: +// this.editCopy(); +// break; +// +// // paste. +// case ORYX.CONFIG.KEY_CODE_V: +// this.editPaste(); +// break; +// } +// }, + + /** + * Returns a list of shapes which should be considered while copying. + * Besides the shapes of given ones, edges and attached nodes are added to the result set. + * If one of the given shape is a child of another given shape, it is not put into the result. + */ + getAllShapesToConsider: function(shapes){ + var shapesToConsider = []; // only top-level shapes + var childShapesToConsider = []; // all child shapes of top-level shapes + + shapes.each(function(shape){ + //Throw away these shapes which have a parent in given shapes + isChildShapeOfAnother = shapes.any(function(s2){ + return s2.hasChildShape(shape); + }); + if(isChildShapeOfAnother) return; + + // This shape should be considered + shapesToConsider.push(shape); + // Consider attached nodes (e.g. intermediate events) + if (shape instanceof ORYX.Core.Node) { + var attached = shape.getOutgoingNodes(); + attached = attached.findAll(function(a){ return !shapes.include(a) }); + shapesToConsider = shapesToConsider.concat(attached); + } + + childShapesToConsider = childShapesToConsider.concat(shape.getChildShapes(true)); + }.bind(this)); + + // All edges between considered child shapes should be considered + // Look for these edges having incoming and outgoing in childShapesToConsider + var edgesToConsider = this.facade.getCanvas().getChildEdges().select(function(edge){ + // Ignore if already added + if(shapesToConsider.include(edge)) return false; + // Ignore if there are no docked shapes + if(edge.getAllDockedShapes().size() === 0) return false; + // True if all docked shapes are in considered child shapes + return edge.getAllDockedShapes().all(function(shape){ + // Remember: Edges can have other edges on outgoing, that is why edges must not be included in childShapesToConsider + return shape instanceof ORYX.Core.Edge || childShapesToConsider.include(shape); + }); + }); + shapesToConsider = shapesToConsider.concat(edgesToConsider); + + return shapesToConsider; + }, + + /** + * Performs the cut operation by first copy-ing and then deleting the + * current selection. + */ + editCut: function(){ + //TODO document why this returns false. + //TODO document what the magic boolean parameters are supposed to do. + + this.editCopy(false, true); + this.editDelete(true); + return false; + }, + + /** + * Performs the copy operation. + * @param {Object} will_not_update ?? + */ + editCopy: function( will_update, useNoOffset ){ + var selection = this.facade.getSelection(); + + //if the selection is empty, do not remove the previously copied elements + if(selection.length == 0) return; + + this.clipboard.refresh(selection, this.getAllShapesToConsider(selection), this.facade.getCanvas().getStencil().stencilSet().namespace(), useNoOffset); + + if( will_update ) this.facade.updateSelection(); + }, + + /** + * Performs the paste operation. + */ + editPaste: function(){ + // Create a new canvas with childShapes + //and stencilset namespace to be JSON Import conform + var canvas = { + childShapes: this.clipboard.shapesAsJson, + stencilset:{ + namespace:this.clipboard.SSnamespace + } + }; + // Apply json helper to iterate over json object + jQuery.extend(canvas, ORYX.Core.AbstractShape.JSONHelper); + + var childShapeResourceIds = canvas.getChildShapes(true).pluck("resourceId"); + var outgoings = {}; + // Iterate over all shapes + canvas.eachChild(function(shape, parent){ + // Throw away these references where referenced shape isn't copied + shape.outgoing = shape.outgoing.select(function(out){ + return childShapeResourceIds.include(out.resourceId); + }); + shape.outgoing.each(function(out){ + if (!outgoings[out.resourceId]){ outgoings[out.resourceId] = []; } + outgoings[out.resourceId].push(shape); + }); + + return shape; + }.bind(this), true, true); + + + // Iterate over all shapes + canvas.eachChild(function(shape, parent){ + + // Check if there has a valid target + if(shape.target && !(childShapeResourceIds.include(shape.target.resourceId))){ + shape.target = undefined; + shape.targetRemoved = true; + } + + // Check if the first docker is removed + if( shape.dockers && + shape.dockers.length >= 1 && + shape.dockers[0].getDocker && + ((shape.dockers[0].getDocker().getDockedShape() && + !childShapeResourceIds.include(shape.dockers[0].getDocker().getDockedShape().resourceId)) || + !shape.getShape().dockers[0].getDockedShape()&&!outgoings[shape.resourceId])) { + + shape.sourceRemoved = true; + } + + return shape; + }.bind(this), true, true); + + + // Iterate over top-level shapes + canvas.eachChild(function(shape, parent){ + // All top-level shapes should get an offset in their bounds + // Move the shape occording to COPY_MOVE_OFFSET + if (this.clipboard.useOffset) { + shape.bounds = { + lowerRight: { + x: shape.bounds.lowerRight.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: shape.bounds.lowerRight.y + ORYX.CONFIG.COPY_MOVE_OFFSET + }, + upperLeft: { + x: shape.bounds.upperLeft.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: shape.bounds.upperLeft.y + ORYX.CONFIG.COPY_MOVE_OFFSET + } + }; + } + // Only apply offset to shapes with a target + if (shape.dockers){ + shape.dockers = shape.dockers.map(function(docker, i){ + // If shape had a target but the copied does not have anyone anymore, + // migrate the relative dockers to absolute ones. + if( (shape.targetRemoved === true && i == shape.dockers.length - 1&&docker.getDocker) || + (shape.sourceRemoved === true && i == 0&&docker.getDocker)){ + + docker = docker.getDocker().bounds.center(); + } + + // If it is the first docker and it has a docked shape, + // just return the coordinates + if ((i == 0 && docker.getDocker instanceof Function && + shape.sourceRemoved !== true && (docker.getDocker().getDockedShape() || ((outgoings[shape.resourceId]||[]).length > 0 && (!(shape.getShape() instanceof ORYX.Core.Node) || outgoings[shape.resourceId][0].getShape() instanceof ORYX.Core.Node)))) || + (i == shape.dockers.length - 1 && docker.getDocker instanceof Function && + shape.targetRemoved !== true && (docker.getDocker().getDockedShape() || shape.target))){ + + return { + x: docker.x, + y: docker.y, + getDocker: docker.getDocker + } + } else if (this.clipboard.useOffset) { + return { + x: docker.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: docker.y + ORYX.CONFIG.COPY_MOVE_OFFSET, + getDocker: docker.getDocker + }; + } else { + return { + x: docker.x, + y: docker.y, + getDocker: docker.getDocker + }; + } + }.bind(this)); + + } else if (shape.getShape() instanceof ORYX.Core.Node && shape.dockers && shape.dockers.length > 0 && (!shape.dockers.first().getDocker || shape.sourceRemoved === true || !(shape.dockers.first().getDocker().getDockedShape() || outgoings[shape.resourceId]))){ + + shape.dockers = shape.dockers.map(function(docker, i){ + + if((shape.sourceRemoved === true && i == 0&&docker.getDocker)){ + docker = docker.getDocker().bounds.center(); + } + + if (this.clipboard.useOffset) { + return { + x: docker.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: docker.y + ORYX.CONFIG.COPY_MOVE_OFFSET, + getDocker: docker.getDocker + }; + } else { + return { + x: docker.x, + y: docker.y, + getDocker: docker.getDocker + }; + } + }.bind(this)); + } + + return shape; + }.bind(this), false, true); + + this.clipboard.useOffset = true; + this.facade.importJSON(canvas); + }, + + /** + * Performs the delete operation. No more asking. + */ + editDelete: function(){ + var selection = this.facade.getSelection(); + + var clipboard = new ORYX.Plugins.Edit.ClipBoard(); + clipboard.refresh(selection, this.getAllShapesToConsider(selection)); + + var command = new ORYX.Plugins.Edit.DeleteCommand(clipboard , this.facade); + + this.facade.executeCommands([command]); + } +}); + +ORYX.Plugins.Edit.ClipBoard = Clazz.extend({ + construct: function(){ + this.shapesAsJson = []; + this.selection = []; + this.SSnamespace=""; + this.useOffset=true; + }, + isOccupied: function(){ + return this.shapesAsJson.length > 0; + }, + refresh: function(selection, shapes, namespace, useNoOffset){ + this.selection = selection; + this.SSnamespace=namespace; + // Store outgoings, targets and parents to restore them later on + this.outgoings = {}; + this.parents = {}; + this.targets = {}; + this.useOffset = useNoOffset !== true; + + this.shapesAsJson = shapes.map(function(shape){ + var s = shape.toJSON(); + s.parent = {resourceId : shape.getParentShape().resourceId}; + s.parentIndex = shape.getParentShape().getChildShapes().indexOf(shape) + return s; + }); + } +}); + +ORYX.Plugins.Edit.DeleteCommand = ORYX.Core.Command.extend({ + construct: function(clipboard, facade){ + this.clipboard = clipboard; + this.shapesAsJson = clipboard.shapesAsJson; + this.facade = facade; + + // Store dockers of deleted shapes to restore connections + this.dockers = this.shapesAsJson.map(function(shapeAsJson) { + var shape = shapeAsJson.getShape(); + var incomingDockers = shape.getIncomingShapes().map(function(s){return s.getDockers().last();}); + var outgoingDockers = shape.getOutgoingShapes().map(function(s){return s.getDockers().first();}); + var dockers = shape.getDockers().concat(incomingDockers, outgoingDockers).compact().map(function(docker){ + return { + object: docker, + referencePoint: docker.referencePoint, + dockedShape: docker.getDockedShape() + }; + }); + return dockers; + }).flatten(); + }, + execute: function(){ + this.shapesAsJson.each(function(shapeAsJson){ + // Delete shape + this.facade.deleteShape(shapeAsJson.getShape()); + }.bind(this)); + + this.facade.setSelection([]); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + + }, + rollback: function(){ + this.shapesAsJson.each(function(shapeAsJson) { + var shape = shapeAsJson.getShape(); + var parent = this.facade.getCanvas().getChildShapeByResourceId(shapeAsJson.parent.resourceId) || this.facade.getCanvas(); + parent.add(shape, shape.parentIndex); + }.bind(this)); + + //reconnect shapes + this.dockers.each(function(d) { + d.object.setDockedShape(d.dockedShape); + d.object.setReferencePoint(d.referencePoint); + }.bind(this)); + + this.facade.setSelection(this.selectedShapes); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * @namespace Oryx name space for plugins + * @name ORYX.Plugins +*/ +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +/** + * The view plugin offers all of zooming functionality accessible over the + * tool bar. This are zoom in, zoom out, zoom to standard, zoom fit to model. + * + * @class ORYX.Plugins.View + * @extends Clazz + * @param {Object} facade The editor facade for plugins. +*/ +ORYX.Plugins.View = { + /** @lends ORYX.Plugins.View.prototype */ + facade: undefined, + + construct: function(facade, ownPluginData) { + this.facade = facade; + //Standard Values + this.zoomLevel = 1.0; + this.maxFitToScreenLevel=1.5; + this.minZoomLevel = 0.1; + this.maxZoomLevel = 2.5; + this.diff=5; //difference between canvas and view port, s.th. like toolbar?? + + //Read properties + if (ownPluginData !== undefined && ownPluginData !== null) { + ownPluginData.properties.each( function(property) { + if (property.zoomLevel) {this.zoomLevel = Number(1.0);} + if (property.maxFitToScreenLevel) {this.maxFitToScreenLevel=Number(property.maxFitToScreenLevel);} + if (property.minZoomLevel) {this.minZoomLevel = Number(property.minZoomLevel);} + if (property.maxZoomLevel) {this.maxZoomLevel = Number(property.maxZoomLevel);} + }.bind(this)); + } + + + /* Register zoom in */ + this.facade.offer({ + 'name':ORYX.I18N.View.zoomIn, + 'functionality': this.zoom.bind(this, [1.0 + ORYX.CONFIG.ZOOM_OFFSET]), + 'group': ORYX.I18N.View.group, + 'icon': ORYX.PATH + "images/magnifier_zoom_in.png", + 'description': ORYX.I18N.View.zoomInDesc, + 'index': 1, + 'minShape': 0, + 'maxShape': 0, + 'isEnabled': function(){return this.zoomLevel < this.maxZoomLevel }.bind(this)}); + + /* Register zoom out */ + this.facade.offer({ + 'name':ORYX.I18N.View.zoomOut, + 'functionality': this.zoom.bind(this, [1.0 - ORYX.CONFIG.ZOOM_OFFSET]), + 'group': ORYX.I18N.View.group, + 'icon': ORYX.PATH + "images/magnifier_zoom_out.png", + 'description': ORYX.I18N.View.zoomOutDesc, + 'index': 2, + 'minShape': 0, + 'maxShape': 0, + 'isEnabled': function(){ return this._checkSize() }.bind(this)}); + + /* Register zoom standard */ + this.facade.offer({ + 'name':ORYX.I18N.View.zoomStandard, + 'functionality': this.setAFixZoomLevel.bind(this, 1), + 'group': ORYX.I18N.View.group, + 'icon': ORYX.PATH + "images/zoom_standard.png", + 'cls' : 'icon-large', + 'description': ORYX.I18N.View.zoomStandardDesc, + 'index': 3, + 'minShape': 0, + 'maxShape': 0, + 'isEnabled': function(){return this.zoomLevel != 1}.bind(this) + }); + + /* Register zoom fit to model */ + this.facade.offer({ + 'name':ORYX.I18N.View.zoomFitToModel, + 'functionality': this.zoomFitToModel.bind(this), + 'group': ORYX.I18N.View.group, + 'icon': ORYX.PATH + "images/image.png", + 'description': ORYX.I18N.View.zoomFitToModelDesc, + 'index': 4, + 'minShape': 0, + 'maxShape': 0 + }); + }, + + /** + * It sets the zoom level to a fix value and call the zooming function. + * + * @param {Number} zoomLevel + * the zoom level + */ + setAFixZoomLevel : function(zoomLevel) { + this.zoomLevel = zoomLevel; + this._checkZoomLevelRange(); + this.zoom(1); + }, + + /** + * It does the actual zooming. It changes the viewable size of the canvas + * and all to its child elements. + * + * @param {Number} factor + * the factor to adjust the zoom level + */ + zoom: function(factor) { + // TODO: Zoomen auf allen Objekten im SVG-DOM + + this.zoomLevel *= factor; + var scrollNode = this.facade.getCanvas().getHTMLContainer().parentNode.parentNode; + var canvas = this.facade.getCanvas(); + var newWidth = canvas.bounds.width() * this.zoomLevel; + var newHeight = canvas.bounds.height() * this.zoomLevel; + + /* Set new top offset */ + var offsetTop = (canvas.node.parentNode.parentNode.parentNode.offsetHeight - newHeight) / 2.0; + offsetTop = offsetTop > 20 ? offsetTop - 20 : 0; + canvas.node.parentNode.parentNode.style.marginTop = offsetTop + "px"; + offsetTop += 5; + canvas.getHTMLContainer().style.top = offsetTop + "px"; + + /*readjust scrollbar*/ + var newScrollTop= scrollNode.scrollTop - Math.round((canvas.getHTMLContainer().parentNode.getHeight()-newHeight) / 2)+this.diff; + var newScrollLeft= scrollNode.scrollLeft - Math.round((canvas.getHTMLContainer().parentNode.getWidth()-newWidth) / 2)+this.diff; + + /* Set new Zoom-Level */ + canvas.setSize({width: newWidth, height: newHeight}, true); + + /* Set Scale-Factor */ + canvas.node.setAttributeNS(null, "transform", "scale(" +this.zoomLevel+ ")"); + + /* Refresh the Selection */ + this.facade.updateSelection(); + scrollNode.scrollTop=newScrollTop; + scrollNode.scrollLeft=newScrollLeft; + + /* Update the zoom-level*/ + canvas.zoomLevel = this.zoomLevel; + }, + + + /** + * It calculates the zoom level to fit whole model into the visible area + * of the canvas. Than the model gets zoomed and the position of the + * scroll bars are adjusted. + * + */ + zoomFitToModel: function() { + + /* Get the size of the visible area of the canvas */ + var scrollNode = this.facade.getCanvas().getHTMLContainer().parentNode.parentNode; + var visibleHeight = scrollNode.getHeight() - 30; + var visibleWidth = scrollNode.getWidth() - 30; + + var nodes = this.facade.getCanvas().getChildShapes(); + + if(!nodes || nodes.length < 1) { + return false; + } + + /* Calculate size of canvas to fit the model */ + var bounds = nodes[0].absoluteBounds().clone(); + nodes.each(function(node) { + bounds.include(node.absoluteBounds().clone()); + }); + + + /* Set new Zoom Level */ + var scaleFactorWidth = visibleWidth / bounds.width(); + var scaleFactorHeight = visibleHeight / bounds.height(); + + /* Choose the smaller zoom level to fit the whole model */ + var zoomFactor = scaleFactorHeight < scaleFactorWidth ? scaleFactorHeight : scaleFactorWidth; + + /*Test if maximum zoom is reached*/ + if(zoomFactor>this.maxFitToScreenLevel){zoomFactor=this.maxFitToScreenLevel} + /* Do zooming */ + this.setAFixZoomLevel(zoomFactor); + + /* Set scroll bar position */ + scrollNode.scrollTop = Math.round(bounds.upperLeft().y * this.zoomLevel) - 5; + scrollNode.scrollLeft = Math.round(bounds.upperLeft().x * this.zoomLevel) - 5; + + }, + + /** + * It checks if the zoom level is less or equal to the level, which is required + * to schow the whole canvas. + * + * @private + */ + _checkSize:function(){ + var canvasParent=this.facade.getCanvas().getHTMLContainer().parentNode; + var minForCanvas= Math.min((canvasParent.parentNode.getWidth()/canvasParent.getWidth()),(canvasParent.parentNode.getHeight()/canvasParent.getHeight())); + return 1.05 > minForCanvas; + + }, + /** + * It checks if the zoom level is included in the definined zoom + * level range. + * + * @private + */ + _checkZoomLevelRange: function() { + /*var canvasParent=this.facade.getCanvas().getHTMLContainer().parentNode; + var maxForCanvas= Math.max((canvasParent.parentNode.getWidth()/canvasParent.getWidth()),(canvasParent.parentNode.getHeight()/canvasParent.getHeight())); + if(this.zoomLevel > maxForCanvas) { + this.zoomLevel = maxForCanvas; + }*/ + if(this.zoomLevel < this.minZoomLevel) { + this.zoomLevel = this.minZoomLevel; + } + + if(this.zoomLevel > this.maxZoomLevel) { + this.zoomLevel = this.maxZoomLevel; + } + } +}; + +ORYX.Plugins.View = Clazz.extend(ORYX.Plugins.View); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +if(!Signavio){ var Signavio = {} }; + if (!Signavio.Core) { Signavio.Core = {} }; + Signavio.Core.Version = "1.0"; + /* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!Signavio) { + var Signavio = new Object(); +} + +if (!Signavio.Plugins) { + Signavio.Plugins = new Object(); +} + +if (!Signavio.Plugins.Utils) { + Signavio.Plugins.Utils = new Object(); +} + +if (!Signavio.Helper) { + Signavio.Helper = new Object(); +} + + +new function() { + + /** + * Provides an uniq id + * @overwrite + * @return {String} + * + */ + ORYX.Editor.provideId = function() { + var res = [], hex = '0123456789ABCDEF'; + + for (var i = 0; i < 36; i++) res[i] = Math.floor(Math.random()*0x10); + + res[14] = 4; + res[19] = (res[19] & 0x3) | 0x8; + + for (var i = 0; i < 36; i++) res[i] = hex[res[i]]; + + res[8] = res[13] = res[18] = res[23] = '-'; + + return "sid-" + res.join(''); + }; + + +}(); + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!ORYX.Plugins) { + ORYX.Plugins = new Object(); +} + +/** + * This plugin is responsible for displaying loading indicators and to prevent + * the user from accidently unloading the page by, e.g., pressing the backspace + * button and returning to the previous site in history. + * @param {Object} facade The editor plugin facade to register enhancements with. + */ +ORYX.Plugins.Loading = { + + construct: function(facade){ + + this.facade = facade; + + // The parent Node + this.node = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", this.facade.getCanvas().getHTMLContainer().parentNode, ['div', { + 'class': 'LoadingIndicator' + }, '']); + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADING_ENABLE, this.enableLoading.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADING_DISABLE, this.disableLoading.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADING_STATUS, this.showStatus.bind(this)); + + this.disableLoading(); + }, + + enableLoading: function(options){ + if(options.text) + this.node.innerHTML = options.text + "..."; + else + this.node.innerHTML = ORYX.I18N.Loading.waiting; + this.node.removeClassName('StatusIndicator'); + this.node.addClassName('LoadingIndicator'); + this.node.style.display = "block"; + + var pos = this.facade.getCanvas().rootNode.parentNode.parentNode.parentNode.parentNode; + + this.node.style.top = pos.offsetTop + 'px'; + this.node.style.left = pos.offsetLeft +'px'; + + }, + + disableLoading: function(){ + this.node.style.display = "none"; + }, + + showStatus: function(options) { + if(options.text) { + this.node.innerHTML = options.text; + this.node.addClassName('StatusIndicator'); + this.node.removeClassName('LoadingIndicator'); + this.node.style.display = 'block'; + + var pos = this.facade.getCanvas().rootNode.parentNode.parentNode.parentNode.parentNode; + + this.node.style.top = pos.offsetTop + 'px'; + this.node.style.left = pos.offsetLeft +'px'; + + var tout = options.timeout ? options.timeout : 2000; + + window.setTimeout((function(){ + + this.disableLoading(); + + }).bind(this), tout); + } + + } +} + +ORYX.Plugins.Loading = Clazz.extend(ORYX.Plugins.Loading); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +if (!ORYX.Plugins) { + ORYX.Plugins = new Object(); +} + +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +/** + * This plugin is responsible for resizing the canvas. + * @param {Object} facade The editor plugin facade to register enhancements with. + */ +ORYX.Plugins.CanvasResize = Clazz.extend({ + + construct: function(facade){ + + this.facade = facade; + new ORYX.Plugins.CanvasResizeButton( this.facade.getCanvas(), "N", this.resize.bind(this)); + new ORYX.Plugins.CanvasResizeButton( this.facade.getCanvas(), "W", this.resize.bind(this)); + new ORYX.Plugins.CanvasResizeButton( this.facade.getCanvas(), "E", this.resize.bind(this)); + new ORYX.Plugins.CanvasResizeButton( this.facade.getCanvas(), "S", this.resize.bind(this)); + + window.setTimeout(function(){jQuery(window).trigger('resize');}); + + }, + + resize: function( position, shrink ){ + + resizeCanvas = function(position, extentionSize, facade) { + var canvas = facade.getCanvas(); + var b = canvas.bounds; + var scrollNode = facade.getCanvas().getHTMLContainer().parentNode.parentNode; + + if( position == "E" || position == "W"){ + canvas.setSize({width: (b.width() + extentionSize)*canvas.zoomLevel, height: (b.height())*canvas.zoomLevel}) + + } else if( position == "S" || position == "N"){ + canvas.setSize({width: (b.width())*canvas.zoomLevel, height: (b.height() + extentionSize)*canvas.zoomLevel}) + } + + if( position == "N" || position == "W"){ + + var move = position == "N" ? {x: 0, y: extentionSize}: {x: extentionSize, y: 0 }; + + // Move all children + canvas.getChildNodes(false, function(shape){ shape.bounds.moveBy(move) }) + // Move all dockers, when the edge has at least one docked shape + var edges = canvas.getChildEdges().findAll(function(edge){ return edge.getAllDockedShapes().length > 0}) + var dockers = edges.collect(function(edge){ return edge.dockers.findAll(function(docker){ return !docker.getDockedShape() })}).flatten(); + dockers.each(function(docker){ docker.bounds.moveBy(move)}) + } else if( position == "S" ){ + scrollNode.scrollTop += extentionSize; + } else if( position == "E" ){ + scrollNode.scrollLeft += extentionSize; + } + + jQuery(window).trigger('resize'); + + canvas.update(); + facade.updateSelection(); + } + + var commandClass = ORYX.Core.Command.extend({ + construct: function(position, extentionSize, facade){ + this.position = position; + this.extentionSize = extentionSize; + this.facade = facade; + }, + execute: function(){ + resizeCanvas(this.position, this.extentionSize, this.facade); + }, + rollback: function(){ + resizeCanvas(this.position, -this.extentionSize, this.facade); + }, + update:function(){ + } + }); + + var extentionSize = ORYX.CONFIG.CANVAS_RESIZE_INTERVAL; + if(shrink) extentionSize = -extentionSize; + var command = new commandClass(position, extentionSize, this.facade); + + this.facade.executeCommands([command]); + + } + +}); + + +ORYX.Plugins.CanvasResizeButton = Clazz.extend({ + + construct: function(canvas, position, callback){ + this.canvas = canvas; + var parentNode = canvas.getHTMLContainer().parentNode; + + window.myParent=parentNode; + + var actualScrollNode = jQuery('#canvasSection')[0]; + var scrollNode = actualScrollNode; + var canvasNode = jQuery('#canvasSection').find(".ORYX_Editor")[0]; + var svgRootNode = canvasNode.children[0]; + + var iconClass = 'glyphicon glyphicon-chevron-'; + var iconClassShrink = 'glyphicon glyphicon-chevron-'; + if(position == 'N') { + iconClass += 'up'; + iconClassShrink += 'down'; + } else if(position == 'S') { + iconClass += 'down'; + iconClassShrink += 'up'; + } else if(position == 'E') { + iconClass += 'right'; + iconClassShrink += 'left'; + } else if(position == 'W') { + iconClass += 'left'; + iconClassShrink += 'right'; + } + + // The buttons + var idGrow = 'canvas-shrink-' + position; + var idShrink = 'canvas-grow-' + position; + + var buttonGrow = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", parentNode, ['div', {'class': 'canvas_resize_indicator canvas_resize_indicator_grow' + ' ' + position, 'id': idGrow ,'title':ORYX.I18N.RESIZE.tipGrow+ORYX.I18N.RESIZE[position]}, + ['i', {'class' : iconClass}] + ]); + var buttonShrink = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", parentNode, ['div', {'class': 'canvas_resize_indicator canvas_resize_indicator_shrink' + ' ' + position, 'id': idShrink ,'title':ORYX.I18N.RESIZE.tipGrow+ORYX.I18N.RESIZE[position]}, + ['i', {'class' : iconClassShrink}] + ]); + // Defines a callback which gives back + // a boolean if the current mouse event + // is over the particular button area + var offSetWidth = 60; + var isOverOffset = function(event) { + + var isOverButton = event.target.id.indexOf("canvas-shrink") != -1 + || event.target.id.indexOf("canvas-grow") != -1 + || event.target.parentNode.id.indexOf("canvas-shrink") != -1 + || event.target.parentNode.id.indexOf("canvas-grow") != -1; + if(isOverButton) { + if(event.target.id == idGrow || event.target.id == idShrink || + event.target.parentNode.id == idGrow || event.target.parentNode.id == idShrink ) { + return true; + } else { + return false; + } + } + + if(event.target!=parentNode && event.target!=scrollNode&& event.target!=scrollNode.firstChild&& event.target!=svgRootNode&& event.target!=scrollNode){ return false; } + + //if(inCanvas){offSetWidth=30}else{offSetWidth=30*2} + //Safari work around + var X=event.offsetX !== undefined ? event.offsetX : event.layerX; + var Y=event.offsetY !== undefined ? event.offsetY : event.layerY; + + var canvasOffset = 0; + if(canvasNode.clientWidth < actualScrollNode.clientWidth) { + var widthDiff = actualScrollNode.clientWidth - canvasNode.clientWidth; + canvasOffset = widthDiff / 2; + } + + // Adjust to relative location to the actual viewport + Y = Y - actualScrollNode.scrollTop; + X = X - actualScrollNode.scrollLeft; + + + if(position == "N"){ + return Y < offSetWidth; + } else if(position == "W"){ + return X < offSetWidth + canvasOffset; + } else if(position == "E"){ + return actualScrollNode.clientWidth - X < offSetWidth + canvasOffset; + } else if(position == "S"){ + return actualScrollNode.clientHeight - Y < offSetWidth; + } + + return false; + }; + + var showButtons = (function() { + buttonGrow.show(); + + var w = canvas.bounds.width(); + var h = canvas.bounds.height(); + + if(position=="N" && (h - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_HEIGHT)) buttonShrink.show(); + else if(position=="E" && (w - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_WIDTH)) buttonShrink.show(); + else if(position=="S" && (h - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_HEIGHT)) buttonShrink.show(); + else if(position=="W" && (w - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_WIDTH)) buttonShrink.show(); + else buttonShrink.hide(); + + + }).bind(this); + + var hideButtons = function() { + buttonGrow.hide(); + buttonShrink.hide(); + }; + + // If the mouse move is over the button area, show the button + parentNode.parentNode.addEventListener( ORYX.CONFIG.EVENT_MOUSEMOVE, function(event){ if( isOverOffset(event) ){showButtons();} else {hideButtons()}} , false ); + // If the mouse is over the button, show them + buttonGrow.addEventListener( ORYX.CONFIG.EVENT_MOUSEOVER, function(event){showButtons();}, true ); + buttonShrink.addEventListener( ORYX.CONFIG.EVENT_MOUSEOVER, function(event){showButtons();}, true ); + // If the mouse is out, hide the button + //scrollNode.addEventListener( ORYX.CONFIG.EVENT_MOUSEOUT, function(event){button.hide()}, true ) + parentNode.parentNode.addEventListener( ORYX.CONFIG.EVENT_MOUSEOUT, function(event){hideButtons()} , true ); + //svgRootNode.addEventListener( ORYX.CONFIG.EVENT_MOUSEOUT, function(event){ inCanvas = false } , true ); + + // Hide the button initialy + hideButtons(); + + // Add the callbacks + buttonGrow.addEventListener('click', function(){callback( position ); showButtons();}, true); + buttonShrink.addEventListener('click', function(){callback( position, true ); showButtons();}, true); + + } + + +}); + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.RenameShapes = Clazz.extend({ + + facade: undefined, + + construct: function(facade){ + + this.facade = facade; + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_CANVAS_SCROLL, this.hideField.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DBLCLICK, this.actOnDBLClick.bind(this)); + this.facade.offer({ + keyCodes: [{ + keyCode: 113, // F2-Key + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.renamePerF2.bind(this) + }); + + + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEDOWN, this.hide.bind(this), true); + }, + + /** + * This method handles the "F2" key down event. The selected shape are looked + * up and the editing of title/name of it gets started. + */ + renamePerF2 : function() { + var selectedShapes = this.facade.getSelection(); + this.actOnDBLClick(undefined, selectedShapes.first()); + }, + + actOnDBLClick: function(evt, shape){ + + if( !(shape instanceof ORYX.Core.Shape) ){ return; } + + // Destroys the old input, if there is one + this.destroy(); + + // Get all properties which where at least one ref to view is set + var props = shape.getStencil().properties().findAll(function(item){ + return (item.refToView() + && item.refToView().length > 0 + && item.directlyEditable()); + }); + // from these, get all properties where write access are and the type is String or Expression + props = props.findAll(function(item){ return !item.readonly() && (item.type() == ORYX.CONFIG.TYPE_STRING || item.type() == ORYX.CONFIG.TYPE_EXPRESSION || item.type() == ORYX.CONFIG.TYPE_DATASOURCE); }); + + // Get all ref ids + var allRefToViews = props.collect(function(prop){ return prop.refToView(); }).flatten().compact(); + // Get all labels from the shape with the ref ids + var labels = shape.getLabels().findAll(function(label){ return allRefToViews.any(function(toView){ return label.id.endsWith(toView); }); }); + + // If there are no referenced labels --> return + if( labels.length == 0 ){ return; } + + // Define the nearest label + var nearestLabel = labels.length <= 1 ? labels[0] : null; + if( !nearestLabel ){ + nearestLabel = labels.find(function(label){ return label.node == evt.target || label.node == evt.target.parentNode; }); + if( !nearestLabel ){ + + var evtCoord = this.facade.eventCoordinates(evt); + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + evtCoord.x = evtCoord.x / additionalIEZoom; + evtCoord.y = evtCoord.y / additionalIEZoom; + } + + evtCoord.y += $("editor-header").clientHeight - $("canvasSection").scrollTop - 5; + if (KISBPM.HEADER_CONFIG.showAppTitle == false) + { + evtCoord.y += 61; + } + + evtCoord.x -= $("canvasSection").scrollLeft; + + var trans = this.facade.getCanvas().rootNode.lastChild.getScreenCTM(); + evtCoord.x *= trans.a; + evtCoord.y *= trans.d; + + var diff = labels.collect(function(label){ + var center = this.getCenterPosition( label.node ); + var len = Math.sqrt( Math.pow(center.x - evtCoord.x, 2) + Math.pow(center.y - evtCoord.y, 2)); + return {diff: len, label: label}; + }.bind(this)); + + diff.sort(function(a, b){ return a.diff > b.diff; }); + + nearestLabel = diff[0].label; + + } + } + // Get the particular property for the label + var prop = props.find(function(item){ return item.refToView().any(function(toView){ return nearestLabel.id == shape.id + toView; });}); + + // Get the center position from the nearest label + var width = Math.min(Math.max(100, shape.bounds.width()), 200); + var center = this.getCenterPosition( nearestLabel.node, shape ); + center.x -= (width/2); + var propId = prop.prefix() + "-" + prop.id(); + var textInput = document.createElement("textarea"); + textInput.id = 'shapeTextInput'; + textInput.style.position = 'absolute'; + textInput.style.width = width + 'px'; + textInput.style.left = (center.x < 10) ? 10 : center.x + 'px'; + textInput.style.top = (center.y - 15) + 'px'; + textInput.className = 'x-form-textarea x-form-field x_form_text_set_absolute'; + textInput.value = shape.properties[propId]; + this.oldValueText = shape.properties[propId]; + document.getElementById('canvasSection').appendChild(textInput); + this.shownTextField = textInput; + + + // Value change listener needs to be defined now since we reference it in the text field + this.updateValueFunction = function(newValue, oldValue) { + var currentEl = shape; + var facade = this.facade; + + if (oldValue != newValue) { + // Implement the specific command for property change + var commandClass = ORYX.Core.Command.extend({ + construct: function(){ + this.el = currentEl; + this.propId = propId; + this.oldValue = oldValue; + this.newValue = newValue; + this.facade = facade; + }, + execute: function(){ + this.el.setProperty(this.propId, this.newValue); + //this.el.update(); + this.facade.setSelection([this.el]); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + }, + rollback: function(){ + this.el.setProperty(this.propId, this.oldValue); + //this.el.update(); + this.facade.setSelection([this.el]); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + } + }); + // Instantiated the class + var command = new commandClass(); + + // Execute the command + this.facade.executeCommands([command]); + } + }.bind(this); + + jQuery("#shapeTextInput").focus(); + + jQuery("#shapeTextInput").autogrow(); + + // Disable the keydown in the editor (that when hitting the delete button, the shapes not get deleted) + this.facade.disableEvent(ORYX.CONFIG.EVENT_KEYDOWN); + + }, + + getCenterPosition: function(svgNode, shape){ + + if (!svgNode) { return {x:0, y:0}; } + + var scale = this.facade.getCanvas().node.getScreenCTM(); + var absoluteXY = shape.bounds.upperLeft(); + + var hasParent = true; + var searchShape = shape; + while (hasParent) + { + if (searchShape.getParentShape().getStencil().idWithoutNs() === 'BPMNDiagram') + { + hasParent = false; + } + else + { + var parentXY = searchShape.getParentShape().bounds.upperLeft(); + absoluteXY.x += parentXY.x; + absoluteXY.y += parentXY.y; + searchShape = searchShape.getParentShape(); + } + } + + var center = shape.bounds.midPoint(); + center.x += absoluteXY.x + scale.e; + center.y += absoluteXY.y + scale.f; + + center.x *= scale.a; + center.y *= scale.d; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom === 1) { + center.y = center.y - jQuery("#canvasSection").offset().top + 5; + center.x -= jQuery("#canvasSection").offset().left; + + } else { + var canvasOffsetLeft = jQuery("#canvasSection").offset().left; + var canvasScrollLeft = jQuery("#canvasSection").scrollLeft(); + var canvasScrollTop = jQuery("#canvasSection").scrollTop(); + + var offset = scale.e - (canvasOffsetLeft * additionalIEZoom); + var additionaloffset = 0; + if (offset > 10) { + additionaloffset = (offset / additionalIEZoom) - offset; + } + center.y = center.y - (jQuery("#canvasSection").offset().top * additionalIEZoom) + 5 + ((canvasScrollTop * additionalIEZoom) - canvasScrollTop); + center.x = center.x - (canvasOffsetLeft * additionalIEZoom) + additionaloffset + ((canvasScrollLeft * additionalIEZoom) - canvasScrollLeft); + } + + + return center; + }, + + hide: function(e){ + if (this.shownTextField && (!e || e.target !== this.shownTextField)) { + var newValue = this.shownTextField.value; + if (newValue !== this.oldValueText) + { + this.updateValueFunction(newValue, this.oldValueText); + } + this.destroy(); + } + }, + + hideField: function(e){ + if (this.shownTextField) { + this.destroy(); + } + }, + + destroy: function(e){ + var textInputComp = jQuery("#shapeTextInput"); + if( textInputComp ){ + textInputComp.remove(); + delete this.shownTextField; + + this.facade.enableEvent(ORYX.CONFIG.EVENT_KEYDOWN); + } + } +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +/** + * Supports EPCs by offering a syntax check and export and import ability.. + * + * + */ +ORYX.Plugins.ProcessLink = Clazz.extend({ + + facade: undefined, + + /** + * Offers the plugin functionality: + * + */ + construct: function(facade) { + + this.facade = facade; + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_PROPERTY_CHANGED, this.propertyChanged.bind(this) ); + + }, + + + /** + * + * @param {Object} option + */ + propertyChanged: function( option, node){ + + if( option.name !== "oryx-refuri" || !node instanceof ORYX.Core.Node ){ return } + + + if( option.value && option.value.length > 0 && option.value != "undefined"){ + + this.show( node, option.value ); + + } else { + + this.hide( node ); + + } + + }, + + /** + * Shows the Link for a particular shape with a specific url + * + * @param {Object} shape + * @param {Object} url + */ + show: function( shape, url){ + + + // Generate the svg-representation of a link + var link = ORYX.Editor.graft("http://www.w3.org/2000/svg", null , + [ 'a', + {'target': '_blank'}, + ['path', + { "stroke-width": 1.0, "stroke":"#00DD00", "fill": "#00AA00", "d": "M3,3 l0,-2.5 l7.5,0 l0,-2.5 l7.5,4.5 l-7.5,3.5 l0,-2.5 l-8,0", "line-captions": "round"} + ] + ]); + + var link = ORYX.Editor.graft("http://www.w3.org/2000/svg", null , + [ 'a', + {'target': '_blank'}, + ['path', { "style": "fill:#92BFFC;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72", "d": "M0 1.44 L0 15.05 L11.91 15.05 L11.91 5.98 L7.37 1.44 L0 1.44 Z"}], + ['path', { "style": "stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72;fill:none;", "transform": "translate(7.5, -8.5)", "d": "M0 10.51 L0 15.05 L4.54 15.05"}], + ['path', { "style": "fill:#f28226;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72", "transform": "translate(-3, -1)", "d": "M0 8.81 L0 13.06 L5.95 13.06 L5.95 15.05 A50.2313 50.2313 -175.57 0 0 10.77 11.08 A49.9128 49.9128 -1.28 0 0 5.95 6.54 L5.95 8.81 L0 8.81 Z"}], + ]); + + /* + * + * [ 'a', + {'target': '_blank'}, + ['path', { "style": "fill:none;stroke-width:0.5px; stroke:#000000", "d": "M7,4 l0,2"}], + ['path', { "style": "fill:none;stroke-width:0.5px; stroke:#000000", "d": "M4,8 l-2,0 l0,6"}], + ['path', { "style": "fill:none;stroke-width:0.5px; stroke:#000000", "d": "M10,8 l2,0 l0,6"}], + ['rect', { "style": "fill:#96ff96;stroke:#000000;stroke-width:1", "width": 6, "height": 4, "x": 4, "y": 0}], + ['rect', { "style": "fill:#ffafff;stroke:#000000;stroke-width:1", "width": 6, "height": 4, "x": 4, "y": 6}], + ['rect', { "style": "fill:#96ff96;stroke:#000000;stroke-width:1", "width": 6, "height": 4, "x": 0, "y": 12}], + ['rect', { "style": "fill:#96ff96;stroke:#000000;stroke-width:1", "width": 6, "height": 4, "x": 8, "y": 12}], + ['rect', { "style": "fill:none;stroke:none;pointer-events:all", "width": 14, "height": 16, "x": 0, "y": 0}] + ]); + */ + + // Set the link with the special namespace + link.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", url); + + + // Shows the link in the overlay + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_OVERLAY_SHOW, + id: "arissupport.urlref_" + shape.id, + shapes: [shape], + node: link, + nodePosition: "SE" + }); + + }, + + /** + * Hides the Link for a particular shape + * + * @param {Object} shape + */ + hide: function( shape ){ + + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_OVERLAY_HIDE, + id: "arissupport.urlref_" + shape.id + }); + + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +Array.prototype.insertFrom = function(from, to){ + to = Math.max(0, to); + from = Math.min( Math.max(0, from), this.length-1 ); + + var el = this[from]; + var old = this.without(el); + var newA = old.slice(0, to); + newA.push(el); + if(old.length > to ){ + newA = newA.concat(old.slice(to)) + }; + return newA; +} + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.Arrangement = ORYX.Plugins.AbstractPlugin.extend({ + + facade: undefined, + + construct: function(facade) { + this.facade = facade; + + // Z-Ordering + /** Hide for SIGNAVIO + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.btf, + 'functionality': this.setZLevel.bind(this, this.setToTop), + 'group': ORYX.I18N.Arrangement.groupZ, + 'icon': ORYX.PATH + "images/shape_move_front.png", + 'description': ORYX.I18N.Arrangement.btfDesc, + 'index': 1, + 'minShape': 1}); + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.btb, + 'functionality': this.setZLevel.bind(this, this.setToBack), + 'group': ORYX.I18N.Arrangement.groupZ, + 'icon': ORYX.PATH + "images/shape_move_back.png", + 'description': ORYX.I18N.Arrangement.btbDesc, + 'index': 2, + 'minShape': 1}); + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.bf, + 'functionality': this.setZLevel.bind(this, this.setForward), + 'group': ORYX.I18N.Arrangement.groupZ, + 'icon': ORYX.PATH + "images/shape_move_forwards.png", + 'description': ORYX.I18N.Arrangement.bfDesc, + 'index': 3, + 'minShape': 1}); + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.bb, + 'functionality': this.setZLevel.bind(this, this.setBackward), + 'group': ORYX.I18N.Arrangement.groupZ, + 'icon': ORYX.PATH + "images/shape_move_backwards.png", + 'description': ORYX.I18N.Arrangement.bbDesc, + 'index': 4, + 'minShape': 1}); + + // Aligment + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.ab, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_BOTTOM]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_bottom.png", + 'description': ORYX.I18N.Arrangement.abDesc, + 'index': 1, + 'minShape': 2}); + + + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.at, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_TOP]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_top.png", + 'description': ORYX.I18N.Arrangement.atDesc, + 'index': 3, + 'minShape': 2}); + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.al, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_LEFT]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_left.png", + 'description': ORYX.I18N.Arrangement.alDesc, + 'index': 4, + 'minShape': 2}); + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.ar, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_RIGHT]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_right.png", + 'description': ORYX.I18N.Arrangement.arDesc, + 'index': 6, + 'minShape': 2}); + + **/ + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.am, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_MIDDLE]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_middle.png", + 'description': ORYX.I18N.Arrangement.amDesc, + 'index': 1, + 'minShape': 2}); + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.ac, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_CENTER]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_center.png", + 'description': ORYX.I18N.Arrangement.acDesc, + 'index': 2, + 'minShape': 2}); + + + this.facade.offer({ + 'name':ORYX.I18N.Arrangement.as, + 'functionality': this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_SIZE]), + 'group': ORYX.I18N.Arrangement.groupA, + 'icon': ORYX.PATH + "images/shape_align_size.png", + 'description': ORYX.I18N.Arrangement.asDesc, + 'index': 3, + 'minShape': 2}); + + + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_TOP, this.setZLevel.bind(this, this.setToTop) ); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_BACK, this.setZLevel.bind(this, this.setToBack) ); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_FORWARD, this.setZLevel.bind(this, this.setForward) ); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_BACKWARD, this.setZLevel.bind(this, this.setBackward) ); + + + }, + + onSelectionChanged: function(elemnt){ + var selection = this.facade.getSelection(); + if (selection.length === 1 && selection[0] instanceof ORYX.Core.Edge) { + this.setToTop(selection); + } + }, + + setZLevel:function(callback, event){ + + //Command-Pattern for dragging one docker + var zLevelCommand = ORYX.Core.Command.extend({ + construct: function(callback, elements, facade){ + this.callback = callback; + this.elements = elements; + // For redo, the previous elements get stored + this.elAndIndex = elements.map(function(el){ return {el:el, previous:el.parent.children[el.parent.children.indexOf(el)-1]} }) + this.facade = facade; + }, + execute: function(){ + + // Call the defined z-order callback with the elements + this.callback( this.elements ) + this.facade.setSelection( this.elements ) + }, + rollback: function(){ + + // Sort all elements on the index of there containment + var sortedEl = this.elAndIndex.sortBy( function( el ) { + var value = el.el; + var t = $A(value.node.parentNode.childNodes); + return t.indexOf(value.node); + }); + + // Every element get setted back bevor the old previous element + for(var i=0; i<sortedEl.length; i++){ + var el = sortedEl[i].el; + var p = el.parent; + var oldIndex = p.children.indexOf(el); + var newIndex = p.children.indexOf(sortedEl[i].previous); + newIndex = newIndex || 0 + p.children = p.children.insertFrom(oldIndex, newIndex) + el.node.parentNode.insertBefore(el.node, el.node.parentNode.childNodes[newIndex+1]); + } + + // Reset the selection + this.facade.setSelection( this.elements ) + } + }); + + // Instanziate the dockCommand + var command = new zLevelCommand(callback, this.facade.getSelection(), this.facade); + if( event.excludeCommand ){ + command.execute(); + } else { + this.facade.executeCommands( [command] ); + } + + }, + + setToTop: function(elements) { + + // Sortieren des Arrays nach dem Index des SVGKnotens im Bezug auf dem Elternknoten. + var tmpElem = elements.sortBy( function(value, index) { + var t = $A(value.node.parentNode.childNodes); + return t.indexOf(value.node); + }); + // Sortiertes Array wird nach oben verschoben. + tmpElem.each( function(value) { + var p = value.parent; + if (p.children.last() === value){ + return; + } + p.children = p.children.without( value ) + p.children.push(value); + value.node.parentNode.appendChild(value.node); + }); + }, + + setToBack: function(elements) { + // Sortieren des Arrays nach dem Index des SVGKnotens im Bezug auf dem Elternknoten. + var tmpElem = elements.sortBy( function(value, index) { + var t = $A(value.node.parentNode.childNodes); + return t.indexOf(value.node); + }); + + tmpElem = tmpElem.reverse(); + + // Sortiertes Array wird nach unten verschoben. + tmpElem.each( function(value) { + var p = value.parent + p.children = p.children.without( value ) + p.children.unshift( value ); + value.node.parentNode.insertBefore(value.node, value.node.parentNode.firstChild); + }); + + + }, + + setBackward: function(elements) { + // Sortieren des Arrays nach dem Index des SVGKnotens im Bezug auf dem Elternknoten. + var tmpElem = elements.sortBy( function(value, index) { + var t = $A(value.node.parentNode.childNodes); + return t.indexOf(value.node); + }); + + // Reverse the elements + tmpElem = tmpElem.reverse(); + + // Delete all Nodes who are the next Node in the nodes-Array + var compactElem = tmpElem.findAll(function(el) {return !tmpElem.some(function(checkedEl){ return checkedEl.node == el.node.previousSibling})}); + + // Sortiertes Array wird nach eine Ebene nach oben verschoben. + compactElem.each( function(el) { + if(el.node.previousSibling === null) { return; } + var p = el.parent; + var index = p.children.indexOf(el); + p.children = p.children.insertFrom(index, index-1) + el.node.parentNode.insertBefore(el.node, el.node.previousSibling); + }); + + + }, + + setForward: function(elements) { + // Sortieren des Arrays nach dem Index des SVGKnotens im Bezug auf dem Elternknoten. + var tmpElem = elements.sortBy( function(value, index) { + var t = $A(value.node.parentNode.childNodes); + return t.indexOf(value.node); + }); + + + // Delete all Nodes who are the next Node in the nodes-Array + var compactElem = tmpElem.findAll(function(el) {return !tmpElem.some(function(checkedEl){ return checkedEl.node == el.node.nextSibling})}); + + + // Sortiertes Array wird eine Ebene nach unten verschoben. + compactElem.each( function(el) { + var nextNode = el.node.nextSibling + if(nextNode === null) { return; } + var index = el.parent.children.indexOf(el); + var p = el.parent; + p.children = p.children.insertFrom(index, index+1) + el.node.parentNode.insertBefore(nextNode, el.node); + }); + }, + + + alignShapes: function(way) { + + var elements = this.facade.getSelection(); + + // Set the elements to all Top-Level elements + elements = this.facade.getCanvas().getShapesWithSharedParent(elements); + // Get only nodes + elements = elements.findAll(function(value) { + return (value instanceof ORYX.Core.Node) + }); + // Delete all attached intermediate events from the array + elements = elements.findAll(function(value) { + var d = value.getIncomingShapes() + return d.length == 0 || !elements.include(d[0]) + }); + if(elements.length < 2) { return; } + + // get bounds of all shapes. + var bounds = elements[0].absoluteBounds().clone(); + elements.each(function(shape) { + bounds.include(shape.absoluteBounds().clone()); + }); + + // get biggest width and heigth + var maxWidth = 0; + var maxHeight = 0; + elements.each(function(shape){ + maxWidth = Math.max(shape.bounds.width(), maxWidth); + maxHeight = Math.max(shape.bounds.height(), maxHeight); + }); + + var commandClass = ORYX.Core.Command.extend({ + construct: function(elements, bounds, maxHeight, maxWidth, way, plugin){ + this.elements = elements; + this.bounds = bounds; + this.maxHeight = maxHeight; + this.maxWidth = maxWidth; + this.way = way; + this.facade = plugin.facade; + this.plugin = plugin; + this.orgPos = []; + }, + setBounds: function(shape, maxSize) { + if(!maxSize) + maxSize = {width: ORYX.CONFIG.MAXIMUM_SIZE, height: ORYX.CONFIG.MAXIMUM_SIZE}; + + if(!shape.bounds) { throw "Bounds not definined." } + + var newBounds = { + a: {x: shape.bounds.upperLeft().x - (this.maxWidth - shape.bounds.width())/2, + y: shape.bounds.upperLeft().y - (this.maxHeight - shape.bounds.height())/2}, + b: {x: shape.bounds.lowerRight().x + (this.maxWidth - shape.bounds.width())/2, + y: shape.bounds.lowerRight().y + (this.maxHeight - shape.bounds.height())/2} + } + + /* If the new width of shape exceeds the maximum width, set width value to maximum. */ + if(this.maxWidth > maxSize.width) { + newBounds.a.x = shape.bounds.upperLeft().x - + (maxSize.width - shape.bounds.width())/2; + + newBounds.b.x = shape.bounds.lowerRight().x + (maxSize.width - shape.bounds.width())/2 + } + + /* If the new height of shape exceeds the maximum height, set height value to maximum. */ + if(this.maxHeight > maxSize.height) { + newBounds.a.y = shape.bounds.upperLeft().y - + (maxSize.height - shape.bounds.height())/2; + + newBounds.b.y = shape.bounds.lowerRight().y + (maxSize.height - shape.bounds.height())/2 + } + + /* set bounds of shape */ + shape.bounds.set(newBounds); + + }, + execute: function(){ + // align each shape according to the way that was specified. + this.elements.each(function(shape, index) { + this.orgPos[index] = shape.bounds.upperLeft(); + + var relBounds = this.bounds.clone(); + var newCoordinates; + if (shape.parent && !(shape.parent instanceof ORYX.Core.Canvas) ) { + var upL = shape.parent.absoluteBounds().upperLeft(); + relBounds.moveBy(-upL.x, -upL.y); + } + + switch (this.way) { + // align the shapes in the requested way. + case ORYX.CONFIG.EDITOR_ALIGN_BOTTOM: + newCoordinates = { + x: shape.bounds.upperLeft().x, + y: relBounds.b.y - shape.bounds.height() + }; break; + + case ORYX.CONFIG.EDITOR_ALIGN_MIDDLE: + newCoordinates = { + x: shape.bounds.upperLeft().x, + y: (relBounds.a.y + relBounds.b.y - shape.bounds.height()) / 2 + }; break; + + case ORYX.CONFIG.EDITOR_ALIGN_TOP: + newCoordinates = { + x: shape.bounds.upperLeft().x, + y: relBounds.a.y + }; break; + + case ORYX.CONFIG.EDITOR_ALIGN_LEFT: + newCoordinates = { + x: relBounds.a.x, + y: shape.bounds.upperLeft().y + }; break; + + case ORYX.CONFIG.EDITOR_ALIGN_CENTER: + newCoordinates = { + x: (relBounds.a.x + relBounds.b.x - shape.bounds.width()) / 2, + y: shape.bounds.upperLeft().y + }; break; + + case ORYX.CONFIG.EDITOR_ALIGN_RIGHT: + newCoordinates = { + x: relBounds.b.x - shape.bounds.width(), + y: shape.bounds.upperLeft().y + }; break; + + case ORYX.CONFIG.EDITOR_ALIGN_SIZE: + if(shape.isResizable) { + this.orgPos[index] = {a: shape.bounds.upperLeft(), b: shape.bounds.lowerRight()}; + this.setBounds(shape, shape.maximumSize); + } + break; + } + + if (newCoordinates){ + var offset = { + x: shape.bounds.upperLeft().x - newCoordinates.x, + y: shape.bounds.upperLeft().y - newCoordinates.y + } + // Set the new position + shape.bounds.moveTo(newCoordinates); + this.plugin.layoutEdges(shape, shape.getAllDockedShapes(),offset); + //shape.update() + } + }.bind(this)); + + //this.facade.getCanvas().update(); + //this.facade.updateSelection(); + }, + rollback: function(){ + this.elements.each(function(shape, index) { + if (this.way == ORYX.CONFIG.EDITOR_ALIGN_SIZE) { + if(shape.isResizable) {shape.bounds.set(this.orgPos[index]);} + } else {shape.bounds.moveTo(this.orgPos[index]);} + }.bind(this)); + + //this.facade.getCanvas().update(); + //this.facade.updateSelection(); + } + }) + + var command = new commandClass(elements, bounds, maxHeight, maxWidth, parseInt(way), this); + + this.facade.executeCommands([command]); + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.Save = Clazz.extend({ + + facade: undefined, + + processURI: undefined, + + changeSymbol : "*", + + construct: function(facade){ + this.facade = facade; + + document.addEventListener("keydown", function(e){ + if (e.ctrlKey&&e.keyCode === 83){ + Event.stop(e); + } + }, false); + + window.onbeforeunload = this.onUnLoad.bind(this); + + this.changeDifference = 0; + + // Register on event for executing commands --> store all commands in a stack + // --> Execute + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_UNDO_EXECUTE, function(){ this.changeDifference++; this.updateTitle(); }.bind(this) ); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_EXECUTE_COMMANDS, function(){ this.changeDifference++; this.updateTitle(); }.bind(this) ); + // --> Saved from other places in the editor + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_SAVED, function(){ this.changeDifference = 0; this.updateTitle(); }.bind(this) ); + + // --> Rollback + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_UNDO_ROLLBACK, function(){ this.changeDifference--; this.updateTitle(); }.bind(this) ); + + //TODO very critical for load time performance!!! + //this.serializedDOM = DataManager.__persistDOM(this.facade); + + this.hasChanges = this._hasChanges.bind(this); + }, + + updateTitle: function(){ + + var value = window.document.title || document.getElementsByTagName("title")[0].childNodes[0].nodeValue; + + if (this.changeDifference === 0 && value.startsWith(this.changeSymbol)){ + window.document.title = value.slice(1); + } else if (this.changeDifference !== 0 && !value.startsWith(this.changeSymbol)){ + window.document.title = this.changeSymbol + "" + value; + } + }, + + _hasChanges: function() { + return this.changeDifference !== 0 || (this.facade.getModelMetaData()['new'] && this.facade.getCanvas().getChildShapes().size() > 0); + }, + + onUnLoad: function(){ + if(this._hasChanges()) { + return ORYX.I18N.Save.unsavedData; + } + } +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.DragDropResize = ORYX.Plugins.AbstractPlugin.extend({ + + /** + * Constructor + * @param {Object} Facade: The Facade of the Editor + */ + construct: function(facade) { + this.facade = facade; + + // Initialize variables + this.currentShapes = []; // Current selected Shapes + //this.pluginsData = []; // Available Plugins + this.toMoveShapes = []; // Shapes there will be moved + this.distPoints = []; // Distance Points for Snap on Grid + this.isResizing = false; // Flag: If there was currently resized + this.dragEnable = false; // Flag: If Dragging is enabled + this.dragIntialized = false; // Flag: If the Dragging is initialized + this.edgesMovable = true; // Flag: If an edge is docked it is not movable + this.offSetPosition = {x: 0, y: 0}; // Offset of the Dragging + this.faktorXY = {x: 1, y: 1}; // The Current Zoom-Faktor + this.containmentParentNode; // the current future parent node for the dragged shapes + this.isAddingAllowed = false; // flag, if adding current selected shapes to containmentParentNode is allowed + this.isAttachingAllowed = false; // flag, if attaching to the current shape is allowed + + this.callbackMouseMove = this.handleMouseMove.bind(this); + this.callbackMouseUp = this.handleMouseUp.bind(this); + + // Get the SVG-Containernode + var containerNode = this.facade.getCanvas().getSvgContainer(); + + // Create the Selected Rectangle in the SVG + this.selectedRect = new ORYX.Plugins.SelectedRect(containerNode); + + // Show grid line if enabled + if (ORYX.CONFIG.SHOW_GRIDLINE) { + this.vLine = new ORYX.Plugins.GridLine(containerNode, ORYX.Plugins.GridLine.DIR_VERTICAL); + this.hLine = new ORYX.Plugins.GridLine(containerNode, ORYX.Plugins.GridLine.DIR_HORIZONTAL); + } + + // Get a HTML-ContainerNode + containerNode = this.facade.getCanvas().getHTMLContainer(); + + this.scrollNode = this.facade.getCanvas().rootNode.parentNode.parentNode; + + // Create the southeastern button for resizing + this.resizerSE = new ORYX.Plugins.Resizer(containerNode, "southeast", this.facade); + this.resizerSE.registerOnResize(this.onResize.bind(this)); // register the resize callback + this.resizerSE.registerOnResizeEnd(this.onResizeEnd.bind(this)); // register the resize end callback + this.resizerSE.registerOnResizeStart(this.onResizeStart.bind(this)); // register the resize start callback + + // Create the northwestern button for resizing + this.resizerNW = new ORYX.Plugins.Resizer(containerNode, "northwest", this.facade); + this.resizerNW.registerOnResize(this.onResize.bind(this)); // register the resize callback + this.resizerNW.registerOnResizeEnd(this.onResizeEnd.bind(this)); // register the resize end callback + this.resizerNW.registerOnResizeStart(this.onResizeStart.bind(this)); // register the resize start callback + + // For the Drag and Drop + // Register on MouseDown-Event on a Shape + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)); + }, + + /** + * On Mouse Down + * + */ + handleMouseDown: function(event, uiObj) { + // If the selection Bounds not intialized and the uiObj is not member of current selectio + // then return + if(!this.dragBounds || !this.currentShapes.member(uiObj) || !this.toMoveShapes.length) {return;}; + + // Start Dragging + this.dragEnable = true; + this.dragIntialized = true; + this.edgesMovable = true; + + // Calculate the current zoom factor + var a = this.facade.getCanvas().node.getScreenCTM(); + this.faktorXY.x = a.a; + this.faktorXY.y = a.d; + + var eventX = Event.pointerX(event); + var eventY = Event.pointerY(event); + + // Set the offset position of dragging + var upL = this.dragBounds.upperLeft(); + this.offSetPosition = { + x: eventX - (upL.x * this.faktorXY.x), + y: eventY - (upL.y * this.faktorXY.y)}; + + this.offsetScroll = {x:this.scrollNode.scrollLeft,y:this.scrollNode.scrollTop}; + + // Register on Global Mouse-MOVE Event + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.callbackMouseMove, false); + // Register on Global Mouse-UP Event + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.callbackMouseUp, true); + + return; + }, + + /** + * On Key Mouse Up + * + */ + handleMouseUp: function(event) { + + //disable containment highlighting + this.facade.raiseEvent({ + type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId:"dragdropresize.contain" + }); + + this.facade.raiseEvent({ + type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId:"dragdropresize.attached" + }); + + // If Dragging is finished + if(this.dragEnable) { + + // and update the current selection + if(!this.dragIntialized) { + + // Do Method after Dragging + this.afterDrag(); + + // Check if the Shape is allowed to dock to the other Shape + if ( this.isAttachingAllowed && + this.toMoveShapes.length == 1 && this.toMoveShapes[0] instanceof ORYX.Core.Node && + this.toMoveShapes[0].dockers.length > 0) { + + // Get the position and the docker + var position = this.facade.eventCoordinates( event ); + var docker = this.toMoveShapes[0].dockers[0]; + + + + //Command-Pattern for dragging several Shapes + var dockCommand = ORYX.Core.Command.extend({ + construct: function(docker, position, newDockedShape, facade){ + this.docker = docker; + this.newPosition = position; + this.newDockedShape = newDockedShape; + this.newParent = newDockedShape.parent || facade.getCanvas(); + this.oldPosition = docker.parent.bounds.center(); + this.oldDockedShape = docker.getDockedShape(); + this.oldParent = docker.parent.parent || facade.getCanvas(); + this.facade = facade; + + if( this.oldDockedShape ){ + this.oldPosition = docker.parent.absoluteBounds().center(); + } + + }, + execute: function(){ + this.dock( this.newDockedShape, this.newParent, this.newPosition ); + + // Raise Event for having the docked shape on top of the other shape + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_ARRANGEMENT_TOP, excludeCommand: true}) + }, + rollback: function(){ + this.dock( this.oldDockedShape, this.oldParent, this.oldPosition ); + }, + dock:function( toDockShape, parent, pos ){ + // Add to the same parent Shape + parent.add( this.docker.parent ) + + + // Set the Docker to the new Shape + this.docker.setDockedShape( undefined ); + this.docker.bounds.centerMoveTo( pos ) + this.docker.setDockedShape( toDockShape ); + //this.docker.update(); + + this.facade.setSelection( [this.docker.parent] ); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + + + } + }); + + // Instanziate the dockCommand + var commands = [new dockCommand(docker, position, this.containmentParentNode, this.facade)]; + this.facade.executeCommands(commands); + + + // Check if adding is allowed to the other Shape + } else if( this.isAddingAllowed ) { + + + // Refresh all Shapes --> Set the new Bounds + this.refreshSelectedShapes(); + + } + + this.facade.updateSelection(); + + //this.currentShapes.each(function(shape) {shape.update()}) + // Raise Event: Dragging is finished + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_DRAGDROP_END}); + } + + if (this.vLine) + this.vLine.hide(); + if (this.hLine) + this.hLine.hide(); + } + + // Disable + this.dragEnable = false; + + + // UnRegister on Global Mouse-UP/-Move Event + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.callbackMouseUp, true); + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.callbackMouseMove, false); + + return; + }, + + /** + * On Key Mouse Move + * + */ + handleMouseMove: function(event) { + // If dragging is not enabled, go return + if(!this.dragEnable) { return }; + // If Dragging is initialized + if(this.dragIntialized) { + // Raise Event: Drag will be started + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_DRAGDROP_START}); + this.dragIntialized = false; + + // And hide the resizers and the highlighting + this.resizerSE.hide(); + this.resizerNW.hide(); + + // if only edges are selected, containmentParentNode must be the canvas + this._onlyEdges = this.currentShapes.all(function(currentShape) { + return (currentShape instanceof ORYX.Core.Edge); + }); + + // Do method before Drag + this.beforeDrag(); + + this._currentUnderlyingNodes = []; + + } + + + // Calculate the new position + var position = { + x: Event.pointerX(event) - this.offSetPosition.x, + y: Event.pointerY(event) - this.offSetPosition.y} + + position.x -= this.offsetScroll.x - this.scrollNode.scrollLeft; + position.y -= this.offsetScroll.y - this.scrollNode.scrollTop; + + // If not the Control-Key are pressed + var modifierKeyPressed = event.shiftKey || event.ctrlKey; + if(ORYX.CONFIG.GRID_ENABLED && !modifierKeyPressed) { + // Snap the current position to the nearest Snap-Point + position = this.snapToGrid(position); + } else { + if (this.vLine) + this.vLine.hide(); + if (this.hLine) + this.hLine.hide(); + } + + // Adjust the point by the zoom faktor + position.x /= this.faktorXY.x; + position.y /= this.faktorXY.y; + + // Set that the position is not lower than zero + position.x = Math.max( 0 , position.x) + position.y = Math.max( 0 , position.y) + + // Set that the position is not bigger than the canvas + var c = this.facade.getCanvas(); + position.x = Math.min( c.bounds.width() - this.dragBounds.width(), position.x) + position.y = Math.min( c.bounds.height() - this.dragBounds.height(), position.y) + + + // Drag this bounds + this.dragBounds.moveTo(position); + + // Update all selected shapes and the selection rectangle + //this.refreshSelectedShapes(); + this.resizeRectangle(this.dragBounds); + + this.isAttachingAllowed = false; + + //check, if a node can be added to the underlying node + var eventCoordinates = this.facade.eventCoordinates(event); + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + eventCoordinates.x = eventCoordinates.x / additionalIEZoom; + eventCoordinates.y = eventCoordinates.y / additionalIEZoom; + } + + var underlyingNodes = $A(this.facade.getCanvas().getAbstractShapesAtPosition(eventCoordinates)); + + var checkIfAttachable = this.toMoveShapes.length == 1 && this.toMoveShapes[0] instanceof ORYX.Core.Node && this.toMoveShapes[0].dockers.length > 0 + checkIfAttachable = checkIfAttachable && underlyingNodes.length != 1 + + + if (!checkIfAttachable && + underlyingNodes.length === this._currentUnderlyingNodes.length && + underlyingNodes.all(function(node, index){return this._currentUnderlyingNodes[index] === node}.bind(this))) { + + return + + } else if(this._onlyEdges) { + + this.isAddingAllowed = true; + this.containmentParentNode = this.facade.getCanvas(); + + } else { + + /* Check the containment and connection rules */ + var options = { + event : event, + underlyingNodes : underlyingNodes, + checkIfAttachable : checkIfAttachable + }; + this.checkRules(options); + + } + + this._currentUnderlyingNodes = underlyingNodes.reverse(); + + //visualize the containment result + if( this.isAttachingAllowed ) { + + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "dragdropresize.attached", + elements: [this.containmentParentNode], + style: ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE, + color: ORYX.CONFIG.SELECTION_VALID_COLOR + }); + + } else { + + this.facade.raiseEvent({ + type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId:"dragdropresize.attached" + }); + } + + if( !this.isAttachingAllowed ){ + if( this.isAddingAllowed ) { + + this.facade.raiseEvent({ + type:ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId:"dragdropresize.contain", + elements:[this.containmentParentNode], + color: ORYX.CONFIG.SELECTION_VALID_COLOR + }); + + } else { + + this.facade.raiseEvent({ + type:ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId:"dragdropresize.contain", + elements:[this.containmentParentNode], + color: ORYX.CONFIG.SELECTION_INVALID_COLOR + }); + + } + } else { + this.facade.raiseEvent({ + type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId:"dragdropresize.contain" + }); + } + + // Stop the Event + //Event.stop(event); + return; + }, + +// /** +// * Rollbacks the docked shape of an edge, if the edge is not movable. +// */ +// redockEdges: function() { +// this._undockedEdgesCommand.dockers.each(function(el){ +// el.docker.setDockedShape(el.dockedShape); +// el.docker.setReferencePoint(el.refPoint); +// }) +// }, + + /** + * Checks the containment and connection rules for the selected shapes. + */ + checkRules : function(options) { + var event = options.event; + var underlyingNodes = options.underlyingNodes; + var checkIfAttachable = options.checkIfAttachable; + var noEdges = options.noEdges; + + //get underlying node that is not the same than one of the currently selected shapes or + // a child of one of the selected shapes with the highest z Order. + // The result is a shape or the canvas + this.containmentParentNode = underlyingNodes.reverse().find((function(node) { + return (node instanceof ORYX.Core.Canvas) || + (((node instanceof ORYX.Core.Node) || ((node instanceof ORYX.Core.Edge) && !noEdges)) + && (!(this.currentShapes.member(node) || + this.currentShapes.any(function(shape) { + return (shape.children.length > 0 && shape.getChildNodes(true).member(node)); + })))); + }).bind(this)); + + if( checkIfAttachable ){ + + this.isAttachingAllowed = this.facade.getRules().canConnect({ + sourceShape: this.containmentParentNode, + edgeShape: this.toMoveShapes[0], + targetShape: this.toMoveShapes[0] + }); + + if ( this.isAttachingAllowed ) { + var point = this.facade.eventCoordinates(event); + this.isAttachingAllowed = this.containmentParentNode.isPointOverOffset( point.x, point.y ); + } + } + + if( !this.isAttachingAllowed ){ + //check all selected shapes, if they can be added to containmentParentNode + this.isAddingAllowed = this.toMoveShapes.all((function(currentShape) { + if(currentShape instanceof ORYX.Core.Edge || + currentShape instanceof ORYX.Core.Controls.Docker || + this.containmentParentNode === currentShape.parent) { + return true; + } else if(this.containmentParentNode !== currentShape) { + + if(!(this.containmentParentNode instanceof ORYX.Core.Edge) || !noEdges) { + + if(this.facade.getRules().canContain({containingShape:this.containmentParentNode, + containedShape:currentShape})) { + return true; + } + } + } + return false; + }).bind(this)); + } + + if(!this.isAttachingAllowed && !this.isAddingAllowed && + (this.containmentParentNode instanceof ORYX.Core.Edge)) { + options.noEdges = true; + options.underlyingNodes.reverse(); + this.checkRules(options); + } + }, + + /** + * Redraw the selected Shapes. + * + */ + refreshSelectedShapes: function() { + // If the selection bounds not initialized, return + if(!this.dragBounds) {return} + + // Calculate the offset between the bounds and the old bounds + var upL = this.dragBounds.upperLeft(); + var oldUpL = this.oldDragBounds.upperLeft(); + var offset = { + x: upL.x - oldUpL.x, + y: upL.y - oldUpL.y }; + + // Instanciate the dragCommand + var commands = [new ORYX.Core.Command.Move(this.toMoveShapes, offset, this.containmentParentNode, this.currentShapes, this)]; + // If the undocked edges command is setted, add this command + if( this._undockedEdgesCommand instanceof ORYX.Core.Command ){ + commands.unshift( this._undockedEdgesCommand ); + } + // Execute the commands + this.facade.executeCommands( commands ); + + // copy the bounds to the old bounds + if( this.dragBounds ) + this.oldDragBounds = this.dragBounds.clone(); + + }, + + /** + * Callback for Resize + * + */ + onResize: function(bounds) { + // If the selection bounds not initialized, return + if(!this.dragBounds) {return} + + this.dragBounds = bounds; + this.isResizing = true; + + // Update the rectangle + this.resizeRectangle(this.dragBounds); + }, + + onResizeStart: function() { + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_RESIZE_START}); + }, + + onResizeEnd: function() { + + if (!(this.currentShapes instanceof Array)||this.currentShapes.length<=0) { + return; + } + + // If Resizing finished, the Shapes will be resize + if(this.isResizing) { + + var commandClass = ORYX.Core.Command.extend({ + construct: function(shape, newBounds, plugin){ + this.shape = shape; + this.oldBounds = shape.bounds.clone(); + this.newBounds = newBounds; + this.plugin = plugin; + }, + execute: function(){ + this.shape.bounds.set(this.newBounds.a, this.newBounds.b); + this.update(this.getOffset(this.oldBounds, this.newBounds)); + + }, + rollback: function(){ + this.shape.bounds.set(this.oldBounds.a, this.oldBounds.b); + this.update(this.getOffset(this.newBounds, this.oldBounds)) + }, + + getOffset:function(b1, b2){ + return { + x: b2.a.x - b1.a.x, + y: b2.a.y - b1.a.y, + xs: b2.width()/b1.width(), + ys: b2.height()/b1.height() + } + }, + update:function(offset){ + this.shape.getLabels().each(function(label) { + label.changed(); + }); + + var allEdges = [].concat(this.shape.getIncomingShapes()) + .concat(this.shape.getOutgoingShapes()) + // Remove all edges which are included in the selection from the list + .findAll(function(r){ return r instanceof ORYX.Core.Edge }.bind(this)) + + this.plugin.layoutEdges(this.shape, allEdges, offset); + + this.plugin.facade.setSelection([this.shape]); + this.plugin.facade.getCanvas().update(); + this.plugin.facade.updateSelection(); + } + }); + + var bounds = this.dragBounds.clone(); + var shape = this.currentShapes[0]; + + if(shape.parent) { + var parentPosition = shape.parent.absoluteXY(); + bounds.moveBy(-parentPosition.x, -parentPosition.y); + } + + var command = new commandClass(shape, bounds, this); + + this.facade.executeCommands([command]); + + this.isResizing = false; + + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_RESIZE_END}); + } + }, + + + /** + * Prepare the Dragging + * + */ + beforeDrag: function(){ + + var undockEdgeCommand = ORYX.Core.Command.extend({ + construct: function(moveShapes){ + this.dockers = moveShapes.collect(function(shape){ return shape instanceof ORYX.Core.Controls.Docker ? {docker:shape, dockedShape:shape.getDockedShape(), refPoint:shape.referencePoint} : undefined }).compact(); + }, + execute: function(){ + this.dockers.each(function(el){ + el.docker.setDockedShape(undefined); + }) + }, + rollback: function(){ + this.dockers.each(function(el){ + el.docker.setDockedShape(el.dockedShape); + el.docker.setReferencePoint(el.refPoint); + //el.docker.update(); + }) + } + }); + + this._undockedEdgesCommand = new undockEdgeCommand( this.toMoveShapes ); + this._undockedEdgesCommand.execute(); + + }, + + hideAllLabels: function(shape) { + + // Hide all labels from the shape + shape.getLabels().each(function(label) { + label.hide(); + }); + // Hide all labels from docked shapes + shape.getAllDockedShapes().each(function(dockedShape) { + var labels = dockedShape.getLabels(); + if(labels.length > 0) { + labels.each(function(label) { + label.hide(); + }); + } + }); + + // Do this recursive for all child shapes + // EXP-NICO use getShapes + shape.getChildren().each((function(value) { + if(value instanceof ORYX.Core.Shape) + this.hideAllLabels(value); + }).bind(this)); + }, + + /** + * Finished the Dragging + * + */ + afterDrag: function(){ + + }, + + /** + * Show all Labels at these shape + * + */ + showAllLabels: function(shape) { + + // Show the label of these shape + //shape.getLabels().each(function(label) { + for(var i=0; i<shape.length ;i++){ + var label = shape[i]; + label.show(); + }//); + // Show all labels at docked shapes + //shape.getAllDockedShapes().each(function(dockedShape) { + var allDockedShapes = shape.getAllDockedShapes() + for(var i=0; i<allDockedShapes.length ;i++){ + var dockedShape = allDockedShapes[i]; + var labels = dockedShape.getLabels(); + if(labels.length > 0) { + labels.each(function(label) { + label.show(); + }); + } + }//); + + // Do this recursive + //shape.children.each((function(value) { + for(var i=0; i<shape.children.length ;i++){ + var value = shape.children[i]; + if(value instanceof ORYX.Core.Shape) + this.showAllLabels(value); + }//).bind(this)); + }, + + /** + * Intialize Method, if there are new Plugins + * + */ + /*registryChanged: function(pluginsData) { + // Save all new Plugin, sorted by group and index + this.pluginsData = pluginsData.sortBy( function(value) { + return (value.group + "" + value.index); + }); + },*/ + + /** + * On the Selection-Changed + * + */ + onSelectionChanged: function(event) { + var elements = event.elements; + + // Reset the drag-variables + this.dragEnable = false; + this.dragIntialized = false; + this.resizerSE.hide(); + this.resizerNW.hide(); + + // If there is no elements + if(!elements || elements.length == 0) { + // Hide all things and reset all variables + this.selectedRect.hide(); + this.currentShapes = []; + this.toMoveShapes = []; + this.dragBounds = undefined; + this.oldDragBounds = undefined; + } else { + + // Set the current Shapes + this.currentShapes = elements; + + // Get all shapes with the highest parent in object hierarchy (canvas is the top most parent) + var topLevelElements = this.facade.getCanvas().getShapesWithSharedParent(elements); + this.toMoveShapes = topLevelElements; + + this.toMoveShapes = this.toMoveShapes.findAll( function(shape) { return shape instanceof ORYX.Core.Node && + (shape.dockers.length === 0 || !elements.member(shape.dockers.first().getDockedShape()))}); + + elements.each((function(shape){ + if(!(shape instanceof ORYX.Core.Edge)) {return;} + + var dks = shape.getDockers(); + + var hasF = elements.member(dks.first().getDockedShape()); + var hasL = elements.member(dks.last().getDockedShape()); + +// if(!hasL) { +// this.toMoveShapes.push(dks.last()); +// } +// if(!hasF){ +// this.toMoveShapes.push(dks.first()) +// } + /* Enable movement of undocked edges */ + if(!hasF && !hasL) { + var isUndocked = !dks.first().getDockedShape() && !dks.last().getDockedShape(); + if(isUndocked) { + this.toMoveShapes = this.toMoveShapes.concat(dks); + } + } + + if( shape.dockers.length > 2 && hasF && hasL){ + this.toMoveShapes = this.toMoveShapes.concat(dks.findAll(function(el,index){ return index > 0 && index < dks.length-1})); + } + + }).bind(this)); + + // Calculate the new area-bounds of the selection + var newBounds = undefined; + this.toMoveShapes.each(function(value) { + var shape = value; + if(value instanceof ORYX.Core.Controls.Docker) { + /* Get the Shape */ + shape = value.parent; + } + + if(!newBounds){ + newBounds = shape.absoluteBounds(); + } + else { + newBounds.include(shape.absoluteBounds()); + } + }.bind(this)); + + if(!newBounds){ + elements.each(function(value){ + if(!newBounds) { + newBounds = value.absoluteBounds(); + } else { + newBounds.include(value.absoluteBounds()); + } + }); + } + + // Set the new bounds + this.dragBounds = newBounds; + this.oldDragBounds = newBounds.clone(); + + // Update and show the rectangle + this.resizeRectangle(newBounds); + this.selectedRect.show(); + + // Show the resize button, if there is only one element and this is resizeable + if(elements.length == 1 && elements[0].isResizable) { + var aspectRatio = elements[0].getStencil().fixedAspectRatio() ? elements[0].bounds.width() / elements[0].bounds.height() : undefined; + this.resizerSE.setBounds(this.dragBounds, elements[0].minimumSize, elements[0].maximumSize, aspectRatio); + this.resizerSE.show(); + this.resizerNW.setBounds(this.dragBounds, elements[0].minimumSize, elements[0].maximumSize, aspectRatio); + this.resizerNW.show(); + } else { + this.resizerSE.setBounds(undefined); + this.resizerNW.setBounds(undefined); + } + + // If Snap-To-Grid is enabled, the Snap-Point will be calculate + if(ORYX.CONFIG.GRID_ENABLED) { + + // Reset all points + this.distPoints = []; + + if (this.distPointTimeout) + window.clearTimeout(this.distPointTimeout) + + this.distPointTimeout = window.setTimeout(function(){ + // Get all the shapes, there will consider at snapping + // Consider only those elements who shares the same parent element + var distShapes = this.facade.getCanvas().getChildShapes(true).findAll(function(value){ + var parentShape = value.parent; + while(parentShape){ + if(elements.member(parentShape)) return false; + parentShape = parentShape.parent + } + return true; + }) + + // The current selection will delete from this array + //elements.each(function(shape) { + // distShapes = distShapes.without(shape); + //}); + + // For all these shapes + distShapes.each((function(value) { + if(!(value instanceof ORYX.Core.Edge)) { + var ul = value.absoluteXY(); + var width = value.bounds.width(); + var height = value.bounds.height(); + + // Add the upperLeft, center and lowerRight - Point to the distancePoints + this.distPoints.push({ + ul: { + x: ul.x, + y: ul.y + }, + c: { + x: ul.x + (width / 2), + y: ul.y + (height / 2) + }, + lr: { + x: ul.x + width, + y: ul.y + height + } + }); + } + }).bind(this)); + + }.bind(this), 10) + + + } + } + }, + + /** + * Adjust an Point to the Snap Points + * + */ + snapToGrid: function(position) { + + // Get the current Bounds + var bounds = this.dragBounds; + + var point = {}; + + var ulThres = 6; + var cThres = 10; + var lrThres = 6; + + var scale = this.vLine ? this.vLine.getScale() : 1; + + var ul = { x: (position.x/scale), y: (position.y/scale)}; + var c = { x: (position.x/scale) + (bounds.width()/2), y: (position.y/scale) + (bounds.height()/2)}; + var lr = { x: (position.x/scale) + (bounds.width()), y: (position.y/scale) + (bounds.height())}; + + var offsetX, offsetY; + var gridX, gridY; + + // For each distant point + this.distPoints.each(function(value) { + + var x, y, gx, gy; + if (Math.abs(value.c.x-c.x) < cThres){ + x = value.c.x-c.x; + gx = value.c.x; + }/* else if (Math.abs(value.ul.x-ul.x) < ulThres){ + x = value.ul.x-ul.x; + gx = value.ul.x; + } else if (Math.abs(value.lr.x-lr.x) < lrThres){ + x = value.lr.x-lr.x; + gx = value.lr.x; + } */ + + + if (Math.abs(value.c.y-c.y) < cThres){ + y = value.c.y-c.y; + gy = value.c.y; + }/* else if (Math.abs(value.ul.y-ul.y) < ulThres){ + y = value.ul.y-ul.y; + gy = value.ul.y; + } else if (Math.abs(value.lr.y-lr.y) < lrThres){ + y = value.lr.y-lr.y; + gy = value.lr.y; + } */ + + if (x !== undefined) { + offsetX = offsetX === undefined ? x : (Math.abs(x) < Math.abs(offsetX) ? x : offsetX); + if (offsetX === x) + gridX = gx; + } + + if (y !== undefined) { + offsetY = offsetY === undefined ? y : (Math.abs(y) < Math.abs(offsetY) ? y : offsetY); + if (offsetY === y) + gridY = gy; + } + }); + + + if (offsetX !== undefined) { + ul.x += offsetX; + ul.x *= scale; + if (this.vLine&&gridX) + this.vLine.update(gridX); + } else { + ul.x = (position.x - (position.x % (ORYX.CONFIG.GRID_DISTANCE/2))); + if (this.vLine) + this.vLine.hide() + } + + if (offsetY !== undefined) { + ul.y += offsetY; + ul.y *= scale; + if (this.hLine&&gridY) + this.hLine.update(gridY); + } else { + ul.y = (position.y - (position.y % (ORYX.CONFIG.GRID_DISTANCE/2))); + if (this.hLine) + this.hLine.hide(); + } + + return ul; + }, + + showGridLine: function(){ + + }, + + + /** + * Redraw of the Rectangle of the SelectedArea + * @param {Object} bounds + */ + resizeRectangle: function(bounds) { + // Resize the Rectangle + this.selectedRect.resize(bounds); + } + +}); + + +ORYX.Plugins.SelectedRect = Clazz.extend({ + + construct: function(parentId) { + + this.parentId = parentId; + + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", $(parentId), + ['g']); + + this.dashedArea = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, + ['rect', {x: 0, y: 0, + 'stroke-width': 1, stroke: '#777777', fill: 'none', + 'stroke-dasharray': '2,2', + 'pointer-events': 'none'}]); + + this.hide(); + + }, + + hide: function() { + this.node.setAttributeNS(null, 'display', 'none'); + }, + + show: function() { + this.node.setAttributeNS(null, 'display', ''); + }, + + resize: function(bounds) { + var upL = bounds.upperLeft(); + + var padding = ORYX.CONFIG.SELECTED_AREA_PADDING; + + this.dashedArea.setAttributeNS(null, 'width', bounds.width() + 2*padding); + this.dashedArea.setAttributeNS(null, 'height', bounds.height() + 2*padding); + this.node.setAttributeNS(null, 'transform', "translate("+ (upL.x - padding) +", "+ (upL.y - padding) +")"); + } + + +}); + + + +ORYX.Plugins.GridLine = Clazz.extend({ + + construct: function(parentId, direction) { + + if (ORYX.Plugins.GridLine.DIR_HORIZONTAL !== direction && ORYX.Plugins.GridLine.DIR_VERTICAL !== direction) { + direction = ORYX.Plugins.GridLine.DIR_HORIZONTAL + } + + + this.parent = $(parentId); + this.direction = direction; + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.parent, + ['g']); + + this.line = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, + ['path', { + 'stroke-width': 1, stroke: 'silver', fill: 'none', + 'stroke-dasharray': '5,5', + 'pointer-events': 'none'}]); + + this.hide(); + + }, + + hide: function() { + this.node.setAttributeNS(null, 'display', 'none'); + }, + + show: function() { + this.node.setAttributeNS(null, 'display', ''); + }, + + getScale: function(){ + try { + return this.parent.parentNode.transform.baseVal.getItem(0).matrix.a; + } catch(e) { + return 1; + } + }, + + update: function(pos) { + + if (this.direction === ORYX.Plugins.GridLine.DIR_HORIZONTAL) { + var y = pos instanceof Object ? pos.y : pos; + var cWidth = this.parent.parentNode.parentNode.width.baseVal.value/this.getScale(); + this.line.setAttributeNS(null, 'd', 'M 0 '+y+ ' L '+cWidth+' '+y); + } else { + var x = pos instanceof Object ? pos.x : pos; + var cHeight = this.parent.parentNode.parentNode.height.baseVal.value/this.getScale(); + this.line.setAttributeNS(null, 'd', 'M'+x+ ' 0 L '+x+' '+cHeight); + } + + this.show(); + } + + +}); + +ORYX.Plugins.GridLine.DIR_HORIZONTAL = "hor"; +ORYX.Plugins.GridLine.DIR_VERTICAL = "ver"; + +ORYX.Plugins.Resizer = Clazz.extend({ + + construct: function(parentId, orientation, facade) { + + this.parentId = parentId; + this.orientation = orientation; + this.facade = facade; + + this.node = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", $('canvasSection'), + ['div', {'class': 'resizer_'+ this.orientation, style:'left:0px; top:0px;position:absolute;'}]); + + this.node.addEventListener(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this), true); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.handleMouseUp.bind(this), true); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.handleMouseMove.bind(this), false); + + this.dragEnable = false; + this.offSetPosition = {x: 0, y: 0}; + this.bounds = undefined; + + this.canvasNode = this.facade.getCanvas().node; + + this.minSize = undefined; + this.maxSize = undefined; + + this.aspectRatio = undefined; + + this.resizeCallbacks = []; + this.resizeStartCallbacks = []; + this.resizeEndCallbacks = []; + this.hide(); + + // Calculate the Offset + this.scrollNode = this.node.parentNode.parentNode.parentNode; + + }, + + handleMouseDown: function(event) { + this.dragEnable = true; + + this.offsetScroll = {x:this.scrollNode.scrollLeft,y:this.scrollNode.scrollTop}; + + this.offSetPosition = { + x: Event.pointerX(event) - this.position.x, + y: Event.pointerY(event) - this.position.y}; + + this.resizeStartCallbacks.each((function(value) { + value(this.bounds); + }).bind(this)); + + }, + + handleMouseUp: function(event) { + this.dragEnable = false; + this.containmentParentNode = null; + this.resizeEndCallbacks.each((function(value) { + value(this.bounds); + }).bind(this)); + + }, + + handleMouseMove: function(event) { + if(!this.dragEnable) { return } + + if(event.shiftKey || event.ctrlKey) { + this.aspectRatio = this.bounds.width() / this.bounds.height(); + } else { + this.aspectRatio = undefined; + } + + var position = { + x: Event.pointerX(event) - this.offSetPosition.x, + y: Event.pointerY(event) - this.offSetPosition.y}; + + + position.x -= this.offsetScroll.x - this.scrollNode.scrollLeft; + position.y -= this.offsetScroll.y - this.scrollNode.scrollTop; + + position.x = Math.min( position.x, this.facade.getCanvas().bounds.width()); + position.y = Math.min( position.y, this.facade.getCanvas().bounds.height()); + + var offset = { + x: position.x - this.position.x, + y: position.y - this.position.y + }; + + if(this.aspectRatio) { + // fixed aspect ratio + newAspectRatio = (this.bounds.width()+offset.x) / (this.bounds.height()+offset.y); + if(newAspectRatio>this.aspectRatio) { + offset.x = this.aspectRatio * (this.bounds.height()+offset.y) - this.bounds.width(); + } else if(newAspectRatio<this.aspectRatio) { + offset.y = (this.bounds.width()+offset.x) / this.aspectRatio - this.bounds.height(); + } + } + + // respect minimum and maximum sizes of stencil + if(this.orientation==="northwest") { + + if(this.bounds.width()-offset.x > this.maxSize.width) { + offset.x = -(this.maxSize.width - this.bounds.width()); + if(this.aspectRatio) + offset.y = this.aspectRatio * offset.x; + } + if(this.bounds.width()-offset.x < this.minSize.width) { + offset.x = -(this.minSize.width - this.bounds.width()); + if(this.aspectRatio) + offset.y = this.aspectRatio * offset.x; + } + if(this.bounds.height()-offset.y > this.maxSize.height) { + offset.y = -(this.maxSize.height - this.bounds.height()); + if(this.aspectRatio) + offset.x = offset.y / this.aspectRatio; + } + if(this.bounds.height()-offset.y < this.minSize.height) { + offset.y = -(this.minSize.height - this.bounds.height()); + if(this.aspectRatio) + offset.x = offset.y / this.aspectRatio; + } + + } else { // defaults to southeast + if(this.bounds.width()+offset.x > this.maxSize.width) { + offset.x = this.maxSize.width - this.bounds.width(); + if(this.aspectRatio) + offset.y = this.aspectRatio * offset.x; + } + if(this.bounds.width()+offset.x < this.minSize.width) { + offset.x = this.minSize.width - this.bounds.width(); + if(this.aspectRatio) + offset.y = this.aspectRatio * offset.x; + } + if(this.bounds.height()+offset.y > this.maxSize.height) { + offset.y = this.maxSize.height - this.bounds.height(); + if(this.aspectRatio) + offset.x = offset.y / this.aspectRatio; + } + if(this.bounds.height()+offset.y < this.minSize.height) { + offset.y = this.minSize.height - this.bounds.height(); + if(this.aspectRatio) + offset.x = offset.y / this.aspectRatio; + } + } + + if(this.orientation==="northwest") { + this.bounds.extend({x:-offset.x, y:-offset.y}); + this.bounds.moveBy(offset); + } else { // defaults to southeast + this.bounds.extend(offset); + } + + this.update(); + + this.resizeCallbacks.each((function(value) { + value(this.bounds); + }).bind(this)); + + Event.stop(event); + + }, + + registerOnResizeStart: function(callback) { + if(!this.resizeStartCallbacks.member(callback)) { + this.resizeStartCallbacks.push(callback); + } + }, + + unregisterOnResizeStart: function(callback) { + if(this.resizeStartCallbacks.member(callback)) { + this.resizeStartCallbacks = this.resizeStartCallbacks.without(callback); + } + }, + + registerOnResizeEnd: function(callback) { + if(!this.resizeEndCallbacks.member(callback)) { + this.resizeEndCallbacks.push(callback); + } + }, + + unregisterOnResizeEnd: function(callback) { + if(this.resizeEndCallbacks.member(callback)) { + this.resizeEndCallbacks = this.resizeEndCallbacks.without(callback); + } + }, + + registerOnResize: function(callback) { + if(!this.resizeCallbacks.member(callback)) { + this.resizeCallbacks.push(callback); + } + }, + + unregisterOnResize: function(callback) { + if(this.resizeCallbacks.member(callback)) { + this.resizeCallbacks = this.resizeCallbacks.without(callback); + } + }, + + hide: function() { + this.node.style.display = "none"; + }, + + show: function() { + if(this.bounds) + this.node.style.display = ""; + }, + + setBounds: function(bounds, min, max, aspectRatio) { + this.bounds = bounds; + + if(!min) + min = {width: ORYX.CONFIG.MINIMUM_SIZE, height: ORYX.CONFIG.MINIMUM_SIZE}; + + if(!max) + max = {width: ORYX.CONFIG.MAXIMUM_SIZE, height: ORYX.CONFIG.MAXIMUM_SIZE}; + + this.minSize = min; + this.maxSize = max; + + this.aspectRatio = aspectRatio; + + this.update(); + }, + + update: function() { + if(!this.bounds) { return; } + + var upL = this.bounds.upperLeft(); + + if(this.bounds.width() < this.minSize.width) { this.bounds.set(upL.x, upL.y, upL.x + this.minSize.width, upL.y + this.bounds.height());}; + if(this.bounds.height() < this.minSize.height) { this.bounds.set(upL.x, upL.y, upL.x + this.bounds.width(), upL.y + this.minSize.height);}; + if(this.bounds.width() > this.maxSize.width) { this.bounds.set(upL.x, upL.y, upL.x + this.maxSize.width, upL.y + this.bounds.height());}; + if(this.bounds.height() > this.maxSize.height) { this.bounds.set(upL.x, upL.y, upL.x + this.bounds.width(), upL.y + this.maxSize.height);}; + + var a = this.canvasNode.getScreenCTM(); + + upL.x *= a.a; + upL.y *= a.d; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom === 1) { + upL.y = upL.y - jQuery("#canvasSection").offset().top + a.f; + upL.x = upL.x - jQuery("#canvasSection").offset().left + a.e; + + } else { + var canvasOffsetLeft = jQuery("#canvasSection").offset().left; + var canvasScrollLeft = jQuery("#canvasSection").scrollLeft(); + var canvasScrollTop = jQuery("#canvasSection").scrollTop(); + + var offset = a.e - (canvasOffsetLeft * additionalIEZoom); + var additionaloffset = 0; + if (offset > 10) { + additionaloffset = (offset / additionalIEZoom) - offset; + } + upL.y = upL.y - (jQuery("#canvasSection").offset().top * additionalIEZoom) + ((canvasScrollTop * additionalIEZoom) - canvasScrollTop) + a.f; + upL.x = upL.x - (canvasOffsetLeft * additionalIEZoom) + additionaloffset + ((canvasScrollLeft * additionalIEZoom) - canvasScrollLeft) + a.e; + } + + if(this.orientation==="northwest") { + upL.x -= 13; + upL.y -= 13; + } else { // defaults to southeast + upL.x += (a.a * this.bounds.width()) + 3 ; + upL.y += (a.d * this.bounds.height()) + 3; + } + + this.position = upL; + + this.node.style.left = this.position.x + "px"; + this.node.style.top = this.position.y + "px"; + } +}); + + + +/** + * Implements a Command to move shapes + * + */ +ORYX.Core.Command.Move = ORYX.Core.Command.extend({ + construct: function(moveShapes, offset, parent, selectedShapes, plugin){ + this.moveShapes = moveShapes; + this.selectedShapes = selectedShapes; + this.offset = offset; + this.plugin = plugin; + // Defines the old/new parents for the particular shape + this.newParents = moveShapes.collect(function(t){ return parent || t.parent }); + this.oldParents = moveShapes.collect(function(shape){ return shape.parent }); + this.dockedNodes= moveShapes.findAll(function(shape){ return shape instanceof ORYX.Core.Node && shape.dockers.length == 1}).collect(function(shape){ return {docker:shape.dockers[0], dockedShape:shape.dockers[0].getDockedShape(), refPoint:shape.dockers[0].referencePoint} }); + }, + execute: function(){ + this.dockAllShapes() + // Moves by the offset + this.move( this.offset); + // Addes to the new parents + this.addShapeToParent( this.newParents ); + // Set the selection to the current selection + this.selectCurrentShapes(); + this.plugin.facade.getCanvas().update(); + this.plugin.facade.updateSelection(); + }, + rollback: function(){ + // Moves by the inverted offset + var offset = { x:-this.offset.x, y:-this.offset.y }; + this.move( offset ); + // Addes to the old parents + this.addShapeToParent( this.oldParents ); + this.dockAllShapes(true) + + // Set the selection to the current selection + this.selectCurrentShapes(); + this.plugin.facade.getCanvas().update(); + this.plugin.facade.updateSelection(); + + }, + move:function(offset, doLayout){ + + // Move all Shapes by these offset + for(var i=0; i<this.moveShapes.length ;i++){ + var value = this.moveShapes[i]; + value.bounds.moveBy(offset); + + if (value instanceof ORYX.Core.Node) { + + (value.dockers||[]).each(function(d){ + d.bounds.moveBy(offset); + }) + + // Update all Dockers of Child shapes + /*var childShapesNodes = value.getChildShapes(true).findAll(function(shape){ return shape instanceof ORYX.Core.Node }); + var childDockedShapes = childShapesNodes.collect(function(shape){ return shape.getAllDockedShapes() }).flatten().uniq(); + var childDockedEdge = childDockedShapes.findAll(function(shape){ return shape instanceof ORYX.Core.Edge }); + childDockedEdge = childDockedEdge.findAll(function(shape){ return shape.getAllDockedShapes().all(function(dsh){ return childShapesNodes.include(dsh) }) }); + var childDockedDockers = childDockedEdge.collect(function(shape){ return shape.dockers }).flatten(); + + for (var j = 0; j < childDockedDockers.length; j++) { + var docker = childDockedDockers[j]; + if (!docker.getDockedShape() && !this.moveShapes.include(docker)) { + //docker.bounds.moveBy(offset); + //docker.update(); + } + }*/ + + + var allEdges = [].concat(value.getIncomingShapes()) + .concat(value.getOutgoingShapes()) + // Remove all edges which are included in the selection from the list + .findAll(function(r){ return r instanceof ORYX.Core.Edge && !this.moveShapes.any(function(d){ return d == r || (d instanceof ORYX.Core.Controls.Docker && d.parent == r)}) }.bind(this)) + // Remove all edges which are between the node and a node contained in the selection from the list + .findAll(function(r){ return (r.dockers.first().getDockedShape() == value || !this.moveShapes.include(r.dockers.first().getDockedShape())) && + (r.dockers.last().getDockedShape() == value || !this.moveShapes.include(r.dockers.last().getDockedShape()))}.bind(this)) + + // Layout all outgoing/incoming edges + this.plugin.layoutEdges(value, allEdges, offset); + + + var allSameEdges = [].concat(value.getIncomingShapes()) + .concat(value.getOutgoingShapes()) + // Remove all edges which are included in the selection from the list + .findAll(function(r){ return r instanceof ORYX.Core.Edge && r.dockers.first().isDocked() && r.dockers.last().isDocked() && !this.moveShapes.include(r) && !this.moveShapes.any(function(d){ return d == r || (d instanceof ORYX.Core.Controls.Docker && d.parent == r)}) }.bind(this)) + // Remove all edges which are included in the selection from the list + .findAll(function(r){ return this.moveShapes.indexOf(r.dockers.first().getDockedShape()) > i || this.moveShapes.indexOf(r.dockers.last().getDockedShape()) > i}.bind(this)) + + for (var j = 0; j < allSameEdges.length; j++) { + for (var k = 1; k < allSameEdges[j].dockers.length-1; k++) { + var docker = allSameEdges[j].dockers[k]; + if (!docker.getDockedShape() && !this.moveShapes.include(docker)) { + docker.bounds.moveBy(offset); + } + } + } + + /*var i=-1; + var nodes = value.getChildShapes(true); + var allEdges = []; + while(++i<nodes.length){ + var edges = [].concat(nodes[i].getIncomingShapes()) + .concat(nodes[i].getOutgoingShapes()) + // Remove all edges which are included in the selection from the list + .findAll(function(r){ return r instanceof ORYX.Core.Edge && !allEdges.include(r) && r.dockers.any(function(d){ return !value.bounds.isIncluded(d.bounds.center)})}) + allEdges = allEdges.concat(edges); + if (edges.length <= 0){ continue } + //this.plugin.layoutEdges(nodes[i], edges, offset); + }*/ + } + } + + }, + dockAllShapes: function(shouldDocked){ + // Undock all Nodes + for (var i = 0; i < this.dockedNodes.length; i++) { + var docker = this.dockedNodes[i].docker; + + docker.setDockedShape( shouldDocked ? this.dockedNodes[i].dockedShape : undefined ) + if (docker.getDockedShape()) { + docker.setReferencePoint(this.dockedNodes[i].refPoint); + //docker.update(); + } + } + }, + + addShapeToParent:function( parents ){ + + // For every Shape, add this and reset the position + for(var i=0; i<this.moveShapes.length ;i++){ + var currentShape = this.moveShapes[i]; + if(currentShape instanceof ORYX.Core.Node && + currentShape.parent !== parents[i]) { + + // Calc the new position + var unul = parents[i].absoluteXY(); + var csul = currentShape.absoluteXY(); + var x = csul.x - unul.x; + var y = csul.y - unul.y; + + // Add the shape to the new contained shape + parents[i].add(currentShape); + // Add all attached shapes as well + currentShape.getOutgoingShapes((function(shape) { + if(shape instanceof ORYX.Core.Node && !this.moveShapes.member(shape)) { + parents[i].add(shape); + } + }).bind(this)); + + // Set the new position + if(currentShape instanceof ORYX.Core.Node && currentShape.dockers.length == 1){ + var b = currentShape.bounds; + x += b.width()/2;y += b.height()/2 + currentShape.dockers.first().bounds.centerMoveTo(x, y); + } else { + currentShape.bounds.moveTo(x, y); + } + + } + + // Update the shape + //currentShape.update(); + + } + }, + selectCurrentShapes:function(){ + this.plugin.facade.setSelection( this.selectedShapes ); + } +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.DragDocker = Clazz.extend({ + + /** + * Constructor + * @param {Object} Facade: The Facade of the Editor + */ + construct: function(facade) { + this.facade = facade; + + // Set the valid and invalid color + this.VALIDCOLOR = ORYX.CONFIG.SELECTION_VALID_COLOR; + this.INVALIDCOLOR = ORYX.CONFIG.SELECTION_INVALID_COLOR; + + // Define Variables + this.shapeSelection = undefined; + this.docker = undefined; + this.dockerParent = undefined; + this.dockerSource = undefined; + this.dockerTarget = undefined; + this.lastUIObj = undefined; + this.isStartDocker = undefined; + this.isEndDocker = undefined; + this.undockTreshold = 10; + this.initialDockerPosition = undefined; + this.outerDockerNotMoved = undefined; + this.isValid = false; + + // For the Drag and Drop + // Register on MouseDown-Event on a Docker + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DOCKERDRAG, this.handleDockerDrag.bind(this)); + + + // Register on over/out to show / hide a docker + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEOVER, this.handleMouseOver.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEOUT, this.handleMouseOut.bind(this)); + + + }, + + /** + * MouseOut Handler + * + */ + handleMouseOut: function(event, uiObj) { + // If there is a Docker, hide this + if(!this.docker && uiObj instanceof ORYX.Core.Controls.Docker) { + uiObj.hide(); + } else if(!this.docker && uiObj instanceof ORYX.Core.Edge) { + uiObj.dockers.each(function(docker){ + docker.hide(); + }); + } + }, + + /** + * MouseOver Handler + * + */ + handleMouseOver: function(event, uiObj) { + // If there is a Docker, show this + if(!this.docker && uiObj instanceof ORYX.Core.Controls.Docker) { + uiObj.show(); + } else if(!this.docker && uiObj instanceof ORYX.Core.Edge) { + uiObj.dockers.each(function(docker){ + docker.show(); + }); + } + }, + /** + * DockerDrag Handler + * delegates the uiEvent of the drag event to the mouseDown function + */ + handleDockerDrag: function(event, uiObj) { + this.handleMouseDown(event.uiEvent, uiObj); + }, + + /** + * MouseDown Handler + * + */ + handleMouseDown: function(event, uiObj) { + // If there is a Docker + if(uiObj instanceof ORYX.Core.Controls.Docker && uiObj.isMovable) { + + /* Buffering shape selection and clear selection*/ + this.shapeSelection = this.facade.getSelection(); + this.facade.setSelection(); + + this.docker = uiObj; + this.initialDockerPosition = this.docker.bounds.center(); + this.outerDockerNotMoved = false; + this.dockerParent = uiObj.parent; + + // Define command arguments + this._commandArg = {docker:uiObj, dockedShape:uiObj.getDockedShape(), refPoint:uiObj.referencePoint || uiObj.bounds.center()}; + + // Show the Docker + this.docker.show(); + + // If the Dockers Parent is an Edge, + // and the Docker is either the first or last Docker of the Edge + if(uiObj.parent instanceof ORYX.Core.Edge && + (uiObj.parent.dockers.first() == uiObj || uiObj.parent.dockers.last() == uiObj)) { + + // Get the Edge Source or Target + if(uiObj.parent.dockers.first() == uiObj && uiObj.parent.dockers.last().getDockedShape()) { + this.dockerTarget = uiObj.parent.dockers.last().getDockedShape(); + } else if(uiObj.parent.dockers.last() == uiObj && uiObj.parent.dockers.first().getDockedShape()) { + this.dockerSource = uiObj.parent.dockers.first().getDockedShape(); + } + + } else { + // If there parent is not an Edge, undefined the Source and Target + this.dockerSource = undefined; + this.dockerTarget = undefined; + } + + this.isStartDocker = this.docker.parent.dockers.first() === this.docker; + this.isEndDocker = this.docker.parent.dockers.last() === this.docker; + + // add to canvas while dragging + this.facade.getCanvas().add(this.docker.parent); + + // Hide all Labels from Docker + this.docker.parent.getLabels().each(function(label) { + label.hide(); + }); + + var eventCoordinates = this.facade.eventCoordinates(event); + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + eventCoordinates.x = eventCoordinates.x / additionalIEZoom; + eventCoordinates.y = eventCoordinates.y / additionalIEZoom; + } + + // Undocked the Docker from current Shape + if ((!this.isStartDocker && !this.isEndDocker) || !this.docker.isDocked()) { + + this.docker.setDockedShape(undefined); + // Set the Docker to the center of the mouse pointer + this.docker.bounds.centerMoveTo(eventCoordinates); + this.dockerParent._update(); + } else { + this.outerDockerNotMoved = true; + } + + var option = {movedCallback: this.dockerMoved.bind(this), upCallback: this.dockerMovedFinished.bind(this)}; + + this.startEventPos = eventCoordinates; + + // Enable the Docker for Drag'n'Drop, give the mouseMove and mouseUp-Callback with + ORYX.Core.UIEnableDrag(event, uiObj, option); + } + }, + + /** + * Docker MouseMove Handler + * + */ + dockerMoved: function(event) { + this.outerDockerNotMoved = false; + var snapToMagnet = undefined; + + if (this.docker.parent) { + if (this.isStartDocker || this.isEndDocker) { + + // Get the EventPosition and all Shapes on these point + var evPos = this.facade.eventCoordinates(event); + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + evPos.x = evPos.x / additionalIEZoom; + evPos.y = evPos.y / additionalIEZoom; + } + + if(this.docker.isDocked()) { + /* Only consider start/end dockers if they are moved over a treshold */ + var distanceDockerPointer = + ORYX.Core.Math.getDistancePointToPoint(evPos, this.initialDockerPosition); + if(distanceDockerPointer < this.undockTreshold) { + this.outerDockerNotMoved = true; + return; + } + + /* Undock the docker */ + this.docker.setDockedShape(undefined); + // Set the Docker to the center of the mouse pointer + //this.docker.bounds.centerMoveTo(evPos); + this.dockerParent._update(); + } + + var shapes = this.facade.getCanvas().getAbstractShapesAtPosition(evPos); + + // Get the top level Shape on these, but not the same as Dockers parent + var uiObj = shapes.pop(); + if (this.docker.parent === uiObj) { + uiObj = shapes.pop(); + } + + // If the top level Shape the same as the last Shape, then return + if (this.lastUIObj == uiObj) { + //return; + + // If the top level uiObj instance of Shape and this isn't the parent of the docker + } + else + if (uiObj instanceof ORYX.Core.Shape) { + + // Ask by the StencilSet if the source, the edge and the target valid connections. + if (this.docker.parent instanceof ORYX.Core.Edge) { + + var highestParent = this.getHighestParentBeforeCanvas(uiObj); + /* Ensure that the shape to dock is not a child shape + * of the same edge. + */ + if (highestParent instanceof ORYX.Core.Edge && this.docker.parent === highestParent) + { + this.isValid = false; + this.dockerParent._update(); + return; + } + this.isValid = false; + var curObj = uiObj, orgObj = uiObj; + while (!this.isValid && curObj && !(curObj instanceof ORYX.Core.Canvas)) + { + uiObj = curObj; + this.isValid = this.facade.getRules().canConnect({ + sourceShape: this.dockerSource ? // Is there a docked source + this.dockerSource : // than set this + (this.isStartDocker ? // if not and if the Docker is the start docker + uiObj : // take the last uiObj + undefined), // if not set it to undefined; + edgeShape: this.docker.parent, + targetShape: this.dockerTarget ? // Is there a docked target + this.dockerTarget : // than set this + (this.isEndDocker ? // if not and if the Docker is not the start docker + uiObj : // take the last uiObj + undefined) // if not set it to undefined; + }); + curObj = curObj.parent; + } + + // Reset uiObj if no + // valid parent is found + if (!this.isValid){ + uiObj = orgObj; + } + + } + else { + this.isValid = this.facade.getRules().canConnect({ + sourceShape: uiObj, + edgeShape: this.docker.parent, + targetShape: this.docker.parent + }); + } + + // If there is a lastUIObj, hide the magnets + if (this.lastUIObj) { + this.hideMagnets(this.lastUIObj); + } + + // If there is a valid connection, show the magnets + if (this.isValid) { + this.showMagnets(uiObj); + } + + // Set the Highlight Rectangle by these value + this.showHighlight(uiObj, this.isValid ? this.VALIDCOLOR : this.INVALIDCOLOR); + + // Buffer the current Shape + this.lastUIObj = uiObj; + } + else { + // If there is no top level Shape, then hide the highligting of the last Shape + this.hideHighlight(); + this.lastUIObj ? this.hideMagnets(this.lastUIObj) : null; + this.lastUIObj = undefined; + this.isValid = false; + } + + // Snap to the nearest Magnet + if (this.lastUIObj && this.isValid && !(event.shiftKey || event.ctrlKey)) { + snapToMagnet = this.lastUIObj.magnets.find(function(magnet){ + return magnet.absoluteBounds().isIncluded(evPos); + }); + + if (snapToMagnet) { + this.docker.bounds.centerMoveTo(snapToMagnet.absoluteCenterXY()); + //this.docker.update() + } + } + } + } + // Snap to on the nearest Docker of the same parent + if(!(event.shiftKey || event.ctrlKey) && !snapToMagnet) { + var minOffset = ORYX.CONFIG.DOCKER_SNAP_OFFSET; + var nearestX = minOffset + 1; + var nearestY = minOffset + 1; + + var dockerCenter = this.docker.bounds.center(); + + if (this.docker.parent) { + + this.docker.parent.dockers.each((function(docker){ + if (this.docker == docker) { + return + }; + + var center = docker.referencePoint ? docker.getAbsoluteReferencePoint() : docker.bounds.center(); + + nearestX = Math.abs(nearestX) > Math.abs(center.x - dockerCenter.x) ? center.x - dockerCenter.x : nearestX; + nearestY = Math.abs(nearestY) > Math.abs(center.y - dockerCenter.y) ? center.y - dockerCenter.y : nearestY; + + + }).bind(this)); + + if (Math.abs(nearestX) < minOffset || Math.abs(nearestY) < minOffset) { + nearestX = Math.abs(nearestX) < minOffset ? nearestX : 0; + nearestY = Math.abs(nearestY) < minOffset ? nearestY : 0; + + this.docker.bounds.centerMoveTo(dockerCenter.x + nearestX, dockerCenter.y + nearestY); + //this.docker.update() + } else { + + + + var previous = this.docker.parent.dockers[Math.max(this.docker.parent.dockers.indexOf(this.docker)-1, 0)]; + var next = this.docker.parent.dockers[Math.min(this.docker.parent.dockers.indexOf(this.docker)+1, this.docker.parent.dockers.length-1)]; + + if (previous && next && previous !== this.docker && next !== this.docker){ + var cp = previous.bounds.center(); + var cn = next.bounds.center(); + var cd = this.docker.bounds.center(); + + // Checks if the point is on the line between previous and next + if (ORYX.Core.Math.isPointInLine(cd.x, cd.y, cp.x, cp.y, cn.x, cn.y, 10)) { + // Get the rise + var raise = (Number(cn.y)-Number(cp.y))/(Number(cn.x)-Number(cp.x)); + // Calculate the intersection point + var intersecX = ((cp.y-(cp.x*raise))-(cd.y-(cd.x*(-Math.pow(raise,-1)))))/((-Math.pow(raise,-1))-raise); + var intersecY = (cp.y-(cp.x*raise))+(raise*intersecX); + + if(isNaN(intersecX) || isNaN(intersecY)) {return;} + + this.docker.bounds.centerMoveTo(intersecX, intersecY); + } + } + + } + } + } + //this.facade.getCanvas().update(); + this.dockerParent._update(); + }, + + /** + * Docker MouseUp Handler + * + */ + dockerMovedFinished: function(event) { + + /* Reset to buffered shape selection */ + this.facade.setSelection(this.shapeSelection); + + // Hide the border + this.hideHighlight(); + + // Show all Labels from Docker + this.dockerParent.getLabels().each(function(label){ + label.show(); + //label.update(); + }); + + // If there is a last top level Shape + if(this.lastUIObj && (this.isStartDocker || this.isEndDocker)){ + // If there is a valid connection, the set as a docked Shape to them + if(this.isValid) { + + this.docker.setDockedShape(this.lastUIObj); + + this.facade.raiseEvent({ + type :ORYX.CONFIG.EVENT_DRAGDOCKER_DOCKED, + docker : this.docker, + parent : this.docker.parent, + target : this.lastUIObj + }); + } + + this.hideMagnets(this.lastUIObj); + } + + // Hide the Docker + this.docker.hide(); + + if(this.outerDockerNotMoved) { + // Get the EventPosition and all Shapes on these point + var evPos = this.facade.eventCoordinates(event); + var shapes = this.facade.getCanvas().getAbstractShapesAtPosition(evPos); + + /* Remove edges from selection */ + var shapeWithoutEdges = shapes.findAll(function(node) { + return node instanceof ORYX.Core.Node; + }); + shapes = shapeWithoutEdges.length ? shapeWithoutEdges : shapes; + this.facade.setSelection(shapes); + } else { + //Command-Pattern for dragging one docker + var dragDockerCommand = ORYX.Core.Command.extend({ + construct: function(docker, newPos, oldPos, newDockedShape, oldDockedShape, facade){ + this.docker = docker; + this.index = docker.parent.dockers.indexOf(docker); + this.newPosition = newPos; + this.newDockedShape = newDockedShape; + this.oldPosition = oldPos; + this.oldDockedShape = oldDockedShape; + this.facade = facade; + this.index = docker.parent.dockers.indexOf(docker); + this.shape = docker.parent; + + }, + execute: function(){ + if (!this.docker.parent){ + this.docker = this.shape.dockers[this.index]; + } + this.dock( this.newDockedShape, this.newPosition ); + this.removedDockers = this.shape.removeUnusedDockers(); + this.facade.updateSelection(); + }, + rollback: function(){ + this.dock( this.oldDockedShape, this.oldPosition ); + (this.removedDockers||$H({})).each(function(d){ + this.shape.add(d.value, Number(d.key)); + this.shape._update(true); + }.bind(this)); + this.facade.updateSelection(); + }, + dock:function( toDockShape, pos ){ + // Set the Docker to the new Shape + this.docker.setDockedShape( undefined ); + if( toDockShape ){ + this.docker.setDockedShape( toDockShape ); + this.docker.setReferencePoint( pos ); + //this.docker.update(); + //this.docker.parent._update(); + } else { + this.docker.bounds.centerMoveTo( pos ); + } + + this.facade.getCanvas().update(); + } + }); + + + if (this.docker.parent){ + // Instanziate the dockCommand + var command = new dragDockerCommand(this.docker, this.docker.getDockedShape() ? this.docker.referencePoint : this.docker.bounds.center(), this._commandArg.refPoint, this.docker.getDockedShape(), this._commandArg.dockedShape, this.facade); + this.facade.executeCommands( [command] ); + } + } + + // Update all Shapes + //this.facade.updateSelection(); + + // Undefined all variables + this.docker = undefined; + this.dockerParent = undefined; + this.dockerSource = undefined; + this.dockerTarget = undefined; + this.lastUIObj = undefined; + }, + + /** + * Hide the highlighting + */ + hideHighlight: function() { + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId:'validDockedShape'}); + }, + + /** + * Show the highlighting + * + */ + showHighlight: function(uiObj, color) { + + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId:'validDockedShape', + elements: [uiObj], + color: color + }); + }, + + showMagnets: function(uiObj){ + uiObj.magnets.each(function(magnet) { + magnet.show(); + }); + }, + + hideMagnets: function(uiObj){ + uiObj.magnets.each(function(magnet) { + magnet.hide(); + }); + }, + + getHighestParentBeforeCanvas: function(shape) { + if(!(shape instanceof ORYX.Core.Shape)) {return undefined;} + + var parent = shape.parent; + while(parent && !(parent.parent instanceof ORYX.Core.Canvas)) { + parent = parent.parent; + } + + return parent; + } + +}); + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.AddDocker = Clazz.extend({ + + /** + * Constructor + * @param {Object} Facade: The Facade of the Editor + */ + construct: function(facade) { + this.facade = facade; + this.enableAdd = false; + this.enableRemove = false; + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)); + }, + + setEnableAdd: function(enable){ + this.enableAdd = enable; + + if(this.enableAdd) { + jQuery("#add-bendpoint-button").addClass('pressed'); + } else { + jQuery("#add-bendpoint-button").removeClass('pressed'); + jQuery("#add-bendpoint-button").blur(); + } + }, + setEnableRemove: function(enable){ + this.enableRemove = enable; + + if(this.enableRemove) { + jQuery("#remove-bendpoint-button").addClass('pressed'); + } else { + jQuery("#remove-bendpoint-button").removeClass('pressed'); + jQuery("#remove-bendpoint-button").blur(); + } + }, + + enabledAdd: function(enable){ + return this.enableAdd; + }, + enabledRemove: function(){ + return this.enableRemove; + }, + + /** + * MouseDown Handler + * + */ + handleMouseDown: function(event, uiObj) { + if (this.enabledAdd() && uiObj instanceof ORYX.Core.Edge) { + this.newDockerCommand({ + edge: uiObj, + position: this.facade.eventCoordinates(event) + }); + this.setEnableAdd(false); + + } else if (this.enabledRemove() && + uiObj instanceof ORYX.Core.Controls.Docker && + uiObj.parent instanceof ORYX.Core.Edge) { + this.newDockerCommand({ + edge: uiObj.parent, + docker: uiObj + }); + this.setEnableRemove(false); + } + document.body.style.cursor = 'default'; + }, + + // Options: edge (required), position (required if add), docker (required if delete) + newDockerCommand: function(options){ + if(!options.edge) + return; + + var commandClass = ORYX.Core.Command.extend({ + construct: function(addEnabled, deleteEnabled, edge, docker, pos, facade){ + this.addEnabled = addEnabled; + this.deleteEnabled = deleteEnabled; + this.edge = edge; + this.docker = docker; + this.pos = pos; + this.facade = facade; + }, + execute: function(){ + if (this.addEnabled) { + if (!this.docker){ + this.docker = this.edge.addDocker(this.pos); + this.index = this.edge.dockers.indexOf(this.docker); + } else { + this.edge.add(this.docker, this.index); + } + } + else if (this.deleteEnabled) { + this.index = this.edge.dockers.indexOf(this.docker); + this.pos = this.docker.bounds.center(); + this.edge.removeDocker(this.docker); + } + this.edge.getLabels().invoke("show"); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + }, + rollback: function(){ + if (this.addEnabled) { + if (this.docker instanceof ORYX.Core.Controls.Docker) { + this.edge.removeDocker(this.docker); + } + } + else if (this.deleteEnabled) { + this.edge.add(this.docker, this.index); + } + this.edge.getLabels().invoke("show"); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + } + }) + + var command = new commandClass(this.enabledAdd(), this.enabledRemove(), options.edge, options.docker, options.position, this.facade); + + this.facade.executeCommands([command]); + } +}); + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + + ORYX.Plugins.SelectionFrame = Clazz.extend({ + + construct: function(facade) { + this.facade = facade; + + // Register on MouseEvents + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.handleMouseUp.bind(this), true); + + // Some initiale variables + this.position = {x:0, y:0}; + this.size = {width:0, height:0}; + this.offsetPosition = {x: 0, y: 0}; + + // (Un)Register Mouse-Move Event + this.moveCallback = undefined; + this.offsetScroll = {x:0,y:0}; + // HTML-Node of Selection-Frame + this.node = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", $('canvasSection'), + ['div', {'class':'Oryx_SelectionFrame'}]); + + this.hide(); + }, + + handleMouseDown: function(event, uiObj) { + // If there is the Canvas + if( uiObj instanceof ORYX.Core.Canvas ) { + // Calculate the Offset + var scrollNode = uiObj.rootNode.parentNode.parentNode; + + var a = this.facade.getCanvas().node.getScreenCTM(); + this.offsetPosition = { + x: a.e, + y: a.f + }; + + // Set the new Position + this.setPos({ + x: Event.pointerX(event) - jQuery("#canvasSection").offset().left, + y: Event.pointerY(event) - jQuery("#canvasSection").offset().top + 5 + }); + + // Reset the size + this.resize({width:0, height:0}); + this.moveCallback = this.handleMouseMove.bind(this); + + // Register Mouse-Move Event + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.moveCallback, false); + + this.offsetScroll = {x:scrollNode.scrollLeft,y:scrollNode.scrollTop}; + + // Show the Frame + this.show(); + } + + Event.stop(event); + }, + + handleMouseUp: function(event) { + // If there was an MouseMoving + if(this.moveCallback) { + // Hide the Frame + this.hide(); + + // Unregister Mouse-Move + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.moveCallback, false); + + this.moveCallback = undefined; + + var corrSVG = this.facade.getCanvas().node.getScreenCTM(); + + // Calculate the positions of the Frame + var a = { + x: this.size.width > 0 ? this.position.x : this.position.x + this.size.width, + y: this.size.height > 0 ? this.position.y : this.position.y + this.size.height + }; + + var b = { + x: a.x + Math.abs(this.size.width), + y: a.y + Math.abs(this.size.height) + }; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom === 1) { + a.x = a.x - (corrSVG.e - jQuery("#canvasSection").offset().left); + a.y = a.y - (corrSVG.f - jQuery("#canvasSection").offset().top); + b.x = b.x - (corrSVG.e - jQuery("#canvasSection").offset().left); + b.y = b.y - (corrSVG.f - jQuery("#canvasSection").offset().top); + + } else { + var canvasOffsetLeft = jQuery("#canvasSection").offset().left; + var canvasScrollLeft = jQuery("#canvasSection").scrollLeft(); + var canvasScrollTop = jQuery("#canvasSection").scrollTop(); + + var offset = a.e - (canvasOffsetLeft * additionalIEZoom); + var additionaloffset = 0; + if (offset > 10) { + additionaloffset = (offset / additionalIEZoom) - offset; + } + + a.x = a.x - (corrSVG.e - (canvasOffsetLeft * additionalIEZoom) + additionaloffset + ((canvasScrollLeft * additionalIEZoom) - canvasScrollLeft)); + a.y = a.y - (corrSVG.f - (jQuery("#canvasSection").offset().top * additionalIEZoom) + ((canvasScrollTop * additionalIEZoom) - canvasScrollTop)); + b.x = b.x - (corrSVG.e - (canvasOffsetLeft * additionalIEZoom) + additionaloffset + ((canvasScrollLeft * additionalIEZoom) - canvasScrollLeft)); + b.y = b.y - (corrSVG.f - (jQuery("#canvasSection").offset().top * additionalIEZoom) + ((canvasScrollTop * additionalIEZoom) - canvasScrollTop)); + } + + + + // Fit to SVG-Coordinates + a.x /= corrSVG.a; a.y /= corrSVG.d; + b.x /= corrSVG.a; b.y /= corrSVG.d; + + // Calculate the elements from the childs of the canvas + var elements = this.facade.getCanvas().getChildShapes(true).findAll(function(value) { + var absBounds = value.absoluteBounds(); + + var bA = absBounds.upperLeft(); + var bB = absBounds.lowerRight(); + + if(bA.x > a.x && bA.y > a.y && bB.x < b.x && bB.y < b.y) + return true; + return false; + }); + + // Set the selection + this.facade.setSelection(elements); + } + }, + + handleMouseMove: function(event) { + // Calculate the size + var size = { + width : Event.pointerX(event) - this.position.x - jQuery("#canvasSection").offset().left, + height : Event.pointerY(event) - this.position.y - jQuery("#canvasSection").offset().top + 5 + }; + + var scrollNode = this.facade.getCanvas().rootNode.parentNode.parentNode; + size.width -= this.offsetScroll.x - scrollNode.scrollLeft; + size.height -= this.offsetScroll.y - scrollNode.scrollTop; + + // Set the size + this.resize(size); + + Event.stop(event); + }, + + hide: function() { + this.node.style.display = "none"; + }, + + show: function() { + this.node.style.display = ""; + }, + + setPos: function(pos) { + // Set the Position + this.node.style.top = pos.y + "px"; + this.node.style.left = pos.x + "px"; + this.position = pos; + }, + + resize: function(size) { + + // Calculate the negative offset + this.setPos(this.position); + this.size = Object.clone(size); + + if(size.width < 0) { + this.node.style.left = (this.position.x + size.width) + "px"; + size.width = - size.width; + } + if(size.height < 0) { + this.node.style.top = (this.position.y + size.height) + "px"; + size.height = - size.height; + } + + // Set the size + this.node.style.width = size.width + "px"; + this.node.style.height = size.height + "px"; + } + +}); + + +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.ShapeHighlighting = Clazz.extend({ + + construct: function(facade) { + + this.parentNode = facade.getCanvas().getSvgContainer(); + + // The parent Node + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.parentNode, + ['g']); + + this.highlightNodes = {}; + + facade.registerOnEvent(ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, this.setHighlight.bind(this)); + facade.registerOnEvent(ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, this.hideHighlight.bind(this)); + + }, + + setHighlight: function(options) { + if(options && options.highlightId){ + var node = this.highlightNodes[options.highlightId]; + + if(!node){ + node= ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, + ['path', { + "stroke-width": 2.0, "fill":"none" + }]); + + this.highlightNodes[options.highlightId] = node; + } + + if(options.elements && options.elements.length > 0) { + + this.setAttributesByStyle( node, options ); + this.show(node); + + } else { + + this.hide(node); + + } + + } + }, + + hideHighlight: function(options) { + if(options && options.highlightId && this.highlightNodes[options.highlightId]){ + this.hide(this.highlightNodes[options.highlightId]); + } + }, + + hide: function(node) { + node.setAttributeNS(null, 'display', 'none'); + }, + + show: function(node) { + node.setAttributeNS(null, 'display', ''); + }, + + setAttributesByStyle: function( node, options ){ + + // If the style say, that it should look like a rectangle + if( options.style && options.style == ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE ){ + + // Set like this + var bo = options.elements[0].absoluteBounds(); + + var strWidth = options.strokewidth ? options.strokewidth : ORYX.CONFIG.BORDER_OFFSET + + node.setAttributeNS(null, "d", this.getPathRectangle( bo.a, bo.b , strWidth ) ); + node.setAttributeNS(null, "stroke", options.color ? options.color : ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR); + node.setAttributeNS(null, "stroke-opacity", options.opacity ? options.opacity : 0.2); + node.setAttributeNS(null, "stroke-width", strWidth); + + } else if(options.elements.length == 1 + && options.elements[0] instanceof ORYX.Core.Edge && + options.highlightId != "selection") { + + /* Highlight containment of edge's childs */ + var path = this.getPathEdge(options.elements[0].dockers); + if (path && path.length > 0) + { + node.setAttributeNS(null, "d", path); + } + node.setAttributeNS(null, "stroke", options.color ? options.color : ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR); + node.setAttributeNS(null, "stroke-opacity", options.opacity ? options.opacity : 0.2); + node.setAttributeNS(null, "stroke-width", ORYX.CONFIG.OFFSET_EDGE_BOUNDS); + + }else { + // If not, set just the corners + var path = this.getPathByElements(options.elements); + if (path && path.length > 0) + { + node.setAttributeNS(null, "d", path); + } + node.setAttributeNS(null, "stroke", options.color ? options.color : ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR); + node.setAttributeNS(null, "stroke-opacity", options.opacity ? options.opacity : 1.0); + node.setAttributeNS(null, "stroke-width", options.strokewidth ? options.strokewidth : 2.0); + + } + }, + + getPathByElements: function(elements){ + if(!elements || elements.length <= 0) {return undefined} + + // Get the padding and the size + var padding = ORYX.CONFIG.SELECTED_AREA_PADDING; + + var path = "" + + // Get thru all Elements + elements.each((function(element) { + if(!element) {return} + // Get the absolute Bounds and the two Points + var bounds = element.absoluteBounds(); + bounds.widen(padding) + var a = bounds.upperLeft(); + var b = bounds.lowerRight(); + + path = path + this.getPath(a ,b); + + }).bind(this)); + + return path; + + }, + + getPath: function(a, b){ + + return this.getPathCorners(a, b); + + }, + + getPathCorners: function(a, b){ + + var size = ORYX.CONFIG.SELECTION_HIGHLIGHT_SIZE; + + var path = "" + + // Set: Upper left + path = path + "M" + a.x + " " + (a.y + size) + " l0 -" + size + " l" + size + " 0 "; + // Set: Lower left + path = path + "M" + a.x + " " + (b.y - size) + " l0 " + size + " l" + size + " 0 "; + // Set: Lower right + path = path + "M" + b.x + " " + (b.y - size) + " l0 " + size + " l-" + size + " 0 "; + // Set: Upper right + path = path + "M" + b.x + " " + (a.y + size) + " l0 -" + size + " l-" + size + " 0 "; + + return path; + }, + + getPathRectangle: function(a, b, strokeWidth){ + + var size = ORYX.CONFIG.SELECTION_HIGHLIGHT_SIZE; + + var path = "" + var offset = strokeWidth / 2.0; + + // Set: Upper left + path = path + "M" + (a.x + offset) + " " + (a.y); + path = path + " L" + (a.x + offset) + " " + (b.y - offset); + path = path + " L" + (b.x - offset) + " " + (b.y - offset); + path = path + " L" + (b.x - offset) + " " + (a.y + offset); + path = path + " L" + (a.x + offset) + " " + (a.y + offset); + + return path; + }, + + getPathEdge: function(edgeDockers) { + var length = edgeDockers.length; + var path = "M" + edgeDockers[0].bounds.center().x + " " + + edgeDockers[0].bounds.center().y; + + for(i=1; i<length; i++) { + var dockerPoint = edgeDockers[i].bounds.center(); + path = path + " L" + dockerPoint.x + " " + dockerPoint.y; + } + + return path; + } + +}); + + +ORYX.Plugins.HighlightingSelectedShapes = Clazz.extend({ + + construct: function(facade) { + this.facade = facade; + this.opacityFull = 0.9; + this.opacityLow = 0.4; + + // Register on Dragging-Events for show/hide of ShapeMenu + //this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DRAGDROP_START, this.hide.bind(this)); + //this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DRAGDROP_END, this.show.bind(this)); + }, + + /** + * On the Selection-Changed + * + */ + onSelectionChanged: function(event) { + if(event.elements && event.elements.length > 1) { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId:'selection', + elements: event.elements.without(event.subSelection), + color: ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR, + opacity: !event.subSelection ? this.opacityFull : this.opacityLow + }); + + if(event.subSelection){ + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId:'subselection', + elements: [event.subSelection], + color: ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR, + opacity: this.opacityFull + }); + } else { + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId:'subselection'}); + } + + } else { + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId:'selection'}); + this.facade.raiseEvent({type:ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId:'subselection'}); + } + } +});/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.Overlay = Clazz.extend({ + + facade: undefined, + + styleNode: undefined, + + construct: function(facade){ + + this.facade = facade; + + this.changes = []; + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_OVERLAY_SHOW, this.show.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_OVERLAY_HIDE, this.hide.bind(this)); + + this.styleNode = document.createElement('style') + this.styleNode.setAttributeNS(null, 'type', 'text/css') + + document.getElementsByTagName('head')[0].appendChild( this.styleNode ) + + }, + + /** + * Show the overlay for specific nodes + * @param {Object} options + * + * String options.id - MUST - Define the id of the overlay (is needed for the hiding of this overlay) + * ORYX.Core.Shape[] options.shapes - MUST - Define the Shapes for the changes + * attr-name:value options.changes - Defines all the changes which should be shown + * + * + */ + show: function( options ){ + + // Checks if all arguments are available + if( !options || + !options.shapes || !options.shapes instanceof Array || + !options.id || !options.id instanceof String || options.id.length == 0) { + + return + + } + + //if( this.changes[options.id]){ + // this.hide( options ) + //} + + + // Checked if attributes are setted + if( options.attributes ){ + + // FOR EACH - Shape + options.shapes.each(function(el){ + + // Checks if the node is a Shape + if( !el instanceof ORYX.Core.Shape){ return } + + this.setAttributes( el.node , options.attributes ) + + }.bind(this)) + + } + + var isSVG = true + try { + isSVG = options.node && options.node instanceof SVGElement; + } catch(e){var abcdef=1} + + // Checks if node is setted and if this is an SVGElement + if ( options.node && isSVG) { + + options["_temps"] = [] + + // FOR EACH - Node + options.shapes.each(function(el, index){ + + // Checks if the node is a Shape + if( !el instanceof ORYX.Core.Shape){ return } + + var _temp = {} + _temp.svg = options.dontCloneNode ? options.node : options.node.cloneNode( true ); + + // Add the svg node to the ORYX-Shape + el.node.firstChild.appendChild( _temp.svg ) + + // If + if (el instanceof ORYX.Core.Edge && !options.nodePosition) { + options['nodePosition'] = "START" + } + + // If the node position is setted, it has to be transformed + if( options.nodePosition ){ + + var b = el.bounds; + var p = options.nodePosition.toUpperCase(); + + // Check the values of START and END + if( el instanceof ORYX.Core.Node && p == "START"){ + p = "NW"; + } else if(el instanceof ORYX.Core.Node && p == "END"){ + p = "SE"; + } else if(el instanceof ORYX.Core.Edge && p == "START"){ + b = el.getDockers().first().bounds + } else if(el instanceof ORYX.Core.Edge && p == "END"){ + b = el.getDockers().last().bounds + } + + // Create a callback for the changing the position + // depending on the position string + _temp.callback = function(){ + + var x = 0; var y = 0; + + if( p == "NW" ){ + // Do Nothing + } else if( p == "N" ) { + x = b.width() / 2; + } else if( p == "NE" ) { + x = b.width(); + } else if( p == "E" ) { + x = b.width(); y = b.height() / 2; + } else if( p == "SE" ) { + x = b.width(); y = b.height(); + } else if( p == "S" ) { + x = b.width() / 2; y = b.height(); + } else if( p == "SW" ) { + y = b.height(); + } else if( p == "W" ) { + y = b.height() / 2; + } else if( p == "START" || p == "END") { + x = b.width() / 2; y = b.height() / 2; + } else { + return + } + + if( el instanceof ORYX.Core.Edge){ + x += b.upperLeft().x ; y += b.upperLeft().y ; + } + + _temp.svg.setAttributeNS(null, "transform", "translate(" + x + ", " + y + ")") + + }.bind(this) + + _temp.element = el; + _temp.callback(); + + b.registerCallback( _temp.callback ); + + } + + + options._temps.push( _temp ) + + }.bind(this)) + + + + } + + + // Store the changes + if( !this.changes[options.id] ){ + this.changes[options.id] = []; + } + + this.changes[options.id].push( options ); + + }, + + /** + * Hide the overlay with the spefic id + * @param {Object} options + */ + hide: function( options ){ + + // Checks if all arguments are available + if( !options || + !options.id || !options.id instanceof String || options.id.length == 0 || + !this.changes[options.id]) { + + return + + } + + + // Delete all added attributes + // FOR EACH - Shape + this.changes[options.id].each(function(option){ + + option.shapes.each(function(el, index){ + + // Checks if the node is a Shape + if( !el instanceof ORYX.Core.Shape){ return } + + this.deleteAttributes( el.node ) + + }.bind(this)); + + + if( option._temps ){ + + option._temps.each(function(tmp){ + // Delete the added Node, if there is one + if( tmp.svg && tmp.svg.parentNode ){ + tmp.svg.parentNode.removeChild( tmp.svg ) + } + + // If + if( tmp.callback && tmp.element){ + // It has to be unregistered from the edge + tmp.element.bounds.unregisterCallback( tmp.callback ) + } + + }.bind(this)) + + } + + + }.bind(this)); + + + this.changes[options.id] = null; + + + }, + + + /** + * Set the given css attributes to that node + * @param {HTMLElement} node + * @param {Object} attributes + */ + setAttributes: function( node, attributes ) { + + + // Get all the childs from ME + var childs = this.getAllChilds( node.firstChild.firstChild ) + + var ids = [] + + // Add all Attributes which have relation to another node in this document and concate the pure id out of it + // This is for example important for the markers of a edge + childs.each(function(e){ ids.push( $A(e.attributes).findAll(function(attr){ return attr.nodeValue.startsWith('url(#')}) )}) + ids = ids.flatten().compact(); + ids = ids.collect(function(s){return s.nodeValue}).uniq(); + ids = ids.collect(function(s){return s.slice(5, s.length-1)}) + + // Add the node ID to the id + ids.unshift( node.id + ' .me') + + var attr = $H(attributes); + var attrValue = attr.toJSON().gsub(',', ';').gsub('"', ''); + var attrMarkerValue = attributes.stroke ? attrValue.slice(0, attrValue.length-1) + "; fill:" + attributes.stroke + ";}" : attrValue; + var attrTextValue; + if( attributes.fill ){ + var copyAttr = Object.clone(attributes); + copyAttr.fill = "black"; + attrTextValue = $H(copyAttr).toJSON().gsub(',', ';').gsub('"', ''); + } + + // Create the CSS-Tags Style out of the ids and the attributes + csstags = ids.collect(function(s, i){return "#" + s + " * " + (!i? attrValue : attrMarkerValue) + "" + (attrTextValue ? " #" + s + " text * " + attrTextValue : "") }) + + // Join all the tags + var s = csstags.join(" ") + "\n" + + // And add to the end of the style tag + this.styleNode.appendChild(document.createTextNode(s)); + + + }, + + /** + * Deletes all attributes which are + * added in a special style sheet for that node + * @param {HTMLElement} node + */ + deleteAttributes: function( node ) { + + // Get all children which contains the node id + var delEl = $A(this.styleNode.childNodes) + .findAll(function(e){ return e.textContent.include( '#' + node.id ) }); + + // Remove all of them + delEl.each(function(el){ + el.parentNode.removeChild(el); + }); + }, + + getAllChilds: function( node ){ + + var childs = $A(node.childNodes) + + $A(node.childNodes).each(function( e ){ + childs.push( this.getAllChilds( e ) ) + }.bind(this)) + + return childs.flatten(); + } + + +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if (!ORYX.Plugins) + ORYX.Plugins = new Object(); + +ORYX.Plugins.KeysMove = ORYX.Plugins.AbstractPlugin.extend({ + + facade: undefined, + + construct: function(facade){ + + this.facade = facade; + this.copyElements = []; + + //this.facade.registerOnEvent(ORYX.CONFIG.EVENT_KEYDOWN, this.keyHandler.bind(this)); + + // SELECT ALL + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 65, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.selectAll.bind(this) + }); + + // MOVE LEFT SMALL + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_LEFT, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_LEFT, false) + }); + + // MOVE LEFT + this.facade.offer({ + keyCodes: [{ + keyCode: ORYX.CONFIG.KEY_CODE_LEFT, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_LEFT, true) + }); + + // MOVE RIGHT SMALL + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_RIGHT, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_RIGHT, false) + }); + + // MOVE RIGHT + this.facade.offer({ + keyCodes: [{ + keyCode: ORYX.CONFIG.KEY_CODE_RIGHT, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_RIGHT, true) + }); + + // MOVE UP SMALL + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_UP, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_UP, false) + }); + + // MOVE UP + this.facade.offer({ + keyCodes: [{ + keyCode: ORYX.CONFIG.KEY_CODE_UP, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_UP, true) + }); + + // MOVE DOWN SMALL + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_DOWN, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_DOWN, false) + }); + + // MOVE DOWN + this.facade.offer({ + keyCodes: [{ + keyCode: ORYX.CONFIG.KEY_CODE_DOWN, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + } + ], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_DOWN, true) + }); + + + }, + + /** + * Select all shapes in the editor + * + */ + selectAll: function(e){ + Event.stop(e.event); + this.facade.setSelection(this.facade.getCanvas().getChildShapes(true)) + }, + + move: function(key, far, e) { + + Event.stop(e.event); + + // calculate the distance to move the objects and get the selection. + var distance = far? 20 : 5; + var selection = this.facade.getSelection(); + var currentSelection = this.facade.getSelection(); + var p = {x: 0, y: 0}; + + // switch on the key pressed and populate the point to move by. + switch(key) { + + case ORYX.CONFIG.KEY_CODE_LEFT: + p.x = -1*distance; + break; + case ORYX.CONFIG.KEY_CODE_RIGHT: + p.x = distance; + break; + case ORYX.CONFIG.KEY_CODE_UP: + p.y = -1*distance; + break; + case ORYX.CONFIG.KEY_CODE_DOWN: + p.y = distance; + break; + } + + // move each shape in the selection by the point calculated and update it. + selection = selection.findAll(function(shape){ + // Check if this shape is docked to an shape in the selection + if(shape instanceof ORYX.Core.Node && shape.dockers.length == 1 && selection.include( shape.dockers.first().getDockedShape() )){ + return false + } + + // Check if any of the parent shape is included in the selection + var s = shape.parent; + do{ + if(selection.include(s)){ + return false + } + }while(s = s.parent); + + // Otherwise, return true + return true; + + }); + + /* Edges must not be movable, if only edges are selected and at least + * one of them is docked. + */ + var edgesMovable = true; + var onlyEdgesSelected = selection.all(function(shape) { + if(shape instanceof ORYX.Core.Edge) { + if(shape.isDocked()) { + edgesMovable = false; + } + return true; + } + return false; + }); + + if(onlyEdgesSelected && !edgesMovable) { + /* Abort moving shapes */ + return; + } + + selection = selection.map(function(shape){ + if( shape instanceof ORYX.Core.Node ){ + /*if( shape.dockers.length == 1 ){ + return shape.dockers.first() + } else {*/ + return shape + //} + } else if( shape instanceof ORYX.Core.Edge ) { + + var dockers = shape.dockers; + + if( selection.include( shape.dockers.first().getDockedShape() ) ){ + dockers = dockers.without( shape.dockers.first() ) + } + + if( selection.include( shape.dockers.last().getDockedShape() ) ){ + dockers = dockers.without( shape.dockers.last() ) + } + + return dockers + + } else { + return null + } + + }).flatten().compact(); + + if (selection.size() > 0) { + + //Stop moving at canvas borders + var selectionBounds = [ this.facade.getCanvas().bounds.lowerRight().x, + this.facade.getCanvas().bounds.lowerRight().y, + 0, + 0 ]; + selection.each(function(s) { + selectionBounds[0] = Math.min(selectionBounds[0], s.bounds.upperLeft().x); + selectionBounds[1] = Math.min(selectionBounds[1], s.bounds.upperLeft().y); + selectionBounds[2] = Math.max(selectionBounds[2], s.bounds.lowerRight().x); + selectionBounds[3] = Math.max(selectionBounds[3], s.bounds.lowerRight().y); + }); + if(selectionBounds[0]+p.x < 0) + p.x = -selectionBounds[0]; + if(selectionBounds[1]+p.y < 0) + p.y = -selectionBounds[1]; + if(selectionBounds[2]+p.x > this.facade.getCanvas().bounds.lowerRight().x) + p.x = this.facade.getCanvas().bounds.lowerRight().x - selectionBounds[2]; + if(selectionBounds[3]+p.y > this.facade.getCanvas().bounds.lowerRight().y) + p.y = this.facade.getCanvas().bounds.lowerRight().y - selectionBounds[3]; + + if(p.x!=0 || p.y!=0) { + // Instantiate the moveCommand + var commands = [new ORYX.Core.Command.Move(selection, p, null, currentSelection, this)]; + // Execute the commands + this.facade.executeCommands(commands); + } + + } + }, + + getUndockedCommant: function(shapes){ + + var undockEdgeCommand = ORYX.Core.Command.extend({ + construct: function(moveShapes){ + this.dockers = moveShapes.collect(function(shape){ return shape instanceof ORYX.Core.Controls.Docker ? {docker:shape, dockedShape:shape.getDockedShape(), refPoint:shape.referencePoint} : undefined }).compact(); + }, + execute: function(){ + this.dockers.each(function(el){ + el.docker.setDockedShape(undefined); + }) + }, + rollback: function(){ + this.dockers.each(function(el){ + el.docker.setDockedShape(el.dockedShape); + el.docker.setReferencePoint(el.refPoint); + //el.docker.update(); + }) + } + }); + + command = new undockEdgeCommand( shapes ); + command.execute(); + return command; + }, + +// /** +// * The key handler for this plugin. Every action from the set of cut, copy, +// * paste and delete should be accessible trough simple keyboard shortcuts. +// * This method checks whether any event triggers one of those actions. +// * +// * @param {Object} event The keyboard event that should be analysed for +// * triggering of this plugin. +// */ +// keyHandler: function(event){ +// //TODO document what event.which is. +// +// ORYX.Log.debug("keysMove.js handles a keyEvent."); +// +// // assure we have the current event. +// if (!event) +// event = window.event; +// +// // get the currently pressed key and state of control key. +// var pressedKey = event.which || event.keyCode; +// var ctrlPressed = event.ctrlKey; +// +// // if the key is one of the arrow keys, forward to move and return. +// if ([ORYX.CONFIG.KEY_CODE_LEFT, ORYX.CONFIG.KEY_CODE_RIGHT, +// ORYX.CONFIG.KEY_CODE_UP, ORYX.CONFIG.KEY_CODE_DOWN].include(pressedKey)) { +// +// this.move(pressedKey, !ctrlPressed); +// return; +// } +// +// } + +}); +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) { ORYX.Plugins = {} } +if(!ORYX.Plugins.Layouter) { ORYX.Plugins.Layouter = {} } + +new function(){ + + /** + * Edge layouter is an implementation to layout an edge + * @class ORYX.Plugins.Layouter.EdgeLayouter + * @author Willi Tscheschner + */ + ORYX.Plugins.Layouter.EdgeLayouter = ORYX.Plugins.AbstractLayouter.extend({ + + /** + * Layout only Edges + */ + layouted : [ "http://b3mn.org/stencilset/bpmn1.1#SequenceFlow", + "http://b3mn.org/stencilset/bpmn1.1#MessageFlow", + "http://b3mn.org/stencilset/timjpdl3#SequenceFlow", + "http://b3mn.org/stencilset/jbpm4#SequenceFlow", + "http://b3mn.org/stencilset/bpmn2.0#MessageFlow", + "http://b3mn.org/stencilset/bpmn2.0#SequenceFlow", + "http://b3mn.org/stencilset/bpmn2.0choreography#MessageFlow", + "http://b3mn.org/stencilset/bpmn2.0choreography#SequenceFlow", + "http://b3mn.org/stencilset/bpmn2.0conversation#ConversationLink", + "http://b3mn.org/stencilset/epc#ControlFlow", + "http://www.signavio.com/stencilsets/processmap#ProcessLink", + "http://www.signavio.com/stencilsets/organigram#connection"], + + /** + * Layout a set on edges + * @param {Object} edges + */ + layout: function(edges){ + edges.each(function(edge){ + this.doLayout(edge) + }.bind(this)) + }, + + /** + * Layout one edge + * @param {Object} edge + */ + doLayout: function(edge){ + // Get from and to node + var from = edge.getIncomingNodes()[0]; + var to = edge.getOutgoingNodes()[0]; + + // Return if one is null + if (!from || !to) { return } + + var positions = this.getPositions(from, to, edge); + + if (positions.length > 0){ + this.setDockers(edge, positions[0].a, positions[0].b); + } + + }, + + /** + * Returns a set on positions which are not containt either + * in the bounds in from or to. + * @param {Object} from Shape where the edge is come from + * @param {Object} to Shape where the edge is leading to + * @param {Object} edge Edge between from and to + */ + getPositions : function(from, to, edge){ + + // Get absolute bounds + var ab = from.absoluteBounds(); + var bb = to.absoluteBounds(); + + // Get center from and to + var a = ab.center(); + var b = bb.center(); + + var am = ab.midPoint(); + var bm = bb.midPoint(); + + // Get first and last reference point + var first = Object.clone(edge.dockers.first().referencePoint); + var last = Object.clone(edge.dockers.last().referencePoint); + // Get the absolute one + var aFirst = edge.dockers.first().getAbsoluteReferencePoint(); + var aLast = edge.dockers.last().getAbsoluteReferencePoint(); + + // IF ------> + // or | + // V + // Do nothing + if (Math.abs(aFirst.x-aLast.x) < 1 || Math.abs(aFirst.y-aLast.y) < 1) { + return [] + } + + // Calc center position, between a and b + // depending on there weight + var m = {} + m.x = a.x < b.x ? + (((b.x - bb.width()/2) - (a.x + ab.width()/2))/2) + (a.x + ab.width()/2): + (((a.x - ab.width()/2) - (b.x + bb.width()/2))/2) + (b.x + bb.width()/2); + + m.y = a.y < b.y ? + (((b.y - bb.height()/2) - (a.y + ab.height()/2))/2) + (a.y + ab.height()/2): + (((a.y - ab.height()/2) - (b.y + bb.height()/2))/2) + (b.y + bb.height()/2); + + + // Enlarge both bounds with 10 + ab.widen(5); // Wide the from less than + bb.widen(20);// the to because of the arrow from the edge + + var positions = []; + var off = this.getOffset.bind(this); + + // Checks ----+ + // | + // V + if (!ab.isIncluded(b.x, a.y)&&!bb.isIncluded(b.x, a.y)) { + positions.push({ + a : {x:b.x+off(last,bm,"x"),y:a.y+off(first,am,"y")}, + z : this.getWeight(from, a.x < b.x ? "r" : "l", to, a.y < b.y ? "t" : "b", edge) + }); + } + + // Checks | + // +---> + if (!ab.isIncluded(a.x, b.y)&&!bb.isIncluded(a.x, b.y)) { + positions.push({ + a : {x:a.x+off(first,am,"x"),y:b.y+off(last,bm,"y")}, + z : this.getWeight(from, a.y < b.y ? "b" : "t", to, a.x < b.x ? "l" : "r", edge) + }); + } + + // Checks --+ + // | + // +---> + if (!ab.isIncluded(m.x, a.y)&&!bb.isIncluded(m.x, b.y)) { + positions.push({ + a : {x:m.x,y:a.y+off(first,am,"y")}, + b : {x:m.x,y:b.y+off(last,bm,"y")}, + z : this.getWeight(from, "r", to, "l", edge, a.x > b.x) + }); + } + + // Checks | + // +---+ + // | + // V + if (!ab.isIncluded(a.x, m.y)&&!bb.isIncluded(b.x, m.y)) { + positions.push({ + a : {x:a.x+off(first,am,"x"),y:m.y}, + b : {x:b.x+off(last,bm,"x"),y:m.y}, + z : this.getWeight(from, "b", to, "t", edge, a.y > b.y) + }); + } + + // Sort DESC of weights + return positions.sort(function(a,b){ return a.z < b.z ? 1 : (a.z == b.z ? -1 : -1)}); + }, + + /** + * Returns a offset for the pos to the center of the bounds + * + * @param {Object} val + * @param {Object} pos2 + * @param {String} dir Direction x|y + */ + getOffset: function(pos, pos2, dir){ + return pos[dir] - pos2[dir]; + }, + + /** + * Returns a value which shows the weight for this configuration + * + * @param {Object} from Shape which is coming from + * @param {String} d1 Direction where is goes + * @param {Object} to Shape which goes to + * @param {String} d2 Direction where it comes to + * @param {Object} edge Edge between from and to + * @param {Boolean} reverse Reverse the direction (e.g. "r" -> "l") + */ + getWeight: function(from, d1, to, d2, edge, reverse){ + + d1 = (d1||"").toLowerCase(); + d2 = (d2||"").toLowerCase(); + + if (!["t","r","b","l"].include(d1)){ d1 = "r"} + if (!["t","r","b","l"].include(d2)){ d1 = "l"} + + // If reverse is set + if (reverse) { + // Reverse d1 and d2 + d1 = d1=="t"?"b":(d1=="r"?"l":(d1=="b"?"t":(d1=="l"?"r":"r"))) + d2 = d2=="t"?"b":(d2=="r"?"l":(d2=="b"?"t":(d2=="l"?"r":"r"))) + } + + + var weight = 0; + // Get rules for from "out" and to "in" + var dr1 = this.facade.getRules().getLayoutingRules(from, edge)["out"]; + var dr2 = this.facade.getRules().getLayoutingRules(to, edge)["in"]; + + var fromWeight = dr1[d1]; + var toWeight = dr2[d2]; + + + /** + * Return a true if the center 1 is in the same direction than center 2 + * @param {Object} direction + * @param {Object} center1 + * @param {Object} center2 + */ + var sameDirection = function(direction, center1, center2){ + switch(direction){ + case "t": return Math.abs(center1.x - center2.x) < 2 && center1.y < center2.y + case "r": return center1.x > center2.x && Math.abs(center1.y - center2.y) < 2 + case "b": return Math.abs(center1.x - center2.x) < 2 && center1.y > center2.y + case "l": return center1.x < center2.x && Math.abs(center1.y - center2.y) < 2 + default: return false; + } + } + + // Check if there are same incoming edges from 'from' + var sameIncomingFrom = from + .getIncomingShapes() + .findAll(function(a){ return a instanceof ORYX.Core.Edge}) + .any(function(e){ + return sameDirection(d1, e.dockers[e.dockers.length-2].bounds.center(), e.dockers.last().bounds.center()); + }); + + // Check if there are same outgoing edges from 'to' + var sameOutgoingTo = to + .getOutgoingShapes() + .findAll(function(a){ return a instanceof ORYX.Core.Edge}) + .any(function(e){ + return sameDirection(d2, e.dockers[1].bounds.center(), e.dockers.first().bounds.center()); + }); + + // If there are equivalent edges, set 0 + //fromWeight = sameIncomingFrom ? 0 : fromWeight; + //toWeight = sameOutgoingTo ? 0 : toWeight; + + // Get the sum of "out" and the direction plus "in" and the direction + return (sameIncomingFrom||sameOutgoingTo?0:fromWeight+toWeight); + }, + + /** + * Removes all current dockers from the node + * (except the start and end) and adds two new + * dockers, on the position a and b. + * @param {Object} edge + * @param {Object} a + * @param {Object} b + */ + setDockers: function(edge, a, b){ + if (!edge){ return } + + // Remove all dockers (implicit, + // start and end dockers will not removed) + edge.dockers.each(function(r){ + edge.removeDocker(r); + }); + + // For a and b (if exists), create + // a new docker and set position + [a, b].compact().each(function(pos){ + var docker = edge.createDocker(undefined, pos); + docker.bounds.centerMoveTo(pos); + }); + + // Update all dockers from the edge + edge.dockers.each(function(docker){ + docker.update() + }) + + // Update edge + //edge.refresh(); + edge._update(true); + + } + }); + + +}() +/* + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * License rights for this program may be obtained from Alfresco Software, Ltd. + * pursuant to a written agreement and any use of this program without such an + * agreement is prohibited. + */ +/* + * All code Copyright 2013 KIS Consultancy all rights reserved + */ + +if(!ORYX.Plugins) + ORYX.Plugins = new Object(); + +new function(){ + + ORYX.Plugins.BPMN2_0 = { + + /** + * Constructor + * @param {Object} Facade: The Facade of the Editor + */ + construct: function(facade){ + this.facade = facade; + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DRAGDOCKER_DOCKED, this.handleDockerDocked.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_PROPWINDOW_PROP_CHANGED, this.handlePropertyChanged.bind(this)); + this.facade.registerOnEvent('layout.bpmn2_0.pool', this.handleLayoutPool.bind(this)); + this.facade.registerOnEvent('layout.bpmn2_0.subprocess', this.handleSubProcess.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_SHAPEREMOVED, this.handleShapeRemove.bind(this)); + + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADED, this.afterLoad.bind(this)); + + + this.namespace = undefined; + }, + + /** + * Force to update every pool + */ + afterLoad: function(){ + this.facade.getCanvas().getChildNodes().each(function(shape){ + if (shape.getStencil().id().endsWith("Pool")) { + this.handleLayoutPool({ + shape: shape + }); + } + }.bind(this)) + }, + + /** + * If a pool is selected and contains no lane, + * a lane is created automagically + */ + onSelectionChanged: function(event) { + var selection = event.elements; + + if(selection && selection.length === 1) { + var namespace = this.getNamespace(); + var shape = selection[0]; + if(shape.getStencil().idWithoutNs() === "Pool") { + if(shape.getChildNodes().length === 0) { + // create a lane inside the selected pool + var option = { + type:namespace + "Lane", + position:{x:0,y:0}, + namespace:shape.getStencil().namespace(), + parent:shape + }; + this.facade.createShape(option); + this.facade.getCanvas().update(); + this.facade.setSelection([shape]); + } + } + } + + // Preventing selection of all lanes but not the pool + if(selection.any(function(s){ return s instanceof ORYX.Core.Node && s.getStencil().id().endsWith("Lane")})){ + var lanes = selection.findAll(function(s){ + return s instanceof ORYX.Core.Node && s.getStencil().id().endsWith("Lane") + }); + + var pools = []; + var unselectLanes = []; + lanes.each(function(lane){ + pools.push(this.getParentPool(lane)) + }.bind(this)); + + pools = pools.uniq().findAll(function(pool){ + var childLanes = this.getLanes(pool, true); + if (childLanes.all(function(lane){ return lanes.include(lane)})){ + unselectLanes = unselectLanes.concat(childLanes); + return true; + } else if (selection.include(pool) && childLanes.any(function(lane){ return lanes.include(lane)})) { + unselectLanes = unselectLanes.concat(childLanes); + return true; + } else { + return false; + } + }.bind(this)) + + if (unselectLanes.length > 0 && pools.length > 0){ + selection = selection.without.apply(selection, unselectLanes); + selection = selection.concat(pools); + this.facade.setSelection(selection.uniq()); + } + } + }, + + handleShapeRemove: function(option) { + + var sh = option.shape; + var parent = option.parent; + + if (sh instanceof ORYX.Core.Node && sh.getStencil().idWithoutNs() === "Lane" && this.facade.isExecutingCommands()) { + + var pool = this.getParentPool(parent); + if (pool&&pool.parent){ + + var isLeafFn = function(leaf){ + return !leaf.getChildNodes().any(function(r){ return r.getStencil().idWithoutNs() === "Lane"}); + } + + var isLeaf = isLeafFn(sh); + var parentHasMoreLanes = parent.getChildNodes().any(function(r){ return r.getStencil().idWithoutNs() === "Lane"}); + + if (isLeaf && parentHasMoreLanes){ + + var command = new ResizeLanesCommand(sh, parent, pool, this); + this.facade.executeCommands([command]); + + } else if( !isLeaf && + !this.facade.getSelection().any(function(select){ // Find one of the selection, which is a lane and child of "sh" and is a leaf lane + return select instanceof ORYX.Core.Node && select.getStencil().idWithoutNs() === "Lane" && + select.isParent(sh) && isLeafFn(select);})) { + + var Command = ORYX.Core.Command.extend({ + construct: function(shape, facade) { + this.children = shape.getChildNodes(true); + this.facade = facade; + }, + execute: function() { + this.children.each(function(child){ + child.bounds.moveBy(30,0) + }); + //this.facade.getCanvas().update(); + }, + rollback: function() { + this.children.each(function(child){ + child.bounds.moveBy(-30,0) + }) + //this.facade.getCanvas().update(); + } + }); + this.facade.executeCommands([new Command(sh, this.facade)]); + + } else if (isLeaf&&!parentHasMoreLanes&&parent == pool){ + parent.add(sh); + } + } + + } + + }, + + + hashedSubProcesses: {}, + + hashChildShapes: function(shape){ + var children = shape.getChildNodes(); + children.each(function(child){ + if (this.hashedSubProcesses[child.id]){ + this.hashedSubProcesses[child.id] = child.absoluteXY(); + this.hashedSubProcesses[child.id].width = child.bounds.width(); + this.hashedSubProcesses[child.id].height = child.bounds.height(); + this.hashChildShapes(child); + } + }.bind(this)); + }, + + /** + * Handle the layouting of a sub process. + * Mainly to adjust the child dockers of a sub process. + * + */ + handleSubProcess : function(option) { + + var sh = option.shape; + + if (!this.hashedSubProcesses[sh.id]) { + this.hashedSubProcesses[sh.id] = sh.absoluteXY(); + this.hashedSubProcesses[sh.id].width = sh.bounds.width(); + this.hashedSubProcesses[sh.id].height = sh.bounds.height(); + return; + } + + var offset = sh.absoluteXY(); + offset.x -= this.hashedSubProcesses[sh.id].x; + offset.y -= this.hashedSubProcesses[sh.id].y; + + var resized = this.hashedSubProcesses[sh.id].width !== sh.bounds.width() || this.hashedSubProcesses[sh.id].height !== sh.bounds.height(); + + this.hashedSubProcesses[sh.id] = sh.absoluteXY(); + this.hashedSubProcesses[sh.id].width = sh.bounds.width(); + this.hashedSubProcesses[sh.id].height = sh.bounds.height(); + this.hashChildShapes(sh); + + + // Move dockers only if currently is not resizing + if (this.facade.isExecutingCommands()&&!resized) { + this.moveChildDockers(sh, offset); + } + }, + + moveChildDockers: function(shape, offset){ + + if (!offset.x && !offset.y) { + return; + } + + var children = shape.getChildNodes(true); + + // Get all nodes + var dockers = children + // Get all incoming and outgoing edges + .map(function(node){ + return [].concat(node.getIncomingShapes()) + .concat(node.getOutgoingShapes()) + }) + // Flatten all including arrays into one + .flatten() + // Get every edge only once + .uniq() + // Get all dockers + .map(function(edge){ + return edge.dockers.length > 2 ? + edge.dockers.slice(1, edge.dockers.length-1) : + []; + }) + // Flatten the dockers lists + .flatten(); + + var abs = shape.absoluteBounds(); + abs.moveBy(-offset.x, -offset.y) + var obj = {}; + dockers.each(function(docker){ + + if (docker.isChanged){ + return; + } + + var off = Object.clone(offset); + + if (!abs.isIncluded(docker.bounds.center())){ + var index = docker.parent.dockers.indexOf(docker); + var size = docker.parent.dockers.length; + var from = docker.parent.getSource(); + var to = docker.parent.getTarget(); + + var bothAreIncluded = children.include(from) && children.include(to); + + if (!bothAreIncluded){ + var previousIsOver = index !== 0 ? abs.isIncluded(docker.parent.dockers[index-1].bounds.center()) : false; + var nextIsOver = index !== size-1 ? abs.isIncluded(docker.parent.dockers[index+1].bounds.center()) : false; + + if (!previousIsOver && !nextIsOver){ return; } + + var ref = docker.parent.dockers[previousIsOver ? index-1 : index+1]; + if (Math.abs(-Math.abs(ref.bounds.center().x-docker.bounds.center().x)) < 2){ + off.y = 0; + } else if(Math.abs(-Math.abs(ref.bounds.center().y-docker.bounds.center().y)) < 2){ + off.x = 0; + } else { + return; + } + } + + } + + obj[docker.getId()] = { + docker:docker, + offset:off + } + }) + + // Set dockers + this.facade.executeCommands([new ORYX.Core.MoveDockersCommand(obj)]); + + }, + + /** + * DragDocker.Docked Handler + * + */ + handleDockerDocked: function(options) { + var namespace = this.getNamespace(); + + var edge = options.parent; + var edgeSource = options.target; + + if(edge.getStencil().id() === namespace + "SequenceFlow") { + var isGateway = edgeSource.getStencil().groups().find(function(group) { + if(group == "Gateways") + return group; + }); + if(!isGateway && (edge.properties["oryx-conditiontype"] == "Expression")) + // show diamond on edge source + edge.setProperty("oryx-showdiamondmarker", true); + else + // do not show diamond on edge source + edge.setProperty("oryx-showdiamondmarker", false); + + // update edge rendering + //edge.update(); + + this.facade.getCanvas().update(); + } + }, + + /** + * PropertyWindow.PropertyChanged Handler + */ + handlePropertyChanged: function(option) { + var namespace = this.getNamespace(); + + var shapes = option.elements; + var propertyKey = option.key; + var propertyValue = option.value; + + var changed = false; + shapes.each(function(shape){ + if((shape.getStencil().id() === namespace + "SequenceFlow") && + (propertyKey === "oryx-conditiontype")) { + + if(propertyValue != "Expression") + // Do not show the Diamond + shape.setProperty("oryx-showdiamondmarker", false); + else { + var incomingShapes = shape.getIncomingShapes(); + + if(!incomingShapes) { + shape.setProperty("oryx-showdiamondmarker", true); + } + + var incomingGateway = incomingShapes.find(function(aShape) { + var foundGateway = aShape.getStencil().groups().find(function(group) { + if(group == "Gateways") + return group; + }); + if(foundGateway) + return foundGateway; + }); + + if(!incomingGateway) + // show diamond on edge source + shape.setProperty("oryx-showdiamondmarker", true); + else + // do not show diamond + shape.setProperty("oryx-showdiamondmarker", false); + } + + changed = true; + } + }.bind(this)); + + if(changed) {this.facade.getCanvas().update();} + + }, + + hashedPoolPositions : {}, + hashedLaneDepth : {}, + hashedBounds : {}, + hashedPositions: {}, + + /** + * Handler for layouting event 'layout.bpmn2_0.pool' + * @param {Object} event + */ + handleLayoutPool: function(event){ + + + var pool = event.shape; + var selection = this.facade.getSelection(); + var currentShape = selection.include(pool) ? pool : selection.first(); + + currentShape = currentShape || pool; + + this.currentPool = pool; + + // Check if it is a pool or a lane + if (!(currentShape.getStencil().id().endsWith("Pool") || currentShape.getStencil().id().endsWith("Lane"))) { + return; + } + + // Check if the lane is within the pool and is not removed lately + if (currentShape !== pool && !currentShape.isParent(pool) && !this.hashedBounds[pool.id][currentShape.id]){ + return; + } + + + if (!this.hashedBounds[pool.id]) { + this.hashedBounds[pool.id] = {}; + } + + // Find all child lanes + var lanes = this.getLanes(pool); + + if (lanes.length <= 0) { + return + } + + var allLanes = this.getLanes(pool, true), hp; + var considerForDockers = allLanes.clone(); + + var hashedPositions = $H({}); + allLanes.each(function(lane){ + hashedPositions[lane.id] = lane.bounds.upperLeft(); + }) + + + + // Show/hide caption regarding the number of lanes + if (lanes.length === 1 && this.getLanes(lanes.first()).length <= 0) { + // TRUE if there is a caption + lanes.first().setProperty("oryx-showcaption", lanes.first().properties["oryx-name"].trim().length > 0); + var rect = lanes.first().node.getElementsByTagName("rect"); + rect[0].setAttributeNS(null, "display", "none"); + } else { + allLanes.invoke("setProperty", "oryx-showcaption", true); + allLanes.each(function(lane){ + var rect = lane.node.getElementsByTagName("rect"); + rect[0].removeAttributeNS(null, "display"); + }) + } + + var deletedLanes = []; + var addedLanes = []; + + // Get all new lanes + var i=-1; + while (++i<allLanes.length) { + if (!this.hashedBounds[pool.id][allLanes[i].id]){ + addedLanes.push(allLanes[i]) + } + } + + if (addedLanes.length > 0){ + currentShape = addedLanes.first(); + } + + + // Get all deleted lanes + var resourceIds = $H(this.hashedBounds[pool.id]).keys(); + var i=-1; + while (++i<resourceIds.length) { + if (!allLanes.any(function(lane){ return lane.id == resourceIds[i]})){ + deletedLanes.push(this.hashedBounds[pool.id][resourceIds[i]]); + selection = selection.without(function(r){ return r.id == resourceIds[i] }); + } + } + + var height, width, x, y; + + if (deletedLanes.length > 0 || addedLanes.length > 0) { + + if (addedLanes.length === 1 && this.getLanes(addedLanes[0].parent).length === 1){ + // Set height from the pool + height = this.adjustHeight(lanes, addedLanes[0].parent); + } else { + // Set height from the pool + height = this.updateHeight(pool); + } + // Set width from the pool + width = this.adjustWidth(lanes, pool.bounds.width()); + + pool.update(); + } + + /** + * Set width/height depending on the pool + */ + else if (pool == currentShape) { + + if (selection.length === 1 && this.isResized(pool, this.hashedPoolPositions[pool.id])) { + var oldXY = this.hashedPoolPositions[pool.id].upperLeft(); + var xy = pool.bounds.upperLeft(); + var scale = 0; + if (this.shouldScale(pool)){ + var old = this.hashedPoolPositions[pool.id]; + scale = old.height()/pool.bounds.height(); + } + + this.adjustLanes(pool, allLanes, oldXY.x - xy.x, oldXY.y - xy.y, scale); + } + + // Set height from the pool + height = this.adjustHeight(lanes, undefined, pool.bounds.height()); + // Set width from the pool + width = this.adjustWidth(lanes, pool.bounds.width()); + } + + /**??? + * Set width/height depending on containing lanes + */ + else { + + // Reposition the pool if one shape is selected and the upperleft has changed + if (selection.length === 1 && this.isResized(currentShape, this.hashedBounds[pool.id][currentShape.id])){ + var oldXY = this.hashedBounds[pool.id][currentShape.id].upperLeft(); + var xy = currentShape.absoluteXY(); + x = oldXY.x - xy.x; + y = oldXY.y - xy.y; + + // Adjust all other lanes beneath this lane + if (x||y){ + considerForDockers = considerForDockers.without(currentShape); + this.adjustLanes(pool, this.getAllExcludedLanes(pool, currentShape), x, 0); + } + + // Adjust all child lanes + var childLanes = this.getLanes(currentShape, true); + if (childLanes.length > 0){ + if (this.shouldScale(currentShape)){ + var old = this.hashedBounds[pool.id][currentShape.id]; + var scale = old.height()/currentShape.bounds.height(); + this.adjustLanes(pool, childLanes, x, y, scale); + } else { + this.adjustLanes(pool, childLanes, x, y, 0); + } + } + } + + // Cache all bounds + var changes = allLanes.map(function(lane){ return { + shape: lane, + bounds: lane.bounds.clone() + } }); + + // Get height and adjust child heights + height = this.adjustHeight(lanes, currentShape); + // Check if something has changed and maybe create a command + this.checkForChanges(allLanes, changes); + + // Set width from the current shape + width = this.adjustWidth(lanes, currentShape.bounds.width()+(this.getDepth(currentShape,pool)*30)); + } + + this.setDimensions(pool, width, height, x, y); + + + if (this.facade.isExecutingCommands() && (deletedLanes.length === 0 || addedLanes.length !== 0)){ + // Update all dockers + this.updateDockers(considerForDockers, pool); + + // Check if the order has changed + if (this.hashedPositions[pool.id] && this.hashedPositions[pool.id].keys().any(function(key, i){ + return (allLanes[i]||{}).id !== key; + })){ + + var LanesHasBeenReordered = ORYX.Core.Command.extend({ + construct: function(originPosition, newPosition, lanes, plugin, poolId) { + this.originPosition = Object.clone(originPosition); + this.newPosition = Object.clone(newPosition); + this.lanes = lanes; + this.plugin = plugin; + this.pool = poolId; + }, + execute: function(){ + if (!this.executed){ + this.executed = true; + this.lanes.each(function(lane){ + if (this.newPosition[lane.id]) + lane.bounds.moveTo(this.newPosition[lane.id]) + }.bind(this)); + this.plugin.hashedPositions[this.pool] = Object.clone(this.newPosition); + } + }, + rollback: function(){ + this.lanes.each(function(lane){ + if (this.originPosition[lane.id]) + lane.bounds.moveTo(this.originPosition[lane.id]) + }.bind(this)); + this.plugin.hashedPositions[this.pool] = Object.clone(this.originPosition); + } + }); + + var hp2 = $H({}); + allLanes.each(function(lane){ + hp2[lane.id] = lane.bounds.upperLeft(); + }) + + var command = new LanesHasBeenReordered(hashedPositions, hp2, allLanes, this, pool.id); + this.facade.executeCommands([command]); + + } + } + + this.hashedBounds[pool.id] = {}; + this.hashedPositions[pool.id] = hashedPositions; + + var i=-1; + while (++i < allLanes.length) { + // Cache positions + this.hashedBounds[pool.id][allLanes[i].id] = allLanes[i].absoluteBounds(); + + // Cache also the bounds of child shapes, mainly for child subprocesses + this.hashChildShapes(allLanes[i]); + + this.hashedLaneDepth[allLanes[i].id] = this.getDepth(allLanes[i], pool); + + this.forceToUpdateLane(allLanes[i]); + } + + this.hashedPoolPositions[pool.id] = pool.bounds.clone(); + + + // Update selection + //this.facade.setSelection(selection); + }, + + shouldScale: function(element){ + var childLanes = element.getChildNodes().findAll(function(shape){ return shape.getStencil().id().endsWith("Lane") }) + return childLanes.length > 1 || childLanes.any(function(lane){ return this.shouldScale(lane) }.bind(this)) + }, + + /** + * Lookup if some bounds has changed + * @param {Object} lanes + * @param {Object} changes + */ + checkForChanges: function(lanes, changes){ + // Check if something has changed + if (this.facade.isExecutingCommands() && changes.any(function(change){ + return change.shape.bounds.toString() !== change.bounds.toString(); + })){ + + var Command = ORYX.Core.Command.extend({ + construct: function(changes) { + this.oldState = changes; + this.newState = changes.map(function(s){ return {shape:s.shape, bounds:s.bounds.clone()}}); + }, + execute: function(){ + if (this.executed){ + this.applyState(this.newState); + } + this.executed = true; + }, + rollback: function(){ + this.applyState(this.oldState); + }, + applyState: function(state){ + state.each(function(s){ + s.shape.bounds.set(s.bounds.upperLeft(), s.bounds.lowerRight()); + }) + } + }); + + this.facade.executeCommands([new Command(changes)]); + } + }, + + isResized: function(shape, bounds){ + + if (!bounds||!shape){ + return false; + } + + var oldB = bounds; + //var oldXY = oldB.upperLeft(); + //var xy = shape.absoluteXY(); + return Math.round(oldB.width() - shape.bounds.width()) !== 0 || Math.round(oldB.height() - shape.bounds.height()) !== 0 + }, + + adjustLanes: function(pool, lanes, x, y, scale){ + + scale = scale || 0; + + // For every lane, adjust the child nodes with the offset + lanes.each(function(l){ + l.getChildNodes().each(function(child){ + if (!child.getStencil().id().endsWith("Lane")){ + var cy = scale ? child.bounds.center().y - (child.bounds.center().y/scale) : -y; + child.bounds.moveBy((x||0), -cy); + + if (scale&&child.getStencil().id().endsWith("Subprocess")) { + this.moveChildDockers(child, {x:(0), y:-cy}); + } + + } + }.bind(this)); + this.hashedBounds[pool.id][l.id].moveBy(-(x||0), !scale?-y:0); + if (scale) { + l.isScaled = true; + } + }.bind(this)) + + }, + + getAllExcludedLanes: function(parent, lane){ + var lanes = []; + parent.getChildNodes().each(function(shape){ + if ((!lane || shape !== lane) && shape.getStencil().id().endsWith("Lane")){ + lanes.push(shape); + lanes = lanes.concat(this.getAllExcludedLanes(shape, lane)); + } + }.bind(this)); + return lanes; + }, + + + forceToUpdateLane: function(lane){ + + if (lane.bounds.height() !== lane._svgShapes[0].height) { + lane.isChanged = true; + lane.isResized = true; + lane._update(); + } + }, + + getDepth: function(child, parent){ + + var i=0; + while(child && child.parent && child !== parent){ + child = child.parent; + ++i + } + return i; + }, + + updateDepth: function(lane, fromDepth, toDepth){ + + var xOffset = (fromDepth - toDepth) * 30; + + lane.getChildNodes().each(function(shape){ + shape.bounds.moveBy(xOffset, 0); + + [].concat(children[j].getIncomingShapes()) + .concat(children[j].getOutgoingShapes()) + + }) + + }, + + setDimensions: function(shape, width, height, x, y){ + var isLane = shape.getStencil().id().endsWith("Lane"); + // Set the bounds + shape.bounds.set( + isLane ? 30 : (shape.bounds.a.x - (x || 0)), + isLane ? shape.bounds.a.y : (shape.bounds.a.y - (y || 0)), + width ? shape.bounds.a.x + width - (isLane?30:(x||0)) : shape.bounds.b.x, + height ? shape.bounds.a.y + height - (isLane?0:(y||0)) : shape.bounds.b.y + ); + }, + + setLanePosition: function(shape, y){ + + shape.bounds.moveTo(30, y); + + }, + + adjustWidth: function(lanes, width) { + + // Set width to each lane + (lanes||[]).each(function(lane){ + this.setDimensions(lane, width); + this.adjustWidth(this.getLanes(lane), width-30); + }.bind(this)); + + return width; + }, + + + adjustHeight: function(lanes, changedLane, propagateHeight){ + + var oldHeight = 0; + if (!changedLane && propagateHeight){ + var i=-1; + while (++i<lanes.length){ + oldHeight += lanes[i].bounds.height(); + } + } + + var i=-1; + var height = 0; + + // Iterate trough every lane + while (++i<lanes.length){ + + if (lanes[i] === changedLane) { + // Propagate new height down to the children + this.adjustHeight(this.getLanes(lanes[i]), undefined, lanes[i].bounds.height()); + + lanes[i].bounds.set({x:30, y:height}, {x:lanes[i].bounds.width()+30, y:lanes[i].bounds.height()+height}) + + } else if (!changedLane && propagateHeight) { + + var tempHeight = (lanes[i].bounds.height() * propagateHeight) / oldHeight; + // Propagate height + this.adjustHeight(this.getLanes(lanes[i]), undefined, tempHeight); + // Set height propotional to the propagated and old height + this.setDimensions(lanes[i], null, tempHeight); + this.setLanePosition(lanes[i], height); + } else { + // Get height from children + var tempHeight = this.adjustHeight(this.getLanes(lanes[i]), changedLane, propagateHeight); + if (!tempHeight) { + tempHeight = lanes[i].bounds.height(); + } + this.setDimensions(lanes[i], null, tempHeight); + this.setLanePosition(lanes[i], height); + } + + height += lanes[i].bounds.height(); + } + + return height; + + }, + + + updateHeight: function(root){ + + var lanes = this.getLanes(root); + + if (lanes.length == 0){ + return root.bounds.height(); + } + + var height = 0; + var i=-1; + while (++i < lanes.length) { + this.setLanePosition(lanes[i], height); + height += this.updateHeight(lanes[i]); + } + + this.setDimensions(root, null, height); + + return height; + }, + + getOffset: function(lane, includePool, pool){ + + var offset = {x:0,y:0}; + + + /*var parent = lane; + while(parent) { + + + var offParent = this.hashedBounds[pool.id][parent.id] ||(includePool === true ? this.hashedPoolPositions[parent.id] : undefined); + if (offParent){ + var ul = parent.bounds.upperLeft(); + var ulo = offParent.upperLeft(); + offset.x += ul.x-ulo.x; + offset.y += ul.y-ulo.y; + } + + if (parent.getStencil().id().endsWith("Pool")) { + break; + } + + parent = parent.parent; + } */ + + var offset = lane.absoluteXY(); + + var hashed = this.hashedBounds[pool.id][lane.id] ||(includePool === true ? this.hashedPoolPositions[lane.id] : undefined); + if (hashed) { + offset.x -= hashed.upperLeft().x; + offset.y -= hashed.upperLeft().y; + } else { + return {x:0,y:0} + } + return offset; + }, + + getNextLane: function(shape){ + while(shape && !shape.getStencil().id().endsWith("Lane")){ + if (shape instanceof ORYX.Core.Canvas) { + return null; + } + shape = shape.parent; + } + return shape; + }, + + getParentPool: function(shape){ + while(shape && !shape.getStencil().id().endsWith("Pool")){ + if (shape instanceof ORYX.Core.Canvas) { + return null; + } + shape = shape.parent; + } + return shape; + }, + + updateDockers: function(lanes, pool){ + + var absPool = pool.absoluteBounds(), movedShapes = []; + var oldPool = (this.hashedPoolPositions[pool.id]||absPool).clone(); + + var i=-1, j=-1, k=-1, l=-1, docker; + var dockers = {}; + + while (++i < lanes.length) { + + if (!this.hashedBounds[pool.id][lanes[i].id]) { + continue; + } + + var isScaled = lanes[i].isScaled; + delete lanes[i].isScaled; + var children = lanes[i].getChildNodes(); + var absBounds = lanes[i].absoluteBounds(); + var oldBounds = (this.hashedBounds[pool.id][lanes[i].id]||absBounds); + //oldBounds.moveBy((absBounds.upperLeft().x-lanes[i].bounds.upperLeft().x), (absBounds.upperLeft().y-lanes[i].bounds.upperLeft().y)); + var offset = this.getOffset(lanes[i], true, pool); + var xOffsetDepth = 0; + + var depth = this.getDepth(lanes[i], pool); + if ( this.hashedLaneDepth[lanes[i].id] !== undefined && this.hashedLaneDepth[lanes[i].id] !== depth) { + xOffsetDepth = (this.hashedLaneDepth[lanes[i].id] - depth) * 30; + offset.x += xOffsetDepth; + } + + j=-1; + + while (++j < children.length) { + + if (xOffsetDepth && !children[j].getStencil().id().endsWith("Lane")) { + movedShapes.push({xOffset:xOffsetDepth, shape: children[j]}); + children[j].bounds.moveBy(xOffsetDepth, 0); + } + + if (children[j].getStencil().id().endsWith("Subprocess")) { + this.moveChildDockers(children[j], offset); + } + + var edges = [].concat(children[j].getIncomingShapes()) + .concat(children[j].getOutgoingShapes()) + // Remove all edges which are included in the selection from the list + .findAll(function(r){ return r instanceof ORYX.Core.Edge }) + + k=-1; + while (++k < edges.length) { + + if (edges[k].getStencil().id().endsWith("MessageFlow")) { + this.layoutEdges(children[j], [edges[k]], offset); + continue; + } + + l=-1; + while (++l < edges[k].dockers.length) { + + docker = edges[k].dockers[l]; + + if (docker.getDockedShape()||docker.isChanged){ + continue; + } + + + pos = docker.bounds.center(); + + // Check if the modified center included the new position + var isOverLane = oldBounds.isIncluded(pos); + // Check if the original center is over the pool + var isOutSidePool = !oldPool.isIncluded(pos); + var previousIsOverLane = l == 0 ? isOverLane : oldBounds.isIncluded(edges[k].dockers[l-1].bounds.center()); + var nextIsOverLane = l == edges[k].dockers.length-1 ? isOverLane : oldBounds.isIncluded(edges[k].dockers[l+1].bounds.center()); + var off = Object.clone(offset); + + // If the + if (isScaled && isOverLane && this.isResized(lanes[i], this.hashedBounds[pool.id][lanes[i].id])){ + var relY = (pos.y - absBounds.upperLeft().y + off.y); + off.y -= (relY - (relY * (absBounds.height()/oldBounds.height()))); + } + + // Check if the previous dockers docked shape is from this lane + // Otherwise, check if the docker is over the lane OR is outside the lane + // but the previous/next was over this lane + if (isOverLane){ + dockers[docker.id] = {docker: docker, offset:off}; + } + /*else if (l == 1 && edges[k].dockers.length>2 && edges[k].dockers[l-1].isDocked()){ + var dockedLane = this.getNextLane(edges[k].dockers[l-1].getDockedShape()); + if (dockedLane != lanes[i]) + continue; + dockers[docker.id] = {docker: docker, offset:offset}; + } + // Check if the next dockers docked shape is from this lane + else if (l == edges[k].dockers.length-2 && edges[k].dockers.length>2 && edges[k].dockers[l+1].isDocked()){ + var dockedLane = this.getNextLane(edges[k].dockers[l+1].getDockedShape()); + if (dockedLane != lanes[i]) + continue; + dockers[docker.id] = {docker: docker, offset:offset}; + } + + else if (isOutSidePool) { + dockers[docker.id] = {docker: docker, offset:this.getOffset(lanes[i], true, pool)}; + }*/ + + + } + } + + } + } + + // Move the moved children + var MoveChildCommand = ORYX.Core.Command.extend({ + construct: function(state){ + this.state = state; + }, + execute: function(){ + if (this.executed){ + this.state.each(function(s){ + s.shape.bounds.moveBy(s.xOffset, 0); + }); + } + this.executed = true; + }, + rollback: function(){ + this.state.each(function(s){ + s.shape.bounds.moveBy(-s.xOffset, 0); + }); + } + }) + + + // Set dockers + this.facade.executeCommands([new ORYX.Core.MoveDockersCommand(dockers), new MoveChildCommand(movedShapes)]); + + }, + + moveBy: function(pos, offset){ + pos.x += offset.x; + pos.y += offset.y; + return pos; + }, + + getHashedBounds: function(shape){ + return this.currentPool && this.hashedBounds[this.currentPool.id][shape.id] ? this.hashedBounds[this.currentPool.id][shape.id] : shape.absoluteBounds(); + }, + + /** + * Returns a set on all child lanes for the given Shape. If recursive is TRUE, also indirect children will be returned (default is FALSE) + * The set is sorted with first child the lowest y-coordinate and the last one the highest. + * @param {ORYX.Core.Shape} shape + * @param {boolean} recursive + */ + getLanes: function(shape, recursive){ + var namespace = this.getNamespace(); + + // Get all the child lanes + var lanes = shape.getChildNodes(recursive||false).findAll(function(node) { return (node.getStencil().id() === namespace + "Lane"); }); + + // Sort all lanes by there y coordinate + lanes = lanes.sort(function(a, b){ + + // Get y coordinates for upper left and lower right + var auy = Math.round(a.bounds.upperLeft().y); + var buy = Math.round(b.bounds.upperLeft().y); + var aly = Math.round(a.bounds.lowerRight().y); + var bly = Math.round(b.bounds.lowerRight().y); + + var ha = this.getHashedBounds(a); + var hb = this.getHashedBounds(b); + + // Get the old y coordinates + var oauy = Math.round(ha.upperLeft().y); + var obuy = Math.round(hb.upperLeft().y); + var oaly = Math.round(ha.lowerRight().y); + var obly = Math.round(hb.lowerRight().y); + + // If equal, than use the old one + if (auy == buy && aly == bly) { + auy = oauy; buy = obuy; aly = oaly; bly = obly; + } + + if (Math.round(a.bounds.height()-ha.height()) === 0 && Math.round(b.bounds.height()-hb.height()) === 0){ + return auy < buy ? -1 : (auy > buy ? 1: 0); + } + + // Check if upper left and lower right is completely above/below + var above = auy < buy && aly < bly; + var below = auy > buy && aly > bly; + // Check if a is above b including the old values + var slightlyAboveBottom = auy < buy && aly >= bly && oaly < obly; + var slightlyAboveTop = auy >= buy && aly < bly && oauy < obuy; + // Check if a is below b including the old values + var slightlyBelowBottom = auy > buy && aly <= bly && oaly > obly; + var slightlyBelowTop = auy <= buy && aly > bly && oauy > obuy; + + // Return -1 if a is above b, 1 if b is above a, or 0 otherwise + return (above || slightlyAboveBottom || slightlyAboveTop ? -1 : (below || slightlyBelowBottom || slightlyBelowTop ? 1 : 0)) + }.bind(this)); + + // Return lanes + return lanes; + }, + + getNamespace: function() { + if(!this.namespace) { + var stencilsets = this.facade.getStencilSets(); + if(stencilsets.keys()) { + this.namespace = stencilsets.keys()[0]; + } else { + return undefined; + } + } + return this.namespace; + } + }; + + var ResizeLanesCommand = ORYX.Core.Command.extend({ + + construct: function(shape, parent, pool, plugin) { + + this.facade = plugin.facade; + this.plugin = plugin; + this.shape = shape; + this.changes; + + this.pool = pool; + + this.parent = parent; + + + this.shapeChildren = []; + + /* + * The Bounds have to be stored + * separate because they would + * otherwise also be influenced + */ + this.shape.getChildShapes().each(function(childShape) { + this.shapeChildren.push({ + shape: childShape, + bounds: { + a: { + x: childShape.bounds.a.x, + y: childShape.bounds.a.y + }, + b: { + x: childShape.bounds.b.x, + y: childShape.bounds.b.y + } + } + }); + }.bind(this)); + + this.shapeUpperLeft = this.shape.bounds.upperLeft(); + + // If there is no parent, + // correct the abs position with the parents abs. + /*if (!this.shape.parent) { + var pAbs = parent.absoluteXY(); + this.shapeUpperLeft.x += pAbs.x; + this.shapeUpperLeft.y += pAbs.y; + }*/ + this.parentHeight = this.parent.bounds.height(); + + }, + + getLeafLanes: function(lane){ + var childLanes = this.plugin.getLanes(lane).map(function(child){ + return this.getLeafLanes(child); + }.bind(this)).flatten(); + return childLanes.length > 0 ? childLanes : [lane]; + }, + + findNewLane: function(){ + + var lanes = this.plugin.getLanes(this.parent); + + var leafLanes = this.getLeafLanes(this.parent); + /*leafLanes = leafLanes.sort(function(a,b){ + var aupl = a.absoluteXY().y; + var bupl = b.absoluteXY().y; + return aupl < bupl ? -1 : (aupl > bupl ? 1 : 0) + })*/ + this.lane = leafLanes.find(function(l){ return l.bounds.upperLeft().y >= this.shapeUpperLeft.y }.bind(this)) || leafLanes.last(); + this.laneUpperLeft = this.lane.bounds.upperLeft(); + }, + + execute: function() { + + if(this.changes) { + this.executeAgain(); + return; + } + + /* + * Rescue all ChildShapes of the deleted + * Shape into the lane that takes its + * place + */ + + if (!this.lane){ + this.findNewLane(); + } + + if(this.lane) { + + var laUpL = this.laneUpperLeft; + var shUpL = this.shapeUpperLeft; + + var depthChange = this.plugin.getDepth(this.lane, this.parent)-1; + + this.changes = $H({}); + + // Selected lane is BELOW the removed lane + if (laUpL.y >= shUpL.y) { + this.lane.getChildShapes().each(function(childShape) { + + /* + * Cache the changes for rollback + */ + if(!this.changes[childShape.getId()]) { + this.changes[childShape.getId()] = this.computeChanges(childShape, this.lane, this.lane, this.shape.bounds.height()); + } + + childShape.bounds.moveBy(0, this.shape.bounds.height()); + }.bind(this)); + + this.plugin.hashChildShapes(this.lane); + + this.shapeChildren.each(function(shapeChild) { + shapeChild.shape.bounds.set(shapeChild.bounds); + shapeChild.shape.bounds.moveBy((shUpL.x-30)-(depthChange*30), 0); + + /* + * Cache the changes for rollback + */ + if(!this.changes[shapeChild.shape.getId()]) { + this.changes[shapeChild.shape.getId()] = this.computeChanges(shapeChild.shape, this.shape, this.lane, 0); + } + + this.lane.add(shapeChild.shape); + + }.bind(this)); + + this.lane.bounds.moveBy(0, shUpL.y-laUpL.y); + + // Selected lane is ABOVE the removed lane + } else if(shUpL.y > laUpL.y){ + + this.shapeChildren.each(function(shapeChild) { + shapeChild.shape.bounds.set(shapeChild.bounds); + shapeChild.shape.bounds.moveBy((shUpL.x-30)-(depthChange*30), this.lane.bounds.height()); + + /* + * Cache the changes for rollback + */ + if(!this.changes[shapeChild.shape.getId()]) { + this.changes[shapeChild.shape.getId()] = this.computeChanges(shapeChild.shape, this.shape, this.lane, 0); + } + + this.lane.add(shapeChild.shape); + + }.bind(this)); + } + + + + + } + + /* + * Adjust the height of the lanes + */ + // Get the height values + var oldHeight = this.lane.bounds.height(); + var newHeight = this.lane.length === 1 ? this.parentHeight : this.lane.bounds.height() + this.shape.bounds.height(); + + // Set height + this.setHeight(newHeight, oldHeight, this.parent, this.parentHeight, true); + + // Cache all sibling lanes + //this.changes[this.shape.getId()] = this.computeChanges(this.shape, this.parent, this.parent, 0); + this.plugin.getLanes(this.parent).each(function(childLane){ + if(!this.changes[childLane.getId()] && childLane !== this.lane && childLane !== this.shape) { + this.changes[childLane.getId()] = this.computeChanges(childLane, this.parent, this.parent, 0); + } + }.bind(this)) + + // Update + this.update(); + }, + + setHeight: function(newHeight, oldHeight, parent, parentHeight, store){ + + // Set heigh of the lane + this.plugin.setDimensions(this.lane, this.lane.bounds.width(), newHeight); + this.plugin.hashedBounds[this.pool.id][this.lane.id] = this.lane.absoluteBounds(); + + // Adjust child lanes + this.plugin.adjustHeight(this.plugin.getLanes(parent), this.lane); + + if (store === true){ + // Store changes + this.changes[this.shape.getId()] = this.computeChanges(this.shape, parent, parent, 0, oldHeight, newHeight); + } + + // Set parents height + this.plugin.setDimensions(parent, parent.bounds.width(), parentHeight); + + if (parent !== this.pool){ + this.plugin.setDimensions(this.pool, this.pool.bounds.width(), this.pool.bounds.height() + (newHeight-oldHeight)); + } + }, + + update: function(){ + + // Hack to prevent the updating of the dockers + this.plugin.hashedBounds[this.pool.id]["REMOVED"] = true; + // Update + //this.facade.getCanvas().update(); + }, + + rollback: function() { + + var laUpL = this.laneUpperLeft; + var shUpL = this.shapeUpperLeft; + + this.changes.each(function(pair) { + + var parent = pair.value.oldParent; + var shape = pair.value.shape; + var parentHeight = pair.value.parentHeight; + var oldHeight = pair.value.oldHeight; + var newHeight = pair.value.newHeight; + + // Move siblings + if (shape.getStencil().id().endsWith("Lane")){ + shape.bounds.moveTo(pair.value.oldPosition); + } + + // If lane + if(oldHeight) { + this.setHeight(oldHeight, newHeight, parent, parent.bounds.height() + (oldHeight - newHeight)); + if (laUpL.y >= shUpL.y) { + this.lane.bounds.moveBy(0, this.shape.bounds.height()-1); + } + } else { + parent.add(shape); + shape.bounds.moveTo(pair.value.oldPosition); + + } + + + }.bind(this)); + + // Update + //this.update(); + + }, + + executeAgain: function() { + + this.changes.each(function(pair) { + var parent = pair.value.newParent; + var shape = pair.value.shape; + var newHeight = pair.value.newHeight; + var oldHeight = pair.value.oldHeight; + + // If lane + if(newHeight) { + var laUpL = this.laneUpperLeft.y; + var shUpL = this.shapeUpperLeft.y; + + if (laUpL >= shUpL) { + this.lane.bounds.moveBy(0, shUpL - laUpL); + } + this.setHeight(newHeight, oldHeight, parent, parent.bounds.height() + (newHeight-oldHeight)); + } else { + parent.add(shape); + shape.bounds.moveTo(pair.value.newPosition); + } + + }.bind(this)); + + // Update + this.update(); + }, + + computeChanges: function(shape, oldParent, parent, yOffset, oldHeight, newHeight) { + + oldParent = this.changes[shape.getId()] ? this.changes[shape.getId()].oldParent : oldParent; + var oldPosition = this.changes[shape.getId()] ? this.changes[shape.getId()].oldPosition : shape.bounds.upperLeft(); + + var sUl = shape.bounds.upperLeft(); + + var pos = {x: sUl.x, y: sUl.y + yOffset}; + + var changes = { + shape : shape, + parentHeight: oldParent.bounds.height(), + oldParent : oldParent, + oldPosition : oldPosition, + oldHeight : oldHeight, + newParent : parent, + newPosition : pos, + newHeight : newHeight + }; + + return changes; + } + + }); + + + ORYX.Plugins.BPMN2_0 = ORYX.Plugins.AbstractPlugin.extend(ORYX.Plugins.BPMN2_0); + +}() \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/editor/oryx.js b/src/main/resources/static/activiti-editor/editor-app/editor/oryx.js new file mode 100644 index 0000000..1ddaab6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/editor/oryx.js @@ -0,0 +1,14249 @@ +/** + * Copyright (c) 2006 + * + * Philipp Berger, Martin Czuchra, Gero Decker, Ole Eckermann, Lutz Gericke, + * Alexander Hold, Alexander Koglin, Oliver Kopp, Stefan Krumnow, + * Matthias Kunze, Philipp Maschke, Falko Menge, Christoph Neijenhuis, + * Hagen Overdick, Zhen Peng, Nicolas Peters, Kerstin Pfitzner, Daniel Polak, + * Steffen Ryll, Kai Schlichting, Jan-Felix Schwarz, Daniel Taschik, + * Willi Tscheschner, Bj??rn Wagner, Sven Wagner-Boysen, Matthias Weidlich + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + **/ +if (!ORYX) { + var ORYX = {} +} +ORYX.Utils = { + getParamFromUrl: function (b) { + b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var a = "[\\?&]" + b + "=([^&#]*)"; + var d = new RegExp(a); + var c = d.exec(window.location.href); + if (c == null) { + return null + } else { + return c[1] + } + }, adjustLightness: function () { + return arguments[0] + }, adjustGradient: function (c, a) { + if (ORYX.CONFIG.DISABLE_GRADIENT && c) { + var b = a.getAttributeNS(null, "stop-color") || "#ffffff"; + $A(c.getElementsByTagName("stop")).each(function (d) { + if (d == a) { + return + } + d.setAttributeNS(null, "stop-color", b) + }) + } + } +}; +XMLNS = { + ATOM: "http://www.w3.org/2005/Atom", + XHTML: "http://www.w3.org/1999/xhtml", + ERDF: "http://purl.org/NET/erdf/profile", + RDFS: "http://www.w3.org/2000/01/rdf-schema#", + RDF: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + RAZIEL: "http://b3mn.org/Raziel", + SCHEMA: "" +}; +var Kickstart = { + started: false, callbacks: [], alreadyLoaded: [], PATH: "", load: function () { + Kickstart.kick() + }, kick: function () { + if (!Kickstart.started) { + Kickstart.started = true; + Kickstart.callbacks.each(function (a) { + window.setTimeout(a, 1) + }) + } + }, register: function (callback) { + with (Kickstart) { + if (started) { + window.setTimeout(callback, 1) + } else { + Kickstart.callbacks.push(callback) + } + } + }, require: function (a) { + if (Kickstart.alreadyLoaded.member(a)) { + return false + } + return Kickstart.include(a) + }, include: function (a) { + var b = document.getElementsByTagNameNS(XMLNS.XHTML, "head")[0]; + var c = document.createElementNS(XMLNS.XHTML, "script"); + c.setAttributeNS(XMLNS.XHTML, "type", "text/javascript"); + c.src = Kickstart.PATH + a; + b.appendChild(c); + Kickstart.alreadyLoaded.push(a); + return true + } +}; +Event.observe(window, "load", Kickstart.load); +var ERDF = { + LITERAL: 1, + RESOURCE: 2, + DELIMITERS: [".", "-"], + HASH: "#", + HYPHEN: "-", + schemas: [], + callback: undefined, + log: undefined, + init: function (a) { + ERDF.callback = a; + ERDF.registerSchema("schema", XMLNS.SCHEMA); + ERDF.registerSchema("rdfs", XMLNS.RDFS) + }, + run: function () { + return ERDF._checkProfile() && ERDF.parse() + }, + parse: function () { + ERDF.__startTime = new Date(); + var b = document.getElementsByTagNameNS(XMLNS.XHTML, "body"); + var c = {type: ERDF.RESOURCE, value: ""}; + var a = ERDF._parseDocumentMetadata() && ERDF._parseFromTag(b[0], c); + ERDF.__stopTime = new Date(); + var d = (ERDF.__stopTime - ERDF.__startTime) / 1000; + return a + }, + _parseDocumentMetadata: function () { + var b = document.getElementsByTagNameNS(XMLNS.XHTML, "head"); + var a = b[0].getElementsByTagNameNS(XMLNS.XHTML, "link"); + var c = b[0].getElementsByTagNameNS(XMLNS.XHTML, "meta"); + $A(a).each(function (e) { + var d = e.getAttribute("rel"); + var g = e.getAttribute("rev"); + var f = e.getAttribute("href"); + ERDF._parseTriplesFrom(ERDF.RESOURCE, "", d, ERDF.RESOURCE, f); + ERDF._parseTriplesFrom(ERDF.RESOURCE, f, g, ERDF.RESOURCE, "") + }); + $A(c).each(function (f) { + var e = f.getAttribute("name"); + var d = f.getAttribute("content"); + ERDF._parseTriplesFrom(ERDF.RESOURCE, "", e, ERDF.LITERAL, d) + }); + return true + }, + _parseFromTag: function (c, k, d) { + if (!c || !c.namespaceURI || c.namespaceURI != XMLNS.XHTML) { + return + } + if (!d) { + d = 0 + } + var a = c.getAttribute("id"); + if (c.nodeName.endsWith(":a") || c.nodeName == "a") { + var h = c.getAttribute("rel"); + var e = c.getAttribute("rev"); + var n = c.getAttribute("href"); + var m = c.getAttribute("title"); + var g = c.textContent; + ERDF._parseTriplesFrom(k.type, k.value, h, ERDF.RESOURCE, n, function (p) { + var o = m ? m : g; + ERDF._parseTriplesFrom(p.object.type, p.object.value, "rdfs.label", ERDF.LITERAL, o) + }); + ERDF._parseTriplesFrom(k.type, k.value, e, ERDF.RESOURCE, ""); + ERDF._parseTypeTriplesFrom(k.type, k.value, h) + } else { + if (c.nodeName.endsWith(":img") || c.nodeName == "img") { + var h = c.getAttribute("class"); + var n = c.getAttribute("src"); + var f = c.getAttribute("alt"); + ERDF._parseTriplesFrom(k.type, k.value, h, ERDF.RESOURCE, n, function (p) { + var o = f; + ERDF._parseTriplesFrom(p.object.type, p.object.value, "rdfs.label", ERDF.LITERAL, o) + }) + } + } + var h = c.getAttribute("class"); + var m = c.getAttribute("title"); + var g = c.textContent; + var l = m ? m : g; + ERDF._parseTriplesFrom(k.type, k.value, h, ERDF.LITERAL, l); + if (a) { + k = {type: ERDF.RESOURCE, value: ERDF.HASH + a} + } + ERDF._parseTypeTriplesFrom(k.type, k.value, h); + var b = c.childNodes; + if (b) { + $A(b).each(function (o) { + if (o.nodeType == o.ELEMENT_NODE) { + ERDF._parseFromTag(o, k, d + 1) + } + }) + } + }, + _parseTriplesFrom: function (c, e, d, a, b, f) { + if (!d) { + return + } + d.toLowerCase().split(" ").each(function (h) { + var g = ERDF.schemas.find(function (l) { + return false || ERDF.DELIMITERS.find(function (m) { + return h.startsWith(l.prefix + m) + }) + }); + if (g && b) { + h = h.substring(g.prefix.length + 1, h.length); + var k = ERDF.registerTriple(new ERDF.Resource(e), { + prefix: g.prefix, + name: h + }, (a == ERDF.RESOURCE) ? new ERDF.Resource(b) : new ERDF.Literal(b)); + if (f) { + f(k) + } + } + }) + }, + _parseTypeTriplesFrom: function (a, c, b, d) { + if (!b) { + return + } + b.toLowerCase().split(" ").each(function (f) { + var e = ERDF.schemas.find(function (h) { + return false || ERDF.DELIMITERS.find(function (k) { + return f.startsWith(ERDF.HYPHEN + h.prefix + k) + }) + }); + if (e && c) { + f = f.substring(e.prefix.length + 2, f.length); + var g = ERDF.registerTriple((a == ERDF.RESOURCE) ? new ERDF.Resource(c) : new ERDF.Literal(c), { + prefix: "rdf", + name: "type" + }, new ERDF.Resource(e.namespace + f)); + if (d) { + d(g) + } + } + }) + }, + _checkProfile: function () { + var b = document.getElementsByTagNameNS(XMLNS.XHTML, "head"); + var a = b[0].getAttribute("profile"); + var c = false; + if (a && a.split(" ").member(XMLNS.ERDF)) { + return true + } else { + return false + } + }, + __stripHashes: function (a) { + return (a && (typeof a.substring == "function") && a.substring(0, 1) == "#") ? a.substring(1, a.length) : a + }, + registerSchema: function (b, a) { + ERDF.schemas.push({prefix: b, namespace: a}) + }, + registerTriple: function (c, a, b) { + if (a.prefix.toLowerCase() == "schema") { + this.registerSchema(a.name, b.value) + } + var d = new ERDF.Triple(c, a, b); + ERDF.callback(d); + return d + }, + __enhanceObject: function () { + this.isResource = function () { + return this.type == ERDF.RESOURCE + }; + this.isLocal = function () { + return this.isResource() && this.value.startsWith("#") + }; + this.isCurrentDocument = function () { + return this.isResource() && (this.value == "") + }; + this.getId = function () { + return this.isLocal() ? ERDF.__stripHashes(this.value) : false + }; + this.isLiteral = function () { + return this.type == ERDF.LIITERAL + } + }, + serialize: function (a) { + if (!a) { + return "" + } else { + if (a.constructor == String) { + return a + } else { + if (a.constructor == Boolean) { + return a ? "true" : "false" + } else { + return a.toString() + } + } + } + } +}; +ERDF.Triple = function (c, a, b) { + this.subject = c; + this.predicate = a; + this.object = b; + this.toString = function () { + return "[ERDF.Triple] " + this.subject.toString() + " " + this.predicate.prefix + ":" + this.predicate.name + " " + this.object.toString() + } +}; +ERDF.Resource = function (a) { + this.type = ERDF.RESOURCE; + this.value = a; + ERDF.__enhanceObject.apply(this); + this.toString = function () { + return "<" + this.value + ">" + } +}; +ERDF.Literal = function (a) { + this.type = ERDF.LITERAL; + this.value = ERDF.serialize(a); + ERDF.__enhanceObject.apply(this); + this.toString = function () { + return '"' + this.value + '"' + } +}; +var USE_ASYNCHRONOUS_REQUESTS = true; +var DISCARD_UNUSED_TRIPLES = true; +var PREFER_SPANS_OVER_DIVS = true; +var PREFER_TITLE_OVER_TEXTNODE = false; +var RESOURCE_ID_PREFIX = "resource"; +var SHOW_DEBUG_ALERTS_WHEN_SAVING = false; +var SHOW_EXTENDED_DEBUG_INFORMATION = false; +var USE_ARESS_WORKAROUNDS = true; +var RESOURCE_CREATED = 1; +var RESOURCE_REMOVED = 2; +var RESOURCE_SAVED = 4; +var RESOURCE_RELOADED = 8; +var RESOURCE_SYNCHRONIZED = 16; +var TRIPLE_REMOVE = 1; +var TRIPLE_ADD = 2; +var TRIPLE_RELOAD = 4; +var TRIPLE_SAVE = 8; +var PROCESSDATA_REF = "processdata"; +var DataManager = { + init: function () { + ERDF.init(DataManager._registerTriple); + DataManager.__synclocal() + }, _triples: [], _registerTriple: function (a) { + DataManager._triples.push(a) + }, __synclocal: function () { + DataManager._triples = []; + ERDF.run() + }, __synchronizeShape: function (a) { + var c = ResourceManager.getResource(a.resourceId); + var b = a.serialize(); + b.each(function (d) { + var f = (d.type == "resource"); + var e = new ERDF.Triple(new ERDF.Resource(a.resourceId), { + prefix: d.prefix, + name: d.name + }, f ? new ERDF.Resource(d.value) : new ERDF.Literal(d.value)); + DataManager.setObject(e) + }); + return c + }, __storeShape: function (a) { + var b = DataManager.__synchronizeShape(a); + b.save() + }, __forceExistance: function (a) { + if (!$(a.resourceId)) { + if (!$$("." + PROCESSDATA_REF)[0]) { + DataManager.graft(XMLNS.XHTML, document.getElementsByTagNameNS(XMLNS.XHTML, "body").item(0), ["div", { + "class": PROCESSDATA_REF, + style: "display:none;" + }]) + } + DataManager.graft(XMLNS.XHTML, $$("." + PROCESSDATA_REF)[0], ["div", { + id: a.resourceId, + "class": (a instanceof ORYX.Core.Canvas) ? "-oryx-canvas" : undefined + }]) + } else { + var c = $(a.resourceId); + var b = $A(c.childNodes); + b.each(function (d) { + c.removeChild(d) + }) + } + }, __persistShape: function (b) { + var d = b.serialize(); + var a = []; + var c = new ERDF.Resource(b.resourceId); + DataManager.removeTriples(DataManager.query(c, undefined, undefined)); + d.each(function (f) { + var e = (f.type == "resource") ? new ERDF.Resource(f.value) : new ERDF.Literal(f.value); + DataManager.addTriple(new ERDF.Triple(c, {prefix: f.prefix, name: f.name}, e)) + }) + }, __persistDOM: function (d) { + var c = d.getCanvas(); + var b = c.getChildShapes(true); + var a = ""; + b.each(function (e) { + DataManager.__forceExistance(e) + }); + DataManager.__renderCanvas(d); + a += DataManager.serialize($(ERDF.__stripHashes(d.getCanvas().resourceId)), true); + b.each(function (e) { + DataManager.__persistShape(e); + a += DataManager.serialize($(ERDF.__stripHashes(e.resourceId)), true) + }); + return a + }, __renderCanvas: function (e) { + var b = e.getCanvas(); + var d = e.getStencilSets(); + var a = b.getChildShapes(true); + DataManager.__forceExistance(b); + DataManager.__persistShape(b); + var c = new ERDF.Resource(b.resourceId); + DataManager.removeTriples(DataManager.query(c, undefined, undefined)); + DataManager.addTriple(new ERDF.Triple(c, {prefix: "oryx", name: "mode"}, new ERDF.Literal("writable"))); + DataManager.addTriple(new ERDF.Triple(c, {prefix: "oryx", name: "mode"}, new ERDF.Literal("fullscreen"))); + d.values().each(function (f) { + DataManager.addTriple(new ERDF.Triple(c, { + prefix: "oryx", + name: "stencilset" + }, new ERDF.Resource(f.source().replace(/&/g, "%26")))); + DataManager.addTriple(new ERDF.Triple(c, { + prefix: "oryx", + name: "ssnamespace" + }, new ERDF.Resource(f.namespace()))); + f.extensions().keys().each(function (g) { + DataManager.addTriple(new ERDF.Triple(c, {prefix: "oryx", name: "ssextension"}, new ERDF.Literal(g))) + }) + }); + a.each(function (f) { + DataManager.addTriple(new ERDF.Triple(c, { + prefix: "oryx", + name: "render" + }, new ERDF.Resource("#" + f.resourceId))) + }) + }, __counter: 0, __provideId: function () { + while ($(RESOURCE_ID_PREFIX + DataManager.__counter)) { + DataManager.__counter++ + } + return RESOURCE_ID_PREFIX + DataManager.__counter + }, serializeDOM: function (a) { + return DataManager.__persistDOM(a) + }, syncGlobal: function (a) { + return DataManager.__syncglobal(a) + }, __syncglobal: function (c) { + var b = c.getCanvas(); + var a = b.getChildShapes(true); + a.select(function (d) { + return !($(d.resourceId)) + }).each(function (d) { + if (USE_ARESS_WORKAROUNDS) { + var e = d.properties["raziel-type"]; + var g = '<div xmlns="http://www.w3.org/1999/xhtml"><span class="raziel-type">' + e + "</span></div>"; + var f = ResourceManager.__createResource(g); + d.resourceId = f.id() + } else { + var f = ResourceManager.__createResource(); + d.resourceId = f.id() + } + }); + a.each(function (d) { + DataManager.__storeShape(d) + }) + }, serialize: function (f, b) { + if (f.nodeType == f.ELEMENT_NODE) { + var e = $A(f.childNodes); + var c = $A(f.attributes); + var d = new String(f.getAttribute("class")); + var g = d.split(" ").member("transient"); + if (g) { + return "" + } + var a = "<" + f.nodeName; + if (!b) { + a += ' xmlns="' + (f.namespaceURI ? f.namespaceURI : XMLNS.XHTML) + '" xmlns:oryx="http://oryx-editor.org"' + } + c.each(function (h) { + a += " " + h.nodeName + '="' + h.nodeValue + '"' + }); + if (e.length == 0) { + a += "/>" + } else { + a += ">"; + e.each(function (h) { + a += DataManager.serialize(h, true) + }); + a += "</" + f.nodeName + ">" + } + return a + } else { + if (f.nodeType == f.TEXT_NODE) { + return f.nodeValue + } + } + }, addTriple: function (c) { + if (!c.subject.type == ERDF.LITERAL) { + throw"Cannot add the triple " + c.toString() + " because the subject is not a resource." + } + var a = ERDF.__stripHashes(c.subject.value); + var b = $(a); + if (!b) { + throw"Cannot add the triple " + c.toString() + ' because the subject "' + a + '" is not in the document.' + } + if (c.object.type == ERDF.LITERAL) { + DataManager.graft(XMLNS.XHTML, b, ["span", {"class": (c.predicate.prefix + "-" + c.predicate.name)}, c.object.value.escapeHTML()]) + } else { + DataManager.graft(XMLNS.XHTML, b, ["a", { + rel: (c.predicate.prefix + "-" + c.predicate.name), + href: c.object.value + }]) + } + return true + }, removeTriples: function (b) { + var a = b.select(function (c) { + return DataManager.__removeTriple(c) + }); + return a + }, removeTriple: function (b) { + var a = DataManager.__removeTriple(b); + return a + }, __removeTriple: function (d) { + if (!d.subject.type == ERDF.LITERAL) { + throw"Cannot remove the triple " + d.toString() + " because the subject is not a resource." + } + var b = ERDF.__stripHashes(d.subject.value); + var c = $(b); + if (!c) { + throw"Cannot remove the triple " + d.toString() + " because the subject is not in the document." + } + if (d.object.type == ERDF.LITERAL) { + var a = DataManager.__removeTripleRecursively(d, c); + return a + } + }, __removeTripleRecursively: function (e, d) { + if (d.nodeType != d.ELEMENT_NODE) { + return false + } + var b = new String(d.getAttribute("class")); + var a = $A(d.childNodes); + if (b.include(e.predicate.prefix + "-" + e.predicate.name)) { + var c = d.textContent; + if ((e.object.type == ERDF.LITERAL) && (e.object.value == c)) { + d.parentNode.removeChild(d) + } + return true + } else { + a.each(function (f) { + DataManager.__removeTripleRecursively(e, f) + }); + return false + } + }, graft: function (g, f, d, l) { + l = (l || (f && f.ownerDocument) || document); + var h; + if (d === undefined) { + echo("Can't graft an undefined value") + } else { + if (d.constructor == String) { + h = l.createTextNode(d) + } else { + for (var c = 0; c < d.length; c++) { + if (c === 0 && d[c].constructor == String) { + var a = d[c].match(/^([a-z][a-z0-9]*)\.([^\s\.]+)$/i); + if (a) { + h = l.createElementNS(g, a[1]); + h.setAttributeNS(null, "class", a[2]); + continue + } + a = d[c].match(/^([a-z][a-z0-9]*)$/i); + if (a) { + h = l.createElementNS(g, a[1]); + continue + } + h = l.createElementNS(g, "span"); + h.setAttribute(null, "class", "namelessFromLOL") + } + if (d[c] === undefined) { + echo("Can't graft an undefined value in a list!") + } else { + if (d[c].constructor == String || d[c].constructor == Array) { + this.graft(g, h, d[c], l) + } else { + if (d[c].constructor == Number) { + this.graft(g, h, d[c].toString(), l) + } else { + if (d[c].constructor == Object) { + for (var b in d[c]) { + h.setAttributeNS(null, b, d[c][b]) + } + } else { + if (d[c].constructor == Boolean) { + this.graft(g, h, d[c] ? "true" : "false", l) + } else { + throw"Object " + d[c] + " is inscrutable as an graft arglet." + } + } + } + } + } + } + } + } + if (f) { + f.appendChild(h) + } + return Element.extend(h) + }, setObject: function (a) { + var b = DataManager.query(a.subject, a.predicate, undefined); + DataManager.removeTriples(b); + DataManager.addTriple(a); + return true + }, query: function (c, a, b) { + return DataManager._triples.select(function (e) { + var d = ((c) ? (e.subject.type == c.type) && (e.subject.value == c.value) : true); + if (a) { + d = d && ((a.prefix) ? (e.predicate.prefix == a.prefix) : true); + d = d && ((a.name) ? (e.predicate.name == a.name) : true) + } + d = d && ((b) ? (e.object.type == b.type) && (e.object.value == b.value) : true); + return d + }) + } +}; +Kickstart.register(DataManager.init); + +function assert(b, a) { + if (!b) { + throw a + } +} + +function DMCommand(a, b) { + this.action = a; + this.triple = b; + this.toString = function () { + return "Command(" + a + ", " + b + ")" + } +} + +function DMCommandHandler(a) { + this.__setNext = function (c) { + var b = this.__next; + this.__next = a; + return b ? b : true + }; + this.__setNext(a); + this.__invokeNext = function (b) { + return this.__next ? this.__next.handle(b) : false + }; + this.handle = function (b) { + return this.process(b) ? true : this.__invokeNext(b) + }; + this.process = function (b) { + return false + } +} + +function MetaTagHandler(next) { + DMCommandHandler.apply(this, [next]); + this.process = function (command) { + with (command.triple) { + if (!((subject instanceof ERDF.Resource) && (subject.isCurrentDocument()) && (object instanceof ERDF.Literal))) { + return false + } + } + } +} + +var chain = new MetaTagHandler(); +var command = new DMCommand(TRIPLE_ADD, new ERDF.Triple(new ERDF.Resource(""), "rdf:tool", new ERDF.Literal(""))); +ResourceManager = { + __corrupt: false, + __latelyCreatedResource: undefined, + __listeners: $H(), + __token: 1, + addListener: function (d, b) { + if (!(d instanceof Function)) { + throw"Resource event listener is not a function!" + } + if (!(b)) { + throw"Invalid mask for resource event listener registration." + } + var a = {listener: d, mask: b}; + var c = ResourceManager.__token++; + ResourceManager.__listeners[c] = a; + return c + }, + removeListener: function (a) { + return ResourceManager.__listners.remove(a) + }, + __Event: function (a, b) { + this.action = a; + this.resourceId = b + }, + __dispatchEvent: function (a) { + ResourceManager.__listeners.values().each(function (b) { + if (a.action & b.mask) { + return b.listener(a) + } + }) + }, + getResource: function (c) { + c = ERDF.__stripHashes(c); + var b = DataManager.query(new ERDF.Resource("#" + c), {prefix: "raziel", name: "entry"}, undefined); + if ((b.length == 1) && (b[0].object.isResource())) { + var a = b[0].object.value; + return new ResourceManager.__Resource(c, a) + } + throw ("Resource with id " + c + " not recognized as such. " + ((b.length > 1) ? " There is more than one raziel:entry URL." : " There is no raziel:entry URL.")); + return false + }, + __createResource: function (e) { + var d = DataManager.query(new ERDF.Resource(""), {prefix: "raziel", name: "collection"}, undefined); + if ((d.length == 1) && (d[0].object.isResource())) { + var b = d[0].object.value; + var c = undefined; + var a = e ? e : '<div xmlns="http://www.w3.org/1999/xhtml"></div>'; + ResourceManager.__request("POST", b, a, function () { + var f = (this.responseXML); + var h = f.childNodes[0]; + var g = h.getAttribute("id"); + if (!$$("." + PROCESSDATA_REF)[0]) { + DataManager.graft(XMLNS.XHTML, document.getElementsByTagNameNS(XMLNS.XHTML, "body").item(0), ["div", { + "class": PROCESSDATA_REF, + style: "display:none;" + }]) + } + $$("." + PROCESSDATA_REF)[0].appendChild(h.cloneNode(true)); + DataManager.__synclocal(); + c = new ResourceManager.getResource(g); + ResourceManager.__resourceActionSucceeded(this, RESOURCE_CREATED, undefined) + }, function () { + ResourceManager.__resourceActionFailed(this, RESOURCE_CREATED, undefined) + }, false); + return c + } + throw"Could not create resource! raziel:collection URL is missing!"; + return false + }, + __Resource: function (b, a) { + this.__id = b; + this.__url = a; + this.id = function () { + return this.__id + }; + this.url = function () { + return this.__url + }; + this.reload = function () { + var d = this.__url; + var c = this.__id; + ResourceManager.__request("GET", d, null, function () { + ResourceManager.__resourceActionSucceeded(this, RESOURCE_RELOADED, c) + }, function () { + ResourceManager.__resourceActionFailed(this, RESURCE_RELOADED, c) + }, USE_ASYNCHRONOUS_REQUESTS) + }; + this.save = function (e) { + var d = this.__url; + var c = this.__id; + data = DataManager.serialize($(c)); + ResourceManager.__request("PUT", d, data, function () { + ResourceManager.__resourceActionSucceeded(this, e ? RESOURCE_SAVED | RESOURCE_SYNCHRONIZED : RESOURCE_SAVED, c) + }, function () { + ResourceManager.__resourceActionFailed(this, e ? RESOURCE_SAVED | RESOURCE_SYNCHRONIZED : RESOURCE.SAVED, c) + }, USE_ASYNCHRONOUS_REQUESTS) + }; + this.remove = function () { + var d = this.__url; + var c = this.__id; + ResourceManager.__request("DELETE", d, null, function () { + ResourceManager.__resourceActionSucceeded(this, RESOURCE_REMOVED, c) + }, function () { + ResourceManager.__resourceActionFailed(this, RESOURCE_REMOVED, c) + }, USE_ASYNCHRONOUS_REQUESTS) + } + }, + request: function (c, a) { + var b = {method: "get", asynchronous: true, parameters: {}}; + Object.extend(b, a || {}); + var d = Hash.toQueryString(b.parameters); + if (d) { + c += (c.include("?") ? "&" : "?") + d + } + return ResourceManager.__request(b.method, c, b.data, (b.onSuccess instanceof Function ? function () { + b.onSuccess(this) + } : undefined), (b.onFailure instanceof Function ? function () { + b.onFailure(this) + } : undefined), b.asynchronous && USE_ASYNCHRONOUS_REQUESTS, b.headers) + }, + __request: function (a, b, f, n, m, d, c) { + var g = Try.these(function () { + return new XMLHttpRequest() + }, function () { + return new ActiveXObject("Msxml2.XMLHTTP") + }, function () { + return new ActiveXObject("Microsoft.XMLHTTP") + }); + if (!g) { + if (!this.__corrupt) { + throw"This browser does not provide any AJAX functionality. You will not be able to use the software provided with the page you are viewing. Please consider installing appropriate extensions." + } + this.__corrupt = true; + return false + } + if (n instanceof Function) { + g.onload = n + } + if (m instanceof Function) { + g.onerror = m + } + var k = $H(c); + k.keys().each(function (e) { + g.setRequestHeader(e, k[e]) + }); + try { + if (SHOW_DEBUG_ALERTS_WHEN_SAVING) { + alert(a + " " + b + "\n" + SHOW_EXTENDED_DEBUG_INFORMATION ? f : "") + } + g.open(a, b, !d ? false : true); + g.send(f) + } catch (l) { + return false + } + return true + }, + __resourceActionSucceeded: function (g, c, f) { + var a = g.status; + var b = g.responseText; + if (SHOW_DEBUG_ALERTS_WHEN_SAVING) { + alert(a + " " + url + "\n" + SHOW_EXTENDED_DEBUG_INFORMATION ? data : "") + } + if (a >= 300) { + throw"The server responded with an error: " + a + "\n" + (SHOW_EXTENDED_DEBUG_INFORMATION ? +data : "If you need additional information here, including the data sent by the server, consider setting SHOW_EXTENDED_DEBUG_INFORMATION to true.") + } + switch (c) { + case RESOURCE_REMOVED: + var b = (g.responseXML); + var e = b.childNodes[0]; + var f = e.getAttribute("id"); + var d = document.getElementById(f); + d.parentNode.removeChild(d); + break; + case RESOURCE_CREATED: + break; + case RESOURCE_SAVED | RESOURCE_SYNCHRONIZED: + DataManager.__synclocal(); + case RESOURCE_SAVED: + break; + case RESOURCE_RELOADED: + var b = (g.responseXML); + var e = b.childNodes[0]; + var f = e.getAttribute("id"); + var d = document.getElementById(f); + d.parentNode.removeChild(d); + if (!$$(PROCESSDATA_REF)[0]) { + DataManager.graft(XMLNS.XHTML, document.getElementsByTagNameNS(XMLNS.XHTML, "body").item(0), ["div", { + "class": PROCESSDATA_REF, + style: "display:none;" + }]) + } + $$(PROCESSDATA_REF)[0].appendChild(e.cloneNode(true)); + DataManager.__synclocal(); + break; + default: + DataManager.__synclocal() + } + ResourceManager.__dispatchEvent(new ResourceManager.__Event(c, f)) + }, + __resourceActionFailed: function (c, a, b) { + throw"Fatal: Resource action failed. There is something horribly wrong with either the server, the transport protocol or your online status. Sure you're online?" + } +}; +var Clazz = function () { +}; +Clazz.prototype.construct = function () { +}; +Clazz.extend = function (e) { + var a = function () { + if (arguments[0] !== Clazz) { + this.construct.apply(this, arguments) + } + }; + var d = new this(Clazz); + var b = this.prototype; + for (var f in e) { + var c = e[f]; + if (c instanceof Function) { + c.$ = b + } + d[f] = c + } + a.prototype = d; + a.extend = this.extend; + return a +}; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.CONFIG) { + ORYX.CONFIG = {} +} +ORYX.CONFIG.ROOT_PATH = "editor/"; +ORYX.CONFIG.EXPLORER_PATH = "explorer"; +ORYX.CONFIG.LIBS_PATH = "libs"; +ORYX.CONFIG.SERVER_HANDLER_ROOT = "service"; +ORYX.CONFIG.SERVER_EDITOR_HANDLER = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor"; +ORYX.CONFIG.SERVER_MODEL_HANDLER = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/model"; +ORYX.CONFIG.STENCILSET_HANDLER = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor_stencilset?embedsvg=true&url=true&namespace="; +ORYX.CONFIG.STENCIL_SETS_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor_stencilset"; +ORYX.CONFIG.PLUGINS_CONFIG = "editor-app/plugins.xml"; +ORYX.CONFIG.SYNTAXCHECKER_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/syntaxchecker"; +ORYX.CONFIG.DEPLOY_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/model/deploy"; +ORYX.CONFIG.MODEL_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/models"; +ORYX.CONFIG.FORM_FLOW_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/formflows"; +ORYX.CONFIG.FORM_FLOW_IMAGE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/formflow"; +ORYX.CONFIG.FORM_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/forms"; +ORYX.CONFIG.FORM_IMAGE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/form"; +ORYX.CONFIG.SUB_PROCESS_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/subprocesses"; +ORYX.CONFIG.SUB_PROCESS_IMAGE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/subprocess"; +ORYX.CONFIG.TEST_SERVICE_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/service/"; +ORYX.CONFIG.SERVICE_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/services"; +ORYX.CONFIG.CONDITION_ELEMENT_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/conditionelements"; +ORYX.CONFIG.VARIABLEDEF_ELEMENT_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/variabledefinitionelements"; +ORYX.CONFIG.VALIDATOR_LIST_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/validators"; +ORYX.CONFIG.SS_EXTENSIONS_FOLDER = ORYX.CONFIG.ROOT_PATH + "stencilsets/extensions/"; +ORYX.CONFIG.SS_EXTENSIONS_CONFIG = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/editor_ssextensions"; +ORYX.CONFIG.ORYX_NEW_URL = "/new"; +ORYX.CONFIG.BPMN_LAYOUTER = ORYX.CONFIG.ROOT_PATH + "bpmnlayouter"; +ORYX.CONFIG.EXPRESSION_METADATA_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/expression-metadata"; +ORYX.CONFIG.DATASOURCE_METADATA_URL = ORYX.CONFIG.SERVER_HANDLER_ROOT + "/datasource-metadata"; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.CONFIG) { + ORYX.CONFIG = {} +} +ORYX.CONFIG.BACKEND_SWITCH = true; +ORYX.CONFIG.PANEL_LEFT_WIDTH = 250; +ORYX.CONFIG.PANEL_RIGHT_COLLAPSED = true; +ORYX.CONFIG.PANEL_RIGHT_WIDTH = 300; +ORYX.CONFIG.APPNAME = "KISBPM"; +ORYX.CONFIG.WEB_URL = "."; +ORYX.CONFIG.BLANK_IMAGE = ORYX.CONFIG.LIBS_PATH + "/ext-2.0.2/resources/images/default/s.gif"; +ORYX.CONFIG.OFFSET_HEADER = 61; +ORYX.CONFIG.SHOW_GRIDLINE = true; +ORYX.CONFIG.MODE_READONLY = "readonly"; +ORYX.CONFIG.MODE_FULLSCREEN = "fullscreen"; +ORYX.CONFIG.WINDOW_HEIGHT = 800; +ORYX.CONFIG.PREVENT_LOADINGMASK_AT_READY = false; +ORYX.CONFIG.PLUGINS_ENABLED = true; +ORYX.CONFIG.PLUGINS_FOLDER = "Plugins/"; +ORYX.CONFIG.BPMN20_SCHEMA_VALIDATION_ON = true; +ORYX.CONFIG.NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +ORYX.CONFIG.NAMESPACE_SVG = "http://www.w3.org/2000/svg"; +ORYX.CONFIG.CANVAS_WIDTH = 1200; +ORYX.CONFIG.CANVAS_HEIGHT = 1050; +ORYX.CONFIG.CANVAS_RESIZE_INTERVAL = 100; +ORYX.CONFIG.CANVAS_MIN_WIDTH = 800; +ORYX.CONFIG.CANVAS_MIN_HEIGHT = 300; +ORYX.CONFIG.SELECTED_AREA_PADDING = 4; +ORYX.CONFIG.CANVAS_BACKGROUND_COLOR = "none"; +ORYX.CONFIG.GRID_DISTANCE = 30; +ORYX.CONFIG.GRID_ENABLED = true; +ORYX.CONFIG.ZOOM_OFFSET = 0.1; +ORYX.CONFIG.DEFAULT_SHAPE_MARGIN = 60; +ORYX.CONFIG.SCALERS_SIZE = 7; +ORYX.CONFIG.MINIMUM_SIZE = 20; +ORYX.CONFIG.MAXIMUM_SIZE = 10000; +ORYX.CONFIG.OFFSET_MAGNET = 15; +ORYX.CONFIG.OFFSET_EDGE_LABEL_TOP = 8; +ORYX.CONFIG.OFFSET_EDGE_LABEL_BOTTOM = 8; +ORYX.CONFIG.OFFSET_EDGE_BOUNDS = 5; +ORYX.CONFIG.COPY_MOVE_OFFSET = 30; +ORYX.CONFIG.BORDER_OFFSET = 14; +ORYX.CONFIG.MAX_NUM_SHAPES_NO_GROUP = 20; +ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER = 30; +ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET = 45; +ORYX.CONFIG.SHAPEMENU_RIGHT = "Oryx_Right"; +ORYX.CONFIG.SHAPEMENU_BOTTOM = "Oryx_Bottom"; +ORYX.CONFIG.SHAPEMENU_LEFT = "Oryx_Left"; +ORYX.CONFIG.SHAPEMENU_TOP = "Oryx_Top"; +ORYX.CONFIG.MORPHITEM_DISABLED = "Oryx_MorphItem_disabled"; +ORYX.CONFIG.TYPE_STRING = "string"; +ORYX.CONFIG.TYPE_BOOLEAN = "boolean"; +ORYX.CONFIG.TYPE_INTEGER = "integer"; +ORYX.CONFIG.TYPE_FLOAT = "float"; +ORYX.CONFIG.TYPE_COLOR = "color"; +ORYX.CONFIG.TYPE_DATE = "date"; +ORYX.CONFIG.TYPE_CHOICE = "choice"; +ORYX.CONFIG.TYPE_URL = "url"; +ORYX.CONFIG.TYPE_DIAGRAM_LINK = "diagramlink"; +ORYX.CONFIG.TYPE_COMPLEX = "complex"; +ORYX.CONFIG.TYPE_MULTIPLECOMPLEX = "multiplecomplex"; +ORYX.CONFIG.TYPE_TEXT = "text"; +ORYX.CONFIG.TYPE_KISBPM_MULTIINSTANCE = "kisbpm-multiinstance"; +ORYX.CONFIG.TYPE_MODEL_LINK = "modellink"; +ORYX.CONFIG.TYPE_FORM_FLOW_LINK = "formflowlink"; +ORYX.CONFIG.TYPE_FORM_LINK = "formlink"; +ORYX.CONFIG.TYPE_SUB_PROCESS_LINK = "subprocesslink"; +ORYX.CONFIG.TYPE_SERVICE_LINK = "servicelink"; +ORYX.CONFIG.TYPE_CONDITIONS = "conditions"; +ORYX.CONFIG.TYPE_VARIABLES = "variables"; +ORYX.CONFIG.TYPE_LISTENER = "listener"; +ORYX.CONFIG.TYPE_EPC_FREQ = "epcfrequency"; +ORYX.CONFIG.TYPE_GLOSSARY_LINK = "glossarylink"; +ORYX.CONFIG.TYPE_EXPRESSION = "expression"; +ORYX.CONFIG.TYPE_DATASOURCE = "datasource"; +ORYX.CONFIG.TYPE_DATASOURCE_MINIMAL = "datasource-minimal"; +ORYX.CONFIG.TYPE_VALIDATORS = "validators"; +ORYX.CONFIG.LABEL_LINE_DISTANCE = 2; +ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT = 12; +ORYX.CONFIG.ENABLE_MORPHMENU_BY_HOVER = false; +ORYX.CONFIG.EDITOR_ALIGN_BOTTOM = 1; +ORYX.CONFIG.EDITOR_ALIGN_MIDDLE = 2; +ORYX.CONFIG.EDITOR_ALIGN_TOP = 4; +ORYX.CONFIG.EDITOR_ALIGN_LEFT = 8; +ORYX.CONFIG.EDITOR_ALIGN_CENTER = 16; +ORYX.CONFIG.EDITOR_ALIGN_RIGHT = 32; +ORYX.CONFIG.EDITOR_ALIGN_SIZE = 48; +ORYX.CONFIG.EVENT_MOUSEDOWN = "mousedown"; +ORYX.CONFIG.EVENT_MOUSEUP = "mouseup"; +ORYX.CONFIG.EVENT_MOUSEOVER = "mouseover"; +ORYX.CONFIG.EVENT_MOUSEOUT = "mouseout"; +ORYX.CONFIG.EVENT_MOUSEMOVE = "mousemove"; +ORYX.CONFIG.EVENT_DBLCLICK = "dblclick"; +ORYX.CONFIG.EVENT_KEYDOWN = "keydown"; +ORYX.CONFIG.EVENT_KEYUP = "keyup"; +ORYX.CONFIG.EVENT_LOADED = "editorloaded"; +ORYX.CONFIG.EVENT_SAVED = "editorSaved"; +ORYX.CONFIG.EVENT_EXECUTE_COMMANDS = "executeCommands"; +ORYX.CONFIG.EVENT_STENCIL_SET_LOADED = "stencilSetLoaded"; +ORYX.CONFIG.EVENT_SELECTION_CHANGED = "selectionchanged"; +ORYX.CONFIG.EVENT_SHAPEADDED = "shapeadded"; +ORYX.CONFIG.EVENT_SHAPEREMOVED = "shaperemoved"; +ORYX.CONFIG.EVENT_PROPERTY_CHANGED = "propertyChanged"; +ORYX.CONFIG.EVENT_DRAGDROP_START = "dragdrop.start"; +ORYX.CONFIG.EVENT_SHAPE_MENU_CLOSE = "shape.menu.close"; +ORYX.CONFIG.EVENT_DRAGDROP_END = "dragdrop.end"; +ORYX.CONFIG.EVENT_RESIZE_START = "resize.start"; +ORYX.CONFIG.EVENT_RESIZE_END = "resize.end"; +ORYX.CONFIG.EVENT_DRAGDOCKER_DOCKED = "dragDocker.docked"; +ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW = "highlight.showHighlight"; +ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE = "highlight.hideHighlight"; +ORYX.CONFIG.EVENT_LOADING_ENABLE = "loading.enable"; +ORYX.CONFIG.EVENT_LOADING_DISABLE = "loading.disable"; +ORYX.CONFIG.EVENT_LOADING_STATUS = "loading.status"; +ORYX.CONFIG.EVENT_OVERLAY_SHOW = "overlay.show"; +ORYX.CONFIG.EVENT_OVERLAY_HIDE = "overlay.hide"; +ORYX.CONFIG.EVENT_ARRANGEMENT_TOP = "arrangement.setToTop"; +ORYX.CONFIG.EVENT_ARRANGEMENT_BACK = "arrangement.setToBack"; +ORYX.CONFIG.EVENT_ARRANGEMENT_FORWARD = "arrangement.setForward"; +ORYX.CONFIG.EVENT_ARRANGEMENT_BACKWARD = "arrangement.setBackward"; +ORYX.CONFIG.EVENT_PROPWINDOW_PROP_CHANGED = "propertyWindow.propertyChanged"; +ORYX.CONFIG.EVENT_LAYOUT_ROWS = "layout.rows"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL = "layout.BPEL"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_VERTICAL = "layout.BPEL.vertical"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_HORIZONTAL = "layout.BPEL.horizontal"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_SINGLECHILD = "layout.BPEL.singlechild"; +ORYX.CONFIG.EVENT_LAYOUT_BPEL_AUTORESIZE = "layout.BPEL.autoresize"; +ORYX.CONFIG.EVENT_AUTOLAYOUT_LAYOUT = "autolayout.layout"; +ORYX.CONFIG.EVENT_UNDO_EXECUTE = "undo.execute"; +ORYX.CONFIG.EVENT_UNDO_ROLLBACK = "undo.rollback"; +ORYX.CONFIG.EVENT_BUTTON_UPDATE = "toolbar.button.update"; +ORYX.CONFIG.EVENT_LAYOUT = "layout.dolayout"; +ORYX.CONFIG.EVENT_GLOSSARY_LINK_EDIT = "glossary.link.edit"; +ORYX.CONFIG.EVENT_GLOSSARY_SHOW = "glossary.show.info"; +ORYX.CONFIG.EVENT_GLOSSARY_NEW = "glossary.show.new"; +ORYX.CONFIG.EVENT_DOCKERDRAG = "dragTheDocker"; +ORYX.CONFIG.EVENT_CANVAS_SCROLL = "canvas.scroll"; +ORYX.CONFIG.EVENT_SHOW_PROPERTYWINDOW = "propertywindow.show"; +ORYX.CONFIG.EVENT_ABOUT_TO_SAVE = "file.aboutToSave"; +ORYX.CONFIG.SELECTION_HIGHLIGHT_SIZE = 5; +ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR = "#4444FF"; +ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR2 = "#9999FF"; +ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_CORNER = "corner"; +ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE = "rectangle"; +ORYX.CONFIG.SELECTION_VALID_COLOR = "#00FF00"; +ORYX.CONFIG.SELECTION_INVALID_COLOR = "#FF0000"; +ORYX.CONFIG.DOCKER_DOCKED_COLOR = "#00FF00"; +ORYX.CONFIG.DOCKER_UNDOCKED_COLOR = "#FF0000"; +ORYX.CONFIG.DOCKER_SNAP_OFFSET = 10; +ORYX.CONFIG.EDIT_OFFSET_PASTE = 10; +ORYX.CONFIG.KEY_CODE_X = 88; +ORYX.CONFIG.KEY_CODE_C = 67; +ORYX.CONFIG.KEY_CODE_V = 86; +ORYX.CONFIG.KEY_CODE_DELETE = 46; +ORYX.CONFIG.KEY_CODE_META = 224; +ORYX.CONFIG.KEY_CODE_BACKSPACE = 8; +ORYX.CONFIG.KEY_CODE_LEFT = 37; +ORYX.CONFIG.KEY_CODE_RIGHT = 39; +ORYX.CONFIG.KEY_CODE_UP = 38; +ORYX.CONFIG.KEY_CODE_DOWN = 40; +ORYX.CONFIG.KEY_Code_enter = 12; +ORYX.CONFIG.KEY_Code_left = 37; +ORYX.CONFIG.KEY_Code_right = 39; +ORYX.CONFIG.KEY_Code_top = 38; +ORYX.CONFIG.KEY_Code_bottom = 40; +ORYX.CONFIG.META_KEY_META_CTRL = "metactrl"; +ORYX.CONFIG.META_KEY_ALT = "alt"; +ORYX.CONFIG.META_KEY_SHIFT = "shift"; +ORYX.CONFIG.KEY_ACTION_DOWN = "down"; +ORYX.CONFIG.KEY_ACTION_UP = "up"; +ORYX.CONFIG.FORM_ROW_WIDTH = 350; +ORYX.CONFIG.FORM_GROUP_MARGIN = 5; +ORYX.CONFIG.FORM_GROUP_EMPTY_HEIGHT = 100; +ORYX.CONFIG.FORM_ELEMENT_ID_PREFIX = "http://b3mn.org/stencilset/xforms"; +ORYX.CONFIG.FORM_ELEMENT_TYPE_ROOT = "http://b3mn.org/stencilset/xforms#XForm"; +ORYX.CONFIG.FORM_ELEMENT_TYPE_GROUP = "http://b3mn.org/stencilset/xforms#Group"; +ORYX.CONFIG.FORM_ELEMENT_TYPE_REPEATING_GROUP = "http://b3mn.org/stencilset/xforms#RepeatingGroup"; +ORYX.CONFIG.FORM_ELEMENT_TYPE_LABEL_FIELD = "http://b3mn.org/stencilset/xforms#LabelField"; + +function printf() { + var a = arguments[0]; + for (var b = 1; b < arguments.length; b++) { + a = a.replace("%" + (b - 1), arguments[b]) + } + return a +} + +var ORYX_LOGLEVEL_TRACE = 5; +var ORYX_LOGLEVEL_DEBUG = 4; +var ORYX_LOGLEVEL_INFO = 3; +var ORYX_LOGLEVEL_WARN = 2; +var ORYX_LOGLEVEL_ERROR = 1; +var ORYX_LOGLEVEL_FATAL = 0; +var ORYX_LOGLEVEL = 3; +var ORYX_CONFIGURATION_DELAY = 100; +var ORYX_CONFIGURATION_WAIT_ATTEMPTS = 10; +if (!ORYX) { + var ORYX = {} +} +ORYX = Object.extend(ORYX, { + PATH: ORYX.CONFIG.ROOT_PATH, + URLS: [], + alreadyLoaded: [], + configrationRetries: 0, + Version: "0.1.1", + availablePlugins: [], + Log: { + __appenders: [{ + append: function (a) { + if (typeof(console) !== "undefined" && console.log !== undefined) { + console.log(a) + } + } + }], trace: function () { + if (ORYX_LOGLEVEL >= ORYX_LOGLEVEL_TRACE) { + ORYX.Log.__log("TRACE", arguments) + } + }, debug: function () { + if (ORYX_LOGLEVEL >= ORYX_LOGLEVEL_DEBUG) { + ORYX.Log.__log("DEBUG", arguments) + } + }, info: function () { + if (ORYX_LOGLEVEL >= ORYX_LOGLEVEL_INFO) { + ORYX.Log.__log("INFO", arguments) + } + }, warn: function () { + if (ORYX_LOGLEVEL >= ORYX_LOGLEVEL_WARN) { + ORYX.Log.__log("WARN", arguments) + } + }, error: function () { + if (ORYX_LOGLEVEL >= ORYX_LOGLEVEL_ERROR) { + ORYX.Log.__log("ERROR", arguments) + } + }, fatal: function () { + if (ORYX_LOGLEVEL >= ORYX_LOGLEVEL_FATAL) { + ORYX.Log.__log("FATAL", arguments) + } + }, __log: function (c, a) { + a[0] = (new Date()).getTime() + " " + c + " " + a[0]; + var b = printf.apply(null, a); + ORYX.Log.__appenders.each(function (d) { + d.append(b) + }) + }, addAppender: function (a) { + ORYX.Log.__appenders.push(a) + } + }, + load: function () { + ORYX.Log.debug("Oryx begins loading procedure."); + if ((typeof Prototype == "undefined") || (typeof Element == "undefined") || (typeof Element.Methods == "undefined") || parseFloat(Prototype.Version.split(".")[0] + "." + Prototype.Version.split(".")[1]) < 1.5) { + throw ("Application requires the Prototype JavaScript framework >= 1.5.3") + } + ORYX.Log.debug("Prototype > 1.5 found."); + ORYX._load() + }, + _load: function () { + ORYX.loadPlugins() + }, + loadPlugins: function () { + if (ORYX.CONFIG.PLUGINS_ENABLED) { + ORYX._loadPlugins() + } else { + ORYX.Log.warn("Ignoring plugins, loading Core only.") + } + init() + }, + _loadPlugins: function () { + var a = ORYX.CONFIG.PLUGINS_CONFIG; + ORYX.Log.debug("Loading plugin configuration from '%0'.", a); + new Ajax.Request(a, { + asynchronous: false, method: "get", onSuccess: function (c) { + ORYX.Log.info("Plugin configuration file loaded."); + var f = c.responseXML; + var b = []; + var d = $A(f.getElementsByTagName("properties")); + d.each(function (h) { + var g = $A(h.childNodes); + g.each(function (m) { + var l = new Hash(); + var k = $A(m.attributes); + k.each(function (n) { + l[n.nodeName] = n.nodeValue + }); + if (k.length > 0) { + b.push(l) + } + }) + }); + var e = f.getElementsByTagName("plugin"); + $A(e).each(function (k) { + var p = new Hash(); + $A(k.attributes).each(function (r) { + p[r.nodeName] = r.nodeValue + }); + if (!p.name) { + ORYX.Log.error("A plugin is not providing a name. Ingnoring this plugin."); + return + } + if (!p.source) { + ORYX.Log.error("Plugin with name '%0' doesn't provide a source attribute.", p.name); + return + } + var n = k.getElementsByTagName("property"); + var o = []; + $A(n).each(function (t) { + var s = new Hash(); + var r = $A(t.attributes); + r.each(function (u) { + s[u.nodeName] = u.nodeValue + }); + if (r.length > 0) { + o.push(s) + } + }); + o = o.concat(b); + p.properties = o; + var l = k.getElementsByTagName("requires"); + var q; + $A(l).each(function (s) { + var r = $A(s.attributes).find(function (t) { + return t.name == "namespace" + }); + if (r && r.nodeValue) { + if (!q) { + q = {namespaces: []} + } + q.namespaces.push(r.nodeValue) + } + }); + if (q) { + p.requires = q + } + var m = k.getElementsByTagName("notUsesIn"); + var h; + $A(m).each(function (s) { + var r = $A(s.attributes).find(function (t) { + return t.name == "namespace" + }); + if (r && r.nodeValue) { + if (!h) { + h = {namespaces: []} + } + h.namespaces.push(r.nodeValue) + } + }); + if (h) { + p.notUsesIn = h + } + var g = ORYX.PATH + ORYX.CONFIG.PLUGINS_FOLDER + p.source; + ORYX.Log.debug("Requireing '%0'", g); + ORYX.Log.info("Plugin '%0' successfully loaded.", p.name); + ORYX.availablePlugins.push(p) + }) + }, onFailure: this._loadPluginsOnFails + }) + }, + _loadPluginsOnFails: function (a) { + ORYX.Log.error("Plugin configuration file not available.") + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.SVG) { + ORYX.Core.SVG = {} +} +ORYX.Core.SVG.EditPathHandler = Clazz.extend({ + construct: function () { + arguments.callee.$.construct.apply(this, arguments); + this.x = 0; + this.y = 0; + this.oldX = 0; + this.oldY = 0; + this.deltaWidth = 1; + this.deltaHeight = 1; + this.d = "" + }, init: function (a, f, d, b, c, e) { + this.x = a; + this.y = f; + this.oldX = d; + this.oldY = b; + this.deltaWidth = c; + this.deltaHeight = e; + this.d = "" + }, editPointsAbs: function (c) { + if (c instanceof Array) { + var d = []; + var a, e; + for (var b = 0; b < c.length; b++) { + a = (parseFloat(c[b]) - this.oldX) * this.deltaWidth + this.x; + b++; + e = (parseFloat(c[b]) - this.oldY) * this.deltaHeight + this.y; + d.push(a); + d.push(e) + } + return d + } else { + } + }, editPointsRel: function (c) { + if (c instanceof Array) { + var d = []; + var a, e; + for (var b = 0; b < c.length; b++) { + a = parseFloat(c[b]) * this.deltaWidth; + b++; + e = parseFloat(c[b]) * this.deltaHeight; + d.push(a); + d.push(e) + } + return d + } else { + } + }, arcAbs: function (e, c, k, b, f, h, g) { + var d = this.editPointsAbs([h, g]); + var a = this.editPointsRel([e, c]); + this.d = this.d.concat(" A" + a[0] + " " + a[1] + " " + k + " " + b + " " + f + " " + d[0] + " " + d[1] + " ") + }, arcRel: function (f, d, b, e, c, a, h) { + var g = this.editPointsRel([f, d, a, h]); + this.d = this.d.concat(" a" + g[0] + " " + g[1] + " " + b + " " + e + " " + c + " " + g[2] + " " + g[3] + " ") + }, curvetoCubicAbs: function (c, e, b, d, a, g) { + var f = this.editPointsAbs([c, e, b, d, a, g]); + this.d = this.d.concat(" C" + f[0] + " " + f[1] + " " + f[2] + " " + f[3] + " " + f[4] + " " + f[5] + " ") + }, curvetoCubicRel: function (c, e, b, d, a, g) { + var f = this.editPointsRel([c, e, b, d, a, g]); + this.d = this.d.concat(" c" + f[0] + " " + f[1] + " " + f[2] + " " + f[3] + " " + f[4] + " " + f[5] + " ") + }, linetoHorizontalAbs: function (a) { + var b = this.editPointsAbs([a, 0]); + this.d = this.d.concat(" H" + b[0] + " ") + }, linetoHorizontalRel: function (a) { + var b = this.editPointsRel([a, 0]); + this.d = this.d.concat(" h" + b[0] + " ") + }, linetoAbs: function (a, c) { + var b = this.editPointsAbs([a, c]); + this.d = this.d.concat(" L" + b[0] + " " + b[1] + " ") + }, linetoRel: function (a, c) { + var b = this.editPointsRel([a, c]); + this.d = this.d.concat(" l" + b[0] + " " + b[1] + " ") + }, movetoAbs: function (a, c) { + var b = this.editPointsAbs([a, c]); + this.d = this.d.concat(" M" + b[0] + " " + b[1] + " ") + }, movetoRel: function (a, c) { + var b; + if (this.d === "") { + b = this.editPointsAbs([a, c]) + } else { + b = this.editPointsRel([a, c]) + } + this.d = this.d.concat(" m" + b[0] + " " + b[1] + " ") + }, curvetoQuadraticAbs: function (b, c, a, e) { + var d = this.editPointsAbs([b, c, a, e]); + this.d = this.d.concat(" Q" + d[0] + " " + d[1] + " " + d[2] + " " + d[3] + " ") + }, curvetoQuadraticRel: function (b, c, a, e) { + var d = this.editPointsRel([b, c, a, e]); + this.d = this.d.concat(" q" + d[0] + " " + d[1] + " " + d[2] + " " + d[3] + " ") + }, curvetoCubicSmoothAbs: function (b, c, a, e) { + var d = this.editPointsAbs([b, c, a, e]); + this.d = this.d.concat(" S" + d[0] + " " + d[1] + " " + d[2] + " " + d[3] + " ") + }, curvetoCubicSmoothRel: function (b, c, a, e) { + var d = this.editPointsRel([b, c, a, e]); + this.d = this.d.concat(" s" + d[0] + " " + d[1] + " " + d[2] + " " + d[3] + " ") + }, curvetoQuadraticSmoothAbs: function (a, c) { + var b = this.editPointsAbs([a, c]); + this.d = this.d.concat(" T" + b[0] + " " + b[1] + " ") + }, curvetoQuadraticSmoothRel: function (a, c) { + var b = this.editPointsRel([a, c]); + this.d = this.d.concat(" t" + b[0] + " " + b[1] + " ") + }, linetoVerticalAbs: function (b) { + var a = this.editPointsAbs([0, b]); + this.d = this.d.concat(" V" + a[1] + " ") + }, linetoVerticalRel: function (b) { + var a = this.editPointsRel([0, b]); + this.d = this.d.concat(" v" + a[1] + " ") + }, closePath: function () { + this.d = this.d.concat(" z") + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.SVG) { + ORYX.Core.SVG = {} +} +ORYX.Core.SVG.MinMaxPathHandler = Clazz.extend({ + construct: function () { + arguments.callee.$.construct.apply(this, arguments); + this.minX = undefined; + this.minY = undefined; + this.maxX = undefined; + this.maxY = undefined; + this._lastAbsX = undefined; + this._lastAbsY = undefined + }, calculateMinMax: function (c) { + if (c instanceof Array) { + var a, d; + for (var b = 0; b < c.length; b++) { + a = parseFloat(c[b]); + b++; + d = parseFloat(c[b]); + this.minX = (this.minX !== undefined) ? Math.min(this.minX, a) : a; + this.maxX = (this.maxX !== undefined) ? Math.max(this.maxX, a) : a; + this.minY = (this.minY !== undefined) ? Math.min(this.minY, d) : d; + this.maxY = (this.maxY !== undefined) ? Math.max(this.maxY, d) : d; + this._lastAbsX = a; + this._lastAbsY = d + } + } else { + } + }, arcAbs: function (f, d, b, e, c, a, g) { + this.calculateMinMax([a, g]) + }, arcRel: function (f, d, b, e, c, a, g) { + this.calculateMinMax([this._lastAbsX + a, this._lastAbsY + g]) + }, curvetoCubicAbs: function (c, e, b, d, a, f) { + this.calculateMinMax([c, e, b, d, a, f]) + }, curvetoCubicRel: function (c, e, b, d, a, f) { + this.calculateMinMax([this._lastAbsX + c, this._lastAbsY + e, this._lastAbsX + b, this._lastAbsY + d, this._lastAbsX + a, this._lastAbsY + f]) + }, linetoHorizontalAbs: function (a) { + this.calculateMinMax([a, this._lastAbsY]) + }, linetoHorizontalRel: function (a) { + this.calculateMinMax([this._lastAbsX + a, this._lastAbsY]) + }, linetoAbs: function (a, b) { + this.calculateMinMax([a, b]) + }, linetoRel: function (a, b) { + this.calculateMinMax([this._lastAbsX + a, this._lastAbsY + b]) + }, movetoAbs: function (a, b) { + this.calculateMinMax([a, b]) + }, movetoRel: function (a, b) { + if (this._lastAbsX && this._lastAbsY) { + this.calculateMinMax([this._lastAbsX + a, this._lastAbsY + b]) + } else { + this.calculateMinMax([a, b]) + } + }, curvetoQuadraticAbs: function (b, c, a, d) { + this.calculateMinMax([b, c, a, d]) + }, curvetoQuadraticRel: function (b, c, a, d) { + this.calculateMinMax([this._lastAbsX + b, this._lastAbsY + c, this._lastAbsX + a, this._lastAbsY + d]) + }, curvetoCubicSmoothAbs: function (b, c, a, d) { + this.calculateMinMax([b, c, a, d]) + }, curvetoCubicSmoothRel: function (b, c, a, d) { + this.calculateMinMax([this._lastAbsX + b, this._lastAbsY + c, this._lastAbsX + a, this._lastAbsY + d]) + }, curvetoQuadraticSmoothAbs: function (a, b) { + this.calculateMinMax([a, b]) + }, curvetoQuadraticSmoothRel: function (a, b) { + this.calculateMinMax([this._lastAbsX + a, this._lastAbsY + b]) + }, linetoVerticalAbs: function (a) { + this.calculateMinMax([this._lastAbsX, a]) + }, linetoVerticalRel: function (a) { + this.calculateMinMax([this._lastAbsX, this._lastAbsY + a]) + }, closePath: function () { + return + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.SVG) { + ORYX.Core.SVG = {} +} +ORYX.Core.SVG.PointsPathHandler = Clazz.extend({ + construct: function () { + arguments.callee.$.construct.apply(this, arguments); + this.points = []; + this._lastAbsX = undefined; + this._lastAbsY = undefined + }, addPoints: function (c) { + if (c instanceof Array) { + var a, d; + for (var b = 0; b < c.length; b++) { + a = parseFloat(c[b]); + b++; + d = parseFloat(c[b]); + this.points.push(a); + this.points.push(d); + this._lastAbsX = a; + this._lastAbsY = d + } + } else { + } + }, arcAbs: function (f, d, b, e, c, a, g) { + this.addPoints([a, g]) + }, arcRel: function (f, d, b, e, c, a, g) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + g]) + }, curvetoCubicAbs: function (c, e, b, d, a, f) { + this.addPoints([a, f]) + }, curvetoCubicRel: function (c, e, b, d, a, f) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + f]) + }, linetoHorizontalAbs: function (a) { + this.addPoints([a, this._lastAbsY]) + }, linetoHorizontalRel: function (a) { + this.addPoints([this._lastAbsX + a, this._lastAbsY]) + }, linetoAbs: function (a, b) { + this.addPoints([a, b]) + }, linetoRel: function (a, b) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + b]) + }, movetoAbs: function (a, b) { + this.addPoints([a, b]) + }, movetoRel: function (a, b) { + if (this._lastAbsX && this._lastAbsY) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + b]) + } else { + this.addPoints([a, b]) + } + }, curvetoQuadraticAbs: function (b, c, a, d) { + this.addPoints([a, d]) + }, curvetoQuadraticRel: function (b, c, a, d) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + d]) + }, curvetoCubicSmoothAbs: function (b, c, a, d) { + this.addPoints([a, d]) + }, curvetoCubicSmoothRel: function (b, c, a, d) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + d]) + }, curvetoQuadraticSmoothAbs: function (a, b) { + this.addPoints([a, b]) + }, curvetoQuadraticSmoothRel: function (a, b) { + this.addPoints([this._lastAbsX + a, this._lastAbsY + b]) + }, linetoVerticalAbs: function (a) { + this.addPoints([this._lastAbsX, a]) + }, linetoVerticalRel: function (a) { + this.addPoints([this._lastAbsX, this._lastAbsY + a]) + }, closePath: function () { + return + } +}); +NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +NAMESPACE_SVG = "http://www.w3.org/2000/svg/"; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.SVG) { + ORYX.Core.SVG = {} +} +ORYX.Core.SVG.SVGMarker = Clazz.extend({ + construct: function (a) { + arguments.callee.$.construct.apply(this, arguments); + this.id = undefined; + this.element = a; + this.refX = undefined; + this.refY = undefined; + this.markerWidth = undefined; + this.markerHeight = undefined; + this.oldRefX = undefined; + this.oldRefY = undefined; + this.oldMarkerWidth = undefined; + this.oldMarkerHeight = undefined; + this.optional = false; + this.enabled = true; + this.minimumLength = undefined; + this.resize = false; + this.svgShapes = []; + this._init() + }, _init: function () { + if (!(this.element == "[object SVGMarkerElement]")) { + throw"SVGMarker: Argument is not an instance of SVGMarkerElement." + } + this.id = this.element.getAttributeNS(null, "id"); + var a = this.element.getAttributeNS(null, "refX"); + if (a) { + this.refX = parseFloat(a) + } else { + this.refX = 0 + } + var h = this.element.getAttributeNS(null, "refY"); + if (h) { + this.refY = parseFloat(h) + } else { + this.refY = 0 + } + var f = this.element.getAttributeNS(null, "markerWidth"); + if (f) { + this.markerWidth = parseFloat(f) + } else { + this.markerWidth = 3 + } + var c = this.element.getAttributeNS(null, "markerHeight"); + if (c) { + this.markerHeight = parseFloat(c) + } else { + this.markerHeight = 3 + } + this.oldRefX = this.refX; + this.oldRefY = this.refY; + this.oldMarkerWidth = this.markerWidth; + this.oldMarkerHeight = this.markerHeight; + var g = this.element.getAttributeNS(NAMESPACE_ORYX, "optional"); + if (g) { + g = g.strip(); + this.optional = (g.toLowerCase() === "yes") + } else { + this.optional = false + } + var e = this.element.getAttributeNS(NAMESPACE_ORYX, "enabled"); + if (e) { + e = e.strip(); + this.enabled = !(e.toLowerCase() === "no") + } else { + this.enabled = true + } + var d = this.element.getAttributeNS(NAMESPACE_ORYX, "minimumLength"); + if (d) { + this.minimumLength = parseFloat(d) + } + var b = this.element.getAttributeNS(NAMESPACE_ORYX, "resize"); + if (b) { + b = b.strip(); + this.resize = (b.toLowerCase() === "yes") + } else { + this.resize = false + } + }, _getSVGShapes: function (c) { + if (c.hasChildNodes) { + var a = []; + var b = this; + $A(c.childNodes).each(function (d) { + try { + var g = new ORYX.Core.SVG.SVGShape(d); + a.push(g) + } catch (f) { + a = a.concat(b._getSVGShapes(d)) + } + }); + return a + } + }, update: function () { + this.oldRefX = this.refX; + this.oldRefY = this.refY; + this.oldMarkerWidth = this.markerWidth; + this.oldMarkerHeight = this.markerHeight + }, toString: function () { + return (this.element) ? "SVGMarker " + this.element.id : "SVGMarker " + this.element + } +}); +NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +NAMESPACE_SVG = "http://www.w3.org/2000/svg/"; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.SVG) { + ORYX.Core.SVG = {} +} +ORYX.Core.SVG.SVGShape = Clazz.extend({ + construct: function (a) { + arguments.callee.$.construct.apply(this, arguments); + this.type; + this.element = a; + this.x = undefined; + this.y = undefined; + this.width = undefined; + this.height = undefined; + this.oldX = undefined; + this.oldY = undefined; + this.oldWidth = undefined; + this.oldHeight = undefined; + this.radiusX = undefined; + this.radiusY = undefined; + this.isHorizontallyResizable = false; + this.isVerticallyResizable = false; + this.anchorLeft = false; + this.anchorRight = false; + this.anchorTop = false; + this.anchorBottom = false; + this.allowDockers = true; + this.resizeMarkerMid = false; + this.editPathParser; + this.editPathHandler; + this.init() + }, init: function () { + if (ORYX.Editor.checkClassType(this.element, SVGRectElement) || ORYX.Editor.checkClassType(this.element, SVGImageElement)) { + this.type = "Rect"; + var I = this.element.getAttributeNS(null, "x"); + if (I) { + this.oldX = parseFloat(I) + } else { + throw"Missing attribute in element " + this.element + } + var p = this.element.getAttributeNS(null, "y"); + if (p) { + this.oldY = parseFloat(p) + } else { + throw"Missing attribute in element " + this.element + } + var r = this.element.getAttributeNS(null, "width"); + if (r) { + this.oldWidth = parseFloat(r) + } else { + throw"Missing attribute in element " + this.element + } + var u = this.element.getAttributeNS(null, "height"); + if (u) { + this.oldHeight = parseFloat(u) + } else { + throw"Missing attribute in element " + this.element + } + } else { + if (ORYX.Editor.checkClassType(this.element, SVGCircleElement)) { + this.type = "Circle"; + var h = undefined; + var e = undefined; + var a = this.element.getAttributeNS(null, "cx"); + if (a) { + h = parseFloat(a) + } else { + throw"Missing attribute in element " + this.element + } + var w = this.element.getAttributeNS(null, "cy"); + if (w) { + e = parseFloat(w) + } else { + throw"Missing attribute in element " + this.element + } + var k = this.element.getAttributeNS(null, "r"); + if (k) { + this.radiusX = parseFloat(k) + } else { + throw"Missing attribute in element " + this.element + } + this.oldX = h - this.radiusX; + this.oldY = e - this.radiusX; + this.oldWidth = 2 * this.radiusX; + this.oldHeight = 2 * this.radiusX + } else { + if (ORYX.Editor.checkClassType(this.element, SVGEllipseElement)) { + this.type = "Ellipse"; + var h = undefined; + var e = undefined; + var a = this.element.getAttributeNS(null, "cx"); + if (a) { + h = parseFloat(a) + } else { + throw"Missing attribute in element " + this.element + } + var w = this.element.getAttributeNS(null, "cy"); + if (w) { + e = parseFloat(w) + } else { + throw"Missing attribute in element " + this.element + } + var J = this.element.getAttributeNS(null, "rx"); + if (J) { + this.radiusX = parseFloat(J) + } else { + throw"Missing attribute in element " + this.element + } + var q = this.element.getAttributeNS(null, "ry"); + if (q) { + this.radiusY = parseFloat(q) + } else { + throw"Missing attribute in element " + this.element + } + this.oldX = h - this.radiusX; + this.oldY = e - this.radiusY; + this.oldWidth = 2 * this.radiusX; + this.oldHeight = 2 * this.radiusY + } else { + if (ORYX.Editor.checkClassType(this.element, SVGLineElement)) { + this.type = "Line"; + var C = undefined; + var g = undefined; + var A = undefined; + var d = undefined; + var H = this.element.getAttributeNS(null, "x1"); + if (H) { + C = parseFloat(H) + } else { + throw"Missing attribute in element " + this.element + } + var b = this.element.getAttributeNS(null, "y1"); + if (b) { + g = parseFloat(b) + } else { + throw"Missing attribute in element " + this.element + } + var m = this.element.getAttributeNS(null, "x2"); + if (m) { + A = parseFloat(m) + } else { + throw"Missing attribute in element " + this.element + } + var v = this.element.getAttributeNS(null, "y2"); + if (v) { + d = parseFloat(v) + } else { + throw"Missing attribute in element " + this.element + } + this.oldX = Math.min(C, A); + this.oldY = Math.min(g, d); + this.oldWidth = Math.abs(C - A); + this.oldHeight = Math.abs(g - d) + } else { + if (ORYX.Editor.checkClassType(this.element, SVGPolylineElement) || ORYX.Editor.checkClassType(this.element, SVGPolygonElement)) { + this.type = "Polyline"; + var n = []; + if (this.element.points && this.element.points.numberOfItems) { + for (var z = 0, s = this.element.points.numberOfItems; z < s; z++) { + n.push(this.element.points.getItem(z).x); + n.push(this.element.points.getItem(z).y) + } + } else { + var y = this.element.getAttributeNS(null, "points"); + if (y) { + y = y.replace(/,/g, " "); + n = y.split(" "); + n = n.without("") + } else { + throw"Missing attribute in element " + this.element + } + } + if (n && n.length && n.length > 1) { + var G = parseFloat(n[0]); + var F = parseFloat(n[1]); + var E = parseFloat(n[0]); + var D = parseFloat(n[1]); + for (var z = 0; z < n.length; z++) { + G = Math.min(G, parseFloat(n[z])); + E = Math.max(E, parseFloat(n[z])); + z++; + F = Math.min(F, parseFloat(n[z])); + D = Math.max(D, parseFloat(n[z])) + } + this.oldX = G; + this.oldY = F; + this.oldWidth = E - G; + this.oldHeight = D - F + } else { + throw"Missing attribute in element " + this.element + } + } else { + if (ORYX.Editor.checkClassType(this.element, SVGPathElement)) { + this.type = "Path"; + this.editPathParser = new PathParser(); + this.editPathHandler = new ORYX.Core.SVG.EditPathHandler(); + this.editPathParser.setHandler(this.editPathHandler); + var f = new PathParser(); + var c = new ORYX.Core.SVG.MinMaxPathHandler(); + f.setHandler(c); + f.parsePath(this.element); + this.oldX = c.minX; + this.oldY = c.minY; + this.oldWidth = c.maxX - c.minX; + this.oldHeight = c.maxY - c.minY; + delete f; + delete c + } else { + throw"Element is not a shape." + } + } + } + } + } + } + var t = this.element.getAttributeNS(NAMESPACE_ORYX, "resize"); + if (t) { + t = t.toLowerCase(); + if (t.match(/horizontal/)) { + this.isHorizontallyResizable = true + } else { + this.isHorizontallyResizable = false + } + if (t.match(/vertical/)) { + this.isVerticallyResizable = true + } else { + this.isVerticallyResizable = false + } + } else { + this.isHorizontallyResizable = false; + this.isVerticallyResizable = false + } + var x = this.element.getAttributeNS(NAMESPACE_ORYX, "anchors"); + if (x) { + x = x.replace("/,/g", " "); + var o = x.split(" ").without(""); + for (var z = 0; z < o.length; z++) { + switch (o[z].toLowerCase()) { + case"left": + this.anchorLeft = true; + break; + case"right": + this.anchorRight = true; + break; + case"top": + this.anchorTop = true; + break; + case"bottom": + this.anchorBottom = true; + break + } + } + } + if (ORYX.Editor.checkClassType(this.element, SVGPathElement)) { + var l = this.element.getAttributeNS(NAMESPACE_ORYX, "allowDockers"); + if (l) { + if (l.toLowerCase() === "no") { + this.allowDockers = false + } else { + this.allowDockers = true + } + } + var B = this.element.getAttributeNS(NAMESPACE_ORYX, "resizeMarker-mid"); + if (B) { + if (B.toLowerCase() === "yes") { + this.resizeMarkerMid = true + } else { + this.resizeMarkerMid = false + } + } + } + this.x = this.oldX; + this.y = this.oldY; + this.width = this.oldWidth; + this.height = this.oldHeight + }, update: function () { + if (this.x !== this.oldX || this.y !== this.oldY || this.width !== this.oldWidth || this.height !== this.oldHeight) { + switch (this.type) { + case"Rect": + if (this.x !== this.oldX) { + this.element.setAttributeNS(null, "x", this.x) + } + if (this.y !== this.oldY) { + this.element.setAttributeNS(null, "y", this.y) + } + if (this.width !== this.oldWidth) { + this.element.setAttributeNS(null, "width", this.width) + } + if (this.height !== this.oldHeight) { + this.element.setAttributeNS(null, "height", this.height) + } + break; + case"Circle": + this.radiusX = ((this.width < this.height) ? this.width : this.height) / 2; + this.element.setAttributeNS(null, "cx", this.x + this.width / 2); + this.element.setAttributeNS(null, "cy", this.y + this.height / 2); + this.element.setAttributeNS(null, "r", this.radiusX); + break; + case"Ellipse": + this.radiusX = this.width / 2; + this.radiusY = this.height / 2; + this.element.setAttributeNS(null, "cx", this.x + this.radiusX); + this.element.setAttributeNS(null, "cy", this.y + this.radiusY); + this.element.setAttributeNS(null, "rx", this.radiusX); + this.element.setAttributeNS(null, "ry", this.radiusY); + break; + case"Line": + if (this.x !== this.oldX) { + this.element.setAttributeNS(null, "x1", this.x) + } + if (this.y !== this.oldY) { + this.element.setAttributeNS(null, "y1", this.y) + } + if (this.x !== this.oldX || this.width !== this.oldWidth) { + this.element.setAttributeNS(null, "x2", this.x + this.width) + } + if (this.y !== this.oldY || this.height !== this.oldHeight) { + this.element.setAttributeNS(null, "y2", this.y + this.height) + } + break; + case"Polyline": + var d = this.element.getAttributeNS(null, "points"); + if (d) { + d = d.replace(/,/g, " ").split(" ").without(""); + if (d && d.length && d.length > 1) { + var g = (this.oldWidth === 0) ? 0 : this.width / this.oldWidth; + var e = (this.oldHeight === 0) ? 0 : this.height / this.oldHeight; + var b = ""; + for (var c = 0; c < d.length; c++) { + var a = (parseFloat(d[c]) - this.oldX) * g + this.x; + c++; + var f = (parseFloat(d[c]) - this.oldY) * e + this.y; + b += a + " " + f + " " + } + this.element.setAttributeNS(null, "points", b) + } else { + } + } else { + } + break; + case"Path": + var g = (this.oldWidth === 0) ? 0 : this.width / this.oldWidth; + var e = (this.oldHeight === 0) ? 0 : this.height / this.oldHeight; + this.editPathHandler.init(this.x, this.y, this.oldX, this.oldY, g, e); + this.editPathParser.parsePath(this.element); + this.element.setAttributeNS(null, "d", this.editPathHandler.d); + break + } + this.oldX = this.x; + this.oldY = this.y; + this.oldWidth = this.width; + this.oldHeight = this.height + } + delete this.visible; + delete this.handler + }, isPointIncluded: function (d, b) { + if (!d || !b || !this.isVisible()) { + return false + } + switch (this.type) { + case"Rect": + return (d >= this.x && d <= this.x + this.width && b >= this.y && b <= this.y + this.height); + break; + case"Circle": + return ORYX.Core.Math.isPointInEllipse(d, b, this.x + this.width / 2, this.y + this.height / 2, this.radiusX, this.radiusX); + break; + case"Ellipse": + return ORYX.Core.Math.isPointInEllipse(d, b, this.x + this.radiusX, this.y + this.radiusY, this.radiusX, this.radiusY); + break; + case"Line": + return ORYX.Core.Math.isPointInLine(d, b, this.x, this.y, this.x + this.width, this.y + this.height); + break; + case"Polyline": + var a = this.element.getAttributeNS(null, "points"); + if (a) { + a = a.replace(/,/g, " ").split(" ").without(""); + a = a.collect(function (e) { + return parseFloat(e) + }); + return ORYX.Core.Math.isPointInPolygone(d, b, a) + } else { + return false + } + break; + case"Path": + if (!this.handler) { + var c = new PathParser(); + this.handler = new ORYX.Core.SVG.PointsPathHandler(); + c.setHandler(this.handler); + c.parsePath(this.element) + } + return ORYX.Core.Math.isPointInPolygone(d, b, this.handler.points); + break; + default: + return false + } + }, isVisible: function (c) { + if (this.visible !== undefined) { + return this.visible + } + if (!c) { + c = this.element + } + var b = false; + try { + b = !!c.ownerSVGElement + } catch (g) {var abcdef=1 + } + if (b) { + if (ORYX.Editor.checkClassType(c, SVGGElement)) { + if (c.className && c.className.baseVal == "me") { + this.visible = true; + return this.visible + } + } + var f = c.getAttributeNS(null, "fill"); + var d = c.getAttributeNS(null, "stroke"); + if (f && f == "none" && d && d == "none") { + this.visible = false + } else { + var a = c.getAttributeNS(null, "display"); + if (!a) { + this.visible = this.isVisible(c.parentNode) + } else { + if (a == "none") { + this.visible = false + } else { + this.visible = true + } + } + } + } else { + this.visible = true + } + return this.visible + }, toString: function () { + return (this.element) ? "SVGShape " + this.element.id : "SVGShape " + this.element + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.SVG) { + ORYX.Core.SVG = {} +} +ORYX.Core.SVG.Label = Clazz.extend({ + _characterSets: ["%W", "@", "m", "wDGMOQ?????#+=<>~^", "ABCHKNRSUVXZ??????????&", "bdghnopqux???????????ETY1234567890?????_????${}*????`???????????", "aeksvyz?????FLP????????????????", "c-", 'rtJ"/()[]:;!|\\', "fjI., ", "'", "il"], + _characterSetValues: [15, 14, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3], + construct: function (m) { + arguments.callee.$.construct.apply(this, arguments); + if (!m.textElement) { + throw"Label: No parameter textElement." + } else { + if (!ORYX.Editor.checkClassType(m.textElement, SVGTextElement)) { + throw"Label: Parameter textElement is not an SVGTextElement." + } + } + this.invisibleRenderPoint = -5000; + this.node = m.textElement; + this.node.setAttributeNS(null, "stroke-width", "0pt"); + this.node.setAttributeNS(null, "letter-spacing", "-0.01px"); + this.shapeId = m.shapeId; + this.id; + this.fitToElemId; + this.edgePosition; + this.x; + this.y; + this.oldX; + this.oldY; + this.isVisible = true; + this._text; + this._verticalAlign; + this._horizontalAlign; + this._rotate; + this._rotationPoint; + this.anchorLeft; + this.anchorRight; + this.anchorTop; + this.anchorBottom; + this._isChanged = true; + var k = this.node.getAttributeNS(null, "id"); + if (k) { + this.id = k + } + this.fitToElemId = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "fittoelem"); + if (this.fitToElemId) { + this.fitToElemId = this.shapeId + this.fitToElemId + } + var f = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "align"); + if (f) { + f = f.replace(/,/g, " "); + f = f.split(" "); + f = f.without(""); + f.each((function (e) { + switch (e) { + case"top": + case"middle": + case"bottom": + if (!this._verticalAlign) { + this._originVerticalAlign = this._verticalAlign = e + } + break; + case"left": + case"center": + case"right": + if (!this._horizontalAlign) { + this._originHorizontalAlign = this._horizontalAlign = e + } + break + } + }).bind(this)) + } + this.edgePosition = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "edgePosition"); + if (this.edgePosition) { + this.originEdgePosition = this.edgePosition = this.edgePosition.toLowerCase() + } + this.offsetTop = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "offsetTop") || ORYX.CONFIG.OFFSET_EDGE_LABEL_TOP; + if (this.offsetTop) { + this.offsetTop = parseInt(this.offsetTop) + } + this.offsetBottom = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "offsetBottom") || ORYX.CONFIG.OFFSET_EDGE_LABEL_BOTTOM; + if (this.offsetBottom) { + this.offsetBottom = parseInt(this.offsetBottom) + } + var l = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "rotate"); + if (l) { + try { + this._rotate = parseFloat(l) + } catch (g) { + this._rotate = 0 + } + } else { + this._rotate = 0 + } + var b = this.node.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "anchors"); + if (b) { + b = b.replace("/,/g", " "); + var a = b.split(" ").without(""); + for (var d = 0; d < a.length; d++) { + switch (a[d].toLowerCase()) { + case"left": + this.originAnchorLeft = this.anchorLeft = true; + break; + case"right": + this.originAnchorRight = this.anchorRight = true; + break; + case"top": + this.originAnchorTop = this.anchorTop = true; + break; + case"bottom": + this.originAnchorBottom = this.anchorBottom = true; + break + } + } + } + if (!this._verticalAlign) { + this._verticalAlign = "bottom" + } + if (!this._horizontalAlign) { + this._horizontalAlign = "left" + } + var c = this.node.getAttributeNS(null, "x"); + if (c) { + this.oldX = this.x = parseFloat(c) + } else { + } + var h = this.node.getAttributeNS(null, "y"); + if (h) { + this.oldY = this.y = parseFloat(h) + } else { + } + this.text(this.node.textContent) + }, + resetAnchorPosition: function () { + this.anchorLeft = this.originAnchorLeft || false; + this.anchorRight = this.originAnchorRight || false; + this.anchorTop = this.originAnchorTop || false; + this.anchorBottom = this.originAnchorBottom || false + }, + isOriginAnchorLeft: function () { + return this.originAnchorLeft || false + }, + isOriginAnchorRight: function () { + return this.originAnchorRight || false + }, + isOriginAnchorTop: function () { + return this.originAnchorTop || false + }, + isOriginAnchorBottom: function () { + return this.originAnchorBottom || false + }, + isAnchorLeft: function () { + return this.anchorLeft || false + }, + isAnchorRight: function () { + return this.anchorRight || false + }, + isAnchorTop: function () { + return this.anchorTop || false + }, + isAnchorBottom: function () { + return this.anchorBottom || false + }, + getX: function () { + try { + var a = this.node.x.baseVal.getItem(0).value; + switch (this.horizontalAlign()) { + case"left": + return a; + case"center": + return a - (this.getWidth() / 2); + case"right": + return a - this.getWidth() + } + return this.node.getBBox().x + } catch (b) { + return this.x + } + }, + setX: function (a) { + if (this.position) { + this.position.x = a + } else { + this.setOriginX(a) + } + }, + getY: function () { + try { + return this.node.getBBox().y + } catch (a) { + return this.y + } + }, + setY: function (a) { + if (this.position) { + this.position.y = a + } else { + this.setOriginY(a) + } + }, + setOriginX: function (a) { + this.x = a + }, + setOriginY: function (a) { + this.y = a + }, + getWidth: function () { + try { + try { + var f, h = this.node.childNodes; + if (h.length == 0) { + f = this.node.getBBox().width + } else { + for (var d = 0, c = h.length; d < c; ++d) { + var b = h[d].getComputedTextLength(); + if ("undefined" == typeof f || f < b) { + f = b + } + } + } + return f + (f % 2 == 0 ? 0 : 1) + } catch (a) { + return this.node.getBBox().width + } + } catch (g) { + return 0 + } + }, + getOriginUpperLeft: function () { + var a = this.x, b = this.y; + switch (this._horizontalAlign) { + case"center": + a -= this.getWidth() / 2; + break; + case"right": + a -= this.getWidth(); + break + } + switch (this._verticalAlign) { + case"middle": + b -= this.getHeight() / 2; + break; + case"bottom": + b -= this.getHeight(); + break + } + return {x: a, y: b} + }, + getHeight: function () { + try { + return this.node.getBBox().height + } catch (a) { + return 0 + } + }, + getCenter: function () { + var a = {x: this.getX(), y: this.getY()}; + a.x += this.getWidth() / 2; + a.y += this.getHeight() / 2; + return a + }, + setPosition: function (a) { + if (!a || a.x === undefined || a.y === undefined) { + delete this.position + } else { + this.position = a + } + if (this.position) { + delete this._referencePoint; + delete this.edgePosition + } + this._isChanged = true; + this.update() + }, + getPosition: function () { + return this.position + }, + setReferencePoint: function (a) { + if (a) { + this._referencePoint = a + } else { + delete this._referencePoint + } + if (this._referencePoint) { + delete this.position + } + }, + getReferencePoint: function () { + return this._referencePoint || undefined + }, + changed: function () { + this._isChanged = true + }, + registerOnChange: function (a) { + if (!this.changeCallbacks) { + this.changeCallbacks = [] + } + if (a instanceof Function && !this.changeCallbacks.include(a)) { + this.changeCallbacks.push(a) + } + }, + unregisterOnChange: function (a) { + if (this.changeCallbacks && a instanceof Function && this.changeCallbacks.include(a)) { + this.changeCallbacks = this.changeCallbacks.without(a) + } + }, + isUpdating: function () { + return !!this._isUpdating + }, + getOriginEdgePosition: function () { + return this.originEdgePosition + }, + getEdgePosition: function () { + return this.edgePosition || null + }, + setEdgePosition: function (a) { + if (["starttop", "startmiddle", "startbottom", "midtop", "midbottom", "endtop", "endbottom"].include(a)) { + this.edgePosition = a; + delete this.position; + delete this._referencePoint + } else { + delete this.edgePosition + } + }, + update: function (c) { + var a = this.x, d = this.y; + if (this.position) { + a = this.position.x; + d = this.position.y + } + a = Math.floor(a); + d = Math.floor(d); + if (this._isChanged || a !== this.oldX || d !== this.oldY || c === true) { + if (this.isVisible) { + this._isChanged = false; + this._isUpdating = true; + this.node.setAttributeNS(null, "x", a); + this.node.setAttributeNS(null, "y", d); + this.node.removeAttributeNS(null, "fill-opacity"); + this.oldX = a; + this.oldY = d; + if (!this.position && !this.getReferencePoint()) { + if (this._rotate !== undefined) { + if (this._rotationPoint) { + this.node.setAttributeNS(null, "transform", "rotate(" + this._rotate + " " + Math.floor(this._rotationPoint.x) + " " + Math.floor(this._rotationPoint.y) + ")") + } else { + this.node.setAttributeNS(null, "transform", "rotate(" + this._rotate + " " + Math.floor(a) + " " + Math.floor(d) + ")") + } + } + } else { + this.node.removeAttributeNS(null, "transform") + } + var b = this._text.split("\n"); + while (b.last() == "") { + b.pop() + } + if (this.node.ownerDocument) { + if (this.fitToElemId || this._textHasChanged) { + this.node.textContent = ""; + b.each((function (f, e) { + var g = this.node.ownerDocument.createElementNS(ORYX.CONFIG.NAMESPACE_SVG, "tspan"); + g.textContent = f.trim(); + if (this.fitToElemId) { + g.setAttributeNS(null, "x", this.invisibleRenderPoint); + g.setAttributeNS(null, "y", this.invisibleRenderPoint) + } + if (g.textContent === "") { + g.textContent = " " + } + this.node.appendChild(g) + }).bind(this)); + delete this._textHasChanged; + delete this.indices + } + if (this.isVisible && this.fitToElemId) { + this.node.setAttributeNS(null, "visibility", "hidden") + } + if (this.fitToElemId) { + window.setTimeout(this._checkFittingToReferencedElem.bind(this), 0) + } else { + window.setTimeout(this._positionText.bind(this), 0) + } + } + } else { + this.node.textContent = "" + } + } + }, + _checkFittingToReferencedElem: function () { + try { + var b = $A(this.node.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "tspan")); + var d = []; + var l = this.node.ownerDocument.getElementById(this.fitToElemId); + if (l) { + var k = l.getBBox(); + var s = this.getFontSize(); + for (var f = 0; f < b.length; f++) { + var p = b[f]; + var t = this._getRenderedTextLength(p, undefined, undefined, s); + var h = (this._rotate != 0 && this._rotate % 180 != 0 && this._rotate % 90 == 0 ? k.height : k.width); + if (t > h) { + var q = 0; + var n = 0; + var o = this.getTrimmedTextLength(p.textContent); + for (var g = 0; g < o; g++) { + var r = this._getRenderedTextLength(p, q, g - q, s); + if (r > h - 2) { + var c = this.node.ownerDocument.createElementNS(ORYX.CONFIG.NAMESPACE_SVG, "tspan"); + if (n <= q) { + n = (g == 0) ? g : g - 1; + c.textContent = p.textContent.slice(q, n).trim() + } else { + c.textContent = p.textContent.slice(q, ++n).trim() + } + c.setAttributeNS(null, "x", this.invisibleRenderPoint); + c.setAttributeNS(null, "y", this.invisibleRenderPoint); + d.push(c); + q = n + } else { + var a = p.textContent.charAt(g); + if (a == " " || a == "-" || a == "." || a == "," || a == ";" || a == ":") { + n = g + } + } + } + p.textContent = p.textContent.slice(q).trim() + } + d.push(p) + } + while (this.node.hasChildNodes()) { + this.node.removeChild(this.node.childNodes[0]) + } + while (d.length > 0) { + this.node.appendChild(d.shift()) + } + } + } catch (m) { + ORYX.Log.fatal("Error " + m) + } + window.setTimeout(this._positionText.bind(this), 0) + }, + _positionText: function () { + try { + var d = this.node.childNodes; + var m = this.getFontSize(this.node); + var b = []; + var l = this.x, k = this.y; + if (this.position) { + l = this.position.x; + k = this.position.y + } + l = Math.floor(l); + k = Math.floor(k); + var f = 0, a = []; + var g = (this.indices || $R(0, d.length - 1).toArray()); + var c = g.length; + g.each((function (n) { + if ("undefined" == typeof n) { + return + } + var o = d[f++]; + if (o.textContent.trim() === "") { + b.push(o) + } else { + var e = 0; + switch (this._verticalAlign) { + case"bottom": + e = -(c - n - 1) * (m); + break; + case"middle": + e = -(c / 2 - n - 1) * (m); + e -= ORYX.CONFIG.LABEL_LINE_DISTANCE / 2; + break; + case"top": + e = n * (m); + e += m; + break + } + o.setAttributeNS(null, "dy", Math.floor(e)); + o.setAttributeNS(null, "x", l); + o.setAttributeNS(null, "y", k); + a.push(n) + } + }).bind(this)); + a.length = d.length; + this.indices = this.indices || a; + b.each(function (e) { + this.node.removeChild(e) + }.bind(this)); + switch (this._horizontalAlign) { + case"left": + this.node.setAttributeNS(null, "text-anchor", "start"); + break; + case"center": + this.node.setAttributeNS(null, "text-anchor", "middle"); + break; + case"right": + this.node.setAttributeNS(null, "text-anchor", "end"); + break + } + } catch (h) { + this._isChanged = true + } + if (this.isVisible) { + this.node.removeAttributeNS(null, "visibility") + } + delete this._isUpdating; + (this.changeCallbacks || []).each(function (e) { + e.apply(e) + }) + }, + _getRenderedTextLength: function (c, d, b, a) { + if (d === undefined) { + return c.getComputedTextLength() + } else { + return c.getSubStringLength(d, b) + } + }, + _estimateTextWidth: function (d, c) { + var b = 0; + for (var a = 0; a < d.length; a++) { + b += this._estimateCharacterWidth(d.charAt(a)) + } + return b * (c / 14) + }, + _estimateCharacterWidth: function (b) { + for (var a = 0; a < this._characterSets.length; a++) { + if (this._characterSets[a].indexOf(b) >= 0) { + return this._characterSetValues[a] + } + } + return 9 + }, + getReferencedElementWidth: function () { + var a = this.node.ownerDocument.getElementById(this.fitToElemId); + if (a) { + var b = a.getBBox(); + if (b) { + return (this._rotate != 0 && this._rotate % 180 != 0 && this._rotate % 90 == 0 ? b.height : b.width) + } + } + return undefined + }, + text: function () { + switch (arguments.length) { + case 0: + return this._text; + break; + case 1: + var a = this._text; + if (arguments[0]) { + this._text = arguments[0].toString(); + if (this._text != null && this._text != undefined) { + this._text = this._text.replace(/ {2,}/g, " ") + } + } else { + this._text = "" + } + if (a !== this._text) { + this._isChanged = true; + this._textHasChanged = true + } + break; + default: + break + } + }, + getOriginVerticalAlign: function () { + return this._originVerticalAlign + }, + verticalAlign: function () { + switch (arguments.length) { + case 0: + return this._verticalAlign; + case 1: + if (["top", "middle", "bottom"].member(arguments[0])) { + var a = this._verticalAlign; + this._verticalAlign = arguments[0]; + if (this._verticalAlign !== a) { + this._isChanged = true + } + } + break; + default: + break + } + }, + getOriginHorizontalAlign: function () { + return this._originHorizontalAlign + }, + horizontalAlign: function () { + switch (arguments.length) { + case 0: + return this._horizontalAlign; + case 1: + if (["left", "center", "right"].member(arguments[0])) { + var a = this._horizontalAlign; + this._horizontalAlign = arguments[0]; + if (this._horizontalAlign !== a) { + this._isChanged = true + } + } + break; + default: + break + } + }, + rotate: function () { + switch (arguments.length) { + case 0: + return this._rotate; + case 1: + if (this._rotate != arguments[0]) { + this._rotate = arguments[0]; + this._rotationPoint = undefined; + this._isChanged = true + } + case 2: + if (this._rotate != arguments[0] || !this._rotationPoint || this._rotationPoint.x != arguments[1].x || this._rotationPoint.y != arguments[1].y) { + this._rotate = arguments[0]; + this._rotationPoint = arguments[1]; + this._isChanged = true + } + } + }, + hide: function () { + if (this.isVisible) { + this.isVisible = false; + this._isChanged = true + } + }, + show: function () { + if (!this.isVisible) { + this.isVisible = true; + this._isChanged = true; + this._textHasChanged = true + } + }, + getInheritedFontSize: function (b) { + if (!b || !b.getAttributeNS) { + return + } + var a = b.getAttributeNS(null, "font-size"); + if (a) { + return parseFloat(a) + } else { + if (!ORYX.Editor.checkClassType(b, SVGSVGElement)) { + return this.getInheritedFontSize(b.parentNode) + } + } + }, + getFontSize: function (b) { + var a = this.node.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "tspan"); + var c = this.getInheritedFontSize(this.node); + if (!c) { + if (a[0] && /Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent) && new Number(RegExp.$1) >= 3) { + c = a[0].getExtentOfChar(0).height + } else { + c = ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT + } + if (c <= 0) { + c = ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT + } + } + if (c) { + this.node.setAttribute("oryx:fontSize", c) + } + return c + }, + getTrimmedTextLength: function (b) { + b = b.strip().gsub(" ", " "); + var a; + do { + a = b.length; + b = b.gsub(" ", " ") + } while (a > b.length); + return b.length + }, + getOffsetBottom: function () { + return this.offsetBottom + }, + getOffsetTop: function () { + return this.offsetTop + }, + deserialize: function (b, a) { + if (b && "undefined" != typeof b.x && "undefined" != typeof b.y) { + this.setPosition({x: b.x, y: b.y}); + if ("undefined" != typeof b.distance) { + var d = a.dockers[b.from]; + var c = a.dockers[b.to]; + if (d && c) { + this.setReferencePoint({ + dirty: true, + distance: b.distance, + intersection: {x: b.x, y: b.y}, + orientation: b.orientation, + segment: { + from: d, + fromIndex: b.from, + fromPosition: d.bounds.center(), + to: c, + toIndex: b.to, + toPosition: c.bounds.center() + } + }) + } + } + if (b.left) { + this.anchorLeft = true + } + if (b.right) { + this.anchorRight = true + } + if (b.top) { + this.anchorTop = true + } + if (b.bottom) { + this.anchorBottom = true + } + if (b.valign) { + this.verticalAlign(b.valign) + } + if (b.align) { + this.horizontalAlign(b.align) + } + } else { + if (b && "undefined" != typeof b.edge) { + this.setEdgePosition(b.edge) + } + } + }, + serialize: function () { + if (this.getEdgePosition()) { + if (this.getOriginEdgePosition() !== this.getEdgePosition()) { + return {edge: this.getEdgePosition()} + } else { + return null + } + } + if (this.position) { + var b = {x: this.position.x, y: this.position.y}; + if (this.isAnchorLeft() && this.isAnchorLeft() !== this.isOriginAnchorLeft()) { + b.left = true + } + if (this.isAnchorRight() && this.isAnchorRight() !== this.isOriginAnchorRight()) { + b.right = true + } + if (this.isAnchorTop() && this.isAnchorTop() !== this.isOriginAnchorTop()) { + b.top = true + } + if (this.isAnchorBottom() && this.isAnchorBottom() !== this.isOriginAnchorBottom()) { + b.bottom = true + } + if (this.getOriginVerticalAlign() !== this.verticalAlign()) { + b.valign = this.verticalAlign() + } + if (this.getOriginHorizontalAlign() !== this.horizontalAlign()) { + b.align = this.horizontalAlign() + } + return b + } + if (this.getReferencePoint()) { + var a = this.getReferencePoint(); + return { + distance: a.distance, + x: a.intersection.x, + y: a.intersection.y, + from: a.segment.fromIndex, + to: a.segment.toIndex, + orientation: a.orientation, + valign: this.verticalAlign(), + align: this.horizontalAlign() + } + } + return null + }, + toString: function () { + return "Label " + this.id + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.Math) { + ORYX.Core.Math = {} +} +ORYX.Core.Math.midPoint = function (b, a) { + return {x: (b.x + a.x) / 2, y: (b.y + a.y) / 2} +}; +ORYX.Core.Math.isPointInLine = function (h, f, g, e, b, a, d) { + d = d ? Math.abs(d) : 1; + if (Math.abs(g - b) <= d && Math.abs(h - g) <= d && f - Math.max(e, a) <= d && Math.min(e, a) - f <= d) { + return true + } + if (Math.abs(e - a) <= d && Math.abs(f - e) <= d && h - Math.max(g, b) <= d && Math.min(g, b) - h <= d) { + return true + } + if (h > Math.max(g, b) || h < Math.min(g, b)) { + return false + } + if (f > Math.max(e, a) || f < Math.min(e, a)) { + return false + } + var c = (e - a) / (g - b); + return Math.abs(f - ((c * h) + e - c * g)) < d +}; +ORYX.Core.Math.isPointInEllipse = function (h, f, b, g, e, d) { + if (b === undefined || g === undefined || e === undefined || d === undefined) { + throw"ORYX.Core.Math.isPointInEllipse needs a ellipse with these properties: x, y, radiusX, radiusY" + } + var c = (h - b) / e; + var a = (f - g) / d; + return c * c + a * a < 1 +}; +ORYX.Core.Math.isPointInPolygone = function (a, n, e) { + if (arguments.length < 3) { + throw"ORYX.Core.Math.isPointInPolygone needs two arguments" + } + var g = e.length - 1; + if (e[0] !== e[g - 1] || e[1] !== e[g]) { + e.push(e[0]); + e.push(e[1]) + } + var h = 0; + var c, m, b, l, k; + for (var f = 0; f < e.length - 3;) { + c = e[f]; + m = e[++f]; + b = e[++f]; + l = e[f + 1]; + k = (n - m) * (b - c) - (a - c) * (l - m); + if ((m >= n) != (l >= n)) { + h += l - m >= 0 ? k >= 0 : k <= 0 + } + if (!k && Math.min(c, b) <= a && a <= Math.max(c, b) && Math.min(m, l) <= n && n <= Math.max(m, l)) { + return true + } + } + return (h % 2) ? true : false +}; +ORYX.Core.Math.distancePointLinie = function (e, d, a, b) { + var c = ORYX.Core.Math.getPointOfIntersectionPointLine(e, d, a, b); + if (!c) { + return null + } + return ORYX.Core.Math.getDistancePointToPoint(a, c) +}; +ORYX.Core.Math.getDistancePointToPoint = function (b, a) { + return Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2)) +}; +ORYX.Core.Math.getDistanceBetweenTwoPoints = function (c, b, a) { + return ORYX.Core.Math.getDistancePointToPoint(a, c) / ORYX.Core.Math.getDistancePointToPoint(c, b) +}; +ORYX.Core.Math.pointIsLeftOfLine = function (e, d, a) { + var c = ORYX.Core.Math.getVector(e, d); + var b = ORYX.Core.Math.getVector(e, a); + return ((c.x * b.y) - (b.x * c.y)) > 0 +}; +ORYX.Core.Math.getPointBetweenTwoPoints = function (b, a, c) { + c = Math.max(Math.min(c || 0, 1), 0); + if (c === 0) { + return b + } else { + if (c === 1) { + return a + } + } + return {x: b.x + ((a.x - b.x) * c), y: b.y + ((a.y - b.y) * c)} +}; +ORYX.Core.Math.getVector = function (b, a) { + return {x: a.x - b.x, y: a.y - b.y} +}; +ORYX.Core.Math.getIdentityVector = function (a) { + if (arguments.length == 2) { + a = ORYX.Core.Math.getVector(arguments[0], arguments[1]) + } + var b = Math.sqrt((a.x * a.x) + (a.y * a.y)); + return {x: a.x / (b || 1), y: a.y / (b || 1)} +}; +ORYX.Core.Math.getOrthogonalIdentityVector = function (c, b) { + var a = arguments.length == 1 ? c : ORYX.Core.Math.getIdentityVector(c, b); + return {x: a.y, y: -a.x} +}; +ORYX.Core.Math.getPointOfIntersectionPointLine = function (f, c, a, e) { + var d = Math.pow(c.x - f.x, 2) + Math.pow(c.y - f.y, 2); + if (d == 0) { + return undefined + } + var b = ((a.x - f.x) * (c.x - f.x) + (a.y - f.y) * (c.y - f.y)) / d; + if (e) { + if (!(0 <= b && b <= 1)) { + return undefined + } + } + pointOfIntersection = new Object(); + pointOfIntersection.x = f.x + b * (c.x - f.x); + pointOfIntersection.y = f.y + b * (c.y - f.y); + return pointOfIntersection +}; +ORYX.Core.Math.getTranslatedPoint = function (b, c) { + var a = c.a * b.x + c.c * b.y + c.e * 1; + var d = c.b * b.x + c.d * b.y + c.f * 1; + return {x: a, y: d} +}; +ORYX.Core.Math.getInverseMatrix = function (b) { + var c = ORYX.Core.Math.getDeterminant(b), a = b; + return { + a: c * ((a.d * 1) - (a.f * 0)), + b: c * ((a.f * 0) - (a.b * 1)), + c: c * ((a.e * 0) - (a.c * 1)), + d: c * ((a.a * 1) - (a.e * 0)), + e: c * ((a.c * a.f) - (a.e * a.d)), + f: c * ((a.e * a.b) - (a.a * a.f)) + } +}; +ORYX.Core.Math.getDeterminant = function (a) { + return (a.a * a.d * 1) + (a.c * a.f * 0) + (a.e * a.b * 0) - (a.e * a.d * 0) - (a.c * a.b * 1) - (a.a * a.f * 0) +}; +ORYX.Core.Math.getTranslatedBoundingBox = function (a) { + var h = a.getCTM(); + var f = a.getBBox(); + var e = ORYX.Core.Math.getTranslatedPoint({x: f.x, y: f.y}, h); + var g = ORYX.Core.Math.getTranslatedPoint({x: f.x, y: f.y + f.height}, h); + var b = ORYX.Core.Math.getTranslatedPoint({x: f.x + f.width, y: f.y}, h); + var c = ORYX.Core.Math.getTranslatedPoint({x: f.x + f.width, y: f.y + f.height}, h); + var k = {x: Math.min(e.x, g.x, b.x, c.x), y: Math.min(e.y, g.y, b.y, c.y)}; + var d = {x: Math.max(e.x, g.x, b.x, c.x), y: Math.max(e.y, g.y, b.y, c.y)}; + return {x: k.x, y: k.y, width: d.x - k.x, height: d.y - k.y} +}; +ORYX.Core.Math.getAngle = function (c, a) { + if (c.x == a.x && c.y == a.y) { + return 0 + } + var b = Math.asin(Math.sqrt(Math.pow(c.y - a.y, 2)) / (Math.sqrt(Math.pow(a.x - c.x, 2) + Math.pow(c.y - a.y, 2)))) * 180 / Math.PI; + if (a.x >= c.x && a.y <= c.y) { + return b + } else { + if (a.x < c.x && a.y <= c.y) { + return 180 - b + } else { + if (a.x < c.x && a.y > c.y) { + return 180 + b + } else { + return 360 - b + } + } + } +}; +new function () { + var b = 2, c = 8, e = 4, a = 1; + + function d(g, n, m, k, h, f) { + var l = 0; + if (n > f) { + l |= c + } else { + if (n < k) { + l |= e + } + } + if (g > h) { + l |= b + } else { + if (g < m) { + l |= a + } + } + return l + } + + ORYX.Core.Math.isRectOverLine = function (k, n, g, m, o, l, h, f) { + return !!ORYX.Core.Math.clipLineOnRect.apply(ORYX.Core.Math, arguments) + }; + ORYX.Core.Math.clipLineOnRect = function (h, u, g, s, f, v, q, l) { + var m, k, p, w = 0; + var n = false, o = false; + m = d(h, u, f, v, q, l); + k = d(g, s, f, v, q, l); + do { + if ((m | k) == 0) { + n = true; + o = true + } else { + if ((m & k) > 0) { + o = true + } else { + var t = 0, r = 0; + p = m != 0 ? m : k; + if ((p & c) > 0) { + t = h + (g - h) * (l - u) / (s - u); + r = l + } else { + if ((p & e) > 0) { + t = h + (g - h) * (v - u) / (s - u); + r = v + } else { + if ((p & b) > 0) { + r = u + (s - u) * (q - h) / (g - h); + t = q + } else { + if ((p & a) > 0) { + r = u + (s - u) * (f - h) / (g - h); + t = f + } + } + } + } + if (p == m) { + h = t; + u = r; + m = d(h, u, f, v, q, l) + } else { + g = t; + s = r; + k = d(g, s, f, v, q, l) + } + } + } + w++ + } while (o != true && w < 5000); + if (n) { + return {a: {x: h, y: u}, b: {x: g, y: s}} + } + return null + } +}(); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet.Stencil = { + construct: function (d, e, a, k, h, g) { + arguments.callee.$.construct.apply(this, arguments); + if (!d) { + throw"Stencilset seems corrupt." + } + if (!e) { + throw"Stencil does not provide namespace." + } + if (!a) { + throw"Stencil does not provide SVG source." + } + if (!k) { + throw"Fatal internal error loading stencilset." + } + this._source = a; + this._jsonStencil = d; + this._stencilSet = k; + this._namespace = e; + this._propertyPackages = h; + if (g && !this._jsonStencil.position) { + this._jsonStencil.position = g + } + this._view; + this._properties = new Hash(); + if (!this._jsonStencil.type || !(this._jsonStencil.type === "edge" || this._jsonStencil.type === "node")) { + throw"ORYX.Core.StencilSet.Stencil(construct): Type is not defined." + } + if (!this._jsonStencil.id || this._jsonStencil.id === "") { + throw"ORYX.Core.StencilSet.Stencil(construct): Id is not defined." + } + if (!this._jsonStencil.title || this._jsonStencil.title === "") { + throw"ORYX.Core.StencilSet.Stencil(construct): Title is not defined." + } + if (!this._jsonStencil.description) { + this._jsonStencil.description = "" + } + if (!this._jsonStencil.groups) { + this._jsonStencil.groups = [] + } + if (!this._jsonStencil.roles) { + this._jsonStencil.roles = [] + } + this._jsonStencil.roles.push(this._jsonStencil.id); + this._jsonStencil.roles.each((function (m, l) { + this._jsonStencil.roles[l] = e + m + }).bind(this)); + this._jsonStencil.roles = this._jsonStencil.roles.uniq(); + this._jsonStencil.id = e + this._jsonStencil.id; + this.postProcessProperties(); + if (!this._jsonStencil.serialize) { + this._jsonStencil.serialize = {} + } + if (!this._jsonStencil.deserialize) { + this._jsonStencil.deserialize = {} + } + if (!this._jsonStencil.layout) { + this._jsonStencil.layout = [] + } + var c = a + "view/" + d.view; + if (this._jsonStencil.view.trim().match(/</)) { + var b = new DOMParser(); + var f = b.parseFromString(this._jsonStencil.view, "text/xml"); + if (ORYX.Editor.checkClassType(f.documentElement, SVGSVGElement)) { + this._view = f.documentElement + } else { + throw"ORYX.Core.StencilSet.Stencil(_loadSVGOnSuccess): The response is not a SVG document." + } + } else { + new Ajax.Request(c, { + asynchronous: false, + method: "get", + onSuccess: this._loadSVGOnSuccess.bind(this), + onFailure: this._loadSVGOnFailure.bind(this) + }) + } + }, postProcessProperties: function () { + if (this._jsonStencil.propertyPackages && this._jsonStencil.propertyPackages instanceof Array) { + this._jsonStencil.propertyPackages.each((function (b) { + var a = this._propertyPackages[b]; + if (a) { + a.each((function (d) { + var c = new ORYX.Core.StencilSet.Property(d, this._namespace, this); + this._properties[c.prefix() + "-" + c.id()] = c + }).bind(this)) + } + }).bind(this)) + } + if (this._jsonStencil.properties && this._jsonStencil.properties instanceof Array) { + this._jsonStencil.properties.each((function (b) { + var a = new ORYX.Core.StencilSet.Property(b, this._namespace, this); + this._properties[a.prefix() + "-" + a.id()] = a + }).bind(this)) + } + }, equals: function (a) { + return (this.id() === a.id()) + }, stencilSet: function () { + return this._stencilSet + }, type: function () { + return this._jsonStencil.type + }, namespace: function () { + return this._namespace + }, id: function () { + return this._jsonStencil.id + }, idWithoutNs: function () { + return this.id().replace(this.namespace(), "") + }, title: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonStencil, "title") + }, description: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonStencil, "description") + }, groups: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonStencil, "groups") + }, position: function () { + return (isNaN(this._jsonStencil.position) ? 0 : this._jsonStencil.position) + }, view: function () { + return this._view.cloneNode(true) || this._view + }, icon: function () { + return this._jsonStencil.icon + }, fixedAspectRatio: function () { + return this._jsonStencil.fixedAspectRatio === true + }, hasMultipleRepositoryEntries: function () { + return (this.getRepositoryEntries().length > 0) + }, getRepositoryEntries: function () { + return (this._jsonStencil.repositoryEntries) ? $A(this._jsonStencil.repositoryEntries) : $A([]) + }, properties: function () { + return this._properties.values() + }, property: function (a) { + return this._properties[a] + }, roles: function () { + return this._jsonStencil.roles + }, defaultAlign: function () { + if (!this._jsonStencil.defaultAlign) { + return "east" + } + return this._jsonStencil.defaultAlign + }, serialize: function (a, b) { + return this._jsonStencil.serialize + }, deserialize: function (a, b) { + return this._jsonStencil.deserialize + }, layout: function (a) { + return this._jsonStencil.layout + }, addProperty: function (c, b) { + if (c && b) { + var a = new ORYX.Core.StencilSet.Property(c, b, this); + this._properties[a.prefix() + "-" + a.id()] = a + } + }, removeProperty: function (b) { + if (b) { + var a = this._properties.values().find(function (c) { + return (b == c.id()) + }); + if (a) { + delete this._properties[a.prefix() + "-" + a.id()] + } + } + }, _loadSVGOnSuccess: function (a) { + var b = null; + b = a.responseXML; + if (ORYX.Editor.checkClassType(b.documentElement, SVGSVGElement)) { + this._view = b.documentElement + } else { + throw"ORYX.Core.StencilSet.Stencil(_loadSVGOnSuccess): The response is not a SVG document." + } + }, _loadSVGOnFailure: function (a) { + throw"ORYX.Core.StencilSet.Stencil(_loadSVGOnFailure): Loading SVG document failed." + }, toString: function () { + return "Stencil " + this.title() + " (" + this.id() + ")" + } +}; +ORYX.Core.StencilSet.Stencil = Clazz.extend(ORYX.Core.StencilSet.Stencil); + +function _evenMoreEvilHack(c, e) { + if (window.ActiveXObject) { + var b = new ActiveXObject("MSXML.DomDocument"); + b.loadXML(c); + return b + } else { + if (window.XMLHttpRequest) { + var a = new XMLHttpRequest; + a.open("GET", "data:" + (e || "application/xml") + ";charset=utf-8," + encodeURIComponent(c), false); + if (a.overrideMimeType) { + a.overrideMimeType(e) + } + a.send(null); + return a.responseXML + } + } +} + +function _evilSafariHack(d) { + var b = d; + var a = "data:text/xml;charset=utf-8," + encodeURIComponent(b); + var e = null; + var c = new XMLHttpRequest(); + c.open("GET", a); + c.onload = function () { + e = c.responseXML + }; + c.send(null); + return e +} + +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet.Property = Clazz.extend({ + construct: function (d, b, c) { + arguments.callee.$.construct.apply(this, arguments); + this._jsonProp = d || ORYX.Log.error("Parameter jsonProp is not defined."); + this._namespace = b || ORYX.Log.error("Parameter namespace is not defined."); + this._stencil = c || ORYX.Log.error("Parameter stencil is not defined."); + this._items = {}; + this._complexItems = {}; + this._hidden = false; + d.id = d.id || ORYX.Log.error("ORYX.Core.StencilSet.Property(construct): Id is not defined."); + d.id = d.id.toLowerCase(); + if (!d.type) { + ORYX.Log.info("Type is not defined for stencil '%0', id '%1'. Falling back to 'String'.", c, d.id); + d.type = "string" + } else { + d.type = d.type.toLowerCase() + } + d.prefix = d.prefix || "oryx"; + d.title = d.title || ""; + d.value = d.value || ""; + d.description = d.description || ""; + d.readonly = d.readonly || false; + d.optional = d.optional !== false; + if (this._jsonProp.refToView) { + if (!(this._jsonProp.refToView instanceof Array)) { + this._jsonProp.refToView = [this._jsonProp.refToView] + } + } else { + this._jsonProp.refToView = [] + } + var a = this.getMinForType(d.type); + if (d.min === undefined || d.min === null) { + d.min = a + } else { + if (d.min < a) { + d.min = a + } + } + var e = this.getMaxForType(d.type); + if (d.max === undefined || d.max === null) { + d.max = e + } else { + if (d.max > e) { + d.min = e + } + } + if (!d.fillOpacity) { + d.fillOpacity = false + } + if ("number" != typeof d.lightness) { + d.lightness = 1 + } else { + d.lightness = Math.max(0, Math.min(1, d.lightness)) + } + if (!d.strokeOpacity) { + d.strokeOpacity = false + } + if (d.length === undefined || d.length === null) { + d.length = Number.MAX_VALUE + } + if (!d.wrapLines) { + d.wrapLines = false + } + if (!d.dateFormat) { + d.dateFormat = ORYX.I18N.PropertyWindow.dateFormat || "m/d/y" + } + if (!d.fill) { + d.fill = false + } + if (!d.stroke) { + d.stroke = false + } + if (!d.inverseBoolean) { + d.inverseBoolean = false + } + if (!d.directlyEditable && d.directlyEditable != false) { + d.directlyEditable = true + } + if (d.visible !== false) { + d.visible = true + } + if (d.isList !== true) { + d.isList = false; + if (!d.list || !(d.list instanceof Array)) { + d.list = [] + } + } + if (!d.category) { + if (d.popular) { + d.category = "popular" + } else { + d.category = "others" + } + } + if (!d.alwaysAppearInMultiselect) { + d.alwaysAppearInMultiselect = false + } + if (d.type === ORYX.CONFIG.TYPE_CHOICE) { + if (d.items && d.items instanceof Array) { + d.items.each((function (f) { + this._items[f.value.toLowerCase()] = new ORYX.Core.StencilSet.PropertyItem(f, b, this) + }).bind(this)) + } else { + throw"ORYX.Core.StencilSet.Property(construct): No property items defined." + } + } else { + if (d.type === ORYX.CONFIG.TYPE_COMPLEX || d.type == ORYX.CONFIG.TYPE_MULTIPLECOMPLEX) { + if (d.complexItems && d.complexItems instanceof Array) { + d.complexItems.each((function (f) { + this._complexItems[f.id.toLowerCase()] = new ORYX.Core.StencilSet.ComplexPropertyItem(f, b, this) + }).bind(this)) + } + } + } + }, getMinForType: function (a) { + if (a.toLowerCase() == ORYX.CONFIG.TYPE_INTEGER) { + return -Math.pow(2, 31) + } else { + return -Number.MAX_VALUE + 1 + } + }, getMaxForType: function (a) { + if (a.toLowerCase() == ORYX.CONFIG.TYPE_INTEGER) { + return Math.pow(2, 31) - 1 + } else { + return Number.MAX_VALUE + } + }, equals: function (a) { + return (this._namespace === a.namespace() && this.id() === a.id()) ? true : false + }, namespace: function () { + return this._namespace + }, stencil: function () { + return this._stencil + }, id: function () { + return this._jsonProp.id + }, prefix: function () { + return this._jsonProp.prefix + }, type: function () { + return this._jsonProp.type + }, inverseBoolean: function () { + return this._jsonProp.inverseBoolean + }, category: function () { + return this._jsonProp.category + }, setCategory: function (a) { + this._jsonProp.category = a + }, directlyEditable: function () { + return this._jsonProp.directlyEditable + }, visible: function () { + return this._jsonProp.visible + }, title: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonProp, "title") + }, value: function () { + return this._jsonProp.value + }, readonly: function () { + return this._jsonProp.readonly + }, optional: function () { + return this._jsonProp.optional + }, description: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonProp, "description") + }, refToView: function () { + return this._jsonProp.refToView + }, min: function () { + return this._jsonProp.min + }, max: function () { + return this._jsonProp.max + }, fillOpacity: function () { + return this._jsonProp.fillOpacity + }, strokeOpacity: function () { + return this._jsonProp.strokeOpacity + }, length: function () { + return this._jsonProp.length ? this._jsonProp.length : Number.MAX_VALUE + }, wrapLines: function () { + return this._jsonProp.wrapLines + }, dateFormat: function () { + return this._jsonProp.dateFormat + }, fill: function () { + return this._jsonProp.fill + }, lightness: function () { + return this._jsonProp.lightness + }, stroke: function () { + return this._jsonProp.stroke + }, items: function () { + return $H(this._items).values() + }, item: function (a) { + if (a) { + return this._items[a.toLowerCase()] + } else { + return null + } + }, toString: function () { + return "Property " + this.title() + " (" + this.id() + ")" + }, complexItems: function () { + return $H(this._complexItems).values() + }, complexItem: function (a) { + if (a) { + return this._complexItems[a.toLowerCase()] + } else { + return null + } + }, complexAttributeToView: function () { + return this._jsonProp.complexAttributeToView || "" + }, isList: function () { + return !!this._jsonProp.isList + }, getListItems: function () { + return this._jsonProp.list + }, linkableType: function () { + return this._jsonProp.linkableType || "" + }, alwaysAppearInMultiselect: function () { + return this._jsonProp.alwaysAppearInMultiselect + }, popular: function () { + return this._jsonProp.popular || false + }, setPopular: function () { + this._jsonProp.popular = true + }, hide: function () { + this._hidden = true + }, isHidden: function () { + return this._hidden + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet.PropertyItem = Clazz.extend({ + construct: function (a, b, c) { + arguments.callee.$.construct.apply(this, arguments); + if (!a) { + throw"ORYX.Core.StencilSet.PropertyItem(construct): Parameter jsonItem is not defined." + } + if (!b) { + throw"ORYX.Core.StencilSet.PropertyItem(construct): Parameter namespace is not defined." + } + if (!c) { + throw"ORYX.Core.StencilSet.PropertyItem(construct): Parameter property is not defined." + } + this._jsonItem = a; + this._namespace = b; + this._property = c; + if (!a.value) { + throw"ORYX.Core.StencilSet.PropertyItem(construct): Value is not defined." + } + if (this._jsonItem.refToView) { + if (!(this._jsonItem.refToView instanceof Array)) { + this._jsonItem.refToView = [this._jsonItem.refToView] + } + } else { + this._jsonItem.refToView = [] + } + }, equals: function (a) { + return (this.property().equals(a.property()) && this.value() === a.value()) + }, namespace: function () { + return this._namespace + }, property: function () { + return this._property + }, value: function () { + return this._jsonItem.value + }, title: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonItem, "title") + }, refToView: function () { + return this._jsonItem.refToView + }, icon: function () { + return (this._jsonItem.icon) ? this.property().stencil()._source + "icons/" + this._jsonItem.icon : "" + }, toString: function () { + return "PropertyItem " + this.property() + " (" + this.value() + ")" + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet.ComplexPropertyItem = Clazz.extend({ + construct: function (a, b, c) { + arguments.callee.$.construct.apply(this, arguments); + if (!a) { + throw"ORYX.Core.StencilSet.ComplexPropertyItem(construct): Parameter jsonItem is not defined." + } + if (!b) { + throw"ORYX.Core.StencilSet.ComplexPropertyItem(construct): Parameter namespace is not defined." + } + if (!c) { + throw"ORYX.Core.StencilSet.ComplexPropertyItem(construct): Parameter property is not defined." + } + this._jsonItem = a; + this._namespace = b; + this._property = c; + this._items = new Hash(); + this._complexItems = new Hash(); + if (!a.name) { + throw"ORYX.Core.StencilSet.ComplexPropertyItem(construct): Name is not defined." + } + if (!a.type) { + throw"ORYX.Core.StencilSet.ComplexPropertyItem(construct): Type is not defined." + } else { + a.type = a.type.toLowerCase() + } + if (a.type === ORYX.CONFIG.TYPE_CHOICE) { + if (a.items && a.items instanceof Array) { + a.items.each((function (d) { + this._items[d.value] = new ORYX.Core.StencilSet.PropertyItem(d, b, this) + }).bind(this)) + } else { + throw"ORYX.Core.StencilSet.Property(construct): No property items defined." + } + } else { + if (a.type === ORYX.CONFIG.TYPE_COMPLEX) { + if (a.complexItems && a.complexItems instanceof Array) { + a.complexItems.each((function (d) { + this._complexItems[d.id] = new ORYX.Core.StencilSet.ComplexPropertyItem(d, b, this) + }).bind(this)) + } else { + throw"ORYX.Core.StencilSet.Property(construct): No property items defined." + } + } + } + }, equals: function (a) { + return (this.property().equals(a.property()) && this.name() === a.name()) + }, namespace: function () { + return this._namespace + }, property: function () { + return this._property + }, name: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonItem, "name") + }, id: function () { + return this._jsonItem.id + }, type: function () { + return this._jsonItem.type + }, optional: function () { + return this._jsonItem.optional + }, width: function () { + return this._jsonItem.width + }, value: function () { + return this._jsonItem.value + }, items: function () { + return this._items.values() + }, complexItems: function () { + return this._complexItems.values() + }, disable: function () { + return this._jsonItem.disable + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet.Rules = { + construct: function () { + arguments.callee.$.construct.apply(this, arguments); + this._stencilSets = []; + this._stencils = []; + this._containerStencils = []; + this._cachedConnectSET = new Hash(); + this._cachedConnectSE = new Hash(); + this._cachedConnectTE = new Hash(); + this._cachedCardSE = new Hash(); + this._cachedCardTE = new Hash(); + this._cachedContainPC = new Hash(); + this._cachedMorphRS = new Hash(); + this._connectionRules = new Hash(); + this._cardinalityRules = new Hash(); + this._containmentRules = new Hash(); + this._morphingRules = new Hash(); + this._layoutRules = new Hash() + }, initializeRules: function (l) { + var k = this._stencilSets.find(function (o) { + return (o.namespace() == l.namespace()) + }); + if (k) { + var f = this._stencilSets.clone(); + f = f.without(k); + f.push(l); + this._stencilSets = []; + this._stencils = []; + this._containerStencils = []; + this._cachedConnectSET = new Hash(); + this._cachedConnectSE = new Hash(); + this._cachedConnectTE = new Hash(); + this._cachedCardSE = new Hash(); + this._cachedCardTE = new Hash(); + this._cachedContainPC = new Hash(); + this._cachedMorphRS = new Hash(); + this._connectionRules = new Hash(); + this._cardinalityRules = new Hash(); + this._containmentRules = new Hash(); + this._morphingRules = new Hash(); + this._layoutRules = new Hash(); + f.each(function (o) { + this.initializeRules(o) + }.bind(this)); + return + } else { + this._stencilSets.push(l); + var m = new Hash(l.jsonRules()); + var e = l.namespace(); + var b = l.stencils(); + l.extensions().values().each(function (o) { + if (o.rules) { + if (o.rules.connectionRules) { + m.connectionRules = m.connectionRules.concat(o.rules.connectionRules) + } + if (o.rules.cardinalityRules) { + m.cardinalityRules = m.cardinalityRules.concat(o.rules.cardinalityRules) + } + if (o.rules.containmentRules) { + m.containmentRules = m.containmentRules.concat(o.rules.containmentRules) + } + if (o.rules.morphingRules) { + m.morphingRules = m.morphingRules.concat(o.rules.morphingRules) + } + } + if (o.stencils) { + b = b.concat(o.stencils) + } + }); + this._stencils = this._stencils.concat(l.stencils()); + var g = this._connectionRules; + if (m.connectionRules) { + m.connectionRules.each((function (o) { + if (this._isRoleOfOtherNamespace(o.role)) { + if (!g[o.role]) { + g[o.role] = new Hash() + } + } else { + if (!g[e + o.role]) { + g[e + o.role] = new Hash() + } + } + o.connects.each((function (p) { + var s = []; + if (p.to) { + if (!(p.to instanceof Array)) { + p.to = [p.to] + } + p.to.each((function (t) { + if (this._isRoleOfOtherNamespace(t)) { + s.push(t) + } else { + s.push(e + t) + } + }).bind(this)) + } + var r, q; + if (this._isRoleOfOtherNamespace(o.role)) { + r = o.role + } else { + r = e + o.role + } + if (this._isRoleOfOtherNamespace(p.from)) { + q = p.from + } else { + q = e + p.from + } + if (!g[r][q]) { + g[r][q] = s + } else { + g[r][q] = g[r][q].concat(s) + } + }).bind(this)) + }).bind(this)) + } + var c = this._cardinalityRules; + if (m.cardinalityRules) { + m.cardinalityRules.each((function (q) { + var o; + if (this._isRoleOfOtherNamespace(q.role)) { + o = q.role + } else { + o = e + q.role + } + if (!c[o]) { + c[o] = {}; + for (i in q) { + c[o][i] = q[i] + } + } + var r = new Hash(); + if (q.outgoingEdges) { + q.outgoingEdges.each((function (s) { + if (this._isRoleOfOtherNamespace(s.role)) { + r[s.role] = s + } else { + r[e + s.role] = s + } + }).bind(this)) + } + c[o].outgoingEdges = r; + var p = new Hash(); + if (q.incomingEdges) { + q.incomingEdges.each((function (s) { + if (this._isRoleOfOtherNamespace(s.role)) { + p[s.role] = s + } else { + p[e + s.role] = s + } + }).bind(this)) + } + c[o].incomingEdges = p + }).bind(this)) + } + var a = this._containmentRules; + if (m.containmentRules) { + m.containmentRules.each((function (p) { + var o; + if (this._isRoleOfOtherNamespace(p.role)) { + o = p.role + } else { + this._containerStencils.push(e + p.role); + o = e + p.role + } + if (!a[o]) { + a[o] = [] + } + (p.contains || []).each((function (q) { + if (this._isRoleOfOtherNamespace(q)) { + a[o].push(q) + } else { + a[o].push(e + q) + } + }).bind(this)) + }).bind(this)) + } + var d = this._morphingRules; + if (m.morphingRules) { + m.morphingRules.each((function (p) { + var o; + if (this._isRoleOfOtherNamespace(p.role)) { + o = p.role + } else { + o = e + p.role + } + if (!d[o]) { + d[o] = [] + } + if (!p.preserveBounds) { + p.preserveBounds = false + } + p.baseMorphs.each((function (r) { + var q = this._getStencilById(e + r); + if (q) { + d[o].push(q) + } + }).bind(this)) + }).bind(this)) + } + var h = this._layoutRules; + if (m.layoutRules) { + var n = function (p) { + return {edgeRole: p.edgeRole || undefined, t: p.t || 1, r: p.r || 1, b: p.b || 1, l: p.l || 1} + }; + m.layoutRules.each(function (p) { + var o; + if (this._isRoleOfOtherNamespace(p.role)) { + o = p.role + } else { + o = e + p.role + } + if (!h[o]) { + h[o] = {} + } + if (p["in"]) { + h[o]["in"] = n(p["in"]) + } + if (p.ins) { + h[o]["ins"] = (p.ins || []).map(function (q) { + return n(q) + }) + } + if (p.out) { + h[o]["out"] = n(p.out) + } + if (p.outs) { + h[o]["outs"] = (p.outs || []).map(function (q) { + return n(q) + }) + } + }.bind(this)) + } + } + }, _getStencilById: function (a) { + return this._stencils.find(function (b) { + return b.id() == a + }) + }, _cacheConnect: function (a) { + result = this._canConnect(a); + if (a.sourceStencil && a.targetStencil) { + var c = this._cachedConnectSET[a.sourceStencil.id()]; + if (!c) { + c = new Hash(); + this._cachedConnectSET[a.sourceStencil.id()] = c + } + var b = c[a.edgeStencil.id()]; + if (!b) { + b = new Hash(); + c[a.edgeStencil.id()] = b + } + b[a.targetStencil.id()] = result + } else { + if (a.sourceStencil) { + var c = this._cachedConnectSE[a.sourceStencil.id()]; + if (!c) { + c = new Hash(); + this._cachedConnectSE[a.sourceStencil.id()] = c + } + c[a.edgeStencil.id()] = result + } else { + var d = this._cachedConnectTE[a.targetStencil.id()]; + if (!d) { + d = new Hash(); + this._cachedConnectTE[a.targetStencil.id()] = d + } + d[a.edgeStencil.id()] = result + } + } + return result + }, _cacheCard: function (b) { + if (b.sourceStencil) { + var c = this._cachedCardSE[b.sourceStencil.id()]; + if (!c) { + c = new Hash(); + this._cachedCardSE[b.sourceStencil.id()] = c + } + var a = this._getMaximumNumberOfOutgoingEdge(b); + if (a == undefined) { + a = -1 + } + c[b.edgeStencil.id()] = a + } + if (b.targetStencil) { + var d = this._cachedCardTE[b.targetStencil.id()]; + if (!d) { + d = new Hash(); + this._cachedCardTE[b.targetStencil.id()] = d + } + var a = this._getMaximumNumberOfIncomingEdge(b); + if (a == undefined) { + a = -1 + } + d[b.edgeStencil.id()] = a + } + }, _cacheContain: function (b) { + var a = [this._canContain(b), this._getMaximumOccurrence(b.containingStencil, b.containedStencil)]; + if (a[1] == undefined) { + a[1] = -1 + } + var c = this._cachedContainPC[b.containingStencil.id()]; + if (!c) { + c = new Hash(); + this._cachedContainPC[b.containingStencil.id()] = c + } + c[b.containedStencil.id()] = a; + return a + }, _cacheMorph: function (b) { + var a = this._cachedMorphRS[b]; + if (!a) { + a = []; + if (this._morphingRules.keys().include(b)) { + a = this._stencils.select(function (c) { + return c.roles().include(b) + }) + } + this._cachedMorphRS[b] = a + } + return a + }, outgoingEdgeStencils: function (a) { + if (!a.sourceShape && !a.sourceStencil) { + return [] + } + if (a.sourceShape) { + a.sourceStencil = a.sourceShape.getStencil() + } + var b = []; + this._stencils.each((function (d) { + if (d.type() === "edge") { + var c = Object.clone(a); + c.edgeStencil = d; + if (this.canConnect(c)) { + b.push(d) + } + } + }).bind(this)); + return b + }, incomingEdgeStencils: function (a) { + if (!a.targetShape && !a.targetStencil) { + return [] + } + if (a.targetShape) { + a.targetStencil = a.targetShape.getStencil() + } + var b = []; + this._stencils.each((function (d) { + if (d.type() === "edge") { + var c = Object.clone(a); + c.edgeStencil = d; + if (this.canConnect(c)) { + b.push(d) + } + } + }).bind(this)); + return b + }, sourceStencils: function (b) { + if (!b || !b.edgeShape && !b.edgeStencil) { + return [] + } + if (b.targetShape) { + b.targetStencil = b.targetShape.getStencil() + } + if (b.edgeShape) { + b.edgeStencil = b.edgeShape.getStencil() + } + var a = []; + this._stencils.each((function (d) { + var c = Object.clone(b); + c.sourceStencil = d; + if (this.canConnect(c)) { + a.push(d) + } + }).bind(this)); + return a + }, targetStencils: function (a) { + if (!a || !a.edgeShape && !a.edgeStencil) { + return [] + } + if (a.sourceShape) { + a.sourceStencil = a.sourceShape.getStencil() + } + if (a.edgeShape) { + a.edgeStencil = a.edgeShape.getStencil() + } + var b = []; + this._stencils.each((function (d) { + var c = Object.clone(a); + c.targetStencil = d; + if (this.canConnect(c)) { + b.push(d) + } + }).bind(this)); + return b + }, canConnect: function (c) { + if (!c || (!c.sourceShape && !c.sourceStencil && !c.targetShape && !c.targetStencil) || !c.edgeShape && !c.edgeStencil) { + return false + } + if (c.sourceShape) { + c.sourceStencil = c.sourceShape.getStencil() + } + if (c.targetShape) { + c.targetStencil = c.targetShape.getStencil() + } + if (c.edgeShape) { + c.edgeStencil = c.edgeShape.getStencil() + } + var b; + if (c.sourceStencil && c.targetStencil) { + var e = this._cachedConnectSET[c.sourceStencil.id()]; + if (!e) { + b = this._cacheConnect(c) + } else { + var d = e[c.edgeStencil.id()]; + if (!d) { + b = this._cacheConnect(c) + } else { + var f = d[c.targetStencil.id()]; + if (f == undefined) { + b = this._cacheConnect(c) + } else { + b = f + } + } + } + } else { + if (c.sourceStencil) { + var e = this._cachedConnectSE[c.sourceStencil.id()]; + if (!e) { + b = this._cacheConnect(c) + } else { + var d = e[c.edgeStencil.id()]; + if (d == undefined) { + b = this._cacheConnect(c) + } else { + b = d + } + } + } else { + var f = this._cachedConnectTE[c.targetStencil.id()]; + if (!f) { + b = this._cacheConnect(c) + } else { + var d = f[c.edgeStencil.id()]; + if (d == undefined) { + b = this._cacheConnect(c) + } else { + b = d + } + } + } + } + if (b) { + if (c.sourceShape) { + var e = this._cachedCardSE[c.sourceStencil.id()]; + if (!e) { + this._cacheCard(c); + e = this._cachedCardSE[c.sourceStencil.id()] + } + var a = e[c.edgeStencil.id()]; + if (a == undefined) { + this._cacheCard(c) + } + a = e[c.edgeStencil.id()]; + if (a != -1) { + b = c.sourceShape.getOutgoingShapes().all(function (g) { + if ((g.getStencil().id() === c.edgeStencil.id()) && ((c.edgeShape) ? g !== c.edgeShape : true)) { + a--; + return (a > 0) ? true : false + } else { + return true + } + }) + } + } + if (c.targetShape) { + var f = this._cachedCardTE[c.targetStencil.id()]; + if (!f) { + this._cacheCard(c); + f = this._cachedCardTE[c.targetStencil.id()] + } + var a = f[c.edgeStencil.id()]; + if (a == undefined) { + this._cacheCard(c) + } + a = f[c.edgeStencil.id()]; + if (a != -1) { + b = c.targetShape.getIncomingShapes().all(function (g) { + if ((g.getStencil().id() === c.edgeStencil.id()) && ((c.edgeShape) ? g !== c.edgeShape : true)) { + a--; + return (a > 0) ? true : false + } else { + return true + } + }) + } + } + } + return b + }, _canConnect: function (b) { + if (!b || (!b.sourceShape && !b.sourceStencil && !b.targetShape && !b.targetStencil) || !b.edgeShape && !b.edgeStencil) { + return false + } + if (b.sourceShape) { + b.sourceStencil = b.sourceShape.getStencil() + } + if (b.targetShape) { + b.targetStencil = b.targetShape.getStencil() + } + if (b.edgeShape) { + b.edgeStencil = b.edgeShape.getStencil() + } + var c; + var a = this._getConnectionRulesOfEdgeStencil(b.edgeStencil); + if (a.keys().length === 0) { + c = false + } else { + if (b.sourceStencil) { + c = b.sourceStencil.roles().any(function (e) { + var d = a[e]; + if (!d) { + return false + } + if (b.targetStencil) { + return (d.any(function (f) { + return b.targetStencil.roles().member(f) + })) + } else { + return true + } + }) + } else { + c = a.values().any(function (d) { + return b.targetStencil.roles().any(function (e) { + return d.member(e) + }) + }) + } + } + return c + }, isContainer: function (a) { + return this._containerStencils.member(a.getStencil().id()) + }, canContain: function (c) { + if (!c || !c.containingStencil && !c.containingShape || !c.containedStencil && !c.containedShape) { + return false + } + if (c.containedShape) { + c.containedStencil = c.containedShape.getStencil() + } + if (c.containingShape) { + c.containingStencil = c.containingShape.getStencil() + } + if (c.containedStencil.type() == "edge") { + return false + } + var b; + var d = this._cachedContainPC[c.containingStencil.id()]; + if (!d) { + b = this._cacheContain(c) + } else { + b = d[c.containedStencil.id()]; + if (!b) { + b = this._cacheContain(c) + } + } + if (!b[0]) { + return false + } else { + if (b[1] == -1) { + return true + } else { + if (c.containingShape) { + var a = b[1]; + return c.containingShape.getChildShapes(false).all(function (e) { + if (e.getStencil().id() === c.containedStencil.id()) { + a--; + return (a > 0) ? true : false + } else { + return true + } + }) + } else { + return true + } + } + } + }, _canContain: function (b) { + if (!b || !b.containingStencil && !b.containingShape || !b.containedStencil && !b.containedShape) { + return false + } + if (b.containedShape) { + b.containedStencil = b.containedShape.getStencil() + } + if (b.containingShape) { + b.containingStencil = b.containingShape.getStencil() + } + var a; + a = b.containingStencil.roles().any((function (d) { + var c = this._containmentRules[d]; + if (c) { + return c.any(function (e) { + return b.containedStencil.roles().member(e) + }) + } else { + return false + } + }).bind(this)); + return a + }, morphStencils: function (b) { + if (!b.stencil && !b.shape) { + return [] + } + if (b.shape) { + b.stencil = b.shape.getStencil() + } + var a = []; + b.stencil.roles().each(function (d) { + this._cacheMorph(d).each(function (e) { + a.push(e) + }) + }.bind(this)); + var c = this.baseMorphs(); + a = a.uniq().sort(function (e, d) { + return c.include(e) && !c.include(d) ? -1 : (c.include(d) && !c.include(e) ? 1 : 0) + }); + return a + }, baseMorphs: function () { + var a = []; + this._morphingRules.each(function (b) { + b.value.each(function (c) { + a.push(c) + }) + }); + return a + }, containsMorphingRules: function () { + return this._stencilSets.any(function (a) { + return !!a.jsonRules().morphingRules + }) + }, connectMorph: function (e) { + if (!e || (!e.sourceShape && !e.sourceStencil && !e.targetShape && !e.targetStencil)) { + return false + } + if (e.sourceShape) { + e.sourceStencil = e.sourceShape.getStencil() + } + if (e.targetShape) { + e.targetStencil = e.targetShape.getStencil() + } + var a = this.incomingEdgeStencils(e); + var d = this.outgoingEdgeStencils(e); + var c = a.select(function (f) { + return d.member(f) + }); + var b = this.baseMorphs().select(function (f) { + return c.member(f) + }); + if (b.size() > 0) { + return b[0] + } else { + if (c.size() > 0) { + return c[0] + } + } + return null + }, showInShapeMenu: function (a) { + return this._stencilSets.any(function (b) { + return b.jsonRules().morphingRules.any(function (c) { + return a.roles().include(b.namespace() + c.role) && c.showInShapeMenu !== false + }) + }) + }, preserveBounds: function (a) { + return this._stencilSets.any(function (b) { + return b.jsonRules().morphingRules.any(function (c) { + return a.roles().include(b.namespace() + c.role) && c.preserveBounds + }) + }) + }, getLayoutingRules: function (b, d) { + if (!b || !(b instanceof ORYX.Core.Shape)) { + return + } + var c = {"in": {}, out: {}}; + var a = function (f, e) { + if (f && f[e]) { + ["t", "r", "b", "l"].each(function (g) { + c[e][g] = Math.max(f[e][g], c[e][g] || 0) + }) + } + if (f && f[e + "s"] instanceof Array) { + ["t", "r", "b", "l"].each(function (k) { + var g = f[e + "s"].find(function (l) { + return !l.edgeRole + }); + var h; + if (d instanceof ORYX.Core.Edge) { + h = f[e + "s"].find(function (l) { + return this._hasRole(d, l.edgeRole) + }.bind(this)) + } + c[e][k] = Math.max(h ? h[k] : g[k], c[e][k] || 0) + }.bind(this)) + } + }.bind(this); + b.getStencil().roles().each(function (e) { + if (this._layoutRules[e]) { + a(this._layoutRules[e], "in"); + a(this._layoutRules[e], "out") + } + }.bind(this)); + ["in", "out"].each(function (e) { + ["t", "r", "b", "l"].each(function (f) { + c[e][f] = c[e][f] !== undefined ? c[e][f] : 1 + }) + }); + return c + }, _hasRole: function (b, c) { + if (!(b instanceof ORYX.Core.Shape) || !c) { + return + } + var a = b.getStencil().roles().any(function (d) { + return d == c + }); + return a || b.getStencil().id() == (b.getStencil().namespace() + c) + }, _stencilsWithRole: function (a) { + return this._stencils.findAll(function (b) { + return (b.roles().member(a)) ? true : false + }) + }, _edgesWithRole: function (a) { + return this._stencils.findAll(function (b) { + return (b.roles().member(a) && b.type() === "edge") ? true : false + }) + }, _nodesWithRole: function (a) { + return this._stencils.findAll(function (b) { + return (b.roles().member(a) && b.type() === "node") ? true : false + }) + }, _getMaximumOccurrence: function (b, c) { + var a; + c.roles().each((function (e) { + var d = this._cardinalityRules[e]; + if (d && d.maximumOccurrence) { + if (a) { + a = Math.min(a, d.maximumOccurrence) + } else { + a = d.maximumOccurrence + } + } + }).bind(this)); + return a + }, _getMaximumNumberOfOutgoingEdge: function (b) { + if (!b || !b.sourceStencil || !b.edgeStencil) { + return false + } + var a; + b.sourceStencil.roles().each((function (d) { + var c = this._cardinalityRules[d]; + if (c && c.outgoingEdges) { + b.edgeStencil.roles().each(function (e) { + var f = c.outgoingEdges[e]; + if (f && f.maximum) { + if (a) { + a = Math.min(a, f.maximum) + } else { + a = f.maximum + } + } + }) + } + }).bind(this)); + return a + }, _getMaximumNumberOfIncomingEdge: function (b) { + if (!b || !b.targetStencil || !b.edgeStencil) { + return false + } + var a; + b.targetStencil.roles().each((function (d) { + var c = this._cardinalityRules[d]; + if (c && c.incomingEdges) { + b.edgeStencil.roles().each(function (e) { + var f = c.incomingEdges[e]; + if (f && f.maximum) { + if (a) { + a = Math.min(a, f.maximum) + } else { + a = f.maximum + } + } + }) + } + }).bind(this)); + return a + }, _getConnectionRulesOfEdgeStencil: function (b) { + var a = new Hash(); + b.roles().each((function (c) { + if (this._connectionRules[c]) { + this._connectionRules[c].each(function (d) { + if (a[d.key]) { + a[d.key] = a[d.key].concat(d.value) + } else { + a[d.key] = d.value + } + }) + } + }).bind(this)); + return a + }, _isRoleOfOtherNamespace: function (a) { + return (a.indexOf("#") > 0) + }, toString: function () { + return "Rules" + } +}; +ORYX.Core.StencilSet.Rules = Clazz.extend(ORYX.Core.StencilSet.Rules); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet.StencilSet = Clazz.extend({ + construct: function (c, b, a) { + arguments.callee.$.construct.apply(this, arguments); + if (!c) { + throw"ORYX.Core.StencilSet.StencilSet(construct): Parameter 'source' is not defined." + } + if (c.endsWith("/")) { + c = c.substr(0, c.length - 1) + } + this._extensions = new Hash(); + this._source = c; + this._baseUrl = c.substring(0, c.lastIndexOf("/") + 1); + this._jsonObject = {}; + this._stencils = new Hash(); + this._availableStencils = new Hash(); + if (ORYX.CONFIG.BACKEND_SWITCH) { + this._baseUrl = "editor/stencilsets/bpmn2.0/"; + this._source = "stencilsets/bpmn2.0/bpmn2.0.json"; + new Ajax.Request(ACTIVITI.CONFIG.contextRoot + "/editor/stencilset?version=" + Date.now(), { + asynchronous: false, + method: "get", + onSuccess: this._init.bind(this), + onFailure: this._cancelInit.bind(this) + }) + } else { + new Ajax.Request(c, { + asynchronous: false, + method: "get", + onSuccess: this._init.bind(this), + onFailure: this._cancelInit.bind(this) + }) + } + if (this.errornous) { + throw"Loading stencil set " + c + " failed." + } + }, findRootStencilName: function () { + var a = this._stencils.values().find(function (b) { + return b._jsonStencil.mayBeRoot + }); + if (!a) { + ORYX.Log.warn("Did not find any stencil that may be root. Taking a guess."); + a = this._stencils.values()[0] + } + return a.id() + }, equals: function (a) { + return (this.namespace() === a.namespace()) + }, stencils: function (k, l, h) { + if (k && l) { + var a = this._availableStencils.values(); + var e = [k]; + var d = []; + var m = []; + while (e.size() > 0) { + var b = e.pop(); + d.push(b); + var c = a.findAll(function (o) { + var n = {containingStencil: b, containedStencil: o}; + return l.canContain(n) + }); + for (var g = 0; g < c.size(); g++) { + if (!d.member(c[g])) { + e.push(c[g]) + } + } + m = m.concat(c).uniq() + } + m = m.sortBy(function (n) { + return a.indexOf(n) + }); + if (h) { + m = m.sortBy(function (n) { + return n.groups().first() + }) + } + var f = a.findAll(function (n) { + return n.type() == "edge" + }); + m = m.concat(f); + return m + } else { + if (h) { + return this._availableStencils.values().sortBy(function (n) { + return n.groups().first() + }) + } else { + return this._availableStencils.values() + } + } + }, nodes: function () { + return this._availableStencils.values().findAll(function (a) { + return (a.type() === "node") + }) + }, edges: function () { + return this._availableStencils.values().findAll(function (a) { + return (a.type() === "edge") + }) + }, stencil: function (a) { + return this._stencils[a] + }, title: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonObject, "title") + }, description: function () { + return ORYX.Core.StencilSet.getTranslation(this._jsonObject, "description") + }, namespace: function () { + return this._jsonObject ? this._jsonObject.namespace : null + }, jsonRules: function () { + return this._jsonObject ? this._jsonObject.rules : null + }, source: function () { + return this._source + }, extensions: function () { + return this._extensions + }, addExtension: function (a) { + new Ajax.Request(a, { + method: "GET", asynchronous: false, onSuccess: (function (b) { + this.addExtensionDirectly(b.responseText) + }).bind(this), onFailure: (function (b) { + ORYX.Log.debug("Loading stencil set extension file failed. The request returned an error." + b) + }).bind(this), onException: (function (b) { + ORYX.Log.debug("Loading stencil set extension file failed. The request returned an error." + b) + }).bind(this) + }) + }, addExtensionDirectly: function (str) { + try { + eval("var jsonExtension = " + str); + if (!(jsonExtension["extends"].endsWith("#"))) { + jsonExtension["extends"] += "#" + } + if (jsonExtension["extends"] == this.namespace()) { + this._extensions[jsonExtension.namespace] = jsonExtension; + var defaultPosition = this._stencils.keys().size(); + if (jsonExtension.stencils) { + $A(jsonExtension.stencils).each(function (stencil) { + defaultPosition++; + var oStencil = new ORYX.Core.StencilSet.Stencil(stencil, this.namespace(), this._baseUrl, this, undefined, defaultPosition); + this._stencils[oStencil.id()] = oStencil; + this._availableStencils[oStencil.id()] = oStencil + }.bind(this)) + } + if (jsonExtension.properties) { + var stencils = this._stencils.values(); + stencils.each(function (stencil) { + var roles = stencil.roles(); + jsonExtension.properties.each(function (prop) { + prop.roles.any(function (role) { + role = jsonExtension["extends"] + role; + if (roles.member(role)) { + prop.properties.each(function (property) { + stencil.addProperty(property, jsonExtension.namespace) + }); + return true + } else { + return false + } + }) + }) + }.bind(this)) + } + if (jsonExtension.removeproperties) { + jsonExtension.removeproperties.each(function (remprop) { + var stencil = this.stencil(jsonExtension["extends"] + remprop.stencil); + if (stencil) { + remprop.properties.each(function (propId) { + stencil.removeProperty(propId) + }) + } + }.bind(this)) + } + if (jsonExtension.removestencils) { + $A(jsonExtension.removestencils).each(function (remstencil) { + delete this._availableStencils[jsonExtension["extends"] + remstencil] + }.bind(this)) + } + } + } catch (e) { + ORYX.Log.debug("StencilSet.addExtension: Something went wrong when initialising the stencil set extension. " + e) + } + }, removeExtension: function (a) { + var b = this._extensions[a]; + if (b) { + if (b.stencils) { + $A(b.stencils).each(function (e) { + var d = new ORYX.Core.StencilSet.Stencil(e, this.namespace(), this._baseUrl, this); + delete this._stencils[d.id()]; + delete this._availableStencils[d.id()] + }.bind(this)) + } + if (b.properties) { + var c = this._stencils.values(); + c.each(function (e) { + var d = e.roles(); + b.properties.each(function (f) { + f.roles.any(function (g) { + g = b["extends"] + g; + if (d.member(g)) { + f.properties.each(function (h) { + e.removeProperty(h.id) + }); + return true + } else { + return false + } + }) + }) + }.bind(this)) + } + if (b.removeproperties) { + b.removeproperties.each(function (f) { + var e = this.stencil(b["extends"] + f.stencil); + if (e) { + var d = $A(this._jsonObject.stencils).find(function (g) { + return g.id == e.id() + }); + f.properties.each(function (h) { + var g = $A(d.properties).find(function (k) { + return k.id == h + }); + e.addProperty(g, this.namespace()) + }.bind(this)) + } + }.bind(this)) + } + if (b.removestencils) { + $A(b.removestencils).each(function (d) { + var e = b["extends"] + d; + this._availableStencils[e] = this._stencils[e] + }.bind(this)) + } + } + delete this._extensions[a] + }, __handleStencilset: function (response) { + try { + eval("this._jsonObject =" + response.responseText) + } catch (e) { + throw"Stenciset corrupt: " + e + } + if (!this._jsonObject) { + throw"Error evaluating stencilset. It may be corrupt." + } + with (this._jsonObject) { + if (!namespace || namespace === "") { + throw"Namespace definition missing in stencilset." + } + if (!(stencils instanceof Array)) { + throw"Stencilset corrupt." + } + if (!namespace.endsWith("#")) { + namespace = namespace + "#" + } + if (!title) { + title = "" + } + if (!description) { + description = "" + } + } + }, _init: function (c) { + this.__handleStencilset(c); + var b = new Hash(); + if (this._jsonObject.propertyPackages) { + $A(this._jsonObject.propertyPackages).each((function (d) { + b[d.name] = d.properties + }).bind(this)) + } + var a = 0; + $A(this._jsonObject.stencils).each((function (e) { + a++; + var d = new ORYX.Core.StencilSet.Stencil(e, this.namespace(), this._baseUrl, this, b, a); + this._stencils[d.id()] = d; + this._availableStencils[d.id()] = d + }).bind(this)) + }, _cancelInit: function (a) { + this.errornous = true + }, toString: function () { + return "StencilSet " + this.title() + " (" + this.namespace() + ")" + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.StencilSet) { + ORYX.Core.StencilSet = {} +} +ORYX.Core.StencilSet._stencilSetsByNamespace = new Hash(); +ORYX.Core.StencilSet._stencilSetsByUrl = new Hash(); +ORYX.Core.StencilSet._StencilSetNSByEditorInstance = new Hash(); +ORYX.Core.StencilSet._rulesByEditorInstance = new Hash(); +ORYX.Core.StencilSet.stencilSets = function (b) { + var c = ORYX.Core.StencilSet._StencilSetNSByEditorInstance[b]; + var a = new Hash(); + if (c) { + c.each(function (e) { + var d = ORYX.Core.StencilSet.stencilSet(e); + a[d.namespace()] = d + }) + } + return a +}; +ORYX.Core.StencilSet.stencilSet = function (a) { + ORYX.Log.trace("Getting stencil set %0", a); + var b = a.split("#", 1); + if (b.length === 1) { + ORYX.Log.trace("Getting stencil set %0", b[0]); + return ORYX.Core.StencilSet._stencilSetsByNamespace[b[0] + "#"] + } else { + return undefined + } +}; +ORYX.Core.StencilSet.stencil = function (b) { + ORYX.Log.trace("Getting stencil for %0", b); + var a = ORYX.Core.StencilSet.stencilSet(b); + if (a) { + return a.stencil(b) + } else { + ORYX.Log.trace("Cannot fild stencil for %0", b); + return undefined + } +}; +ORYX.Core.StencilSet.rules = function (a) { + if (!ORYX.Core.StencilSet._rulesByEditorInstance[a]) { + ORYX.Core.StencilSet._rulesByEditorInstance[a] = new ORYX.Core.StencilSet.Rules() + } + return ORYX.Core.StencilSet._rulesByEditorInstance[a] +}; +ORYX.Core.StencilSet.loadStencilSet = function (a, d, c) { + stencilSet = new ORYX.Core.StencilSet.StencilSet(a, d, c); + ORYX.Core.StencilSet._stencilSetsByNamespace[stencilSet.namespace()] = stencilSet; + ORYX.Core.StencilSet._stencilSetsByUrl[a] = stencilSet; + var b = stencilSet.namespace(); + if (ORYX.Core.StencilSet._StencilSetNSByEditorInstance[c]) { + ORYX.Core.StencilSet._StencilSetNSByEditorInstance[c].push(b) + } else { + ORYX.Core.StencilSet._StencilSetNSByEditorInstance[c] = [b] + } + if (ORYX.Core.StencilSet._rulesByEditorInstance[c]) { + ORYX.Core.StencilSet._rulesByEditorInstance[c].initializeRules(stencilSet) + } else { + var e = new ORYX.Core.StencilSet.Rules(); + e.initializeRules(stencilSet); + ORYX.Core.StencilSet._rulesByEditorInstance[c] = e + } +}; +ORYX.Core.StencilSet.getTranslation = function (c, b) { + var d = ORYX.I18N.Language.toLowerCase(); + var a = c[b + "_" + d]; + if (a) { + return a + } + a = c[b + "_" + d.substr(0, 2)]; + if (a) { + return a + } + return c[b] +}; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.Command = Clazz.extend({ + construct: function () { + }, execute: function () { + throw"Command.execute() has to be implemented!" + }, rollback: function () { + throw"Command.rollback() has to be implemented!" + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.Bounds = { + construct: function () { + this._changedCallbacks = []; + this.a = {}; + this.b = {}; + this.set.apply(this, arguments); + this.suspendChange = false; + this.changedWhileSuspend = false + }, _changed: function (a) { + if (!this.suspendChange) { + this._changedCallbacks.each(function (b) { + b(this, a) + }.bind(this)); + this.changedWhileSuspend = false + } else { + this.changedWhileSuspend = true + } + }, registerCallback: function (a) { + if (!this._changedCallbacks.member(a)) { + this._changedCallbacks.push(a) + } + }, unregisterCallback: function (a) { + this._changedCallbacks = this._changedCallbacks.without(a) + }, set: function () { + var e = false; + switch (arguments.length) { + case 1: + if (this.a.x !== arguments[0].a.x) { + e = true; + this.a.x = arguments[0].a.x + } + if (this.a.y !== arguments[0].a.y) { + e = true; + this.a.y = arguments[0].a.y + } + if (this.b.x !== arguments[0].b.x) { + e = true; + this.b.x = arguments[0].b.x + } + if (this.b.y !== arguments[0].b.y) { + e = true; + this.b.y = arguments[0].b.y + } + break; + case 2: + var b = Math.min(arguments[0].x, arguments[1].x); + var a = Math.min(arguments[0].y, arguments[1].y); + var d = Math.max(arguments[0].x, arguments[1].x); + var c = Math.max(arguments[0].y, arguments[1].y); + if (this.a.x !== b) { + e = true; + this.a.x = b + } + if (this.a.y !== a) { + e = true; + this.a.y = a + } + if (this.b.x !== d) { + e = true; + this.b.x = d + } + if (this.b.y !== c) { + e = true; + this.b.y = c + } + break; + case 4: + var b = Math.min(arguments[0], arguments[2]); + var a = Math.min(arguments[1], arguments[3]); + var d = Math.max(arguments[0], arguments[2]); + var c = Math.max(arguments[1], arguments[3]); + if (this.a.x !== b) { + e = true; + this.a.x = b + } + if (this.a.y !== a) { + e = true; + this.a.y = a + } + if (this.b.x !== d) { + e = true; + this.b.x = d + } + if (this.b.y !== c) { + e = true; + this.b.y = c + } + break + } + if (e) { + this._changed(true) + } + }, moveTo: function () { + var a = this.upperLeft(); + switch (arguments.length) { + case 1: + this.moveBy({x: arguments[0].x - a.x, y: arguments[0].y - a.y}); + break; + case 2: + this.moveBy({x: arguments[0] - a.x, y: arguments[1] - a.y}); + break; + default: + } + }, moveBy: function () { + var c = false; + switch (arguments.length) { + case 1: + var b = arguments[0]; + if (b.x !== 0 || b.y !== 0) { + c = true; + this.a.x += b.x; + this.b.x += b.x; + this.a.y += b.y; + this.b.y += b.y + } + break; + case 2: + var a = arguments[0]; + var d = arguments[1]; + if (a !== 0 || d !== 0) { + c = true; + this.a.x += a; + this.b.x += a; + this.a.y += d; + this.b.y += d + } + break; + default: + } + if (c) { + this._changed() + } + }, include: function (c) { + if ((this.a.x === undefined) && (this.a.y === undefined) && (this.b.x === undefined) && (this.b.y === undefined)) { + return c + } + var a = Math.min(this.a.x, c.a.x); + var f = Math.min(this.a.y, c.a.y); + var e = Math.max(this.b.x, c.b.x); + var d = Math.max(this.b.y, c.b.y); + this.set(a, f, e, d) + }, extend: function (a) { + if (a.x !== 0 || a.y !== 0) { + this.b.x += a.x; + this.b.y += a.y; + this._changed(true) + } + }, widen: function (a) { + if (a !== 0) { + this.suspendChange = true; + this.moveBy({x: -a, y: -a}); + this.extend({x: 2 * a, y: 2 * a}); + this.suspendChange = false; + if (this.changedWhileSuspend) { + this._changed(true) + } + } + }, upperLeft: function () { + var a = {}; + a.x = this.a.x; + a.y = this.a.y; + return a + }, lowerRight: function () { + var a = {}; + a.x = this.b.x; + a.y = this.b.y; + return a + }, width: function () { + return this.b.x - this.a.x + }, height: function () { + return this.b.y - this.a.y + }, center: function () { + var a = {}; + a.x = (this.a.x + this.b.x) / 2; + a.y = (this.a.y + this.b.y) / 2; + return a + }, midPoint: function () { + var a = {}; + a.x = (this.b.x - this.a.x) / 2; + a.y = (this.b.y - this.a.y) / 2; + return a + }, centerMoveTo: function () { + var a = this.center(); + switch (arguments.length) { + case 1: + this.moveBy(arguments[0].x - a.x, arguments[0].y - a.y); + break; + case 2: + this.moveBy(arguments[0] - a.x, arguments[1] - a.y); + break + } + }, isIncluded: function (a, e) { + var f, d, e; + switch (arguments.length) { + case 1: + f = arguments[0].x; + d = arguments[0].y; + e = 0; + break; + case 2: + if (arguments[0].x && arguments[0].y) { + f = arguments[0].x; + d = arguments[0].y; + e = Math.abs(arguments[1]) + } else { + f = arguments[0]; + d = arguments[1]; + e = 0 + } + break; + case 3: + f = arguments[0]; + d = arguments[1]; + e = Math.abs(arguments[2]); + break; + default: + throw"isIncluded needs one, two or three arguments" + } + var c = this.upperLeft(); + var b = this.lowerRight(); + if (f >= c.x - e && f <= b.x + e && d >= c.y - e && d <= b.y + e) { + return true + } else { + return false + } + }, clone: function () { + return new ORYX.Core.Bounds(this) + }, toString: function () { + return "( " + this.a.x + " | " + this.a.y + " )/( " + this.b.x + " | " + this.b.y + " )" + }, serializeForERDF: function () { + return this.a.x + "," + this.a.y + "," + this.b.x + "," + this.b.y + } +}; +ORYX.Core.Bounds = Clazz.extend(ORYX.Core.Bounds); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.UIObject = { + construct: function (a) { + this.isChanged = true; + this.isResized = true; + this.isVisible = true; + this.isSelectable = false; + this.isResizable = false; + this.isMovable = false; + this.id = ORYX.Editor.provideId(); + this.parent = undefined; + this.node = undefined; + this.children = []; + this.bounds = new ORYX.Core.Bounds(); + this._changedCallback = this._changed.bind(this); + this.bounds.registerCallback(this._changedCallback); + if (a && a.eventHandlerCallback) { + this.eventHandlerCallback = a.eventHandlerCallback + } + }, _changed: function (b, a) { + this.isChanged = true; + if (this.bounds == b) { + this.isResized = a || this.isResized + } + }, update: function () { + if (this.isChanged) { + this.refresh(); + this.isChanged = false; + this.children.each(function (a) { + a.update() + }) + } + }, refresh: function () { + }, getChildren: function () { + return this.children.clone() + }, getParents: function () { + var a = []; + var b = this.parent; + while (b) { + a.push(b); + b = b.parent + } + return a + }, isParent: function (a) { + var b = this; + while (b) { + if (b === a) { + return true + } + b = b.parent + } + return false + }, getId: function () { + return this.id + }, getChildById: function (b, a) { + return this.children.find(function (c) { + if (c.getId() === b) { + return c + } else { + if (a) { + var d = c.getChildById(b, a); + if (d) { + return d + } + } + } + }) + }, add: function (a) { + if (!(this.children.member(a))) { + if (a.parent) { + a.remove(a) + } + this.children.push(a); + a.parent = this; + a.node = this.node.appendChild(a.node); + a.bounds.registerCallback(this._changedCallback) + } else { + ORYX.Log.info("add: ORYX.Core.UIObject is already a child of this object.") + } + }, remove: function (a) { + if (this.children.member(a)) { + this.children = this._uiObjects.without(a); + a.parent = undefined; + a.node = this.node.removeChild(a.node); + a.bounds.unregisterCallback(this._changedCallback) + } else { + ORYX.Log.info("remove: ORYX.Core.UIObject is not a child of this object.") + } + }, absoluteBounds: function () { + if (this.parent) { + var a = this.absoluteXY(); + return new ORYX.Core.Bounds(a.x, a.y, a.x + this.bounds.width(), a.y + this.bounds.height()) + } else { + return this.bounds.clone() + } + }, absoluteXY: function () { + if (this.parent) { + var b = this.parent.absoluteXY(); + var a = {}; + a.x = b.x + this.bounds.upperLeft().x; + a.y = b.y + this.bounds.upperLeft().y; + return a + } else { + var a = {}; + a.x = this.bounds.upperLeft().x; + a.y = this.bounds.upperLeft().y; + return a + } + }, absoluteCenterXY: function () { + if (this.parent) { + var b = this.parent.absoluteXY(); + var a = {}; + a.x = b.x + this.bounds.center().x; + a.y = b.y + this.bounds.center().y; + return a + } else { + var a = {}; + a.x = this.bounds.center().x; + a.y = this.bounds.center().y; + return a + } + }, hide: function () { + this.node.setAttributeNS(null, "display", "none"); + this.isVisible = false; + this.children.each(function (a) { + a.hide() + }) + }, show: function () { + this.node.setAttributeNS(null, "display", "inherit"); + this.isVisible = true; + this.children.each(function (a) { + a.show() + }) + }, addEventHandlers: function (a) { + a.addEventListener(ORYX.CONFIG.EVENT_MOUSEDOWN, this._delegateEvent.bind(this), false); + a.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this._delegateEvent.bind(this), false); + a.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this._delegateEvent.bind(this), false); + a.addEventListener(ORYX.CONFIG.EVENT_MOUSEOVER, this._delegateEvent.bind(this), false); + a.addEventListener(ORYX.CONFIG.EVENT_MOUSEOUT, this._delegateEvent.bind(this), false); + a.addEventListener("click", this._delegateEvent.bind(this), false); + a.addEventListener(ORYX.CONFIG.EVENT_DBLCLICK, this._delegateEvent.bind(this), false) + }, _delegateEvent: function (a) { + if (this.eventHandlerCallback) { + this.eventHandlerCallback(a, this) + } + }, toString: function () { + return "UIObject " + this.id + } +}; +ORYX.Core.UIObject = Clazz.extend(ORYX.Core.UIObject); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.AbstractShape = ORYX.Core.UIObject.extend({ + construct: function (a, c, b) { + arguments.callee.$.construct.apply(this, arguments); + this.resourceId = ORYX.Editor.provideId(); + this._stencil = c; + if (this._stencil._jsonStencil.superId) { + stencilId = this._stencil.id(); + superStencilId = stencilId.substring(0, stencilId.indexOf("#") + 1) + c._jsonStencil.superId; + stencilSet = this._stencil.stencilSet(); + this._stencil = stencilSet.stencil(superStencilId) + } + this.properties = new Hash(); + this.propertiesChanged = new Hash(); + this.hiddenProperties = new Hash(); + this._stencil.properties().each((function (e) { + var d = e.prefix() + "-" + e.id(); + this.properties[d] = e.value(); + this.propertiesChanged[d] = true + }).bind(this)); + if (c._jsonStencil.superId) { + c.properties().each((function (g) { + var e = g.prefix() + "-" + g.id(); + var f = g.value(); + var d = this.properties[e]; + this.properties[e] = f; + this.propertiesChanged[e] = true; + this._delegateEvent({type: ORYX.CONFIG.EVENT_PROPERTY_CHANGED, name: e, value: f, oldValue: d}) + }).bind(this)) + } + }, layout: function () { + }, getStencil: function () { + return this._stencil + }, getChildShapeByResourceId: function (a) { + a = ERDF.__stripHashes(a); + return this.getChildShapes(true).find(function (b) { + return b.resourceId == a + }) + }, getChildShapes: function (b, c) { + var a = []; + this.children.each(function (d) { + if (d instanceof ORYX.Core.Shape && d.isVisible) { + if (c) { + c(d) + } + a.push(d); + if (b) { + a = a.concat(d.getChildShapes(b, c)) + } + } + }); + return a + }, hasChildShape: function (a) { + return this.getChildShapes().any(function (b) { + return (b === a) || b.hasChildShape(a) + }) + }, getChildNodes: function (b, c) { + var a = []; + this.children.each(function (d) { + if (d instanceof ORYX.Core.Node && d.isVisible) { + if (c) { + c(d) + } + a.push(d) + } + if (d instanceof ORYX.Core.Shape) { + if (b) { + a = a.concat(d.getChildNodes(b, c)) + } + } + }); + return a + }, getChildEdges: function (b, c) { + var a = []; + this.children.each(function (d) { + if (d instanceof ORYX.Core.Edge && d.isVisible) { + if (c) { + c(d) + } + a.push(d) + } + if (d instanceof ORYX.Core.Shape) { + if (b) { + a = a.concat(d.getChildEdges(b, c)) + } + } + }); + return a + }, getAbstractShapesAtPosition: function () { + var b, e; + switch (arguments.length) { + case 1: + b = arguments[0].x; + e = arguments[0].y; + break; + case 2: + b = arguments[0]; + e = arguments[1]; + break; + default: + throw"getAbstractShapesAtPosition needs 1 or 2 arguments!" + } + if (this.isPointIncluded(b, e)) { + var a = []; + a.push(this); + var d = this.getChildNodes(); + var c = this.getChildEdges(); + [d, c].each(function (f) { + var g = new Hash(); + f.each(function (h) { + if (!h.isVisible) { + return + } + var l = h.getAbstractShapesAtPosition(b, e); + if (l.length > 0) { + var k = $A(h.node.parentNode.childNodes); + var m = k.indexOf(h.node); + g[m] = l + } + }); + g.keys().sort().each(function (h) { + a = a.concat(g[h]) + }) + }); + return a + } else { + return [] + } + }, setProperty: function (b, d, c) { + var a = this.properties[b]; + if (a !== d || c === true) { + this.properties[b] = d; + this.propertiesChanged[b] = true; + this._changed(); + if (!this._isInSetProperty) { + this._isInSetProperty = true; + this._delegateEvent({ + type: ORYX.CONFIG.EVENT_PROPERTY_CHANGED, + elements: [this], + name: b, + value: d, + oldValue: a + }); + delete this._isInSetProperty + } + } + }, isPropertyChanged: function () { + return this.propertiesChanged.any(function (a) { + return a.value + }) + }, setHiddenProperty: function (b, c) { + if (c === undefined) { + delete this.hiddenProperties[b]; + return + } + var a = this.hiddenProperties[b]; + if (a !== c) { + this.hiddenProperties[b] = c + } + }, isPointIncluded: function (d, c, b) { + var a = b ? b : this.absoluteBounds(); + return a.isIncluded(d, c) + }, serialize: function () { + var a = []; + a.push({name: "type", prefix: "oryx", value: this.getStencil().id(), type: "literal"}); + this.hiddenProperties.each(function (b) { + a.push({name: b.key.replace("oryx-", ""), prefix: "oryx", value: b.value, type: "literal"}) + }.bind(this)); + this.getStencil().properties().each((function (d) { + var c = d.prefix(); + var b = d.id(); + a.push({name: b, prefix: c, value: this.properties[c + "-" + b], type: "literal"}) + }).bind(this)); + return a + }, deserialize: function (b) { + var a = 0; + b = b.sort(function (d, c) { + d = Number(this.properties.keys().member(d.prefix + "-" + d.name)); + c = Number(this.properties.keys().member(c.prefix + "-" + c.name)); + return d > c ? 1 : (d < c ? -1 : 0) + }.bind(this)); + b.each((function (g) { + var c = g.name; + var f = g.prefix; + var e = g.value; + if (Object.prototype.toString.call(e) === "Object") { + e = JSON.stringify(e) + } + switch (f + "-" + c) { + case"raziel-parent": + if (!this.parent) { + break + } + var d = this.getCanvas().getChildShapeByResourceId(e); + if (d) { + d.add(this) + } + break; + default: + var h = this.getStencil().property(f + "-" + c); + if (h && h.isList() && typeof e === "string") { + if ((e || "").strip() && !e.startsWith("[") && !e.startsWith("]")) { + e = '["' + e.strip() + '"]' + } + e = ((e || "").strip() || "[]").evalJSON() + } + if (this.properties.keys().member(f + "-" + c)) { + this.setProperty(f + "-" + c, e) + } else { + if (!(c === "bounds" || c === "parent" || c === "target" || c === "dockers" || c === "docker" || c === "outgoing" || c === "incoming")) { + this.setHiddenProperty(f + "-" + c, e) + } + } + } + }).bind(this)) + }, toString: function () { + return "ORYX.Core.AbstractShape " + this.id + }, toJSON: function () { + var a = { + resourceId: this.resourceId, + properties: jQuery.extend({}, this.properties, this.hiddenProperties).inject({}, function (d, h) { + var c = h[0]; + var f = h[1]; + if (this.getStencil().property(c) && this.getStencil().property(c).type() === ORYX.CONFIG.TYPE_COMPLEX && Object.prototype.toString.call(f) === "String") { + try { + f = JSON.parse(f) + } catch (b) {var abcdef=1 + } + } else { + if (f instanceof Date && this.getStencil().property(c)) { + try { + f = f.format(this.getStencil().property(c).dateFormat()) + } catch (g) {var abcdef=1 + } + } + } + c = c.replace(/^[\w_]+-/, ""); + d[c] = f; + return d + }.bind(this)), + stencil: {id: this.getStencil().idWithoutNs()}, + childShapes: this.getChildShapes().map(function (b) { + return b.toJSON() + }) + }; + if (this.getOutgoingShapes) { + a.outgoing = this.getOutgoingShapes().map(function (b) { + return {resourceId: b.resourceId} + }) + } + if (this.bounds) { + a.bounds = {lowerRight: this.bounds.lowerRight(), upperLeft: this.bounds.upperLeft()} + } + if (this.dockers) { + a.dockers = this.dockers.map(function (b) { + var c = b.getDockedShape() && b.referencePoint ? b.referencePoint : b.bounds.center(); + c.getDocker = function () { + return b + }; + return c + }) + } + jQuery.extend(a, ORYX.Core.AbstractShape.JSONHelper); + a.getShape = function () { + return this + }.bind(this); + return a + } +}); +ORYX.Core.AbstractShape.JSONHelper = { + eachChild: function (c, b, d) { + if (!this.childShapes) { + return + } + var a = []; + this.childShapes.each(function (e) { + if (!(e.eachChild instanceof Function)) { + jQuery.extend(e, ORYX.Core.AbstractShape.JSONHelper) + } + var f = c(e, this); + if (f) { + a.push(f) + } + if (b) { + e.eachChild(c, b, d) + } + }.bind(this)); + if (d) { + this.childShapes = a + } + }, getShape: function () { + return null + }, getChildShapes: function (a) { + var b = this.childShapes; + if (a) { + this.eachChild(function (c) { + if (!(c.getChildShapes instanceof Function)) { + jQuery.extend(c, ORYX.Core.AbstractShape.JSONHelper) + } + b = b.concat(c.getChildShapes(a)) + }, true) + } + return b + }, serialize: function () { + return JSON.stringify(this) + } +}; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.Canvas = ORYX.Core.AbstractShape.extend({ + zoomLevel: 1, construct: function (a, c, b) { + arguments.callee.$.construct.apply(this, arguments); + if (!(a && a.width && a.height)) { + ORYX.Log.fatal("Canvas is missing mandatory parameters options.width and options.height."); + return + } + this.facade = b; + this.resourceId = a.id; + this.nodes = []; + this.edges = []; + this.colHighlightState = 0; + this.colHighlightEnabled = false; + this.rootNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", a.parentNode, ["svg", { + id: this.id, + width: a.width, + height: a.height + }, ["defs", {}]]); + this.rootNode.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); + this.rootNode.setAttribute("xmlns:svg", "http://www.w3.org/2000/svg"); + this._htmlContainer = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", a.parentNode, ["div", { + id: "oryx_canvas_htmlContainer", + style: "position:absolute; top:5px" + }]); + this.underlayNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.rootNode, ["svg", {id: "underlay-container"}]); + this.columnHightlight1 = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.underlayNode, ["rect", { + x: 0, + width: ORYX.CONFIG.FORM_ROW_WIDTH + 35, + height: "100%", + style: "fill: #fff6d5", + visibility: "hidden" + }]); + this.columnHightlight2 = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.underlayNode, ["rect", { + x: ORYX.CONFIG.FORM_ROW_WIDTH + 35, + width: ORYX.CONFIG.FORM_ROW_WIDTH + 25, + height: "100%", + style: "fill: #fff6d5", + visibility: "hidden" + }]); + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.rootNode, ["g", {}, ["g", {"class": "stencils"}, ["g", {"class": "me"}], ["g", {"class": "children"}], ["g", {"class": "edge"}]], ["g", {"class": "svgcontainer"}]]); + this.node.setAttributeNS(null, "stroke", "none"); + this.node.setAttributeNS(null, "font-family", "Verdana, sans-serif"); + this.node.setAttributeNS(null, "font-size-adjust", "none"); + this.node.setAttributeNS(null, "font-style", "normal"); + this.node.setAttributeNS(null, "font-variant", "normal"); + this.node.setAttributeNS(null, "font-weight", "normal"); + this.node.setAttributeNS(null, "line-heigth", "normal"); + this.node.setAttributeNS(null, "font-size", ORYX.CONFIG.LABEL_DEFAULT_LINE_HEIGHT); + this.bounds.set(0, 0, a.width, a.height); + this.addEventHandlers(this.rootNode.parentNode); + this.rootNode.oncontextmenu = function () { + return false + } + }, focus: function () { + try { + if (!this.focusEl) { + this.focusEl = jQuery("body").append(jQuery('<a href="#" class="x-grid3-focus x-grid3-focus-canvas"/>')); + this.focusEl.swallowEvent("click", true) + } + this.focusEl.focus.defer(1, this.focusEl); + this.focusEl.blur.defer(3, this.focusEl) + } catch (a) {var abcdef=1 + } + }, setHightlightState: function (a) { + if (this.colHighlightEnabled && this.colHighlightState != a) { + if (a == 0) { + this.columnHightlight1.setAttribute("visibility", "hidden"); + this.columnHightlight2.setAttribute("visibility", "hidden") + } else { + if (a == 1) { + this.columnHightlight1.setAttribute("visibility", "visible"); + this.columnHightlight2.setAttribute("visibility", "hidden") + } else { + if (a == 2) { + this.columnHightlight1.setAttribute("visibility", "hidden"); + this.columnHightlight2.setAttribute("visibility", "visible") + } else { + if (a == 3) { + this.columnHightlight1.setAttribute("visibility", "visible"); + this.columnHightlight2.setAttribute("visibility", "visible") + } + } + } + } + this.colHighlightState = a + } + }, setHightlightStateBasedOnX: function (a) { + if (a > ORYX.CONFIG.FORM_ROW_WIDTH + 30) { + this.setHightlightState(2) + } else { + this.setHightlightState(1) + } + }, update: function () { + this.nodes.each(function (b) { + this._traverseForUpdate(b) + }.bind(this)); + var a = this.getStencil().layout(); + if (a) { + a.each(function (b) { + b.shape = this; + b.forceExecution = true; + b.target = this.rootNode; + this._delegateEvent(b) + }.bind(this)) + } + this.nodes.invoke("_update"); + this.edges.invoke("_update", true) + }, _traverseForUpdate: function (a) { + var b = a.isChanged; + a.getChildNodes(false, function (c) { + if (this._traverseForUpdate(c)) { + b = true + } + }.bind(this)); + if (b) { + a.layout(); + return true + } else { + return false + } + }, layout: function () { + }, getChildNodes: function (b, c) { + if (!b && !c) { + return this.nodes.clone() + } else { + var a = []; + this.nodes.each(function (d) { + if (c) { + c(d) + } + a.push(d); + if (b && d instanceof ORYX.Core.Shape) { + a = a.concat(d.getChildNodes(b, c)) + } + }); + return a + } + }, add: function (a, c, b) { + if (a instanceof ORYX.Core.UIObject) { + if (!(this.children.member(a))) { + if (a.parent) { + a.parent.remove(a, true) + } + if (c != undefined) { + this.children.splice(c, 0, a) + } else { + this.children.push(a) + } + a.parent = this; + if (a instanceof ORYX.Core.Shape) { + if (a instanceof ORYX.Core.Edge) { + a.addMarkers(this.rootNode.getElementsByTagNameNS(NAMESPACE_SVG, "defs")[0]); + a.node = this.node.childNodes[0].childNodes[2].appendChild(a.node); + this.edges.push(a) + } else { + a.node = this.node.childNodes[0].childNodes[1].appendChild(a.node); + this.nodes.push(a) + } + } else { + a.node = this.node.appendChild(a.node) + } + a.bounds.registerCallback(this._changedCallback); + if (this.eventHandlerCallback && b !== true) { + this.eventHandlerCallback({type: ORYX.CONFIG.EVENT_SHAPEADDED, shape: a}) + } + } else { + ORYX.Log.warn("add: ORYX.Core.UIObject is already a child of this object.") + } + } else { + ORYX.Log.fatal("add: Parameter is not of type ORYX.Core.UIObject.") + } + }, remove: function (a, b) { + if (this.children.member(a)) { + var c = a.parent; + this.children = this.children.without(a); + a.parent = undefined; + if (a instanceof ORYX.Core.Shape) { + if (a instanceof ORYX.Core.Edge) { + a.removeMarkers(); + a.node = this.node.childNodes[0].childNodes[2].removeChild(a.node); + this.edges = this.edges.without(a) + } else { + a.node = this.node.childNodes[0].childNodes[1].removeChild(a.node); + this.nodes = this.nodes.without(a) + } + } else { + a.node = this.node.removeChild(a.node) + } + if (this.eventHandlerCallback && b !== true) { + this.eventHandlerCallback({type: ORYX.CONFIG.EVENT_SHAPEREMOVED, shape: a, parent: c}) + } + a.bounds.unregisterCallback(this._changedCallback) + } else { + ORYX.Log.warn("remove: ORYX.Core.UIObject is not a child of this object.") + } + }, addShapeObjects: function (d, c) { + if (!d) { + return + } + this.initializingShapes = true; + var b = function (f, k) { + var l = ORYX.Core.StencilSet.stencil(this.getStencil().namespace() + f.stencil.id); + var h = (l.type() == "node") ? ORYX.Core.Node : ORYX.Core.Edge; + var g = new h({eventHandlerCallback: c}, l, this.facade); + g.resourceId = f.resourceId; + g.node.id = "svg-" + f.resourceId; + f.parent = "#" + ((f.parent && f.parent.resourceId) || k.resourceId); + this.add(g); + return {json: f, object: g} + }.bind(this); + var e = function (f) { + var g = []; + if (f.childShapes && f.childShapes.constructor == String) { + f.childShapes = JSON.parse(f.childShapes) + } + f.childShapes.each(function (h) { + g.push(b(h, f)); + g = g.concat(e(h)) + }); + return g + }.bind(this); + var a = e({childShapes: d, resourceId: this.resourceId}); + a.each(function (f) { + var g = []; + for (field in f.json.properties) { + g.push({prefix: "oryx", name: field, value: f.json.properties[field]}) + } + f.json.outgoing.each(function (k) { + g.push({prefix: "raziel", name: "outgoing", value: "#" + k.resourceId}) + }); + if (f.object instanceof ORYX.Core.Edge) { + var h = f.json.target || f.json.outgoing[0]; + if (h) { + g.push({prefix: "raziel", name: "target", value: "#" + h.resourceId}) + } + } + if (f.json.bounds) { + g.push({ + prefix: "oryx", + name: "bounds", + value: f.json.bounds.upperLeft.x + "," + f.json.bounds.upperLeft.y + "," + f.json.bounds.lowerRight.x + "," + f.json.bounds.lowerRight.y + }) + } + if (f.json.dockers) { + g.push({ + prefix: "oryx", name: "dockers", value: f.json.dockers.inject("", function (l, k) { + return l + k.x + " " + k.y + " " + }) + " #" + }) + } + g.push({prefix: "raziel", name: "parent", value: f.json.parent}); + f.__properties = g + }.bind(this)); + a.each(function (f) { + if (f.object instanceof ORYX.Core.Node) { + f.object.deserialize(f.__properties, f.json) + } + }); + a.each(function (f) { + if (f.object instanceof ORYX.Core.Edge) { + f.object.deserialize(f.__properties, f.json); + f.object._oldBounds = f.object.bounds.clone(); + f.object._update() + } + }); + delete this.initializingShapes; + return a.pluck("object") + }, updateSize: function () { + var b = 0; + var a = 0; + var c = 100; + this.getChildShapes(true, function (e) { + var d = e.bounds; + b = Math.max(b, d.lowerRight().x + c); + a = Math.max(a, d.lowerRight().y + c) + }); + if (this.bounds.width() < b || this.bounds.height() < a) { + this.setSize({width: Math.max(this.bounds.width(), b), height: Math.max(this.bounds.height(), a)}) + } + }, getRootNode: function () { + return this.rootNode + }, getUnderlayNode: function () { + return this.underlayNode + }, getSvgContainer: function () { + return this.node.childNodes[1] + }, getHTMLContainer: function () { + return this._htmlContainer + }, getShapesWithSharedParent: function (a) { + if (!a || a.length < 1) { + return [] + } + if (a.length == 1) { + return a + } + return a.findAll(function (c) { + var b = c.parent; + while (b) { + if (a.member(b)) { + return false + } + b = b.parent + } + return true + }) + }, setSize: function (b, a) { + if (!b || !b.width || !b.height) { + return + } + if (this.rootNode.parentNode) { + this.rootNode.parentNode.style.width = b.width + "px"; + this.rootNode.parentNode.style.height = b.height + "px" + } + this.rootNode.setAttributeNS(null, "width", b.width); + this.rootNode.setAttributeNS(null, "height", b.height); + if (!a) { + this.bounds.set({a: {x: 0, y: 0}, b: {x: b.width / this.zoomLevel, y: b.height / this.zoomLevel}}) + } + }, getSVGRepresentation: function (o) { + var k = this.getRootNode().cloneNode(true); + this._removeInvisibleElements(k); + var d, n, b, m; + this.getChildShapes(true).each(function (q) { + var s = q.absoluteBounds(); + var r = s.upperLeft(); + var e = s.lowerRight(); + if (d == undefined) { + d = r.x; + n = r.y; + b = e.x; + m = e.y + } else { + d = Math.min(d, r.x); + n = Math.min(n, r.y); + b = Math.max(b, e.x); + m = Math.max(m, e.y) + } + }); + var f = 50; + var c, p, h, g; + if (d == undefined) { + c = 0; + p = 0; + h = 0; + g = 0 + } else { + c = b; + p = m; + h = -d + f / 2; + g = -n + f / 2 + } + k.setAttributeNS(null, "width", c + f); + k.setAttributeNS(null, "height", p + f); + k.childNodes[1].removeAttributeNS(null, "transform"); + try { + var a = k.childNodes[1].childNodes[1]; + a.parentNode.removeChild(a) + } catch (l) {var abcdef=1 + } + if (o) { + $A(k.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "tspan")).each(function (e) { + e.textContent = e.textContent.escapeHTML() + }); + $A(k.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "text")).each(function (e) { + if (e.childNodes.length == 0) { + e.textContent = e.textContent.escapeHTML() + } + }) + } + $A(k.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "image")).each(function (q) { + var e = q.getAttributeNS("http://www.w3.org/1999/xlink", "href"); + if (!e.match("^(http|https)://")) { + e = window.location.protocol + "//" + window.location.host + e; + q.setAttributeNS("http://www.w3.org/1999/xlink", "href", e) + } + }); + $A(k.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "a")).each(function (e) { + e.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", (e.getAttributeNS("http://www.w3.org/1999/xlink", "href") || "").escapeHTML()) + }); + return k + }, _removeInvisibleElements: function (b) { + var a = 0; + while (a < b.childNodes.length) { + var c = b.childNodes[a]; + if (c.getAttributeNS && c.getAttributeNS(null, "visibility") === "hidden") { + b.removeChild(c) + } else { + this._removeInvisibleElements(c); + a++ + } + } + }, _delegateEvent: function (a) { + if (this.eventHandlerCallback && (a.target == this.rootNode || a.target == this.rootNode.parentNode)) { + this.eventHandlerCallback(a, this) + } + }, toString: function () { + return "Canvas " + this.id + }, toJSON: function () { + var a = arguments.callee.$.toJSON.apply(this, arguments); + a.stencilset = { + url: this.getStencil().stencilSet().source(), + namespace: this.getStencil().stencilSet().namespace() + }; + return a + } +}); +var idCounter = 0; +var ID_PREFIX = "resource"; + +function init() { + ORYX.Log.debug("Querying editor instances"); + ORYX.Editor.setMissingClasses(); + if (window.onOryxResourcesLoaded) { + window.onOryxResourcesLoaded() + } else { + var b = window.location.search.substring(4); + var a = "./service/model/" + b + "/json"; + ORYX.Editor.createByUrl(a) + } +} + +if (!ORYX) { + var ORYX = {} +} +ORYX.Editor = { + DOMEventListeners: new Hash(), selection: [], zoomLevel: 1, construct: function (d) { + this._eventsQueue = []; + this.loadedPlugins = []; + this.pluginsData = []; + this.modelMetaData = d; + var c = d; + this.id = c.modelId; + if (d.model) { + c = d.model + } + if (!this.id) { + this.id = c.id; + if (!this.id) { + this.id = ORYX.Editor.provideId() + } + } + this.fullscreen = d.fullscreen !== false; + this._initEventListener(); + if (ORYX.CONFIG.BACKEND_SWITCH) { + var b = (c.stencilset.namespace || c.stencilset.url).replace("#", "%23"); + ORYX.Core.StencilSet.loadStencilSet(b, this.modelMetaData, this.id) + } else { + var b = c.stencilset.url; + ORYX.Core.StencilSet.loadStencilSet(b, this.modelMetaData, this.id) + } + this._createCanvas(c.stencil ? c.stencil.id : null, c.properties); + this._generateGUI(); + var f = false; + var e = false; + var a = function () { + if (!f || !e) { + return + } + this._finishedLoading() + }.bind(this); + window.setTimeout(function () { + this.loadPlugins(); + f = true; + a() + }.bind(this), 100); + window.setTimeout(function () { + this.loadSerialized(c, true); + this.getCanvas().update(); + e = true; + a() + }.bind(this), 200) + }, _finishedLoading: function () { + this.handleEvents({type: ORYX.CONFIG.EVENT_LOADED}) + }, _initEventListener: function () { + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_KEYDOWN, this.catchKeyDownEvents.bind(this), false); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_KEYUP, this.catchKeyUpEvents.bind(this), false); + this._keydownEnabled = true; + this._keyupEnabled = true; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEDOWN] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEUP] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEOVER] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEOUT] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_SELECTION_CHANGED] = []; + this.DOMEventListeners[ORYX.CONFIG.EVENT_MOUSEMOVE] = [] + }, _generateGUI: function () { + var a = ORYX.CONFIG.WINDOW_HEIGHT; + var b = this.getCanvas().rootNode.parentNode; + jQuery("#canvasSection").append(b); + b.parentNode.setAttributeNS(null, "align", "center"); + b.setAttributeNS(null, "align", "left"); + this.getCanvas().setSize({width: ORYX.CONFIG.CANVAS_WIDTH, height: ORYX.CONFIG.CANVAS_HEIGHT}) + }, getAvailablePlugins: function () { + var a = ORYX.availablePlugins.clone(); + a.each(function (b) { + if (this.loadedPlugins.find(function (c) { + return c.type == this.name + }.bind(b))) { + b.engaged = true + } else { + b.engaged = false + } + }.bind(this)); + return a + }, loadScript: function (b, c) { + var a = document.createElement("script"); + a.type = "text/javascript"; + if (a.readyState) { + a.onreadystatechange = function () { + if (a.readyState == "loaded" || a.readyState == "complete") { + a.onreadystatechange = null; + c() + } + } + } else { + a.onload = function () { + c() + } + } + a.src = b; + document.getElementsByTagName("head")[0].appendChild(a) + }, activatePluginByName: function (name, callback, loadTry) { + var match = this.getAvailablePlugins().find(function (value) { + return value.name == name + }); + if (match && (!match.engaged || (match.engaged === "false"))) { + var loadedStencilSetsNamespaces = this.getStencilSets().keys(); + var facade = this._getPluginFacade(); + var newPlugin; + var me = this; + ORYX.Log.debug("Initializing plugin '%0'", match.name); + if (!match.requires || !match.requires.namespaces || match.requires.namespaces.any(function (req) { + return loadedStencilSetsNamespaces.indexOf(req) >= 0 + })) { + if (!match.notUsesIn || !match.notUsesIn.namespaces || !match.notUsesIn.namespaces.any(function (req) { + return loadedStencilSetsNamespaces.indexOf(req) >= 0 + })) { + try { + var className = eval(match.name); + var newPlugin = new className(facade, match); + newPlugin.type = match.name; + if (newPlugin.registryChanged) { + newPlugin.registryChanged(me.pluginsData) + } + if (newPlugin.onSelectionChanged) { + me.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, newPlugin.onSelectionChanged.bind(newPlugin)) + } + this.loadedPlugins.push(newPlugin); + this.loadedPlugins.each(function (loaded) { + if (loaded.registryChanged) { + loaded.registryChanged(this.pluginsData) + } + }.bind(me)); + callback(true) + } catch (e) { + ORYX.Log.warn("Plugin %0 is not available", match.name); + if (!!loadTry) { + callback(false, "INITFAILED"); + return + } + this.loadScript("plugins/scripts/" + match.source, this.activatePluginByName.bind(this, match.name, callback, true)) + } + } else { + callback(false, "NOTUSEINSTENCILSET"); + ORYX.Log.info("Plugin need a stencilset which is not loaded'", match.name) + } + } else { + callback(false, "REQUIRESTENCILSET"); + ORYX.Log.info("Plugin need a stencilset which is not loaded'", match.name) + } + } else { + callback(false, match ? "NOTFOUND" : "YETACTIVATED") + } + }, loadPlugins: function () { + var me = this; + var newPlugins = []; + var loadedStencilSetsNamespaces = this.getStencilSets().keys(); + var facade = this._getPluginFacade(); + if (ORYX.MashupAPI && ORYX.MashupAPI.loadablePlugins && ORYX.MashupAPI.loadablePlugins instanceof Array) { + ORYX.availablePlugins = $A(ORYX.availablePlugins).findAll(function (value) { + return ORYX.MashupAPI.loadablePlugins.include(value.name) + }); + ORYX.MashupAPI.loadablePlugins.each(function (className) { + if (!(ORYX.availablePlugins.find(function (val) { + return val.name == className + }))) { + ORYX.availablePlugins.push({name: className}) + } + }) + } + ORYX.availablePlugins.each(function (value) { + ORYX.Log.debug("Initializing plugin '%0'", value.name); + if ((!value.requires || !value.requires.namespaces || value.requires.namespaces.any(function (req) { + return loadedStencilSetsNamespaces.indexOf(req) >= 0 + })) && (!value.notUsesIn || !value.notUsesIn.namespaces || !value.notUsesIn.namespaces.any(function (req) { + return loadedStencilSetsNamespaces.indexOf(req) >= 0 + })) && (value.engaged || (value.engaged === undefined))) { + try { + var className = eval(value.name); + if (className) { + var plugin = new className(facade, value); + plugin.type = value.name; + newPlugins.push(plugin); + plugin.engaged = true + } + } catch (e) { + ORYX.Log.warn("Plugin %0 is not available %1", value.name, e) + } + } else { + ORYX.Log.info("Plugin need a stencilset which is not loaded'", value.name) + } + }); + newPlugins.each(function (value) { + if (value.registryChanged) { + value.registryChanged(me.pluginsData) + } + if (value.onSelectionChanged) { + me.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, value.onSelectionChanged.bind(value)) + } + }); + this.loadedPlugins = newPlugins; + this.registerPluginsOnKeyEvents(); + this.setSelection() + }, _createCanvas: function (c, d) { + if (c) { + if (c.search(/^http/) === -1) { + c = this.getStencilSets().values()[0].namespace() + c + } + } else { + c = this.getStencilSets().values()[0].findRootStencilName() + } + var a = ORYX.Core.StencilSet.stencil(c); + if (!a) { + ORYX.Log.fatal("Initialisation failed, because the stencil with the type %0 is not part of one of the loaded stencil sets.", c) + } + var e = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", null, ["div"]); + e.addClassName("ORYX_Editor"); + this._canvas = new ORYX.Core.Canvas({ + width: ORYX.CONFIG.CANVAS_WIDTH, + height: ORYX.CONFIG.CANVAS_HEIGHT, + eventHandlerCallback: this.handleEvents.bind(this), + id: this.id, + parentNode: e + }, a, this._getPluginFacade()); + if (d) { + var b = []; + for (field in d) { + b.push({prefix: "oryx", name: field, value: d[field]}) + } + this._canvas.deserialize(b) + } + }, _getPluginFacade: function () { + if (!(this._pluginFacade)) { + this._pluginFacade = { + activatePluginByName: this.activatePluginByName.bind(this), + getAvailablePlugins: this.getAvailablePlugins.bind(this), + offer: this.offer.bind(this), + getStencilSets: this.getStencilSets.bind(this), + getStencilSetExtensionDefinition: function () { + return Object.clone(this.ss_extensions_def || {}) + }.bind(this), + getRules: this.getRules.bind(this), + loadStencilSet: this.loadStencilSet.bind(this), + createShape: this.createShape.bind(this), + deleteShape: this.deleteShape.bind(this), + getSelection: this.getSelection.bind(this), + setSelection: this.setSelection.bind(this), + updateSelection: this.updateSelection.bind(this), + getCanvas: this.getCanvas.bind(this), + importJSON: this.importJSON.bind(this), + getJSON: this.getJSON.bind(this), + getSerializedJSON: this.getSerializedJSON.bind(this), + executeCommands: this.executeCommands.bind(this), + isExecutingCommands: this.isExecutingCommands.bind(this), + registerOnEvent: this.registerOnEvent.bind(this), + unregisterOnEvent: this.unregisterOnEvent.bind(this), + raiseEvent: this.handleEvents.bind(this), + enableEvent: this.enableEvent.bind(this), + disableEvent: this.disableEvent.bind(this), + eventCoordinates: this.eventCoordinates.bind(this), + eventCoordinatesXY: this.eventCoordinatesXY.bind(this), + getModelMetaData: this.getModelMetaData.bind(this) + } + } + return this._pluginFacade + }, isExecutingCommands: function () { + return !!this.commandExecuting + }, executeCommands: function (a) { + if (!this.commandStack) { + this.commandStack = [] + } + if (!this.commandStackExecuted) { + this.commandStackExecuted = [] + } + this.commandStack = [].concat(this.commandStack).concat(a); + if (this.commandExecuting) { + return + } + this.commandExecuting = true; + while (this.commandStack.length > 0) { + var b = this.commandStack.shift(); + b.execute(); + this.commandStackExecuted.push(b) + } + this.handleEvents({type: ORYX.CONFIG.EVENT_EXECUTE_COMMANDS, commands: this.commandStackExecuted}); + delete this.commandStack; + delete this.commandStackExecuted; + delete this.commandExecuting; + this.updateSelection() + }, getJSON: function () { + delete Array.prototype.toJSON; + var a = this.getCanvas().toJSON(); + a.ssextensions = this.getStencilSets().values()[0].extensions().keys().findAll(function (b) { + return !b.endsWith("/meta#") + }); + return a + }, getSerializedJSON: function () { + return JSON.stringify(this.getJSON()) + }, importJSON: function (d, c) { + try { + d = this.renewResourceIds(d) + } catch (b) { + throw b + } + if (d.stencilset.namespace && d.stencilset.namespace !== this.getCanvas().getStencil().stencilSet().namespace()) { + alert(String.format(ORYX.I18N.JSONImport.wrongSS, d.stencilset.namespace, this.getCanvas().getStencil().stencilSet().namespace())); + return null + } else { + var a = ORYX.Core.Command.extend({ + construct: function (g, k, f, h) { + this.jsonObject = g; + this.noSelection = f; + this.facade = h; + this.shapes; + this.connections = []; + this.parents = new Hash(); + this.selection = this.facade.getSelection(); + this.loadSerialized = k + }, execute: function () { + if (!this.shapes) { + this.shapes = this.loadSerialized(this.jsonObject); + this.shapes.each(function (g) { + if (g.getDockers) { + var f = g.getDockers(); + if (f) { + if (f.length > 0) { + this.connections.push([f.first(), f.first().getDockedShape(), f.first().referencePoint]) + } + if (f.length > 1) { + this.connections.push([f.last(), f.last().getDockedShape(), f.last().referencePoint]) + } + } + } + this.parents[g.id] = g.parent + }.bind(this)) + } else { + this.shapes.each(function (f) { + this.parents[f.id].add(f) + }.bind(this)); + this.connections.each(function (f) { + f[0].setDockedShape(f[1]); + f[0].setReferencePoint(f[2]); + f[0].update() + }) + } + this.facade.getCanvas().update(); + if (!this.noSelection) { + this.facade.setSelection(this.shapes) + } else { + this.facade.updateSelection() + } + this.facade.getCanvas().updateSize() + }, rollback: function () { + var f = this.facade.getSelection(); + this.shapes.each(function (g) { + f = f.without(g); + this.facade.deleteShape(g) + }.bind(this)); + this.facade.getCanvas().update(); + this.facade.setSelection(f) + } + }); + var e = new a(d, this.loadSerialized.bind(this), c, this._getPluginFacade()); + this.executeCommands([e]); + return e.shapes.clone() + } + }, renewResourceIds: function (b) { + if (Object.prototype.toString.call(b) === "String") { + try { + var d = b; + b = JSON.parse(b) + } catch (a) { + throw new SyntaxError(a.message) + } + } else { + var d = JSON.stringify(b) + } + var e = function (f) { + if (!f) { + return [] + } + return f.map(function (g) { + return e(g.childShapes).concat(g.resourceId) + }).flatten() + }; + var c = e(b.childShapes); + c.each(function (f) { + var g = ORYX.Editor.provideId(); + d = d.replace(new RegExp(f, "g"), g) + }); + return JSON.parse(d) + }, loadSerialized: function (d, e) { + var c = this.getCanvas(); + this.loadSSExtensions(d.ssextensions); + if (e === true) { + var b = this.getExtensionForMetaData(); + if (b) { + this.loadSSExtension(b) + } + } + var a = this.getCanvas().addShapeObjects(d.childShapes, this.handleEvents.bind(this)); + if (d.properties) { + for (key in d.properties) { + var f = d.properties[key]; + var g = this.getCanvas().getStencil().property("oryx-" + key); + if (!(typeof f === "string") && (!g || !g.isList())) { + f = JSON.stringify(f) + } + this.getCanvas().setProperty("oryx-" + key, f) + } + } + this.getCanvas().updateSize(); + this.selection = [null]; + this.setSelection([]); + return a + }, getExtensionForMetaData: function () { + if (!this.ss_extensions_def || !(this.ss_extensions_def.extensions instanceof Array)) { + return null + } + var a = this.getStencilSets(); + var b = this.ss_extensions_def.extensions.find(function (c) { + return !!a[c["extends"]] && c.namespace.endsWith("/meta#") + }); + return b ? b.namespace || null : null + }, loadSSExtensions: function (a) { + if (!a) { + return + } + a.each(function (b) { + this.loadSSExtension(b) + }.bind(this)) + }, loadSSExtension: function (b) { + if (this.ss_extensions_def) { + var c = this.ss_extensions_def.extensions.find(function (d) { + return (d.namespace == b) + }); + if (!c) { + return + } + var a = this.getStencilSets()[c["extends"]]; + if (!a) { + return + } + if ((c.definition || "").startsWith("/")) { + a.addExtension(c.definition) + } else { + a.addExtension(ORYX.CONFIG.SS_EXTENSIONS_FOLDER + c.definition) + } + this.getRules().initializeRules(a); + this._getPluginFacade().raiseEvent({type: ORYX.CONFIG.EVENT_STENCIL_SET_LOADED}) + } + }, disableEvent: function (a) { + if (a == ORYX.CONFIG.EVENT_KEYDOWN) { + this._keydownEnabled = false + } + if (a == ORYX.CONFIG.EVENT_KEYUP) { + this._keyupEnabled = false + } + if (this.DOMEventListeners.keys().member(a)) { + var b = this.DOMEventListeners.remove(a); + this.DOMEventListeners["disable_" + a] = b + } + }, enableEvent: function (a) { + if (a == ORYX.CONFIG.EVENT_KEYDOWN) { + this._keydownEnabled = true + } + if (a == ORYX.CONFIG.EVENT_KEYUP) { + this._keyupEnabled = true + } + if (this.DOMEventListeners.keys().member("disable_" + a)) { + var b = this.DOMEventListeners.remove("disable_" + a); + this.DOMEventListeners[a] = b + } + }, registerOnEvent: function (a, b) { + if (!(this.DOMEventListeners.keys().member(a))) { + this.DOMEventListeners[a] = [] + } + this.DOMEventListeners[a].push(b) + }, unregisterOnEvent: function (a, b) { + if (this.DOMEventListeners.keys().member(a)) { + this.DOMEventListeners[a] = this.DOMEventListeners[a].without(b) + } else { + } + }, getSelection: function () { + return this.selection || [] + }, getStencilSets: function () { + return ORYX.Core.StencilSet.stencilSets(this.id) + }, getRules: function () { + return ORYX.Core.StencilSet.rules(this.id) + }, loadStencilSet: function (a) { + try { + ORYX.Core.StencilSet.loadStencilSet(a, this.modelMetaData, this.id); + this.handleEvents({type: ORYX.CONFIG.EVENT_STENCIL_SET_LOADED}) + } catch (b) { + ORYX.Log.warn("Requesting stencil set file failed. (" + b + ")") + } + }, offer: function (a) { + if (!this.pluginsData.member(a)) { + this.pluginsData.push(a) + } + }, registerPluginsOnKeyEvents: function () { + this.pluginsData.each(function (a) { + if (a.keyCodes) { + a.keyCodes.each(function (c) { + var b = "key.event"; + b += "." + c.keyAction; + if (c.metaKeys) { + if (c.metaKeys.indexOf(ORYX.CONFIG.META_KEY_META_CTRL) > -1) { + b += "." + ORYX.CONFIG.META_KEY_META_CTRL + } + if (c.metaKeys.indexOf(ORYX.CONFIG.META_KEY_ALT) > -1) { + b += "." + ORYX.CONFIG.META_KEY_ALT + } + if (c.metaKeys.indexOf(ORYX.CONFIG.META_KEY_SHIFT) > -1) { + b += "." + ORYX.CONFIG.META_KEY_SHIFT + } + } + if (c.keyCode) { + b += "." + c.keyCode + } + ORYX.Log.debug("Register Plugin on Key Event: %0", b); + if (a.toggle === true && a.buttonInstance) { + this.registerOnEvent(b, function () { + a.buttonInstance.toggle(!a.buttonInstance.pressed); + a.functionality.call(a, a.buttonInstance, a.buttonInstance.pressed) + }) + } else { + this.registerOnEvent(b, a.functionality) + } + }.bind(this)) + } + }.bind(this)) + }, isEqual: function (d, c) { + return d === c || (d.length === c.length && d.all(function (a) { + return c.include(a) + })) + }, isDirty: function (b) { + return b.any(function (a) { + return a.isPropertyChanged() + }) + }, setSelection: function (c, a, b) { + if (!c) { + c = [] + } + if (!(c instanceof Array)) { + c = [c] + } + c = c.findAll(function (d) { + return d && d instanceof ORYX.Core.Shape + }); + if (c[0] instanceof ORYX.Core.Canvas) { + c = [] + } + if (!b && this.isEqual(this.selection, c) && !this.isDirty(c)) { + return + } + this.selection = c; + this._subSelection = a; + this.handleEvents({type: ORYX.CONFIG.EVENT_SELECTION_CHANGED, elements: c, subSelection: a, force: !!b}) + }, updateSelection: function () { + this.setSelection(this.selection, this._subSelection, true) + }, getCanvas: function () { + return this._canvas + }, createShape: function (o) { + if (o && o.serialize && o.serialize instanceof Array) { + var d = o.serialize.find(function (b) { + return (b.prefix + "-" + b.name) == "oryx-type" + }); + var t = ORYX.Core.StencilSet.stencil(d.value); + if (t.type() == "node") { + var f = new ORYX.Core.Node({eventHandlerCallback: this.handleEvents.bind(this)}, t, this._getPluginFacade()) + } else { + var f = new ORYX.Core.Edge({eventHandlerCallback: this.handleEvents.bind(this)}, t, this._getPluginFacade()) + } + this.getCanvas().add(f); + f.deserialize(o.serialize); + return f + } + if (!o || !o.type || !o.namespace) { + throw"To create a new shape you have to give an argument with type and namespace" + } + var c = this.getCanvas(); + var f; + var u = o.type; + var r = ORYX.Core.StencilSet.stencilSet(o.namespace); + if (r.stencil(u).type() == "node") { + f = new ORYX.Core.Node({eventHandlerCallback: this.handleEvents.bind(this)}, r.stencil(u), this._getPluginFacade()) + } else { + f = new ORYX.Core.Edge({eventHandlerCallback: this.handleEvents.bind(this)}, r.stencil(u), this._getPluginFacade()) + } + if (o.template) { + f._jsonStencil.properties = o.template._jsonStencil.properties; + f.postProcessProperties() + } + if (o.parent && f instanceof ORYX.Core.Node) { + o.parent.add(f) + } else { + c.add(f) + } + var s = o.position ? o.position : {x: 100, y: 200}; + var g; + if (o.connectingType && o.connectedShape && !(f instanceof ORYX.Core.Edge)) { + g = new ORYX.Core.Edge({eventHandlerCallback: this.handleEvents.bind(this)}, r.stencil(o.connectingType)); + g.dockers.first().setDockedShape(o.connectedShape); + var l = o.connectedShape.getDefaultMagnet(); + var a = l ? l.bounds.center() : o.connectedShape.bounds.midPoint(); + g.dockers.first().setReferencePoint(a); + g.dockers.last().setDockedShape(f); + g.dockers.last().setReferencePoint(f.getDefaultMagnet().bounds.center()); + c.add(g) + } + if (f instanceof ORYX.Core.Edge && o.connectedShape) { + f.dockers.first().setDockedShape(o.connectedShape); + if (o.connectedShape instanceof ORYX.Core.Node) { + f.dockers.first().setReferencePoint(o.connectedShape.getDefaultMagnet().bounds.center()); + f.dockers.last().bounds.centerMoveTo(s) + } else { + f.dockers.first().setReferencePoint(o.connectedShape.bounds.midPoint()) + } + var k = f.dockers.first(); + var e = f.dockers.last(); + if (k.getDockedShape() && e.getDockedShape()) { + var q = k.getAbsoluteReferencePoint(); + var n = e.getAbsoluteReferencePoint(); + var p = f.createDocker(); + p.bounds.centerMoveTo({x: q.x + (endPont.x - q.x) / 2, y: q.y + (endPont.y - q.y) / 2}) + } + } else { + var v = f.bounds; + if (f instanceof ORYX.Core.Node && f.dockers.length == 1) { + v = f.dockers.first().bounds + } + v.centerMoveTo(s); + var h = v.upperLeft(); + v.moveBy(-Math.min(h.x, 0), -Math.min(h.y, 0)); + var m = v.lowerRight(); + v.moveBy(-Math.max(m.x - c.bounds.width(), 0), -Math.max(m.y - c.bounds.height(), 0)) + } + if (f instanceof ORYX.Core.Edge) { + f._update(false) + } + if (!(f instanceof ORYX.Core.Edge) && !(o.dontUpdateSelection)) { + this.setSelection([f]) + } + if (g && g.alignDockers) { + } + if (f.alignDockers) { + f.alignDockers() + } + return f + }, deleteShape: function (a) { + if (!a || !a.parent) { + return + } + a.parent.remove(a); + a.getOutgoingShapes().each(function (c) { + var b = c.getDockers().first(); + if (b && b.getDockedShape() == a) { + b.setDockedShape(undefined) + } + }); + a.getIncomingShapes().each(function (b) { + var c = b.getDockers().last(); + if (c && c.getDockedShape() == a) { + c.setDockedShape(undefined) + } + }); + a.getDockers().each(function (b) { + b.setDockedShape(undefined) + }) + }, getModelMetaData: function () { + return this.modelMetaData + }, _executeEventImmediately: function (a) { + if (this.DOMEventListeners.keys().member(a.event.type)) { + this.DOMEventListeners[a.event.type].each((function (b) { + b(a.event, a.arg) + }).bind(this)) + } + }, _executeEvents: function () { + this._queueRunning = true; + while (this._eventsQueue.length > 0) { + var a = this._eventsQueue.shift(); + this._executeEventImmediately(a) + } + this._queueRunning = false + }, handleEvents: function (b, a) { + ORYX.Log.trace("Dispatching event type %0 on %1", b.type, a); + switch (b.type) { + case ORYX.CONFIG.EVENT_MOUSEDOWN: + this._handleMouseDown(b, a); + break; + case ORYX.CONFIG.EVENT_MOUSEMOVE: + this._handleMouseMove(b, a); + break; + case ORYX.CONFIG.EVENT_MOUSEUP: + this._handleMouseUp(b, a); + break; + case ORYX.CONFIG.EVENT_MOUSEOVER: + this._handleMouseHover(b, a); + break; + case ORYX.CONFIG.EVENT_MOUSEOUT: + this._handleMouseOut(b, a); + break + } + if (b.forceExecution) { + this._executeEventImmediately({event: b, arg: a}) + } else { + this._eventsQueue.push({event: b, arg: a}) + } + if (!this._queueRunning) { + this._executeEvents() + } + return false + }, isValidEvent: function (c) { + try { + var a = ["INPUT", "TEXTAREA"].include(c.target.tagName.toUpperCase()); + var b = c.target.className.include("x-grid3-focus") && !c.target.className.include("x-grid3-focus-canvas"); + return !a && !b + } catch (c) { + return false + } + }, catchKeyUpEvents: function (b) { + if (!this._keyupEnabled) { + return + } + if (!b) { + b = window.event + } + if (!this.isValidEvent(b)) { + return + } + var a = this.createKeyCombEvent(b, ORYX.CONFIG.KEY_ACTION_UP); + ORYX.Log.debug("Key Event to handle: %0", a); + this.handleEvents({type: a, event: b}) + }, catchKeyDownEvents: function (b) { + if (!this._keydownEnabled) { + return + } + if (!b) { + b = window.event + } + if (!this.isValidEvent(b)) { + return + } + var a = this.createKeyCombEvent(b, ORYX.CONFIG.KEY_ACTION_DOWN); + ORYX.Log.debug("Key Event to handle: %0", a); + this.handleEvents({type: a, event: b}) + }, createKeyCombEvent: function (c, b) { + var d = c.which || c.keyCode; + var a = "key.event"; + if (b) { + a += "." + b + } + if (c.ctrlKey || c.metaKey) { + a += "." + ORYX.CONFIG.META_KEY_META_CTRL + } + if (c.altKey) { + a += "." + ORYX.CONFIG.META_KEY_ALT + } + if (c.shiftKey) { + a += "." + ORYX.CONFIG.META_KEY_SHIFT + } + return a + "." + d + }, _handleMouseDown: function (a, l) { + var b = this.getCanvas(); + b.focus(); + var d = a.currentTarget; + var c = l; + var g = (c !== null) && (c !== undefined) && (c.isSelectable); + var m = (c !== null) && (c !== undefined) && (c.isMovable); + var k = a.shiftKey || a.ctrlKey; + var h = this.selection.length === 0; + var e = this.selection.member(c); + if (g && h) { + this.setSelection([c]); + ORYX.Log.trace("Rule #1 applied for mouse down on %0", d.id) + } else { + if (g && !h && !k && !e) { + this.setSelection([c]); + ORYX.Log.trace("Rule #3 applied for mouse down on %0", d.id) + } else { + if (g && k && !e) { + var f = this.selection.clone(); + f.push(c); + this.setSelection(f); + ORYX.Log.trace("Rule #4 applied for mouse down on %0", d.id) + } else { + if (g && e && k) { + var f = this.selection.clone(); + this.setSelection(f.without(c)); + ORYX.Log.trace("Rule #6 applied for mouse down on %0", c.id) + } else { + if (!g && !m) { + this.setSelection([]); + ORYX.Log.trace("Rule #2 applied for mouse down on %0", d.id); + return + } else { + if (!g && m && !(c instanceof ORYX.Core.Controls.Docker)) { + ORYX.Log.trace("Rule #7 applied for mouse down on %0", d.id) + } else { + if (g && e && !k) { + this._subSelection = this._subSelection != c ? c : undefined; + this.setSelection(this.selection, this._subSelection); + ORYX.Log.trace("Rule #8 applied for mouse down on %0", d.id) + } + } + } + } + } + } + } + return + }, _handleMouseMove: function (b, a) { + return + }, _handleMouseUp: function (d, c) { + var a = this.getCanvas(); + var e = c; + var b = this.eventCoordinates(d) + }, _handleMouseHover: function (b, a) { + return + }, _handleMouseOut: function (b, a) { + return + }, eventCoordinates: function (f) { + var b = this.getCanvas(); + var g = b.node.ownerSVGElement.createSVGPoint(); + g.x = f.clientX; + g.y = f.clientY; + var e = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var c = navigator.userAgent; + if (c.indexOf("MSIE") >= 0) { + var d = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (d !== 100) { + e = d / 100 + } + } + } + if (e !== 1) { + g.x = g.x * e; + g.y = g.y * e + } + var a = b.node.getScreenCTM(); + return g.matrixTransform(a.inverse()) + }, eventCoordinatesXY: function (a, h) { + var c = this.getCanvas(); + var g = c.node.ownerSVGElement.createSVGPoint(); + g.x = a; + g.y = h; + var f = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var d = navigator.userAgent; + if (d.indexOf("MSIE") >= 0) { + var e = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (e !== 100) { + f = e / 100 + } + } + } + if (f !== 1) { + g.x = g.x * f; + g.y = g.y * f + } + var b = c.node.getScreenCTM(); + return g.matrixTransform(b.inverse()) + } +}; +ORYX.Editor = Clazz.extend(ORYX.Editor); +ORYX.Editor.createByUrl = function (a) { + new Ajax.Request(a, { + method: "GET", onSuccess: function (c) { + var b = JSON.parse(c.responseText); + new ORYX.Editor(b) + }.bind(this) + }) +}; +ORYX.Editor.graft = function (g, f, d, l) { + l = (l || (f && f.ownerDocument) || document); + var h; + if (d === undefined) { + throw"Can't graft an undefined value" + } else { + if (d.constructor == String) { + h = l.createTextNode(d) + } else { + for (var c = 0; c < d.length; c++) { + if (c === 0 && d[c].constructor == String) { + var a; + a = d[c].match(/^([a-z][a-z0-9]*)\.([^\s\.]+)$/i); + if (a) { + h = l.createElementNS(g, a[1]); + h.setAttributeNS(null, "class", a[2]); + continue + } + a = d[c].match(/^([a-z][a-z0-9]*)$/i); + if (a) { + h = l.createElementNS(g, a[1]); + continue + } + h = l.createElementNS(g, "span"); + h.setAttribute(null, "class", "namelessFromLOL") + } + if (d[c] === undefined) { + throw"Can't graft an undefined value in a list!" + } else { + if (d[c].constructor == String || d[c].constructor == Array) { + this.graft(g, h, d[c], l) + } else { + if (d[c].constructor == Number) { + this.graft(g, h, d[c].toString(), l) + } else { + if (d[c].constructor == Object) { + for (var b in d[c]) { + h.setAttributeNS(null, b, d[c][b]) + } + } else { + } + } + } + } + } + } + } + if (f && f.appendChild) { + f.appendChild(h) + } else { + } + return h +}; +ORYX.Editor.provideId = function () { + var b = [], c = "0123456789ABCDEF"; + for (var a = 0; a < 36; a++) { + b[a] = Math.floor(Math.random() * 16) + } + b[14] = 4; + b[19] = (b[19] & 3) | 8; + for (var a = 0; a < 36; a++) { + b[a] = c[b[a]] + } + b[8] = b[13] = b[18] = b[23] = "-"; + return "oryx_" + b.join("") +}; +ORYX.Editor.resizeFix = function () { + if (!ORYX.Editor._resizeFixTimeout) { + ORYX.Editor._resizeFixTimeout = window.setTimeout(function () { + window.resizeBy(1, 1); + window.resizeBy(-1, -1); + ORYX.Editor._resizefixTimeout = null + }, 100) + } +}; +ORYX.Editor.Cookie = { + callbacks: [], onChange: function (b, a) { + this.callbacks.push(b); + this.start(a) + }, start: function (a) { + if (this.pe) { + return + } + var b = document.cookie; + this.pe = new PeriodicalExecuter(function () { + if (b != document.cookie) { + b = document.cookie; + this.callbacks.each(function (c) { + c(this.getParams()) + }.bind(this)) + } + }.bind(this), (a || 10000) / 1000) + }, stop: function () { + if (this.pe) { + this.pe.stop(); + this.pe = null + } + }, getParams: function () { + var a = {}; + var b = document.cookie; + b.split("; ").each(function (c) { + a[c.split("=")[0]] = c.split("=")[1] + }); + return a + }, toString: function () { + return document.cookie + } +}; +ORYX.Editor.SVGClassElementsAreAvailable = true; +ORYX.Editor.setMissingClasses = function () { + try { + SVGElement + } catch (a) { + ORYX.Editor.SVGClassElementsAreAvailable = false; + SVGSVGElement = document.createElementNS("http://www.w3.org/2000/svg", "svg").toString(); + SVGGElement = document.createElementNS("http://www.w3.org/2000/svg", "g").toString(); + SVGPathElement = document.createElementNS("http://www.w3.org/2000/svg", "path").toString(); + SVGTextElement = document.createElementNS("http://www.w3.org/2000/svg", "text").toString(); + SVGRectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect").toString(); + SVGImageElement = document.createElementNS("http://www.w3.org/2000/svg", "image").toString(); + SVGCircleElement = document.createElementNS("http://www.w3.org/2000/svg", "circle").toString(); + SVGEllipseElement = document.createElementNS("http://www.w3.org/2000/svg", "ellipse").toString(); + SVGLineElement = document.createElementNS("http://www.w3.org/2000/svg", "line").toString(); + SVGPolylineElement = document.createElementNS("http://www.w3.org/2000/svg", "polyline").toString(); + SVGPolygonElement = document.createElementNS("http://www.w3.org/2000/svg", "polygon").toString() + } +}; +ORYX.Editor.checkClassType = function (b, a) { + if (ORYX.Editor.SVGClassElementsAreAvailable) { + return b instanceof a + } else { + return b == a + } +}; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +new function () { + ORYX.Core.UIEnableDrag = function (e, d, c) { + this.uiObj = d; + var f = d.bounds.upperLeft(); + var b = d.node.getScreenCTM(); + this.faktorXY = {x: b.a, y: b.d}; + this.scrollNode = d.node.ownerSVGElement.parentNode.parentNode; + this.offSetPosition = { + x: Event.pointerX(e) - (f.x * this.faktorXY.x), + y: Event.pointerY(e) - (f.y * this.faktorXY.y) + }; + this.offsetScroll = {x: this.scrollNode.scrollLeft, y: this.scrollNode.scrollTop}; + this.dragCallback = ORYX.Core.UIDragCallback.bind(this); + this.disableCallback = ORYX.Core.UIDisableDrag.bind(this); + this.movedCallback = c ? c.movedCallback : undefined; + this.upCallback = c ? c.upCallback : undefined; + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.disableCallback, true); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.dragCallback, false) + }; + ORYX.Core.UIDragCallback = function (b) { + var a = {x: Event.pointerX(b) - this.offSetPosition.x, y: Event.pointerY(b) - this.offSetPosition.y}; + a.x -= this.offsetScroll.x - this.scrollNode.scrollLeft; + a.y -= this.offsetScroll.y - this.scrollNode.scrollTop; + a.x /= this.faktorXY.x; + a.y /= this.faktorXY.y; + this.uiObj.bounds.moveTo(a); + if (this.movedCallback) { + this.movedCallback(b) + } + }; + ORYX.Core.UIDisableDrag = function (a) { + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.dragCallback, false); + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.disableCallback, true); + if (this.upCallback) { + this.upCallback(a) + } + this.upCallback = undefined; + this.movedCallback = undefined; + Event.stop(a) + }; + ORYX.Core.MoveDockersCommand = ORYX.Core.Command.extend({ + construct: function (a) { + this.dockers = $H(a); + this.edges = $H({}) + }, execute: function () { + if (this.changes) { + this.executeAgain(); + return + } else { + this.changes = $H({}) + } + this.dockers.values().each(function (b) { + var a = b.docker.parent; + if (!a) { + return + } + if (!this.changes[a.getId()]) { + this.changes[a.getId()] = { + edge: a, oldDockerPositions: a.dockers.map(function (c) { + return c.bounds.center() + }) + } + } + b.docker.bounds.moveBy(b.offset); + this.edges[a.getId()] = a; + b.docker.update() + }.bind(this)); + this.edges.each(function (a) { + this.updateEdge(a.value); + if (this.changes[a.value.getId()]) { + this.changes[a.value.getId()].dockerPositions = a.value.dockers.map(function (b) { + return b.bounds.center() + }) + } + }.bind(this)) + }, updateEdge: function (a) { + a._update(true); + [a.getOutgoingShapes(), a.getIncomingShapes()].flatten().invoke("_update", [true]) + }, executeAgain: function () { + this.changes.values().each(function (a) { + this.removeAllDocker(a.edge); + a.dockerPositions.each(function (d, b) { + if (b == 0 || b == a.dockerPositions.length - 1) { + return + } + var c = a.edge.createDocker(undefined, d); + c.bounds.centerMoveTo(d); + c.update() + }.bind(this)); + this.updateEdge(a.edge) + }.bind(this)) + }, rollback: function () { + this.changes.values().each(function (a) { + this.removeAllDocker(a.edge); + a.oldDockerPositions.each(function (d, b) { + if (b == 0 || b == a.oldDockerPositions.length - 1) { + return + } + var c = a.edge.createDocker(undefined, d); + c.bounds.centerMoveTo(d); + c.update() + }.bind(this)); + this.updateEdge(a.edge) + }.bind(this)) + }, removeAllDocker: function (a) { + a.dockers.slice(1, a.dockers.length - 1).each(function (b) { + a.removeDocker(b) + }) + } + }) +}(); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.Shape = { + construct: function (a, c, b) { + arguments.callee.$.construct.apply(this, arguments); + this.facade = b; + this.dockers = []; + this.magnets = []; + this._defaultMagnet; + this.incoming = []; + this.outgoing = []; + this.nodes = []; + this._dockerChangedCallback = this._dockerChanged.bind(this); + this._labels = new Hash(); + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", null, ["g", {id: "svg-" + this.resourceId}, ["g", {"class": "stencils"}, ["g", {"class": "me"}], ["g", { + "class": "children", + style: "overflow:hidden" + }], ["g", {"class": "edge"}]], ["g", {"class": "controls"}, ["g", {"class": "dockers"}], ["g", {"class": "magnets"}]]]) + }, update: function () { + }, _update: function () { + }, refresh: function () { + arguments.callee.$.refresh.apply(this, arguments); + if (this.node.ownerDocument) { + var a = this; + this.propertiesChanged.each((function (b) { + if (b.value) { + var e = this.properties[b.key]; + var d = this.getStencil().property(b.key); + if (d != undefined) { + this.propertiesChanged[b.key] = false; + if (d.type() == ORYX.CONFIG.TYPE_CHOICE) { + d.refToView().each((function (g) { + if (g !== "") { + var f = this._labels[this.id + g]; + if (f && d.item(e)) { + f.text(d.item(e).title()) + } + } + }).bind(this)); + var c = new Hash(); + d.items().each((function (f) { + f.refToView().each((function (g) { + if (g == "") { + return + } + var h = this.node.ownerDocument.getElementById(this.id + g); + if (!h) { + return + } + if (!c[h.id] || e == f.value()) { + h.setAttributeNS(null, "display", ((e == f.value()) ? "inherit" : "none")); + c[h.id] = h + } + if (ORYX.Editor.checkClassType(h, SVGImageElement)) { + h.setAttributeNS("http://www.w3.org/1999/xlink", "href", h.getAttributeNS("http://www.w3.org/1999/xlink", "href")) + } + }).bind(this)) + }).bind(this)) + } else { + d.refToView().each((function (h) { + if (h === "") { + return + } + var g = this.id + h; + if (d.type() === ORYX.CONFIG.TYPE_KISBPM_MULTIINSTANCE) { + if (h === "multiinstance") { + var l = this.node.ownerDocument.getElementById(this.id + "parallel"); + if (l) { + if (e === "Parallel") { + l.setAttributeNS(null, "display", "inherit") + } else { + l.setAttributeNS(null, "display", "none") + } + } + var o = this.node.ownerDocument.getElementById(this.id + "sequential"); + if (o) { + if (e === "Sequential") { + o.setAttributeNS(null, "display", "inherit") + } else { + o.setAttributeNS(null, "display", "none") + } + } + } + return + } else { + if (d.type() === "cancelactivity") { + var s = this.node.ownerDocument.getElementById(this.id + "frame"); + var t = this.node.ownerDocument.getElementById(this.id + "frame2"); + if (e === "true") { + s.setAttributeNS(null, "display", "inherit"); + t.setAttributeNS(null, "display", "inherit") + } else { + s.setAttributeNS(null, "display", "none"); + t.setAttributeNS(null, "display", "none") + } + } + } + var k = this.node.ownerDocument.getElementById(g); + if (!k || !(k.ownerSVGElement)) { + if (d.type() === ORYX.CONFIG.TYPE_URL || d.type() === ORYX.CONFIG.TYPE_DIAGRAM_LINK) { + var r = this.node.ownerDocument.getElementsByTagNameNS("http://www.w3.org/2000/svg", "a"); + k = $A(r).find(function (u) { + return u.getAttributeNS(null, "id") === g + }); + if (!k) { + return + } + } else { + return + } + } + if (d.complexAttributeToView()) { + var p = this._labels[g]; + if (p) { + try { + propJson = e.evalJSON(); + var q = propJson[d.complexAttributeToView()]; + p.text(q ? q : e) + } catch (m) { + p.text(e) + } + } + } else { + switch (d.type()) { + case ORYX.CONFIG.TYPE_BOOLEAN: + if (typeof e == "string") { + e = e === "true" + } + k.setAttributeNS(null, "display", (!(e === d.inverseBoolean())) ? "inherit" : "none"); + break; + case ORYX.CONFIG.TYPE_COLOR: + if (d.fill()) { + if (k.tagName.toLowerCase() === "stop") { + if (e) { + if (d.lightness() && d.lightness() !== 1) { + e = ORYX.Utils.adjustLightness(e, d.lightness()) + } + k.setAttributeNS(null, "stop-color", e); + if (k.parentNode.tagName.toLowerCase() === "radialgradient") { + ORYX.Utils.adjustGradient(k.parentNode, k) + } + } + if (k.parentNode.tagName.toLowerCase() === "radialgradient") { + $A(k.parentNode.getElementsByTagName("stop")).each(function (u) { + u.setAttributeNS(null, "stop-opacity", e ? u.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "default-stop-opacity") || 1 : 0) + }.bind(this)) + } + } else { + k.setAttributeNS(null, "fill", e) + } + } + if (d.stroke()) { + k.setAttributeNS(null, "stroke", e) + } + break; + case ORYX.CONFIG.TYPE_STRING: + var p = this._labels[g]; + if (p) { + p.text(e) + } + break; + case ORYX.CONFIG.TYPE_EXPRESSION: + var p = this._labels[g]; + if (p) { + p.text(e) + } + break; + case ORYX.CONFIG.TYPE_DATASOURCE: + var p = this._labels[g]; + if (p) { + p.text(e) + } + break; + case ORYX.CONFIG.TYPE_INTEGER: + var p = this._labels[g]; + if (p) { + p.text(e) + } + break; + case ORYX.CONFIG.TYPE_FLOAT: + if (d.fillOpacity()) { + k.setAttributeNS(null, "fill-opacity", e) + } + if (d.strokeOpacity()) { + k.setAttributeNS(null, "stroke-opacity", e) + } + if (!d.fillOpacity() && !d.strokeOpacity()) { + var p = this._labels[g]; + if (p) { + p.text(e) + } + } + break; + case ORYX.CONFIG.TYPE_FORM_LINK: + if (h == "pimg") { + var n = k.getAttributeNodeNS("", "onclick"); + if (n) { + if (e && ("" + e).length > 0) { + n.textContent = "window.location = '../service/editor?id=" + e + "_form'" + } else { + newFormFacade = this.facade; + n.textContent = "displayNewFormDialog('" + this.resourceId + "');" + } + } + } else { + if (h == "linkIndicator") { + if (e && e.length > 0) { + k.setAttributeNS(null, "display", "inherit") + } else { + k.setAttributeNS(null, "display", "none") + } + } + } + break; + case ORYX.CONFIG.TYPE_URL: + case ORYX.CONFIG.TYPE_DIAGRAM_LINK: + var f = k.getAttributeNodeNS("http://www.w3.org/1999/xlink", "xlink:href"); + if (f) { + f.textContent = e + } else { + k.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", e) + } + break + } + } + }).bind(this)) + } + } + } + }).bind(this)); + this._labels.values().each(function (b) { + b.update() + }) + } + }, layout: function () { + var a = this.getStencil().layout(); + if (a) { + a.each(function (b) { + b.shape = this; + b.forceExecution = true; + this._delegateEvent(b) + }.bind(this)) + } + }, getLabels: function () { + return this._labels.values() + }, getLabel: function (a) { + if (!a) { + return null + } + return (this._labels.find(function (b) { + return b.key.endsWith(a) + }) || {}).value || null + }, hideLabels: function () { + this.getLabels().invoke("hide") + }, showLabels: function () { + var a = this.getLabels(); + a.invoke("show"); + a.each(function (b) { + b.update() + }) + }, setOpacity: function (b, a) { + b = Math.max(Math.min((typeof b == "number" ? b : 1), 1), 0); + if (b !== 1) { + b = String(b); + this.node.setAttributeNS(null, "fill-opacity", b); + this.node.setAttributeNS(null, "stroke-opacity", b) + } else { + this.node.removeAttributeNS(null, "fill-opacity"); + this.node.removeAttributeNS(null, "stroke-opacity") + } + }, getDockers: function () { + return this.dockers + }, getMagnets: function () { + return this.magnets + }, getDefaultMagnet: function () { + if (this._defaultMagnet) { + return this._defaultMagnet + } else { + if (this.magnets.length > 0) { + return this.magnets[0] + } else { + return undefined + } + } + }, getParentShape: function () { + return this.parent + }, getIncomingShapes: function (a) { + if (a) { + this.incoming.each(a) + } + return this.incoming + }, getIncomingNodes: function (a) { + return this.incoming.select(function (b) { + var c = (b instanceof ORYX.Core.Node); + if (c && a) { + a(b) + } + return c + }) + }, getOutgoingShapes: function (a) { + if (a) { + this.outgoing.each(a) + } + return this.outgoing + }, getOutgoingNodes: function (a) { + return this.outgoing.select(function (b) { + var c = (b instanceof ORYX.Core.Node); + if (c && a) { + a(b) + } + return c + }) + }, getAllDockedShapes: function (b) { + var a = this.incoming.concat(this.outgoing); + if (b) { + a.each(b) + } + return a + }, getCanvas: function () { + if (this.parent instanceof ORYX.Core.Canvas) { + return this.parent + } else { + if (this.parent instanceof ORYX.Core.Shape) { + return this.parent.getCanvas() + } else { + return undefined + } + } + }, getChildNodes: function (b, c) { + if (!b && !c) { + return this.nodes.clone() + } else { + var a = []; + this.nodes.each(function (d) { + if (!d.isVisible) { + return + } + if (c) { + c(d) + } + a.push(d); + if (b && d instanceof ORYX.Core.Shape) { + a = a.concat(d.getChildNodes(b, c)) + } + }); + return a + } + }, add: function (b, d, c) { + if (b instanceof ORYX.Core.UIObject && !(b instanceof ORYX.Core.Edge)) { + if (!(this.children.member(b))) { + if (b.parent) { + b.parent.remove(b, true) + } + if (d != undefined) { + this.children.splice(d, 0, b) + } else { + this.children.push(b) + } + b.parent = this; + var e; + if (b instanceof ORYX.Core.Node) { + e = this.node.childNodes[0].childNodes[1]; + this.nodes.push(b) + } else { + if (b instanceof ORYX.Core.Controls.Control) { + var a = this.node.childNodes[1]; + if (b instanceof ORYX.Core.Controls.Docker) { + e = a.childNodes[0]; + if (this.dockers.length >= 2) { + this.dockers.splice(d !== undefined ? Math.min(d, this.dockers.length - 1) : this.dockers.length - 1, 0, b) + } else { + this.dockers.push(b) + } + } else { + if (b instanceof ORYX.Core.Controls.Magnet) { + e = a.childNodes[1]; + this.magnets.push(b) + } else { + e = a + } + } + } else { + e = this.node + } + } + if (d != undefined && d < e.childNodes.length) { + b.node = e.insertBefore(b.node, e.childNodes[d]) + } else { + b.node = e.appendChild(b.node) + } + this._changed(); + if (this.eventHandlerCallback && c !== true) { + this.eventHandlerCallback({type: ORYX.CONFIG.EVENT_SHAPEADDED, shape: b}) + } + } else { + ORYX.Log.warn("add: ORYX.Core.UIObject is already a child of this object.") + } + } else { + ORYX.Log.warn("add: Parameter is not of type ORYX.Core.UIObject.") + } + }, remove: function (a, b) { + if (this.children.member(a)) { + var c = a.parent; + this.children = this.children.without(a); + a.parent = undefined; + if (a instanceof ORYX.Core.Shape) { + if (a instanceof ORYX.Core.Edge) { + a.removeMarkers(); + a.node = this.node.childNodes[0].childNodes[2].removeChild(a.node) + } else { + a.node = this.node.childNodes[0].childNodes[1].removeChild(a.node); + this.nodes = this.nodes.without(a) + } + } else { + if (a instanceof ORYX.Core.Controls.Control) { + if (a instanceof ORYX.Core.Controls.Docker) { + a.node = this.node.childNodes[1].childNodes[0].removeChild(a.node); + this.dockers = this.dockers.without(a) + } else { + if (a instanceof ORYX.Core.Controls.Magnet) { + a.node = this.node.childNodes[1].childNodes[1].removeChild(a.node); + this.magnets = this.magnets.without(a) + } else { + a.node = this.node.childNodes[1].removeChild(a.node) + } + } + } + } + if (this.eventHandlerCallback && b !== true) { + this.eventHandlerCallback({type: ORYX.CONFIG.EVENT_SHAPEREMOVED, shape: a, parent: c}) + } + this._changed() + } else { + ORYX.Log.warn("remove: ORYX.Core.UIObject is not a child of this object.") + } + }, getIntersectionPoint: function () { + var p, o, h, g; + switch (arguments.length) { + case 2: + p = arguments[0].x; + o = arguments[0].y; + h = arguments[1].x; + g = arguments[1].y; + break; + case 4: + p = arguments[0]; + o = arguments[1]; + h = arguments[2]; + g = arguments[3]; + break; + default: + throw"getIntersectionPoints needs two or four arguments" + } + var d, b, e, c; + var a = this.absoluteBounds(); + if (this.isPointIncluded(p, o, a)) { + d = p; + b = o + } else { + e = p; + c = o + } + if (this.isPointIncluded(h, g, a)) { + d = h; + b = g + } else { + e = h; + c = g + } + if (!d || !b || !e || !c) { + return undefined + } + var n = 0; + var m = 0; + var r, q; + var l = 1; + var k = 0; + while (true) { + var n = Math.min(d, e) + ((Math.max(d, e) - Math.min(d, e)) / 2); + var m = Math.min(b, c) + ((Math.max(b, c) - Math.min(b, c)) / 2); + if (this.isPointIncluded(n, m, a)) { + d = n; + b = m + } else { + e = n; + c = m + } + var f = Math.sqrt(Math.pow(d - e, 2) + Math.pow(b - c, 2)); + r = d + ((e - d) / f), q = b + ((c - b) / f); + if (!this.isPointIncluded(r, q, a)) { + break + } + } + return {x: r, y: q} + }, isPointIncluded: function () { + return false + }, containsNode: function (b) { + var a = this.node.firstChild.firstChild; + while (b) { + if (b == a) { + return true + } + b = b.parentNode + } + return false + }, isPointOverOffset: function () { + return this.isPointIncluded.apply(this, arguments) + }, _dockerChanged: function () { + }, createDocker: function (b, a) { + var c = new ORYX.Core.Controls.Docker({eventHandlerCallback: this.eventHandlerCallback}); + c.bounds.registerCallback(this._dockerChangedCallback); + if (a) { + c.bounds.centerMoveTo(a) + } + this.add(c, b); + return c + }, serialize: function () { + var a = arguments.callee.$.serialize.apply(this); + a.push({name: "bounds", prefix: "oryx", value: this.bounds.serializeForERDF(), type: "literal"}); + this.getOutgoingShapes().each((function (b) { + a.push({ + name: "outgoing", + prefix: "raziel", + value: "#" + ERDF.__stripHashes(b.resourceId), + type: "resource" + }) + }).bind(this)); + a.push({ + name: "parent", + prefix: "raziel", + value: "#" + ERDF.__stripHashes(this.parent.resourceId), + type: "resource" + }); + return a + }, deserialize: function (d, c) { + arguments.callee.$.deserialize.apply(this, arguments); + var e = d.find(function (b) { + return "oryx-bounds" === (b.prefix + "-" + b.name) + }); + if (e) { + var a = e.value.replace(/,/g, " ").split(" ").without(""); + if (this instanceof ORYX.Core.Edge) { + if (!this.dockers.first().isChanged) { + this.dockers.first().bounds.centerMoveTo(parseFloat(a[0]), parseFloat(a[1])) + } + if (!this.dockers.last().isChanged) { + this.dockers.last().bounds.centerMoveTo(parseFloat(a[2]), parseFloat(a[3])) + } + } else { + this.bounds.set(parseFloat(a[0]), parseFloat(a[1]), parseFloat(a[2]), parseFloat(a[3])) + } + } + if (c && c.labels instanceof Array) { + c.labels.each(function (b) { + var f = this.getLabel(b.ref); + if (f) { + f.deserialize(b, this) + } + }.bind(this)) + } + }, toJSON: function () { + var a = arguments.callee.$.toJSON.apply(this, arguments); + var c = [], b = this.id; + this._labels.each(function (e) { + var d = e.value.serialize(); + if (d) { + d.ref = e.key.replace(b, ""); + c.push(d) + } + }); + if (c.length > 0) { + a.labels = c + } + return a + }, _init: function (a) { + this._adjustIds(a, 0) + }, _adjustIds: function (c, e) { + if (c instanceof Element) { + var a = c.getAttributeNS(null, "id"); + if (a && a !== "") { + c.setAttributeNS(null, "id", this.id + a) + } else { + c.setAttributeNS(null, "id", this.id + "_" + this.id + "_" + e); + e++ + } + var d = c.getAttributeNS(null, "fill"); + if (d && d.include("url(#")) { + d = d.replace(/url\(#/g, "url(#" + this.id); + c.setAttributeNS(null, "fill", d) + } + if (c.hasChildNodes()) { + for (var b = 0; b < c.childNodes.length; b++) { + e = this._adjustIds(c.childNodes[b], e) + } + } + } + return e + }, toString: function () { + return "ORYX.Core.Shape " + this.getId() + } +}; +ORYX.Core.Shape = ORYX.Core.AbstractShape.extend(ORYX.Core.Shape); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.Controls) { + ORYX.Core.Controls = {} +} +ORYX.Core.Controls.Control = ORYX.Core.UIObject.extend({ + toString: function () { + return "Control " + this.id + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.Controls) { + ORYX.Core.Controls = {} +} +ORYX.Core.Controls.Docker = ORYX.Core.Controls.Control.extend({ + construct: function () { + arguments.callee.$.construct.apply(this, arguments); + this.isMovable = true; + this.bounds.set(0, 0, 16, 16); + this.referencePoint = undefined; + this._dockedShapeBounds = undefined; + this._dockedShape = undefined; + this._oldRefPoint1 = undefined; + this._oldRefPoint2 = undefined; + this.anchorLeft; + this.anchorRight; + this.anchorTop; + this.anchorBottom; + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", null, ["g"]); + this._dockerNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, ["g", {"pointer-events": "all"}, ["circle", { + cx: "8", + cy: "8", + r: "8", + stroke: "none", + fill: "none" + }], ["circle", {cx: "8", cy: "8", r: "3", stroke: "black", fill: "red", "stroke-width": "1"}]]); + this._referencePointNode = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, ["g", {"pointer-events": "none"}, ["circle", { + cx: this.bounds.upperLeft().x, + cy: this.bounds.upperLeft().y, + r: 3, + fill: "red", + "fill-opacity": 0.4 + }]]); + this.hide(); + this.addEventHandlers(this._dockerNode); + this._updateCallback = this._changed.bind(this) + }, update: function () { + if (this._dockedShape) { + if (this._dockedShapeBounds && this._dockedShape instanceof ORYX.Core.Node) { + var g = this._dockedShapeBounds.width(); + var d = this._dockedShapeBounds.height(); + if (!g) { + g = 1 + } + if (!d) { + d = 1 + } + var o = this._dockedShape.bounds.width() / g; + var m = this._dockedShape.bounds.height() / d; + if (o !== 1 || m !== 1) { + this.referencePoint.x *= o; + this.referencePoint.y *= m + } + this._dockedShapeBounds = this._dockedShape.bounds.clone() + } + var b = this.parent.dockers.indexOf(this); + var f = this; + var e = this.parent.dockers.length > 1 ? (b === 0 ? this.parent.dockers[b + 1] : this.parent.dockers[b - 1]) : undefined; + var n = f.getDockedShape() ? f.getAbsoluteReferencePoint() : f.bounds.center(); + var k = e && e.getDockedShape() ? e.getAbsoluteReferencePoint() : e ? e.bounds.center() : undefined; + if (!k) { + var a = this._dockedShape.absoluteCenterXY(); + var l = this._dockedShape.bounds.width() * this._dockedShape.bounds.height(); + k = {x: n.x + (a.x - n.x) * -l, y: n.y + (a.y - n.y) * -l} + } + var c = undefined; + c = this._dockedShape.getIntersectionPoint(n, k); + if (!c) { + c = this.getAbsoluteReferencePoint() + } + if (this.parent && this.parent.parent) { + var h = this.parent.parent.absoluteXY(); + c.x -= h.x; + c.y -= h.y + } + this.bounds.centerMoveTo(c); + this._oldRefPoint1 = n; + this._oldRefPoint2 = k + } + arguments.callee.$.update.apply(this, arguments) + }, refresh: function () { + arguments.callee.$.refresh.apply(this, arguments); + var a = this.bounds.upperLeft(); + this._dockerNode.setAttributeNS(null, "transform", "translate(" + a.x + ", " + a.y + ")"); + a = Object.clone(this.referencePoint); + if (a && this._dockedShape) { + var b; + if (this.parent instanceof ORYX.Core.Edge) { + b = this._dockedShape.absoluteXY() + } else { + b = this._dockedShape.bounds.upperLeft() + } + a.x += b.x; + a.y += b.y + } else { + a = this.bounds.center() + } + this._referencePointNode.setAttributeNS(null, "transform", "translate(" + a.x + ", " + a.y + ")") + }, setReferencePoint: function (a) { + if (this.referencePoint !== a && (!this.referencePoint || !a || this.referencePoint.x !== a.x || this.referencePoint.y !== a.y)) { + this.referencePoint = a; + this._changed() + } + }, getAbsoluteReferencePoint: function () { + if (!this.referencePoint || !this._dockedShape) { + return undefined + } else { + var a = this._dockedShape.absoluteXY(); + return {x: this.referencePoint.x + a.x, y: this.referencePoint.y + a.y} + } + }, setDockedShape: function (b) { + if (this._dockedShape) { + this._dockedShape.bounds.unregisterCallback(this._updateCallback); + if (this === this.parent.dockers.first()) { + this.parent.incoming = this.parent.incoming.without(this._dockedShape); + this._dockedShape.outgoing = this._dockedShape.outgoing.without(this.parent) + } else { + if (this === this.parent.dockers.last()) { + this.parent.outgoing = this.parent.outgoing.without(this._dockedShape); + this._dockedShape.incoming = this._dockedShape.incoming.without(this.parent) + } + } + } + this._dockedShape = b; + this._dockedShapeBounds = undefined; + var a = undefined; + if (this._dockedShape) { + if (this === this.parent.dockers.first()) { + this.parent.incoming.push(b); + b.outgoing.push(this.parent) + } else { + if (this === this.parent.dockers.last()) { + this.parent.outgoing.push(b); + b.incoming.push(this.parent) + } + } + var c = this.bounds; + var d = b.absoluteXY(); + a = {x: c.center().x - d.x, y: c.center().y - d.y}; + this._dockedShapeBounds = this._dockedShape.bounds.clone(); + this._dockedShape.bounds.registerCallback(this._updateCallback); + this.setDockerColor(ORYX.CONFIG.DOCKER_DOCKED_COLOR) + } else { + this.setDockerColor(ORYX.CONFIG.DOCKER_UNDOCKED_COLOR) + } + this.setReferencePoint(a); + this._changed() + }, getDockedShape: function () { + return this._dockedShape + }, isDocked: function () { + return !!this._dockedShape + }, setDockerColor: function (a) { + this._dockerNode.lastChild.setAttributeNS(null, "fill", a) + }, preventHiding: function (a) { + this._preventHiding = Math.max(0, (this._preventHiding || 0) + (a ? 1 : -1)) + }, hide: function () { + if (this._preventHiding) { + return false + } + this.node.setAttributeNS(null, "visibility", "hidden"); + this._referencePointNode.setAttributeNS(null, "visibility", "hidden"); + this.children.each(function (a) { + a.hide() + }) + }, show: function () { + this.node.setAttributeNS(null, "visibility", "visible"); + if (this.getDockedShape() instanceof ORYX.Core.Edge) { + this._referencePointNode.setAttributeNS(null, "visibility", "hidden") + } else { + this._referencePointNode.setAttributeNS(null, "visibility", "visible") + } + this.children.each(function (a) { + a.show() + }) + }, toString: function () { + return "Docker " + this.id + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +if (!ORYX.Core.Controls) { + ORYX.Core.Controls = {} +} +ORYX.Core.Controls.Magnet = ORYX.Core.Controls.Control.extend({ + construct: function () { + arguments.callee.$.construct.apply(this, arguments); + this.anchorLeft; + this.anchorRight; + this.anchorTop; + this.anchorBottom; + this.bounds.set(0, 0, 16, 16); + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", null, ["g", {"pointer-events": "all"}, ["circle", { + cx: "8", + cy: "8", + r: "4", + stroke: "none", + fill: "red", + "fill-opacity": "0.3" + }],]); + this.hide() + }, update: function () { + arguments.callee.$.update.apply(this, arguments) + }, _update: function () { + arguments.callee.$.update.apply(this, arguments) + }, refresh: function () { + arguments.callee.$.refresh.apply(this, arguments); + var a = this.bounds.upperLeft(); + this.node.setAttributeNS(null, "transform", "translate(" + a.x + ", " + a.y + ")") + }, show: function () { + arguments.callee.$.show.apply(this, arguments) + }, toString: function () { + return "Magnet " + this.id + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.Node = { + construct: function (a, c, b) { + arguments.callee.$.construct.apply(this, arguments); + this.isSelectable = true; + this.isMovable = true; + this._dockerUpdated = false; + this.facade = b; + this._oldBounds = new ORYX.Core.Bounds(); + this._svgShapes = []; + this.minimumSize = undefined; + this.maximumSize = undefined; + this.isHorizontallyResizable = false; + this.isVerticallyResizable = false; + this.dataId = undefined; + this._init(this._stencil.view()); + this.forcedHeight = -1 + }, _update: function () { + this.dockers.invoke("update"); + if (this.isChanged) { + var c = this.bounds; + var d = this._oldBounds; + if (this.isResized) { + var o = c.width() / d.width(); + var n = c.height() / d.height(); + this._svgShapes.each(function (w) { + if (w.isHorizontallyResizable) { + w.width = w.oldWidth * o + } + if (w.isVerticallyResizable) { + w.height = w.oldHeight * n + } + var v; + var s = w.anchorLeft; + var u = w.anchorRight; + if (u) { + v = d.width() - (w.oldX + w.oldWidth); + if (s) { + w.width = c.width() - w.x - v + } else { + w.x = c.width() - (v + w.width) + } + } else { + if (!s) { + w.x = o * w.oldX; + if (!w.isHorizontallyResizable) { + w.x = w.x + w.width * o / 2 - w.width / 2 + } + } + } + var p = w.anchorTop; + var t = w.anchorBottom; + if (t) { + v = d.height() - (w.oldY + w.oldHeight); + if (p) { + w.height = c.height() - w.y - v + } else { + if (!w._isYLocked) { + w.y = c.height() - (v + w.height) + } + } + } else { + if (!p) { + w.y = n * w.oldY; + if (!w.isVerticallyResizable) { + w.y = w.y + w.height * n / 2 - w.height / 2 + } + } + } + }); + var g = {x: 0, y: 0}; + if (!this.isHorizontallyResizable && c.width() !== d.width()) { + g.x = d.width() - c.width() + } + if (!this.isVerticallyResizable && c.height() !== d.height()) { + g.y = d.height() - c.height() + } + if (g.x !== 0 || g.y !== 0) { + c.extend(g) + } + g = {x: 0, y: 0}; + var e, k; + if (this.minimumSize) { + ORYX.Log.debug("Shape (%0)'s min size: (%1x%2)", this, this.minimumSize.width, this.minimumSize.height); + e = this.minimumSize.width - c.width(); + if (e > 0) { + g.x += e + } + k = this.minimumSize.height - c.height(); + if (k > 0) { + g.y += k + } + } + if (this.maximumSize) { + ORYX.Log.debug("Shape (%0)'s max size: (%1x%2)", this, this.maximumSize.width, this.maximumSize.height); + e = c.width() - this.maximumSize.width; + if (e > 0) { + g.x -= e + } + k = c.height() - this.maximumSize.height; + if (k > 0) { + g.y -= k + } + } + if (g.x !== 0 || g.y !== 0) { + c.extend(g) + } + var o = c.width() / d.width(); + var n = c.height() / d.height(); + var m, l, q, f, b, a, r; + this.magnets.each(function (p) { + m = p.anchorLeft; + l = p.anchorRight; + q = p.anchorTop; + f = p.anchorBottom; + b = p.bounds.center(); + if (m) { + a = b.x + } else { + if (l) { + a = c.width() - (d.width() - b.x) + } else { + a = b.x * o + } + } + if (q) { + r = b.y + } else { + if (f) { + r = c.height() - (d.height() - b.y) + } else { + r = b.y * n + } + } + if (b.x !== a || b.y !== r) { + p.bounds.centerMoveTo(a, r) + } + }); + this.getLabels().each(function (p) { + if (!p.isAnchorLeft()) { + if (p.isAnchorRight()) { + p.setX(c.width() - (d.width() - p.oldX)) + } else { + p.setX((p.position ? p.position.x : p.x) * o) + } + } + if (!p.isAnchorTop()) { + if (p.isAnchorBottom()) { + p.setY(c.height() - (d.height() - p.oldY)) + } else { + p.setY((p.position ? p.position.y : p.y) * n) + } + } + if (p.position) { + if (!p.isOriginAnchorLeft()) { + if (p.isOriginAnchorRight()) { + p.setOriginX(c.width() - (d.width() - p.oldX)) + } else { + p.setOriginX(p.x * o) + } + } + if (!p.isOriginAnchorTop()) { + if (p.isOriginAnchorBottom()) { + p.setOriginY(c.height() - (d.height() - p.oldY)) + } else { + p.setOriginY(p.y * n) + } + } + } + }); + var h = this.dockers[0]; + if (h) { + h.bounds.unregisterCallback(this._dockerChangedCallback); + if (!this._dockerUpdated) { + h.bounds.centerMoveTo(this.bounds.center()); + this._dockerUpdated = false + } + h.update(); + h.bounds.registerCallback(this._dockerChangedCallback) + } + this.isResized = false + } + this.refresh(); + this.isChanged = false; + this._oldBounds = this.bounds.clone() + } + this.children.each(function (p) { + if (!(p instanceof ORYX.Core.Controls.Docker)) { + p._update() + } + }); + if (this.dockers.length > 0 && !this.dockers.first().getDockedShape()) { + this.dockers.each(function (p) { + p.bounds.centerMoveTo(this.bounds.center()) + }.bind(this)) + } + }, refresh: function () { + arguments.callee.$.refresh.apply(this, arguments); + var a = this.bounds.upperLeft().x; + var b = this.bounds.upperLeft().y; + this.node.firstChild.setAttributeNS(null, "transform", "translate(" + a + ", " + b + ")"); + this.node.childNodes[1].childNodes[1].setAttributeNS(null, "transform", "translate(" + a + ", " + b + ")"); + this._svgShapes.each(function (c) { + c.update() + }) + }, _dockerChanged: function () { + var a = this.dockers[0]; + this.bounds.centerMoveTo(a.bounds.center()); + this._dockerUpdated = true + }, _initSVGShapes: function (c) { + var a = []; + try { + var f = new ORYX.Core.SVG.SVGShape(c); + a.push(f) + } catch (d) {var abcdef=1 + } + if (c.hasChildNodes()) { + for (var b = 0; b < c.childNodes.length; b++) { + a = a.concat(this._initSVGShapes(c.childNodes[b])) + } + } + return a + }, isPointIncluded: function (a, k, c) { + var h = c && c instanceof ORYX.Core.Bounds ? c : this.absoluteBounds(); + if (!h.isIncluded(a, k)) { + return false + } else { + } + var e = h.upperLeft(); + var g = a - e.x; + var f = k - e.y; + var d = 0; + do { + var b = this._svgShapes[d++].isPointIncluded(g, f) + } while (!b && d < this._svgShapes.length); + return b + }, isPointOverOffset: function (d, c) { + var b = arguments.callee.$.isPointOverOffset.apply(this, arguments); + if (b) { + var a = this.absoluteBounds(); + a.widen(-ORYX.CONFIG.BORDER_OFFSET); + if (!a.isIncluded(d, c)) { + return true + } + } + return false + }, serialize: function () { + var a = arguments.callee.$.serialize.apply(this); + this.dockers.each((function (e) { + if (e.getDockedShape()) { + var d = e.referencePoint; + d = d ? d : e.bounds.center(); + a.push({name: "docker", prefix: "oryx", value: $H(d).values().join(","), type: "literal"}) + } + }).bind(this)); + try { + var b = this.getStencil().serialize(); + if (b.type) { + b.shape = this; + b.data = a; + b.result = undefined; + b.forceExecution = true; + this._delegateEvent(b); + if (b.result) { + a = b.result + } + } + } catch (c) {var abcdef=1 + } + return a + }, deserialize: function (f) { + arguments.callee.$.deserialize.apply(this, arguments); + try { + var a = this.getStencil().deserialize(); + if (a.type) { + a.shape = this; + a.data = f; + a.result = undefined; + a.forceExecution = true; + this._delegateEvent(a); + if (a.result) { + f = a.result + } + } + } catch (g) {var abcdef=1 + } + var b = f.findAll(function (e) { + return (e.prefix + "-" + e.name) == "raziel-outgoing" + }); + b.each((function (h) { + if (!this.parent) { + return + } + var e = this.getCanvas().getChildShapeByResourceId(h.value); + if (e) { + if (e instanceof ORYX.Core.Edge) { + e.dockers.first().setDockedShape(this); + e.dockers.first().setReferencePoint(e.dockers.first().bounds.center()) + } else { + if (e.dockers.length > 0) { + e.dockers.first().setDockedShape(this) + } + } + } + }).bind(this)); + if (this.dockers.length === 1) { + var d; + d = f.find(function (e) { + return (e.prefix + "-" + e.name === "oryx-dockers") + }); + if (d) { + var c = d.value.replace(/,/g, " ").split(" ").without("").without("#"); + if (c.length === 2 && this.dockers[0].getDockedShape()) { + this.dockers[0].setReferencePoint({x: parseFloat(c[0]), y: parseFloat(c[1])}) + } else { + this.dockers[0].bounds.centerMoveTo(parseFloat(c[0]), parseFloat(c[1])) + } + } + } + }, _init: function (n) { + arguments.callee.$._init.apply(this, arguments); + var o = n.getElementsByTagName("g")[0]; + var r = n.ownerDocument.createAttribute("title"); + r.nodeValue = this.getStencil().title(); + o.setAttributeNode(r); + var u = n.ownerDocument.createAttribute("id"); + u.nodeValue = this.id; + o.setAttributeNode(u); + var b = this.node.childNodes[0].childNodes[0]; + o = b.appendChild(o); + this.addEventHandlers(o.parentNode); + var t = o.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "minimumSize"); + if (t) { + t = t.replace("/,/g", " "); + var k = t.split(" "); + k = k.without(""); + if (k.length > 1) { + this.minimumSize = {width: parseFloat(k[0]), height: parseFloat(k[1])} + } else { + this.minimumSize = {width: 1, height: 1} + } + } + var g = o.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "maximumSize"); + if (g) { + g = g.replace("/,/g", " "); + var l = g.split(" "); + l = l.without(""); + if (l.length > 1) { + this.maximumSize = {width: parseFloat(l[0]), height: parseFloat(l[1])} + } + } + if (this.minimumSize && this.maximumSize && (this.minimumSize.width > this.maximumSize.width || this.minimumSize.height > this.maximumSize.height)) { + throw this + ": Minimum Size must be greater than maxiumSize." + } + this._svgShapes = this._initSVGShapes(o); + var a = {x: undefined, y: undefined}; + var d = {x: undefined, y: undefined}; + var y = this; + this._svgShapes.each(function (z) { + a.x = (a.x !== undefined) ? Math.min(a.x, z.x) : z.x; + a.y = (a.y !== undefined) ? Math.min(a.y, z.y) : z.y; + d.x = (d.x !== undefined) ? Math.max(d.x, z.x + z.width) : z.x + z.width; + d.y = (d.y !== undefined) ? Math.max(d.y, z.y + z.height) : z.y + z.height; + if (z.isHorizontallyResizable) { + y.isHorizontallyResizable = true; + y.isResizable = true + } + if (z.isVerticallyResizable) { + y.isVerticallyResizable = true; + y.isResizable = true + } + if (z.anchorTop && z.anchorBottom) { + y.isVerticallyResizable = true; + y.isResizable = true + } + if (z.anchorLeft && z.anchorRight) { + y.isHorizontallyResizable = true; + y.isResizable = true + } + }); + this._svgShapes.each(function (z) { + z.x -= a.x; + z.y -= a.y; + z.update() + }); + var x = a.x; + var w = a.y; + d.x -= x; + d.y -= w; + a.x = 0; + a.y = 0; + if (d.x === 0) { + d.x = 1 + } + if (d.y === 0) { + d.y = 1 + } + this._oldBounds.set(a, d); + this.bounds.set(a, d); + var f = n.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_ORYX, "magnets"); + if (f && f.length > 0) { + f = $A(f[0].getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_ORYX, "magnet")); + var y = this; + f.each(function (A) { + var E = new ORYX.Core.Controls.Magnet({eventHandlerCallback: y.eventHandlerCallback}); + var z = parseFloat(A.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cx")); + var F = parseFloat(A.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cy")); + E.bounds.centerMoveTo({x: z - x, y: F - w}); + var D = A.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "anchors"); + if (D) { + D = D.replace("/,/g", " "); + D = D.split(" ").without(""); + for (var B = 0; B < D.length; B++) { + switch (D[B].toLowerCase()) { + case"left": + E.anchorLeft = true; + break; + case"right": + E.anchorRight = true; + break; + case"top": + E.anchorTop = true; + break; + case"bottom": + E.anchorBottom = true; + break + } + } + } + y.add(E); + if (!this._defaultMagnet) { + var C = A.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "default"); + if (C && C.toLowerCase() === "yes") { + y._defaultMagnet = E + } + } + }) + } else { + var h = new ORYX.Core.Controls.Magnet(); + h.bounds.centerMoveTo(this.bounds.width() / 2, this.bounds.height() / 2); + this.add(h) + } + var s = n.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_ORYX, "docker"); + if (s && s.length > 0) { + s = s[0]; + var q = this.createDocker(); + var e = parseFloat(s.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cx")); + var c = parseFloat(s.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "cy")); + q.bounds.centerMoveTo({x: e - x, y: c - w}); + var p = s.getAttributeNS(ORYX.CONFIG.NAMESPACE_ORYX, "anchors"); + if (p) { + p = p.replace("/,/g", " "); + p = p.split(" ").without(""); + for (var v = 0; v < p.length; v++) { + switch (p[v].toLowerCase()) { + case"left": + q.anchorLeft = true; + break; + case"right": + q.anchorRight = true; + break; + case"top": + q.anchorTop = true; + break; + case"bottom": + q.anchorBottom = true; + break + } + } + } + } + var m = o.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "text"); + $A(m).each((function (A) { + var z = new ORYX.Core.SVG.Label({textElement: A, shapeId: this.id}); + z.x -= x; + z.y -= w; + this._labels[z.id] = z; + z.registerOnChange(this.layout.bind(this)); + if (this._stencil.id().indexOf(ORYX.CONFIG.FORM_ELEMENT_ID_PREFIX) == 0) { + z.registerOnChange(this.fitToLabels.bind(this)) + } + }).bind(this)) + }, fitToLabels: function () { + var e = 0; + this.getLabels().each(function (g) { + var f = g.getY() + g.getHeight(); + if (f > e) { + e = f + } + }); + var c = this.bounds; + var b = false; + if (this.minimumSize) { + var d = this.minimumSize.height; + if (e < d && c.height() > d && d > this.forcedHeight) { + c.set(c.upperLeft().x, c.upperLeft().y, c.lowerRight().x, c.upperLeft().y + d); + b = true + } else { + if (e > d && c.height() != e && e > this.forcedHeight) { + c.set(c.upperLeft().x, c.upperLeft().y, c.lowerRight().x, c.upperLeft().y + e); + b = true + } else { + if (c.height() > this.forcedHeight && this.forcedHeight > 0) { + c.set(c.upperLeft().x, c.upperLeft().y, c.lowerRight().x, c.upperLeft().y + this.forcedHeight); + b = true + } + } + } + } + if (b) { + if (this.facade.getCanvas() != null) { + this.facade.getCanvas().update() + } + if (this.facade.getSelection().member(this)) { + var a = this.facade.getSelection(); + this.facade.setSelection([]); + this.facade.setSelection(a) + } + } + }, createDocker: function () { + var a = new ORYX.Core.Controls.Docker({eventHandlerCallback: this.eventHandlerCallback}); + a.bounds.registerCallback(this._dockerChangedCallback); + this.dockers.push(a); + a.parent = this; + a.bounds.registerCallback(this._changedCallback); + return a + }, toString: function () { + return this._stencil.title() + " " + this.id + } +}; +ORYX.Core.Node = ORYX.Core.Shape.extend(ORYX.Core.Node); +NAMESPACE_SVG = "http://www.w3.org/2000/svg"; +NAMESPACE_ORYX = "http://www.b3mn.org/oryx"; +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Core) { + ORYX.Core = {} +} +ORYX.Core.Edge = { + construct: function (a, d, b) { + arguments.callee.$.construct.apply(this, arguments); + this.isMovable = true; + this.isSelectable = true; + this._dockerUpdated = false; + this._markers = new Hash(); + this._paths = []; + this._interactionPaths = []; + this._dockersByPath = new Hash(); + this._markersByPath = new Hash(); + this.attachedNodePositionData = new Hash(); + var c = this.node.childNodes[0].childNodes[0]; + c = ORYX.Editor.graft("http://www.w3.org/2000/svg", c, ["g", {"pointer-events": "painted"}]); + this.addEventHandlers(c.parentNode); + this._oldBounds = this.bounds.clone(); + this._init(this._stencil.view()); + if (d instanceof Array) { + this.deserialize(d) + } + }, _update: function (c) { + if (this._dockerUpdated || this.isChanged || c) { + this.dockers.invoke("update"); + if (false && (this.bounds.width() === 0 || this.bounds.height() === 0)) { + var d = this.bounds.width(); + var q = this.bounds.height(); + this.bounds.extend({x: d === 0 ? 2 : 0, y: q === 0 ? 2 : 0}); + this.bounds.moveBy({x: d === 0 ? -1 : 0, y: q === 0 ? -1 : 0}) + } + var e = this.bounds.upperLeft(); + var n = this._oldBounds.upperLeft(); + var f = this._oldBounds.width() === 0 ? this.bounds.width() : this._oldBounds.width(); + var p = this._oldBounds.height() === 0 ? this.bounds.height() : this._oldBounds.height(); + var m = e.x - n.x; + var k = e.y - n.y; + var o = (this.bounds.width() / f) || 1; + var g = (this.bounds.height() / p) || 1; + this.dockers.each((function (b) { + b.bounds.unregisterCallback(this._dockerChangedCallback); + if (!this._dockerUpdated) { + b.bounds.moveBy(m, k); + if (o !== 1 || g !== 1) { + var s = b.bounds.upperLeft().x - e.x; + var a = b.bounds.upperLeft().y - e.y; + b.bounds.moveTo(e.x + s * o, e.y + a * g) + } + } + b.update(); + b.bounds.registerCallback(this._dockerChangedCallback) + }).bind(this)); + if (this._dockerUpdated) { + var l = this.dockers.first().bounds.center(); + var h = this.dockers.first().bounds.center(); + this.dockers.each((function (b) { + var a = b.bounds.center(); + l.x = Math.min(l.x, a.x); + l.y = Math.min(l.y, a.y); + h.x = Math.max(h.x, a.x); + h.y = Math.max(h.y, a.y) + }).bind(this)); + this.bounds.set(Object.clone(l), Object.clone(h)) + } + e = this.bounds.upperLeft(); + n = this._oldBounds.upperLeft(); + o = (this.bounds.width() / (f || this.bounds.width())); + g = (this.bounds.height() / (p || this.bounds.height())); + m = e.x - n.x; + k = e.y - n.y; + this.getLabels().each(function (C) { + if (C.getReferencePoint()) { + var w = C.getReferencePoint(); + var K = w.segment.from, b = w.segment.to; + if (!K || !K.parent || !b || !b.parent) { + return + } + var J = K.bounds.center(), B = b.bounds.center(); + if (J.x === w.segment.fromPosition.x && J.y === w.segment.fromPosition.y && B.x === w.segment.toPosition.x && B.y === w.segment.toPosition.y && !w.dirty) { + return + } + if (!this.parent.initializingShapes) { + var L = ORYX.Core.Math.getDistanceBetweenTwoPoints(w.segment.fromPosition, w.segment.toPosition, w.intersection); + var M = ORYX.Core.Math.getPointBetweenTwoPoints(J, B, isNaN(L) ? 0.5 : L); + var I = ORYX.Core.Math.getOrthogonalIdentityVector(J, B); + var a = Math.abs(I.y) === 1, F = Math.abs(I.x) === 1; + I.x *= w.distance; + I.y *= w.distance; + I.x += M.x; + I.y += M.y; + var H = a && w.orientation && (w.iorientation || w.orientation).endsWith("r") ? -C.getWidth() : 0; + var G = F && w.orientation && (w.iorientation || w.orientation).startsWith("l") ? -C.getHeight() + 2 : 0; + C.setX(I.x + H); + C.setY(I.y + G); + this.updateReferencePointOfLabel(C, M, K, b) + } else { + var I = ORYX.Core.Math.getOrthogonalIdentityVector(J, B); + I.x *= w.distance; + I.y *= w.distance; + I.x += w.intersection.x; + I.y += w.intersection.y; + C.setX(I.x); + C.setY(I.y); + w.segment.fromPosition = J; + w.segment.toPosition = B + } + return + } + if (C.position && !this.parent.initializingShapes) { + var E = C.position.x + (m * (o || 1)); + if (E > this.bounds.lowerRight().x) { + E += this.bounds.width() - (this.bounds.width() / (o || 1)) + } + var D = C.position.y + (k * (g || 1)); + if (D > this.bounds.lowerRight().y) { + D += this.bounds.height() - (this.bounds.height() / (g || 1)) + } + C.setX(E); + C.setY(D); + return + } + switch (C.getEdgePosition()) { + case"starttop": + var N = this._getAngle(this.dockers[0], this.dockers[1]); + var z = this.dockers.first().bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("left"); + C.verticalAlign("bottom"); + C.x = z.x + C.getOffsetTop(); + C.y = z.y - C.getOffsetTop(); + C.rotate(360 - N, z) + } else { + C.horizontalAlign("right"); + C.verticalAlign("bottom"); + C.x = z.x - C.getOffsetTop(); + C.y = z.y - C.getOffsetTop(); + C.rotate(180 - N, z) + } + break; + case"startmiddle": + var N = this._getAngle(this.dockers[0], this.dockers[1]); + var z = this.dockers.first().bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("left"); + C.verticalAlign("bottom"); + C.x = z.x + 2; + C.y = z.y + 4; + C.rotate(360 - N, z) + } else { + C.horizontalAlign("right"); + C.verticalAlign("bottom"); + C.x = z.x + 1; + C.y = z.y + 4; + C.rotate(180 - N, z) + } + break; + case"startbottom": + var N = this._getAngle(this.dockers[0], this.dockers[1]); + var z = this.dockers.first().bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("left"); + C.verticalAlign("top"); + C.x = z.x + C.getOffsetBottom(); + C.y = z.y + C.getOffsetBottom(); + C.rotate(360 - N, z) + } else { + C.horizontalAlign("right"); + C.verticalAlign("top"); + C.x = z.x - C.getOffsetBottom(); + C.y = z.y + C.getOffsetBottom(); + C.rotate(180 - N, z) + } + break; + case"midtop": + var v = this.dockers.length; + if (v % 2 == 0) { + var N = this._getAngle(this.dockers[v / 2 - 1], this.dockers[v / 2]); + var u = this.dockers[v / 2 - 1].bounds.center(); + var s = this.dockers[v / 2].bounds.center(); + var z = {x: (u.x + s.x) / 2, y: (u.y + s.y) / 2}; + C.horizontalAlign("center"); + C.verticalAlign("bottom"); + C.x = z.x; + C.y = z.y - C.getOffsetTop(); + if (N <= 90 || N > 270) { + C.rotate(360 - N, z) + } else { + C.rotate(180 - N, z) + } + } else { + var A = parseInt(v / 2); + var N = this._getAngle(this.dockers[A], this.dockers[A + 1]); + var z = this.dockers[A].bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("left"); + C.verticalAlign("bottom"); + C.x = z.x + C.getOffsetTop(); + C.y = z.y - C.getOffsetTop(); + C.rotate(360 - N, z) + } else { + C.horizontalAlign("right"); + C.verticalAlign("bottom"); + C.x = z.x - C.getOffsetTop(); + C.y = z.y - C.getOffsetTop(); + C.rotate(180 - N, z) + } + } + break; + case"midbottom": + var v = this.dockers.length; + if (v % 2 == 0) { + var N = this._getAngle(this.dockers[v / 2 - 1], this.dockers[v / 2]); + var u = this.dockers[v / 2 - 1].bounds.center(); + var s = this.dockers[v / 2].bounds.center(); + var z = {x: (u.x + s.x) / 2, y: (u.y + s.y) / 2}; + C.horizontalAlign("center"); + C.verticalAlign("top"); + C.x = z.x; + C.y = z.y + C.getOffsetTop(); + if (N <= 90 || N > 270) { + C.rotate(360 - N, z) + } else { + C.rotate(180 - N, z) + } + } else { + var A = parseInt(v / 2); + var N = this._getAngle(this.dockers[A], this.dockers[A + 1]); + var z = this.dockers[A].bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("left"); + C.verticalAlign("top"); + C.x = z.x + C.getOffsetBottom(); + C.y = z.y + C.getOffsetBottom(); + C.rotate(360 - N, z) + } else { + C.horizontalAlign("right"); + C.verticalAlign("top"); + C.x = z.x - C.getOffsetBottom(); + C.y = z.y + C.getOffsetBottom(); + C.rotate(180 - N, z) + } + } + break; + case"endtop": + var t = this.dockers.length; + var N = this._getAngle(this.dockers[t - 2], this.dockers[t - 1]); + var z = this.dockers.last().bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("right"); + C.verticalAlign("bottom"); + C.x = z.x - C.getOffsetTop(); + C.y = z.y - C.getOffsetTop(); + C.rotate(360 - N, z) + } else { + C.horizontalAlign("left"); + C.verticalAlign("bottom"); + C.x = z.x + C.getOffsetTop(); + C.y = z.y - C.getOffsetTop(); + C.rotate(180 - N, z) + } + break; + case"endbottom": + var t = this.dockers.length; + var N = this._getAngle(this.dockers[t - 2], this.dockers[t - 1]); + var z = this.dockers.last().bounds.center(); + if (N <= 90 || N > 270) { + C.horizontalAlign("right"); + C.verticalAlign("top"); + C.x = z.x - C.getOffsetBottom(); + C.y = z.y + C.getOffsetBottom(); + C.rotate(360 - N, z) + } else { + C.horizontalAlign("left"); + C.verticalAlign("top"); + C.x = z.x + C.getOffsetBottom(); + C.y = z.y + C.getOffsetBottom(); + C.rotate(180 - N, z) + } + break + } + }.bind(this)); + this.children.each(function (a) { + if (a instanceof ORYX.Core.Node) { + this.calculatePositionOfAttachedChildNode.call(this, a) + } + }.bind(this)); + this.refreshAttachedNodes(); + this.refresh(); + this.isChanged = false; + this._dockerUpdated = false; + this._oldBounds = this.bounds.clone() + } + var r = navigator.userAgent; + if (navigator.appVersion.indexOf("MSIE 10") !== -1 || (r.indexOf("Trident") !== -1 && r.indexOf("rv:11") !== -1)) { + this.node.parentNode.insertBefore(this.node, this.node) + } + }, movePointToUpperLeftOfNode: function (a, b) { + a.x -= b.width() / 2; + a.y -= b.height() / 2 + }, refreshAttachedNodes: function () { + this.attachedNodePositionData.values().each(function (a) { + var d = a.segment.docker1.bounds.center(); + var b = a.segment.docker2.bounds.center(); + this.relativizePoint(d); + this.relativizePoint(b); + var c = new Object(); + c.x = d.x + a.relativDistanceFromDocker1 * (b.x - d.x); + c.y = d.y + a.relativDistanceFromDocker1 * (b.y - d.y); + this.movePointToUpperLeftOfNode(c, a.node.bounds); + a.node.bounds.moveTo(c); + a.node._update() + }.bind(this)) + }, calculatePositionOfAttachedChildNode: function (b) { + var a = new Object(); + a.x = 0; + a.y = 0; + if (!this.attachedNodePositionData[b.getId()]) { + this.attachedNodePositionData[b.getId()] = new Object(); + this.attachedNodePositionData[b.getId()].relativDistanceFromDocker1 = 0; + this.attachedNodePositionData[b.getId()].node = b; + this.attachedNodePositionData[b.getId()].segment = new Object(); + this.findEdgeSegmentForNode(b) + } else { + if (b.isChanged) { + this.findEdgeSegmentForNode(b) + } + } + }, findEdgeSegmentForNode: function (c) { + var b = this.dockers.length; + var a = undefined; + for (i = 1; i < b; i++) { + var g = this.dockers[i - 1].bounds.center(); + var e = this.dockers[i].bounds.center(); + this.relativizePoint(g); + this.relativizePoint(e); + var d = c.bounds.center(); + var f = ORYX.Core.Math.distancePointLinie(g, e, d, true); + if ((f || f == 0) && ((!a && a != 0) || f < a)) { + a = f; + this.attachedNodePositionData[c.getId()].segment.docker1 = this.dockers[i - 1]; + this.attachedNodePositionData[c.getId()].segment.docker2 = this.dockers[i] + } + if (!f && !a && a != 0) { + (ORYX.Core.Math.getDistancePointToPoint(d, g) < ORYX.Core.Math.getDistancePointToPoint(d, e)) ? this.attachedNodePositionData[c.getId()].relativDistanceFromDocker1 = 0 : this.attachedNodePositionData[c.getId()].relativDistanceFromDocker1 = 1; + this.attachedNodePositionData[c.getId()].segment.docker1 = this.dockers[i - 1]; + this.attachedNodePositionData[c.getId()].segment.docker2 = this.dockers[i] + } + } + if (a || a == 0) { + this.attachedNodePositionData[c.getId()].relativDistanceFromDocker1 = this.getLineParameterForPosition(this.attachedNodePositionData[c.getId()].segment.docker1, this.attachedNodePositionData[c.getId()].segment.docker2, c) + } + }, findSegment: function (c) { + var b = this.dockers.length; + var a; + var d = c instanceof ORYX.Core.UIObject ? c.bounds.center() : c; + for (i = 1; i < b; i++) { + var g = this.dockers[i - 1].bounds.center(); + var e = this.dockers[i].bounds.center(); + var f = ORYX.Core.Math.distancePointLinie(g, e, d, true); + if (typeof f == "number" && (a === undefined || f < a.distance)) { + a = {distance: f, fromDocker: this.dockers[i - 1], toDocker: this.dockers[i]} + } + } + return a + }, getLineParameterForPosition: function (b, g, d) { + var f = b.bounds.center(); + var e = g.bounds.center(); + this.relativizePoint(f); + this.relativizePoint(e); + var c = ORYX.Core.Math.getPointOfIntersectionPointLine(f, e, d.bounds.center(), true); + if (!c) { + return 0 + } + var a = ORYX.Core.Math.getDistancePointToPoint(c, f) / ORYX.Core.Math.getDistancePointToPoint(f, e); + return a + }, relativizePoint: function (a) { + a.x -= this.bounds.upperLeft().x; + a.y -= this.bounds.upperLeft().y + }, optimizedUpdate: function () { + var a = function (b) { + if (!b._dockedShape || !b._dockedShapeBounds) { + return + } + var c = { + x: b._dockedShape.bounds.a.x - b._dockedShapeBounds.a.x, + y: b._dockedShape.bounds.a.y - b._dockedShapeBounds.a.y + }; + b.bounds.moveBy(c); + b._dockedShapeBounds.moveBy(c) + }; + a(this.dockers.first()); + a(this.dockers.last()); + this.refresh() + }, refresh: function () { + arguments.callee.$.refresh.apply(this, arguments); + var b; + this._paths.each((function (h, f) { + var e = this._dockersByPath[h.id]; + var l = undefined; + var k = undefined; + if (b) { + k = "M" + b.x + " " + b.y + } else { + l = e[0].bounds.center(); + b = l; + k = "M" + l.x + " " + l.y + } + for (var g = 1; g < e.length; g++) { + l = e[g].bounds.center(); + k = k + "L" + l.x + " " + l.y + " "; + b = l + } + h.setAttributeNS(null, "d", k); + this._interactionPaths[f].setAttributeNS(null, "d", k) + }).bind(this)); + if (this.getChildNodes().length > 0) { + var a = this.bounds.upperLeft().x; + var c = this.bounds.upperLeft().y; + this.node.firstChild.childNodes[1].setAttributeNS(null, "transform", "translate(" + a + ", " + c + ")") + } + }, getIntersectionPoint: function () { + var a = Math.floor(this.dockers.length / 2); + return ORYX.Core.Math.midPoint(this.dockers[a - 1].bounds.center(), this.dockers[a].bounds.center()) + }, isBoundsIncluded: function (c) { + var a = this.dockers, b = a.length; + return a.any(function (g, f) { + if (f == b - 1) { + return false + } + var e = g.bounds.center(); + var d = a[f + 1].bounds.center(); + return ORYX.Core.Math.isRectOverLine(e.x, e.y, d.x, d.y, c.a.x, c.a.y, c.b.x, c.b.y) + }) + }, isPointIncluded: function (g, f) { + var a = this.absoluteBounds().isIncluded(g, f, ORYX.CONFIG.OFFSET_EDGE_BOUNDS); + var e = undefined; + if (a && this.dockers.length > 0) { + var c = 0; + var d, b; + do { + d = this.dockers[c].bounds.center(); + b = this.dockers[++c].bounds.center(); + e = ORYX.Core.Math.isPointInLine(g, f, d.x, d.y, b.x, b.y, ORYX.CONFIG.OFFSET_EDGE_BOUNDS) + } while (!e && c < this.dockers.length - 1) + } + return e + }, isPointOverOffset: function () { + return false + }, containsNode: function (a) { + if (this._paths.include(a) || this._interactionPaths.include(a)) { + return true + } + return false + }, _getAngle: function (a, d) { + var c = a instanceof ORYX.Core.Controls.Docker ? a.absoluteCenterXY() : a; + var b = d instanceof ORYX.Core.Controls.Docker ? d.absoluteCenterXY() : d; + return ORYX.Core.Math.getAngle(c, b) + }, alignDockers: function () { + this._update(true); + var e = this.dockers.first().bounds.center(); + var d = this.dockers.last().bounds.center(); + var c = d.x - e.x; + var a = d.y - e.y; + var b = this.dockers.length - 1; + this.dockers.each((function (h, g) { + var f = g / b; + h.bounds.unregisterCallback(this._dockerChangedCallback); + h.bounds.moveTo(e.x + f * c, e.y + f * a); + h.bounds.registerCallback(this._dockerChangedCallback) + }).bind(this)); + this._dockerChanged() + }, add: function (a) { + arguments.callee.$.add.apply(this, arguments); + if (a instanceof ORYX.Core.Controls.Docker && this.dockers.include(a)) { + var b = this._dockersByPath.values()[0]; + if (b) { + b.splice(this.dockers.indexOf(a), 0, a) + } + this.handleChildShapesAfterAddDocker(a) + } + }, handleChildShapesAfterAddDocker: function (f) { + if (!f instanceof ORYX.Core.Controls.Docker) { + return undefined + } + var d = this.dockers.indexOf(f); + if (!(0 < d && d < this.dockers.length - 1)) { + return undefined + } + var e = this.dockers[d - 1]; + var b = this.dockers[d + 1]; + var c = this.getAttachedNodePositionDataForSegment(e, b); + var a = ORYX.Core.Math.getDistancePointToPoint(e.bounds.center(), f.bounds.center()); + var h = ORYX.Core.Math.getDistancePointToPoint(b.bounds.center(), f.bounds.center()); + if (!(a + h)) { + return + } + var g = a / (a + h); + c.each(function (m) { + if (m.value.relativDistanceFromDocker1 < g) { + m.value.segment.docker2 = f; + m.value.relativDistanceFromDocker1 = m.value.relativDistanceFromDocker1 / g + } else { + m.value.segment.docker1 = f; + var l = 1 - g; + var k = m.value.relativDistanceFromDocker1 - g; + m.value.relativDistanceFromDocker1 = k / l + } + }); + this.getLabels().each(function (m) { + var o = m.getReferencePoint(); + if (!o) { + return + } + var l = this.dockers.indexOf(f); + if (l >= o.segment.fromIndex && l <= o.segment.toIndex) { + var n = this.findSegment(o.intersection); + if (!n) { + n.fromDocker = o.segment.fromIndex >= (this.dockers.length / 2) ? this.dockers[0] : this.dockers[this.dockers.length - 2]; + n.toDocker = this.dockers[this.dockers.indexOf(from) + 1] + } + var k = n.fromDocker.bounds.center(), p = n.toDocker.bounds.center(); + var q = ORYX.Core.Math.getPointOfIntersectionPointLine(k, p, o.intersection, true); + this.updateReferencePointOfLabel(m, q, n.fromDocker, n.toDocker, true) + } + }.bind(this)); + this.refreshAttachedNodes() + }, getAttachedNodePositionDataForSegment: function (c, a) { + if (!((c instanceof ORYX.Core.Controls.Docker) && (a instanceof ORYX.Core.Controls.Docker))) { + return [] + } + var b = this.attachedNodePositionData.findAll(function (d) { + return d.value.segment.docker1 === c && d.value.segment.docker2 === a + }); + if (!b) { + return [] + } + return b + }, remove: function (a) { + arguments.callee.$.remove.apply(this, arguments); + if (this.attachedNodePositionData[a.getId()]) { + delete this.attachedNodePositionData[a.getId()] + } + if (a instanceof ORYX.Core.Controls.Docker) { + this.handleChildShapesAfterRemoveDocker(a) + } + }, updateReferencePointOfLabel: function (a, g, f, e, b) { + if (!a.getReferencePoint() || !a.isVisible) { + return + } + var c = a.getReferencePoint(); + if (c.orientation && c.orientation !== "ce") { + var d = this._getAngle(f, e); + if (c.distance >= 0) { + if (d == 0) { + a.horizontalAlign("left"); + a.verticalAlign("bottom") + } else { + if (d > 0 && d < 90) { + a.horizontalAlign("right"); + a.verticalAlign("bottom") + } else { + if (d == 90) { + a.horizontalAlign("right"); + a.verticalAlign("top") + } else { + if (d > 90 && d < 180) { + a.horizontalAlign("right"); + a.verticalAlign("top") + } else { + if (d == 180) { + a.horizontalAlign("left"); + a.verticalAlign("top") + } else { + if (d > 180 && d < 270) { + a.horizontalAlign("left"); + a.verticalAlign("top") + } else { + if (d == 270) { + a.horizontalAlign("left"); + a.verticalAlign("top") + } else { + if (d > 270 && d <= 360) { + a.horizontalAlign("left"); + a.verticalAlign("bottom") + } + } + } + } + } + } + } + } + } else { + if (d == 0) { + a.horizontalAlign("left"); + a.verticalAlign("top") + } else { + if (d > 0 && d < 90) { + a.horizontalAlign("left"); + a.verticalAlign("top") + } else { + if (d == 90) { + a.horizontalAlign("left"); + a.verticalAlign("top") + } else { + if (d > 90 && d < 180) { + a.horizontalAlign("left"); + a.verticalAlign("bottom") + } else { + if (d == 180) { + a.horizontalAlign("left"); + a.verticalAlign("bottom") + } else { + if (d > 180 && d < 270) { + a.horizontalAlign("right"); + a.verticalAlign("bottom") + } else { + if (d == 270) { + a.horizontalAlign("right"); + a.verticalAlign("top") + } else { + if (d > 270 && d <= 360) { + a.horizontalAlign("right"); + a.verticalAlign("top") + } + } + } + } + } + } + } + } + } + c.iorientation = c.iorientation || c.orientation; + c.orientation = (a.verticalAlign() == "top" ? "u" : "l") + (a.horizontalAlign() == "left" ? "l" : "r") + } + a.setReferencePoint(jQuery.extend({}, { + intersection: g, + segment: { + from: f, + fromIndex: this.dockers.indexOf(f), + fromPosition: f.bounds.center(), + to: e, + toIndex: this.dockers.indexOf(e), + toPosition: e.bounds.center() + }, + dirty: b || false + }, c)) + }, handleChildShapesAfterRemoveDocker: function (a) { + if (!(a instanceof ORYX.Core.Controls.Docker)) { + return + } + this.attachedNodePositionData.each(function (c) { + if (c.value.segment.docker1 === a) { + var b = this.dockers.indexOf(c.value.segment.docker2); + if (b == -1) { + return + } + c.value.segment.docker1 = this.dockers[b - 1] + } else { + if (c.value.segment.docker2 === a) { + var b = this.dockers.indexOf(c.value.segment.docker1); + if (b == -1) { + return + } + c.value.segment.docker2 = this.dockers[b + 1] + } + } + }.bind(this)); + this.getLabels().each(function (b) { + var d = b.getReferencePoint(); + if (!d) { + return + } + var g = d.segment.from; + var f = d.segment.to; + if (g !== a && f !== a) { + return + } + var c = this.findSegment(d.intersection); + if (!c) { + g = c.fromDocker; + f = c.toDocker + } else { + g = g === a ? this.dockers[this.dockers.indexOf(f) - 1] : g; + f = this.dockers[this.dockers.indexOf(g) + 1] + } + var e = ORYX.Core.Math.getPointOfIntersectionPointLine(g.bounds.center(), f.bounds.center(), d.intersection, true); + this.updateReferencePointOfLabel(b, e, g, f, true) + }.bind(this)); + this.refreshAttachedNodes() + }, addDocker: function (b, d) { + var c; + var a; + this._dockersByPath.any((function (e) { + return e.value.any((function (h, l) { + if (!c) { + c = h; + return false + } else { + var n = c.bounds.center(); + var m = h.bounds.center(); + var f = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var g = navigator.userAgent; + if (g.indexOf("MSIE") >= 0) { + var p = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (p !== 100) { + f = p / 100 + } + } + } + if (f !== 1) { + b.x = b.x / f; + b.y = b.y / f + } + if (ORYX.Core.Math.isPointInLine(b.x, b.y, n.x, n.y, m.x, m.y, 10)) { + var q = this._paths.find(function (r) { + return r.id === e.key + }); + if (q) { + var o = q.getAttributeNS(NAMESPACE_ORYX, "allowDockers"); + if (o && o.toLowerCase() === "no") { + return true + } + } + var k = (d) ? d : this.createDocker(this.dockers.indexOf(c) + 1, b); + k.bounds.centerMoveTo(b); + if (d) { + this.add(k, this.dockers.indexOf(c) + 1) + } + a = k; + return true + } else { + c = h; + return false + } + } + }).bind(this)) + }).bind(this)); + return a + }, removeDocker: function (a) { + if (this.dockers.length > 2 && !(this.dockers.first() === a)) { + this._dockersByPath.any((function (b) { + if (b.value.member(a)) { + if (a === b.value.last()) { + return true + } else { + this.remove(a); + this._dockersByPath[b.key] = b.value.without(a); + this.isChanged = true; + this._dockerChanged(); + return true + } + } + return false + }).bind(this)) + } + }, removeUnusedDockers: function () { + var a = $H({}); + this.dockers.each(function (e, b) { + if (b == 0 || b == this.dockers.length - 1) { + return + } + var d = this.dockers[b - 1]; + if (a.values().indexOf(d) != -1 && this.dockers[b - 2]) { + d = this.dockers[b - 2] + } + var c = this.dockers[b + 1]; + var f = d.getDockedShape() && d.referencePoint ? d.getAbsoluteReferencePoint() : d.bounds.center(); + var h = c.getDockedShape() && c.referencePoint ? c.getAbsoluteReferencePoint() : c.bounds.center(); + var g = e.bounds.center(); + if (ORYX.Core.Math.isPointInLine(g.x, g.y, f.x, f.y, h.x, h.y, 1)) { + a[b] = e + } + }.bind(this)); + a.each(function (b) { + this.removeDocker(b.value) + }.bind(this)); + if (a.values().length > 0) { + this._update(true) + } + return a + }, _init: function (f) { + arguments.callee.$._init.apply(this, arguments); + var e, c, s, q; + var k = f.getElementsByTagNameNS(NAMESPACE_SVG, "defs"); + if (k.length > 0) { + k = k[0]; + var d = $A(k.getElementsByTagNameNS(NAMESPACE_SVG, "marker")); + var l; + var o = this; + d.each(function (t) { + try { + l = new ORYX.Core.SVG.SVGMarker(t.cloneNode(true)); + o._markers[l.id] = l; + var u = $A(l.element.getElementsByTagNameNS(NAMESPACE_SVG, "text")); + var g; + u.each(function (w) { + g = new ORYX.Core.SVG.Label({textElement: w, shapeId: this.id}); + o._labels[g.id] = g + }) + } catch (v) { + } + }) + } + var b = f.getElementsByTagNameNS(NAMESPACE_SVG, "g"); + if (b.length <= 0) { + throw"Edge: No g element found." + } + var m = b[0]; + m.setAttributeNS(null, "id", null); + var h = true; + $A(m.childNodes).each((function (G, A) { + if (ORYX.Editor.checkClassType(G, SVGPathElement)) { + G = G.cloneNode(false); + var z = this.id + "_" + A; + G.setAttributeNS(null, "id", z); + this._paths.push(G); + var C = []; + var H = G.getAttributeNS(null, "marker-start"); + if (H && H !== "") { + H = H.strip(); + H = H.replace(/^url\(#/, ""); + var w = this.getValidMarkerId(H); + G.setAttributeNS(null, "marker-start", "url(#" + w + ")"); + C.push(this._markers[w]) + } + H = G.getAttributeNS(null, "marker-mid"); + if (H && H !== "") { + H = H.strip(); + H = H.replace(/^url\(#/, ""); + var t = this.getValidMarkerId(H); + G.setAttributeNS(null, "marker-mid", "url(#" + t + ")"); + C.push(this._markers[t]) + } + H = G.getAttributeNS(null, "marker-end"); + if (H && H !== "") { + H = H.strip(); + var B = this.getValidMarkerId(H); + G.setAttributeNS(null, "marker-end", "url(#" + B + ")"); + C.push(this._markers[B]) + } + this._markersByPath[z] = C; + var g = new PathParser(); + var F = new ORYX.Core.SVG.PointsPathHandler(); + g.setHandler(F); + g.parsePath(G); + if (F.points.length < 4) { + throw"Edge: Path has to have two or more points specified." + } + this._dockersByPath[z] = []; + for (var v = 0; v < F.points.length; v += 2) { + var E = F.points[v]; + var D = F.points[v + 1]; + if (h || v > 0) { + var u = new ORYX.Core.Controls.Docker({eventHandlerCallback: this.eventHandlerCallback}); + u.bounds.centerMoveTo(E, D); + u.bounds.registerCallback(this._dockerChangedCallback); + this.add(u, this.dockers.length); + if (e) { + e = Math.min(E, e); + c = Math.min(D, c) + } else { + e = E; + c = D + } + if (s) { + s = Math.max(E, s); + q = Math.max(D, q) + } else { + s = E; + q = D + } + } + } + h = false + } + }).bind(this)); + this.bounds.set(e, c, s, q); + if (false && (this.bounds.width() === 0 || this.bounds.height() === 0)) { + var a = this.bounds.width(); + var p = this.bounds.height(); + this.bounds.extend({x: a === 0 ? 2 : 0, y: p === 0 ? 2 : 0}); + this.bounds.moveBy({x: a === 0 ? -1 : 0, y: p === 0 ? -1 : 0}) + } + this._oldBounds = this.bounds.clone(); + this._paths.reverse(); + var r = []; + this._paths.each((function (g) { + r.push(this.node.childNodes[0].childNodes[0].childNodes[0].appendChild(g)) + }).bind(this)); + this._paths = r; + this._paths.each((function (t) { + var g = t.cloneNode(false); + g.setAttributeNS(null, "id", undefined); + g.setAttributeNS(null, "stroke-width", 10); + g.setAttributeNS(null, "visibility", "hidden"); + g.setAttributeNS(null, "stroke-dasharray", null); + g.setAttributeNS(null, "stroke", "black"); + g.setAttributeNS(null, "fill", "none"); + g.setAttributeNS(null, "title", this.getStencil().title()); + this._interactionPaths.push(this.node.childNodes[0].childNodes[0].childNodes[0].appendChild(g)) + }).bind(this)); + this._paths.reverse(); + this._interactionPaths.reverse(); + var n = f.getElementsByTagNameNS(ORYX.CONFIG.NAMESPACE_SVG, "text"); + $A(n).each((function (t) { + var g = new ORYX.Core.SVG.Label({textElement: t, shapeId: this.id}); + this.node.childNodes[0].childNodes[0].appendChild(g.node); + this._labels[g.id] = g; + g.registerOnChange(this.layout.bind(this)) + }).bind(this)); + this.propertiesChanged.each(function (g) { + g.value = true + }) + }, getValidMarkerId: function (b) { + if (b.indexOf('url("#') >= 0) { + var a = b.replace(/^url\(\"#/, "").replace(/\"\)$/, ""); + return this.id + a + } else { + b = b.replace(/^url\(#/, ""); + return this.id.concat(b.replace(/\)$/, "")) + } + }, addMarkers: function (a) { + this._markers.each(function (b) { + if (!a.ownerDocument.getElementById(b.value.id)) { + b.value.element = a.appendChild(b.value.element) + } + }) + }, removeMarkers: function () { + var b = this.node.ownerSVGElement; + if (b) { + var a = b.getElementsByTagNameNS(NAMESPACE_SVG, "defs"); + if (a.length > 0) { + a = a[0]; + this._markers.each(function (c) { + var d = a.ownerDocument.getElementById(c.value.id); + if (d) { + c.value.element = a.removeChild(c.value.element) + } + }) + } + } + }, _dockerChanged: function () { + this._dockerUpdated = true + }, serialize: function () { + var a = arguments.callee.$.serialize.apply(this); + var d = ""; + this._dockersByPath.each((function (e) { + e.value.each(function (k) { + var h = k.getDockedShape() && k.referencePoint ? k.referencePoint : k.bounds.center(); + d = d.concat(h.x + " " + h.y + " ") + }); + d += " # " + }).bind(this)); + a.push({name: "dockers", prefix: "oryx", value: d, type: "literal"}); + var b = this.dockers.last(); + var g = b.getDockedShape(); + if (g) { + a.push({name: "target", prefix: "raziel", value: "#" + ERDF.__stripHashes(g.resourceId), type: "resource"}) + } + try { + var c = this.getStencil().serialize(); + if (c.type) { + c.shape = this; + c.data = a; + c.result = undefined; + c.forceExecution = true; + this._delegateEvent(c); + if (c.result) { + a = c.result + } + } + } catch (f) {var abcdef=1 + } + return a + }, deserialize: function (f) { + try { + var c = this.getStencil().deserialize(); + if (c.type) { + c.shape = this; + c.data = f; + c.result = undefined; + c.forceExecution = true; + this._delegateEvent(c); + if (c.result) { + f = c.result + } + } + } catch (h) {var abcdef=1 + } + var g = f.find(function (e) { + return (e.prefix + "-" + e.name) == "raziel-target" + }); + var a; + if (g) { + a = this.getCanvas().getChildShapeByResourceId(g.value) + } + var d = f.findAll(function (e) { + return (e.prefix + "-" + e.name) == "raziel-outgoing" + }); + d.each((function (l) { + if (!this.parent) { + return + } + var e = this.getCanvas().getChildShapeByResourceId(l.value); + if (e) { + if (e == a) { + this.dockers.last().setDockedShape(e); + this.dockers.last().setReferencePoint({x: e.bounds.width() / 2, y: e.bounds.height() / 2}) + } else { + if (e instanceof ORYX.Core.Edge) { + e.dockers.first().setDockedShape(this) + } + } + } + }).bind(this)); + var b = f.find(function (e) { + return (e.prefix === "oryx" && e.name === "dockers") + }); + if (b) { + var k = b.value.split("#").without("").without(" "); + k.each((function (l, o) { + var r = l.replace(/,/g, " ").split(" ").without(""); + if (r.length % 2 === 0) { + var s = this._paths[o]; + if (s) { + if (o === 0) { + while (this._dockersByPath[s.id].length > 2) { + this.removeDocker(this._dockersByPath[s.id][1]) + } + } else { + while (this._dockersByPath[s.id].length > 1) { + this.removeDocker(this._dockersByPath[s.id][0]) + } + } + var e = this._dockersByPath[s.id]; + if (o === 0) { + var q = parseFloat(r.shift()); + var p = parseFloat(r.shift()); + if (e.first().getDockedShape()) { + e.first().setReferencePoint({x: q, y: p}) + } else { + e.first().bounds.centerMoveTo(q, p) + } + } + p = parseFloat(r.pop()); + q = parseFloat(r.pop()); + if (e.last().getDockedShape()) { + e.last().setReferencePoint({x: q, y: p}) + } else { + e.last().bounds.centerMoveTo(q, p) + } + for (var m = 0; m < r.length; m++) { + q = parseFloat(r[m]); + p = parseFloat(r[++m]); + var n = this.createDocker(); + n.bounds.centerMoveTo(q, p) + } + } + } + }).bind(this)) + } else { + this.alignDockers() + } + arguments.callee.$.deserialize.apply(this, arguments); + this._changed() + }, toString: function () { + return this.getStencil().title() + " " + this.id + }, getTarget: function () { + return this.dockers.last() ? this.dockers.last().getDockedShape() : null + }, getSource: function () { + return this.dockers.first() ? this.dockers.first().getDockedShape() : null + }, isDocked: function () { + var a = false; + this.dockers.each(function (b) { + if (b.isDocked()) { + a = true; + throw $break + } + }); + return a + }, toJSON: function () { + var a = arguments.callee.$.toJSON.apply(this, arguments); + if (this.getTarget()) { + a.target = {resourceId: this.getTarget().resourceId} + } + return a + } +}; +ORYX.Core.Edge = ORYX.Core.Shape.extend(ORYX.Core.Edge); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Plugins) { + ORYX.Plugins = {} +} +ORYX.Plugins.AbstractPlugin = Clazz.extend({ + facade: null, construct: function (a) { + this.facade = a; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADED, this.onLoaded.bind(this)) + }, onLoaded: function () { + }, onSelectionChanged: function () { + }, showOverlay: function (a, b, d, c) { + if (!(a instanceof Array)) { + a = [a] + } + a = a.map(function (e) { + var f = e; + if (typeof e == "string") { + f = this.facade.getCanvas().getChildShapeByResourceId(e); + f = f || this.facade.getCanvas().getChildById(e, true) + } + return f + }.bind(this)).compact(); + if (!this.overlayID) { + this.overlayID = this.type + ORYX.Editor.provideId() + } + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_OVERLAY_SHOW, + id: this.overlayID, + shapes: a, + attributes: b, + node: d, + nodePosition: c || "NW" + }) + }, hideOverlay: function () { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_OVERLAY_HIDE, id: this.overlayID}) + }, doTransform: function (d, a) { + if (!a || !d) { + return "" + } + var c = new DOMParser(); + var k = c.parseFromString(d, "text/xml"); + source = a; + new Ajax.Request(source, { + asynchronous: false, method: "get", onSuccess: function (m) { + xsl = m.responseText + }.bind(this), onFailure: (function (m) { + ORYX.Log.error("XSL load failed" + m) + }).bind(this) + }); + var f = new XSLTProcessor(); + var h = new DOMParser(); + var e = h.parseFromString(xsl, "text/xml"); + f.importStylesheet(e); + try { + var l = f.transformToFragment(k, document); + var b = (new XMLSerializer()).serializeToString(l); + b = !b.startsWith("<?xml") ? '<?xml version="1.0" encoding="UTF-8"?>' + b : b; + return b + } catch (g) { + return -1 + } + }, openXMLWindow: function (a) { + var b = window.open("data:application/xml," + encodeURIComponent(a), "_blank", "resizable=yes,width=600,height=600,toolbar=0,scrollbars=yes") + }, openDownloadWindow: function (b, c) { + var d = window.open(""); + if (d != null) { + d.document.open(); + d.document.write("<html><body>"); + var a = d.document.createElement("form"); + d.document.body.appendChild(a); + var e = function (f, g) { + var h = document.createElement("input"); + h.name = f; + h.type = "hidden"; + h.value = g; + return h + }; + a.appendChild(e("download", c)); + a.appendChild(e("file", b)); + a.method = "POST"; + d.document.write("</body></html>"); + d.document.close(); + a.action = ORYX.PATH + "/download"; + a.submit() + } + }, getSerializedDOM: function () { + var a = DataManager.serializeDOM(this.facade); + a = '<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:b3mn="http://b3mn.org/2007/b3mn" xmlns:ext="http://b3mn.org/2007/ext" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://b3mn.org/2007/atom+xhtml"><head profile="http://purl.org/NET/erdf/profile"><link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /><link rel="schema.dcTerms" href="http://purl.org/dc/terms/ " /><link rel="schema.b3mn" href="http://b3mn.org" /><link rel="schema.oryx" href="http://oryx-editor.org/" /><link rel="schema.raziel" href="http://raziel.org/" /><base href="' + location.href.split("?")[0] + '" /></head><body>' + a + "</body></html>"; + return a + }, enableReadOnlyMode: function () { + this.facade.disableEvent(ORYX.CONFIG.EVENT_MOUSEDOWN); + this._stopSelectionChange = function () { + if (this.facade.getSelection().length > 0) { + this.facade.setSelection([]) + } + }; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, this._stopSelectionChange.bind(this)) + }, disableReadOnlyMode: function () { + this.facade.enableEvent(ORYX.CONFIG.EVENT_MOUSEDOWN); + if (this._stopSelectionChange) { + this.facade.unregisterOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, this._stopSelectionChange.bind(this)); + this._stopSelectionChange = undefined + } + }, getRDFFromDOM: function () { + try { + var c = ""; + source = ORYX.PATH + "lib/extract-rdf.xsl"; + new Ajax.Request(source, { + asynchronous: false, method: "get", onSuccess: function (e) { + c = e.responseText + }.bind(this), onFailure: (function (e) { + ORYX.Log.error("XSL load failed" + e) + }).bind(this) + }); + var k = new DOMParser(); + var h = k.parseFromString(this.getSerializedDOM(), "text/xml"); + var f = k.parseFromString(c, "text/xml"); + var b = new XSLTProcessor(); + b.importStylesheet(f); + var a = b.transformToFragment(h, document); + var d = new XMLSerializer(); + return d.serializeToString(a) + } catch (g) { + console.log("error serializing " + g); + return "" + } + }, isStencilSetExtensionLoaded: function (a) { + return this.facade.getStencilSets().values().any(function (b) { + return b.extensions().keys().any(function (c) { + return c == a + }.bind(this)) + }.bind(this)) + }, doLayout: function (a) { + if (this.facade.raiseEvent) { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_LAYOUT, shapes: a}) + } else { + this.facade.handleEvents({type: ORYX.CONFIG.EVENT_LAYOUT, shapes: a}) + } + }, layoutEdges: function (b, a, d) { + if (!this.facade.isExecutingCommands()) { + return + } + var c = ORYX.Core.Command.extend({ + construct: function (f, h, k, g) { + this.edges = f; + this.node = h; + this.plugin = g; + this.offset = k; + var e = h.absoluteXY(); + this.ulo = {x: e.x - k.x, y: e.y - k.y} + }, execute: function () { + if (this.changes) { + this.executeAgain(); + return + } else { + this.changes = []; + this.edges.each(function (e) { + this.changes.push({ + edge: e, oldDockerPositions: e.dockers.map(function (f) { + return f.bounds.center() + }) + }) + }.bind(this)) + } + this.edges.findAll(function (e) { + return e.dockers.length > 2 + }.bind(this)).each(function (g) { + if (g.dockers.first().getDockedShape() === this.node) { + var f = g.dockers[1]; + if (this.align(f.bounds, g.dockers.first())) { + f.update() + } + } else { + if (g.dockers.last().getDockedShape() === this.node) { + var e = g.dockers[g.dockers.length - 2]; + if (this.align(e.bounds, g.dockers.last())) { + e.update() + } + } + } + g._update(true); + g.removeUnusedDockers(); + if (this.isBendPointIncluded(g)) { + this.plugin.doLayout(g); + return + } + }.bind(this)); + this.edges.each(function (e) { + if (e.dockers.length == 2) { + var g = e.dockers.first().getAbsoluteReferencePoint() || e.dockers.first().bounds.center(); + var f = e.dockers.last().getAbsoluteReferencePoint() || e.dockers.first().bounds.center(); + if (Math.abs(-Math.abs(g.x - f.x) + Math.abs(this.offset.x)) < 2 || Math.abs(-Math.abs(g.y - f.y) + Math.abs(this.offset.y)) < 2) { + this.plugin.doLayout(e) + } + } + }.bind(this)); + this.edges.each(function (f, e) { + this.changes[e].dockerPositions = f.dockers.map(function (g) { + return g.bounds.center() + }) + }.bind(this)) + }, align: function (k, f) { + var h = f.getAbsoluteReferencePoint() || f.bounds.center(); + var l = k.center().x - h.x; + var g = k.center().y - h.y; + if (Math.abs(-Math.abs(l) + Math.abs(this.offset.x)) < 3 && this.offset.xs === undefined) { + k.moveBy({x: -l, y: 0}) + } + if (Math.abs(-Math.abs(g) + Math.abs(this.offset.y)) < 3 && this.offset.ys === undefined) { + k.moveBy({y: -g, x: 0}) + } + if (this.offset.xs !== undefined || this.offset.ys !== undefined) { + var e = f.getDockedShape().absoluteXY(); + l = k.center().x - (e.x + ((h.x - e.x) / this.offset.xs)); + g = k.center().y - (e.y + ((h.y - e.y) / this.offset.ys)); + if (Math.abs(-Math.abs(l) + Math.abs(this.offset.x)) < 3) { + k.moveBy({x: -(k.center().x - h.x), y: 0}) + } + if (Math.abs(-Math.abs(g) + Math.abs(this.offset.y)) < 3) { + k.moveBy({y: -(k.center().y - h.y), x: 0}) + } + } + }, isBendPointIncluded: function (e) { + var f = e.dockers.first().getDockedShape(); + var g = e.dockers.last().getDockedShape(); + if (f) { + f = f.absoluteBounds(); + f.widen(5) + } + if (g) { + g = g.absoluteBounds(); + g.widen(20) + } + return e.dockers.any(function (k, h) { + var l = k.bounds.center(); + return h != 0 && h != e.dockers.length - 1 && ((f && f.isIncluded(l)) || (g && g.isIncluded(l))) + }) + }, removeAllDocker: function (e) { + e.dockers.slice(1, e.dockers.length - 1).each(function (f) { + e.removeDocker(f) + }) + }, executeAgain: function () { + this.changes.each(function (e) { + this.removeAllDocker(e.edge); + e.dockerPositions.each(function (h, f) { + if (f == 0 || f == e.dockerPositions.length - 1) { + return + } + var g = e.edge.createDocker(undefined, h); + g.bounds.centerMoveTo(h); + g.update() + }.bind(this)); + e.edge._update(true) + }.bind(this)) + }, rollback: function () { + this.changes.each(function (e) { + this.removeAllDocker(e.edge); + e.oldDockerPositions.each(function (h, f) { + if (f == 0 || f == e.oldDockerPositions.length - 1) { + return + } + var g = e.edge.createDocker(undefined, h); + g.bounds.centerMoveTo(h); + g.update() + }.bind(this)); + e.edge._update(true) + }.bind(this)) + } + }); + this.facade.executeCommands([new c(a, b, d, this)]) + } +}); +if (!ORYX) { + var ORYX = {} +} +if (!ORYX.Plugins) { + ORYX.Plugins = {} +} +ORYX.Plugins.AbstractLayouter = ORYX.Plugins.AbstractPlugin.extend({ + layouted: [], construct: function (a) { + arguments.callee.$.construct.apply(this, arguments); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LAYOUT, this._initLayout.bind(this)) + }, isIncludedInLayout: function (a) { + if (!(this.layouted instanceof Array)) { + this.layouted = [this.layouted].compact() + } + if (this.layouted.length <= 0) { + return true + } + return this.layouted.any(function (b) { + if (typeof b == "string") { + return a.getStencil().id().include(b) + } else { + return a instanceof b + } + }) + }, _initLayout: function (c) { + var b = [c.shapes].flatten().compact(); + var a = b.findAll(function (d) { + return this.isIncludedInLayout(d) + }.bind(this)); + if (a.length > 0) { + this.layout(a) + } + }, layout: function (a) { + throw new Error("Layouter has to implement the layout function.") + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.Edit = Clazz.extend({ + construct: function (a) { + this.facade = a; + this.clipboard = new ORYX.Plugins.Edit.ClipBoard(); + this.facade.offer({ + name: ORYX.I18N.Edit.cut, + description: ORYX.I18N.Edit.cutDesc, + icon: ORYX.PATH + "images/cut.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 88, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], + functionality: this.callEdit.bind(this, this.editCut), + group: ORYX.I18N.Edit.group, + index: 1, + minShape: 1 + }); + this.facade.offer({ + name: ORYX.I18N.Edit.copy, + description: ORYX.I18N.Edit.copyDesc, + icon: ORYX.PATH + "images/page_copy.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 67, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], + functionality: this.callEdit.bind(this, this.editCopy, [true, false]), + group: ORYX.I18N.Edit.group, + index: 2, + minShape: 1 + }); + this.facade.offer({ + name: ORYX.I18N.Edit.paste, + description: ORYX.I18N.Edit.pasteDesc, + icon: ORYX.PATH + "images/page_paste.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 86, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], + functionality: this.callEdit.bind(this, this.editPaste), + isEnabled: this.clipboard.isOccupied.bind(this.clipboard), + group: ORYX.I18N.Edit.group, + index: 3, + minShape: 0, + maxShape: 0 + }); + this.facade.offer({ + name: ORYX.I18N.Edit.del, + description: ORYX.I18N.Edit.delDesc, + icon: ORYX.PATH + "images/cross.png", + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 8, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }, {keyCode: 46, keyAction: ORYX.CONFIG.KEY_ACTION_DOWN}], + functionality: this.callEdit.bind(this, this.editDelete), + group: ORYX.I18N.Edit.group, + index: 4, + minShape: 1 + }) + }, callEdit: function (b, a) { + window.setTimeout(function () { + b.apply(this, (a instanceof Array ? a : [])) + }.bind(this), 1) + }, handleMouseDown: function (a) { + if (this._controlPressed) { + this._controlPressed = false; + this.editCopy(); + this.editPaste(); + a.forceExecution = true; + this.facade.raiseEvent(a, this.clipboard.shapesAsJson) + } + }, getAllShapesToConsider: function (b) { + var a = []; + var c = []; + b.each(function (e) { + isChildShapeOfAnother = b.any(function (g) { + return g.hasChildShape(e) + }); + if (isChildShapeOfAnother) { + return + } + a.push(e); + if (e instanceof ORYX.Core.Node) { + var f = e.getOutgoingNodes(); + f = f.findAll(function (g) { + return !b.include(g) + }); + a = a.concat(f) + } + c = c.concat(e.getChildShapes(true)) + }.bind(this)); + var d = this.facade.getCanvas().getChildEdges().select(function (e) { + if (a.include(e)) { + return false + } + if (e.getAllDockedShapes().size() === 0) { + return false + } + return e.getAllDockedShapes().all(function (f) { + return f instanceof ORYX.Core.Edge || c.include(f) + }) + }); + a = a.concat(d); + return a + }, editCut: function () { + this.editCopy(false, true); + this.editDelete(true); + return false + }, editCopy: function (c, a) { + var b = this.facade.getSelection(); + if (b.length == 0) { + return + } + this.clipboard.refresh(b, this.getAllShapesToConsider(b), this.facade.getCanvas().getStencil().stencilSet().namespace(), a); + if (c) { + this.facade.updateSelection() + } + }, editPaste: function () { + var b = {childShapes: this.clipboard.shapesAsJson, stencilset: {namespace: this.clipboard.SSnamespace}}; + jQuery.extend(b, ORYX.Core.AbstractShape.JSONHelper); + var a = b.getChildShapes(true).pluck("resourceId"); + var c = {}; + b.eachChild(function (d, e) { + d.outgoing = d.outgoing.select(function (f) { + return a.include(f.resourceId) + }); + d.outgoing.each(function (f) { + if (!c[f.resourceId]) { + c[f.resourceId] = [] + } + c[f.resourceId].push(d) + }); + return d + }.bind(this), true, true); + b.eachChild(function (d, e) { + if (d.target && !(a.include(d.target.resourceId))) { + d.target = undefined; + d.targetRemoved = true + } + if (d.dockers && d.dockers.length >= 1 && d.dockers[0].getDocker && ((d.dockers[0].getDocker().getDockedShape() && !a.include(d.dockers[0].getDocker().getDockedShape().resourceId)) || !d.getShape().dockers[0].getDockedShape() && !c[d.resourceId])) { + d.sourceRemoved = true + } + return d + }.bind(this), true, true); + b.eachChild(function (d, e) { + if (this.clipboard.useOffset) { + d.bounds = { + lowerRight: { + x: d.bounds.lowerRight.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: d.bounds.lowerRight.y + ORYX.CONFIG.COPY_MOVE_OFFSET + }, + upperLeft: { + x: d.bounds.upperLeft.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: d.bounds.upperLeft.y + ORYX.CONFIG.COPY_MOVE_OFFSET + } + } + } + if (d.dockers) { + d.dockers = d.dockers.map(function (g, f) { + if ((d.targetRemoved === true && f == d.dockers.length - 1 && g.getDocker) || (d.sourceRemoved === true && f == 0 && g.getDocker)) { + g = g.getDocker().bounds.center() + } + if ((f == 0 && g.getDocker instanceof Function && d.sourceRemoved !== true && (g.getDocker().getDockedShape() || ((c[d.resourceId] || []).length > 0 && (!(d.getShape() instanceof ORYX.Core.Node) || c[d.resourceId][0].getShape() instanceof ORYX.Core.Node)))) || (f == d.dockers.length - 1 && g.getDocker instanceof Function && d.targetRemoved !== true && (g.getDocker().getDockedShape() || d.target))) { + return {x: g.x, y: g.y, getDocker: g.getDocker} + } else { + if (this.clipboard.useOffset) { + return { + x: g.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: g.y + ORYX.CONFIG.COPY_MOVE_OFFSET, + getDocker: g.getDocker + } + } else { + return {x: g.x, y: g.y, getDocker: g.getDocker} + } + } + }.bind(this)) + } else { + if (d.getShape() instanceof ORYX.Core.Node && d.dockers && d.dockers.length > 0 && (!d.dockers.first().getDocker || d.sourceRemoved === true || !(d.dockers.first().getDocker().getDockedShape() || c[d.resourceId]))) { + d.dockers = d.dockers.map(function (g, f) { + if ((d.sourceRemoved === true && f == 0 && g.getDocker)) { + g = g.getDocker().bounds.center() + } + if (this.clipboard.useOffset) { + return { + x: g.x + ORYX.CONFIG.COPY_MOVE_OFFSET, + y: g.y + ORYX.CONFIG.COPY_MOVE_OFFSET, + getDocker: g.getDocker + } + } else { + return {x: g.x, y: g.y, getDocker: g.getDocker} + } + }.bind(this)) + } + } + return d + }.bind(this), false, true); + this.clipboard.useOffset = true; + this.facade.importJSON(b) + }, editDelete: function () { + var a = this.facade.getSelection(); + var b = new ORYX.Plugins.Edit.ClipBoard(); + b.refresh(a, this.getAllShapesToConsider(a)); + var c = new ORYX.Plugins.Edit.DeleteCommand(b, this.facade); + this.facade.executeCommands([c]) + } +}); +ORYX.Plugins.Edit.ClipBoard = Clazz.extend({ + construct: function () { + this.shapesAsJson = []; + this.selection = []; + this.SSnamespace = ""; + this.useOffset = true + }, isOccupied: function () { + return this.shapesAsJson.length > 0 + }, refresh: function (d, b, c, a) { + this.selection = d; + this.SSnamespace = c; + this.outgoings = {}; + this.parents = {}; + this.targets = {}; + this.useOffset = a !== true; + this.shapesAsJson = b.map(function (e) { + var f = e.toJSON(); + f.parent = {resourceId: e.getParentShape().resourceId}; + f.parentIndex = e.getParentShape().getChildShapes().indexOf(e); + return f + }) + } +}); +ORYX.Plugins.Edit.DeleteCommand = ORYX.Core.Command.extend({ + construct: function (b, a) { + this.clipboard = b; + this.shapesAsJson = b.shapesAsJson; + this.facade = a; + this.dockers = this.shapesAsJson.map(function (g) { + var e = g.getShape(); + var f = e.getIncomingShapes().map(function (h) { + return h.getDockers().last() + }); + var d = e.getOutgoingShapes().map(function (h) { + return h.getDockers().first() + }); + var c = e.getDockers().concat(f, d).compact().map(function (h) { + return {object: h, referencePoint: h.referencePoint, dockedShape: h.getDockedShape()} + }); + return c + }).flatten() + }, execute: function () { + this.shapesAsJson.each(function (a) { + this.facade.deleteShape(a.getShape()) + }.bind(this)); + this.facade.setSelection([]); + this.facade.getCanvas().update(); + this.facade.updateSelection() + }, rollback: function () { + this.shapesAsJson.each(function (c) { + var a = c.getShape(); + var b = this.facade.getCanvas().getChildShapeByResourceId(c.parent.resourceId) || this.facade.getCanvas(); + b.add(a, a.parentIndex) + }.bind(this)); + this.dockers.each(function (a) { + a.object.setDockedShape(a.dockedShape); + a.object.setReferencePoint(a.referencePoint) + }.bind(this)); + this.facade.setSelection(this.selectedShapes); + this.facade.getCanvas().update(); + this.facade.updateSelection() + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.View = { + facade: undefined, construct: function (b, a) { + this.facade = b; + this.zoomLevel = 1; + this.maxFitToScreenLevel = 1.5; + this.minZoomLevel = 0.1; + this.maxZoomLevel = 2.5; + this.diff = 5; + if (a !== undefined && a !== null) { + a.properties.each(function (c) { + if (c.zoomLevel) { + this.zoomLevel = Number(1) + } + if (c.maxFitToScreenLevel) { + this.maxFitToScreenLevel = Number(c.maxFitToScreenLevel) + } + if (c.minZoomLevel) { + this.minZoomLevel = Number(c.minZoomLevel) + } + if (c.maxZoomLevel) { + this.maxZoomLevel = Number(c.maxZoomLevel) + } + }.bind(this)) + } + this.facade.offer({ + name: ORYX.I18N.View.zoomIn, + functionality: this.zoom.bind(this, [1 + ORYX.CONFIG.ZOOM_OFFSET]), + group: ORYX.I18N.View.group, + icon: ORYX.PATH + "images/magnifier_zoom_in.png", + description: ORYX.I18N.View.zoomInDesc, + index: 1, + minShape: 0, + maxShape: 0, + isEnabled: function () { + return this.zoomLevel < this.maxZoomLevel + }.bind(this) + }); + this.facade.offer({ + name: ORYX.I18N.View.zoomOut, + functionality: this.zoom.bind(this, [1 - ORYX.CONFIG.ZOOM_OFFSET]), + group: ORYX.I18N.View.group, + icon: ORYX.PATH + "images/magnifier_zoom_out.png", + description: ORYX.I18N.View.zoomOutDesc, + index: 2, + minShape: 0, + maxShape: 0, + isEnabled: function () { + return this._checkSize() + }.bind(this) + }); + this.facade.offer({ + name: ORYX.I18N.View.zoomStandard, + functionality: this.setAFixZoomLevel.bind(this, 1), + group: ORYX.I18N.View.group, + icon: ORYX.PATH + "images/zoom_standard.png", + cls: "icon-large", + description: ORYX.I18N.View.zoomStandardDesc, + index: 3, + minShape: 0, + maxShape: 0, + isEnabled: function () { + return this.zoomLevel != 1 + }.bind(this) + }); + this.facade.offer({ + name: ORYX.I18N.View.zoomFitToModel, + functionality: this.zoomFitToModel.bind(this), + group: ORYX.I18N.View.group, + icon: ORYX.PATH + "images/image.png", + description: ORYX.I18N.View.zoomFitToModelDesc, + index: 4, + minShape: 0, + maxShape: 0 + }) + }, setAFixZoomLevel: function (a) { + this.zoomLevel = a; + this._checkZoomLevelRange(); + this.zoom(1) + }, zoom: function (d) { + this.zoomLevel *= d; + var h = this.facade.getCanvas().getHTMLContainer().parentNode.parentNode; + var c = this.facade.getCanvas(); + var g = c.bounds.width() * this.zoomLevel; + var a = c.bounds.height() * this.zoomLevel; + var f = (c.node.parentNode.parentNode.parentNode.offsetHeight - a) / 2; + f = f > 20 ? f - 20 : 0; + c.node.parentNode.parentNode.style.marginTop = f + "px"; + f += 5; + c.getHTMLContainer().style.top = f + "px"; + var b = h.scrollTop - Math.round((c.getHTMLContainer().parentNode.getHeight() - a) / 2) + this.diff; + var e = h.scrollLeft - Math.round((c.getHTMLContainer().parentNode.getWidth() - g) / 2) + this.diff; + c.setSize({width: g, height: a}, true); + c.node.setAttributeNS(null, "transform", "scale(" + this.zoomLevel + ")"); + this.facade.updateSelection(); + h.scrollTop = b; + h.scrollLeft = e; + c.zoomLevel = this.zoomLevel + }, zoomFitToModel: function () { + var h = this.facade.getCanvas().getHTMLContainer().parentNode.parentNode; + var b = h.getHeight() - 30; + var d = h.getWidth() - 30; + var c = this.facade.getCanvas().getChildShapes(); + if (!c || c.length < 1) { + return false + } + var g = c[0].absoluteBounds().clone(); + c.each(function (k) { + g.include(k.absoluteBounds().clone()) + }); + var f = d / g.width(); + var a = b / g.height(); + var e = a < f ? a : f; + if (e > this.maxFitToScreenLevel) { + e = this.maxFitToScreenLevel + } + this.setAFixZoomLevel(e); + h.scrollTop = Math.round(g.upperLeft().y * this.zoomLevel) - 5; + h.scrollLeft = Math.round(g.upperLeft().x * this.zoomLevel) - 5 + }, _checkSize: function () { + var a = this.facade.getCanvas().getHTMLContainer().parentNode; + var b = Math.min((a.parentNode.getWidth() / a.getWidth()), (a.parentNode.getHeight() / a.getHeight())); + return 1.05 > b + }, _checkZoomLevelRange: function () { + if (this.zoomLevel < this.minZoomLevel) { + this.zoomLevel = this.minZoomLevel + } + if (this.zoomLevel > this.maxZoomLevel) { + this.zoomLevel = this.maxZoomLevel + } + } +}; +ORYX.Plugins.View = Clazz.extend(ORYX.Plugins.View); +if (!Signavio) { + var Signavio = {} +} +if (!Signavio.Core) { + Signavio.Core = {} +} +Signavio.Core.Version = "1.0"; +if (!Signavio) { + var Signavio = new Object() +} +if (!Signavio.Plugins) { + Signavio.Plugins = new Object() +} +if (!Signavio.Plugins.Utils) { + Signavio.Plugins.Utils = new Object() +} +if (!Signavio.Helper) { + Signavio.Helper = new Object() +} +new function () { + ORYX.Editor.provideId = function () { + var b = [], c = "0123456789ABCDEF"; + for (var a = 0; a < 36; a++) { + b[a] = Math.floor(Math.random() * 16) + } + b[14] = 4; + b[19] = (b[19] & 3) | 8; + for (var a = 0; a < 36; a++) { + b[a] = c[b[a]] + } + b[8] = b[13] = b[18] = b[23] = "-"; + return "sid-" + b.join("") + } +}(); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.Loading = { + construct: function (a) { + this.facade = a; + this.node = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", this.facade.getCanvas().getHTMLContainer().parentNode, ["div", {"class": "LoadingIndicator"}, ""]); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADING_ENABLE, this.enableLoading.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADING_DISABLE, this.disableLoading.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADING_STATUS, this.showStatus.bind(this)); + this.disableLoading() + }, enableLoading: function (a) { + if (a.text) { + this.node.innerHTML = a.text + "..." + } else { + this.node.innerHTML = ORYX.I18N.Loading.waiting + } + this.node.removeClassName("StatusIndicator"); + this.node.addClassName("LoadingIndicator"); + this.node.style.display = "block"; + var b = this.facade.getCanvas().rootNode.parentNode.parentNode.parentNode.parentNode; + this.node.style.top = b.offsetTop + "px"; + this.node.style.left = b.offsetLeft + "px" + }, disableLoading: function () { + this.node.style.display = "none" + }, showStatus: function (a) { + if (a.text) { + this.node.innerHTML = a.text; + this.node.addClassName("StatusIndicator"); + this.node.removeClassName("LoadingIndicator"); + this.node.style.display = "block"; + var c = this.facade.getCanvas().rootNode.parentNode.parentNode.parentNode.parentNode; + this.node.style.top = c.offsetTop + "px"; + this.node.style.left = c.offsetLeft + "px"; + var b = a.timeout ? a.timeout : 2000; + window.setTimeout((function () { + this.disableLoading() + }).bind(this), b) + } + } +}; +ORYX.Plugins.Loading = Clazz.extend(ORYX.Plugins.Loading); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.CanvasResize = Clazz.extend({ + construct: function (a) { + this.facade = a; + new ORYX.Plugins.CanvasResizeButton(this.facade.getCanvas(), "N", this.resize.bind(this)); + new ORYX.Plugins.CanvasResizeButton(this.facade.getCanvas(), "W", this.resize.bind(this)); + new ORYX.Plugins.CanvasResizeButton(this.facade.getCanvas(), "E", this.resize.bind(this)); + new ORYX.Plugins.CanvasResizeButton(this.facade.getCanvas(), "S", this.resize.bind(this)); + window.setTimeout(function () { + jQuery(window).trigger("resize") + }) + }, resize: function (a, c) { + resizeCanvas = function (l, m, o) { + var f = o.getCanvas(); + var n = f.bounds; + var h = o.getCanvas().getHTMLContainer().parentNode.parentNode; + if (l == "E" || l == "W") { + f.setSize({width: (n.width() + m) * f.zoomLevel, height: (n.height()) * f.zoomLevel}) + } else { + if (l == "S" || l == "N") { + f.setSize({width: (n.width()) * f.zoomLevel, height: (n.height() + m) * f.zoomLevel}) + } + } + if (l == "N" || l == "W") { + var g = l == "N" ? {x: 0, y: m} : {x: m, y: 0}; + f.getChildNodes(false, function (q) { + q.bounds.moveBy(g) + }); + var k = f.getChildEdges().findAll(function (q) { + return q.getAllDockedShapes().length > 0 + }); + var p = k.collect(function (q) { + return q.dockers.findAll(function (r) { + return !r.getDockedShape() + }) + }).flatten(); + p.each(function (q) { + q.bounds.moveBy(g) + }) + } else { + if (l == "S") { + h.scrollTop += m + } else { + if (l == "E") { + h.scrollLeft += m + } + } + } + jQuery(window).trigger("resize"); + f.update(); + o.updateSelection() + }; + var b = ORYX.Core.Command.extend({ + construct: function (f, h, g) { + this.position = f; + this.extentionSize = h; + this.facade = g + }, execute: function () { + resizeCanvas(this.position, this.extentionSize, this.facade) + }, rollback: function () { + resizeCanvas(this.position, -this.extentionSize, this.facade) + }, update: function () { + } + }); + var d = ORYX.CONFIG.CANVAS_RESIZE_INTERVAL; + if (c) { + d = -d + } + var e = new b(a, d, this.facade); + this.facade.executeCommands([e]) + } +}); +ORYX.Plugins.CanvasResizeButton = Clazz.extend({ + construct: function (b, t, g) { + this.canvas = b; + var k = b.getHTMLContainer().parentNode; + window.myParent = k; + var s = jQuery("#canvasSection")[0]; + var d = s; + var e = jQuery("#canvasSection").find(".ORYX_Editor")[0]; + var f = e.children[0]; + var a = "glyphicon glyphicon-chevron-"; + var p = "glyphicon glyphicon-chevron-"; + if (t == "N") { + a += "up"; + p += "down" + } else { + if (t == "S") { + a += "down"; + p += "up" + } else { + if (t == "E") { + a += "right"; + p += "left" + } else { + if (t == "W") { + a += "left"; + p += "right" + } + } + } + } + var l = "canvas-shrink-" + t; + var r = "canvas-grow-" + t; + var c = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", k, ["div", { + "class": "canvas_resize_indicator canvas_resize_indicator_grow " + t, + id: l, + title: ORYX.I18N.RESIZE.tipGrow + ORYX.I18N.RESIZE[t] + }, ["i", {"class": a}]]); + var h = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", k, ["div", { + "class": "canvas_resize_indicator canvas_resize_indicator_shrink " + t, + id: r, + title: ORYX.I18N.RESIZE.tipGrow + ORYX.I18N.RESIZE[t] + }, ["i", {"class": p}]]); + var m = 60; + var q = function (w) { + var x = w.target.id.indexOf("canvas-shrink") != -1 || w.target.id.indexOf("canvas-grow") != -1 || w.target.parentNode.id.indexOf("canvas-shrink") != -1 || w.target.parentNode.id.indexOf("canvas-grow") != -1; + if (x) { + if (w.target.id == l || w.target.id == r || w.target.parentNode.id == l || w.target.parentNode.id == r) { + return true + } else { + return false + } + } + if (w.target != k && w.target != d && w.target != d.firstChild && w.target != f && w.target != d) { + return false + } + var z = w.offsetX !== undefined ? w.offsetX : w.layerX; + var y = w.offsetY !== undefined ? w.offsetY : w.layerY; + var u = 0; + if (e.clientWidth < s.clientWidth) { + var v = s.clientWidth - e.clientWidth; + u = v / 2 + } + y = y - s.scrollTop; + z = z - s.scrollLeft; + if (t == "N") { + return y < m + } else { + if (t == "W") { + return z < m + u + } else { + if (t == "E") { + return s.clientWidth - z < m + u + } else { + if (t == "S") { + return s.clientHeight - y < m + } + } + } + } + return false + }; + var n = (function () { + c.show(); + var u = b.bounds.width(); + var v = b.bounds.height(); + if (t == "N" && (v - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_HEIGHT)) { + h.show() + } else { + if (t == "E" && (u - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_WIDTH)) { + h.show() + } else { + if (t == "S" && (v - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_HEIGHT)) { + h.show() + } else { + if (t == "W" && (u - ORYX.CONFIG.CANVAS_RESIZE_INTERVAL > ORYX.CONFIG.CANVAS_MIN_WIDTH)) { + h.show() + } else { + h.hide() + } + } + } + } + }).bind(this); + var o = function () { + c.hide(); + h.hide() + }; + k.parentNode.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, function (u) { + if (q(u)) { + n() + } else { + o() + } + }, false); + c.addEventListener(ORYX.CONFIG.EVENT_MOUSEOVER, function (u) { + n() + }, true); + h.addEventListener(ORYX.CONFIG.EVENT_MOUSEOVER, function (u) { + n() + }, true); + k.parentNode.addEventListener(ORYX.CONFIG.EVENT_MOUSEOUT, function (u) { + o() + }, true); + o(); + c.addEventListener("click", function () { + g(t); + n() + }, true); + h.addEventListener("click", function () { + g(t, true); + n() + }, true) + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.RenameShapes = Clazz.extend({ + facade: undefined, construct: function (a) { + this.facade = a; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_CANVAS_SCROLL, this.hideField.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DBLCLICK, this.actOnDBLClick.bind(this)); + this.facade.offer({ + keyCodes: [{keyCode: 113, keyAction: ORYX.CONFIG.KEY_ACTION_DOWN}], + functionality: this.renamePerF2.bind(this) + }); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEDOWN, this.hide.bind(this), true) + }, renamePerF2: function () { + var a = this.facade.getSelection(); + this.actOnDBLClick(undefined, a.first()) + }, actOnDBLClick: function (p, l) { + if (!(l instanceof ORYX.Core.Shape)) { + return + } + this.destroy(); + var m = l.getStencil().properties().findAll(function (t) { + return (t.refToView() && t.refToView().length > 0 && t.directlyEditable()) + }); + m = m.findAll(function (t) { + return !t.readonly() && (t.type() == ORYX.CONFIG.TYPE_STRING || t.type() == ORYX.CONFIG.TYPE_EXPRESSION || t.type() == ORYX.CONFIG.TYPE_DATASOURCE) + }); + var n = m.collect(function (t) { + return t.refToView() + }).flatten().compact(); + var h = l.getLabels().findAll(function (t) { + return n.any(function (u) { + return t.id.endsWith(u) + }) + }); + if (h.length == 0) { + return + } + var k = h.length <= 1 ? h[0] : null; + if (!k) { + k = h.find(function (t) { + return t.node == p.target || t.node == p.target.parentNode + }); + if (!k) { + var q = this.facade.eventCoordinates(p); + var b = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var e = navigator.userAgent; + if (e.indexOf("MSIE") >= 0) { + var r = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (r !== 100) { + b = r / 100 + } + } + } + if (b !== 1) { + q.x = q.x / b; + q.y = q.y / b + } + q.y += $("editor-header").clientHeight - $("canvasSection").scrollTop - 5; + if (KISBPM.HEADER_CONFIG.showAppTitle == false) { + q.y += 61 + } + q.x -= $("canvasSection").scrollLeft; + var s = this.facade.getCanvas().rootNode.lastChild.getScreenCTM(); + q.x *= s.a; + q.y *= s.d; + var o = h.collect(function (v) { + var u = this.getCenterPosition(v.node); + var t = Math.sqrt(Math.pow(u.x - q.x, 2) + Math.pow(u.y - q.y, 2)); + return {diff: t, label: v} + }.bind(this)); + o.sort(function (u, t) { + return u.diff > t.diff + }); + k = o[0].label + } + } + var d = m.find(function (t) { + return t.refToView().any(function (u) { + return k.id == l.id + u + }) + }); + var f = Math.min(Math.max(100, l.bounds.width()), 200); + var a = this.getCenterPosition(k.node, l); + a.x -= (f / 2); + var c = d.prefix() + "-" + d.id(); + var g = document.createElement("textarea"); + g.id = "shapeTextInput"; + g.style.position = "absolute"; + g.style.width = f + "px"; + g.style.left = (a.x < 10) ? 10 : a.x + "px"; + g.style.top = (a.y - 15) + "px"; + g.className = "x-form-textarea x-form-field x_form_text_set_absolute"; + g.value = l.properties[c]; + this.oldValueText = l.properties[c]; + document.getElementById("canvasSection").appendChild(g); + this.shownTextField = g; + this.updateValueFunction = function (x, u) { + var w = l; + var v = this.facade; + if (u != x) { + var t = ORYX.Core.Command.extend({ + construct: function () { + this.el = w; + this.propId = c; + this.oldValue = u; + this.newValue = x; + this.facade = v + }, execute: function () { + this.el.setProperty(this.propId, this.newValue); + this.facade.setSelection([this.el]); + this.facade.getCanvas().update(); + this.facade.updateSelection() + }, rollback: function () { + this.el.setProperty(this.propId, this.oldValue); + this.facade.setSelection([this.el]); + this.facade.getCanvas().update(); + this.facade.updateSelection() + } + }); + var y = new t(); + this.facade.executeCommands([y]) + } + }.bind(this); + jQuery("#shapeTextInput").focus(); + jQuery("#shapeTextInput").autogrow(); + this.facade.disableEvent(ORYX.CONFIG.EVENT_KEYDOWN) + }, getCenterPosition: function (f, h) { + if (!f) { + return {x: 0, y: 0} + } + var e = this.facade.getCanvas().node.getScreenCTM(); + var b = h.bounds.upperLeft(); + var p = true; + var n = h; + while (p) { + if (n.getParentShape().getStencil().idWithoutNs() === "BPMNDiagram") { + p = false + } else { + var l = n.getParentShape().bounds.upperLeft(); + b.x += l.x; + b.y += l.y; + n = n.getParentShape() + } + } + var c = h.bounds.midPoint(); + c.x += b.x + e.e; + c.y += b.y + e.f; + c.x *= e.a; + c.y *= e.d; + var a = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var d = navigator.userAgent; + if (d.indexOf("MSIE") >= 0) { + var r = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (r !== 100) { + a = r / 100 + } + } + } + if (a === 1) { + c.y = c.y - jQuery("#canvasSection").offset().top + 5; + c.x -= jQuery("#canvasSection").offset().left + } else { + var m = jQuery("#canvasSection").offset().left; + var o = jQuery("#canvasSection").scrollLeft(); + var k = jQuery("#canvasSection").scrollTop(); + var g = e.e - (m * a); + var q = 0; + if (g > 10) { + q = (g / a) - g + } + c.y = c.y - (jQuery("#canvasSection").offset().top * a) + 5 + ((k * a) - k); + c.x = c.x - (m * a) + q + ((o * a) - o) + } + return c + }, hide: function (b) { + if (this.shownTextField && (!b || b.target !== this.shownTextField)) { + var a = this.shownTextField.value; + if (a !== this.oldValueText) { + this.updateValueFunction(a, this.oldValueText) + } + this.destroy() + } + }, hideField: function (a) { + if (this.shownTextField) { + this.destroy() + } + }, destroy: function (a) { + var b = jQuery("#shapeTextInput"); + if (b) { + b.remove(); + delete this.shownTextField; + this.facade.enableEvent(ORYX.CONFIG.EVENT_KEYDOWN) + } + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.ProcessLink = Clazz.extend({ + facade: undefined, construct: function (a) { + this.facade = a; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_PROPERTY_CHANGED, this.propertyChanged.bind(this)) + }, propertyChanged: function (a, b) { + if (a.name !== "oryx-refuri" || !b instanceof ORYX.Core.Node) { + return + } + if (a.value && a.value.length > 0 && a.value != "undefined") { + this.show(b, a.value) + } else { + this.hide(b) + } + }, show: function (a, b) { + var c = ORYX.Editor.graft("http://www.w3.org/2000/svg", null, ["a", {target: "_blank"}, ["path", { + "stroke-width": 1, + stroke: "#00DD00", + fill: "#00AA00", + d: "M3,3 l0,-2.5 l7.5,0 l0,-2.5 l7.5,4.5 l-7.5,3.5 l0,-2.5 l-8,0", + "line-captions": "round" + }]]); + var c = ORYX.Editor.graft("http://www.w3.org/2000/svg", null, ["a", {target: "_blank"}, ["path", { + style: "fill:#92BFFC;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72", + d: "M0 1.44 L0 15.05 L11.91 15.05 L11.91 5.98 L7.37 1.44 L0 1.44 Z" + }], ["path", { + style: "stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72;fill:none;", + transform: "translate(7.5, -8.5)", + d: "M0 10.51 L0 15.05 L4.54 15.05" + }], ["path", { + style: "fill:#f28226;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.72", + transform: "translate(-3, -1)", + d: "M0 8.81 L0 13.06 L5.95 13.06 L5.95 15.05 A50.2313 50.2313 -175.57 0 0 10.77 11.08 A49.9128 49.9128 -1.28 0 0 5.95 6.54 L5.95 8.81 L0 8.81 Z" + }],]); + c.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", b); + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_OVERLAY_SHOW, + id: "arissupport.urlref_" + a.id, + shapes: [a], + node: c, + nodePosition: "SE" + }) + }, hide: function (a) { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_OVERLAY_HIDE, id: "arissupport.urlref_" + a.id}) + } +}); +Array.prototype.insertFrom = function (e, d) { + d = Math.max(0, d); + e = Math.min(Math.max(0, e), this.length - 1); + var b = this[e]; + var a = this.without(b); + var c = a.slice(0, d); + c.push(b); + if (a.length > d) { + c = c.concat(a.slice(d)) + } + return c +}; +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.Arrangement = ORYX.Plugins.AbstractPlugin.extend({ + facade: undefined, construct: function (a) { + this.facade = a; + this.facade.offer({ + name: ORYX.I18N.Arrangement.am, + functionality: this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_MIDDLE]), + group: ORYX.I18N.Arrangement.groupA, + icon: ORYX.PATH + "images/shape_align_middle.png", + description: ORYX.I18N.Arrangement.amDesc, + index: 1, + minShape: 2 + }); + this.facade.offer({ + name: ORYX.I18N.Arrangement.ac, + functionality: this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_CENTER]), + group: ORYX.I18N.Arrangement.groupA, + icon: ORYX.PATH + "images/shape_align_center.png", + description: ORYX.I18N.Arrangement.acDesc, + index: 2, + minShape: 2 + }); + this.facade.offer({ + name: ORYX.I18N.Arrangement.as, + functionality: this.alignShapes.bind(this, [ORYX.CONFIG.EDITOR_ALIGN_SIZE]), + group: ORYX.I18N.Arrangement.groupA, + icon: ORYX.PATH + "images/shape_align_size.png", + description: ORYX.I18N.Arrangement.asDesc, + index: 3, + minShape: 2 + }); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_TOP, this.setZLevel.bind(this, this.setToTop)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_BACK, this.setZLevel.bind(this, this.setToBack)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_FORWARD, this.setZLevel.bind(this, this.setForward)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_ARRANGEMENT_BACKWARD, this.setZLevel.bind(this, this.setBackward)) + }, onSelectionChanged: function (a) { + var b = this.facade.getSelection(); + if (b.length === 1 && b[0] instanceof ORYX.Core.Edge) { + this.setToTop(b) + } + }, setZLevel: function (d, b) { + var a = ORYX.Core.Command.extend({ + construct: function (g, f, e) { + this.callback = g; + this.elements = f; + this.elAndIndex = f.map(function (h) { + return {el: h, previous: h.parent.children[h.parent.children.indexOf(h) - 1]} + }); + this.facade = e + }, execute: function () { + this.callback(this.elements); + this.facade.setSelection(this.elements) + }, rollback: function () { + var g = this.elAndIndex.sortBy(function (n) { + var o = n.el; + var m = $A(o.node.parentNode.childNodes); + return m.indexOf(o.node) + }); + for (var f = 0; f < g.length; f++) { + var h = g[f].el; + var k = h.parent; + var l = k.children.indexOf(h); + var e = k.children.indexOf(g[f].previous); + e = e || 0; + k.children = k.children.insertFrom(l, e); + h.node.parentNode.insertBefore(h.node, h.node.parentNode.childNodes[e + 1]) + } + this.facade.setSelection(this.elements) + } + }); + var c = new a(d, this.facade.getSelection(), this.facade); + if (b.excludeCommand) { + c.execute() + } else { + this.facade.executeCommands([c]) + } + }, setToTop: function (b) { + var a = b.sortBy(function (e, c) { + var d = $A(e.node.parentNode.childNodes); + return d.indexOf(e.node) + }); + a.each(function (c) { + var d = c.parent; + if (d.children.last() === c) { + return + } + d.children = d.children.without(c); + d.children.push(c); + c.node.parentNode.appendChild(c.node) + }) + }, setToBack: function (b) { + var a = b.sortBy(function (e, c) { + var d = $A(e.node.parentNode.childNodes); + return d.indexOf(e.node) + }); + a = a.reverse(); + a.each(function (c) { + var d = c.parent; + d.children = d.children.without(c); + d.children.unshift(c); + c.node.parentNode.insertBefore(c.node, c.node.parentNode.firstChild) + }) + }, setBackward: function (c) { + var b = c.sortBy(function (f, d) { + var e = $A(f.node.parentNode.childNodes); + return e.indexOf(f.node) + }); + b = b.reverse(); + var a = b.findAll(function (d) { + return !b.some(function (e) { + return e.node == d.node.previousSibling + }) + }); + a.each(function (e) { + if (e.node.previousSibling === null) { + return + } + var f = e.parent; + var d = f.children.indexOf(e); + f.children = f.children.insertFrom(d, d - 1); + e.node.parentNode.insertBefore(e.node, e.node.previousSibling) + }) + }, setForward: function (c) { + var b = c.sortBy(function (f, d) { + var e = $A(f.node.parentNode.childNodes); + return e.indexOf(f.node) + }); + var a = b.findAll(function (d) { + return !b.some(function (e) { + return e.node == d.node.nextSibling + }) + }); + a.each(function (f) { + var d = f.node.nextSibling; + if (d === null) { + return + } + var e = f.parent.children.indexOf(f); + var g = f.parent; + g.children = g.children.insertFrom(e, e + 1); + f.node.parentNode.insertBefore(d, f.node) + }) + }, alignShapes: function (b) { + var f = this.facade.getSelection(); + f = this.facade.getCanvas().getShapesWithSharedParent(f); + f = f.findAll(function (h) { + return (h instanceof ORYX.Core.Node) + }); + f = f.findAll(function (h) { + var k = h.getIncomingShapes(); + return k.length == 0 || !f.include(k[0]) + }); + if (f.length < 2) { + return + } + var e = f[0].absoluteBounds().clone(); + f.each(function (h) { + e.include(h.absoluteBounds().clone()) + }); + var d = 0; + var c = 0; + f.each(function (h) { + d = Math.max(h.bounds.width(), d); + c = Math.max(h.bounds.height(), c) + }); + var a = ORYX.Core.Command.extend({ + construct: function (o, n, m, l, h, k) { + this.elements = o; + this.bounds = n; + this.maxHeight = m; + this.maxWidth = l; + this.way = h; + this.facade = k.facade; + this.plugin = k; + this.orgPos = [] + }, setBounds: function (h, l) { + if (!l) { + l = {width: ORYX.CONFIG.MAXIMUM_SIZE, height: ORYX.CONFIG.MAXIMUM_SIZE} + } + if (!h.bounds) { + throw"Bounds not definined." + } + var k = { + a: { + x: h.bounds.upperLeft().x - (this.maxWidth - h.bounds.width()) / 2, + y: h.bounds.upperLeft().y - (this.maxHeight - h.bounds.height()) / 2 + }, + b: { + x: h.bounds.lowerRight().x + (this.maxWidth - h.bounds.width()) / 2, + y: h.bounds.lowerRight().y + (this.maxHeight - h.bounds.height()) / 2 + } + }; + if (this.maxWidth > l.width) { + k.a.x = h.bounds.upperLeft().x - (l.width - h.bounds.width()) / 2; + k.b.x = h.bounds.lowerRight().x + (l.width - h.bounds.width()) / 2 + } + if (this.maxHeight > l.height) { + k.a.y = h.bounds.upperLeft().y - (l.height - h.bounds.height()) / 2; + k.b.y = h.bounds.lowerRight().y + (l.height - h.bounds.height()) / 2 + } + h.bounds.set(k) + }, execute: function () { + this.elements.each(function (h, k) { + this.orgPos[k] = h.bounds.upperLeft(); + var l = this.bounds.clone(); + var o; + if (h.parent && !(h.parent instanceof ORYX.Core.Canvas)) { + var n = h.parent.absoluteBounds().upperLeft(); + l.moveBy(-n.x, -n.y) + } + switch (this.way) { + case ORYX.CONFIG.EDITOR_ALIGN_BOTTOM: + o = {x: h.bounds.upperLeft().x, y: l.b.y - h.bounds.height()}; + break; + case ORYX.CONFIG.EDITOR_ALIGN_MIDDLE: + o = {x: h.bounds.upperLeft().x, y: (l.a.y + l.b.y - h.bounds.height()) / 2}; + break; + case ORYX.CONFIG.EDITOR_ALIGN_TOP: + o = {x: h.bounds.upperLeft().x, y: l.a.y}; + break; + case ORYX.CONFIG.EDITOR_ALIGN_LEFT: + o = {x: l.a.x, y: h.bounds.upperLeft().y}; + break; + case ORYX.CONFIG.EDITOR_ALIGN_CENTER: + o = {x: (l.a.x + l.b.x - h.bounds.width()) / 2, y: h.bounds.upperLeft().y}; + break; + case ORYX.CONFIG.EDITOR_ALIGN_RIGHT: + o = {x: l.b.x - h.bounds.width(), y: h.bounds.upperLeft().y}; + break; + case ORYX.CONFIG.EDITOR_ALIGN_SIZE: + if (h.isResizable) { + this.orgPos[k] = {a: h.bounds.upperLeft(), b: h.bounds.lowerRight()}; + this.setBounds(h, h.maximumSize) + } + break + } + if (o) { + var m = {x: h.bounds.upperLeft().x - o.x, y: h.bounds.upperLeft().y - o.y}; + h.bounds.moveTo(o); + this.plugin.layoutEdges(h, h.getAllDockedShapes(), m) + } + }.bind(this)) + }, rollback: function () { + this.elements.each(function (h, k) { + if (this.way == ORYX.CONFIG.EDITOR_ALIGN_SIZE) { + if (h.isResizable) { + h.bounds.set(this.orgPos[k]) + } + } else { + h.bounds.moveTo(this.orgPos[k]) + } + }.bind(this)) + } + }); + var g = new a(f, e, c, d, parseInt(b), this); + this.facade.executeCommands([g]) + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.Save = Clazz.extend({ + facade: undefined, processURI: undefined, changeSymbol: "*", construct: function (a) { + this.facade = a; + document.addEventListener("keydown", function (b) { + if (b.ctrlKey && b.keyCode === 83) { + Event.stop(b) + } + }, false); + window.onbeforeunload = this.onUnLoad.bind(this); + this.changeDifference = 0; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_UNDO_EXECUTE, function () { + this.changeDifference++; + this.updateTitle() + }.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_EXECUTE_COMMANDS, function () { + this.changeDifference++; + this.updateTitle() + }.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_SAVED, function () { + this.changeDifference = 0; + this.updateTitle() + }.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_UNDO_ROLLBACK, function () { + this.changeDifference--; + this.updateTitle() + }.bind(this)); + this.hasChanges = this._hasChanges.bind(this) + }, updateTitle: function () { + var a = window.document.title || document.getElementsByTagName("title")[0].childNodes[0].nodeValue; + if (this.changeDifference === 0 && a.startsWith(this.changeSymbol)) { + window.document.title = a.slice(1) + } else { + if (this.changeDifference !== 0 && !a.startsWith(this.changeSymbol)) { + window.document.title = this.changeSymbol + "" + a + } + } + }, _hasChanges: function () { + return this.changeDifference !== 0 || (this.facade.getModelMetaData()["new"] && this.facade.getCanvas().getChildShapes().size() > 0) + }, onUnLoad: function () { + if (this._hasChanges()) { + return ORYX.I18N.Save.unsavedData + } + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.DragDropResize = ORYX.Plugins.AbstractPlugin.extend({ + construct: function (b) { + this.facade = b; + this.currentShapes = []; + this.toMoveShapes = []; + this.distPoints = []; + this.isResizing = false; + this.dragEnable = false; + this.dragIntialized = false; + this.edgesMovable = true; + this.offSetPosition = {x: 0, y: 0}; + this.faktorXY = {x: 1, y: 1}; + this.containmentParentNode; + this.isAddingAllowed = false; + this.isAttachingAllowed = false; + this.callbackMouseMove = this.handleMouseMove.bind(this); + this.callbackMouseUp = this.handleMouseUp.bind(this); + var a = this.facade.getCanvas().getSvgContainer(); + this.selectedRect = new ORYX.Plugins.SelectedRect(a); + if (ORYX.CONFIG.SHOW_GRIDLINE) { + this.vLine = new ORYX.Plugins.GridLine(a, ORYX.Plugins.GridLine.DIR_VERTICAL); + this.hLine = new ORYX.Plugins.GridLine(a, ORYX.Plugins.GridLine.DIR_HORIZONTAL) + } + a = this.facade.getCanvas().getHTMLContainer(); + this.scrollNode = this.facade.getCanvas().rootNode.parentNode.parentNode; + this.resizerSE = new ORYX.Plugins.Resizer(a, "southeast", this.facade); + this.resizerSE.registerOnResize(this.onResize.bind(this)); + this.resizerSE.registerOnResizeEnd(this.onResizeEnd.bind(this)); + this.resizerSE.registerOnResizeStart(this.onResizeStart.bind(this)); + this.resizerNW = new ORYX.Plugins.Resizer(a, "northwest", this.facade); + this.resizerNW.registerOnResize(this.onResize.bind(this)); + this.resizerNW.registerOnResizeEnd(this.onResizeEnd.bind(this)); + this.resizerNW.registerOnResizeStart(this.onResizeStart.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)) + }, handleMouseDown: function (d, c) { + if (!this.dragBounds || !this.currentShapes.member(c) || !this.toMoveShapes.length) { + return + } + this.dragEnable = true; + this.dragIntialized = true; + this.edgesMovable = true; + var b = this.facade.getCanvas().node.getScreenCTM(); + this.faktorXY.x = b.a; + this.faktorXY.y = b.d; + var g = Event.pointerX(d); + var e = Event.pointerY(d); + var f = this.dragBounds.upperLeft(); + this.offSetPosition = {x: g - (f.x * this.faktorXY.x), y: e - (f.y * this.faktorXY.y)}; + this.offsetScroll = {x: this.scrollNode.scrollLeft, y: this.scrollNode.scrollTop}; + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.callbackMouseMove, false); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.callbackMouseUp, true); + return + }, handleMouseUp: function (d) { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "dragdropresize.contain"}); + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "dragdropresize.attached"}); + if (this.dragEnable) { + if (!this.dragIntialized) { + this.afterDrag(); + if (this.isAttachingAllowed && this.toMoveShapes.length == 1 && this.toMoveShapes[0] instanceof ORYX.Core.Node && this.toMoveShapes[0].dockers.length > 0) { + var b = this.facade.eventCoordinates(d); + var e = this.toMoveShapes[0].dockers[0]; + var c = ORYX.Core.Command.extend({ + construct: function (k, f, h, g) { + this.docker = k; + this.newPosition = f; + this.newDockedShape = h; + this.newParent = h.parent || g.getCanvas(); + this.oldPosition = k.parent.bounds.center(); + this.oldDockedShape = k.getDockedShape(); + this.oldParent = k.parent.parent || g.getCanvas(); + this.facade = g; + if (this.oldDockedShape) { + this.oldPosition = k.parent.absoluteBounds().center() + } + }, execute: function () { + this.dock(this.newDockedShape, this.newParent, this.newPosition); + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_ARRANGEMENT_TOP, excludeCommand: true}) + }, rollback: function () { + this.dock(this.oldDockedShape, this.oldParent, this.oldPosition) + }, dock: function (f, g, h) { + g.add(this.docker.parent); + this.docker.setDockedShape(undefined); + this.docker.bounds.centerMoveTo(h); + this.docker.setDockedShape(f); + this.facade.setSelection([this.docker.parent]); + this.facade.getCanvas().update(); + this.facade.updateSelection() + } + }); + var a = [new c(e, b, this.containmentParentNode, this.facade)]; + this.facade.executeCommands(a) + } else { + if (this.isAddingAllowed) { + this.refreshSelectedShapes() + } + } + this.facade.updateSelection(); + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_DRAGDROP_END}) + } + if (this.vLine) { + this.vLine.hide() + } + if (this.hLine) { + this.hLine.hide() + } + } + this.dragEnable = false; + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.callbackMouseUp, true); + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.callbackMouseMove, false); + return + }, handleMouseMove: function (b) { + if (!this.dragEnable) { + return + } + if (this.dragIntialized) { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_DRAGDROP_START}); + this.dragIntialized = false; + this.resizerSE.hide(); + this.resizerNW.hide(); + this._onlyEdges = this.currentShapes.all(function (c) { + return (c instanceof ORYX.Core.Edge) + }); + this.beforeDrag(); + this._currentUnderlyingNodes = [] + } + var e = {x: Event.pointerX(b) - this.offSetPosition.x, y: Event.pointerY(b) - this.offSetPosition.y}; + e.x -= this.offsetScroll.x - this.scrollNode.scrollLeft; + e.y -= this.offsetScroll.y - this.scrollNode.scrollTop; + var k = b.shiftKey || b.ctrlKey; + if (ORYX.CONFIG.GRID_ENABLED && !k) { + e = this.snapToGrid(e) + } else { + if (this.vLine) { + this.vLine.hide() + } + if (this.hLine) { + this.hLine.hide() + } + } + e.x /= this.faktorXY.x; + e.y /= this.faktorXY.y; + e.x = Math.max(0, e.x); + e.y = Math.max(0, e.y); + var g = this.facade.getCanvas(); + e.x = Math.min(g.bounds.width() - this.dragBounds.width(), e.x); + e.y = Math.min(g.bounds.height() - this.dragBounds.height(), e.y); + this.dragBounds.moveTo(e); + this.resizeRectangle(this.dragBounds); + this.isAttachingAllowed = false; + var f = this.facade.eventCoordinates(b); + var a = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var d = navigator.userAgent; + if (d.indexOf("MSIE") >= 0) { + var m = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (m !== 100) { + a = m / 100 + } + } + } + if (a !== 1) { + f.x = f.x / a; + f.y = f.y / a + } + var l = $A(this.facade.getCanvas().getAbstractShapesAtPosition(f)); + var h = this.toMoveShapes.length == 1 && this.toMoveShapes[0] instanceof ORYX.Core.Node && this.toMoveShapes[0].dockers.length > 0; + h = h && l.length != 1; + if (!h && l.length === this._currentUnderlyingNodes.length && l.all(function (o, c) { + return this._currentUnderlyingNodes[c] === o + }.bind(this))) { + return + } else { + if (this._onlyEdges) { + this.isAddingAllowed = true; + this.containmentParentNode = this.facade.getCanvas() + } else { + var n = {event: b, underlyingNodes: l, checkIfAttachable: h}; + this.checkRules(n) + } + } + this._currentUnderlyingNodes = l.reverse(); + if (this.isAttachingAllowed) { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "dragdropresize.attached", + elements: [this.containmentParentNode], + style: ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE, + color: ORYX.CONFIG.SELECTION_VALID_COLOR + }) + } else { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "dragdropresize.attached"}) + } + if (!this.isAttachingAllowed) { + if (this.isAddingAllowed) { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "dragdropresize.contain", + elements: [this.containmentParentNode], + color: ORYX.CONFIG.SELECTION_VALID_COLOR + }) + } else { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "dragdropresize.contain", + elements: [this.containmentParentNode], + color: ORYX.CONFIG.SELECTION_INVALID_COLOR + }) + } + } else { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "dragdropresize.contain"}) + } + return + }, checkRules: function (d) { + var f = d.event; + var c = d.underlyingNodes; + var e = d.checkIfAttachable; + var b = d.noEdges; + this.containmentParentNode = c.reverse().find((function (g) { + return (g instanceof ORYX.Core.Canvas) || (((g instanceof ORYX.Core.Node) || ((g instanceof ORYX.Core.Edge) && !b)) && (!(this.currentShapes.member(g) || this.currentShapes.any(function (h) { + return (h.children.length > 0 && h.getChildNodes(true).member(g)) + })))) + }).bind(this)); + if (e) { + this.isAttachingAllowed = this.facade.getRules().canConnect({ + sourceShape: this.containmentParentNode, + edgeShape: this.toMoveShapes[0], + targetShape: this.toMoveShapes[0] + }); + if (this.isAttachingAllowed) { + var a = this.facade.eventCoordinates(f); + this.isAttachingAllowed = this.containmentParentNode.isPointOverOffset(a.x, a.y) + } + } + if (!this.isAttachingAllowed) { + this.isAddingAllowed = this.toMoveShapes.all((function (g) { + if (g instanceof ORYX.Core.Edge || g instanceof ORYX.Core.Controls.Docker || this.containmentParentNode === g.parent) { + return true + } else { + if (this.containmentParentNode !== g) { + if (!(this.containmentParentNode instanceof ORYX.Core.Edge) || !b) { + if (this.facade.getRules().canContain({ + containingShape: this.containmentParentNode, + containedShape: g + })) { + return true + } + } + } + } + return false + }).bind(this)) + } + if (!this.isAttachingAllowed && !this.isAddingAllowed && (this.containmentParentNode instanceof ORYX.Core.Edge)) { + d.noEdges = true; + d.underlyingNodes.reverse(); + this.checkRules(d) + } + }, refreshSelectedShapes: function () { + if (!this.dragBounds) { + return + } + var d = this.dragBounds.upperLeft(); + var b = this.oldDragBounds.upperLeft(); + var c = {x: d.x - b.x, y: d.y - b.y}; + var a = [new ORYX.Core.Command.Move(this.toMoveShapes, c, this.containmentParentNode, this.currentShapes, this)]; + if (this._undockedEdgesCommand instanceof ORYX.Core.Command) { + a.unshift(this._undockedEdgesCommand) + } + this.facade.executeCommands(a); + if (this.dragBounds) { + this.oldDragBounds = this.dragBounds.clone() + } + }, onResize: function (a) { + if (!this.dragBounds) { + return + } + this.dragBounds = a; + this.isResizing = true; + this.resizeRectangle(this.dragBounds) + }, onResizeStart: function () { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_RESIZE_START}) + }, onResizeEnd: function () { + if (!(this.currentShapes instanceof Array) || this.currentShapes.length <= 0) { + return + } + if (this.isResizing) { + var a = ORYX.Core.Command.extend({ + construct: function (f, h, g) { + this.shape = f; + this.oldBounds = f.bounds.clone(); + this.newBounds = h; + this.plugin = g + }, execute: function () { + this.shape.bounds.set(this.newBounds.a, this.newBounds.b); + this.update(this.getOffset(this.oldBounds, this.newBounds)) + }, rollback: function () { + this.shape.bounds.set(this.oldBounds.a, this.oldBounds.b); + this.update(this.getOffset(this.newBounds, this.oldBounds)) + }, getOffset: function (g, f) { + return {x: f.a.x - g.a.x, y: f.a.y - g.a.y, xs: f.width() / g.width(), ys: f.height() / g.height()} + }, update: function (g) { + this.shape.getLabels().each(function (h) { + h.changed() + }); + var f = [].concat(this.shape.getIncomingShapes()).concat(this.shape.getOutgoingShapes()).findAll(function (h) { + return h instanceof ORYX.Core.Edge + }.bind(this)); + this.plugin.layoutEdges(this.shape, f, g); + this.plugin.facade.setSelection([this.shape]); + this.plugin.facade.getCanvas().update(); + this.plugin.facade.updateSelection() + } + }); + var c = this.dragBounds.clone(); + var b = this.currentShapes[0]; + if (b.parent) { + var e = b.parent.absoluteXY(); + c.moveBy(-e.x, -e.y) + } + var d = new a(b, c, this); + this.facade.executeCommands([d]); + this.isResizing = false; + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_RESIZE_END}) + } + }, beforeDrag: function () { + var a = ORYX.Core.Command.extend({ + construct: function (b) { + this.dockers = b.collect(function (c) { + return c instanceof ORYX.Core.Controls.Docker ? { + docker: c, + dockedShape: c.getDockedShape(), + refPoint: c.referencePoint + } : undefined + }).compact() + }, execute: function () { + this.dockers.each(function (b) { + b.docker.setDockedShape(undefined) + }) + }, rollback: function () { + this.dockers.each(function (b) { + b.docker.setDockedShape(b.dockedShape); + b.docker.setReferencePoint(b.refPoint) + }) + } + }); + this._undockedEdgesCommand = new a(this.toMoveShapes); + this._undockedEdgesCommand.execute() + }, hideAllLabels: function (a) { + a.getLabels().each(function (b) { + b.hide() + }); + a.getAllDockedShapes().each(function (b) { + var c = b.getLabels(); + if (c.length > 0) { + c.each(function (d) { + d.hide() + }) + } + }); + a.getChildren().each((function (b) { + if (b instanceof ORYX.Core.Shape) { + this.hideAllLabels(b) + } + }).bind(this)) + }, afterDrag: function () { + }, showAllLabels: function (a) { + for (var d = 0; d < a.length; d++) { + var b = a[d]; + b.show() + } + var f = a.getAllDockedShapes(); + for (var d = 0; d < f.length; d++) { + var c = f[d]; + var g = c.getLabels(); + if (g.length > 0) { + g.each(function (h) { + h.show() + }) + } + } + for (var d = 0; d < a.children.length; d++) { + var e = a.children[d]; + if (e instanceof ORYX.Core.Shape) { + this.showAllLabels(e) + } + } + }, onSelectionChanged: function (b) { + var d = b.elements; + this.dragEnable = false; + this.dragIntialized = false; + this.resizerSE.hide(); + this.resizerNW.hide(); + if (!d || d.length == 0) { + this.selectedRect.hide(); + this.currentShapes = []; + this.toMoveShapes = []; + this.dragBounds = undefined; + this.oldDragBounds = undefined + } else { + this.currentShapes = d; + var e = this.facade.getCanvas().getShapesWithSharedParent(d); + this.toMoveShapes = e; + this.toMoveShapes = this.toMoveShapes.findAll(function (f) { + return f instanceof ORYX.Core.Node && (f.dockers.length === 0 || !d.member(f.dockers.first().getDockedShape())) + }); + d.each((function (f) { + if (!(f instanceof ORYX.Core.Edge)) { + return + } + var h = f.getDockers(); + var k = d.member(h.first().getDockedShape()); + var g = d.member(h.last().getDockedShape()); + if (!k && !g) { + var l = !h.first().getDockedShape() && !h.last().getDockedShape(); + if (l) { + this.toMoveShapes = this.toMoveShapes.concat(h) + } + } + if (f.dockers.length > 2 && k && g) { + this.toMoveShapes = this.toMoveShapes.concat(h.findAll(function (n, m) { + return m > 0 && m < h.length - 1 + })) + } + }).bind(this)); + var c = undefined; + this.toMoveShapes.each(function (g) { + var f = g; + if (g instanceof ORYX.Core.Controls.Docker) { + f = g.parent + } + if (!c) { + c = f.absoluteBounds() + } else { + c.include(f.absoluteBounds()) + } + }.bind(this)); + if (!c) { + d.each(function (f) { + if (!c) { + c = f.absoluteBounds() + } else { + c.include(f.absoluteBounds()) + } + }) + } + this.dragBounds = c; + this.oldDragBounds = c.clone(); + this.resizeRectangle(c); + this.selectedRect.show(); + if (d.length == 1 && d[0].isResizable) { + var a = d[0].getStencil().fixedAspectRatio() ? d[0].bounds.width() / d[0].bounds.height() : undefined; + this.resizerSE.setBounds(this.dragBounds, d[0].minimumSize, d[0].maximumSize, a); + this.resizerSE.show(); + this.resizerNW.setBounds(this.dragBounds, d[0].minimumSize, d[0].maximumSize, a); + this.resizerNW.show() + } else { + this.resizerSE.setBounds(undefined); + this.resizerNW.setBounds(undefined) + } + if (ORYX.CONFIG.GRID_ENABLED) { + this.distPoints = []; + if (this.distPointTimeout) { + window.clearTimeout(this.distPointTimeout) + } + this.distPointTimeout = window.setTimeout(function () { + var f = this.facade.getCanvas().getChildShapes(true).findAll(function (h) { + var g = h.parent; + while (g) { + if (d.member(g)) { + return false + } + g = g.parent + } + return true + }); + f.each((function (l) { + if (!(l instanceof ORYX.Core.Edge)) { + var h = l.absoluteXY(); + var k = l.bounds.width(); + var g = l.bounds.height(); + this.distPoints.push({ + ul: {x: h.x, y: h.y}, + c: {x: h.x + (k / 2), y: h.y + (g / 2)}, + lr: {x: h.x + k, y: h.y + g} + }) + } + }).bind(this)) + }.bind(this), 10) + } + } + }, snapToGrid: function (h) { + var a = this.dragBounds; + var p = {}; + var o = 6; + var m = 10; + var q = 6; + var b = this.vLine ? this.vLine.getScale() : 1; + var l = {x: (h.x / b), y: (h.y / b)}; + var n = {x: (h.x / b) + (a.width() / 2), y: (h.y / b) + (a.height() / 2)}; + var g = {x: (h.x / b) + (a.width()), y: (h.y / b) + (a.height())}; + var f, d; + var k, e; + this.distPoints.each(function (s) { + var c, u, t, r; + if (Math.abs(s.c.x - n.x) < m) { + c = s.c.x - n.x; + t = s.c.x + } + if (Math.abs(s.c.y - n.y) < m) { + u = s.c.y - n.y; + r = s.c.y + } + if (c !== undefined) { + f = f === undefined ? c : (Math.abs(c) < Math.abs(f) ? c : f); + if (f === c) { + k = t + } + } + if (u !== undefined) { + d = d === undefined ? u : (Math.abs(u) < Math.abs(d) ? u : d); + if (d === u) { + e = r + } + } + }); + if (f !== undefined) { + l.x += f; + l.x *= b; + if (this.vLine && k) { + this.vLine.update(k) + } + } else { + l.x = (h.x - (h.x % (ORYX.CONFIG.GRID_DISTANCE / 2))); + if (this.vLine) { + this.vLine.hide() + } + } + if (d !== undefined) { + l.y += d; + l.y *= b; + if (this.hLine && e) { + this.hLine.update(e) + } + } else { + l.y = (h.y - (h.y % (ORYX.CONFIG.GRID_DISTANCE / 2))); + if (this.hLine) { + this.hLine.hide() + } + } + return l + }, showGridLine: function () { + }, resizeRectangle: function (a) { + this.selectedRect.resize(a) + } +}); +ORYX.Plugins.SelectedRect = Clazz.extend({ + construct: function (a) { + this.parentId = a; + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", $(a), ["g"]); + this.dashedArea = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, ["rect", { + x: 0, + y: 0, + "stroke-width": 1, + stroke: "#777777", + fill: "none", + "stroke-dasharray": "2,2", + "pointer-events": "none" + }]); + this.hide() + }, hide: function () { + this.node.setAttributeNS(null, "display", "none") + }, show: function () { + this.node.setAttributeNS(null, "display", "") + }, resize: function (a) { + var c = a.upperLeft(); + var b = ORYX.CONFIG.SELECTED_AREA_PADDING; + this.dashedArea.setAttributeNS(null, "width", a.width() + 2 * b); + this.dashedArea.setAttributeNS(null, "height", a.height() + 2 * b); + this.node.setAttributeNS(null, "transform", "translate(" + (c.x - b) + ", " + (c.y - b) + ")") + } +}); +ORYX.Plugins.GridLine = Clazz.extend({ + construct: function (b, a) { + if (ORYX.Plugins.GridLine.DIR_HORIZONTAL !== a && ORYX.Plugins.GridLine.DIR_VERTICAL !== a) { + a = ORYX.Plugins.GridLine.DIR_HORIZONTAL + } + this.parent = $(b); + this.direction = a; + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.parent, ["g"]); + this.line = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, ["path", { + "stroke-width": 1, + stroke: "silver", + fill: "none", + "stroke-dasharray": "5,5", + "pointer-events": "none" + }]); + this.hide() + }, hide: function () { + this.node.setAttributeNS(null, "display", "none") + }, show: function () { + this.node.setAttributeNS(null, "display", "") + }, getScale: function () { + try { + return this.parent.parentNode.transform.baseVal.getItem(0).matrix.a + } catch (a) { + return 1 + } + }, update: function (e) { + if (this.direction === ORYX.Plugins.GridLine.DIR_HORIZONTAL) { + var d = e instanceof Object ? e.y : e; + var c = this.parent.parentNode.parentNode.width.baseVal.value / this.getScale(); + this.line.setAttributeNS(null, "d", "M 0 " + d + " L " + c + " " + d) + } else { + var a = e instanceof Object ? e.x : e; + var b = this.parent.parentNode.parentNode.height.baseVal.value / this.getScale(); + this.line.setAttributeNS(null, "d", "M" + a + " 0 L " + a + " " + b) + } + this.show() + } +}); +ORYX.Plugins.GridLine.DIR_HORIZONTAL = "hor"; +ORYX.Plugins.GridLine.DIR_VERTICAL = "ver"; +ORYX.Plugins.Resizer = Clazz.extend({ + construct: function (c, a, b) { + this.parentId = c; + this.orientation = a; + this.facade = b; + this.node = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", $("canvasSection"), ["div", { + "class": "resizer_" + this.orientation, + style: "left:0px; top:0px;position:absolute;" + }]); + this.node.addEventListener(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this), true); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.handleMouseUp.bind(this), true); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.handleMouseMove.bind(this), false); + this.dragEnable = false; + this.offSetPosition = {x: 0, y: 0}; + this.bounds = undefined; + this.canvasNode = this.facade.getCanvas().node; + this.minSize = undefined; + this.maxSize = undefined; + this.aspectRatio = undefined; + this.resizeCallbacks = []; + this.resizeStartCallbacks = []; + this.resizeEndCallbacks = []; + this.hide(); + this.scrollNode = this.node.parentNode.parentNode.parentNode + }, handleMouseDown: function (a) { + this.dragEnable = true; + this.offsetScroll = {x: this.scrollNode.scrollLeft, y: this.scrollNode.scrollTop}; + this.offSetPosition = {x: Event.pointerX(a) - this.position.x, y: Event.pointerY(a) - this.position.y}; + this.resizeStartCallbacks.each((function (b) { + b(this.bounds) + }).bind(this)) + }, handleMouseUp: function (a) { + this.dragEnable = false; + this.containmentParentNode = null; + this.resizeEndCallbacks.each((function (b) { + b(this.bounds) + }).bind(this)) + }, handleMouseMove: function (b) { + if (!this.dragEnable) { + return + } + if (b.shiftKey || b.ctrlKey) { + this.aspectRatio = this.bounds.width() / this.bounds.height() + } else { + this.aspectRatio = undefined + } + var a = {x: Event.pointerX(b) - this.offSetPosition.x, y: Event.pointerY(b) - this.offSetPosition.y}; + a.x -= this.offsetScroll.x - this.scrollNode.scrollLeft; + a.y -= this.offsetScroll.y - this.scrollNode.scrollTop; + a.x = Math.min(a.x, this.facade.getCanvas().bounds.width()); + a.y = Math.min(a.y, this.facade.getCanvas().bounds.height()); + var c = {x: a.x - this.position.x, y: a.y - this.position.y}; + if (this.aspectRatio) { + newAspectRatio = (this.bounds.width() + c.x) / (this.bounds.height() + c.y); + if (newAspectRatio > this.aspectRatio) { + c.x = this.aspectRatio * (this.bounds.height() + c.y) - this.bounds.width() + } else { + if (newAspectRatio < this.aspectRatio) { + c.y = (this.bounds.width() + c.x) / this.aspectRatio - this.bounds.height() + } + } + } + if (this.orientation === "northwest") { + if (this.bounds.width() - c.x > this.maxSize.width) { + c.x = -(this.maxSize.width - this.bounds.width()); + if (this.aspectRatio) { + c.y = this.aspectRatio * c.x + } + } + if (this.bounds.width() - c.x < this.minSize.width) { + c.x = -(this.minSize.width - this.bounds.width()); + if (this.aspectRatio) { + c.y = this.aspectRatio * c.x + } + } + if (this.bounds.height() - c.y > this.maxSize.height) { + c.y = -(this.maxSize.height - this.bounds.height()); + if (this.aspectRatio) { + c.x = c.y / this.aspectRatio + } + } + if (this.bounds.height() - c.y < this.minSize.height) { + c.y = -(this.minSize.height - this.bounds.height()); + if (this.aspectRatio) { + c.x = c.y / this.aspectRatio + } + } + } else { + if (this.bounds.width() + c.x > this.maxSize.width) { + c.x = this.maxSize.width - this.bounds.width(); + if (this.aspectRatio) { + c.y = this.aspectRatio * c.x + } + } + if (this.bounds.width() + c.x < this.minSize.width) { + c.x = this.minSize.width - this.bounds.width(); + if (this.aspectRatio) { + c.y = this.aspectRatio * c.x + } + } + if (this.bounds.height() + c.y > this.maxSize.height) { + c.y = this.maxSize.height - this.bounds.height(); + if (this.aspectRatio) { + c.x = c.y / this.aspectRatio + } + } + if (this.bounds.height() + c.y < this.minSize.height) { + c.y = this.minSize.height - this.bounds.height(); + if (this.aspectRatio) { + c.x = c.y / this.aspectRatio + } + } + } + if (this.orientation === "northwest") { + this.bounds.extend({x: -c.x, y: -c.y}); + this.bounds.moveBy(c) + } else { + this.bounds.extend(c) + } + this.update(); + this.resizeCallbacks.each((function (d) { + d(this.bounds) + }).bind(this)); + Event.stop(b) + }, registerOnResizeStart: function (a) { + if (!this.resizeStartCallbacks.member(a)) { + this.resizeStartCallbacks.push(a) + } + }, unregisterOnResizeStart: function (a) { + if (this.resizeStartCallbacks.member(a)) { + this.resizeStartCallbacks = this.resizeStartCallbacks.without(a) + } + }, registerOnResizeEnd: function (a) { + if (!this.resizeEndCallbacks.member(a)) { + this.resizeEndCallbacks.push(a) + } + }, unregisterOnResizeEnd: function (a) { + if (this.resizeEndCallbacks.member(a)) { + this.resizeEndCallbacks = this.resizeEndCallbacks.without(a) + } + }, registerOnResize: function (a) { + if (!this.resizeCallbacks.member(a)) { + this.resizeCallbacks.push(a) + } + }, unregisterOnResize: function (a) { + if (this.resizeCallbacks.member(a)) { + this.resizeCallbacks = this.resizeCallbacks.without(a) + } + }, hide: function () { + this.node.style.display = "none" + }, show: function () { + if (this.bounds) { + this.node.style.display = "" + } + }, setBounds: function (d, b, a, c) { + this.bounds = d; + if (!b) { + b = {width: ORYX.CONFIG.MINIMUM_SIZE, height: ORYX.CONFIG.MINIMUM_SIZE} + } + if (!a) { + a = {width: ORYX.CONFIG.MAXIMUM_SIZE, height: ORYX.CONFIG.MAXIMUM_SIZE} + } + this.minSize = b; + this.maxSize = a; + this.aspectRatio = c; + this.update() + }, update: function () { + if (!this.bounds) { + return + } + var d = this.bounds.upperLeft(); + if (this.bounds.width() < this.minSize.width) { + this.bounds.set(d.x, d.y, d.x + this.minSize.width, d.y + this.bounds.height()) + } + if (this.bounds.height() < this.minSize.height) { + this.bounds.set(d.x, d.y, d.x + this.bounds.width(), d.y + this.minSize.height) + } + if (this.bounds.width() > this.maxSize.width) { + this.bounds.set(d.x, d.y, d.x + this.maxSize.width, d.y + this.bounds.height()) + } + if (this.bounds.height() > this.maxSize.height) { + this.bounds.set(d.x, d.y, d.x + this.bounds.width(), d.y + this.maxSize.height) + } + var g = this.canvasNode.getScreenCTM(); + d.x *= g.a; + d.y *= g.d; + var b = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var c = navigator.userAgent; + if (c.indexOf("MSIE") >= 0) { + var m = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (m !== 100) { + b = m / 100 + } + } + } + if (b === 1) { + d.y = d.y - jQuery("#canvasSection").offset().top + g.f; + d.x = d.x - jQuery("#canvasSection").offset().left + g.e + } else { + var h = jQuery("#canvasSection").offset().left; + var k = jQuery("#canvasSection").scrollLeft(); + var f = jQuery("#canvasSection").scrollTop(); + var e = g.e - (h * b); + var l = 0; + if (e > 10) { + l = (e / b) - e + } + d.y = d.y - (jQuery("#canvasSection").offset().top * b) + ((f * b) - f) + g.f; + d.x = d.x - (h * b) + l + ((k * b) - k) + g.e + } + if (this.orientation === "northwest") { + d.x -= 13; + d.y -= 13 + } else { + d.x += (g.a * this.bounds.width()) + 3; + d.y += (g.d * this.bounds.height()) + 3 + } + this.position = d; + this.node.style.left = this.position.x + "px"; + this.node.style.top = this.position.y + "px" + } +}); +ORYX.Core.Command.Move = ORYX.Core.Command.extend({ + construct: function (b, e, c, a, d) { + this.moveShapes = b; + this.selectedShapes = a; + this.offset = e; + this.plugin = d; + this.newParents = b.collect(function (f) { + return c || f.parent + }); + this.oldParents = b.collect(function (f) { + return f.parent + }); + this.dockedNodes = b.findAll(function (f) { + return f instanceof ORYX.Core.Node && f.dockers.length == 1 + }).collect(function (f) { + return { + docker: f.dockers[0], + dockedShape: f.dockers[0].getDockedShape(), + refPoint: f.dockers[0].referencePoint + } + }) + }, execute: function () { + this.dockAllShapes(); + this.move(this.offset); + this.addShapeToParent(this.newParents); + this.selectCurrentShapes(); + this.plugin.facade.getCanvas().update(); + this.plugin.facade.updateSelection() + }, rollback: function () { + var a = {x: -this.offset.x, y: -this.offset.y}; + this.move(a); + this.addShapeToParent(this.oldParents); + this.dockAllShapes(true); + this.selectCurrentShapes(); + this.plugin.facade.getCanvas().update(); + this.plugin.facade.updateSelection() + }, move: function (d, a) { + for (var g = 0; g < this.moveShapes.length; g++) { + var l = this.moveShapes[g]; + l.bounds.moveBy(d); + if (l instanceof ORYX.Core.Node) { + (l.dockers || []).each(function (k) { + k.bounds.moveBy(d) + }); + var e = [].concat(l.getIncomingShapes()).concat(l.getOutgoingShapes()).findAll(function (k) { + return k instanceof ORYX.Core.Edge && !this.moveShapes.any(function (m) { + return m == k || (m instanceof ORYX.Core.Controls.Docker && m.parent == k) + }) + }.bind(this)).findAll(function (k) { + return (k.dockers.first().getDockedShape() == l || !this.moveShapes.include(k.dockers.first().getDockedShape())) && (k.dockers.last().getDockedShape() == l || !this.moveShapes.include(k.dockers.last().getDockedShape())) + }.bind(this)); + this.plugin.layoutEdges(l, e, d); + var h = [].concat(l.getIncomingShapes()).concat(l.getOutgoingShapes()).findAll(function (k) { + return k instanceof ORYX.Core.Edge && k.dockers.first().isDocked() && k.dockers.last().isDocked() && !this.moveShapes.include(k) && !this.moveShapes.any(function (m) { + return m == k || (m instanceof ORYX.Core.Controls.Docker && m.parent == k) + }) + }.bind(this)).findAll(function (k) { + return this.moveShapes.indexOf(k.dockers.first().getDockedShape()) > g || this.moveShapes.indexOf(k.dockers.last().getDockedShape()) > g + }.bind(this)); + for (var f = 0; f < h.length; f++) { + for (var b = 1; b < h[f].dockers.length - 1; b++) { + var c = h[f].dockers[b]; + if (!c.getDockedShape() && !this.moveShapes.include(c)) { + c.bounds.moveBy(d) + } + } + } + } + } + }, dockAllShapes: function (a) { + for (var b = 0; b < this.dockedNodes.length; b++) { + var c = this.dockedNodes[b].docker; + c.setDockedShape(a ? this.dockedNodes[b].dockedShape : undefined); + if (c.getDockedShape()) { + c.setReferencePoint(this.dockedNodes[b].refPoint) + } + } + }, addShapeToParent: function (e) { + for (var f = 0; f < this.moveShapes.length; f++) { + var d = this.moveShapes[f]; + if (d instanceof ORYX.Core.Node && d.parent !== e[f]) { + var g = e[f].absoluteXY(); + var h = d.absoluteXY(); + var c = h.x - g.x; + var k = h.y - g.y; + e[f].add(d); + d.getOutgoingShapes((function (b) { + if (b instanceof ORYX.Core.Node && !this.moveShapes.member(b)) { + e[f].add(b) + } + }).bind(this)); + if (d instanceof ORYX.Core.Node && d.dockers.length == 1) { + var a = d.bounds; + c += a.width() / 2; + k += a.height() / 2; + d.dockers.first().bounds.centerMoveTo(c, k) + } else { + d.bounds.moveTo(c, k) + } + } + } + }, selectCurrentShapes: function () { + this.plugin.facade.setSelection(this.selectedShapes) + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.DragDocker = Clazz.extend({ + construct: function (a) { + this.facade = a; + this.VALIDCOLOR = ORYX.CONFIG.SELECTION_VALID_COLOR; + this.INVALIDCOLOR = ORYX.CONFIG.SELECTION_INVALID_COLOR; + this.shapeSelection = undefined; + this.docker = undefined; + this.dockerParent = undefined; + this.dockerSource = undefined; + this.dockerTarget = undefined; + this.lastUIObj = undefined; + this.isStartDocker = undefined; + this.isEndDocker = undefined; + this.undockTreshold = 10; + this.initialDockerPosition = undefined; + this.outerDockerNotMoved = undefined; + this.isValid = false; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DOCKERDRAG, this.handleDockerDrag.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEOVER, this.handleMouseOver.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEOUT, this.handleMouseOut.bind(this)) + }, handleMouseOut: function (b, a) { + if (!this.docker && a instanceof ORYX.Core.Controls.Docker) { + a.hide() + } else { + if (!this.docker && a instanceof ORYX.Core.Edge) { + a.dockers.each(function (c) { + c.hide() + }) + } + } + }, handleMouseOver: function (b, a) { + if (!this.docker && a instanceof ORYX.Core.Controls.Docker) { + a.show() + } else { + if (!this.docker && a instanceof ORYX.Core.Edge) { + a.dockers.each(function (c) { + c.show() + }) + } + } + }, handleDockerDrag: function (b, a) { + this.handleMouseDown(b.uiEvent, a) + }, handleMouseDown: function (g, f) { + if (f instanceof ORYX.Core.Controls.Docker && f.isMovable) { + this.shapeSelection = this.facade.getSelection(); + this.facade.setSelection(); + this.docker = f; + this.initialDockerPosition = this.docker.bounds.center(); + this.outerDockerNotMoved = false; + this.dockerParent = f.parent; + this._commandArg = { + docker: f, + dockedShape: f.getDockedShape(), + refPoint: f.referencePoint || f.bounds.center() + }; + this.docker.show(); + if (f.parent instanceof ORYX.Core.Edge && (f.parent.dockers.first() == f || f.parent.dockers.last() == f)) { + if (f.parent.dockers.first() == f && f.parent.dockers.last().getDockedShape()) { + this.dockerTarget = f.parent.dockers.last().getDockedShape() + } else { + if (f.parent.dockers.last() == f && f.parent.dockers.first().getDockedShape()) { + this.dockerSource = f.parent.dockers.first().getDockedShape() + } + } + } else { + this.dockerSource = undefined; + this.dockerTarget = undefined + } + this.isStartDocker = this.docker.parent.dockers.first() === this.docker; + this.isEndDocker = this.docker.parent.dockers.last() === this.docker; + this.facade.getCanvas().add(this.docker.parent); + this.docker.parent.getLabels().each(function (h) { + h.hide() + }); + var c = this.facade.eventCoordinates(g); + var e = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var a = navigator.userAgent; + if (a.indexOf("MSIE") >= 0) { + var d = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (d !== 100) { + e = d / 100 + } + } + } + if (e !== 1) { + c.x = c.x / e; + c.y = c.y / e + } + if ((!this.isStartDocker && !this.isEndDocker) || !this.docker.isDocked()) { + this.docker.setDockedShape(undefined); + this.docker.bounds.centerMoveTo(c); + this.dockerParent._update() + } else { + this.outerDockerNotMoved = true + } + var b = {movedCallback: this.dockerMoved.bind(this), upCallback: this.dockerMovedFinished.bind(this)}; + this.startEventPos = c; + ORYX.Core.UIEnableDrag(g, f, b) + } + }, dockerMoved: function (u) { + this.outerDockerNotMoved = false; + var m = undefined; + if (this.docker.parent) { + if (this.isStartDocker || this.isEndDocker) { + var p = this.facade.eventCoordinates(u); + var x = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var w = navigator.userAgent; + if (w.indexOf("MSIE") >= 0) { + var a = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (a !== 100) { + x = a / 100 + } + } + } + if (x !== 1) { + p.x = p.x / x; + p.y = p.y / x + } + if (this.docker.isDocked()) { + var c = ORYX.Core.Math.getDistancePointToPoint(p, this.initialDockerPosition); + if (c < this.undockTreshold) { + this.outerDockerNotMoved = true; + return + } + this.docker.setDockedShape(undefined); + this.dockerParent._update() + } + var t = this.facade.getCanvas().getAbstractShapesAtPosition(p); + var s = t.pop(); + if (this.docker.parent === s) { + s = t.pop() + } + if (this.lastUIObj == s) { + } else { + if (s instanceof ORYX.Core.Shape) { + if (this.docker.parent instanceof ORYX.Core.Edge) { + var v = this.getHighestParentBeforeCanvas(s); + if (v instanceof ORYX.Core.Edge && this.docker.parent === v) { + this.isValid = false; + this.dockerParent._update(); + return + } + this.isValid = false; + var b = s, d = s; + while (!this.isValid && b && !(b instanceof ORYX.Core.Canvas)) { + s = b; + this.isValid = this.facade.getRules().canConnect({ + sourceShape: this.dockerSource ? this.dockerSource : (this.isStartDocker ? s : undefined), + edgeShape: this.docker.parent, + targetShape: this.dockerTarget ? this.dockerTarget : (this.isEndDocker ? s : undefined) + }); + b = b.parent + } + if (!this.isValid) { + s = d + } + } else { + this.isValid = this.facade.getRules().canConnect({ + sourceShape: s, + edgeShape: this.docker.parent, + targetShape: this.docker.parent + }) + } + if (this.lastUIObj) { + this.hideMagnets(this.lastUIObj) + } + if (this.isValid) { + this.showMagnets(s) + } + this.showHighlight(s, this.isValid ? this.VALIDCOLOR : this.INVALIDCOLOR); + this.lastUIObj = s + } else { + this.hideHighlight(); + this.lastUIObj ? this.hideMagnets(this.lastUIObj) : null; + this.lastUIObj = undefined; + this.isValid = false + } + } + if (this.lastUIObj && this.isValid && !(u.shiftKey || u.ctrlKey)) { + m = this.lastUIObj.magnets.find(function (A) { + return A.absoluteBounds().isIncluded(p) + }); + if (m) { + this.docker.bounds.centerMoveTo(m.absoluteCenterXY()) + } + } + } + } + if (!(u.shiftKey || u.ctrlKey) && !m) { + var o = ORYX.CONFIG.DOCKER_SNAP_OFFSET; + var k = o + 1; + var g = o + 1; + var z = this.docker.bounds.center(); + if (this.docker.parent) { + this.docker.parent.dockers.each((function (B) { + if (this.docker == B) { + return + } + var A = B.referencePoint ? B.getAbsoluteReferencePoint() : B.bounds.center(); + k = Math.abs(k) > Math.abs(A.x - z.x) ? A.x - z.x : k; + g = Math.abs(g) > Math.abs(A.y - z.y) ? A.y - z.y : g + }).bind(this)); + if (Math.abs(k) < o || Math.abs(g) < o) { + k = Math.abs(k) < o ? k : 0; + g = Math.abs(g) < o ? g : 0; + this.docker.bounds.centerMoveTo(z.x + k, z.y + g) + } else { + var e = this.docker.parent.dockers[Math.max(this.docker.parent.dockers.indexOf(this.docker) - 1, 0)]; + var r = this.docker.parent.dockers[Math.min(this.docker.parent.dockers.indexOf(this.docker) + 1, this.docker.parent.dockers.length - 1)]; + if (e && r && e !== this.docker && r !== this.docker) { + var f = e.bounds.center(); + var h = r.bounds.center(); + var q = this.docker.bounds.center(); + if (ORYX.Core.Math.isPointInLine(q.x, q.y, f.x, f.y, h.x, h.y, 10)) { + var y = (Number(h.y) - Number(f.y)) / (Number(h.x) - Number(f.x)); + var n = ((f.y - (f.x * y)) - (q.y - (q.x * (-Math.pow(y, -1))))) / ((-Math.pow(y, -1)) - y); + var l = (f.y - (f.x * y)) + (y * n); + if (isNaN(n) || isNaN(l)) { + return + } + this.docker.bounds.centerMoveTo(n, l) + } + } + } + } + } + this.dockerParent._update() + }, dockerMovedFinished: function (e) { + this.facade.setSelection(this.shapeSelection); + this.hideHighlight(); + this.dockerParent.getLabels().each(function (g) { + g.show() + }); + if (this.lastUIObj && (this.isStartDocker || this.isEndDocker)) { + if (this.isValid) { + this.docker.setDockedShape(this.lastUIObj); + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_DRAGDOCKER_DOCKED, + docker: this.docker, + parent: this.docker.parent, + target: this.lastUIObj + }) + } + this.hideMagnets(this.lastUIObj) + } + this.docker.hide(); + if (this.outerDockerNotMoved) { + var d = this.facade.eventCoordinates(e); + var a = this.facade.getCanvas().getAbstractShapesAtPosition(d); + var b = a.findAll(function (g) { + return g instanceof ORYX.Core.Node + }); + a = b.length ? b : a; + this.facade.setSelection(a) + } else { + var c = ORYX.Core.Command.extend({ + construct: function (n, h, g, m, l, k) { + this.docker = n; + this.index = n.parent.dockers.indexOf(n); + this.newPosition = h; + this.newDockedShape = m; + this.oldPosition = g; + this.oldDockedShape = l; + this.facade = k; + this.index = n.parent.dockers.indexOf(n); + this.shape = n.parent + }, execute: function () { + if (!this.docker.parent) { + this.docker = this.shape.dockers[this.index] + } + this.dock(this.newDockedShape, this.newPosition); + this.removedDockers = this.shape.removeUnusedDockers(); + this.facade.updateSelection() + }, rollback: function () { + this.dock(this.oldDockedShape, this.oldPosition); + (this.removedDockers || $H({})).each(function (g) { + this.shape.add(g.value, Number(g.key)); + this.shape._update(true) + }.bind(this)); + this.facade.updateSelection() + }, dock: function (g, h) { + this.docker.setDockedShape(undefined); + if (g) { + this.docker.setDockedShape(g); + this.docker.setReferencePoint(h) + } else { + this.docker.bounds.centerMoveTo(h) + } + this.facade.getCanvas().update() + } + }); + if (this.docker.parent) { + var f = new c(this.docker, this.docker.getDockedShape() ? this.docker.referencePoint : this.docker.bounds.center(), this._commandArg.refPoint, this.docker.getDockedShape(), this._commandArg.dockedShape, this.facade); + this.facade.executeCommands([f]) + } + } + this.docker = undefined; + this.dockerParent = undefined; + this.dockerSource = undefined; + this.dockerTarget = undefined; + this.lastUIObj = undefined + }, hideHighlight: function () { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "validDockedShape"}) + }, showHighlight: function (b, a) { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "validDockedShape", + elements: [b], + color: a + }) + }, showMagnets: function (a) { + a.magnets.each(function (b) { + b.show() + }) + }, hideMagnets: function (a) { + a.magnets.each(function (b) { + b.hide() + }) + }, getHighestParentBeforeCanvas: function (a) { + if (!(a instanceof ORYX.Core.Shape)) { + return undefined + } + var b = a.parent; + while (b && !(b.parent instanceof ORYX.Core.Canvas)) { + b = b.parent + } + return b + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.AddDocker = Clazz.extend({ + construct: function (a) { + this.facade = a; + this.enableAdd = false; + this.enableRemove = false; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)) + }, setEnableAdd: function (a) { + this.enableAdd = a; + if (this.enableAdd) { + jQuery("#add-bendpoint-button").addClass("pressed") + } else { + jQuery("#add-bendpoint-button").removeClass("pressed"); + jQuery("#add-bendpoint-button").blur() + } + }, setEnableRemove: function (a) { + this.enableRemove = a; + if (this.enableRemove) { + jQuery("#remove-bendpoint-button").addClass("pressed") + } else { + jQuery("#remove-bendpoint-button").removeClass("pressed"); + jQuery("#remove-bendpoint-button").blur() + } + }, enabledAdd: function (a) { + return this.enableAdd + }, enabledRemove: function () { + return this.enableRemove + }, handleMouseDown: function (b, a) { + if (this.enabledAdd() && a instanceof ORYX.Core.Edge) { + this.newDockerCommand({edge: a, position: this.facade.eventCoordinates(b)}); + this.setEnableAdd(false) + } else { + if (this.enabledRemove() && a instanceof ORYX.Core.Controls.Docker && a.parent instanceof ORYX.Core.Edge) { + this.newDockerCommand({edge: a.parent, docker: a}); + this.setEnableRemove(false) + } + } + document.body.style.cursor = "default" + }, newDockerCommand: function (b) { + if (!b.edge) { + return + } + var a = ORYX.Core.Command.extend({ + construct: function (h, f, e, g, k, d) { + this.addEnabled = h; + this.deleteEnabled = f; + this.edge = e; + this.docker = g; + this.pos = k; + this.facade = d + }, execute: function () { + if (this.addEnabled) { + if (!this.docker) { + this.docker = this.edge.addDocker(this.pos); + this.index = this.edge.dockers.indexOf(this.docker) + } else { + this.edge.add(this.docker, this.index) + } + } else { + if (this.deleteEnabled) { + this.index = this.edge.dockers.indexOf(this.docker); + this.pos = this.docker.bounds.center(); + this.edge.removeDocker(this.docker) + } + } + this.edge.getLabels().invoke("show"); + this.facade.getCanvas().update(); + this.facade.updateSelection() + }, rollback: function () { + if (this.addEnabled) { + if (this.docker instanceof ORYX.Core.Controls.Docker) { + this.edge.removeDocker(this.docker) + } + } else { + if (this.deleteEnabled) { + this.edge.add(this.docker, this.index) + } + } + this.edge.getLabels().invoke("show"); + this.facade.getCanvas().update(); + this.facade.updateSelection() + } + }); + var c = new a(this.enabledAdd(), this.enabledRemove(), b.edge, b.docker, b.position, this.facade); + this.facade.executeCommands([c]) + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.SelectionFrame = Clazz.extend({ + construct: function (a) { + this.facade = a; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_MOUSEDOWN, this.handleMouseDown.bind(this)); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEUP, this.handleMouseUp.bind(this), true); + this.position = {x: 0, y: 0}; + this.size = {width: 0, height: 0}; + this.offsetPosition = {x: 0, y: 0}; + this.moveCallback = undefined; + this.offsetScroll = {x: 0, y: 0}; + this.node = ORYX.Editor.graft("http://www.w3.org/1999/xhtml", $("canvasSection"), ["div", {"class": "Oryx_SelectionFrame"}]); + this.hide() + }, handleMouseDown: function (d, c) { + if (c instanceof ORYX.Core.Canvas) { + var e = c.rootNode.parentNode.parentNode; + var b = this.facade.getCanvas().node.getScreenCTM(); + this.offsetPosition = {x: b.e, y: b.f}; + this.setPos({ + x: Event.pointerX(d) - jQuery("#canvasSection").offset().left, + y: Event.pointerY(d) - jQuery("#canvasSection").offset().top + 5 + }); + this.resize({width: 0, height: 0}); + this.moveCallback = this.handleMouseMove.bind(this); + document.documentElement.addEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.moveCallback, false); + this.offsetScroll = {x: e.scrollLeft, y: e.scrollTop}; + this.show() + } + Event.stop(d) + }, handleMouseUp: function (e) { + if (this.moveCallback) { + this.hide(); + document.documentElement.removeEventListener(ORYX.CONFIG.EVENT_MOUSEMOVE, this.moveCallback, false); + this.moveCallback = undefined; + var g = this.facade.getCanvas().node.getScreenCTM(); + var m = { + x: this.size.width > 0 ? this.position.x : this.position.x + this.size.width, + y: this.size.height > 0 ? this.position.y : this.position.y + this.size.height + }; + var l = {x: m.x + Math.abs(this.size.width), y: m.y + Math.abs(this.size.height)}; + var d = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var f = navigator.userAgent; + if (f.indexOf("MSIE") >= 0) { + var q = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (q !== 100) { + d = q / 100 + } + } + } + if (d === 1) { + m.x = m.x - (g.e - jQuery("#canvasSection").offset().left); + m.y = m.y - (g.f - jQuery("#canvasSection").offset().top); + l.x = l.x - (g.e - jQuery("#canvasSection").offset().left); + l.y = l.y - (g.f - jQuery("#canvasSection").offset().top) + } else { + var n = jQuery("#canvasSection").offset().left; + var o = jQuery("#canvasSection").scrollLeft(); + var k = jQuery("#canvasSection").scrollTop(); + var h = m.e - (n * d); + var p = 0; + if (h > 10) { + p = (h / d) - h + } + m.x = m.x - (g.e - (n * d) + p + ((o * d) - o)); + m.y = m.y - (g.f - (jQuery("#canvasSection").offset().top * d) + ((k * d) - k)); + l.x = l.x - (g.e - (n * d) + p + ((o * d) - o)); + l.y = l.y - (g.f - (jQuery("#canvasSection").offset().top * d) + ((k * d) - k)) + } + m.x /= g.a; + m.y /= g.d; + l.x /= g.a; + l.y /= g.d; + var c = this.facade.getCanvas().getChildShapes(true).findAll(function (b) { + var a = b.absoluteBounds(); + var s = a.upperLeft(); + var r = a.lowerRight(); + if (s.x > m.x && s.y > m.y && r.x < l.x && r.y < l.y) { + return true + } + return false + }); + this.facade.setSelection(c) + } + }, handleMouseMove: function (b) { + var a = { + width: Event.pointerX(b) - this.position.x - jQuery("#canvasSection").offset().left, + height: Event.pointerY(b) - this.position.y - jQuery("#canvasSection").offset().top + 5 + }; + var c = this.facade.getCanvas().rootNode.parentNode.parentNode; + a.width -= this.offsetScroll.x - c.scrollLeft; + a.height -= this.offsetScroll.y - c.scrollTop; + this.resize(a); + Event.stop(b) + }, hide: function () { + this.node.style.display = "none" + }, show: function () { + this.node.style.display = "" + }, setPos: function (a) { + this.node.style.top = a.y + "px"; + this.node.style.left = a.x + "px"; + this.position = a + }, resize: function (a) { + this.setPos(this.position); + this.size = Object.clone(a); + if (a.width < 0) { + this.node.style.left = (this.position.x + a.width) + "px"; + a.width = -a.width + } + if (a.height < 0) { + this.node.style.top = (this.position.y + a.height) + "px"; + a.height = -a.height + } + this.node.style.width = a.width + "px"; + this.node.style.height = a.height + "px" + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.ShapeHighlighting = Clazz.extend({ + construct: function (a) { + this.parentNode = a.getCanvas().getSvgContainer(); + this.node = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.parentNode, ["g"]); + this.highlightNodes = {}; + a.registerOnEvent(ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, this.setHighlight.bind(this)); + a.registerOnEvent(ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, this.hideHighlight.bind(this)) + }, setHighlight: function (a) { + if (a && a.highlightId) { + var b = this.highlightNodes[a.highlightId]; + if (!b) { + b = ORYX.Editor.graft("http://www.w3.org/2000/svg", this.node, ["path", { + "stroke-width": 2, + fill: "none" + }]); + this.highlightNodes[a.highlightId] = b + } + if (a.elements && a.elements.length > 0) { + this.setAttributesByStyle(b, a); + this.show(b) + } else { + this.hide(b) + } + } + }, hideHighlight: function (a) { + if (a && a.highlightId && this.highlightNodes[a.highlightId]) { + this.hide(this.highlightNodes[a.highlightId]) + } + }, hide: function (a) { + a.setAttributeNS(null, "display", "none") + }, show: function (a) { + a.setAttributeNS(null, "display", "") + }, setAttributesByStyle: function (b, a) { + if (a.style && a.style == ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE) { + var d = a.elements[0].absoluteBounds(); + var c = a.strokewidth ? a.strokewidth : ORYX.CONFIG.BORDER_OFFSET; + b.setAttributeNS(null, "d", this.getPathRectangle(d.a, d.b, c)); + b.setAttributeNS(null, "stroke", a.color ? a.color : ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR); + b.setAttributeNS(null, "stroke-opacity", a.opacity ? a.opacity : 0.2); + b.setAttributeNS(null, "stroke-width", c) + } else { + if (a.elements.length == 1 && a.elements[0] instanceof ORYX.Core.Edge && a.highlightId != "selection") { + var e = this.getPathEdge(a.elements[0].dockers); + if (e && e.length > 0) { + b.setAttributeNS(null, "d", e) + } + b.setAttributeNS(null, "stroke", a.color ? a.color : ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR); + b.setAttributeNS(null, "stroke-opacity", a.opacity ? a.opacity : 0.2); + b.setAttributeNS(null, "stroke-width", ORYX.CONFIG.OFFSET_EDGE_BOUNDS) + } else { + var e = this.getPathByElements(a.elements); + if (e && e.length > 0) { + b.setAttributeNS(null, "d", e) + } + b.setAttributeNS(null, "stroke", a.color ? a.color : ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR); + b.setAttributeNS(null, "stroke-opacity", a.opacity ? a.opacity : 1); + b.setAttributeNS(null, "stroke-width", a.strokewidth ? a.strokewidth : 2) + } + } + }, getPathByElements: function (a) { + if (!a || a.length <= 0) { + return undefined + } + var c = ORYX.CONFIG.SELECTED_AREA_PADDING; + var b = ""; + a.each((function (f) { + if (!f) { + return + } + var g = f.absoluteBounds(); + g.widen(c); + var e = g.upperLeft(); + var d = g.lowerRight(); + b = b + this.getPath(e, d) + }).bind(this)); + return b + }, getPath: function (d, c) { + return this.getPathCorners(d, c) + }, getPathCorners: function (d, c) { + var e = ORYX.CONFIG.SELECTION_HIGHLIGHT_SIZE; + var f = ""; + f = f + "M" + d.x + " " + (d.y + e) + " l0 -" + e + " l" + e + " 0 "; + f = f + "M" + d.x + " " + (c.y - e) + " l0 " + e + " l" + e + " 0 "; + f = f + "M" + c.x + " " + (c.y - e) + " l0 " + e + " l-" + e + " 0 "; + f = f + "M" + c.x + " " + (d.y + e) + " l0 -" + e + " l-" + e + " 0 "; + return f + }, getPathRectangle: function (d, c, h) { + var e = ORYX.CONFIG.SELECTION_HIGHLIGHT_SIZE; + var f = ""; + var g = h / 2; + f = f + "M" + (d.x + g) + " " + (d.y); + f = f + " L" + (d.x + g) + " " + (c.y - g); + f = f + " L" + (c.x - g) + " " + (c.y - g); + f = f + " L" + (c.x - g) + " " + (d.y + g); + f = f + " L" + (d.x + g) + " " + (d.y + g); + return f + }, getPathEdge: function (a) { + var b = a.length; + var c = "M" + a[0].bounds.center().x + " " + a[0].bounds.center().y; + for (i = 1; i < b; i++) { + var d = a[i].bounds.center(); + c = c + " L" + d.x + " " + d.y + } + return c + } +}); +ORYX.Plugins.HighlightingSelectedShapes = Clazz.extend({ + construct: function (a) { + this.facade = a; + this.opacityFull = 0.9; + this.opacityLow = 0.4 + }, onSelectionChanged: function (a) { + if (a.elements && a.elements.length > 1) { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "selection", + elements: a.elements.without(a.subSelection), + color: ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR, + opacity: !a.subSelection ? this.opacityFull : this.opacityLow + }); + if (a.subSelection) { + this.facade.raiseEvent({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "subselection", + elements: [a.subSelection], + color: ORYX.CONFIG.SELECTION_HIGHLIGHT_COLOR, + opacity: this.opacityFull + }) + } else { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "subselection"}) + } + } else { + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "selection"}); + this.facade.raiseEvent({type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, highlightId: "subselection"}) + } + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.Overlay = Clazz.extend({ + facade: undefined, styleNode: undefined, construct: function (a) { + this.facade = a; + this.changes = []; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_OVERLAY_SHOW, this.show.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_OVERLAY_HIDE, this.hide.bind(this)); + this.styleNode = document.createElement("style"); + this.styleNode.setAttributeNS(null, "type", "text/css"); + document.getElementsByTagName("head")[0].appendChild(this.styleNode) + }, show: function (a) { + if (!a || !a.shapes || !a.shapes instanceof Array || !a.id || !a.id instanceof String || a.id.length == 0) { + return + } + if (a.attributes) { + a.shapes.each(function (d) { + if (!d instanceof ORYX.Core.Shape) { + return + } + this.setAttributes(d.node, a.attributes) + }.bind(this)) + } + var c = true; + try { + c = a.node && a.node instanceof SVGElement + } catch (b) {var abcdef=1 + } + if (a.node && c) { + a._temps = []; + a.shapes.each(function (g, f) { + if (!g instanceof ORYX.Core.Shape) { + return + } + var e = {}; + e.svg = a.dontCloneNode ? a.node : a.node.cloneNode(true); + g.node.firstChild.appendChild(e.svg); + if (g instanceof ORYX.Core.Edge && !a.nodePosition) { + a.nodePosition = "START" + } + if (a.nodePosition) { + var d = g.bounds; + var h = a.nodePosition.toUpperCase(); + if (g instanceof ORYX.Core.Node && h == "START") { + h = "NW" + } else { + if (g instanceof ORYX.Core.Node && h == "END") { + h = "SE" + } else { + if (g instanceof ORYX.Core.Edge && h == "START") { + d = g.getDockers().first().bounds + } else { + if (g instanceof ORYX.Core.Edge && h == "END") { + d = g.getDockers().last().bounds + } + } + } + } + e.callback = function () { + var k = 0; + var l = 0; + if (h == "NW") { + } else { + if (h == "N") { + k = d.width() / 2 + } else { + if (h == "NE") { + k = d.width() + } else { + if (h == "E") { + k = d.width(); + l = d.height() / 2 + } else { + if (h == "SE") { + k = d.width(); + l = d.height() + } else { + if (h == "S") { + k = d.width() / 2; + l = d.height() + } else { + if (h == "SW") { + l = d.height() + } else { + if (h == "W") { + l = d.height() / 2 + } else { + if (h == "START" || h == "END") { + k = d.width() / 2; + l = d.height() / 2 + } else { + return + } + } + } + } + } + } + } + } + } + if (g instanceof ORYX.Core.Edge) { + k += d.upperLeft().x; + l += d.upperLeft().y + } + e.svg.setAttributeNS(null, "transform", "translate(" + k + ", " + l + ")") + }.bind(this); + e.element = g; + e.callback(); + d.registerCallback(e.callback) + } + a._temps.push(e) + }.bind(this)) + } + if (!this.changes[a.id]) { + this.changes[a.id] = [] + } + this.changes[a.id].push(a) + }, hide: function (a) { + if (!a || !a.id || !a.id instanceof String || a.id.length == 0 || !this.changes[a.id]) { + return + } + this.changes[a.id].each(function (b) { + b.shapes.each(function (d, c) { + if (!d instanceof ORYX.Core.Shape) { + return + } + this.deleteAttributes(d.node) + }.bind(this)); + if (b._temps) { + b._temps.each(function (c) { + if (c.svg && c.svg.parentNode) { + c.svg.parentNode.removeChild(c.svg) + } + if (c.callback && c.element) { + c.element.bounds.unregisterCallback(c.callback) + } + }.bind(this)) + } + }.bind(this)); + this.changes[a.id] = null + }, setAttributes: function (c, d) { + var h = this.getAllChilds(c.firstChild.firstChild); + var a = []; + h.each(function (m) { + a.push($A(m.attributes).findAll(function (n) { + return n.nodeValue.startsWith("url(#") + })) + }); + a = a.flatten().compact(); + a = a.collect(function (m) { + return m.nodeValue + }).uniq(); + a = a.collect(function (m) { + return m.slice(5, m.length - 1) + }); + a.unshift(c.id + " .me"); + var g = $H(d); + var e = g.toJSON().gsub(",", ";").gsub('"', ""); + var k = d.stroke ? e.slice(0, e.length - 1) + "; fill:" + d.stroke + ";}" : e; + var f; + if (d.fill) { + var b = Object.clone(d); + b.fill = "black"; + f = $H(b).toJSON().gsub(",", ";").gsub('"', "") + } + csstags = a.collect(function (n, m) { + return "#" + n + " * " + (!m ? e : k) + "" + (f ? " #" + n + " text * " + f : "") + }); + var l = csstags.join(" ") + "\n"; + this.styleNode.appendChild(document.createTextNode(l)) + }, deleteAttributes: function (b) { + var a = $A(this.styleNode.childNodes).findAll(function (c) { + return c.textContent.include("#" + b.id) + }); + a.each(function (c) { + c.parentNode.removeChild(c) + }) + }, getAllChilds: function (a) { + var b = $A(a.childNodes); + $A(a.childNodes).each(function (c) { + b.push(this.getAllChilds(c)) + }.bind(this)); + return b.flatten() + } +}); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +ORYX.Plugins.KeysMove = ORYX.Plugins.AbstractPlugin.extend({ + facade: undefined, construct: function (a) { + this.facade = a; + this.copyElements = []; + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: 65, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], functionality: this.selectAll.bind(this) + }); + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_LEFT, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_LEFT, false) + }); + this.facade.offer({ + keyCodes: [{keyCode: ORYX.CONFIG.KEY_CODE_LEFT, keyAction: ORYX.CONFIG.KEY_ACTION_DOWN}], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_LEFT, true) + }); + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_RIGHT, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_RIGHT, false) + }); + this.facade.offer({ + keyCodes: [{keyCode: ORYX.CONFIG.KEY_CODE_RIGHT, keyAction: ORYX.CONFIG.KEY_ACTION_DOWN}], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_RIGHT, true) + }); + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_UP, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_UP, false) + }); + this.facade.offer({ + keyCodes: [{keyCode: ORYX.CONFIG.KEY_CODE_UP, keyAction: ORYX.CONFIG.KEY_ACTION_DOWN}], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_UP, true) + }); + this.facade.offer({ + keyCodes: [{ + metaKeys: [ORYX.CONFIG.META_KEY_META_CTRL], + keyCode: ORYX.CONFIG.KEY_CODE_DOWN, + keyAction: ORYX.CONFIG.KEY_ACTION_DOWN + }], functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_DOWN, false) + }); + this.facade.offer({ + keyCodes: [{keyCode: ORYX.CONFIG.KEY_CODE_DOWN, keyAction: ORYX.CONFIG.KEY_ACTION_DOWN}], + functionality: this.move.bind(this, ORYX.CONFIG.KEY_CODE_DOWN, true) + }) + }, selectAll: function (a) { + Event.stop(a.event); + this.facade.setSelection(this.facade.getCanvas().getChildShapes(true)) + }, move: function (n, k, l) { + Event.stop(l.event); + var b = k ? 20 : 5; + var m = this.facade.getSelection(); + var g = this.facade.getSelection(); + var c = {x: 0, y: 0}; + switch (n) { + case ORYX.CONFIG.KEY_CODE_LEFT: + c.x = -1 * b; + break; + case ORYX.CONFIG.KEY_CODE_RIGHT: + c.x = b; + break; + case ORYX.CONFIG.KEY_CODE_UP: + c.y = -1 * b; + break; + case ORYX.CONFIG.KEY_CODE_DOWN: + c.y = b; + break + } + m = m.findAll(function (e) { + if (e instanceof ORYX.Core.Node && e.dockers.length == 1 && m.include(e.dockers.first().getDockedShape())) { + return false + } + var o = e.parent; + do { + if (m.include(o)) { + return false + } + } while (o = o.parent); + return true + }); + var f = true; + var h = m.all(function (e) { + if (e instanceof ORYX.Core.Edge) { + if (e.isDocked()) { + f = false + } + return true + } + return false + }); + if (h && !f) { + return + } + m = m.map(function (o) { + if (o instanceof ORYX.Core.Node) { + return o + } else { + if (o instanceof ORYX.Core.Edge) { + var e = o.dockers; + if (m.include(o.dockers.first().getDockedShape())) { + e = e.without(o.dockers.first()) + } + if (m.include(o.dockers.last().getDockedShape())) { + e = e.without(o.dockers.last()) + } + return e + } else { + return null + } + } + }).flatten().compact(); + if (m.size() > 0) { + var a = [this.facade.getCanvas().bounds.lowerRight().x, this.facade.getCanvas().bounds.lowerRight().y, 0, 0]; + m.each(function (e) { + a[0] = Math.min(a[0], e.bounds.upperLeft().x); + a[1] = Math.min(a[1], e.bounds.upperLeft().y); + a[2] = Math.max(a[2], e.bounds.lowerRight().x); + a[3] = Math.max(a[3], e.bounds.lowerRight().y) + }); + if (a[0] + c.x < 0) { + c.x = -a[0] + } + if (a[1] + c.y < 0) { + c.y = -a[1] + } + if (a[2] + c.x > this.facade.getCanvas().bounds.lowerRight().x) { + c.x = this.facade.getCanvas().bounds.lowerRight().x - a[2] + } + if (a[3] + c.y > this.facade.getCanvas().bounds.lowerRight().y) { + c.y = this.facade.getCanvas().bounds.lowerRight().y - a[3] + } + if (c.x != 0 || c.y != 0) { + var d = [new ORYX.Core.Command.Move(m, c, null, g, this)]; + this.facade.executeCommands(d) + } + } + }, getUndockedCommant: function (b) { + var a = ORYX.Core.Command.extend({ + construct: function (c) { + this.dockers = c.collect(function (d) { + return d instanceof ORYX.Core.Controls.Docker ? { + docker: d, + dockedShape: d.getDockedShape(), + refPoint: d.referencePoint + } : undefined + }).compact() + }, execute: function () { + this.dockers.each(function (c) { + c.docker.setDockedShape(undefined) + }) + }, rollback: function () { + this.dockers.each(function (c) { + c.docker.setDockedShape(c.dockedShape); + c.docker.setReferencePoint(c.refPoint) + }) + } + }); + command = new a(b); + command.execute(); + return command + }, +}); +if (!ORYX.Plugins) { + ORYX.Plugins = {} +} +if (!ORYX.Plugins.Layouter) { + ORYX.Plugins.Layouter = {} +} +new function () { + ORYX.Plugins.Layouter.EdgeLayouter = ORYX.Plugins.AbstractLayouter.extend({ + layouted: ["http://b3mn.org/stencilset/bpmn1.1#SequenceFlow", "http://b3mn.org/stencilset/bpmn1.1#MessageFlow", "http://b3mn.org/stencilset/timjpdl3#SequenceFlow", "http://b3mn.org/stencilset/jbpm4#SequenceFlow", "http://b3mn.org/stencilset/bpmn2.0#MessageFlow", "http://b3mn.org/stencilset/bpmn2.0#SequenceFlow", "http://b3mn.org/stencilset/bpmn2.0choreography#MessageFlow", "http://b3mn.org/stencilset/bpmn2.0choreography#SequenceFlow", "http://b3mn.org/stencilset/bpmn2.0conversation#ConversationLink", "http://b3mn.org/stencilset/epc#ControlFlow", "http://www.signavio.com/stencilsets/processmap#ProcessLink", "http://www.signavio.com/stencilsets/organigram#connection"], + layout: function (a) { + a.each(function (b) { + this.doLayout(b) + }.bind(this)) + }, + doLayout: function (b) { + var d = b.getIncomingNodes()[0]; + var c = b.getOutgoingNodes()[0]; + if (!d || !c) { + return + } + var a = this.getPositions(d, c, b); + if (a.length > 0) { + this.setDockers(b, a[0].a, a[0].b) + } + }, + getPositions: function (r, s, e) { + var u = r.absoluteBounds(); + var n = s.absoluteBounds(); + var q = u.center(); + var o = n.center(); + var l = u.midPoint(); + var d = n.midPoint(); + var k = Object.clone(e.dockers.first().referencePoint); + var t = Object.clone(e.dockers.last().referencePoint); + var c = e.dockers.first().getAbsoluteReferencePoint(); + var p = e.dockers.last().getAbsoluteReferencePoint(); + if (Math.abs(c.x - p.x) < 1 || Math.abs(c.y - p.y) < 1) { + return [] + } + var g = {}; + g.x = q.x < o.x ? (((o.x - n.width() / 2) - (q.x + u.width() / 2)) / 2) + (q.x + u.width() / 2) : (((q.x - u.width() / 2) - (o.x + n.width() / 2)) / 2) + (o.x + n.width() / 2); + g.y = q.y < o.y ? (((o.y - n.height() / 2) - (q.y + u.height() / 2)) / 2) + (q.y + u.height() / 2) : (((q.y - u.height() / 2) - (o.y + n.height() / 2)) / 2) + (o.y + n.height() / 2); + u.widen(5); + n.widen(20); + var h = []; + var f = this.getOffset.bind(this); + if (!u.isIncluded(o.x, q.y) && !n.isIncluded(o.x, q.y)) { + h.push({ + a: {x: o.x + f(t, d, "x"), y: q.y + f(k, l, "y")}, + z: this.getWeight(r, q.x < o.x ? "r" : "l", s, q.y < o.y ? "t" : "b", e) + }) + } + if (!u.isIncluded(q.x, o.y) && !n.isIncluded(q.x, o.y)) { + h.push({ + a: {x: q.x + f(k, l, "x"), y: o.y + f(t, d, "y")}, + z: this.getWeight(r, q.y < o.y ? "b" : "t", s, q.x < o.x ? "l" : "r", e) + }) + } + if (!u.isIncluded(g.x, q.y) && !n.isIncluded(g.x, o.y)) { + h.push({ + a: {x: g.x, y: q.y + f(k, l, "y")}, + b: {x: g.x, y: o.y + f(t, d, "y")}, + z: this.getWeight(r, "r", s, "l", e, q.x > o.x) + }) + } + if (!u.isIncluded(q.x, g.y) && !n.isIncluded(o.x, g.y)) { + h.push({ + a: {x: q.x + f(k, l, "x"), y: g.y}, + b: {x: o.x + f(t, d, "x"), y: g.y}, + z: this.getWeight(r, "b", s, "t", e, q.y > o.y) + }) + } + return h.sort(function (v, m) { + return v.z < m.z ? 1 : (v.z == m.z ? -1 : -1) + }) + }, + getOffset: function (c, b, a) { + return c[a] - b[a] + }, + getWeight: function (m, b, n, a, d, g) { + b = (b || "").toLowerCase(); + a = (a || "").toLowerCase(); + if (!["t", "r", "b", "l"].include(b)) { + b = "r" + } + if (!["t", "r", "b", "l"].include(a)) { + b = "l" + } + if (g) { + b = b == "t" ? "b" : (b == "r" ? "l" : (b == "b" ? "t" : (b == "l" ? "r" : "r"))); + a = a == "t" ? "b" : (a == "r" ? "l" : (a == "b" ? "t" : (a == "l" ? "r" : "r"))) + } + var f = 0; + var p = this.facade.getRules().getLayoutingRules(m, d)["out"]; + var o = this.facade.getRules().getLayoutingRules(n, d)["in"]; + var e = p[b]; + var c = o[a]; + var l = function (s, r, q) { + switch (s) { + case"t": + return Math.abs(r.x - q.x) < 2 && r.y < q.y; + case"r": + return r.x > q.x && Math.abs(r.y - q.y) < 2; + case"b": + return Math.abs(r.x - q.x) < 2 && r.y > q.y; + case"l": + return r.x < q.x && Math.abs(r.y - q.y) < 2; + default: + return false + } + }; + var k = m.getIncomingShapes().findAll(function (q) { + return q instanceof ORYX.Core.Edge + }).any(function (q) { + return l(b, q.dockers[q.dockers.length - 2].bounds.center(), q.dockers.last().bounds.center()) + }); + var h = n.getOutgoingShapes().findAll(function (q) { + return q instanceof ORYX.Core.Edge + }).any(function (q) { + return l(a, q.dockers[1].bounds.center(), q.dockers.first().bounds.center()) + }); + return (k || h ? 0 : e + c) + }, + setDockers: function (e, d, c) { + if (!e) { + return + } + e.dockers.each(function (a) { + e.removeDocker(a) + }); + [d, c].compact().each(function (b) { + var a = e.createDocker(undefined, b); + a.bounds.centerMoveTo(b) + }); + e.dockers.each(function (a) { + a.update() + }); + e._update(true) + } + }) +}(); +if (!ORYX.Plugins) { + ORYX.Plugins = new Object() +} +new function () { + ORYX.Plugins.BPMN2_0 = { + construct: function (b) { + this.facade = b; + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_DRAGDOCKER_DOCKED, this.handleDockerDocked.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_PROPWINDOW_PROP_CHANGED, this.handlePropertyChanged.bind(this)); + this.facade.registerOnEvent("layout.bpmn2_0.pool", this.handleLayoutPool.bind(this)); + this.facade.registerOnEvent("layout.bpmn2_0.subprocess", this.handleSubProcess.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_SHAPEREMOVED, this.handleShapeRemove.bind(this)); + this.facade.registerOnEvent(ORYX.CONFIG.EVENT_LOADED, this.afterLoad.bind(this)); + this.namespace = undefined + }, + afterLoad: function () { + this.facade.getCanvas().getChildNodes().each(function (b) { + if (b.getStencil().id().endsWith("Pool")) { + this.handleLayoutPool({shape: b}) + } + }.bind(this)) + }, + onSelectionChanged: function (h) { + var f = h.elements; + if (f && f.length === 1) { + var e = this.getNamespace(); + var b = f[0]; + if (b.getStencil().idWithoutNs() === "Pool") { + if (b.getChildNodes().length === 0) { + var d = { + type: e + "Lane", + position: {x: 0, y: 0}, + namespace: b.getStencil().namespace(), + parent: b + }; + this.facade.createShape(d); + this.facade.getCanvas().update(); + this.facade.setSelection([b]) + } + } + } + if (f.any(function (l) { + return l instanceof ORYX.Core.Node && l.getStencil().id().endsWith("Lane") + })) { + var c = f.findAll(function (l) { + return l instanceof ORYX.Core.Node && l.getStencil().id().endsWith("Lane") + }); + var g = []; + var k = []; + c.each(function (l) { + g.push(this.getParentPool(l)) + }.bind(this)); + g = g.uniq().findAll(function (l) { + var m = this.getLanes(l, true); + if (m.all(function (n) { + return c.include(n) + })) { + k = k.concat(m); + return true + } else { + if (f.include(l) && m.any(function (n) { + return c.include(n) + })) { + k = k.concat(m); + return true + } else { + return false + } + } + }.bind(this)); + if (k.length > 0 && g.length > 0) { + f = f.without.apply(f, k); + f = f.concat(g); + this.facade.setSelection(f.uniq()) + } + } + }, + handleShapeRemove: function (e) { + var f = e.shape; + var l = e.parent; + if (f instanceof ORYX.Core.Node && f.getStencil().idWithoutNs() === "Lane" && this.facade.isExecutingCommands()) { + var g = this.getParentPool(l); + if (g && g.parent) { + var h = function (m) { + return !m.getChildNodes().any(function (n) { + return n.getStencil().idWithoutNs() === "Lane" + }) + }; + var c = h(f); + var k = l.getChildNodes().any(function (m) { + return m.getStencil().idWithoutNs() === "Lane" + }); + if (c && k) { + var d = new a(f, l, g, this); + this.facade.executeCommands([d]) + } else { + if (!c && !this.facade.getSelection().any(function (m) { + return m instanceof ORYX.Core.Node && m.getStencil().idWithoutNs() === "Lane" && m.isParent(f) && h(m) + })) { + var b = ORYX.Core.Command.extend({ + construct: function (m, n) { + this.children = m.getChildNodes(true); + this.facade = n + }, execute: function () { + this.children.each(function (m) { + m.bounds.moveBy(30, 0) + }) + }, rollback: function () { + this.children.each(function (m) { + m.bounds.moveBy(-30, 0) + }) + } + }); + this.facade.executeCommands([new b(f, this.facade)]) + } else { + if (c && !k && l == g) { + l.add(f) + } + } + } + } + } + }, + hashedSubProcesses: {}, + hashChildShapes: function (b) { + var c = b.getChildNodes(); + c.each(function (d) { + if (this.hashedSubProcesses[d.id]) { + this.hashedSubProcesses[d.id] = d.absoluteXY(); + this.hashedSubProcesses[d.id].width = d.bounds.width(); + this.hashedSubProcesses[d.id].height = d.bounds.height(); + this.hashChildShapes(d) + } + }.bind(this)) + }, + handleSubProcess: function (d) { + var c = d.shape; + if (!this.hashedSubProcesses[c.id]) { + this.hashedSubProcesses[c.id] = c.absoluteXY(); + this.hashedSubProcesses[c.id].width = c.bounds.width(); + this.hashedSubProcesses[c.id].height = c.bounds.height(); + return + } + var e = c.absoluteXY(); + e.x -= this.hashedSubProcesses[c.id].x; + e.y -= this.hashedSubProcesses[c.id].y; + var b = this.hashedSubProcesses[c.id].width !== c.bounds.width() || this.hashedSubProcesses[c.id].height !== c.bounds.height(); + this.hashedSubProcesses[c.id] = c.absoluteXY(); + this.hashedSubProcesses[c.id].width = c.bounds.width(); + this.hashedSubProcesses[c.id].height = c.bounds.height(); + this.hashChildShapes(c); + if (this.facade.isExecutingCommands() && !b) { + this.moveChildDockers(c, e) + } + }, + moveChildDockers: function (d, g) { + if (!g.x && !g.y) { + return + } + var e = d.getChildNodes(true); + var c = e.map(function (h) { + return [].concat(h.getIncomingShapes()).concat(h.getOutgoingShapes()) + }).flatten().uniq().map(function (h) { + return h.dockers.length > 2 ? h.dockers.slice(1, h.dockers.length - 1) : [] + }).flatten(); + var b = d.absoluteBounds(); + b.moveBy(-g.x, -g.y); + var f = {}; + c.each(function (m) { + if (m.isChanged) { + return + } + var k = Object.clone(g); + if (!b.isIncluded(m.bounds.center())) { + var o = m.parent.dockers.indexOf(m); + var s = m.parent.dockers.length; + var q = m.parent.getSource(); + var r = m.parent.getTarget(); + var l = e.include(q) && e.include(r); + if (!l) { + var n = o !== 0 ? b.isIncluded(m.parent.dockers[o - 1].bounds.center()) : false; + var p = o !== s - 1 ? b.isIncluded(m.parent.dockers[o + 1].bounds.center()) : false; + if (!n && !p) { + return + } + var h = m.parent.dockers[n ? o - 1 : o + 1]; + if (Math.abs(-Math.abs(h.bounds.center().x - m.bounds.center().x)) < 2) { + k.y = 0 + } else { + if (Math.abs(-Math.abs(h.bounds.center().y - m.bounds.center().y)) < 2) { + k.x = 0 + } else { + return + } + } + } + } + f[m.getId()] = {docker: m, offset: k} + }); + this.facade.executeCommands([new ORYX.Core.MoveDockersCommand(f)]) + }, + handleDockerDocked: function (d) { + var e = this.getNamespace(); + var f = d.parent; + var c = d.target; + if (f.getStencil().id() === e + "SequenceFlow") { + var b = c.getStencil().groups().find(function (g) { + if (g == "Gateways") { + return g + } + }); + if (!b && (f.properties["oryx-conditiontype"] == "Expression")) { + f.setProperty("oryx-showdiamondmarker", true) + } else { + f.setProperty("oryx-showdiamondmarker", false) + } + this.facade.getCanvas().update() + } + }, + handlePropertyChanged: function (e) { + var d = this.getNamespace(); + var c = e.elements; + var f = e.key; + var b = e.value; + var g = false; + c.each(function (k) { + if ((k.getStencil().id() === d + "SequenceFlow") && (f === "oryx-conditiontype")) { + if (b != "Expression") { + k.setProperty("oryx-showdiamondmarker", false) + } else { + var l = k.getIncomingShapes(); + if (!l) { + k.setProperty("oryx-showdiamondmarker", true) + } + var h = l.find(function (m) { + var n = m.getStencil().groups().find(function (o) { + if (o == "Gateways") { + return o + } + }); + if (n) { + return n + } + }); + if (!h) { + k.setProperty("oryx-showdiamondmarker", true) + } else { + k.setProperty("oryx-showdiamondmarker", false) + } + } + g = true + } + }.bind(this)); + if (g) { + this.facade.getCanvas().update() + } + }, + hashedPoolPositions: {}, + hashedLaneDepth: {}, + hashedBounds: {}, + hashedPositions: {}, + handleLayoutPool: function (u) { + var o = u.shape; + var F = this.facade.getSelection(); + var w = F.include(o) ? o : F.first(); + w = w || o; + this.currentPool = o; + if (!(w.getStencil().id().endsWith("Pool") || w.getStencil().id().endsWith("Lane"))) { + return + } + if (w !== o && !w.isParent(o) && !this.hashedBounds[o.id][w.id]) { + return + } + if (!this.hashedBounds[o.id]) { + this.hashedBounds[o.id] = {} + } + var A = this.getLanes(o); + if (A.length <= 0) { + return + } + var z = this.getLanes(o, true), b; + var g = z.clone(); + var k = $H({}); + z.each(function (x) { + k[x.id] = x.bounds.upperLeft() + }); + if (A.length === 1 && this.getLanes(A.first()).length <= 0) { + A.first().setProperty("oryx-showcaption", A.first().properties["oryx-name"].trim().length > 0); + var d = A.first().node.getElementsByTagName("rect"); + d[0].setAttributeNS(null, "display", "none") + } else { + z.invoke("setProperty", "oryx-showcaption", true); + z.each(function (x) { + var y = x.node.getElementsByTagName("rect"); + y[0].removeAttributeNS(null, "display") + }) + } + var t = []; + var n = []; + var v = -1; + while (++v < z.length) { + if (!this.hashedBounds[o.id][z[v].id]) { + n.push(z[v]) + } + } + if (n.length > 0) { + w = n.first() + } + var C = $H(this.hashedBounds[o.id]).keys(); + var v = -1; + while (++v < C.length) { + if (!z.any(function (x) { + return x.id == C[v] + })) { + t.push(this.hashedBounds[o.id][C[v]]); + F = F.without(function (x) { + return x.id == C[v] + }) + } + } + var q, s, m, l; + if (t.length > 0 || n.length > 0) { + if (n.length === 1 && this.getLanes(n[0].parent).length === 1) { + q = this.adjustHeight(A, n[0].parent) + } else { + q = this.updateHeight(o) + } + s = this.adjustWidth(A, o.bounds.width()); + o.update() + } else { + if (o == w) { + if (F.length === 1 && this.isResized(o, this.hashedPoolPositions[o.id])) { + var B = this.hashedPoolPositions[o.id].upperLeft(); + var f = o.bounds.upperLeft(); + var E = 0; + if (this.shouldScale(o)) { + var c = this.hashedPoolPositions[o.id]; + E = c.height() / o.bounds.height() + } + this.adjustLanes(o, z, B.x - f.x, B.y - f.y, E) + } + q = this.adjustHeight(A, undefined, o.bounds.height()); + s = this.adjustWidth(A, o.bounds.width()) + } else { + if (F.length === 1 && this.isResized(w, this.hashedBounds[o.id][w.id])) { + var B = this.hashedBounds[o.id][w.id].upperLeft(); + var f = w.absoluteXY(); + m = B.x - f.x; + l = B.y - f.y; + if (m || l) { + g = g.without(w); + this.adjustLanes(o, this.getAllExcludedLanes(o, w), m, 0) + } + var h = this.getLanes(w, true); + if (h.length > 0) { + if (this.shouldScale(w)) { + var c = this.hashedBounds[o.id][w.id]; + var E = c.height() / w.bounds.height(); + this.adjustLanes(o, h, m, l, E) + } else { + this.adjustLanes(o, h, m, l, 0) + } + } + } + var D = z.map(function (x) { + return {shape: x, bounds: x.bounds.clone()} + }); + q = this.adjustHeight(A, w); + this.checkForChanges(z, D); + s = this.adjustWidth(A, w.bounds.width() + (this.getDepth(w, o) * 30)) + } + } + this.setDimensions(o, s, q, m, l); + if (this.facade.isExecutingCommands() && (t.length === 0 || n.length !== 0)) { + this.updateDockers(g, o); + if (this.hashedPositions[o.id] && this.hashedPositions[o.id].keys().any(function (y, x) { + return (z[x] || {}).id !== y + })) { + var r = ORYX.Core.Command.extend({ + construct: function (H, G, y, I, x) { + this.originPosition = Object.clone(H); + this.newPosition = Object.clone(G); + this.lanes = y; + this.plugin = I; + this.pool = x + }, execute: function () { + if (!this.executed) { + this.executed = true; + this.lanes.each(function (x) { + if (this.newPosition[x.id]) { + x.bounds.moveTo(this.newPosition[x.id]) + } + }.bind(this)); + this.plugin.hashedPositions[this.pool] = Object.clone(this.newPosition) + } + }, rollback: function () { + this.lanes.each(function (x) { + if (this.originPosition[x.id]) { + x.bounds.moveTo(this.originPosition[x.id]) + } + }.bind(this)); + this.plugin.hashedPositions[this.pool] = Object.clone(this.originPosition) + } + }); + var p = $H({}); + z.each(function (x) { + p[x.id] = x.bounds.upperLeft() + }); + var e = new r(k, p, z, this, o.id); + this.facade.executeCommands([e]) + } + } + this.hashedBounds[o.id] = {}; + this.hashedPositions[o.id] = k; + var v = -1; + while (++v < z.length) { + this.hashedBounds[o.id][z[v].id] = z[v].absoluteBounds(); + this.hashChildShapes(z[v]); + this.hashedLaneDepth[z[v].id] = this.getDepth(z[v], o); + this.forceToUpdateLane(z[v]) + } + this.hashedPoolPositions[o.id] = o.bounds.clone() + }, + shouldScale: function (b) { + var c = b.getChildNodes().findAll(function (d) { + return d.getStencil().id().endsWith("Lane") + }); + return c.length > 1 || c.any(function (d) { + return this.shouldScale(d) + }.bind(this)) + }, + checkForChanges: function (b, c) { + if (this.facade.isExecutingCommands() && c.any(function (e) { + return e.shape.bounds.toString() !== e.bounds.toString() + })) { + var d = ORYX.Core.Command.extend({ + construct: function (e) { + this.oldState = e; + this.newState = e.map(function (f) { + return {shape: f.shape, bounds: f.bounds.clone()} + }) + }, execute: function () { + if (this.executed) { + this.applyState(this.newState) + } + this.executed = true + }, rollback: function () { + this.applyState(this.oldState) + }, applyState: function (e) { + e.each(function (f) { + f.shape.bounds.set(f.bounds.upperLeft(), f.bounds.lowerRight()) + }) + } + }); + this.facade.executeCommands([new d(c)]) + } + }, + isResized: function (b, d) { + if (!d || !b) { + return false + } + var c = d; + return Math.round(c.width() - b.bounds.width()) !== 0 || Math.round(c.height() - b.bounds.height()) !== 0 + }, + adjustLanes: function (d, c, b, f, e) { + e = e || 0; + c.each(function (g) { + g.getChildNodes().each(function (k) { + if (!k.getStencil().id().endsWith("Lane")) { + var h = e ? k.bounds.center().y - (k.bounds.center().y / e) : -f; + k.bounds.moveBy((b || 0), -h); + if (e && k.getStencil().id().endsWith("Subprocess")) { + this.moveChildDockers(k, {x: (0), y: -h}) + } + } + }.bind(this)); + this.hashedBounds[d.id][g.id].moveBy(-(b || 0), !e ? -f : 0); + if (e) { + g.isScaled = true + } + }.bind(this)) + }, + getAllExcludedLanes: function (d, b) { + var c = []; + d.getChildNodes().each(function (e) { + if ((!b || e !== b) && e.getStencil().id().endsWith("Lane")) { + c.push(e); + c = c.concat(this.getAllExcludedLanes(e, b)) + } + }.bind(this)); + return c + }, + forceToUpdateLane: function (b) { + if (b.bounds.height() !== b._svgShapes[0].height) { + b.isChanged = true; + b.isResized = true; + b._update() + } + }, + getDepth: function (d, c) { + var b = 0; + while (d && d.parent && d !== c) { + d = d.parent; + ++b + } + return b + }, + updateDepth: function (c, b, d) { + var e = (b - d) * 30; + c.getChildNodes().each(function (f) { + f.bounds.moveBy(e, 0); + [].concat(children[j].getIncomingShapes()).concat(children[j].getOutgoingShapes()) + }) + }, + setDimensions: function (e, f, c, b, g) { + var d = e.getStencil().id().endsWith("Lane"); + e.bounds.set(d ? 30 : (e.bounds.a.x - (b || 0)), d ? e.bounds.a.y : (e.bounds.a.y - (g || 0)), f ? e.bounds.a.x + f - (d ? 30 : (b || 0)) : e.bounds.b.x, c ? e.bounds.a.y + c - (d ? 0 : (g || 0)) : e.bounds.b.y) + }, + setLanePosition: function (b, c) { + b.bounds.moveTo(30, c) + }, + adjustWidth: function (b, c) { + (b || []).each(function (d) { + this.setDimensions(d, c); + this.adjustWidth(this.getLanes(d), c - 30) + }.bind(this)); + return c + }, + adjustHeight: function (e, g, c) { + var h = 0; + if (!g && c) { + var f = -1; + while (++f < e.length) { + h += e[f].bounds.height() + } + } + var f = -1; + var b = 0; + while (++f < e.length) { + if (e[f] === g) { + this.adjustHeight(this.getLanes(e[f]), undefined, e[f].bounds.height()); + e[f].bounds.set({x: 30, y: b}, {x: e[f].bounds.width() + 30, y: e[f].bounds.height() + b}) + } else { + if (!g && c) { + var d = (e[f].bounds.height() * c) / h; + this.adjustHeight(this.getLanes(e[f]), undefined, d); + this.setDimensions(e[f], null, d); + this.setLanePosition(e[f], b) + } else { + var d = this.adjustHeight(this.getLanes(e[f]), g, c); + if (!d) { + d = e[f].bounds.height() + } + this.setDimensions(e[f], null, d); + this.setLanePosition(e[f], b) + } + } + b += e[f].bounds.height() + } + return b + }, + updateHeight: function (c) { + var d = this.getLanes(c); + if (d.length == 0) { + return c.bounds.height() + } + var b = 0; + var e = -1; + while (++e < d.length) { + this.setLanePosition(d[e], b); + b += this.updateHeight(d[e]) + } + this.setDimensions(c, null, b); + return b + }, + getOffset: function (b, d, c) { + var f = {x: 0, y: 0}; + var f = b.absoluteXY(); + var e = this.hashedBounds[c.id][b.id] || (d === true ? this.hashedPoolPositions[b.id] : undefined); + if (e) { + f.x -= e.upperLeft().x; + f.y -= e.upperLeft().y + } else { + return {x: 0, y: 0} + } + return f + }, + getNextLane: function (b) { + while (b && !b.getStencil().id().endsWith("Lane")) { + if (b instanceof ORYX.Core.Canvas) { + return null + } + b = b.parent + } + return b + }, + getParentPool: function (b) { + while (b && !b.getStencil().id().endsWith("Pool")) { + if (b instanceof ORYX.Core.Canvas) { + return null + } + b = b.parent + } + return b + }, + updateDockers: function (B, t) { + var r = t.absoluteBounds(), v = []; + var s = (this.hashedPoolPositions[t.id] || r).clone(); + var A = -1, z = -1, y = -1, w = -1, u; + var C = {}; + while (++A < B.length) { + if (!this.hashedBounds[t.id][B[A].id]) { + continue + } + var d = B[A].isScaled; + delete B[A].isScaled; + var h = B[A].getChildNodes(); + var p = B[A].absoluteBounds(); + var e = (this.hashedBounds[t.id][B[A].id] || p); + var m = this.getOffset(B[A], true, t); + var f = 0; + var E = this.getDepth(B[A], t); + if (this.hashedLaneDepth[B[A].id] !== undefined && this.hashedLaneDepth[B[A].id] !== E) { + f = (this.hashedLaneDepth[B[A].id] - E) * 30; + m.x += f + } + z = -1; + while (++z < h.length) { + if (f && !h[z].getStencil().id().endsWith("Lane")) { + v.push({xOffset: f, shape: h[z]}); + h[z].bounds.moveBy(f, 0) + } + if (h[z].getStencil().id().endsWith("Subprocess")) { + this.moveChildDockers(h[z], m) + } + var c = [].concat(h[z].getIncomingShapes()).concat(h[z].getOutgoingShapes()).findAll(function (k) { + return k instanceof ORYX.Core.Edge + }); + y = -1; + while (++y < c.length) { + if (c[y].getStencil().id().endsWith("MessageFlow")) { + this.layoutEdges(h[z], [c[y]], m); + continue + } + w = -1; + while (++w < c[y].dockers.length) { + u = c[y].dockers[w]; + if (u.getDockedShape() || u.isChanged) { + continue + } + pos = u.bounds.center(); + var b = e.isIncluded(pos); + var q = !s.isIncluded(pos); + var g = w == 0 ? b : e.isIncluded(c[y].dockers[w - 1].bounds.center()); + var n = w == c[y].dockers.length - 1 ? b : e.isIncluded(c[y].dockers[w + 1].bounds.center()); + var D = Object.clone(m); + if (d && b && this.isResized(B[A], this.hashedBounds[t.id][B[A].id])) { + var x = (pos.y - p.upperLeft().y + D.y); + D.y -= (x - (x * (p.height() / e.height()))) + } + if (b) { + C[u.id] = {docker: u, offset: D} + } + } + } + } + } + var o = ORYX.Core.Command.extend({ + construct: function (k) { + this.state = k + }, execute: function () { + if (this.executed) { + this.state.each(function (k) { + k.shape.bounds.moveBy(k.xOffset, 0) + }) + } + this.executed = true + }, rollback: function () { + this.state.each(function (k) { + k.shape.bounds.moveBy(-k.xOffset, 0) + }) + } + }); + this.facade.executeCommands([new ORYX.Core.MoveDockersCommand(C), new o(v)]) + }, + moveBy: function (c, b) { + c.x += b.x; + c.y += b.y; + return c + }, + getHashedBounds: function (b) { + return this.currentPool && this.hashedBounds[this.currentPool.id][b.id] ? this.hashedBounds[this.currentPool.id][b.id] : b.absoluteBounds() + }, + getLanes: function (b, d) { + var e = this.getNamespace(); + var c = b.getChildNodes(d || false).findAll(function (f) { + return (f.getStencil().id() === e + "Lane") + }); + c = c.sort(function (w, u) { + var v = Math.round(w.bounds.upperLeft().y); + var p = Math.round(u.bounds.upperLeft().y); + var s = Math.round(w.bounds.lowerRight().y); + var m = Math.round(u.bounds.lowerRight().y); + var h = this.getHashedBounds(w); + var g = this.getHashedBounds(u); + var o = Math.round(h.upperLeft().y); + var y = Math.round(g.upperLeft().y); + var l = Math.round(h.lowerRight().y); + var x = Math.round(g.lowerRight().y); + if (v == p && s == m) { + v = o; + p = y; + s = l; + m = x + } + if (Math.round(w.bounds.height() - h.height()) === 0 && Math.round(u.bounds.height() - g.height()) === 0) { + return v < p ? -1 : (v > p ? 1 : 0) + } + var t = v < p && s < m; + var q = v > p && s > m; + var k = v < p && s >= m && l < x; + var n = v >= p && s < m && o < y; + var r = v > p && s <= m && l > x; + var f = v <= p && s > m && o > y; + return (t || k || n ? -1 : (q || r || f ? 1 : 0)) + }.bind(this)); + return c + }, + getNamespace: function () { + if (!this.namespace) { + var b = this.facade.getStencilSets(); + if (b.keys()) { + this.namespace = b.keys()[0] + } else { + return undefined + } + } + return this.namespace + } + }; + var a = ORYX.Core.Command.extend({ + construct: function (b, d, c, e) { + this.facade = e.facade; + this.plugin = e; + this.shape = b; + this.changes; + this.pool = c; + this.parent = d; + this.shapeChildren = []; + this.shape.getChildShapes().each(function (f) { + this.shapeChildren.push({ + shape: f, + bounds: {a: {x: f.bounds.a.x, y: f.bounds.a.y}, b: {x: f.bounds.b.x, y: f.bounds.b.y}} + }) + }.bind(this)); + this.shapeUpperLeft = this.shape.bounds.upperLeft(); + this.parentHeight = this.parent.bounds.height() + }, getLeafLanes: function (b) { + var c = this.plugin.getLanes(b).map(function (d) { + return this.getLeafLanes(d) + }.bind(this)).flatten(); + return c.length > 0 ? c : [b] + }, findNewLane: function () { + var b = this.plugin.getLanes(this.parent); + var c = this.getLeafLanes(this.parent); + this.lane = c.find(function (d) { + return d.bounds.upperLeft().y >= this.shapeUpperLeft.y + }.bind(this)) || c.last(); + this.laneUpperLeft = this.lane.bounds.upperLeft() + }, execute: function () { + if (this.changes) { + this.executeAgain(); + return + } + if (!this.lane) { + this.findNewLane() + } + if (this.lane) { + var f = this.laneUpperLeft; + var d = this.shapeUpperLeft; + var c = this.plugin.getDepth(this.lane, this.parent) - 1; + this.changes = $H({}); + if (f.y >= d.y) { + this.lane.getChildShapes().each(function (g) { + if (!this.changes[g.getId()]) { + this.changes[g.getId()] = this.computeChanges(g, this.lane, this.lane, this.shape.bounds.height()) + } + g.bounds.moveBy(0, this.shape.bounds.height()) + }.bind(this)); + this.plugin.hashChildShapes(this.lane); + this.shapeChildren.each(function (g) { + g.shape.bounds.set(g.bounds); + g.shape.bounds.moveBy((d.x - 30) - (c * 30), 0); + if (!this.changes[g.shape.getId()]) { + this.changes[g.shape.getId()] = this.computeChanges(g.shape, this.shape, this.lane, 0) + } + this.lane.add(g.shape) + }.bind(this)); + this.lane.bounds.moveBy(0, d.y - f.y) + } else { + if (d.y > f.y) { + this.shapeChildren.each(function (g) { + g.shape.bounds.set(g.bounds); + g.shape.bounds.moveBy((d.x - 30) - (c * 30), this.lane.bounds.height()); + if (!this.changes[g.shape.getId()]) { + this.changes[g.shape.getId()] = this.computeChanges(g.shape, this.shape, this.lane, 0) + } + this.lane.add(g.shape) + }.bind(this)) + } + } + } + var e = this.lane.bounds.height(); + var b = this.lane.length === 1 ? this.parentHeight : this.lane.bounds.height() + this.shape.bounds.height(); + this.setHeight(b, e, this.parent, this.parentHeight, true); + this.plugin.getLanes(this.parent).each(function (g) { + if (!this.changes[g.getId()] && g !== this.lane && g !== this.shape) { + this.changes[g.getId()] = this.computeChanges(g, this.parent, this.parent, 0) + } + }.bind(this)); + this.update() + }, setHeight: function (b, f, e, d, c) { + this.plugin.setDimensions(this.lane, this.lane.bounds.width(), b); + this.plugin.hashedBounds[this.pool.id][this.lane.id] = this.lane.absoluteBounds(); + this.plugin.adjustHeight(this.plugin.getLanes(e), this.lane); + if (c === true) { + this.changes[this.shape.getId()] = this.computeChanges(this.shape, e, e, 0, f, b) + } + this.plugin.setDimensions(e, e.bounds.width(), d); + if (e !== this.pool) { + this.plugin.setDimensions(this.pool, this.pool.bounds.width(), this.pool.bounds.height() + (b - f)) + } + }, update: function () { + this.plugin.hashedBounds[this.pool.id]["REMOVED"] = true + }, rollback: function () { + var c = this.laneUpperLeft; + var b = this.shapeUpperLeft; + this.changes.each(function (h) { + var g = h.value.oldParent; + var e = h.value.shape; + var f = h.value.parentHeight; + var k = h.value.oldHeight; + var d = h.value.newHeight; + if (e.getStencil().id().endsWith("Lane")) { + e.bounds.moveTo(h.value.oldPosition) + } + if (k) { + this.setHeight(k, d, g, g.bounds.height() + (k - d)); + if (c.y >= b.y) { + this.lane.bounds.moveBy(0, this.shape.bounds.height() - 1) + } + } else { + g.add(e); + e.bounds.moveTo(h.value.oldPosition) + } + }.bind(this)) + }, executeAgain: function () { + this.changes.each(function (f) { + var d = f.value.newParent; + var c = f.value.shape; + var b = f.value.newHeight; + var h = f.value.oldHeight; + if (b) { + var g = this.laneUpperLeft.y; + var e = this.shapeUpperLeft.y; + if (g >= e) { + this.lane.bounds.moveBy(0, e - g) + } + this.setHeight(b, h, d, d.bounds.height() + (b - h)) + } else { + d.add(c); + c.bounds.moveTo(f.value.newPosition) + } + }.bind(this)); + this.update() + }, computeChanges: function (d, l, k, c, m, b) { + l = this.changes[d.getId()] ? this.changes[d.getId()].oldParent : l; + var h = this.changes[d.getId()] ? this.changes[d.getId()].oldPosition : d.bounds.upperLeft(); + var f = d.bounds.upperLeft(); + var e = {x: f.x, y: f.y + c}; + var g = { + shape: d, + parentHeight: l.bounds.height(), + oldParent: l, + oldPosition: h, + oldHeight: m, + newParent: k, + newPosition: e, + newHeight: b + }; + return g + } + }); + ORYX.Plugins.BPMN2_0 = ORYX.Plugins.AbstractPlugin.extend(ORYX.Plugins.BPMN2_0) +}(); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/eventbus.js b/src/main/resources/static/activiti-editor/editor-app/eventbus.js new file mode 100644 index 0000000..d679910 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/eventbus.js @@ -0,0 +1,133 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +var KISBPM = KISBPM || {}; + +/** Inspired by https://github.com/krasimir/EventBus/blob/master/src/EventBus.js */ +KISBPM.eventBus = { + + /** Event fired when the editor is loaded and ready */ + EVENT_TYPE_EDITOR_READY: 'event-type-editor-ready', + + /** Event fired when a selection is made on the canvas. */ + EVENT_TYPE_SELECTION_CHANGE: 'event-type-selection-change', + + /** Event fired when a toolbar button has been clicked. */ + EVENT_TYPE_TOOLBAR_BUTTON_CLICKED: 'event-type-toolbar-button-clicked', + + /** Event fired when a stencil item is dropped on the canvas. */ + EVENT_TYPE_ITEM_DROPPED: 'event-type-item-dropped', + + /** Event fired when a property value is changed. */ + EVENT_TYPE_PROPERTY_VALUE_CHANGED: 'event-type-property-value-changed', + + /** Event fired on double click in canvas. */ + EVENT_TYPE_DOUBLE_CLICK: 'event-type-double-click', + + /** Event fired on a mouse out */ + EVENT_TYPE_MOUSE_OUT: 'event-type-mouse-out', + + /** Event fired on a mouse over */ + EVENT_TYPE_MOUSE_OVER: 'event-type-mouse-over', + + /** Event fired when a model is saved. */ + EVENT_TYPE_MODEL_SAVED: 'event-type-model-saved', + + /** Event fired when the quick menu buttons should be hidden. */ + EVENT_TYPE_HIDE_SHAPE_BUTTONS: 'event-type-hide-shape-buttons', + + /** A mapping for storing the listeners*/ + listeners: {}, + + /** The Oryx editor, which is stored locally to send events to */ + editor: null, + + /** + * Add an event listener to the event bus, listening to the event with the provided type. + * Type and callback are mandatory parameters. + * + * Provide scope parameter if it is important that the callback is executed + * within a specific scope. + */ + addListener: function (type, callback, scope) { + + // Add to the listeners map + if (typeof this.listeners[type] !== "undefined") { + this.listeners[type].push({scope: scope, callback: callback}); + } else { + this.listeners[type] = [ + {scope: scope, callback: callback} + ]; + } + }, + + /** + * Removes the provided event listener. + */ + removeListener: function (type, callback, scope) { + if (typeof this.listeners[type] != "undefined") { + var numOfCallbacks = this.listeners[type].length; + var newArray = []; + for (var i = 0; i < numOfCallbacks; i++) { + var listener = this.listeners[type][i]; + if (listener.scope === scope && listener.callback === callback) { + // Do nothing, this is the listener and doesn't need to survive + } else { + newArray.push(listener); + } + } + this.listeners[type] = newArray; + } + }, + + hasListener:function(type, callback, scope) { + if(typeof this.listeners[type] != "undefined") { + var numOfCallbacks = this.listeners[type].length; + if(callback === undefined && scope === undefined){ + return numOfCallbacks > 0; + } + for(var i=0; i<numOfCallbacks; i++) { + var listener = this.listeners[type][i]; + if(listener.scope == scope && listener.callback == callback) { + return true; + } + } + } + return false; + }, + + /** + * Dispatch an event to all event listeners registered to that specific type. + */ + dispatch:function(type, event) { + if(typeof this.listeners[type] != "undefined") { + var numOfCallbacks = this.listeners[type].length; + for(var i=0; i<numOfCallbacks; i++) { + var listener = this.listeners[type][i]; + if(listener && listener.callback) { + listener.callback.apply(listener.scope, [event]); + } + } + } + }, + + dispatchOryxEvent: function(event, uiObject) { + KISBPM.eventBus.editor.handleEvents(event, uiObject); + } + +}; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.eot b/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.eot new file mode 100644 index 0000000000000000000000000000000000000000..c8f20540f7240d3cb6238bf7898ca3e5a48d9ebc GIT binary patch literal 5029 zcmai1WmFUlvtD3<rIt?VRvK11c9&RUL13l3LqtG9;w4;qL0P&4N$HjpkVd4IMJYk) zl17kHFW-01{qf!V<IbEp&&)H=nKM7;&y>;w09|wd0O73z0slf`vRk+{0sxi(aLXYL zZ{a`ee`>3aH_`vm_;<kxfB~EU&j22PfZO;N>I0qtoB=KXuiNmu)qnxUx0xHj|CVw1 zH^T%l{de!_t@;VT8^8^a0*C`7Z?)q8&ou7;GYbHKqY#GwdoLn@OcVfY1pwOtDEjEe zcQ7CA=gdaj^?Y^119?pp{X``)AlA8yj9^MH5B%5Z<G4>b)FgS(VWgJ+JC2qwiVf<j zMQuIhn{&Rrt^AEgX=$tmusqM8bz0l^LAI1#d@_}XBME|IkEOBRsqEpc`rR){3-6u? zxGGGu*a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QAfT~Cv>7$5Mud^k-65%b;pWr|`bXFA<T`RZu@{REai(K}V@ z5XlO~SJ4`t{<7F}3#cr8kZ-1zq!ln!cO)X$ligRJ^Q|9IW{`9JTGC8Gut^*1yu+$b zy&Z(Gc0fnFMlL^Z8@}Qx0lm^Cl6RKsPdOkrmn=;Q;G32A2b!m06r)@N_D4*~wtOgR zw!SZ|QilakWV;`V3<gs?KIPMb*v-Z(9ERN!16y@3p2x-ECzty6QuD~4O{*&bB}Oyw ztc+o+z6?V=hT_JX{69DXO(pZCbr~Za{UYzJJt^E8V-HjUnRYgQ&tgLJs8|SbX3w!M zQY$)B?o`Tl-k;6CGlFT1I9l|W(yjkCKvESA)5);9dugil$T~odn``0pMkI>mvBF)U z*1`Y~*-!2OV`qZKI8NtVX~b70uF?zjDtY#FI&LA%e8}P3cL7f+sIQo-T#619&6xSy zbsAn#oQW%mJbG7jjKI-;s3`Y#<fN{~br#fwG=8yL9ujnZ|MLpkxcpoJyEPaaHWdL% zxf8jiZs8d!r0GAIeMj!mwZ=f5Of#{U+09#firq9XPSYhE9Z9o^qs>i1>bGidnj!dk zZii-v4A^vK&*pnj()XjEz2{v9gB-)z>4wXOIXaOqh1mA|!aqWD5x9rqh?=BIf5d8* z;_1^4HMD$OG_0vj^X@k{^-LR-*fJ(>Q;2o%Ncn6+0ASf_TH~o76|q}OI(Py#`t{lF p2UnLChkJo`Jd*)Da#JZYYuyT~wXmT1(RASm8w?bEta>lvzW^-l5`O>y literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.svg b/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.svg new file mode 100644 index 0000000..bc3439c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.svg @@ -0,0 +1,43 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > +<svg xmlns="http://www.w3.org/2000/svg"> +<metadata></metadata> +<defs> +<font id="activitimodelerregular" horiz-adv-x="2048" > +<font-face units-per-em="2048" ascent="1638" descent="-410" /> +<missing-glyph horiz-adv-x="500" /> +<glyph horiz-adv-x="0" /> +<glyph unicode="
" /> +<glyph unicode="a" d="M0 128q0 -34 23 -57t57 -23h1840q22 0 40 11t29 29t11 40v760v640q0 14 -7 31t-17 27l-440 440q-10 8 -26 15t-30 7h-1400h-1h-3h-4q-30 -2 -51 -26t-21 -54v-1840zM160 208v1680h160v-520q0 -32 16 -60t44 -44t60 -16h800q32 0 60 16t44 44t16 60v520h88l392 -392v-608 v-680h-160v600q0 34 -23 57t-57 23h-1200h-4h-4q-30 -2 -51 -26t-21 -54v-600h-160zM480 208v520h1040v-520h-1040zM960 1448v400q0 16 12 28t28 12h160q16 0 28 -12t12 -28v-400q0 -10 -5 -20t-15 -15t-20 -5h-160q-10 0 -20 5t-15 15t-5 20z" /> +<glyph unicode="b" d="M80 128l522 264l-258 258zM472 780l260 -260l914 916l-258 258zM1518 1828l262 -262l62 66q28 28 28 65t-28 65l-128 128q-10 10 -21 16t-23 9t-24 3q-34 0 -62 -28z" /> +<glyph unicode="c" d="M41 1513q11 -69 55 -135q82 -126 244 -205q138 -67 267 -67q23 0 45 2q70 6 128 36q22 -8 41 -15l38 -14t35 -13t26 -10q0 -2 1 -8t1 -8v-14v-16v-2v-10v-12v-10l-1 -6t-1 -8q-14 -6 -34 -14t-56 -20t-52 -18q-56 28 -126 34q-24 3 -48 3q-51 0 -105 -12 q-79 -17 -159 -55q-162 -78 -244 -204q-60 -91 -60 -175q0 -53 24 -103q32 -64 96 -100t144 -44q23 -2 46 -2q130 0 266 66q160 78 244 206q59 89 59 171q0 44 -17 87q28 26 49 45t35 33q458 -296 826 -486q26 -14 54 -4t49 25t37 33q24 30 27 73v8q0 38 -25 69 q-232 200 -542 430q146 106 280 214t262 216q14 16 21 37q5 16 5 32v9q-2 20 -10 39t-18 33q-54 63 -108 63l-12 -1q-8 0 -20 -6q-368 -190 -826 -486q-10 8 -24 22t-28 26t-32 28q16 40 16 81v9q-2 46 -16 88t-42 82q-84 128 -244 206q-136 66 -266 66h-8t-38 -4 q-80 -6 -144 -42t-96 -102q-22 -53 -22 -104q0 -18 3 -37zM233 1535q-2 10 -2 17q0 12 5 18q2 2 5 6t7 8t9 7t12 6t14 5t17 4t22 4q13 1 25 1q87 0 183 -47q112 -52 164 -132q27 -41 27 -71q0 -13 -5 -23q-8 -14 -28 -26t-58 -14q-15 -2 -30 -1q-83 0 -178 45 q-110 54 -164 136q-20 32 -25 57zM236 518q-5 11 -5 23q0 30 27 71q54 80 164 134q82 40 164 46q24 2 44 0q38 -4 58 -15t28 -25q2 -8 3 -16t0 -20t-7 -27t-18 -31q-52 -80 -164 -134q-93 -46 -177 -45q-16 0 -31 1q-70 6 -86 38zM1074 1056q0 28 20 48t48 20t48 -20t20 -48 q0 -18 -9 -34t-25 -25t-34 -9q-28 0 -48 20t-20 48z" /> +<glyph unicode="d" d="M80 668q0 -40 30 -70t70 -30h638v-340q0 -26 14 -49t37 -37t49 -14h902q40 0 70 30t30 70v1200q0 40 -30 70t-70 30h-462q-16 0 -32 -8q-10 -6 -12 -8q-6 -4 -22 -18q-18 -16 -58 -54q-8 -6 -27 -25l-25 -25v478q0 40 -30 70t-70 30h-462q-18 0 -32 -8q-10 -6 -12 -8 q-6 -4 -22 -18q-18 -16 -58 -54q-84 -78 -168 -160q-82 -82 -160 -166q-40 -42 -54 -60q-14 -14 -18 -22q-4 -6 -8 -10q-8 -16 -8 -34v-760zM200 688v660h420h80v500h362v-576q-80 -78 -154 -158q-40 -42 -56 -60q-12 -14 -16 -22q-6 -6 -8 -10q-10 -16 -10 -34v-300h-618z M252 1468l2 2v2q60 62 160 162t162 158l2 2l2 2v-328h-328zM938 248v660h420h80v500h362v-1160h-862zM990 1028l1 1l3 3q58 62 158 162t162 158l2 2l2 2v-328h-328z" /> +<glyph unicode="e" d="M80 528q0 -50 35 -85t85 -35h618v-180q0 -26 14 -49t37 -37t49 -14h902q40 0 70 30t30 70v1200q0 40 -30 70t-70 30h-380v320q0 50 -35 85t-85 35h-1120q-50 0 -85 -35t-35 -85v-1320zM360 1768v40q0 16 12 28t28 12h720q16 0 28 -12t12 -28v-40q0 -16 -12 -28t-28 -12 h-720q-16 0 -28 12t-12 28zM938 248v660h420h80v500h362v-1160h-862zM990 1028l1 1l3 3q58 62 158 162t162 158l2 2l2 2v-328h-328z" /> +<glyph unicode="f" d="M280 1518q0 -10 5 -20t15 -15t20 -5h80v-1026q0 -72 49 -123t119 -51h864q70 0 119 51t49 123v1026h80q16 0 28 12t12 28v40q0 10 -5 20t-15 15t-20 5h-276q0 2 -2 2l-200 200q-6 8 -19 13t-23 5h-320h-4h-2q-22 -2 -36 -18l-200 -200q-2 0 -2 -2h-276q-10 0 -20 -5 t-15 -15t-5 -20v-40zM520 452v1026h960v-1026q0 -24 -14 -39t-34 -15h-864q-10 0 -19 4t-15 11t-10 17t-4 22zM640 618q0 -24 18 -42t42 -18h40q24 0 42 18t18 42v640q0 24 -18 42t-42 18h-40q-24 0 -42 -18t-18 -42v-640zM764 1598l100 100h272l100 -100h-472zM920 618 q0 -24 18 -42t42 -18h40q24 0 42 18t18 42v640q0 24 -18 42t-42 18h-40q-24 0 -42 -18t-18 -42v-640zM1200 618q0 -24 18 -42t42 -18h40q24 0 42 18t18 42v640q0 24 -18 42t-42 18h-40q-24 0 -42 -18t-18 -42v-640z" /> +<glyph unicode="g" d="M240 1188q0 -24 18 -42t42 -18h442q40 0 54 36q6 14 6 26q0 22 -18 40l-144 144q92 108 230 152q74 24 149 24q65 0 131 -18q202 -54 305 -233q68 -117 68 -244q0 -67 -19 -136q-54 -201 -233 -305q-118 -68 -245 -68q-66 0 -134 18q-128 34 -224 130l-172 -168 q142 -142 334 -192q96 -26 192 -26t191 26q191 52 331 191t192 333q24 100 24 199q0 17 -1 35q-5 116 -49 224t-113 196t-169 154t-216 98q-94 24 -192 24h-28q-150 -6 -285 -70t-235 -174l-130 130q-20 20 -48 16q-22 -2 -38 -20t-16 -40v-442z" /> +<glyph unicode="h" d="M264 857q-26 96 -26 192.5t26 191.5q52 191 191 331t333 192q18 4 37 8t37 7t37 5t37 3t36 1h36q150 -6 285 -70t235 -174l130 130q20 20 48 16q22 -2 38 -20t16 -40v-442q0 -24 -18 -42t-42 -18h-442q-40 0 -54 36q-6 14 -6 26q0 22 18 40l144 144q-92 108 -230 152 q-74 24 -149 24q-65 0 -131 -18q-202 -54 -305 -233q-68 -117 -68 -244q0 -67 19 -136q54 -201 233 -305q118 -68 245 -68q66 0 134 18q128 34 224 130l172 -168q-142 -142 -334 -192q-96 -26 -192 -26t-191 26q-191 52 -331 191t-192 332z" /> +<glyph unicode="i" d="M80 1344q0 -56 40 -96t96 -40h184l-40 120h-144q-16 0 -16 16v264v186q0 14 16 14h104h344q16 0 16 -14v-190l120 -36v226q0 54 -40 94t-96 40h-448q-56 0 -96 -40t-40 -94v-450zM412 1522l106 -356q4 -16 23 -19t29 9l68 94l156 -156q18 -18 42 -18t40 16l6 8 q16 16 16 40t-18 40l-156 156l92 66q12 10 9 29t-19 23l-356 106h-8h-6q-14 -2 -21 -14q-4 -8 -4 -15q0 -5 1 -9zM1063 931q-1 -6 -1 -13q0 -9 2 -17q4 -15 16 -25l156 -156l-92 -66q-12 -10 -9 -29t19 -23l356 -106h4h4h6q14 2 21 14t3 24l-106 356q-4 16 -23 19t-29 -9 l-68 -94l-156 156q-18 18 -42 18h-5q-21 0 -35 -16l-6 -8q-12 -10 -15 -25zM1160 264q0 -56 40 -96t96 -40h448q56 0 96 40t40 96v448q0 36 -18 68t-49 50t-69 18h-184l40 -120h144q16 0 16 -16v-264v-184q0 -16 -16 -16h-104h-344q-16 0 -16 16v188l-120 36v-224z" /> +<glyph unicode="j" d="M120 306q0 -56 41 -97t97 -41h1484q38 0 70 19t50 51t18 68v1484q0 58 -40 98t-98 40h-1484q-58 0 -98 -40t-40 -98v-1484zM240 306v1484q0 18 18 18h1484q18 0 18 -18v-1484q0 -18 -18 -18h-1484q-18 0 -18 18zM322 1676l140 -480q6 -22 32 -26t40 14l90 126l162 -162 q16 -16 36 -21t40 -1t36 20l8 8q22 22 22 54t-24 56l-162 162l122 88q18 14 14 40t-26 32l-480 140q-8 4 -11 4t-9 -2q-18 -4 -27 -20q-5 -10 -5 -19q0 -7 2 -13zM1098 830l162 -162l-122 -88q-18 -12 -14 -38t24 -32l482 -142q7 -3 13 -3l7 1q16 4 26 20q6 10 6 20 q0 6 -2 12l-142 480q-6 22 -32 26t-38 -14l-90 -126l-164 162q-22 24 -55 25h-3q-31 0 -52 -21l-10 -10q-21 -21 -21 -51q0 -34 25 -59z" /> +<glyph unicode="k" d="M120 1148q0 -200 99 -370t269 -269t370 -99q230 0 420 132l6 -6l208 -208l112 -112q20 -20 54 -34t62 -14q66 0 113 47t47 113q0 28 -14 61t-34 53l-114 112l-206 208q-8 8 -16 14q102 172 102 372q0 150 -59 287t-158 236t-236 157t-287 58t-286 -58t-235 -157 t-158 -236t-59 -287zM358 1148q0 208 146 355t354 147q138 0 253 -67t182 -183t67 -252q0 -208 -147 -355t-355 -147t-354 147t-146 355zM518 1088q0 -16 12 -28t28 -12h200v-200q0 -16 12 -28t28 -12h120q18 0 29 12t11 28v200h200q18 0 29 12t11 28v120q0 16 -11 28 t-29 12h-200v200q0 16 -11 28t-29 12h-120q-16 0 -28 -12t-12 -28v-200h-200q-16 0 -28 -12t-12 -28v-120z" /> +<glyph unicode="l" d="M120 1148q0 -200 99 -370t269 -269t370 -99q230 0 420 132l6 -6l208 -208l112 -112q48 -48 114 -48t114 46q22 22 35 52t13 62q0 66 -48 114l-114 112l-206 208q-8 8 -16 14q102 172 102 372q0 150 -59 287t-158 236t-236 157t-287 58t-286 -58t-235 -157t-158 -236 t-59 -287zM358 1148q0 208 146 355t354 147q138 0 253 -67t182 -183t67 -252q0 -208 -147 -355t-355 -147t-354 147t-146 355zM518 1088q0 -16 12 -28t28 -12h600q18 0 29 12t11 28v120q0 16 -11 28t-29 12h-600q-16 0 -28 -12t-12 -28v-120z" /> +<glyph unicode="m" d="M120 1146q0 -200 99 -370t269 -269t370 -99q230 0 420 132l6 -6l208 -208l112 -112q46 -46 115 -46t114 44t45 113t-46 115l-114 112l-206 208q-8 6 -16 14q102 172 102 372t-99 370t-269 269t-371 99t-371 -99t-269 -269t-99 -370zM358 1146q0 208 146 355t354 147 q138 0 253 -67t182 -183t67 -252q0 -208 -147 -355t-355 -147t-354 147t-146 355zM638 1246q142 22 192 44h8v-524h160v760h-160q-10 -54 -38 -87t-67 -48t-95 -21v-124z" /> +<glyph unicode="n" d="M200 510q0 -108 77 -185t184 -77t184 77t77 185q0 26 -5 51t-15 48t-24 44t-31 39t-39 32l72 406h2q98 0 168 69t72 167l386 108q16 -32 41 -59t54 -46t65 -30t74 -11q106 0 183 77t77 184t-77 184t-183 77q-64 0 -120 -29t-92 -79t-46 -112l-414 -114q-72 94 -188 94 q-100 0 -170 -71t-70 -169q0 -112 86 -184l-74 -416q-52 -2 -99 -23t-81 -56t-54 -83t-20 -98zM362 510q0 42 29 70t71 28t70 -28t28 -70t-28 -71t-70 -29t-71 29t-29 71zM992 658q0 -20 14 -34t36 -14h240v-252q0 -20 14 -34t34 -14h142q14 0 25 6t18 17t7 25v252h240 q20 0 34 14t14 34v142q0 20 -14 35t-34 15h-240v244q0 20 -15 35t-35 15h-142q-20 0 -34 -15t-14 -35v-244h-240q-22 0 -36 -15t-14 -35v-142zM1442 1589q0 27 13 50t36 36t50 13t50 -13t36 -36t13 -50t-13 -50t-36 -36t-50 -13t-50 13t-36 36t-13 50z" /> +<glyph unicode="o" d="M200 510q0 -108 77 -185t184 -77t184 77t77 185q0 26 -5 51t-15 48t-24 44t-31 39t-39 32l72 406h2q98 0 168 69t72 167l386 108q16 -32 41 -59t54 -46t65 -30t74 -11q106 0 183 77t77 184t-77 184t-183 77q-64 0 -120 -29t-92 -79t-46 -112l-414 -114q-72 94 -188 94 q-100 0 -170 -71t-70 -169q0 -112 86 -184l-74 -416q-52 -2 -99 -23t-81 -56t-54 -83t-20 -98zM362 510q0 42 29 70t71 28t70 -28t28 -70t-28 -71t-70 -29t-71 29t-29 71zM992 658q0 -20 14 -34t36 -14h720q20 0 34 14t14 34v142q0 20 -14 35t-34 15h-720q-22 0 -36 -15 t-14 -35v-142zM1442 1589q0 27 13 50t36 36t50 13t50 -13t36 -36t13 -50t-13 -50t-36 -36t-50 -13t-50 13t-36 36t-13 50z" /> +<glyph unicode="p" d="M200 1008q0 -16 12 -28t28 -12h160v-240q0 -34 23 -57t57 -23h240q34 0 57 23t23 57v240h240v-520q0 -66 47 -113t113 -47h240q66 0 113 47t47 113v520h160q16 0 28 12t12 28v80q0 16 -12 28t-28 12h-160v520q0 66 -47 113t-113 47h-240q-66 0 -113 -47t-47 -113v-520 h-240v240q0 34 -23 57t-57 23h-240q-34 0 -57 -23t-23 -57v-240h-160q-16 0 -28 -12t-12 -28v-80zM1200 448v1200h240v-1200h-240z" /> +<glyph unicode="q" d="M240 608q0 -66 47 -113t113 -47h520v-160q0 -16 12 -28t28 -12h80q16 0 28 12t12 28v160h520q66 0 113 47t47 113v240q0 66 -47 113t-113 47h-520v240h240q34 0 57 23t23 57v240q0 34 -23 57t-57 23h-240v160q0 16 -12 28t-28 12h-80q-16 0 -28 -12t-12 -28v-160h-240 q-34 0 -57 -23t-23 -57v-240q0 -34 23 -57t57 -23h240v-240h-520q-66 0 -113 -47t-47 -113v-240zM400 608v240h1200v-240h-1200z" /> +<glyph unicode=" " horiz-adv-x="1024" /> +<glyph unicode=" " /> +<glyph unicode=" " horiz-adv-x="1024" /> +<glyph unicode=" " /> +<glyph unicode=" " horiz-adv-x="682" /> +<glyph unicode=" " horiz-adv-x="512" /> +<glyph unicode=" " horiz-adv-x="341" /> +<glyph unicode=" " horiz-adv-x="341" /> +<glyph unicode=" " horiz-adv-x="256" /> +<glyph unicode=" " horiz-adv-x="409" /> +<glyph unicode=" " horiz-adv-x="113" /> +<glyph unicode=" " horiz-adv-x="409" /> +<glyph unicode=" " horiz-adv-x="512" /> +<glyph unicode="◼" horiz-adv-x="1000" d="M0 0z" /> +</font> +</defs></svg> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.ttf b/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9666150c15bee2c986a84a21a92a46277e4d6730 GIT binary patch literal 8628 zcmcgx4Qw07m7dvME>{$_+FdPwEK&6GM-(N}Bu!EjCCjo*+qB{znUNKTa$LodCE0Nu zM@bx?nx?60q^YaRxxS)j^nAWlFoL__&R5LR$;B{=L`e%n&84l;>*<03*9HZy2!YlW ziWKMC7JYA))Q{aXMN!;|nw@#?&Cbs^Z{B+|i!ee+h6jhFY<6Jx(Qi%tCqmc-T-Wxk z+p=g6NDxi~t?k(xjSv6e>)!@C5A?o6j}K2ghCc5Fnm~H$(8&{;5UF|zA=VG_$oRzJ z$M?P#{YRh&5Mss-4?jHtd<h}bcOVxIAN$;R@ZVmE0{uON>^F~$4Ud{eL(R}Nm8XsX zqxQ$<+dzK|wExKCCnn$iS=A|o8l6C&KK8_+;jg^+rE#EVfX+TXJUM}T@Q;B02x#s2 z@Z)3kw^COTatkoN6BAE7eIoHcoiM+(&w>2EC!QLcP|y4&j8_{4dGBA0jf{7n+gpv0 z=Mu<yNE99P-o}g2CPF`o-S|y8|FzAKh(OViz~q3&$O8$`0t((V{Sco;Cd8TIrf&l2 zF6Zn#8fO$*#Z*OKH2#cUmWbT=wo%lBYMSow<0Y6I3_S?4l{zd?G`T9gV?a@<3;NDM zF2Rq=5voB?Y8EZ3J=%2V?%fJ!SVJqEyT84A@k8}z3qO1NgQitI7***50|rYSV>&CE zR{t#tSM&bVGRv8GvruKJw$_NXlC0GIsSW(!*T+fpOZ*{v4$Yv8=uPw%`W3o?CL#SA zebeB*jlN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editor-app/fonts/activiti-admin-webfont.woff b/src/main/resources/static/activiti-editor/editor-app/fonts/activiti-admin-webfont.woff new file mode 100644 index 0000000000000000000000000000000000000000..2482a198c896f6a015b1a3a8fd638b5687618f73 GIT binary patch literal 5624 zcmY+IbyQT{*T?TLbPU}gCEX1JLnEPdi2_4PclXdp*8>VDB@)uz3>^aqN(iDfQX+_? zz&kw8@1OUs^<DdZKWCqF_c`mXyVl+QI%;YF2tZ$y7XayfWNG@(-{1fLOHIx22>^g1 z(3Ig`PH!U?9;v9Rp;<oKGor-|=m3~H27)4J)`j*eXc=2gX4KfYT6q8f2HFD7=rJ!x zAehz0&xaY!T+mG5Ubq5yN%kHuT+s}@9;hB2?F^a(-@mZ(M$g66Md#rDPb4o~0`1Yv z6aXM?06=xYHBl<)U}t3u0OTa-9A2~}uxxob9ncWXWYL};Eq3BroNEVHp8zyN&jsYs zibsCOi*#|fxzEc*dvxu9S{w>t?`jo*el9r*?V0ZdQUFc6S-IMw*#X)k(KY(eT}gC! zxO@8m07V^|g`u@2dM>lz;bn)OODTl*eds)Oij>48e>-b*&6K~;4EtWNe+&rF5rh_i zk}ICRkJCawPyUNXlmSaNa9cQh6>N=%O#-)uV=AdK+k<}709eg{Av)>bak&vG1R@&| zGZ*iR4F;DmMBDcarwy|Y_Vo?+jgJA~Btms&=1K7wBm!abhxpl2uNXEq1RI+umkubo z#&ft|0}i*3fYV~DVUvu4PH2!JRIvavKM;+A(^|wTVF_S`#stjC-`y#zl2Ou-u-^6F zTAnIw-o{<yxK}7WQ3fTs5PDdtaWEsJYa$R{eW?EN;VI<U(B#0xh#)f;J4&b=0M0AP zFVGc(#DD|PDi8t`0>wZN&<h*_KY;+Wj)2^M84?)yAA57ZKXbiK?PrQ4D@4R##NZ;c z^b$qmtF+<ZA}qYYxnyfwXv`L_qoh}Qq9^Eq0z!posg|~|s8l@<n}u3EL<z=1Ch8nt zECz)(dQZI))f!K)^xt)!HrQcL>tDg1l(^AWZ*Bz6OZWGalbWJ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Ab@29!2bbyE-fqo literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.eot b/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..423bd5d3a20b804f596e04e5cd02fb4f16cfcbc1 GIT binary patch literal 20290 zcma%iWl&r}+vUIvFu1!7?(XjH8r<DIKmuWqL4v!xy9WvG7F<Juy95ZqA)EKzt#5zq zpY5*hexB3kIo;K_Ze6KvX$=5iUkw0&|Cd34|0IO})&Kw;AQ2Am4^!3rKfwPq|KR_o zRD){v{{jEUU<4=tQ~`znO@Jam2_OT|0H_0W0FZy4CBOw>_pdkt+yM3f?|%^(0BwNn zKil^oY6<ZAhxh~Z{~=!gdL04o|9B7p7l0kW`7d(;ME+_1N9lii{}*-m$MgYM|CjIg zKN0KzfqzU9fa^bH=YN|2;n@At`p@`Q0PcSl-+zlBfajkl^lxmz|L>VY{-1dR0Ma@N z|IbPR0e+<bJ`Dh$9)L|7XXYek++ywBgoBEw@+W_4Jz+0aj&xp=oK1WTG#AH(?~B(_ zli8Svd2(Z_@@lQ*qak<)`i%BV?}*6xJ1h3}_tP!#T*J&0?Tqq+K#{?36L_<VlTRI2 zj&wuDvNog<S=8_MYWn8_lUb3sGLNUMq?QpJnc?mZmRY#bFkqL0A%#<{2h}Y@q$|>! zN}8*7O64;}N}#)+k#j6FO>isk@k@Bh*}4HIZ8cU{OIG{HQ=j2X*xT%?IOB<d_O;Dy zw?T36np_zSv;9D^=&JU5w;;*>QpvTZW7IXToOwNzo|ejHaAwCN3nOc7m7e{ub?Y8i z9p3wwJ(%iCu~2*Rb;zUJG0b8esX)Om9*+v4m=T(1qO&}%tozG*k;kT*-plt){q_5c z=|<3=s%J;+5^v+e03X6T{0`e9cT7ovP0397X+n!3SBptlDu2Z(nI^J_Nr|Uj5|0C( zsH7C}(vTj#)-rQv+n%XGE}df=E4Dq-Cn{|U=><y;ZbF=EZ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vG@7CEg_HoL-_q>XR4Uc+8m&^&1K!X2|7p^}(d-9M<P05}Ua1QFVK jJK2|sM&jAS2q;;&%doCoM8BK}%KQ)yl13{dMRH95s2cYb literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.svg b/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..4469488 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > +<svg xmlns="http://www.w3.org/2000/svg"> +<metadata></metadata> +<defs> +<font id="glyphicons_halflingsregular" horiz-adv-x="1200" > +<font-face units-per-em="1200" ascent="960" descent="-240" /> +<missing-glyph horiz-adv-x="500" /> +<glyph /> +<glyph /> +<glyph unicode="
" /> +<glyph unicode=" " /> +<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" /> +<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" /> +<glyph unicode=" " /> +<glyph unicode=" " horiz-adv-x="652" /> +<glyph unicode=" " horiz-adv-x="1304" /> +<glyph unicode=" " horiz-adv-x="652" /> +<glyph unicode=" " horiz-adv-x="1304" /> +<glyph unicode=" " horiz-adv-x="434" /> +<glyph unicode=" " horiz-adv-x="326" /> +<glyph unicode=" " horiz-adv-x="217" /> +<glyph unicode=" " horiz-adv-x="217" /> +<glyph unicode=" " horiz-adv-x="163" /> +<glyph unicode=" " horiz-adv-x="260" /> +<glyph unicode=" " horiz-adv-x="72" /> +<glyph unicode=" " horiz-adv-x="260" /> +<glyph unicode=" " horiz-adv-x="326" /> +<glyph unicode="€" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" /> +<glyph unicode="−" d="M200 400h900v300h-900v-300z" /> +<glyph unicode="☁" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86t85 208q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" /> +<glyph unicode="✉" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" /> +<glyph unicode="✏" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" /> +<glyph unicode="" horiz-adv-x="500" d="M0 0z" /> +<glyph unicode="" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" /> +<glyph unicode="" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q17 -55 85.5 -75.5t147.5 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" /> +<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" /> +<glyph unicode="" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" /> +<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" /> +<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" /> +<glyph unicode="" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" /> +<glyph unicode="" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" /> +<glyph unicode="" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" /> +<glyph unicode="" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" /> +<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" /> +<glyph unicode="" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 299q-120 -77 -261 -77q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" /> +<glyph unicode="" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" /> +<glyph unicode="" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" /> +<glyph unicode="" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" /> +<glyph unicode="" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" /> +<glyph unicode="" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" /> +<glyph unicode="" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" /> +<glyph unicode="" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" /> +<glyph unicode="" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" /> +<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" /> +<glyph unicode="" d="M0 25v475l200 700h800q199 -700 200 -700v-475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" /> +<glyph unicode="" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" /> +<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" /> +<glyph unicode="" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" /> +<glyph unicode="" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" /> +<glyph unicode="" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" /> +<glyph unicode="" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" /> +<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" /> +<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" /> +<glyph unicode="" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" /> +<glyph unicode="" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" /> +<glyph unicode="" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" /> +<glyph unicode="" d="M1 700v475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" /> +<glyph unicode="" d="M2 700v475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" /> +<glyph unicode="" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" /> +<glyph unicode="" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" /> +<glyph unicode="" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" /> +<glyph unicode="" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" /> +<glyph unicode="" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" /> +<glyph unicode="" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v70h471q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" /> +<glyph unicode="" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" /> +<glyph unicode="" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " /> +<glyph unicode="" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" /> +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" /> +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" /> +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" /> +<glyph unicode="" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" /> +<glyph unicode="" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" /> +<glyph unicode="" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " /> +<glyph unicode="" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" /> +<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" /> +<glyph unicode="" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 138.5t-64 210.5zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l566 567l-136 137l-430 -431l-147 147z" /> +<glyph unicode="" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" /> +<glyph unicode="" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" /> +<glyph unicode="" d="M200 0l900 550l-900 550v-1100z" /> +<glyph unicode="" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" /> +<glyph unicode="" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" /> +<glyph unicode="" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" /> +<glyph unicode="" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" /> +<glyph unicode="" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" /> +<glyph unicode="" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" /> +<glyph unicode="" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" /> +<glyph unicode="" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -300t-217.5 -218t-299.5 -80t-299.5 80t-217.5 218t-80 300zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -300t-217.5 -218t-299.5 -80t-299.5 80t-217.5 218t-80 300zM300 500h600v200h-600v-200z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -300t-217.5 -218t-299.5 -80t-299.5 80t-217.5 218t-80 300zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -300t-217.5 -218t-299.5 -80t-299.5 80t-217.5 218t-80 300zM363 700h144q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5q19 0 30 -10t11 -26 q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-105 0 -172 -56t-67 -183zM500 300h200v100h-200v-100z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -300t-217.5 -218t-299.5 -80t-299.5 80t-217.5 218t-80 300zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" /> +<glyph unicode="" d="M0 500v200h194q15 60 36 104.5t55.5 86t88 69t126.5 40.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200 v-206q149 48 201 206h-201v200h200q-25 74 -76 127.5t-124 76.5v-204h-200v203q-75 -24 -130 -77.5t-79 -125.5h209v-200h-210z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" /> +<glyph unicode="" d="M0 547l600 453v-300h600v-300h-600v-301z" /> +<glyph unicode="" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" /> +<glyph unicode="" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" /> +<glyph unicode="" d="M104 600h296v600h300v-600h298l-449 -600z" /> +<glyph unicode="" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" /> +<glyph unicode="" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" /> +<glyph unicode="" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" /> +<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-33 14.5h-207q-20 0 -32 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" /> +<glyph unicode="" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111v6t-1 15t-3 18l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6h-111v-100z M100 0h400v400h-400v-400zM200 900q-3 0 14 48t35 96l18 47l214 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" /> +<glyph unicode="" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" /> +<glyph unicode="" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" /> +<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" /> +<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" /> +<glyph unicode="" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 33 -48 36t-48 -29l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" /> +<glyph unicode="" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -21 -13 -29t-32 1l-94 78h-222l-94 -78q-19 -9 -32 -1t-13 29v64 q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" /> +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" /> +<glyph unicode="" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" /> +<glyph unicode="" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" /> +<glyph unicode="" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" /> +<glyph unicode="" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" /> +<glyph unicode="" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" /> +<glyph unicode="" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" /> +<glyph unicode="" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" /> +<glyph unicode="" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" /> +<glyph unicode="" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" /> +<glyph unicode="" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" /> +<glyph unicode="" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" /> +<glyph unicode="" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" /> +<glyph unicode="" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM99 500v250v5q0 13 0.5 18.5t2.5 13t8 10.5t15 3h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35q-56 337 -56 351z M1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M74 350q0 21 13.5 35.5t33.5 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-22 -9 -63 -23t-167.5 -37 t-251.5 -23t-245.5 20.5t-178.5 41.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" /> +<glyph unicode="" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" /> +<glyph unicode="" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q123 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 212l100 213h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" /> +<glyph unicode="" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q123 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" /> +<glyph unicode="" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" /> +<glyph unicode="" d="M-101 651q0 72 54 110t139 37h302l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 16.5 -10.5t26 -26t16.5 -36.5v-526q0 -13 -85.5 -93.5t-93.5 -80.5h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l106 89v502l-342 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM999 201v600h200v-600h-200z" /> +<glyph unicode="" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6v7.5v7v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" /> +<glyph unicode="" d="M1 585q-15 -31 7 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85l-1 -302q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM76 565l237 339h503l89 -100v-294l-340 -130 q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 500h300l-2 -194l402 294l-402 298v-197h-298v-201z" /> +<glyph unicode="" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l400 -294v194h302v201h-300v197z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -34 5.5 -93t7.5 -87q0 -9 17 -44t16 -60q12 0 23 -5.5 t23 -15t20 -13.5q20 -10 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55.5t-20 -57.5q12 -21 22.5 -34.5t28 -27t36.5 -17.5q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q101 -2 221 111q31 30 47 48t34 49t21 62q-14 9 -37.5 9.5t-35.5 7.5q-14 7 -49 15t-52 19 q-9 0 -39.5 -0.5t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q8 16 22 22q6 -1 26 -1.5t33.5 -4.5t19.5 -13q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5 t5.5 57.5q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 41 1 44q31 -13 58.5 -14.5t39.5 3.5l11 4q6 36 -17 53.5t-64 28.5t-56 23 q-19 -3 -37 0q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -46 0t-45 -3q-20 -6 -51.5 -25.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79zM518 915q3 12 16 30.5t16 25.5q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -18 8 -42.5t16.5 -44 t9.5 -23.5q-6 1 -39 5t-53.5 10t-36.5 16z" /> +<glyph unicode="" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" /> +<glyph unicode="" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" /> +<glyph unicode="" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" /> +<glyph unicode="" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" /> +<glyph unicode="" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" /> +<glyph unicode="" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM513 609q0 32 21 56.5t52 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-16 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5q-37 0 -62.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" /> +<glyph unicode="" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -79.5 -17t-67.5 -51l-388 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23q38 0 53 -36 q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60l517 511 q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" /> +<glyph unicode="" d="M79 784q0 131 99 229.5t230 98.5q144 0 242 -129q103 129 245 129q130 0 227 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100l-84.5 84.5t-68 74t-60 78t-33.5 70.5t-15 78z M250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-106 48.5q-73 0 -131 -83l-118 -171l-114 174q-51 80 -124 80q-59 0 -108.5 -49.5t-49.5 -118.5z" /> +<glyph unicode="" d="M57 353q0 -94 66 -160l141 -141q66 -66 159 -66q95 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-12 12 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141l19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -18q46 -46 77 -99l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" /> +<glyph unicode="" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" /> +<glyph unicode="" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" /> +<glyph unicode="" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335l-27 7q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5v-307l64 -14 q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5zM700 237 q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" /> +<glyph unicode="" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -11 2.5 -24.5t5.5 -24t9.5 -26.5t10.5 -25t14 -27.5t14 -25.5 t15.5 -27t13.5 -24h242v-100h-197q8 -50 -2.5 -115t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q32 1 102 -16t104 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10 t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5t-30 142.5h-221z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" /> +<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" /> +<glyph unicode="" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" /> +<glyph unicode="" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" /> +<glyph unicode="" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" /> +<glyph unicode="" d="M216 519q10 -19 32 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8l9 -1q13 0 26 16l538 630q15 19 6 36q-8 18 -32 16h-300q1 4 78 219.5t79 227.5q2 17 -6 27l-8 8h-9q-16 0 -25 -15q-4 -5 -98.5 -111.5t-228 -257t-209.5 -238.5q-17 -19 -7 -40z" /> +<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " /> +<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 401h700v699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l248 -237v700h-699zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" /> +<glyph unicode="" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" /> +<glyph unicode="" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" /> +<glyph unicode="" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -117q-25 -16 -43.5 -50.5t-18.5 -65.5v-359z" /> +<glyph unicode="" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" /> +<glyph unicode="" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" /> +<glyph unicode="" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q16 17 13 40.5t-22 37.5l-192 136q-19 14 -45 12t-42 -19l-119 -118q-143 103 -267 227q-126 126 -227 268l118 118q17 17 20 41.5 t-11 44.5l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" /> +<glyph unicode="" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -15 -35.5t-35 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" /> +<glyph unicode="" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" /> +<glyph unicode="" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" /> +<glyph unicode="" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" /> +<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86t85 208q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300 h200l-300 -300z" /> +<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104t60.5 178q0 121 -85 207.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" /> +<glyph unicode="" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" /> +<glyph unicode="" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -12t1 -11q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" /> +</font> +</defs></svg> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.ttf b/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..a498ef4e7c8b556fc36f580c5ff524025bb11c84 GIT binary patch literal 41236 zcmc${34B}Cl|TOOdr!M8>1nlW%aSZh@-ADltvHKgvhN959SD$s!WNdWGz16%Qr5Hq zLm`wxhZF|Lu$1?dP}&a6w6rkl;x0@`ftk{z3q#8?Eo6ReL;Ujlp8MoA3AF$DeLjCD zlHMl0d(S=h+;hHXc>)szLBX3Wc;?Jmx%k3A|K_)Xz-n-`X6~%nbC?xp1U3o#v85|A z*$bXrcnkLXvA_PjOE+x(^}IzP?0-`b#EZ|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`GfID`O|4RNV`LA)_$DHFxW6p7et51*gKh-TyTl2b;7uKB? r*<XLUI%!JXnC^`FdEMEIpzNw2-JLXLSzUd1Hr!ZQvM93RUzYW6Q$Q2j literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.woff b/src/main/resources/static/activiti-editor/editor-app/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000000000000000000000000000000000000..d83c539b8266366dc331c5f746714caefb84c47d GIT binary patch literal 23292 zcmY&;18^r#v~|ply|HcE-q^Nn+qP|EW829uHa52H<mLZf)mQa()v4R(%)N7armK4H zbhVqDm>3W+&`;C+07ClD7NGtg|F8f5H!(3~86Y5F{~s0SKbSx7ABc;Hiv4KWKOFA| z1i(;0U~)?IOg~!J4;TJ{zFC=cu#t^{JrEGc4+X~fv6g!he=v+(oe6+|Krw$rsQ(28 zXqc(Jnaz*(qXYl_@iS3sqAxQuaQcY_Tl{~1KtPCQ)*hxm+9nW?%smiL1SZu?QG~gP zfiVz};_Qzf%MaLq!K|{)e?%Z4C9og<-<U~Yn7|OsZJgbIG=iTTs6RO#`g@V$tnG|` z{FHy<fUADc#+0J$X=C92lUHTuC+^1=hyVl(IN#R5#smmR^@jon{fyIlu_xo+-p<Jx z2uLmXhx7eBO7N6mysEvU$xp22(2pbCf2hBsMs+hW{28<6!w-k}4+dX~>_7H@-~JSD z;ml7TXj+FZ?f)#YkNdijzOlak4yYkC1fss7KG=Ykz!b<4BM=Z=IWQa$(0|uWEsV4K z`X>4YrUsn@0s;tOgqZ0J7!22e4?s)mgXFL6`5_=7{)zvZg8YI7T9RZ~1PZ}QNTy(5 z00DwEfL{K&2Oxo08dMN5)GSH+K*R_N1}~gh9kVdRVj(AnECji}gG!JDvmQ#dR62_; z28`R!zr>GB&HX-eU_#2qdYKgxT}?y%Wx$)3d8UsB>5#ISmT5Yv-9ANQ5q!b<Hd*Md z{GdSvdA-a_BNg;?Y*5x@MfvkA^Jr;Bz-oO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qjEdBfj!zFu)z7&n^jRAixjs@%o6h?|Wi&%?bn#0D<2n%3=&+~_Xn1+Ieg7^ZZ zBx}3@{&0Dtq<*6arko+hEGx$>%jJnp&cRD?R|2?i1l;otJa7c=&IR|cfO}iPgAXoU zF)n=rE<F`41A8vrSuXOQHK$6;N-B!WU$0TU%`SsC$6YC^b}YVj7>J;yXtU+y_2o$M z<;3>o*x=>VXJ8m2FfI}pB@0aI1x7Fc6H0+G*1(h<U^oFVJ|kyDpu!uYk}q;LdzjPC zTf|#9l0RqED1RI{wqrW66U4nG!ws?G-qz;c@v7ZYu7x<&ZX4I`1h{R1+#q&t+xl)h zzNcI2rx3T(ZS&Ke5b7;yYKSHEwifk{XW^DoA;ht8+o*8ogZY-cImFg{ThDyQXAg?v zeo5>O#Xh^FK7+#3T;kC{(Tgt0ilE5vE{Wbju{JNMHlc`;mjsef%+5=SPAF<<N|A{5 z#<61#z;Ex$?Wd@1OU7@QEAK-%#ZQkww?lomlecbvZ`Ox<xj-={$w?Gr1^mw4c`LHy zG;Xb!)a3s0;h#zW-Q0EcqEbtopNGfdv`)vXzc0y{nNKvoDj{i?shi@s!uT)wdw6{n z5Fp-OXs%ILxj6f;P`O>ZZjR&nzhtKRioIRA?tjIp-MDh$tB+H`e*{!{VV-PWx_BTM z@E@r$uU<TA3ivNs{QLL%`XL~=y~F%no#d6(ZNuYIaExTfbj{j|*<Jer)ds`O>$lnG z!53>-18gbu^<C@#7QUuEmhh$dow`1FYW>eF|AZPf_W!@UFwWzSx>*{LQW!N1fq9mn z2@b9W9u{2>pA4r`kEUtZ01uyH)Br-^Fr=%;HBzZ3)PC)R8Bx`vaF`kz)f003iw~<U JWcdsS_dl=|JSPAE literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/header-controller.js b/src/main/resources/static/activiti-editor/editor-app/header-controller.js new file mode 100644 index 0000000..97a570d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/header-controller.js @@ -0,0 +1,31 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +angular.module('activitiModeler') + .controller('HeaderController', ['$rootScope', '$scope', '$http', '$timeout', function ($rootScope, $scope, $http, $timeout) { + + // Add reference to global header-config + $scope.headerConfig = KISBPM.HEADER_CONFIG; + + // TODO: generate setting-menu items + + // TODO: generate user-menu items + +}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/i18n/en.json b/src/main/resources/static/activiti-editor/editor-app/i18n/en.json new file mode 100644 index 0000000..8497739 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/i18n/en.json @@ -0,0 +1,291 @@ +{ + "HEADER.BRAND" : "Activiti 设计器", + "HEADER.BRAND_TAGLINE" : "powered by Alfresco", + "PAGE.HEADER" : "业务流程的细节", + + "ACTION.OK" : "确认", + "ACTION.SAVE" : "保存", + "ACTION.SAVE-AND-CLOSE" : "保存并关闭", + "ACTION.SEND" : "发送", + "ACTION.CANCEL" : "取消", + "ACTION.SELECT" : "选择", + "ACTION.ADD" : "添加", + "ACTION.REMOVE" : "移除", + "ACTION.MOVE.UP" : "上移", + "ACTION.MOVE.DOWN" : "下移", + + "MAIN_NAVIGATION_ORCHESTRATIONS" : "业务流程", + "MAIN_NAVIGATION_DISPATCH_RULES" : "调度规则", + "MAIN_NAVIGATION_ASSET_GROUPS" : "审批组", + "MAIN_NAVIGATION_SOLUTIONS" : "解决", + + "TOOLBAR.ACTION.CLOSE" : "关闭编辑器并返回到概览页面", + "TOOLBAR.ACTION.SAVE" : "保存模型", + "TOOLBAR.ACTION.VALIDATE": "校验模型", + "TOOLBAR.ACTION.CUT" : "剪切 (在业务流程中选择一个或多个元素)", + "TOOLBAR.ACTION.COPY" : "复制 (在业务流程中选择一个或多个元素)", + "TOOLBAR.ACTION.PASTE" : "粘贴", + "TOOLBAR.ACTION.DELETE" : "删除选定的元素", + "TOOLBAR.ACTION.UNDO" : "撤消", + "TOOLBAR.ACTION.REDO" : "重做", + "TOOLBAR.ACTION.ZOOMIN" : "放大", + "TOOLBAR.ACTION.ZOOMOUT" : "缩小", + "TOOLBAR.ACTION.ZOOMACTUAL" : "缩放到实际大小", + "TOOLBAR.ACTION.ZOOMFIT" : "适应屏幕", + "TOOLBAR.ACTION.MOVE" : "移动", + "TOOLBAR.ACTION.IMPORT" : "导入", + "TOOLBAR.ACTION.EXPORT" : "导出", + "TOOLBAR.ACTION.BENDPOINT.ADD" : "为选定的流程连线添加弯曲点", + "TOOLBAR.ACTION.BENDPOINT.REMOVE" : "为选定的流程连线删除弯曲点", + "TOOLBAR.ACTION.ALIGNHORIZONTAL" : "水平对齐", + "TOOLBAR.ACTION.ALIGNVERTICAL" : "垂直对齐", + "TOOLBAR.ACTION.SAMESIZE" : "同样大小", + "TOOLBAR.ACTION.HELP": "预览", + "TOOLBAR.ACTION.FEEDBACK": "反馈", + + "KICKSTART.PROCESS_TOOLBAR.ACTION.SAVE" : "保存模型", + "KICKSTART.PROCESS_TOOLBAR.ACTION.VALIDATE": "校验模型", + "KICKSTART.PROCESS_TOOLBAR.ACTION.HELP": "预览", + "KICKSTART.PROCESS_TOOLBAR.ACTION.FEEDBACK": "反馈", + + "FORM_TOOLBAR.ACTION.SAVE" : "保存模型", + "FORM_TOOLBAR.ACTION.VALIDATE": "校验模型", + "FORM_TOOLBAR.ACTION.HELP": "预览", + "FORM_TOOLBAR.ACTION.FEEDBACK": "反馈", + + "APP_DEFINITION_TOOLBAR.ACTION.SAVE" : "保存应用程序定义", + "APP_DEFINITION_TOOLBAR.ACTION.VALIDATE" : "校验应用程序定义", + "APP_DEFINITION_TOOLBAR.ACTION.HELP" : "预览", + "APP_DEFINITION_TOOLBAR.ACTION.FEEDBACK" : "反馈", + + "BUTTON.ACTION.DELETE.TOOLTIP": "从模型中删除元素", + "BUTTON.ACTION.MORPH.TOOLTIP": "更改元素类型", + + "ELEMENT.AUTHOR" : "作者", + "ELEMENT.DATE_CREATED" : "创建日期", + "ELEMENT.SELECTED_EMPTY_TITLE" : "(输入名称)", + + "PROPERTY.REMOVED" : "清除", + "PROPERTY.EMPTY" : "", + "PROPERTY.PROPERTY.EDIT.TITLE" : "修改 \"{{title}}\"", + + "PROPERTY.FEEDBACK.TITLE" : "请填写您的反馈", + + "PROPERTY.ASSIGNMENT.TITLE" : "指派", + "PROPERTY.ASSIGNMENT.TYPE" : "类型", + "PROPERTY.ASSIGNMENT.TYPE.IDENTITYSTORE" : "身份储存器", + "PROPERTY.ASSIGNMENT.TYPE.STATIC" : "静态值", + "PROPERTY.ASSIGNMENT.ASSIGNEE" : "代理人", + "PROPERTY.ASSIGNMENT.MATCHING" : "使用上下方向键选择并按回车键确认或使用鼠标", + "PROPERTY.ASSIGNMENT.ASSIGNEE_PLACEHOLDER" : "请输入代理人", + "PROPERTY.ASSIGNMENT.EMPTY" : "无代理人", + "PROPERTY.ASSIGNMENT.ASSIGNEE_DISPLAY" : "代理人 {{assignee}}", + "PROPERTY.ASSIGNMENT.CANDIDATE_USERS_DISPLAY" : "{{length}} 候选人", + "PROPERTY.ASSIGNMENT.CANDIDATE_USERS" : "候选人", + "PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS_DISPLAY" : "{{length}} 候选组", + "PROPERTY.ASSIGNMENT.CANDIDATE_GROUPS" : "候选组", + "PROPERTY.ASSIGNMENT.USER_IDM_DISPLAY": "用户 {{firstName}} {{lastName}}", + "PROPERTY.ASSIGNMENT.USER_IDM_EMAIL_DISPLAY": "用户 {{email}}", + "PROPERTY.ASSIGNMENT.IDM_EMPTY" : "发起人", + "PROPERTY.ASSIGNMENT.IDM.TYPE" : "任务", + "PROPERTY.ASSIGNMENT.IDM.NO_CANDIDATE_USERS" : "没有选择候选人...", + "PROPERTY.ASSIGNMENT.IDM.NO_CANDIDATE_GROUPS" : "没有选择候选组...", + "PROPERTY.ASSIGNMENT.IDM.DROPDOWN.INITIATOR" : "分派给发起人", + "PROPERTY.ASSIGNMENT.IDM.DROPDOWN.USER" : "分派给一个用户", + "PROPERTY.ASSIGNMENT.IDM.DROPDOWN.USERS" : "候选人", + "PROPERTY.ASSIGNMENT.IDM.DROPDOWN.GROUPS" : "候选组", + "PROPERTY.ASSIGNMENT.EMAIL.HELP" : "键入一个电子邮件地址,然后按回车键继续", + + "PROPERTY.EXECUTIONLISTENERS.DISPLAY" : "{{length}} 执行监听", + "PROPERTY.EXECUTIONLISTENERS.EMPTY" : "没有执行侦听器配置", + "PROPERTY.EXECUTIONLISTENERS.EVENT" : "事件", + "PROPERTY.EXECUTIONLISTENERS.CLASS" : "类", + "PROPERTY.EXECUTIONLISTENERS.CLASS.PLACEHOLDER" : "输入类名", + "PROPERTY.EXECUTIONLISTENERS.EXPRESSION" : "表达式", + "PROPERTY.EXECUTIONLISTENERS.EXPRESSION.PLACEHOLDER" : "输入表达式", + "PROPERTY.EXECUTIONLISTENERS.DELEGATEEXPRESSION" : "委托表达式", + "PROPERTY.EXECUTIONLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER" : "输入委托表达式", + "PROPERTY.EXECUTIONLISTENERS.UNSELECTED" : "没有配置执行监听", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME" : "名称", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.NAME.PLACEHOLDER" : "输入名称", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.EXPRESSION" : "表达式", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.EXPRESSION.PLACEHOLDER" : "输入表达式", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.STRINGVALUE" : "字符串", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.STRINGVALUE.PLACEHOLDER" : "输入字符串", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.STRING" : "字符串", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.STRING.PLACEHOLDER" : "输入字符串", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.IMPLEMENTATION" : "实现类", + "PROPERTY.EXECUTIONLISTENERS.FIELDS.EMPTY" : "没有选择字段", + + "PROPERTY.FIELDS" : "{{length}} 字段", + "PROPERTY.FIELDS.EMPTY" : "没有选择字段", + "PROPERTY.FIELDS.NAME" : "名称", + "PROPERTY.FIELDS.NAME.PLACEHOLDER" : "输入名称", + "PROPERTY.FIELDS.EXPRESSION" : "表达式", + "PROPERTY.FIELDS.EXPRESSION.PLACEHOLDER" : "输入表达式", + "PROPERTY.FIELDS.STRINGVALUE" : "字符串", + "PROPERTY.FIELDS.STRINGVALUE.PLACEHOLDER" : "输入字符串", + "PROPERTY.FIELDS.STRING" : "字符串", + "PROPERTY.FIELDS.STRING.PLACEHOLDER" : "输入字符串", + "PROPERTY.FIELDS.IMPLEMENTATION" : "实现类", + "PROPERTY.FIELDS.UNSELECTED" : "没有选择字段", + + "PROPERTY.FORMPROPERTIES.VALUE" : "{{length}} 表单属性", + "PROPERTY.FORMPROPERTIES.EMPTY" : "没有配置表单", + "PROPERTY.FORMPROPERTIES.ID" : "活动编号", + "PROPERTY.FORMPROPERTIES.ID.PLACEHOLDER" : "输入活动编号", + "PROPERTY.FORMPROPERTIES.NAME" : "名称", + "PROPERTY.FORMPROPERTIES.NAME.PLACEHOLDER" : "输入名称", + "PROPERTY.FORMPROPERTIES.TYPE" : "类型", + "PROPERTY.FORMPROPERTIES.DATEPATTERN" : "时间选择框", + "PROPERTY.FORMPROPERTIES.DATEPATTERN.PLACEHOLDER" : "输入日期", + "PROPERTY.FORMPROPERTIES.VALUES" : "值", + "PROPERTY.FORMPROPERTIES.ENUMVALUES.EMPTY" : "没有选择的枚举值", + "PROPERTY.FORMPROPERTIES.VALUES.ID" : "编号", + "PROPERTY.FORMPROPERTIES.VALUES.NAME" : "名称", + "PROPERTY.FORMPROPERTIES.VALUES.ID.PLACEHOLDER" : "输入值的编号", + "PROPERTY.FORMPROPERTIES.VALUES.NAME.PLACEHOLDER" : "输入值的名称", + "PROPERTY.FORMPROPERTIES.EXPRESSION" : "表达式", + "PROPERTY.FORMPROPERTIES.EXPRESSION.PLACEHOLDER" : "输入表达式", + "PROPERTY.FORMPROPERTIES.VARIABLE" : "变量", + "PROPERTY.FORMPROPERTIES.VARIABLE.PLACEHOLDER" : "输入变量", + "PROPERTY.FORMPROPERTIES.REQUIRED" : "必输", + "PROPERTY.FORMPROPERTIES.READABLE" : "可读", + "PROPERTY.FORMPROPERTIES.WRITABLE" : "可写", + + "PROPERTY.INPARAMETERS.VALUE" : "{{length}} 输入参数", + "PROPERTY.INPARAMETERS.EMPTY" : "没有配置输入参数", + + "PROPERTY.OUTPARAMETERS.VALUE" : "{{length}} 返回参数", + "PROPERTY.OUTPARAMETERS.EMPTY" : "没有配置返回参数", + + "PROPERTY.PARAMETER.SOURCE" : "源", + "PROPERTY.PARAMETER.SOURCE.PLACEHOLDER" : "输入源", + "PROPERTY.PARAMETER.SOURCEEXPRESSION" : "源表达式", + "PROPERTY.PARAMETER.SOURCEEXPRESSION.PLACEHOLDER" : "输入源表达式", + "PROPERTY.PARAMETER.TARGET" : "目标", + "PROPERTY.PARAMETER.TARGET.PLACEHOLDER" : "输入目标", + "PROPERTY.PARAMETER.EMPTY" : "没有选择参数", + + "PROPERTY.SUBPROCESSREFERENCE.EMPTY" : "没有引用子流程", + "PROPERTY.SUBPROCESSREFERENCE.TITLE" : "引用错误的子流程", + "PROPERTY.SUBPROCESSREFERENCE.ERROR.SUBPROCESS" : "子流程加载错误.请稍后再试", + "PROPERTY.SUBPROCESSREFERENCE.FOLDER.ROOT" : "文件夹", + "PROPERTY.SUBPROCESSREFERENCE.FOLDER.LOADING" : "文件夹加载中...", + "PROPERTY.SUBPROCESSREFERENCE.FOLDER.EMPTY" : "文件夹未包含子文件夹", + "PROPERTY.SUBPROCESSREFERENCE.SUBPROCESS.LOADING" : "子流程加载中...", + "PROPERTY.SUBPROCESSREFERENCE.SUBPROCESS.EMPTY" : "文件夹包含子文件夹", + + "PROPERTY.FORMREFERENCE.EMPTY" : "没有引用表单", + "PROPERTY.FORMREFERENCE.TITLE" : "表单引用", + "PROPERTY.FORMREFERENCE.ERROR.FORM" : "表单加载错误.请稍后再试!", + "PROPERTY.FORMREFERENCE.FOLDER.ROOT" : "文件夹", + "PROPERTY.FORMREFERENCE.FOLDER.LOADING" : "文件夹加载中...", + "PROPERTY.FORMREFERENCE.FOLDER.EMPTY" : "文件夹未包含子文件夹", + "PROPERTY.FORMREFERENCE.FORM.LOADING" : "表单加载中...", + "PROPERTY.FORMREFERENCE.FORM.EMPTY" : "文件夹包含子文件夹", + + "PROPERTY.TASKLISTENERS.VALUE" : "{{length}} 任务监听", + "PROPERTY.TASKLISTENERS.EMPTY" : "未配置任务监听", + "PROPERTY.TASKLISTENERS.EVENT" : "事件", + "PROPERTY.TASKLISTENERS.CLASS" : "类", + "PROPERTY.TASKLISTENERS.CLASS.PLACEHOLDER" : "输入类名", + "PROPERTY.TASKLISTENERS.EXPRESSION" : "表达式", + "PROPERTY.TASKLISTENERS.EXPRESSION.PLACEHOLDER" : "请输入表达式", + "PROPERTY.TASKLISTENERS.DELEGATEEXPRESSION" : "委托表达式", + "PROPERTY.TASKLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER" : "请输入委托表达式", + "PROPERTY.TASKLISTENERS.UNSELECTED" : "没有选择任务监听", + "PROPERTY.TASKLISTENERS.FIELDS.NAME" : "名称", + "PROPERTY.TASKLISTENERS.FIELDS.NAME.PLACEHOLDER" : "请输入名称", + "PROPERTY.TASKLISTENERS.FIELDS.EXPRESSION" : "表达式", + "PROPERTY.TASKLISTENERS.FIELDS.EXPRESSION.PLACEHOLDER" : "请输入表达式", + "PROPERTY.TASKLISTENERS.FIELDS.STRINGVALUE" : "字符串", + "PROPERTY.TASKLISTENERS.FIELDS.STRINGVALUE.PLACEHOLDER" : "请输入字符串", + "PROPERTY.TASKLISTENERS.FIELDS.STRING" : "字符串", + "PROPERTY.TASKLISTENERS.FIELDS.STRING.PLACEHOLDER" : "请输入字符串", + "PROPERTY.TASKLISTENERS.FIELDS.IMPLEMENTATION" : "执行", + "PROPERTY.TASKLISTENERS.FIELDS.EMPTY" : "未选择字段", + + "PROPERTY.EVENTLISTENERS.DISPLAY" : "{{length}} 事件监听", + "PROPERTY.EVENTLISTENERS.EMPTY" : "未配置事件侦听器", + "PROPERTY.EVENTLISTENERS.EVENTS": "事件", + "PROPERTY.EVENTLISTENERS.RETHROW": "抛出事件?", + "PROPERTY.EVENTLISTENERS.CLASS" : "类", + "PROPERTY.EVENTLISTENERS.CLASS.PLACEHOLDER" : "输入类名", + "PROPERTY.EVENTLISTENERS.DELEGATEEXPRESSION" : "委托表达式", + "PROPERTY.EVENTLISTENERS.DELEGATEEXPRESSION.PLACEHOLDER" : "请输入委托表达式", + "PROPERTY.EVENTLISTENERS.ENTITYTYPE" : "类型", + "PROPERTY.EVENTLISTENERS.ENTITYTYPE.PLACEHOLDER" : "请输入类型", + "PROPERTY.EVENTLISTENERS.RETHROWTYPE": "抛出事件类型", + "PROPERTY.EVENTLISTENERS.ERRORCODE" : "错误代码", + "PROPERTY.EVENTLISTENERS.ERRORCODE.PLACEHOLDER" : "请输入错误代码", + "PROPERTY.EVENTLISTENERS.MESSAGENAME" : "消息名称", + "PROPERTY.EVENTLISTENERS.MESSAGENAME.PLACEHOLDER" : "请输入消息名称", + "PROPERTY.EVENTLISTENERS.SIGNALNAME" : "信号名称", + "PROPERTY.EVENTLISTENERS.SIGNALNAME.PLACEHOLDER" : "请输入信号名称", + "PROPERTY.EVENTLISTENERS.UNSELECTED" : "没有选择事件监听器", + + "PROPERTY.SIGNALDEFINITIONS.DISPLAY" : "{{length}} 信号定义", + "PROPERTY.SIGNALDEFINITIONS.EMPTY" : "没有配置信号定义", + "PROPERTY.SIGNALDEFINITIONS.SCOPE-GLOBAL": "全局", + "PROPERTY.SIGNALDEFINITIONS.SCOPE-PROCESSINSTANCE": "流程初始化", + "PROPERTY.SIGNALDEFINITIONS.ID" : "编号", + "PROPERTY.SIGNALDEFINITIONS.NAME" : "名称", + "PROPERTY.SIGNALDEFINITIONS.SCOPE" : "范围", + + "PROPERTY.MESSAGEDEFINITIONS.DISPLAY" : "{{length}} 消息定义", + "PROPERTY.MESSAGEDEFINITIONS.EMPTY" : "没有配置消息定义", + "PROPERTY.MESSAGEDEFINITIONS.ID" : "编号", + "PROPERTY.MESSAGEDEFINITIONS.NAME" : "名称", + + "PROPERTY.SEQUENCEFLOW.ORDER.EMPTY" : "没有确定顺序流排序", + "PROPERTY.SEQUENCEFLOW.ORDER.NOT.EMPTY" : "顺序流排序", + "PROPERTY.SEQUENCEFLOW.ORDER.NO.OUTGOING.SEQUENCEFLOW.FOUND" : "没有输出顺序流.", + "PROPERTY.SEQUENCEFLOW.ORDER.DESCRIPTION" : "不能设置已经被使用的编号:", + "PROPERTY.SEQUENCEFLOW.ORDER.SEQUENCEFLOW.VALUE" : "顺序流 {{targetType}} {{targetTitle}}", + + "PROPERTY.SEQUENCEFLOW.CONDITION.TITLE" : "条件", + "PROPERTY.SEQUENCEFLOW.CONDITION.TYPE.TITLE" : "条件类型", + "PROPERTY.SEQUENCEFLOW.CONDITION.TYPE.VARIABLE" : "选择的变量", + "PROPERTY.SEQUENCEFLOW.CONDITION.TYPE.STATIC" : "静态值", + "PROPERTY.SEQUENCEFLOW.CONDITION.STATIC" : "条件表达式", + "PROPERTY.SEQUENCEFLOW.CONDITION.STATIC_PLACEHOLDER" : "输入表达式值", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.TYPE" : "变量类型", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.NO-CONDITION" : "没有条件", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.FORM-FIELD" : "表单字段", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.FORM-OUTCOME" : "表单输出", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.SELECT-FIELD" : "选择的字段", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.NO-FIELDS-AVAILABLE" : "没有字段变量", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.SELECT-FORM" : "选择表单", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.NO-FORMS-AVAILABLE" : "没有表单变量", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.SELECT-OPERATOR" : "选择操作", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.EQUALS" : "等于", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.NOTEQUALS" : "不等于", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.LESSTHAN" : "小于", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.GREATERTHAN" : "大于", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.SELECT-OUTCOME" : "选择输出", + "PROPERTY.SEQUENCEFLOW.CONDITION.VARIABLE.NO-OUTCOMES-AVAILABLE" : "没有输出变量", + "PROPERTY.SEQUENCEFLOW.CONDITION.NO-CONDITION-DISPLAY" : "没有条件", + + "MODEL.SAVE.TITLE" : "保存模型", + "MODEL.NAME" : "名称", + "MODEL.DESCRIPTION" : "描述", + "MODEL.SAVE.NEWVERSION" : "存为新版本? 这样你可以随时回到以前的版本", + "MODEL.SAVE.COMMENT" : "注释", + "MODEL.SAVE.SAVING" : "保存模型", + "MODEL.LASTMODIFIEDDATE" : "上次保存时间", + "MODEL.SAVE.ERROR": "未知错误:保存失败!", + + "EVENT_TYPE.ACTIVITY.COMPENSATE.TOOLTIP": "一个活动被另外一个活动替代执行", + "EVENT_TYPE.ACTIVITY.COMPLETED.TOOLTIP": "一个活动被成功的执行", + "EVENT_TYPE.ACTIVITY.ERROR.RECEIVED.TOOLTIP": "在收到活动错误之前,活动已收到错误事件", + "EVENT_TYPE.MEMBERSHIP.CREATED.TOOLTIP": "一个唯一的成员被创建", + "EVENT_TYPE.MEMBERSHIP.DELETED.TOOLTIP": "一个唯一的成员被删除", + "EVENT_TYPE.MEMBERSHIPS.DELETED.TOOLTIP": "所有成员都被删除.可能是由于没有事件被分配", + "EVENT_TYPE.TASK.ASSIGNED.TOOLTIP": "在ENTITY_UPDATED事件抛出时,任务已经被分配", + "EVENT_TYPE.TASK.COMPLETED.TOOLTIP": "在任务实体删除前任务已经被完成", + "EVENT_TYPE.UNCAUGHT.BPMNERROR.TOOLTIP": "一个BPMN被抛出,但没有捕获", + "EVENT_TYPE.VARIABLE.CREATED.TOOLTIP": "一个变量被创建", + "EVENT_TYPE.VARIABLE.DELETED.TOOLTIP": "一个变量被删除", + "EVENT_TYPE.VARIABLE.UPDATED.TOOLTIP": "一个变量被更新" +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/images/bpmn-error.png b/src/main/resources/static/activiti-editor/editor-app/images/bpmn-error.png new file mode 100644 index 0000000000000000000000000000000000000000..529f76cb4c3806358f8137b65b7771feb8afc0df GIT binary patch literal 492 zcmV<I0Tcd-P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10clA@K~y-6rIRsh!cY{2zbiq65D}+G1|cr_0bNTe?cR<ZvUCVI zcWV6wwZEZ4p^(L?xVaREuF}~l;2;@`As`Zb9W)^tTWG!8d)#y1Ip>`#T5FD}%28;* z*uM}F={k<D;R-kb1d&g)e(Qzdv)-dD#q)iuWmgO%0M37S@ME2(H&3(Kyd*(HBm>u# zqGnk+s%BZ#l>#^w!*~@DDGlg4j-P?=Mk6|d0cNv_*=*7o47eMOs4IoQWw+hFEqSoj z%qmIvn$J<Liys64DAy&LPFW?%rdR80;AMxw)-aZFOyBc}rc;#b=HR~Pv5e!a_pBu0 zkF`8BU;-P%{2<6*&Y1W?P&9T@8XzzPsG24X+s<icavHWx)iif{p^yU+kq5_lXZsVY zB*`_`EQ_jXvWOypaW4!nvOwhwwAOl^rXDa}L{ZT&mT{be*J<h%(<uAPbRfzA6M^Al i81{dS@_*{+ZTtq@b)vAJ@*&Uw0000<MNUMnLSTY1+s+37 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/bpmn-warning.png b/src/main/resources/static/activiti-editor/editor-app/images/bpmn-warning.png new file mode 100644 index 0000000000000000000000000000000000000000..f949d19c7f14d029bdc6293f3a1e599d1949f54a GIT binary patch literal 469 zcmV;`0V@89P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000C8000C80p{Kvc>n+a8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10a8gsK~y-6rIRr)Ls1mRf9Jl}_g*yy7P_|vU08_3WH59wb+rg- zEPMe&zW@nKsSsbmW;TgQ#3FWKAQoEhzIzO48?C1FBzL(d=Xd`9|IHOuWsowxnsGHV z-Ka$q{{qC-p&2pm(o?y%hv|hs0z|~qJ-`D39J^G+?;DUDM9U~MqEf=iJTMVw!*bVE z9U&gcu(i=GVEnbWF#uajU!dfCFUYg<^3+p-wc!>p4z$RM0;5S1S9)4#>_>T!jc!uE zIOX?RSojs-VYY$bHvr%p%uf47GXr}NErOi2FH|wJDdQe(!VQpV4v8*#tM$_spd!A_ zMpwXOhiY(qK4)ty+<7DQ0wsMn0C6^4?=qYyGUuF|0_s1gIs2U6Y-S)T#V&r66x;`4 z@BqY}Z7l-$pOWMRG_P$w0b=yr#MS|?U+3Gx8*tppV1VlR8~dpb#`bi|V#N?300000 LNkvXXu0mjf>>$2_ literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/datadefinition.png b/src/main/resources/static/activiti-editor/editor-app/images/datadefinition.png new file mode 100644 index 0000000000000000000000000000000000000000..ef15706d65c370684674fc02baa371e6794e1184 GIT binary patch literal 778 zcmV+l1NHogP)<h;3K|Lk000e1NJLTq000mG000mO1^@s7X!Otb00001b5ch_0Itp) z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXQ4 z2OBh58?+Aq00N3hL_t(I5rtA+NEA^N{$?D6UD2ovV<`fyAfrJ0A!;84!G~TlA55Y! z>?y?u>5nX=s2+k6Bqi)6q9U!WmmY%Xp&}|QG>TfppHdS_aHocy*`2v}=63GPI>?4} z;oNi2Irn_`JLg<Q2m!g&Q@6edUDt&YdUXA_XzJf2(0O-ESe6xvW~An!>ruRz8GzxK z2y=WW+O$k26X253-t!i!ZQICZvpAlpMaDFt5+K?i?ZJ+UeRz*UP%bAX+~VRQbpd0s zo=A>*TH0dj=j5F4Z>#x(csw57X?{1NYL=NMN1^W=_<jO&(ZgUKhs_-%3%dYWTE1+) zsF>@{;)nGAQ%8uOJ80LR{R->K54P8pDT?e<eqh0lL?VjHIY-O2ak!+(5sK@&!M#*U z7ry8z8c2%HDRJS+L7|hDBvr;7wD!$_ISenq4dD629W0B)aOP=~kDzhxqPt}!<WsWt zEQ#q@@Q`b6eh;MGe7n|%muF>v$6#B$X8V<tC5p%fJP(4z^<2^do*<hDdlZz~rC3QJ zGn2{L(~r9w`?SiP+j=S4=c6d33REa0Dm34>#8$K_#(OE&r+HMvxrQ|eAZV8dLK+z! zULqH$uBt*?&!ivMT$h7U0~9||0uT+!gx2Dp({aBBrfuNnkzp8y0d6z@jwT1h8Ot%q z<q}R}x)TrYaX9p|9J&)*z8<?bG~i^S9-n51u!7$R09e)rBY+@P(g;@CNn`KUqnMf> z^S>we7{31eh?3}PG*q|Z_2gA-JYUb{6b8%I#u`1@X_vY$HFer3J%+5~5QAX06{VHf zRbGb=({J!<bO>9_{s%OL1ONTb3yjLU6w~zzqEnZ6u0uiOFGOsQd!)&8xBvhE07*qo IM6N<$f)Qe1V*mgE literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/delete.png b/src/main/resources/static/activiti-editor/editor-app/images/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..21a460a2d8f96db31bc0302669154c4a16a8584c GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQr_7x;Tbd z^xh3V&3njzr`Ap81(S>w!|fx}BpO|Rc;p-uI%$)0(Yd<gi-p4~tqChGNc(U4vc|&y ze4nz)MwZu?8fVIS++*Ni=s0n+y8hJbu&Jlr1#h+rs2tm&y3>5KIisiUiY)$w&#k`| zTP`#_kvM1R_c_StwcWN4MZr(6N~WxxQW2V9_Aeq~#=-d~?rjggx@{Zts#{jicTIU- u|Iq8xx>deMOZgv6np8No{^%n`JBAD4-Mxy+so#JOXYh3Ob6Mw<&;$To3wJsI literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/loading.gif b/src/main/resources/static/activiti-editor/editor-app/images/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..7019077d9314bdcf3f58c2f9daf61fb1a7181a97 GIT binary patch literal 17550 zcmeI)c{mhm|M>A)&0>a`vF|hX-4H@(3^7zf2ub#kiY!U$%z`L1gpf4KT9UFPZMIO< znUYFcB$YbqsI-^!yJx0!p7V5`=lk2P=lcDwZ-4rOtLy51d4E3lJ-N6#TUm$DAT&rd z1cHDe(%I>~-My0&lTLJ}s+uZIb<G>sZ_K`)4G#@J+i_N!Bwb!sK6H6#`uTK2W5eA$ zcfWl4lDIiBXIGB5m$$i@xw4{iT51|j0@v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%^b%s6Tn}Y$OrPNHQp~@yuh??*u{QE-%Y7dWg6^~8 zv>o!Dg}cgQ?#KG1_DQhMPAbX~V6y?EP%(m~60uT>x8Udo6plb^Ie_QWOW}cIPH4!Y F{{aeyh2H=G literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/logo-2x.png b/src/main/resources/static/activiti-editor/editor-app/images/logo-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7572b74dc63026379868ac6e7862c59fde09ed0e GIT binary patch literal 21832 zcmeI4bzIZk+s8+TC?XPqA{|O?G^0UE8YD!7!3K;NvC%CpAc80%r4rJJgfx<h5|UD) zA{~l!KSRB5y?5(=zvp>9f3nvL*mbURea<=WbDdzkzJzOOC><xIBLx5e$5oUSbN~Px zcJzA?F(LZ<@~Z0u`Ui=lvJnyhI7WH+g#$=RrUd}Rhv0gKC_{BMaSI1~UI^5|9LDQz z?})Aq07yu?J3=gMVJJp(m=zo$$^5yxo|zF2m1H&$Qs-B9l!sZvl|7wdx}F+(7M`{i zVo+vjDN+e{akPLv3<Y6yx3@ze#oZ;Dzv+sj-yat9F*AOvg0hulmOX5c(NJBBQQpBB z#wf%q#ACq^6l4?;;{^%<1x10}j39oX03W{qA5ee?2omQP69)=0{&+D<k)q#8I72PP zbrckTG>5h%nXOSMM{zzrH#aw4HvwJ;XDdFSn3xzJKZp+m;z8HoL3$ui5O*E~lI6R| zUpfjfq=hrw5e0WZFdphc%pF`%lFZD94gLN4F)n+@zZ*gzf3QPS<a38O@&S4I`Th{3 zu8uv--u}0dNR$rj=g5BBAX3l65yqzjLpr!PTforOS$@|AB<hkYdPqMI{TD))Tww^* zZ>69Xf9p89INN;#4YlBd*}?45AxJa@;BUv`XzhS<Kw3Ne0pQ>6KVn3|E&ssc(DTPI zm^=IrVTYdYVc&A<`&3Jy6Ioo|83sW)IO{n$*hzg)SFOK#&nPd?$Y}saKpotWToQbk zwSVT!Pa&8B1O<~q=d=hqn|VOOdi+3f0WooY&_#Yx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>bOP4)N=F9P{T?q%0Op&E>{%m)8y4t=zQsX zEG6A~@80)Mo|Pvbs+ofzr+P`$)Ciw;hE63=3h{u^TbMF3JtTjXnUE?9_8}`2eY00= zkIFK#i(C*$)b{aJs}j0jt8OgXU6V2(BYDF3L`!GDX|QJh;=Gc-^f4yfoB@YZcS!Ce zXgHdKh^x;nUQRT4czk21yXSn+h&<0Nn!$IC?^=0MY$Pt$CeU{!Mf6@TK5oCHDLl+S zt6!=eLoP0_{O$AmSyq-Td{#5OclIaxZh6@^nJnZSFlVkfpJh{%n9w{eMuZ@2MKK8# zs;IG}hY`-jL;=M;Ab$0J^5SmS)5Ze{`{%6*FrLQtFFhB<>JPe<D=dp}d^v+=21a>* z{C$8ug$#c<sCk^Qv4CKNJl{-d%m$q-F+onlq%(H~B5{H(91W3I-{{!y>Jz^i9y^>6 z^tjZ_Z?Xq-mwwhTIT4A!>iC(iRBOjAz(X!9m&HZ<d(Ssp56A(KCGRtL?A1|+|Lauc Ml7>Q|oY{^40mfIMa{vGU literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/logo.png b/src/main/resources/static/activiti-editor/editor-app/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2ce621d6d7268115bd34997427175af5ffa6354a GIT binary patch literal 18297 zcmeI3dpy(a|HnTliF7O7_Z>RSB*g4w4zo>;AtVv0Ze|<CY_m-cg{kNq6>jN3B{HN` zqywT8a!e^YsO}Et6q0aPzt5=XllHxT-|zkB_IPZcy|4H6eqHbDdA+Y|pZ)RK;q0_b zQC?LZ002chTPqjvnh3sC<Yd9m=GoI4!OL{E?HVosC@72GQb6kAxd33gpYH0x^Kf*) zQ&>UzWGc&trXLo>273bl!7PkTrUcS>Fdv#9ok@iETrP#f=u{%y9p{L0WLwhw>9!FZ z+NuaAS4u=6#e@nsBgqrO@Ss2tjYo!s1u>Xhd>9cvs*4A|i<*&e*k~7CAQ5gZ8W85; z=nS)DacD4{J`O=ap$%Y0Ci-X`+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;;PR$R#op8`-#GhGH?Gge$$m`(yi*j2BVNU9eTT7e3BksJWPKrzXT{Q9)A8%@99UW zjk|sc4)>fcy?r19b^P@llQY~_GsCrTvw_cv@l%qIWaICj6l7Y3tqazxxw?ExKy__< zi`L5}HtP%=WdrQvi*YN$0~kGy7XAvcN?vhlxr)xe!_v$7>Cxne-Fp^xe+=XVTSr+& zj+~lO5K(hVt)AYwNd0>2z8UvrPZ=(KxYYIl=EH-AMkG^Dan8xYP%YOCt-m`d@w&dJ mmEcB=*IIyqyVIIJ%L1iVtoY?XF?iDr0Cv_+R;MkzH~$|nPg#oq literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/nw-handle-dark.gif b/src/main/resources/static/activiti-editor/editor-app/images/nw-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..6e49d6967c08db2c02a3aeb9c1f3cacb9c8665f6 GIT binary patch literal 839 zcmZ?wbhEHb<YM4rXlDR{(8itr|NjRwM~Tr87+E2p_>+Yh<YOHW0m>5$94ZWq95Nmo l794Em5abeINJw;KWMp#S2{2G%=w_Cco6{kn+|a;a4FKuB5a0j+ literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/se-handle-dark.gif b/src/main/resources/static/activiti-editor/editor-app/images/se-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..c4c1087868afab5b5bfd329f52d9907eb1c0061a GIT binary patch literal 838 zcmZ?wbhEHb<YM4rXlDR{(8itr|NjRwM~Tr87+E2p_>+YZ<YOHW0m>5$9Lfxg96SOJ k3mltSSY>Q9925^Vv52er?AV~l(9La}b>~E3vIB!P0N;ZWjQ{`u literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/shapemenu_highlight.png b/src/main/resources/static/activiti-editor/editor-app/images/shapemenu_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..5d1a4401a604ef3f70a1c9c1f6d8736ad925549e GIT binary patch literal 462 zcmV;<0WtoGP)<h;3K|Lk000e1NJLTq000;O000;W1^@s6;CDUv0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUza7jc#RCwC7RzXg~Fc6H_q2+*(5WIl@ z<OBIb|By2XZtwvve2WWG4@gOrOViqBU3RN!nn;D1l}3)DWM+5c%-Uq*VFU!wdm5e* zWL0Ex?}%uM*fMfiEr_5%gk$Uk9)wQ>lsuAM0LI8QQ>`G9Zy7xZom4_qRb6#m_u!oS z48M%{PTRJRtJUgSDmO>uF<T~o3NwR6o|)@XDmU1ch4=o$7;~4+2<G^**532wCbmsW ziR)r6c?=@Dja>S{bqnT#RH1xCunlcO0qsgou;(eUz&`2WpPD5Wp)m_cDnb*Mkt}G; zpi&Eje-sEb=71@P)oDrW)`6d=3a0{Uw=N<1ffEI`(WquK|8VS3AV~H-+x6RAfu?ER zW$<jV?fZF9mgNmU@WR7m{fB|GuIu`>D2nLFOPmKNqT_N2<I<e5V}i7#mpO14n|AOZ zo)*seKm35WhaDNFECNpzc(Oo44Djt7oGkn>v2Ote0Ayo1Vm4Z4X8-^I07*qoM6N<$ Eg6!+dSO5S3 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/images/wrench.png b/src/main/resources/static/activiti-editor/editor-app/images/wrench.png new file mode 100644 index 0000000000000000000000000000000000000000..179c9472839754de099834131355507e7d1a9d64 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQmkQx;Tbd z^e&xj=y%vb!1aEQPN1Ush0BtG7oTux_DtdPjtlpYVZ3Nn-BIGPF!DFc!UtTIjowvO zT2lPHoiZK=`nKP>`MvC)hjQAn8Ny#HLquF}ZF?)TBjBnh$HUy<%kw^P&0y%4w(z|? zIj-sbe8v^8e@QBw-t^g`Z~9&qrJ|po^|}_Z8Z_6ZJ=h!mK-hxy#OFQMAHU9*t$4pR zbC$ZX_3iNRt3Mqb+4sG6sT7~cpRjh7xnj%oy@GrPPOEsnJH08VzSM~Ao}dhKKC6<_ z@dMF~#d%q2;RoIdRH!o*@Y?V+G9Ec2AXs?LmvPmqs;!LLTFKXca<{y1I=t_-Y&OvQ N44$rjF6*2UngCpdk4FFi literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js new file mode 100644 index 0000000..3c823f1 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js @@ -0,0 +1,8 @@ +/* + AngularJS v1.2.13 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&d.$apply())})();k=!0;d.$watch(function(){var a,e,d;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)(e=c[a],f.isString(e))?e!==g[a]&&(b.cookies(a,e),d=!0):f.isDefined(g[a])?c[a]=g[a]:delete c[a];if(d)for(a in e=b.cookies(),c)c[a]!==e[a]&&(m(e[a])?delete c[a]:c[a]=e[a])}); +return c}]).factory("$cookieStore",["$cookies",function(d){return{get:function(b){return(b=d[b])?f.fromJson(b):b},put:function(b,c){d[b]=f.toJson(c)},remove:function(b){delete d[b]}}}])})(window,window.angular); +//# sourceMappingURL=angular-cookies.min.js.map \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js.map b/src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js.map new file mode 100644 index 0000000..1629948 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-cookies.min.js", +"lineCount":7, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAoBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CA4BW,UA5BX,CA4BuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAS,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACxEC,EAAU,EAD8D,CAExEC,EAAc,EAF0D,CAGxEC,CAHwE,CAIxEC,EAAU,CAAA,CAJ8D,CAKxEC,EAAOV,CAAAU,KALiE,CAMxEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAIgB,CAAJ,GAAYX,EAAZ,CAEE,CADAY,CACK,CADGZ,CAAA,CAAQW,CAAR,CACH,CAAAjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAAL,EAMWA,CANX,GAMqBX,CAAA,CAAYU,CAAZ,CANrB,GAOEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CARZ,EACMnB,CAAAqB,UAAA,CAAkBd,CAAA,CAAYU,CAAZ,CAAlB,CAAJ,CACEX,CAAA,CAAQW,CAAR,CADF,CACkBV,CAAA,CAAYU,CAAZ,CADlB,CAGE,OAAOX,CAAA,CAAQW,CAAR,CASb,IAAIE,CAAJ,CAIE,IAAKF,CAAL,GAFAK,EAEahB,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBK,CAAA,CAAeL,CAAf,CAAtB,GAEMN,CAAA,CAAYW,CAAA,CAAeL,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBK,CAAA,CAAeL,CAAf,CALpB,CAlCU,CAThB,CAEA;MAAOX,EA1BqE,CAA3D,CA5BvB,CAAAH,QAAA,CA4HW,cA5HX,CA4H2B,CAAC,UAAD,CAAa,QAAQ,CAACoB,CAAD,CAAW,CAErD,MAAO,KAYAC,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHP,CACG,CADKK,CAAA,CAASE,CAAT,CACL,EAAQzB,CAAA0B,SAAA,CAAiBR,CAAjB,CAAR,CAAkCA,CAFxB,CAZd,KA4BAS,QAAQ,CAACF,CAAD,CAAMP,CAAN,CAAa,CACxBK,CAAA,CAASE,CAAT,CAAA,CAAgBzB,CAAA4B,OAAA,CAAeV,CAAf,CADQ,CA5BrB,QA0CGW,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CA1CjB,CAF8C,CAAhC,CA5H3B,CApBsC,CAArC,CAAA,CAoME1B,MApMF,CAoMUA,MAAAC,QApMV;", +"sources":["angular-cookies.js"], +"names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","isDefined","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"] +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop.min-1.0.3.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop.min-1.0.3.js new file mode 100644 index 0000000..555b5f6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop.min-1.0.3.js @@ -0,0 +1,9 @@ +/** + * Implementing Drag and Drop functionality in AngularJS is easier than ever. + * Demo: http://codef0rmer.github.com/angular-dragdrop/ + * + * @version 1.0.3 + * + * (c) 2013 Amit Gharat a.k.a codef0rmer <amit.2006.it@gmail.com> - amitgharat.wordpress.com + */ +var jqyoui=angular.module("ngDragDrop",[]).service("ngDragDropService",["$timeout","$parse",function($timeout,$parse){this.callEventCallback=function(scope,callbackName,event,ui){if(!callbackName){return}var args=[event,ui];var match=callbackName.match(/^(.+)\((.+)\)$/);if(match!==null){callbackName=match[1];values=eval("["+match[0].replace(/^(.+)\(/,"").replace(/\)/,"")+"]");args.push.apply(args,values)}scope[callbackName].apply(scope,args)};this.invokeDrop=function(e,t,n,r){var i="",s="",o={},u={},a=null,f={},l={},c,h,p=null,d=t.scope(),v=e.scope();i=e.attr("ng-model");s=t.attr("ng-model");c=v.$eval(i);h=d.$eval(s);p=t.find("[jqyoui-draggable]:last");u=d.$eval(t.attr("jqyoui-droppable"))||[];o=v.$eval(e.attr("jqyoui-draggable"))||[];o.index=this.fixIndex(v,o,c);u.index=this.fixIndex(d,u,h);a=angular.isArray(c)?o.index:null;f=angular.isArray(c)?c[a]:c;if(angular.isArray(h)&&u&&u.index!==undefined){l=h[u.index]}else if(!angular.isArray(h)){l=h}else{l={}}if(o.animate===true){this.move(e,p.length>0?p:t,null,"fast",u,null);this.move(p.length>0&&!u.multiple?p:[],e.parent("[jqyoui-droppable]"),jqyoui.startXY,"fast",u,function(){$timeout(function(){e.css({position:"relative",left:"",top:""});p.css({position:"relative",left:"",top:""});this.mutateDraggable(v,u,o,i,s,l,e);this.mutateDroppable(d,u,o,s,f,a);this.callEventCallback(d,u.onDrop,n,r)}.bind(this))}.bind(this))}else{$timeout(function(){this.mutateDraggable(v,u,o,i,s,l,e);this.mutateDroppable(d,u,o,s,f,a);this.callEventCallback(d,u.onDrop,n,r)}.bind(this))}};this.move=function(e,t,n,r,i,s){if(e.length===0){if(s){window.setTimeout(function(){s()},300)}return false}var o=9999,u=e.offset(),a=t&&t.is(":visible");if(n===null&&t.length>0){if(t.attr("jqyoui-draggable")!==undefined&&t.attr("ng-model")!==undefined&&t.is(":visible")&&i&&i.multiple){n=t.offset();if(i.stack===false){n.left+=t.outerWidth(true)}else{n.top+=t.outerHeight(true)}}else{n=t.css({visibility:"hidden",display:"block"}).offset();t.css({visibility:"",display:a?"":"none"})}}e.css({position:"absolute","z-index":o}).css(u).animate(n,r,function(){if(s)s()})};this.mutateDroppable=function(e,t,n,r,i,s){var o=e.$eval(r);e.__dragItem=i;if(angular.isArray(o)){if(t&&t.index>=0){o[t.index]=i}else{o.push(i)}if(n&&n.placeholder===true){o[o.length-1]["jqyoui_pos"]=s}}else{$parse(r+" = __dragItem")(e);if(n&&n.placeholder===true){o["jqyoui_pos"]=s}}};this.mutateDraggable=function(e,t,n,r,i,s,o){var u=angular.equals(angular.copy(s),{}),a=e.$eval(r);e.__dropItem=s;if(n&&n.placeholder){if(n.placeholder!="keep"){if(angular.isArray(a)&&n.index!==undefined){a[n.index]=s}else{$parse(r+" = __dropItem")(e)}}}else{if(angular.isArray(a)){if(u){if(n&&n.placeholder!==true&&n.placeholder!=="keep"){a.splice(n.index,1)}}else{a[n.index]=s}}else{$parse(r+" = __dropItem")(e);if(e.$parent){$parse(r+" = __dropItem")(e.$parent)}}}o.css({"z-index":"",left:"",top:""})};this.fixIndex=function(e,t,n){if(t.applyFilter&&angular.isArray(n)&&n.length>0){var r=e[t.applyFilter](),i=r[t.index],s=undefined;n.forEach(function(e,t){if(angular.equals(e,i)){s=t}});return s}return t.index}}]).directive("jqyouiDraggable",["ngDragDropService",function(e){return{require:"?jqyouiDroppable",restrict:"A",link:function(t,n,r){var i,s;var o=function(o,u){if(o){i=t.$eval(n.attr("jqyoui-draggable"))||[];n.draggable({disabled:false}).draggable(t.$eval(r.jqyouiOptions)||{}).draggable({start:function(n,r){s=angular.element(this).css("z-index");angular.element(this).css("z-index",99999);jqyoui.startXY=angular.element(this).offset();e.callEventCallback(t,i.onStart,n,r)},stop:function(n,r){angular.element(this).css("z-index",s);e.callEventCallback(t,i.onStop,n,r)},drag:function(n,r){e.callEventCallback(t,i.onDrag,n,r)}})}else{n.draggable({disabled:true})}};t.$watch(function(){return t.$eval(r.drag)},o);o()}}}]).directive("jqyouiDroppable",["ngDragDropService",function(e){return{restrict:"A",priority:1,link:function(t,n,r){var i=function(i,s){if(i){n.droppable({disabled:false}).droppable(t.$eval(r.jqyouiOptions)||{}).droppable({over:function(n,r){var i=t.$eval(angular.element(this).attr("jqyoui-droppable"))||[];e.callEventCallback(t,i.onOver,n,r)},out:function(n,r){var i=t.$eval(angular.element(this).attr("jqyoui-droppable"))||[];e.callEventCallback(t,i.onOut,n,r)},drop:function(t,n){e.invokeDrop(angular.element(n.draggable),angular.element(this),t,n)}})}else{n.droppable({disabled:true})}};t.$watch(function(){return t.$eval(r.drop)},i);i()}}}]) diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop_1.0.7/angular-dragdrop.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop_1.0.7/angular-dragdrop.min.js new file mode 100644 index 0000000..ec57732 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-dragdrop_1.0.7/angular-dragdrop.min.js @@ -0,0 +1,29 @@ +/** + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/** + * Implementing Drag and Drop functionality in AngularJS is easier than ever. + * Demo: http://codef0rmer.github.com/angular-dragdrop/ + * + * @version 1.0.7 + * + * (c) 2013 Amit Gharat a.k.a codef0rmer <amit.2006.it@gmail.com> - amitgharat.wordpress.com + */ +(function(e,t,n){"use strict";var r=t.module("ngDragDrop",[]).service("ngDragDropService",["$timeout","$parse",function(i,s){this.callEventCallback=function(e,t,n,r){function f(t){var n=t.indexOf("(")!==-1?t.indexOf("("):t.length,r=t.lastIndexOf(")")!==-1?t.lastIndexOf(")"):t.length,i=t.substring(n+1,r),o=t.match(/^[^.]+.\s*/)[0].slice(0,-1);o=e[o]&&typeof e[o].constructor==="function"?o:null;return{callback:t.substring(o&&o.length+1||0,n),args:(i&&i.split(",")||[]).map(function(t){return s(t)(e)}),constructor:o}}if(!t)return;var i=f(t),o=i.callback,u=i.constructor,a=[n,r].concat(i.args);e.$apply((e[o]||e[u][o]).apply(e,a))};this.invokeDrop=function(e,s,o,u){var a="",f="",l={},c={},h=null,p={},d={},v,m,g=null,y=s.scope(),b=e.scope();a=e.ngattr("ng-model");f=s.ngattr("ng-model");v=b.$eval(a);m=y.$eval(f);g=s.find("[jqyoui-draggable]:last,[data-jqyoui-draggable]:last");c=y.$eval(s.attr("jqyoui-droppable")||s.attr("data-jqyoui-droppable"))||[];l=b.$eval(e.attr("jqyoui-draggable")||e.attr("data-jqyoui-draggable"))||[];l.index=this.fixIndex(b,l,v);c.index=this.fixIndex(y,c,m);h=t.isArray(v)?l.index:null;p=t.copy(t.isArray(v)?v[h]:v);if(t.isArray(m)&&c&&c.index!==n){d=m[c.index]}else if(!t.isArray(m)){d=m}else{d={}}d=t.copy(d);if(l.animate===true){this.move(e,g.length>0?g:s,null,"fast",c,null);this.move(g.length>0&&!c.multiple?g:[],e.parent("[jqyoui-droppable],[data-jqyoui-droppable]"),r.startXY,"fast",c,t.bind(this,function(){i(t.bind(this,function(){e.css({position:"relative",left:"",top:""});g.css({position:"relative",left:"",top:"",display:""});this.mutateDraggable(b,c,l,a,f,d,e);this.mutateDroppable(y,c,l,f,p,h);this.callEventCallback(y,c.onDrop,o,u)}))}))}else{i(t.bind(this,function(){this.mutateDraggable(b,c,l,a,f,d,e);this.mutateDroppable(y,c,l,f,p,h);this.callEventCallback(y,c.onDrop,o,u)}))}};this.move=function(t,r,i,s,o,u){if(t.length===0){if(u){e.setTimeout(function(){u()},300)}return false}var a=9999,f=t[o.containment||"offset"](),l=r&&r.is(":visible"),c=r.hasClass("ng-hide");if(i===null&&r.length>0){if((r.attr("jqyoui-draggable")||r.attr("data-jqyoui-draggable"))!==n&&r.ngattr("ng-model")!==n&&r.is(":visible")&&o&&o.multiple){i=r[o.containment||"offset"]();if(o.stack===false){i.left+=r.outerWidth(true)}else{i.top+=r.outerHeight(true)}}else{if(c)r.removeClass("ng-hide");i=r.css({visibility:"hidden",display:"block"})[o.containment||"offset"]();r.css({visibility:"",display:l?"block":"none"})}}t.css({position:"absolute","z-index":a}).css(f).animate(i,s,function(){if(c)r.addClass("ng-hide");if(u)u()})};this.mutateDroppable=function(e,n,r,i,o,u){var a=e.$eval(i);e.dndDragItem=o;if(t.isArray(a)){if(n&&n.index>=0){a[n.index]=o}else{a.push(o)}if(r&&r.placeholder===true){a[a.length-1]["jqyoui_pos"]=u}}else{s(i+" = dndDragItem")(e);if(r&&r.placeholder===true){a["jqyoui_pos"]=u}}};this.mutateDraggable=function(e,r,i,o,u,a,f){var l=t.equals(a,{}),c=e.$eval(o);e.dndDropItem=a;if(i&&i.placeholder){if(i.placeholder!="keep"){if(t.isArray(c)&&i.index!==n){c[i.index]=a}else{s(o+" = dndDropItem")(e)}}}else{if(t.isArray(c)){if(l){if(i&&i.placeholder!==true&&i.placeholder!=="keep"){c.splice(i.index,1)}}else{c[i.index]=a}}else{s(o+" = dndDropItem")(e);if(e.$parent){s(o+" = dndDropItem")(e.$parent)}}}f.css({"z-index":"",left:"",top:""})};this.fixIndex=function(e,r,i){if(r.applyFilter&&t.isArray(i)&&i.length>0){var s=e[r.applyFilter](),o=s[r.index],u=n;i.forEach(function(e,n){if(t.equals(e,o)){u=n}});return u}return r.index}}]).directive("jqyouiDraggable",["ngDragDropService",function(e){return{require:"?jqyouiDroppable",restrict:"A",link:function(n,i,s){var o,u,a;var f=function(f,l){if(f){o=n.$eval(i.attr("jqyoui-draggable")||i.attr("data-jqyoui-draggable"))||{};u=n.$eval(s.jqyouiOptions)||{};i.draggable({disabled:false}).draggable(u).draggable({start:function(i,s){a=t.element(u.helper?s.helper:this).css("z-index");t.element(u.helper?s.helper:this).css("z-index",9999);r.startXY=t.element(this)[o.containment||"offset"]();e.callEventCallback(n,o.onStart,i,s)},stop:function(r,i){t.element(u.helper?i.helper:this).css("z-index",a);e.callEventCallback(n,o.onStop,r,i)},drag:function(t,r){e.callEventCallback(n,o.onDrag,t,r)}})}else{i.draggable({disabled:true})}};n.$watch(function(){return n.$eval(s.drag)},f);f();i.on("$destroy",function(){i.draggable("destroy")})}}}]).directive("jqyouiDroppable",["ngDragDropService",function(e){return{restrict:"A",priority:1,link:function(n,r,i){var s;var o=function(o,u){if(o){s=n.$eval(t.element(r).attr("jqyoui-droppable")||t.element(r).attr("data-jqyoui-droppable"))||{};r.droppable({disabled:false}).droppable(n.$eval(i.jqyouiOptions)||{}).droppable({over:function(t,r){e.callEventCallback(n,s.onOver,t,r)},out:function(t,r){e.callEventCallback(n,s.onOut,t,r)},drop:function(r,o){if(t.element(o.draggable).ngattr("ng-model")&&i.ngModel){e.invokeDrop(t.element(o.draggable),t.element(this),r,o)}else{e.callEventCallback(n,s.onDrop,r,o)}}})}else{r.droppable({disabled:true})}};n.$watch(function(){return n.$eval(i.drop)},o);o();r.on("$destroy",function(){r.droppable("destroy")})}}}]);$.fn.ngattr=function(e,n){var r=t.element(this).get(0);return r.getAttribute(e)||r.getAttribute("data-"+e)}})(window,window.angular) diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-mocks_1.2.13/angular-mocks.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-mocks_1.2.13/angular-mocks.js new file mode 100644 index 0000000..d3938af --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-mocks_1.2.13/angular-mocks.js @@ -0,0 +1,2136 @@ +/** + * @license AngularJS v1.2.13 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) { + +'use strict'; + +/** + * @ngdoc overview + * @name angular.mock + * @description + * + * Namespace from 'angular-mocks.js' which contains testing related code. + */ +angular.mock = {}; + +/** + * ! This is a private undocumented service ! + * + * @name ngMock.$browser + * + * @description + * This service is a mock implementation of {@link ng.$browser}. It provides fake + * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr, + * cookies, etc... + * + * The api of this service is the same as that of the real {@link ng.$browser $browser}, except + * that there are several helper methods available which can be used in tests. + */ +angular.mock.$BrowserProvider = function() { + this.$get = function() { + return new angular.mock.$Browser(); + }; +}; + +angular.mock.$Browser = function() { + var self = this; + + this.isMock = true; + self.$$url = "http://server/"; + self.$$lastUrl = self.$$url; // used by url polling fn + self.pollFns = []; + + // TODO(vojta): remove this temporary api + self.$$completeOutstandingRequest = angular.noop; + self.$$incOutstandingRequestCount = angular.noop; + + + // register url polling fn + + self.onUrlChange = function(listener) { + self.pollFns.push( + function() { + if (self.$$lastUrl != self.$$url) { + self.$$lastUrl = self.$$url; + listener(self.$$url); + } + } + ); + + return listener; + }; + + self.cookieHash = {}; + self.lastCookieHash = {}; + self.deferredFns = []; + self.deferredNextId = 0; + + self.defer = function(fn, delay) { + delay = delay || 0; + self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId}); + self.deferredFns.sort(function(a,b){ return a.time - b.time;}); + return self.deferredNextId++; + }; + + + /** + * @name ngMock.$browser#defer.now + * @propertyOf ngMock.$browser + * + * @description + * Current milliseconds mock time. + */ + self.defer.now = 0; + + + self.defer.cancel = function(deferId) { + var fnIndex; + + angular.forEach(self.deferredFns, function(fn, index) { + if (fn.id === deferId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + self.deferredFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + + /** + * @name ngMock.$browser#defer.flush + * @methodOf ngMock.$browser + * + * @description + * Flushes all pending requests and executes the defer callbacks. + * + * @param {number=} number of milliseconds to flush. See {@link #defer.now} + */ + self.defer.flush = function(delay) { + if (angular.isDefined(delay)) { + self.defer.now += delay; + } else { + if (self.deferredFns.length) { + self.defer.now = self.deferredFns[self.deferredFns.length-1].time; + } else { + throw new Error('No deferred tasks to be flushed'); + } + } + + while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) { + self.deferredFns.shift().fn(); + } + }; + + self.$$baseHref = ''; + self.baseHref = function() { + return this.$$baseHref; + }; +}; +angular.mock.$Browser.prototype = { + +/** + * @name ngMock.$browser#poll + * @methodOf ngMock.$browser + * + * @description + * run all fns in pollFns + */ + poll: function poll() { + angular.forEach(this.pollFns, function(pollFn){ + pollFn(); + }); + }, + + addPollFn: function(pollFn) { + this.pollFns.push(pollFn); + return pollFn; + }, + + url: function(url, replace) { + if (url) { + this.$$url = url; + return this; + } + + return this.$$url; + }, + + cookies: function(name, value) { + if (name) { + if (angular.isUndefined(value)) { + delete this.cookieHash[name]; + } else { + if (angular.isString(value) && //strings only + value.length <= 4096) { //strict cookie storage limits + this.cookieHash[name] = value; + } + } + } else { + if (!angular.equals(this.cookieHash, this.lastCookieHash)) { + this.lastCookieHash = angular.copy(this.cookieHash); + this.cookieHash = angular.copy(this.cookieHash); + } + return this.cookieHash; + } + }, + + notifyWhenNoOutstandingRequests: function(fn) { + fn(); + } +}; + + +/** + * @ngdoc object + * @name ngMock.$exceptionHandlerProvider + * + * @description + * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors + * passed into the `$exceptionHandler`. + */ + +/** + * @ngdoc object + * @name ngMock.$exceptionHandler + * + * @description + * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed + * into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration + * information. + * + * + * <pre> + * describe('$exceptionHandlerProvider', function() { + * + * it('should capture log messages and exceptions', function() { + * + * module(function($exceptionHandlerProvider) { + * $exceptionHandlerProvider.mode('log'); + * }); + * + * inject(function($log, $exceptionHandler, $timeout) { + * $timeout(function() { $log.log(1); }); + * $timeout(function() { $log.log(2); throw 'banana peel'; }); + * $timeout(function() { $log.log(3); }); + * expect($exceptionHandler.errors).toEqual([]); + * expect($log.assertEmpty()); + * $timeout.flush(); + * expect($exceptionHandler.errors).toEqual(['banana peel']); + * expect($log.log.logs).toEqual([[1], [2], [3]]); + * }); + * }); + * }); + * </pre> + */ + +angular.mock.$ExceptionHandlerProvider = function() { + var handler; + + /** + * @ngdoc method + * @name ngMock.$exceptionHandlerProvider#mode + * @methodOf ngMock.$exceptionHandlerProvider + * + * @description + * Sets the logging mode. + * + * @param {string} mode Mode of operation, defaults to `rethrow`. + * + * - `rethrow`: If any errors are passed into the handler in tests, it typically + * means that there is a bug in the application or test, so this mock will + * make these tests fail. + * - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log` + * mode stores an array of errors in `$exceptionHandler.errors`, to allow later + * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and + * {@link ngMock.$log#reset reset()} + */ + this.mode = function(mode) { + switch(mode) { + case 'rethrow': + handler = function(e) { + throw e; + }; + break; + case 'log': + var errors = []; + + handler = function(e) { + if (arguments.length == 1) { + errors.push(e); + } else { + errors.push([].slice.call(arguments, 0)); + } + }; + + handler.errors = errors; + break; + default: + throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!"); + } + }; + + this.$get = function() { + return handler; + }; + + this.mode('rethrow'); +}; + + +/** + * @ngdoc service + * @name ngMock.$log + * + * @description + * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays + * (one array per logging level). These arrays are exposed as `logs` property of each of the + * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`. + * + */ +angular.mock.$LogProvider = function() { + var debug = true; + + function concat(array1, array2, index) { + return array1.concat(Array.prototype.slice.call(array2, index)); + } + + this.debugEnabled = function(flag) { + if (angular.isDefined(flag)) { + debug = flag; + return this; + } else { + return debug; + } + }; + + this.$get = function () { + var $log = { + log: function() { $log.log.logs.push(concat([], arguments, 0)); }, + warn: function() { $log.warn.logs.push(concat([], arguments, 0)); }, + info: function() { $log.info.logs.push(concat([], arguments, 0)); }, + error: function() { $log.error.logs.push(concat([], arguments, 0)); }, + debug: function() { + if (debug) { + $log.debug.logs.push(concat([], arguments, 0)); + } + } + }; + + /** + * @ngdoc method + * @name ngMock.$log#reset + * @methodOf ngMock.$log + * + * @description + * Reset all of the logging arrays to empty. + */ + $log.reset = function () { + /** + * @ngdoc property + * @name ngMock.$log#log.logs + * @propertyOf ngMock.$log + * + * @description + * Array of messages logged using {@link ngMock.$log#log}. + * + * @example + * <pre> + * $log.log('Some Log'); + * var first = $log.log.logs.unshift(); + * </pre> + */ + $log.log.logs = []; + /** + * @ngdoc property + * @name ngMock.$log#info.logs + * @propertyOf ngMock.$log + * + * @description + * Array of messages logged using {@link ngMock.$log#info}. + * + * @example + * <pre> + * $log.info('Some Info'); + * var first = $log.info.logs.unshift(); + * </pre> + */ + $log.info.logs = []; + /** + * @ngdoc property + * @name ngMock.$log#warn.logs + * @propertyOf ngMock.$log + * + * @description + * Array of messages logged using {@link ngMock.$log#warn}. + * + * @example + * <pre> + * $log.warn('Some Warning'); + * var first = $log.warn.logs.unshift(); + * </pre> + */ + $log.warn.logs = []; + /** + * @ngdoc property + * @name ngMock.$log#error.logs + * @propertyOf ngMock.$log + * + * @description + * Array of messages logged using {@link ngMock.$log#error}. + * + * @example + * <pre> + * $log.error('Some Error'); + * var first = $log.error.logs.unshift(); + * </pre> + */ + $log.error.logs = []; + /** + * @ngdoc property + * @name ngMock.$log#debug.logs + * @propertyOf ngMock.$log + * + * @description + * Array of messages logged using {@link ngMock.$log#debug}. + * + * @example + * <pre> + * $log.debug('Some Error'); + * var first = $log.debug.logs.unshift(); + * </pre> + */ + $log.debug.logs = []; + }; + + /** + * @ngdoc method + * @name ngMock.$log#assertEmpty + * @methodOf ngMock.$log + * + * @description + * Assert that the all of the logging methods have no logged messages. If messages present, an + * exception is thrown. + */ + $log.assertEmpty = function() { + var errors = []; + angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) { + angular.forEach($log[logLevel].logs, function(log) { + angular.forEach(log, function (logItem) { + errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + + (logItem.stack || '')); + }); + }); + }); + if (errors.length) { + errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or "+ + "an expected log message was not checked and removed:"); + errors.push(''); + throw new Error(errors.join('\n---------\n')); + } + }; + + $log.reset(); + return $log; + }; +}; + + +/** + * @ngdoc service + * @name ngMock.$interval + * + * @description + * Mock implementation of the $interval service. + * + * Use {@link ngMock.$interval#methods_flush `$interval.flush(millis)`} to + * move forward by `millis` milliseconds and trigger any functions scheduled to run in that + * time. + * + * @param {function()} fn A function that should be called repeatedly. + * @param {number} delay Number of milliseconds between each function call. + * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat + * indefinitely. + * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise + * will invoke `fn` within the {@link ng.$rootScope.Scope#methods_$apply $apply} block. + * @returns {promise} A promise which will be notified on each iteration. + */ +angular.mock.$IntervalProvider = function() { + this.$get = ['$rootScope', '$q', + function($rootScope, $q) { + var repeatFns = [], + nextRepeatId = 0, + now = 0; + + var $interval = function(fn, delay, count, invokeApply) { + var deferred = $q.defer(), + promise = deferred.promise, + iteration = 0, + skipApply = (angular.isDefined(invokeApply) && !invokeApply); + + count = (angular.isDefined(count)) ? count : 0, + promise.then(null, null, fn); + + promise.$$intervalId = nextRepeatId; + + function tick() { + deferred.notify(iteration++); + + if (count > 0 && iteration >= count) { + var fnIndex; + deferred.resolve(iteration); + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns.splice(fnIndex, 1); + } + } + + if (!skipApply) $rootScope.$apply(); + } + + repeatFns.push({ + nextTime:(now + delay), + delay: delay, + fn: tick, + id: nextRepeatId, + deferred: deferred + }); + repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;}); + + nextRepeatId++; + return promise; + }; + + $interval.cancel = function(promise) { + if(!promise) return false; + var fnIndex; + + angular.forEach(repeatFns, function(fn, index) { + if (fn.id === promise.$$intervalId) fnIndex = index; + }); + + if (fnIndex !== undefined) { + repeatFns[fnIndex].deferred.reject('canceled'); + repeatFns.splice(fnIndex, 1); + return true; + } + + return false; + }; + + /** + * @ngdoc method + * @name ngMock.$interval#flush + * @methodOf ngMock.$interval + * @description + * + * Runs interval tasks scheduled to be run in the next `millis` milliseconds. + * + * @param {number=} millis maximum timeout amount to flush up until. + * + * @return {number} The amount of time moved forward. + */ + $interval.flush = function(millis) { + now += millis; + while (repeatFns.length && repeatFns[0].nextTime <= now) { + var task = repeatFns[0]; + task.fn(); + task.nextTime += task.delay; + repeatFns.sort(function(a,b){ return a.nextTime - b.nextTime;}); + } + return millis; + }; + + return $interval; + }]; +}; + + +/* jshint -W101 */ +/* The R_ISO8061_STR regex is never going to fit into the 100 char limit! + * This directive should go inside the anonymous function but a bug in JSHint means that it would + * not be enacted early enough to prevent the warning. + */ +var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; + +function jsonStringToDate(string) { + var match; + if (match = string.match(R_ISO8061_STR)) { + var date = new Date(0), + tzHour = 0, + tzMin = 0; + if (match[9]) { + tzHour = int(match[9] + match[10]); + tzMin = int(match[9] + match[11]); + } + date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3])); + date.setUTCHours(int(match[4]||0) - tzHour, + int(match[5]||0) - tzMin, + int(match[6]||0), + int(match[7]||0)); + return date; + } + return string; +} + +function int(str) { + return parseInt(str, 10); +} + +function padNumber(num, digits, trim) { + var neg = ''; + if (num < 0) { + neg = '-'; + num = -num; + } + num = '' + num; + while(num.length < digits) num = '0' + num; + if (trim) + num = num.substr(num.length - digits); + return neg + num; +} + + +/** + * @ngdoc object + * @name angular.mock.TzDate + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`. + * + * Mock of the Date type which has its timezone specified via constructor arg. + * + * The main purpose is to create Date-like instances with timezone fixed to the specified timezone + * offset, so that we can test code that depends on local timezone settings without dependency on + * the time zone settings of the machine where the code is running. + * + * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored) + * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC* + * + * @example + * !!!! WARNING !!!!! + * This is not a complete Date object so only methods that were implemented can be called safely. + * To make matters worse, TzDate instances inherit stuff from Date via a prototype. + * + * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is + * incomplete we might be missing some non-standard methods. This can result in errors like: + * "Date.prototype.foo called on incompatible Object". + * + * <pre> + * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); + * newYearInBratislava.getTimezoneOffset() => -60; + * newYearInBratislava.getFullYear() => 2010; + * newYearInBratislava.getMonth() => 0; + * newYearInBratislava.getDate() => 1; + * newYearInBratislava.getHours() => 0; + * newYearInBratislava.getMinutes() => 0; + * newYearInBratislava.getSeconds() => 0; + * </pre> + * + */ +angular.mock.TzDate = function (offset, timestamp) { + var self = new Date(0); + if (angular.isString(timestamp)) { + var tsStr = timestamp; + + self.origDate = jsonStringToDate(timestamp); + + timestamp = self.origDate.getTime(); + if (isNaN(timestamp)) + throw { + name: "Illegal Argument", + message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string" + }; + } else { + self.origDate = new Date(timestamp); + } + + var localOffset = new Date(timestamp).getTimezoneOffset(); + self.offsetDiff = localOffset*60*1000 - offset*1000*60*60; + self.date = new Date(timestamp + self.offsetDiff); + + self.getTime = function() { + return self.date.getTime() - self.offsetDiff; + }; + + self.toLocaleDateString = function() { + return self.date.toLocaleDateString(); + }; + + self.getFullYear = function() { + return self.date.getFullYear(); + }; + + self.getMonth = function() { + return self.date.getMonth(); + }; + + self.getDate = function() { + return self.date.getDate(); + }; + + self.getHours = function() { + return self.date.getHours(); + }; + + self.getMinutes = function() { + return self.date.getMinutes(); + }; + + self.getSeconds = function() { + return self.date.getSeconds(); + }; + + self.getMilliseconds = function() { + return self.date.getMilliseconds(); + }; + + self.getTimezoneOffset = function() { + return offset * 60; + }; + + self.getUTCFullYear = function() { + return self.origDate.getUTCFullYear(); + }; + + self.getUTCMonth = function() { + return self.origDate.getUTCMonth(); + }; + + self.getUTCDate = function() { + return self.origDate.getUTCDate(); + }; + + self.getUTCHours = function() { + return self.origDate.getUTCHours(); + }; + + self.getUTCMinutes = function() { + return self.origDate.getUTCMinutes(); + }; + + self.getUTCSeconds = function() { + return self.origDate.getUTCSeconds(); + }; + + self.getUTCMilliseconds = function() { + return self.origDate.getUTCMilliseconds(); + }; + + self.getDay = function() { + return self.date.getDay(); + }; + + // provide this method only on browsers that already have it + if (self.toISOString) { + self.toISOString = function() { + return padNumber(self.origDate.getUTCFullYear(), 4) + '-' + + padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' + + padNumber(self.origDate.getUTCDate(), 2) + 'T' + + padNumber(self.origDate.getUTCHours(), 2) + ':' + + padNumber(self.origDate.getUTCMinutes(), 2) + ':' + + padNumber(self.origDate.getUTCSeconds(), 2) + '.' + + padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'; + }; + } + + //hide all methods not implemented in this mock that the Date prototype exposes + var unimplementedMethods = ['getUTCDay', + 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', + 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', + 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString', + 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf']; + + angular.forEach(unimplementedMethods, function(methodName) { + self[methodName] = function() { + throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock"); + }; + }); + + return self; +}; + +//make "tzDateInstance instanceof Date" return true +angular.mock.TzDate.prototype = Date.prototype; +/* jshint +W101 */ + +angular.mock.animate = angular.module('ngAnimateMock', ['ng']) + + .config(['$provide', function($provide) { + var reflowQueue = []; + + $provide.value('$$animateReflow', function(fn) { + reflowQueue.push(fn); + return angular.noop; + }); + + $provide.decorator('$animate', function($delegate) { + var animate = { + queue : [], + enabled : $delegate.enabled, + triggerReflow : function() { + if(reflowQueue.length === 0) { + throw new Error('No animation reflows present'); + } + angular.forEach(reflowQueue, function(fn) { + fn(); + }); + reflowQueue = []; + } + }; + + angular.forEach( + ['enter','leave','move','addClass','removeClass','setClass'], function(method) { + animate[method] = function() { + animate.queue.push({ + event : method, + element : arguments[0], + args : arguments + }); + $delegate[method].apply($delegate, arguments); + }; + }); + + return animate; + }); + + }]); + + +/** + * @ngdoc function + * @name angular.mock.dump + * @description + * + * *NOTE*: this is not an injectable instance, just a globally available function. + * + * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for + * debugging. + * + * This method is also available on window, where it can be used to display objects on debug + * console. + * + * @param {*} object - any object to turn into string. + * @return {string} a serialized string of the argument + */ +angular.mock.dump = function(object) { + return serialize(object); + + function serialize(object) { + var out; + + if (angular.isElement(object)) { + object = angular.element(object); + out = angular.element('<div></div>'); + angular.forEach(object, function(element) { + out.append(angular.element(element).clone()); + }); + out = out.html(); + } else if (angular.isArray(object)) { + out = []; + angular.forEach(object, function(o) { + out.push(serialize(o)); + }); + out = '[ ' + out.join(', ') + ' ]'; + } else if (angular.isObject(object)) { + if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) { + out = serializeScope(object); + } else if (object instanceof Error) { + out = object.stack || ('' + object.name + ': ' + object.message); + } else { + // TODO(i): this prevents methods being logged, + // we should have a better way to serialize objects + out = angular.toJson(object, true); + } + } else { + out = String(object); + } + + return out; + } + + function serializeScope(scope, offset) { + offset = offset || ' '; + var log = [offset + 'Scope(' + scope.$id + '): {']; + for ( var key in scope ) { + if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) { + log.push(' ' + key + ': ' + angular.toJson(scope[key])); + } + } + var child = scope.$$childHead; + while(child) { + log.push(serializeScope(child, offset + ' ')); + child = child.$$nextSibling; + } + log.push('}'); + return log.join('\n' + offset); + } +}; + +/** + * @ngdoc object + * @name ngMock.$httpBackend + * @description + * Fake HTTP backend implementation suitable for unit testing applications that use the + * {@link ng.$http $http service}. + * + * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less + * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}. + * + * During unit testing, we want our unit tests to run quickly and have no external dependencies so + * we don’t want to send {@link https://developer.mozilla.org/en/xmlhttprequest XHR} or + * {@link http://en.wikipedia.org/wiki/JSONP JSONP} requests to a real server. All we really need is + * to verify whether a certain request has been sent or not, or alternatively just let the + * application make requests, respond with pre-trained responses and assert that the end result is + * what we expect it to be. + * + * This mock implementation can be used to respond with static or dynamic responses via the + * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc). + * + * When an Angular application needs some data from a server, it calls the $http service, which + * sends the request to a real server using $httpBackend service. With dependency injection, it is + * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify + * the requests and respond with some testing data without sending a request to real server. + * + * There are two ways to specify what test data should be returned as http responses by the mock + * backend when the code under test makes http requests: + * + * - `$httpBackend.expect` - specifies a request expectation + * - `$httpBackend.when` - specifies a backend definition + * + * + * # Request Expectations vs Backend Definitions + * + * Request expectations provide a way to make assertions about requests made by the application and + * to define responses for those requests. The test will fail if the expected requests are not made + * or they are made in the wrong order. + * + * Backend definitions allow you to define a fake backend for your application which doesn't assert + * if a particular request was made or not, it just returns a trained response if a request is made. + * The test will pass whether or not the request gets made during testing. + * + * + * <table class="table"> + * <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr> + * <tr> + * <th>Syntax</th> + * <td>.expect(...).respond(...)</td> + * <td>.when(...).respond(...)</td> + * </tr> + * <tr> + * <th>Typical usage</th> + * <td>strict unit tests</td> + * <td>loose (black-box) unit testing</td> + * </tr> + * <tr> + * <th>Fulfills multiple requests</th> + * <td>NO</td> + * <td>YES</td> + * </tr> + * <tr> + * <th>Order of requests matters</th> + * <td>YES</td> + * <td>NO</td> + * </tr> + * <tr> + * <th>Request required</th> + * <td>YES</td> + * <td>NO</td> + * </tr> + * <tr> + * <th>Response required</th> + * <td>optional (see below)</td> + * <td>YES</td> + * </tr> + * </table> + * + * In cases where both backend definitions and request expectations are specified during unit + * testing, the request expectations are evaluated first. + * + * If a request expectation has no response specified, the algorithm will search your backend + * definitions for an appropriate response. + * + * If a request didn't match any expectation or if the expectation doesn't have the response + * defined, the backend definitions are evaluated in sequential order to see if any of them match + * the request. The response from the first matched definition is returned. + * + * + * # Flushing HTTP requests + * + * The $httpBackend used in production always responds to requests with responses asynchronously. + * If we preserved this behavior in unit testing we'd have to create async unit tests, which are + * hard to write, understand, and maintain. However, the testing mock can't respond + * synchronously because that would change the execution of the code under test. For this reason the + * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending + * requests and thus preserve the async api of the backend while allowing the test to execute + * synchronously. + * + * + * # Unit testing with mock $httpBackend + * The following code shows how to setup and use the mock backend when unit testing a controller. + * First we create the controller under test: + * + <pre> + // The controller code + function MyController($scope, $http) { + var authToken; + + $http.get('/auth.py').success(function(data, status, headers) { + authToken = headers('A-Token'); + $scope.user = data; + }); + + $scope.saveMessage = function(message) { + var headers = { 'Authorization': authToken }; + $scope.status = 'Saving...'; + + $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) { + $scope.status = ''; + }).error(function() { + $scope.status = 'ERROR!'; + }); + }; + } + </pre> + * + * Now we setup the mock backend and create the test specs: + * + <pre> + // testing controller + describe('MyController', function() { + var $httpBackend, $rootScope, createController; + + beforeEach(inject(function($injector) { + // Set up the mock http service responses + $httpBackend = $injector.get('$httpBackend'); + // backend definition common for all tests + $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'}); + + // Get hold of a scope (i.e. the root scope) + $rootScope = $injector.get('$rootScope'); + // The $controller service is used to create instances of controllers + var $controller = $injector.get('$controller'); + + createController = function() { + return $controller('MyController', {'$scope' : $rootScope }); + }; + })); + + + afterEach(function() { + $httpBackend.verifyNoOutstandingExpectation(); + $httpBackend.verifyNoOutstandingRequest(); + }); + + + it('should fetch authentication token', function() { + $httpBackend.expectGET('/auth.py'); + var controller = createController(); + $httpBackend.flush(); + }); + + + it('should send msg to server', function() { + var controller = createController(); + $httpBackend.flush(); + + // now you don’t care about the authentication, but + // the controller will still send the request and + // $httpBackend will respond without you having to + // specify the expectation and response for this request + + $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, ''); + $rootScope.saveMessage('message content'); + expect($rootScope.status).toBe('Saving...'); + $httpBackend.flush(); + expect($rootScope.status).toBe(''); + }); + + + it('should send auth header', function() { + var controller = createController(); + $httpBackend.flush(); + + $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) { + // check if the header was send, if it wasn't the expectation won't + // match the request and the test will fail + return headers['Authorization'] == 'xxx'; + }).respond(201, ''); + + $rootScope.saveMessage('whatever'); + $httpBackend.flush(); + }); + }); + </pre> + */ +angular.mock.$HttpBackendProvider = function() { + this.$get = ['$rootScope', createHttpBackendMock]; +}; + +/** + * General factory function for $httpBackend mock. + * Returns instance for unit testing (when no arguments specified): + * - passing through is disabled + * - auto flushing is disabled + * + * Returns instance for e2e testing (when `$delegate` and `$browser` specified): + * - passing through (delegating request to real backend) is enabled + * - auto flushing is enabled + * + * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified) + * @param {Object=} $browser Auto-flushing enabled if specified + * @return {Object} Instance of $httpBackend mock + */ +function createHttpBackendMock($rootScope, $delegate, $browser) { + var definitions = [], + expectations = [], + responses = [], + responsesPush = angular.bind(responses, responses.push), + copy = angular.copy; + + function createResponse(status, data, headers) { + if (angular.isFunction(status)) return status; + + return function() { + return angular.isNumber(status) + ? [status, data, headers] + : [200, status, data]; + }; + } + + // TODO(vojta): change params to: method, url, data, headers, callback + function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) { + var xhr = new MockXhr(), + expectation = expectations[0], + wasExpected = false; + + function prettyPrint(data) { + return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp) + ? data + : angular.toJson(data); + } + + function wrapResponse(wrapped) { + if (!$browser && timeout && timeout.then) timeout.then(handleTimeout); + + return handleResponse; + + function handleResponse() { + var response = wrapped.response(method, url, data, headers); + xhr.$$respHeaders = response[2]; + callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders()); + } + + function handleTimeout() { + for (var i = 0, ii = responses.length; i < ii; i++) { + if (responses[i] === handleResponse) { + responses.splice(i, 1); + callback(-1, undefined, ''); + break; + } + } + } + } + + if (expectation && expectation.match(method, url)) { + if (!expectation.matchData(data)) + throw new Error('Expected ' + expectation + ' with different data\n' + + 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data); + + if (!expectation.matchHeaders(headers)) + throw new Error('Expected ' + expectation + ' with different headers\n' + + 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' + + prettyPrint(headers)); + + expectations.shift(); + + if (expectation.response) { + responses.push(wrapResponse(expectation)); + return; + } + wasExpected = true; + } + + var i = -1, definition; + while ((definition = definitions[++i])) { + if (definition.match(method, url, data, headers || {})) { + if (definition.response) { + // if $browser specified, we do auto flush all requests + ($browser ? $browser.defer : responsesPush)(wrapResponse(definition)); + } else if (definition.passThrough) { + $delegate(method, url, data, callback, headers, timeout, withCredentials); + } else throw new Error('No response defined !'); + return; + } + } + throw wasExpected ? + new Error('No response defined !') : + new Error('Unexpected request: ' + method + ' ' + url + '\n' + + (expectation ? 'Expected ' + expectation : 'No more request expected')); + } + + /** + * @ngdoc method + * @name ngMock.$httpBackend#when + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` method that controls how a matched + * request is handled. + * + * - respond – + * `{function([status,] data[, headers])|function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (string) and response headers + * (Object). + */ + $httpBackend.when = function(method, url, data, headers) { + var definition = new MockHttpExpectation(method, url, data, headers), + chain = { + respond: function(status, data, headers) { + definition.response = createResponse(status, data, headers); + } + }; + + if ($browser) { + chain.passThrough = function() { + definition.passThrough = true; + }; + } + + definitions.push(definition); + return chain; + }; + + /** + * @ngdoc method + * @name ngMock.$httpBackend#whenGET + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#whenHEAD + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#whenDELETE + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#whenPOST + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#whenPUT + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives + * data string and returns true if the data is as expected. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#whenJSONP + * @methodOf ngMock.$httpBackend + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + createShortMethods('when'); + + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expect + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation. + * + * @param {string} method HTTP method. + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current expectation. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + * + * - respond – + * `{function([status,] data[, headers])|function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (string) and response headers + * (Object). + */ + $httpBackend.expect = function(method, url, data, headers) { + var expectation = new MockHttpExpectation(method, url, data, headers); + expectations.push(expectation); + return { + respond: function(status, data, headers) { + expectation.response = createResponse(status, data, headers); + } + }; + }; + + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectGET + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for GET requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. See #expect for more info. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectHEAD + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for HEAD requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectDELETE + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for DELETE requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectPOST + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for POST requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectPUT + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for PUT requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectPATCH + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for PATCH requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that + * receives data string and returns true if the data is as expected, or Object if request body + * is in JSON format. + * @param {Object=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + + /** + * @ngdoc method + * @name ngMock.$httpBackend#expectJSONP + * @methodOf ngMock.$httpBackend + * @description + * Creates a new request expectation for JSONP requests. For more info see `expect()`. + * + * @param {string|RegExp} url HTTP url. + * @returns {requestHandler} Returns an object with `respond` method that control how a matched + * request is handled. + */ + createShortMethods('expect'); + + + /** + * @ngdoc method + * @name ngMock.$httpBackend#flush + * @methodOf ngMock.$httpBackend + * @description + * Flushes all pending requests using the trained responses. + * + * @param {number=} count Number of responses to flush (in the order they arrived). If undefined, + * all pending requests will be flushed. If there are no pending requests when the flush method + * is called an exception is thrown (as this typically a sign of programming error). + */ + $httpBackend.flush = function(count) { + $rootScope.$digest(); + if (!responses.length) throw new Error('No pending request to flush !'); + + if (angular.isDefined(count)) { + while (count--) { + if (!responses.length) throw new Error('No more pending request to flush !'); + responses.shift()(); + } + } else { + while (responses.length) { + responses.shift()(); + } + } + $httpBackend.verifyNoOutstandingExpectation(); + }; + + + /** + * @ngdoc method + * @name ngMock.$httpBackend#verifyNoOutstandingExpectation + * @methodOf ngMock.$httpBackend + * @description + * Verifies that all of the requests defined via the `expect` api were made. If any of the + * requests were not made, verifyNoOutstandingExpectation throws an exception. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * <pre> + * afterEach($httpBackend.verifyNoOutstandingExpectation); + * </pre> + */ + $httpBackend.verifyNoOutstandingExpectation = function() { + $rootScope.$digest(); + if (expectations.length) { + throw new Error('Unsatisfied requests: ' + expectations.join(', ')); + } + }; + + + /** + * @ngdoc method + * @name ngMock.$httpBackend#verifyNoOutstandingRequest + * @methodOf ngMock.$httpBackend + * @description + * Verifies that there are no outstanding requests that need to be flushed. + * + * Typically, you would call this method following each test case that asserts requests using an + * "afterEach" clause. + * + * <pre> + * afterEach($httpBackend.verifyNoOutstandingRequest); + * </pre> + */ + $httpBackend.verifyNoOutstandingRequest = function() { + if (responses.length) { + throw new Error('Unflushed requests: ' + responses.length); + } + }; + + + /** + * @ngdoc method + * @name ngMock.$httpBackend#resetExpectations + * @methodOf ngMock.$httpBackend + * @description + * Resets all request expectations, but preserves all backend definitions. Typically, you would + * call resetExpectations during a multiple-phase test when you want to reuse the same instance of + * $httpBackend mock. + */ + $httpBackend.resetExpectations = function() { + expectations.length = 0; + responses.length = 0; + }; + + return $httpBackend; + + + function createShortMethods(prefix) { + angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) { + $httpBackend[prefix + method] = function(url, headers) { + return $httpBackend[prefix](method, url, undefined, headers); + }; + }); + + angular.forEach(['PUT', 'POST', 'PATCH'], function(method) { + $httpBackend[prefix + method] = function(url, data, headers) { + return $httpBackend[prefix](method, url, data, headers); + }; + }); + } +} + +function MockHttpExpectation(method, url, data, headers) { + + this.data = data; + this.headers = headers; + + this.match = function(m, u, d, h) { + if (method != m) return false; + if (!this.matchUrl(u)) return false; + if (angular.isDefined(d) && !this.matchData(d)) return false; + if (angular.isDefined(h) && !this.matchHeaders(h)) return false; + return true; + }; + + this.matchUrl = function(u) { + if (!url) return true; + if (angular.isFunction(url.test)) return url.test(u); + return url == u; + }; + + this.matchHeaders = function(h) { + if (angular.isUndefined(headers)) return true; + if (angular.isFunction(headers)) return headers(h); + return angular.equals(headers, h); + }; + + this.matchData = function(d) { + if (angular.isUndefined(data)) return true; + if (data && angular.isFunction(data.test)) return data.test(d); + if (data && angular.isFunction(data)) return data(d); + if (data && !angular.isString(data)) return angular.equals(data, angular.fromJson(d)); + return data == d; + }; + + this.toString = function() { + return method + ' ' + url; + }; +} + +function createMockXhr() { + return new MockXhr(); +} + +function MockXhr() { + + // hack for testing $http, $httpBackend + MockXhr.$$lastInstance = this; + + this.open = function(method, url, async) { + this.$$method = method; + this.$$url = url; + this.$$async = async; + this.$$reqHeaders = {}; + this.$$respHeaders = {}; + }; + + this.send = function(data) { + this.$$data = data; + }; + + this.setRequestHeader = function(key, value) { + this.$$reqHeaders[key] = value; + }; + + this.getResponseHeader = function(name) { + // the lookup must be case insensitive, + // that's why we try two quick lookups first and full scan last + var header = this.$$respHeaders[name]; + if (header) return header; + + name = angular.lowercase(name); + header = this.$$respHeaders[name]; + if (header) return header; + + header = undefined; + angular.forEach(this.$$respHeaders, function(headerVal, headerName) { + if (!header && angular.lowercase(headerName) == name) header = headerVal; + }); + return header; + }; + + this.getAllResponseHeaders = function() { + var lines = []; + + angular.forEach(this.$$respHeaders, function(value, key) { + lines.push(key + ': ' + value); + }); + return lines.join('\n'); + }; + + this.abort = angular.noop; +} + + +/** + * @ngdoc function + * @name ngMock.$timeout + * @description + * + * This service is just a simple decorator for {@link ng.$timeout $timeout} service + * that adds a "flush" and "verifyNoPendingTasks" methods. + */ + +angular.mock.$TimeoutDecorator = function($delegate, $browser) { + + /** + * @ngdoc method + * @name ngMock.$timeout#flush + * @methodOf ngMock.$timeout + * @description + * + * Flushes the queue of pending tasks. + * + * @param {number=} delay maximum timeout amount to flush up until + */ + $delegate.flush = function(delay) { + $browser.defer.flush(delay); + }; + + /** + * @ngdoc method + * @name ngMock.$timeout#verifyNoPendingTasks + * @methodOf ngMock.$timeout + * @description + * + * Verifies that there are no pending tasks that need to be flushed. + */ + $delegate.verifyNoPendingTasks = function() { + if ($browser.deferredFns.length) { + throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' + + formatPendingTasksAsString($browser.deferredFns)); + } + }; + + function formatPendingTasksAsString(tasks) { + var result = []; + angular.forEach(tasks, function(task) { + result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}'); + }); + + return result.join(', '); + } + + return $delegate; +}; + +/** + * + */ +angular.mock.$RootElementProvider = function() { + this.$get = function() { + return angular.element('<div ng-app></div>'); + }; +}; + +/** + * @ngdoc overview + * @name ngMock + * @description + * + * # ngMock + * + * The `ngMock` module providers support to inject and mock Angular services into unit tests. + * In addition, ngMock also extends various core ng services such that they can be + * inspected and controlled in a synchronous manner within test code. + * + * {@installModule mock} + * + * <div doc-module-components="ngMock"></div> + * + */ +angular.module('ngMock', ['ng']).provider({ + $browser: angular.mock.$BrowserProvider, + $exceptionHandler: angular.mock.$ExceptionHandlerProvider, + $log: angular.mock.$LogProvider, + $interval: angular.mock.$IntervalProvider, + $httpBackend: angular.mock.$HttpBackendProvider, + $rootElement: angular.mock.$RootElementProvider +}).config(['$provide', function($provide) { + $provide.decorator('$timeout', angular.mock.$TimeoutDecorator); +}]); + +/** + * @ngdoc overview + * @name ngMockE2E + * @description + * + * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. + * Currently there is only one mock present in this module - + * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock. + */ +angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) { + $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator); +}]); + +/** + * @ngdoc object + * @name ngMockE2E.$httpBackend + * @description + * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of + * applications that use the {@link ng.$http $http service}. + * + * *Note*: For fake http backend implementation suitable for unit testing please see + * {@link ngMock.$httpBackend unit-testing $httpBackend mock}. + * + * This implementation can be used to respond with static or dynamic responses via the `when` api + * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the + * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch + * templates from a webserver). + * + * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application + * is being developed with the real backend api replaced with a mock, it is often desirable for + * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch + * templates or static files from the webserver). To configure the backend with this behavior + * use the `passThrough` request handler of `when` instead of `respond`. + * + * Additionally, we don't want to manually have to flush mocked out requests like we do during unit + * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests + * automatically, closely simulating the behavior of the XMLHttpRequest object. + * + * To setup the application to run with this http backend, you have to create a module that depends + * on the `ngMockE2E` and your application modules and defines the fake backend: + * + * <pre> + * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']); + * myAppDev.run(function($httpBackend) { + * phones = [{name: 'phone1'}, {name: 'phone2'}]; + * + * // returns the current list of phones + * $httpBackend.whenGET('/phones').respond(phones); + * + * // adds a new phone to the phones array + * $httpBackend.whenPOST('/phones').respond(function(method, url, data) { + * phones.push(angular.fromJson(data)); + * }); + * $httpBackend.whenGET(/^\/templates\//).passThrough(); + * //... + * }); + * </pre> + * + * Afterwards, bootstrap your app with this new module. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#when + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition. + * + * @param {string} method HTTP method. + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header + * object and returns true if the headers match the current definition. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + * + * - respond – + * `{function([status,] data[, headers])|function(function(method, url, data, headers)}` + * – The respond method takes a set of static data to be returned or a function that can return + * an array containing response status (number), response data (string) and response headers + * (Object). + * - passThrough – `{function()}` – Any request matching a backend definition with `passThrough` + * handler, will be pass through to the real backend (an XHR request will be made to the + * server. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenGET + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for GET requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenHEAD + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for HEAD requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenDELETE + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for DELETE requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenPOST + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for POST requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenPUT + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for PUT requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenPATCH + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for PATCH requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @param {(string|RegExp)=} data HTTP request body. + * @param {(Object|function(Object))=} headers HTTP headers. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ + +/** + * @ngdoc method + * @name ngMockE2E.$httpBackend#whenJSONP + * @methodOf ngMockE2E.$httpBackend + * @description + * Creates a new backend definition for JSONP requests. For more info see `when()`. + * + * @param {string|RegExp} url HTTP url. + * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that + * control how a matched request is handled. + */ +angular.mock.e2e = {}; +angular.mock.e2e.$httpBackendDecorator = + ['$rootScope', '$delegate', '$browser', createHttpBackendMock]; + + +angular.mock.clearDataCache = function() { + var key, + cache = angular.element.cache; + + for(key in cache) { + if (Object.prototype.hasOwnProperty.call(cache,key)) { + var handle = cache[key].handle; + + handle && angular.element(handle.elem).off(); + delete cache[key]; + } + } +}; + + +if(window.jasmine || window.mocha) { + + var currentSpec = null, + isSpecRunning = function() { + return !!currentSpec; + }; + + + beforeEach(function() { + currentSpec = this; + }); + + afterEach(function() { + var injector = currentSpec.$injector; + + currentSpec.$injector = null; + currentSpec.$modules = null; + currentSpec = null; + + if (injector) { + injector.get('$rootElement').off(); + injector.get('$browser').pollFns.length = 0; + } + + angular.mock.clearDataCache(); + + // clean up jquery's fragment cache + angular.forEach(angular.element.fragments, function(val, key) { + delete angular.element.fragments[key]; + }); + + MockXhr.$$lastInstance = null; + + angular.forEach(angular.callbacks, function(val, key) { + delete angular.callbacks[key]; + }); + angular.callbacks.counter = 0; + }); + + /** + * @ngdoc function + * @name angular.mock.module + * @description + * + * *NOTE*: This function is also published on window for easy access.<br> + * + * This function registers a module configuration code. It collects the configuration information + * which will be used when the injector is created by {@link angular.mock.inject inject}. + * + * See {@link angular.mock.inject inject} for usage example + * + * @param {...(string|Function|Object)} fns any number of modules which are represented as string + * aliases or as anonymous module initialization functions. The modules are used to + * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an + * object literal is passed they will be register as values in the module, the key being + * the module name and the value being what is returned. + */ + window.module = angular.mock.module = function() { + var moduleFns = Array.prototype.slice.call(arguments, 0); + return isSpecRunning() ? workFn() : workFn; + ///////////////////// + function workFn() { + if (currentSpec.$injector) { + throw new Error('Injector already created, can not register a module!'); + } else { + var modules = currentSpec.$modules || (currentSpec.$modules = []); + angular.forEach(moduleFns, function(module) { + if (angular.isObject(module) && !angular.isArray(module)) { + modules.push(function($provide) { + angular.forEach(module, function(value, key) { + $provide.value(key, value); + }); + }); + } else { + modules.push(module); + } + }); + } + } + }; + + /** + * @ngdoc function + * @name angular.mock.inject + * @description + * + * *NOTE*: This function is also published on window for easy access.<br> + * + * The inject function wraps a function into an injectable function. The inject() creates new + * instance of {@link AUTO.$injector $injector} per test, which is then used for + * resolving references. + * + * + * ## Resolving References (Underscore Wrapping) + * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this + * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable + * that is declared in the scope of the `describe()` block. Since we would, most likely, want + * the variable to have the same name of the reference we have a problem, since the parameter + * to the `inject()` function would hide the outer variable. + * + * To help with this, the injected parameters can, optionally, be enclosed with underscores. + * These are ignored by the injector when the reference name is resolved. + * + * For example, the parameter `_myService_` would be resolved as the reference `myService`. + * Since it is available in the function body as _myService_, we can then assign it to a variable + * defined in an outer scope. + * + * ``` + * // Defined out reference variable outside + * var myService; + * + * // Wrap the parameter in underscores + * beforeEach( inject( function(_myService_){ + * myService = _myService_; + * })); + * + * // Use myService in a series of tests. + * it('makes use of myService', function() { + * myService.doStuff(); + * }); + * + * ``` + * + * See also {@link angular.mock.module angular.mock.module} + * + * ## Example + * Example of what a typical jasmine tests looks like with the inject method. + * <pre> + * + * angular.module('myApplicationModule', []) + * .value('mode', 'app') + * .value('version', 'v1.0.1'); + * + * + * describe('MyApp', function() { + * + * // You need to load modules that you want to test, + * // it loads only the "ng" module by default. + * beforeEach(module('myApplicationModule')); + * + * + * // inject() is used to inject arguments of all given functions + * it('should provide a version', inject(function(mode, version) { + * expect(version).toEqual('v1.0.1'); + * expect(mode).toEqual('app'); + * })); + * + * + * // The inject and module method can also be used inside of the it or beforeEach + * it('should override a version and test the new version is injected', function() { + * // module() takes functions or strings (module aliases) + * module(function($provide) { + * $provide.value('version', 'overridden'); // override version here + * }); + * + * inject(function(version) { + * expect(version).toEqual('overridden'); + * }); + * }); + * }); + * + * </pre> + * + * @param {...Function} fns any number of functions which will be injected using the injector. + */ + + + + var ErrorAddingDeclarationLocationStack = function(e, errorForStack) { + this.message = e.message; + this.name = e.name; + if (e.line) this.line = e.line; + if (e.sourceId) this.sourceId = e.sourceId; + if (e.stack && errorForStack) + this.stack = e.stack + '\n' + errorForStack.stack; + if (e.stackArray) this.stackArray = e.stackArray; + }; + ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString; + + window.inject = angular.mock.inject = function() { + var blockFns = Array.prototype.slice.call(arguments, 0); + var errorForStack = new Error('Declaration Location'); + return isSpecRunning() ? workFn.call(currentSpec) : workFn; + ///////////////////// + function workFn() { + var modules = currentSpec.$modules || []; + + modules.unshift('ngMock'); + modules.unshift('ng'); + var injector = currentSpec.$injector; + if (!injector) { + injector = currentSpec.$injector = angular.injector(modules); + } + for(var i = 0, ii = blockFns.length; i < ii; i++) { + try { + /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */ + injector.invoke(blockFns[i] || angular.noop, this); + /* jshint +W040 */ + } catch (e) { + if (e.stack && errorForStack) { + throw new ErrorAddingDeclarationLocationStack(e, errorForStack); + } + throw e; + } finally { + errorForStack = null; + } + } + } + }; +} + + +})(window, window.angular); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.js new file mode 100644 index 0000000..36b34b4 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.js @@ -0,0 +1,596 @@ +/** + * @license AngularJS v1.2.13 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +var $resourceMinErr = angular.$$minErr('$resource'); + +// Helper functions and regex to lookup a dotted path on an object +// stopping at undefined/null. The path must be composed of ASCII +// identifiers (just like $parse) +var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/; + +function isValidDottedPath(path) { + return (path != null && path !== '' && path !== 'hasOwnProperty' && + MEMBER_NAME_REGEX.test('.' + path)); +} + +function lookupDottedPath(obj, path) { + if (!isValidDottedPath(path)) { + throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path); + } + var keys = path.split('.'); + for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) { + var key = keys[i]; + obj = (obj !== null) ? obj[key] : undefined; + } + return obj; +} + +/** + * Create a shallow copy of an object and clear other fields from the destination + */ +function shallowClearAndCopy(src, dst) { + dst = dst || {}; + + angular.forEach(dst, function(value, key){ + delete dst[key]; + }); + + for (var key in src) { + if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { + dst[key] = src[key]; + } + } + + return dst; +} + +/** + * @ngdoc overview + * @name ngResource + * @description + * + * # ngResource + * + * The `ngResource` module provides interaction support with RESTful services + * via the $resource service. + * + * {@installModule resource} + * + * <div doc-module-components="ngResource"></div> + * + * See {@link ngResource.$resource `$resource`} for usage. + */ + +/** + * @ngdoc object + * @name ngResource.$resource + * @requires $http + * + * @description + * A factory which creates a resource object that lets you interact with + * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. + * + * The returned resource object has action methods which provide high-level behaviors without + * the need to interact with the low level {@link ng.$http $http} service. + * + * Requires the {@link ngResource `ngResource`} module to be installed. + * + * @param {string} url A parametrized URL template with parameters prefixed by `:` as in + * `/user/:username`. If you are using a URL with a port number (e.g. + * `http://example.com:8080/api`), it will be respected. + * + * If you are using a url with a suffix, just add the suffix, like this: + * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')` + * or even `$resource('http://example.com/resource/:resource_id.:format')` + * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be + * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you + * can escape it with `/\.`. + * + * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in + * `actions` methods. If any of the parameter value is a function, it will be executed every time + * when a param value needs to be obtained for a request (unless the param was overridden). + * + * Each key value in the parameter object is first bound to url template if present and then any + * excess keys are appended to the url search query after the `?`. + * + * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in + * URL `/path/greet?salutation=Hello`. + * + * If the parameter value is prefixed with `@` then the value of that parameter is extracted from + * the data object (useful for non-GET operations). + * + * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the + * default set of resource actions. The declaration should be created in the format of {@link + * ng.$http#usage_parameters $http.config}: + * + * {action1: {method:?, params:?, isArray:?, headers:?, ...}, + * action2: {method:?, params:?, isArray:?, headers:?, ...}, + * ...} + * + * Where: + * + * - **`action`** – {string} – The name of action. This name becomes the name of the method on + * your resource object. + * - **`method`** – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, + * `DELETE`, and `JSONP`. + * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of + * the parameter value is a function, it will be executed every time when a param value needs to + * be obtained for a request (unless the param was overridden). + * - **`url`** – {string} – action specific `url` override. The url templating is supported just + * like for the resource-level urls. + * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array, + * see `returns` section. + * - **`transformRequest`** – + * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` – + * transform function or an array of such functions. The transform function takes the http + * request body and headers and returns its transformed (typically serialized) version. + * - **`transformResponse`** – + * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` – + * transform function or an array of such functions. The transform function takes the http + * response body and headers and returns its transformed (typically deserialized) version. + * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the + * GET request, otherwise if a cache instance built with + * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for + * caching. + * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that + * should abort the request when resolved. + * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the + * XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5 + * requests with credentials} for more information. + * - **`responseType`** - `{string}` - see {@link + * https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}. + * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods - + * `response` and `responseError`. Both `response` and `responseError` interceptors get called + * with `http response` object. See {@link ng.$http $http interceptors}. + * + * @returns {Object} A resource "class" object with methods for the default set of resource actions + * optionally extended with custom `actions`. The default set contains these actions: + * + * { 'get': {method:'GET'}, + * 'save': {method:'POST'}, + * 'query': {method:'GET', isArray:true}, + * 'remove': {method:'DELETE'}, + * 'delete': {method:'DELETE'} }; + * + * Calling these methods invoke an {@link ng.$http} with the specified http method, + * destination and parameters. When the data is returned from the server then the object is an + * instance of the resource class. The actions `save`, `remove` and `delete` are available on it + * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create, + * read, update, delete) on server-side data like this: + * <pre> + var User = $resource('/user/:userId', {userId:'@id'}); + var user = User.get({userId:123}, function() { + user.abc = true; + user.$save(); + }); + </pre> + * + * It is important to realize that invoking a $resource object method immediately returns an + * empty reference (object or array depending on `isArray`). Once the data is returned from the + * server the existing reference is populated with the actual data. This is a useful trick since + * usually the resource is assigned to a model which is then rendered by the view. Having an empty + * object results in no rendering, once the data arrives from the server then the object is + * populated with the data and the view automatically re-renders itself showing the new data. This + * means that in most cases one never has to write a callback function for the action methods. + * + * The action methods on the class object or instance object can be invoked with the following + * parameters: + * + * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])` + * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])` + * - non-GET instance actions: `instance.$action([parameters], [success], [error])` + * + * Success callback is called with (value, responseHeaders) arguments. Error callback is called + * with (httpResponse) argument. + * + * Class actions return empty instance (with additional properties below). + * Instance actions return promise of the action. + * + * The Resource instances and collection have these additional properties: + * + * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this + * instance or collection. + * + * On success, the promise is resolved with the same resource instance or collection object, + * updated with data from server. This makes it easy to use in + * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view + * rendering until the resource(s) are loaded. + * + * On failure, the promise is resolved with the {@link ng.$http http response} object, without + * the `resource` property. + * + * - `$resolved`: `true` after first server interaction is completed (either with success or + * rejection), `false` before that. Knowing if the Resource has been resolved is useful in + * data-binding. + * + * @example + * + * # Credit card resource + * + * <pre> + // Define CreditCard class + var CreditCard = $resource('/user/:userId/card/:cardId', + {userId:123, cardId:'@id'}, { + charge: {method:'POST', params:{charge:true}} + }); + + // We can retrieve a collection from the server + var cards = CreditCard.query(function() { + // GET: /user/123/card + // server returns: [ {id:456, number:'1234', name:'Smith'} ]; + + var card = cards[0]; + // each item is an instance of CreditCard + expect(card instanceof CreditCard).toEqual(true); + card.name = "J. Smith"; + // non GET methods are mapped onto the instances + card.$save(); + // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'} + // server returns: {id:456, number:'1234', name: 'J. Smith'}; + + // our custom method is mapped as well. + card.$charge({amount:9.99}); + // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'} + }); + + // we can create an instance as well + var newCard = new CreditCard({number:'0123'}); + newCard.name = "Mike Smith"; + newCard.$save(); + // POST: /user/123/card {number:'0123', name:'Mike Smith'} + // server returns: {id:789, number:'0123', name: 'Mike Smith'}; + expect(newCard.id).toEqual(789); + * </pre> + * + * The object returned from this function execution is a resource "class" which has "static" method + * for each action in the definition. + * + * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and + * `headers`. + * When the data is returned from the server then the object is an instance of the resource type and + * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD + * operations (create, read, update, delete) on server-side data. + + <pre> + var User = $resource('/user/:userId', {userId:'@id'}); + var user = User.get({userId:123}, function() { + user.abc = true; + user.$save(); + }); + </pre> + * + * It's worth noting that the success callback for `get`, `query` and other methods gets passed + * in the response that came from the server as well as $http header getter function, so one + * could rewrite the above example and get access to http headers as: + * + <pre> + var User = $resource('/user/:userId', {userId:'@id'}); + User.get({userId:123}, function(u, getResponseHeaders){ + u.abc = true; + u.$save(function(u, putResponseHeaders) { + //u => saved user object + //putResponseHeaders => $http header getter + }); + }); + </pre> + + * # Creating a custom 'PUT' request + * In this example we create a custom method on our resource to make a PUT request + * <pre> + * var app = angular.module('app', ['ngResource', 'ngRoute']); + * + * // Some APIs expect a PUT request in the format URL/object/ID + * // Here we are creating an 'update' method + * app.factory('Notes', ['$resource', function($resource) { + * return $resource('/notes/:id', null, + * { + * 'update': { method:'PUT' } + * }); + * }]); + * + * // In our controller we get the ID from the URL using ngRoute and $routeParams + * // We pass in $routeParams and our Notes factory along with $scope + * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes', + function($scope, $routeParams, Notes) { + * // First get a note object from the factory + * var note = Notes.get({ id:$routeParams.id }); + * $id = note.id; + * + * // Now call update passing in the ID first then the object you are updating + * Notes.update({ id:$id }, note); + * + * // This will PUT /notes/ID with the note object in the request payload + * }]); + * </pre> + */ +angular.module('ngResource', ['ng']). + factory('$resource', ['$http', '$q', function($http, $q) { + + var DEFAULT_ACTIONS = { + 'get': {method:'GET'}, + 'save': {method:'POST'}, + 'query': {method:'GET', isArray:true}, + 'remove': {method:'DELETE'}, + 'delete': {method:'DELETE'} + }; + var noop = angular.noop, + forEach = angular.forEach, + extend = angular.extend, + copy = angular.copy, + isFunction = angular.isFunction; + + /** + * We need our custom method because encodeURIComponent is too aggressive and doesn't follow + * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path + * segments: + * segment = *pchar + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * pct-encoded = "%" HEXDIG HEXDIG + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ + function encodeUriSegment(val) { + return encodeUriQuery(val, true). + replace(/%26/gi, '&'). + replace(/%3D/gi, '='). + replace(/%2B/gi, '+'); + } + + + /** + * This method is intended for encoding *key* or *value* parts of query component. We need a + * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't + * have to be encoded per http://tools.ietf.org/html/rfc3986: + * query = *( pchar / "/" / "?" ) + * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * pct-encoded = "%" HEXDIG HEXDIG + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + * / "*" / "+" / "," / ";" / "=" + */ + function encodeUriQuery(val, pctEncodeSpaces) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); + } + + function Route(template, defaults) { + this.template = template; + this.defaults = defaults || {}; + this.urlParams = {}; + } + + Route.prototype = { + setUrlParams: function(config, params, actionUrl) { + var self = this, + url = actionUrl || self.template, + val, + encodedVal; + + var urlParams = self.urlParams = {}; + forEach(url.split(/\W/), function(param){ + if (param === 'hasOwnProperty') { + throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name."); + } + if (!(new RegExp("^\\d+$").test(param)) && param && + (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) { + urlParams[param] = true; + } + }); + url = url.replace(/\\:/g, ':'); + + params = params || {}; + forEach(self.urlParams, function(_, urlParam){ + val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam]; + if (angular.isDefined(val) && val !== null) { + encodedVal = encodeUriSegment(val); + url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) { + return encodedVal + p1; + }); + } else { + url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match, + leadingSlashes, tail) { + if (tail.charAt(0) == '/') { + return tail; + } else { + return leadingSlashes + tail; + } + }); + } + }); + + // strip trailing slashes and set the url + url = url.replace(/\/+$/, '') || '/'; + // then replace collapse `/.` if found in the last URL path segment before the query + // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x` + url = url.replace(/\/\.(?=\w+($|\?))/, '.'); + // replace escaped `/\.` with `/.` + config.url = url.replace(/\/\\\./, '/.'); + + + // set params - delegate param encoding to $http + forEach(params, function(value, key){ + if (!self.urlParams[key]) { + config.params = config.params || {}; + config.params[key] = value; + } + }); + } + }; + + + function resourceFactory(url, paramDefaults, actions) { + var route = new Route(url); + + actions = extend({}, DEFAULT_ACTIONS, actions); + + function extractParams(data, actionParams){ + var ids = {}; + actionParams = extend({}, paramDefaults, actionParams); + forEach(actionParams, function(value, key){ + if (isFunction(value)) { value = value(); } + ids[key] = value && value.charAt && value.charAt(0) == '@' ? + lookupDottedPath(data, value.substr(1)) : value; + }); + return ids; + } + + function defaultResponseInterceptor(response) { + return response.resource; + } + + function Resource(value){ + shallowClearAndCopy(value || {}, this); + } + + forEach(actions, function(action, name) { + var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method); + + Resource[name] = function(a1, a2, a3, a4) { + var params = {}, data, success, error; + + /* jshint -W086 */ /* (purposefully fall through case statements) */ + switch(arguments.length) { + case 4: + error = a4; + success = a3; + //fallthrough + case 3: + case 2: + if (isFunction(a2)) { + if (isFunction(a1)) { + success = a1; + error = a2; + break; + } + + success = a2; + error = a3; + //fallthrough + } else { + params = a1; + data = a2; + success = a3; + break; + } + case 1: + if (isFunction(a1)) success = a1; + else if (hasBody) data = a1; + else params = a1; + break; + case 0: break; + default: + throw $resourceMinErr('badargs', + "Expected up to 4 arguments [params, data, success, error], got {0} arguments", + arguments.length); + } + /* jshint +W086 */ /* (purposefully fall through case statements) */ + + var isInstanceCall = this instanceof Resource; + var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data)); + var httpConfig = {}; + var responseInterceptor = action.interceptor && action.interceptor.response || + defaultResponseInterceptor; + var responseErrorInterceptor = action.interceptor && action.interceptor.responseError || + undefined; + + forEach(action, function(value, key) { + if (key != 'params' && key != 'isArray' && key != 'interceptor') { + httpConfig[key] = copy(value); + } + }); + + if (hasBody) httpConfig.data = data; + route.setUrlParams(httpConfig, + extend({}, extractParams(data, action.params || {}), params), + action.url); + + var promise = $http(httpConfig).then(function(response) { + var data = response.data, + promise = value.$promise; + + if (data) { + // Need to convert action.isArray to boolean in case it is undefined + // jshint -W018 + if (angular.isArray(data) !== (!!action.isArray)) { + throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected ' + + 'response to contain an {0} but got an {1}', + action.isArray?'array':'object', angular.isArray(data)?'array':'object'); + } + // jshint +W018 + if (action.isArray) { + value.length = 0; + forEach(data, function(item) { + value.push(new Resource(item)); + }); + } else { + shallowClearAndCopy(data, value); + value.$promise = promise; + } + } + + value.$resolved = true; + + response.resource = value; + + return response; + }, function(response) { + value.$resolved = true; + + (error||noop)(response); + + return $q.reject(response); + }); + + promise = promise.then( + function(response) { + var value = responseInterceptor(response); + (success||noop)(value, response.headers); + return value; + }, + responseErrorInterceptor); + + if (!isInstanceCall) { + // we are creating instance / collection + // - set the initial promise + // - return the instance / collection + value.$promise = promise; + value.$resolved = false; + + return value; + } + + // instance call + return promise; + }; + + + Resource.prototype['$' + name] = function(params, success, error) { + if (isFunction(params)) { + error = success; success = params; params = {}; + } + var result = Resource[name].call(this, params, this, success, error); + return result.$promise || result; + }; + }); + + Resource.bind = function(additionalParamDefaults){ + return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions); + }; + + return Resource; + } + + return resourceFactory; + }]); + + +})(window, window.angular); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js new file mode 100644 index 0000000..3496cfc --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js @@ -0,0 +1,13 @@ +/* + AngularJS v1.2.13 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(H,a,A){'use strict';function D(p,g){g=g||{};a.forEach(g,function(a,c){delete g[c]});for(var c in p)!p.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(g[c]=p[c]);return g}var v=a.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;a.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(p,g){function c(a,c){this.template=a;this.defaults=c||{};this.urlParams={}}function t(n,w,l){function r(h,d){var e={};d=x({},w,d);s(d,function(b,d){u(b)&&(b=b());var k;if(b&& +b.charAt&&"@"==b.charAt(0)){k=h;var a=b.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!C.test("."+a))throw v("badmember",a);for(var a=a.split("."),f=0,c=a.length;f<c&&k!==A;f++){var g=a[f];k=null!==k?k[g]:A}}else k=b;e[d]=k});return e}function e(a){return a.resource}function f(a){D(a||{},this)}var F=new c(n);l=x({},B,l);s(l,function(h,d){var c=/^(POST|PUT|PATCH)$/i.test(h.method);f[d]=function(b,d,k,w){var q={},n,l,y;switch(arguments.length){case 4:y=w,l=k;case 3:case 2:if(u(d)){if(u(b)){l= +b;y=d;break}l=d;y=k}else{q=b;n=d;l=k;break}case 1:u(b)?l=b:c?n=b:q=b;break;case 0:break;default:throw v("badargs",arguments.length);}var t=this instanceof f,m=t?n:h.isArray?[]:new f(n),z={},B=h.interceptor&&h.interceptor.response||e,C=h.interceptor&&h.interceptor.responseError||A;s(h,function(a,b){"params"!=b&&("isArray"!=b&&"interceptor"!=b)&&(z[b]=G(a))});c&&(z.data=n);F.setUrlParams(z,x({},r(n,h.params||{}),q),h.url);q=p(z).then(function(b){var d=b.data,k=m.$promise;if(d){if(a.isArray(d)!==!!h.isArray)throw v("badcfg", +h.isArray?"array":"object",a.isArray(d)?"array":"object");h.isArray?(m.length=0,s(d,function(b){m.push(new f(b))})):(D(d,m),m.$promise=k)}m.$resolved=!0;b.resource=m;return b},function(b){m.$resolved=!0;(y||E)(b);return g.reject(b)});q=q.then(function(b){var a=B(b);(l||E)(a,b.headers);return a},C);return t?q:(m.$promise=q,m.$resolved=!1,m)};f.prototype["$"+d]=function(b,a,k){u(b)&&(k=a,a=b,b={});b=f[d].call(this,b,this,a,k);return b.$promise||b}});f.bind=function(a){return t(n,x({},w,a),l)};return f} +var B={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},E=a.noop,s=a.forEach,x=a.extend,G=a.copy,u=a.isFunction;c.prototype={setUrlParams:function(c,g,l){var r=this,e=l||r.template,f,p,h=r.urlParams={};s(e.split(/\W/),function(a){if("hasOwnProperty"===a)throw v("badname");!/^\d+$/.test(a)&&(a&&RegExp("(^|[^\\\\]):"+a+"(\\W|$)").test(e))&&(h[a]=!0)});e=e.replace(/\\:/g,":");g=g||{};s(r.urlParams,function(d,c){f=g.hasOwnProperty(c)? +g[c]:r.defaults[c];a.isDefined(f)&&null!==f?(p=encodeURIComponent(f).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),e=e.replace(RegExp(":"+c+"(\\W|$)","g"),function(a,c){return p+c})):e=e.replace(RegExp("(/?):"+c+"(\\W|$)","g"),function(a,c,d){return"/"==d.charAt(0)?d:c+d})});e=e.replace(/\/+$/,"")||"/";e=e.replace(/\/\.(?=\w+($|\?))/,".");c.url=e.replace(/\/\\\./,"/.");s(g,function(a, +e){r.urlParams[e]||(c.params=c.params||{},c.params[e]=a)})}};return t}])})(window,window.angular); +//# sourceMappingURL=angular-resource.min.js.map diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js.map b/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js.map new file mode 100644 index 0000000..90492df --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-resource.min.js", +"lineCount":12, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAAD,CAAMC,CAAN,CAAW,CACrCA,CAAA,CAAMA,CAAN,EAAa,EAEbJ,EAAAK,QAAA,CAAgBD,CAAhB,CAAqB,QAAQ,CAACE,CAAD,CAAQC,CAAR,CAAY,CACvC,OAAOH,CAAA,CAAIG,CAAJ,CADgC,CAAzC,CAIA,KAAKA,IAAIA,CAAT,GAAgBJ,EAAhB,CACM,CAAAA,CAAAK,eAAA,CAAmBD,CAAnB,CAAJ,EAAmD,GAAnD,GAAiCA,CAAAE,OAAA,CAAW,CAAX,CAAjC,EAA4E,GAA5E,GAA0DF,CAAAE,OAAA,CAAW,CAAX,CAA1D,GACEL,CAAA,CAAIG,CAAJ,CADF,CACaJ,CAAA,CAAII,CAAJ,CADb,CAKF,OAAOH,EAb8B,CA3BvC,IAAIM,EAAkBV,CAAAW,SAAA,CAAiB,WAAjB,CAAtB,CAKIC,EAAoB,iCAySxBZ,EAAAa,OAAA,CAAe,YAAf,CAA6B,CAAC,IAAD,CAA7B,CAAAC,QAAA,CACU,WADV,CACuB,CAAC,OAAD,CAAU,IAAV,CAAgB,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAY,CAsDvDC,QAASA,EAAK,CAACC,CAAD,CAAWC,CAAX,CAAqB,CACjC,IAAAD,SAAA,CAAgBA,CAChB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C,CADwD,CAClD,CACxB,MAAsB,GAAtB,EAAIA,CAAAvF,OAAA,CAAY,CAAZ,CAAJ,CACSuF,CADT,CAGSD,CAHT,CAG0BC,CAJF,CADpB,CARmC,CAA7C,CAoBA1E,EAAA,CAAMA,CAAAkE,QAAA,CAAY,MAAZ,CAAoB,EAApB,CAAN,EAAiC,GAGjClE,EAAA,CAAMA,CAAAkE,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAENP,EAAA3D,IAAA,CAAaA,CAAAkE,QAAA,CAAY,QAAZ,CAAsB,IAAtB,CAIbnF,EAAA,CAAQgD,CAAR,CAAgB,QAAQ,CAAC/C,CAAD;AAAQC,CAAR,CAAY,CAC7B4E,CAAA/D,UAAA,CAAeb,CAAf,CAAL,GACE0E,CAAA5B,OACA,CADgB4B,CAAA5B,OAChB,EADiC,EACjC,CAAA4B,CAAA5B,OAAA,CAAc9C,CAAd,CAAA,CAAqBD,CAFvB,CADkC,CAApC,CAhDgD,CADlC,CA6NlB,OAAOe,EAzRgD,CAApC,CADvB,CAhTsC,CAArC,CAAA,CA8kBEtB,MA9kBF,CA8kBUA,MAAAC,QA9kBV;", +"sources":["angular-resource.js"], +"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","factory","$http","$q","Route","template","defaults","urlParams","resourceFactory","url","paramDefaults","actions","extractParams","data","actionParams","ids","extend","isFunction","path","test","keys","split","i","ii","length","obj","defaultResponseInterceptor","response","resource","Resource","route","DEFAULT_ACTIONS","action","name","hasBody","method","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","isArray","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","$promise","item","push","$resolved","noop","reject","headers","prototype","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","param","RegExp","replace","_","urlParam","isDefined","encodeURIComponent","match","p1","leadingSlashes","tail"] +} diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.js new file mode 100644 index 0000000..9bb5af1 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.js @@ -0,0 +1,921 @@ +/** + * @license AngularJS v1.2.13 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +/** + * @ngdoc overview + * @name ngRoute + * @description + * + * # ngRoute + * + * The `ngRoute` module provides routing and deeplinking services and directives for angular apps. + * + * ## Example + * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. + * + * {@installModule route} + * + * <div doc-module-components="ngRoute"></div> + */ + /* global -ngRouteModule */ +var ngRouteModule = angular.module('ngRoute', ['ng']). + provider('$route', $RouteProvider); + +/** + * @ngdoc object + * @name ngRoute.$routeProvider + * @function + * + * @description + * + * Used for configuring routes. + * + * ## Example + * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`. + * + * ## Dependencies + * Requires the {@link ngRoute `ngRoute`} module to be installed. + */ +function $RouteProvider(){ + function inherit(parent, extra) { + return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra); + } + + var routes = {}; + + /** + * @ngdoc method + * @name ngRoute.$routeProvider#when + * @methodOf ngRoute.$routeProvider + * + * @param {string} path Route path (matched against `$location.path`). If `$location.path` + * contains redundant trailing slash or is missing one, the route will still match and the + * `$location.path` will be updated to add or drop the trailing slash to exactly match the + * route definition. + * + * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up + * to the next slash are matched and stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain named groups starting with a colon and ending with a star: + * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name` + * when the route matches. + * * `path` can contain optional named groups with a question mark: e.g.`:name?`. + * + * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match + * `/color/brown/largecode/code/with/slashs/edit` and extract: + * + * * `color: brown` + * * `largecode: code/with/slashs`. + * + * + * @param {Object} route Mapping information to be assigned to `$route.current` on route + * match. + * + * Object properties: + * + * - `controller` – `{(string|function()=}` – Controller fn that should be associated with + * newly created scope or the name of a {@link angular.Module#controller registered + * controller} if passed as a string. + * - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be + * published to scope under the `controllerAs` name. + * - `template` – `{string=|function()=}` – html template as a string or a function that + * returns an html template as a string which should be used by {@link + * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives. + * This property takes precedence over `templateUrl`. + * + * If `template` is a function, it will be called with the following parameters: + * + * - `{Array.<Object>}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html + * template that should be used by {@link ngRoute.directive:ngView ngView}. + * + * If `templateUrl` is a function, it will be called with the following parameters: + * + * - `{Array.<Object>}` - route parameters extracted from the current + * `$location.path()` by applying the current route + * + * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should + * be injected into the controller. If any of these dependencies are promises, the router + * will wait for them all to be resolved or one to be rejected before the controller is + * instantiated. + * If all the promises are resolved successfully, the values of the resolved promises are + * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is + * fired. If any of the promises are rejected the + * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object + * is: + * + * - `key` – `{string}`: a name of a dependency to be injected into the controller. + * - `factory` - `{string|function}`: If `string` then it is an alias for a service. + * Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected} + * and the return value is treated as the dependency. If the result is a promise, it is + * resolved before its value is injected into the controller. Be aware that + * `ngRoute.$routeParams` will still refer to the previous route within these resolve + * functions. Use `$route.current.params` to access the new route parameters, instead. + * + * - `redirectTo` – {(string|function())=} – value to update + * {@link ng.$location $location} path with and trigger route redirection. + * + * If `redirectTo` is a function, it will be called with the following parameters: + * + * - `{Object.<string>}` - route parameters extracted from the current + * `$location.path()` by applying the current route templateUrl. + * - `{string}` - current `$location.path()` + * - `{Object}` - current `$location.search()` + * + * The custom `redirectTo` function is expected to return a string which will be used + * to update `$location.path()` and `$location.search()`. + * + * - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()` + * or `$location.hash()` changes. + * + * If the option is set to `false` and url in the browser changes, then + * `$routeUpdate` event is broadcasted on the root scope. + * + * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive + * + * If the option is set to `true`, then the particular route can be matched without being + * case sensitive + * + * @returns {Object} self + * + * @description + * Adds a new route definition to the `$route` service. + */ + this.when = function(path, route) { + routes[path] = angular.extend( + {reloadOnSearch: true}, + route, + path && pathRegExp(path, route) + ); + + // create redirection for trailing slashes + if (path) { + var redirectPath = (path[path.length-1] == '/') + ? path.substr(0, path.length-1) + : path +'/'; + + routes[redirectPath] = angular.extend( + {redirectTo: path}, + pathRegExp(redirectPath, route) + ); + } + + return this; + }; + + /** + * @param path {string} path + * @param opts {Object} options + * @return {?Object} + * + * @description + * Normalizes the given path, returning a regular expression + * and the original path. + * + * Inspired by pathRexp in visionmedia/express/lib/utils.js. + */ + function pathRegExp(path, opts) { + var insensitive = opts.caseInsensitiveMatch, + ret = { + originalPath: path, + regexp: path + }, + keys = ret.keys = []; + + path = path + .replace(/([().])/g, '\\$1') + .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option){ + var optional = option === '?' ? option : null; + var star = option === '*' ? option : null; + keys.push({ name: key, optional: !!optional }); + slash = slash || ''; + return '' + + (optional ? '' : slash) + + '(?:' + + (optional ? slash : '') + + (star && '(.+?)' || '([^/]+)') + + (optional || '') + + ')' + + (optional || ''); + }) + .replace(/([\/$\*])/g, '\\$1'); + + ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : ''); + return ret; + } + + /** + * @ngdoc method + * @name ngRoute.$routeProvider#otherwise + * @methodOf ngRoute.$routeProvider + * + * @description + * Sets route definition that will be used on route change when no other route definition + * is matched. + * + * @param {Object} params Mapping information to be assigned to `$route.current`. + * @returns {Object} self + */ + this.otherwise = function(params) { + this.when(null, params); + return this; + }; + + + this.$get = ['$rootScope', + '$location', + '$routeParams', + '$q', + '$injector', + '$http', + '$templateCache', + '$sce', + function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) { + + /** + * @ngdoc object + * @name ngRoute.$route + * @requires $location + * @requires $routeParams + * + * @property {Object} current Reference to the current route definition. + * The route definition contains: + * + * - `controller`: The controller constructor as define in route definition. + * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for + * controller instantiation. The `locals` contain + * the resolved values of the `resolve` map. Additionally the `locals` also contain: + * + * - `$scope` - The current route scope. + * - `$template` - The current route template HTML. + * + * @property {Array.<Object>} routes Array of all configured routes. + * + * @description + * `$route` is used for deep-linking URLs to controllers and views (HTML partials). + * It watches `$location.url()` and tries to map the path to an existing route definition. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API. + * + * The `$route` service is typically used in conjunction with the + * {@link ngRoute.directive:ngView `ngView`} directive and the + * {@link ngRoute.$routeParams `$routeParams`} service. + * + * @example + This example shows how changing the URL hash causes the `$route` to match a route against the + URL, and the `ngView` pulls in the partial. + + Note that this example is using {@link ng.directive:script inlined templates} + to get it working on jsfiddle as well. + + <example module="ngViewExample" deps="angular-route.js"> + <file name="index.html"> + <div ng-controller="MainCntl"> + Choose: + <a href="Book/Moby">Moby</a> | + <a href="Book/Moby/ch/1">Moby: Ch1</a> | + <a href="Book/Gatsby">Gatsby</a> | + <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> | + <a href="Book/Scarlet">Scarlet Letter</a><br/> + + <div ng-view></div> + <hr /> + + <pre>$location.path() = {{$location.path()}}</pre> + <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre> + <pre>$route.current.params = {{$route.current.params}}</pre> + <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre> + <pre>$routeParams = {{$routeParams}}</pre> + </div> + </file> + + <file name="book.html"> + controller: {{name}}<br /> + Book Id: {{params.bookId}}<br /> + </file> + + <file name="chapter.html"> + controller: {{name}}<br /> + Book Id: {{params.bookId}}<br /> + Chapter Id: {{params.chapterId}} + </file> + + <file name="script.js"> + angular.module('ngViewExample', ['ngRoute']) + + .config(function($routeProvider, $locationProvider) { + $routeProvider.when('/Book/:bookId', { + templateUrl: 'book.html', + controller: BookCntl, + resolve: { + // I will cause a 1 second delay + delay: function($q, $timeout) { + var delay = $q.defer(); + $timeout(delay.resolve, 1000); + return delay.promise; + } + } + }); + $routeProvider.when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: ChapterCntl + }); + + // configure html5 to get links working on jsfiddle + $locationProvider.html5Mode(true); + }); + + function MainCntl($scope, $route, $routeParams, $location) { + $scope.$route = $route; + $scope.$location = $location; + $scope.$routeParams = $routeParams; + } + + function BookCntl($scope, $routeParams) { + $scope.name = "BookCntl"; + $scope.params = $routeParams; + } + + function ChapterCntl($scope, $routeParams) { + $scope.name = "ChapterCntl"; + $scope.params = $routeParams; + } + </file> + + <file name="protractorTest.js"> + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('.doc-example-live [ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterCntl/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('.doc-example-live [ng-view]')).getText(); + expect(content).toMatch(/controller\: BookCntl/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); + </file> + </example> + */ + + /** + * @ngdoc event + * @name ngRoute.$route#$routeChangeStart + * @eventOf ngRoute.$route + * @eventType broadcast on root scope + * @description + * Broadcasted before a route change. At this point the route services starts + * resolving all of the dependencies needed for the route change to occur. + * Typically this involves fetching the view template as well as any dependencies + * defined in `resolve` route property. Once all of the dependencies are resolved + * `$routeChangeSuccess` is fired. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} next Future route information. + * @param {Route} current Current route information. + */ + + /** + * @ngdoc event + * @name ngRoute.$route#$routeChangeSuccess + * @eventOf ngRoute.$route + * @eventType broadcast on root scope + * @description + * Broadcasted after a route dependencies are resolved. + * {@link ngRoute.directive:ngView ngView} listens for the directive + * to instantiate the controller and render the view. + * + * @param {Object} angularEvent Synthetic event object. + * @param {Route} current Current route information. + * @param {Route|Undefined} previous Previous route information, or undefined if current is + * first route entered. + */ + + /** + * @ngdoc event + * @name ngRoute.$route#$routeChangeError + * @eventOf ngRoute.$route + * @eventType broadcast on root scope + * @description + * Broadcasted if any of the resolve promises are rejected. + * + * @param {Object} angularEvent Synthetic event object + * @param {Route} current Current route information. + * @param {Route} previous Previous route information. + * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise. + */ + + /** + * @ngdoc event + * @name ngRoute.$route#$routeUpdate + * @eventOf ngRoute.$route + * @eventType broadcast on root scope + * @description + * + * The `reloadOnSearch` property has been set to false, and we are reusing the same + * instance of the Controller. + */ + + var forceReload = false, + $route = { + routes: routes, + + /** + * @ngdoc method + * @name ngRoute.$route#reload + * @methodOf ngRoute.$route + * + * @description + * Causes `$route` service to reload the current route even if + * {@link ng.$location $location} hasn't changed. + * + * As a result of that, {@link ngRoute.directive:ngView ngView} + * creates new scope, reinstantiates the controller. + */ + reload: function() { + forceReload = true; + $rootScope.$evalAsync(updateRoute); + } + }; + + $rootScope.$on('$locationChangeSuccess', updateRoute); + + return $route; + + ///////////////////////////////////////////////////// + + /** + * @param on {string} current url + * @param route {Object} route regexp to match the url against + * @return {?Object} + * + * @description + * Check if the route matches the current url. + * + * Inspired by match in + * visionmedia/express/lib/router/router.js. + */ + function switchRouteMatcher(on, route) { + var keys = route.keys, + params = {}; + + if (!route.regexp) return null; + + var m = route.regexp.exec(on); + if (!m) return null; + + for (var i = 1, len = m.length; i < len; ++i) { + var key = keys[i - 1]; + + var val = 'string' == typeof m[i] + ? decodeURIComponent(m[i]) + : m[i]; + + if (key && val) { + params[key.name] = val; + } + } + return params; + } + + function updateRoute() { + var next = parseRoute(), + last = $route.current; + + if (next && last && next.$$route === last.$$route + && angular.equals(next.pathParams, last.pathParams) + && !next.reloadOnSearch && !forceReload) { + last.params = next.params; + angular.copy(last.params, $routeParams); + $rootScope.$broadcast('$routeUpdate', last); + } else if (next || last) { + forceReload = false; + $rootScope.$broadcast('$routeChangeStart', next, last); + $route.current = next; + if (next) { + if (next.redirectTo) { + if (angular.isString(next.redirectTo)) { + $location.path(interpolate(next.redirectTo, next.params)).search(next.params) + .replace(); + } else { + $location.url(next.redirectTo(next.pathParams, $location.path(), $location.search())) + .replace(); + } + } + } + + $q.when(next). + then(function() { + if (next) { + var locals = angular.extend({}, next.resolve), + template, templateUrl; + + angular.forEach(locals, function(value, key) { + locals[key] = angular.isString(value) ? + $injector.get(value) : $injector.invoke(value); + }); + + if (angular.isDefined(template = next.template)) { + if (angular.isFunction(template)) { + template = template(next.params); + } + } else if (angular.isDefined(templateUrl = next.templateUrl)) { + if (angular.isFunction(templateUrl)) { + templateUrl = templateUrl(next.params); + } + templateUrl = $sce.getTrustedResourceUrl(templateUrl); + if (angular.isDefined(templateUrl)) { + next.loadedTemplateUrl = templateUrl; + template = $http.get(templateUrl, {cache: $templateCache}). + then(function(response) { return response.data; }); + } + } + if (angular.isDefined(template)) { + locals['$template'] = template; + } + return $q.all(locals); + } + }). + // after route change + then(function(locals) { + if (next == $route.current) { + if (next) { + next.locals = locals; + angular.copy(next.params, $routeParams); + } + $rootScope.$broadcast('$routeChangeSuccess', next, last); + } + }, function(error) { + if (next == $route.current) { + $rootScope.$broadcast('$routeChangeError', next, last, error); + } + }); + } + } + + + /** + * @returns the current active route, by matching it against the URL + */ + function parseRoute() { + // Match a route + var params, match; + angular.forEach(routes, function(route, path) { + if (!match && (params = switchRouteMatcher($location.path(), route))) { + match = inherit(route, { + params: angular.extend({}, $location.search(), params), + pathParams: params}); + match.$$route = route; + } + }); + // No route matched; fallback to "otherwise" route + return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); + } + + /** + * @returns interpolation of the redirect path with the parameters + */ + function interpolate(string, params) { + var result = []; + angular.forEach((string||'').split(':'), function(segment, i) { + if (i === 0) { + result.push(segment); + } else { + var segmentMatch = segment.match(/(\w+)(.*)/); + var key = segmentMatch[1]; + result.push(params[key]); + result.push(segmentMatch[2] || ''); + delete params[key]; + } + }); + return result.join(''); + } + }]; +} + +ngRouteModule.provider('$routeParams', $RouteParamsProvider); + + +/** + * @ngdoc object + * @name ngRoute.$routeParams + * @requires $route + * + * @description + * The `$routeParams` service allows you to retrieve the current set of route parameters. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * The route parameters are a combination of {@link ng.$location `$location`}'s + * {@link ng.$location#methods_search `search()`} and {@link ng.$location#methods_path `path()`}. + * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched. + * + * In case of parameter name collision, `path` params take precedence over `search` params. + * + * The service guarantees that the identity of the `$routeParams` object will remain unchanged + * (but its properties will likely change) even when a route change occurs. + * + * Note that the `$routeParams` are only updated *after* a route change completes successfully. + * This means that you cannot rely on `$routeParams` being correct in route resolve functions. + * Instead you can use `$route.current.params` to access the new route's parameters. + * + * @example + * <pre> + * // Given: + * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby + * // Route: /Chapter/:chapterId/Section/:sectionId + * // + * // Then + * $routeParams ==> {chapterId:1, sectionId:2, search:'moby'} + * </pre> + */ +function $RouteParamsProvider() { + this.$get = function() { return {}; }; +} + +ngRouteModule.directive('ngView', ngViewFactory); +ngRouteModule.directive('ngView', ngViewFillContentFactory); + + +/** + * @ngdoc directive + * @name ngRoute.directive:ngView + * @restrict ECA + * + * @description + * # Overview + * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by + * including the rendered template of the current route into the main layout (`index.html`) file. + * Every time the current route changes, the included view changes with it according to the + * configuration of the `$route` service. + * + * Requires the {@link ngRoute `ngRoute`} module to be installed. + * + * @animations + * enter - animation is used to bring new content into the browser. + * leave - animation is used to animate existing content away. + * + * The enter and leave animation occur concurrently. + * + * @scope + * @priority 400 + * @param {string=} onload Expression to evaluate whenever the view updates. + * + * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll + * $anchorScroll} to scroll the viewport after the view is updated. + * + * - If the attribute is not set, disable scrolling. + * - If the attribute is set without value, enable scrolling. + * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated + * as an expression yields a truthy value. + * @example + <example module="ngViewExample" deps="angular-route.js" animations="true"> + <file name="index.html"> + <div ng-controller="MainCntl as main"> + Choose: + <a href="Book/Moby">Moby</a> | + <a href="Book/Moby/ch/1">Moby: Ch1</a> | + <a href="Book/Gatsby">Gatsby</a> | + <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> | + <a href="Book/Scarlet">Scarlet Letter</a><br/> + + <div class="view-animate-container"> + <div ng-view class="view-animate"></div> + </div> + <hr /> + + <pre>$location.path() = {{main.$location.path()}}</pre> + <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre> + <pre>$route.current.params = {{main.$route.current.params}}</pre> + <pre>$route.current.scope.name = {{main.$route.current.scope.name}}</pre> + <pre>$routeParams = {{main.$routeParams}}</pre> + </div> + </file> + + <file name="book.html"> + <div> + controller: {{book.name}}<br /> + Book Id: {{book.params.bookId}}<br /> + </div> + </file> + + <file name="chapter.html"> + <div> + controller: {{chapter.name}}<br /> + Book Id: {{chapter.params.bookId}}<br /> + Chapter Id: {{chapter.params.chapterId}} + </div> + </file> + + <file name="animations.css"> + .view-animate-container { + position:relative; + height:100px!important; + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .view-animate { + padding:10px; + } + + .view-animate.ng-enter, .view-animate.ng-leave { + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s; + + display:block; + width:100%; + border-left:1px solid black; + + position:absolute; + top:0; + left:0; + right:0; + bottom:0; + padding:10px; + } + + .view-animate.ng-enter { + left:100%; + } + .view-animate.ng-enter.ng-enter-active { + left:0; + } + .view-animate.ng-leave.ng-leave-active { + left:-100%; + } + </file> + + <file name="script.js"> + angular.module('ngViewExample', ['ngRoute', 'ngAnimate'], + function($routeProvider, $locationProvider) { + $routeProvider.when('/Book/:bookId', { + templateUrl: 'book.html', + controller: BookCntl, + controllerAs: 'book' + }); + $routeProvider.when('/Book/:bookId/ch/:chapterId', { + templateUrl: 'chapter.html', + controller: ChapterCntl, + controllerAs: 'chapter' + }); + + // configure html5 to get links working on jsfiddle + $locationProvider.html5Mode(true); + }); + + function MainCntl($route, $routeParams, $location) { + this.$route = $route; + this.$location = $location; + this.$routeParams = $routeParams; + } + + function BookCntl($routeParams) { + this.name = "BookCntl"; + this.params = $routeParams; + } + + function ChapterCntl($routeParams) { + this.name = "ChapterCntl"; + this.params = $routeParams; + } + </file> + + <file name="protractorTest.js"> + it('should load and compile correct template', function() { + element(by.linkText('Moby: Ch1')).click(); + var content = element(by.css('.doc-example-live [ng-view]')).getText(); + expect(content).toMatch(/controller\: ChapterCntl/); + expect(content).toMatch(/Book Id\: Moby/); + expect(content).toMatch(/Chapter Id\: 1/); + + element(by.partialLinkText('Scarlet')).click(); + + content = element(by.css('.doc-example-live [ng-view]')).getText(); + expect(content).toMatch(/controller\: BookCntl/); + expect(content).toMatch(/Book Id\: Scarlet/); + }); + </file> + </example> + */ + + +/** + * @ngdoc event + * @name ngRoute.directive:ngView#$viewContentLoaded + * @eventOf ngRoute.directive:ngView + * @eventType emit on the current ngView scope + * @description + * Emitted every time the ngView content is reloaded. + */ +ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate']; +function ngViewFactory( $route, $anchorScroll, $animate) { + return { + restrict: 'ECA', + terminal: true, + priority: 400, + transclude: 'element', + link: function(scope, $element, attr, ctrl, $transclude) { + var currentScope, + currentElement, + autoScrollExp = attr.autoscroll, + onloadExp = attr.onload || ''; + + scope.$on('$routeChangeSuccess', update); + update(); + + function cleanupLastView() { + if (currentScope) { + currentScope.$destroy(); + currentScope = null; + } + if(currentElement) { + $animate.leave(currentElement); + currentElement = null; + } + } + + function update() { + var locals = $route.current && $route.current.locals, + template = locals && locals.$template; + + if (angular.isDefined(template)) { + var newScope = scope.$new(); + var current = $route.current; + + // Note: This will also link all children of ng-view that were contained in the original + // html. If that content contains controllers, ... they could pollute/change the scope. + // However, using ng-view on an element with additional content does not make sense... + // Note: We can't remove them in the cloneAttchFn of $transclude as that + // function is called before linking the content, which would apply child + // directives to non existing elements. + var clone = $transclude(newScope, function(clone) { + $animate.enter(clone, null, currentElement || $element, function onNgViewEnter () { + if (angular.isDefined(autoScrollExp) + && (!autoScrollExp || scope.$eval(autoScrollExp))) { + $anchorScroll(); + } + }); + cleanupLastView(); + }); + + currentElement = clone; + currentScope = current.scope = newScope; + currentScope.$emit('$viewContentLoaded'); + currentScope.$eval(onloadExp); + } else { + cleanupLastView(); + } + } + } + }; +} + +// This directive is called during the $transclude call of the first `ngView` directive. +// It will replace and compile the content of the element with the loaded template. +// We need this directive so that the element content is already filled when +// the link function of another directive on the same element as ngView +// is called. +ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route']; +function ngViewFillContentFactory($compile, $controller, $route) { + return { + restrict: 'ECA', + priority: -400, + link: function(scope, $element) { + var current = $route.current, + locals = current.locals; + + $element.html(locals.$template); + + var link = $compile($element.contents()); + + if (current.controller) { + locals.$scope = scope; + var controller = $controller(current.controller, locals); + if (current.controllerAs) { + scope[current.controllerAs] = controller; + } + $element.data('$ngControllerController', controller); + $element.children().data('$ngControllerController', controller); + } + + link(scope); + } + }; +} + + +})(window, window.angular); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js new file mode 100644 index 0000000..8f8065c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js @@ -0,0 +1,14 @@ +/* + AngularJS v1.2.13 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(h,e,A){'use strict';function u(w,q,k){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,n){function y(){l&&(l.$destroy(),l=null);g&&(k.leave(g),g=null)}function v(){var b=w.current&&w.current.locals;if(e.isDefined(b&&b.$template)){var b=a.$new(),f=w.current;g=n(b,function(d){k.enter(d,null,g||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||q()});y()});l=f.scope=b;l.$emit("$viewContentLoaded");l.$eval(h)}else y()}var l,g,t=b.autoscroll,h=b.onload||""; +a.$on("$routeChangeSuccess",v);v()}}}function z(e,h,k){return{restrict:"ECA",priority:-400,link:function(a,c){var b=k.current,f=b.locals;c.html(f.$template);var n=e(c.contents());b.controller&&(f.$scope=a,f=h(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));n(a)}}}h=e.module("ngRoute",["ng"]).provider("$route",function(){function h(a,c){return e.extend(new (e.extend(function(){},{prototype:a})),c)}function q(a, +e){var b=e.caseInsensitiveMatch,f={originalPath:a,regexp:a},h=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;h.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var k={};this.when=function(a,c){k[a]=e.extend({reloadOnSearch:!0},c,a&&q(a,c));if(a){var b="/"==a[a.length-1]?a.substr(0,a.length- +1):a+"/";k[b]=e.extend({redirectTo:a},q(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,n,q,v,l){function g(){var d=t(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!x)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)x=!1,a.$broadcast("$routeChangeStart",d,m),(r.current= +d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(u(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?n.get(d):n.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=l.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl=b,c=q.get(b, +{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function t(){var a,b;e.forEach(k,function(f,k){var p;if(p=!b){var s=c.path();p=f.keys;var l={};if(f.regexp)if(s=f.regexp.exec(s)){for(var g=1,q=s.length;g<q;++g){var n=p[g-1],r="string"==typeof s[g]?decodeURIComponent(s[g]):s[g]; +n&&r&&(l[n.name]=r)}p=l}else p=null;else p=null;p=a=p}p&&(b=h(f,{params:e.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||k[null]&&h(k[null],{params:{},pathParams:{}})}function u(a,c){var b=[];e.forEach((a||"").split(":"),function(a,d){if(0===d)b.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];b.push(c[f]);b.push(e[2]||"");delete c[f]}});return b.join("")}var x=!1,r={routes:k,reload:function(){x=!0;a.$evalAsync(g)}};a.$on("$locationChangeSuccess",g);return r}]});h.provider("$routeParams", +function(){this.$get=function(){return{}}});h.directive("ngView",u);h.directive("ngView",z);u.$inject=["$route","$anchorScroll","$animate"];z.$inject=["$compile","$controller","$route"]})(window,window.angular); +//# sourceMappingURL=angular-route.min.js.map diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js.map b/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js.map new file mode 100644 index 0000000..01c2892 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-route_1.2.13/angular-route.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-route.min.js", +"lineCount":13, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmzBtCC,QAASA,EAAa,CAAIC,CAAJ,CAAcC,CAAd,CAA+BC,CAA/B,CAAyC,CAC7D,MAAO,UACK,KADL,UAEK,CAAA,CAFL,UAGK,GAHL,YAIO,SAJP,MAKCC,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAkBC,CAAlB,CAAwBC,CAAxB,CAA8BC,CAA9B,CAA2C,CASrDC,QAASA,EAAe,EAAG,CACrBC,CAAJ,GACEA,CAAAC,SAAA,EACA,CAAAD,CAAA,CAAe,IAFjB,CAIGE,EAAH,GACEV,CAAAW,MAAA,CAAeD,CAAf,CACA,CAAAA,CAAA,CAAiB,IAFnB,CALyB,CAW3BE,QAASA,EAAM,EAAG,CAAA,IACZC,EAASf,CAAAgB,QAATD,EAA2Bf,CAAAgB,QAAAD,OAG/B,IAAIlB,CAAAoB,UAAA,CAFWF,CAEX,EAFqBA,CAAAG,UAErB,CAAJ,CAAiC,CAC3BC,IAAAA,EAAWf,CAAAgB,KAAA,EAAXD,CACAH,EAAUhB,CAAAgB,QAkBdJ,EAAA,CAVYJ,CAAAa,CAAYF,CAAZE,CAAsB,QAAQ,CAACA,CAAD,CAAQ,CAChDnB,CAAAoB,MAAA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UAAA,CAAwB,QAAxB,CAAkCvI,CAAlC,CACA0C,EAAA6F,UAAA,CAAwB,QAAxB,CAAkCvG,CAAlC,CAiLAhC,EAAAwI,QAAA,CAAwB,CAAC,QAAD,CAAW,eAAX,CAA4B,UAA5B,CAoExBxG,EAAAwG,QAAA,CAAmC,CAAC,UAAD,CAAa,aAAb,CAA4B,QAA5B,CAt3BG,CAArC,CAAA,CAm5BE3I,MAn5BF,CAm5BUA,MAAAC,QAn5BV;", +"sources":["angular-route.js"], +"names":["window","angular","undefined","ngViewFactory","$route","$anchorScroll","$animate","link","scope","$element","attr","ctrl","$transclude","cleanupLastView","currentScope","$destroy","currentElement","leave","update","locals","current","isDefined","$template","newScope","$new","clone","enter","onNgViewEnter","autoScrollExp","$eval","$emit","onloadExp","autoscroll","onload","$on","ngViewFillContentFactory","$compile","$controller","html","contents","controller","$scope","controllerAs","data","children","ngRouteModule","module","provider","$RouteProvider","inherit","parent","extra","extend","pathRegExp","path","opts","insensitive","caseInsensitiveMatch","ret","keys","replace","_","slash","key","option","optional","star","push","regexp","RegExp","routes","when","this.when","route","redirectPath","length","substr","otherwise","this.otherwise","params","$get","$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce","updateRoute","next","parseRoute","last","$$route","equals","pathParams","reloadOnSearch","forceReload","copy","$broadcast","redirectTo","isString","interpolate","search","url","then","resolve","template","templateUrl","forEach","value","get","invoke","isFunction","getTrustedResourceUrl","loadedTemplateUrl","response","all","error","match","m","exec","on","i","len","val","decodeURIComponent","name","string","result","split","segment","segmentMatch","join","reload","$evalAsync","$RouteParamsProvider","this.$get","directive","$inject"] +} diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.js new file mode 100644 index 0000000..9259ca2 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.js @@ -0,0 +1,625 @@ +/** + * @license AngularJS v1.2.13 + * (c) 2010-2014 Google, Inc. http://angularjs.org + * License: MIT + */ +(function(window, angular, undefined) {'use strict'; + +var $sanitizeMinErr = angular.$$minErr('$sanitize'); + +/** + * @ngdoc overview + * @name ngSanitize + * @description + * + * # ngSanitize + * + * The `ngSanitize` module provides functionality to sanitize HTML. + * + * {@installModule sanitize} + * + * <div doc-module-components="ngSanitize"></div> + * + * See {@link ngSanitize.$sanitize `$sanitize`} for usage. + */ + +/* + * HTML Parser By Misko Hevery (misko@hevery.com) + * based on: HTML Parser By John Resig (ejohn.org) + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * // Use like so: + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + */ + + +/** + * @ngdoc service + * @name ngSanitize.$sanitize + * @function + * + * @description + * The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are + * then serialized back to properly escaped html string. This means that no unsafe input can make + * it into the returned string, however, since our parser is more strict than a typical browser + * parser, it's possible that some obscure input, which would be recognized as valid HTML by a + * browser, won't make it through the sanitizer. + * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and + * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}. + * + * @param {string} html Html input. + * @returns {string} Sanitized html. + * + * @example + <doc:example module="ngSanitize"> + <doc:source> + <script> + function Ctrl($scope, $sce) { + $scope.snippet = + '<p style="color:blue">an html\n' + + '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' + + 'snippet</p>'; + $scope.deliberatelyTrustDangerousSnippet = function() { + return $sce.trustAsHtml($scope.snippet); + }; + } + </script> + <div ng-controller="Ctrl"> + Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea> + <table> + <tr> + <td>Directive</td> + <td>How</td> + <td>Source</td> + <td>Rendered</td> + </tr> + <tr id="bind-html-with-sanitize"> + <td>ng-bind-html</td> + <td>Automatically uses $sanitize</td> + <td><pre><div ng-bind-html="snippet"><br/></div></pre></td> + <td><div ng-bind-html="snippet"></div></td> + </tr> + <tr id="bind-html-with-trust"> + <td>ng-bind-html</td> + <td>Bypass $sanitize by explicitly trusting the dangerous value</td> + <td> + <pre><div ng-bind-html="deliberatelyTrustDangerousSnippet()"> +</div></pre> + </td> + <td><div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div></td> + </tr> + <tr id="bind-default"> + <td>ng-bind</td> + <td>Automatically escapes</td> + <td><pre><div ng-bind="snippet"><br/></div></pre></td> + <td><div ng-bind="snippet"></div></td> + </tr> + </table> + </div> + </doc:source> + <doc:protractor> + it('should sanitize the html snippet by default', function() { + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('<p>an html\n<em>click here</em>\nsnippet</p>'); + }); + + it('should inline raw snippet if bound to a trusted value', function() { + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should escape snippet without any filter', function() { + expect(element(by.css('#bind-default div')).getInnerHtml()). + toBe("<p style=\"color:blue\">an html\n" + + "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" + + "snippet</p>"); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new <b onclick="alert(1)">text</b>'); + expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()). + toBe('new <b>text</b>'); + expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe( + 'new <b onclick="alert(1)">text</b>'); + expect(element(by.css('#bind-default div')).getInnerHtml()).toBe( + "new <b onclick=\"alert(1)\">text</b>"); + }); + </doc:protractor> + </doc:example> + */ +function $SanitizeProvider() { + this.$get = ['$$sanitizeUri', function($$sanitizeUri) { + return function(html) { + var buf = []; + htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) { + return !/^unsafe/.test($$sanitizeUri(uri, isImage)); + })); + return buf.join(''); + }; + }]; +} + +function sanitizeText(chars) { + var buf = []; + var writer = htmlSanitizeWriter(buf, angular.noop); + writer.chars(chars); + return buf.join(''); +} + + +// Regular Expressions for parsing tags and attributes +var START_TAG_REGEXP = + /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/, + END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/, + ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, + BEGIN_TAG_REGEXP = /^</, + BEGING_END_TAGE_REGEXP = /^<\s*\//, + COMMENT_REGEXP = /<!--(.*?)-->/g, + DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i, + CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g, + // Match everything outside of normal chars and " (quote character) + NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; + + +// Good source of info about elements and attributes +// http://dev.w3.org/html5/spec/Overview.html#semantics +// http://simon.html5.org/html-elements + +// Safe Void Elements - HTML5 +// http://dev.w3.org/html5/spec/Overview.html#void-elements +var voidElements = makeMap("area,br,col,hr,img,wbr"); + +// Elements that you can, intentionally, leave open (and which close themselves) +// http://dev.w3.org/html5/spec/Overview.html#optional-tags +var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), + optionalEndTagInlineElements = makeMap("rp,rt"), + optionalEndTagElements = angular.extend({}, + optionalEndTagInlineElements, + optionalEndTagBlockElements); + +// Safe Block Elements - HTML5 +var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article," + + "aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5," + + "h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")); + +// Inline Elements - HTML5 +var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b," + + "bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s," + + "samp,small,span,strike,strong,sub,sup,time,tt,u,var")); + + +// Special Elements (can contain anything) +var specialElements = makeMap("script,style"); + +var validElements = angular.extend({}, + voidElements, + blockElements, + inlineElements, + optionalEndTagElements); + +//Attributes that have href and hence need to be sanitized +var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap"); +var validAttrs = angular.extend({}, uriAttrs, makeMap( + 'abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,'+ + 'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,'+ + 'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,'+ + 'scope,scrolling,shape,size,span,start,summary,target,title,type,'+ + 'valign,value,vspace,width')); + +function makeMap(str) { + var obj = {}, items = str.split(','), i; + for (i = 0; i < items.length; i++) obj[items[i]] = true; + return obj; +} + + +/** + * @example + * htmlParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * @param {string} html string + * @param {object} handler + */ +function htmlParser( html, handler ) { + var index, chars, match, stack = [], last = html; + stack.last = function() { return stack[ stack.length - 1 ]; }; + + while ( html ) { + chars = true; + + // Make sure we're not in a script or style element + if ( !stack.last() || !specialElements[ stack.last() ] ) { + + // Comment + if ( html.indexOf("<!--") === 0 ) { + // comments containing -- are not allowed unless they terminate the comment + index = html.indexOf("--", 4); + + if ( index >= 0 && html.lastIndexOf("-->", index) === index) { + if (handler.comment) handler.comment( html.substring( 4, index ) ); + html = html.substring( index + 3 ); + chars = false; + } + // DOCTYPE + } else if ( DOCTYPE_REGEXP.test(html) ) { + match = html.match( DOCTYPE_REGEXP ); + + if ( match ) { + html = html.replace( match[0] , ''); + chars = false; + } + // end tag + } else if ( BEGING_END_TAGE_REGEXP.test(html) ) { + match = html.match( END_TAG_REGEXP ); + + if ( match ) { + html = html.substring( match[0].length ); + match[0].replace( END_TAG_REGEXP, parseEndTag ); + chars = false; + } + + // start tag + } else if ( BEGIN_TAG_REGEXP.test(html) ) { + match = html.match( START_TAG_REGEXP ); + + if ( match ) { + html = html.substring( match[0].length ); + match[0].replace( START_TAG_REGEXP, parseStartTag ); + chars = false; + } + } + + if ( chars ) { + index = html.indexOf("<"); + + var text = index < 0 ? html : html.substring( 0, index ); + html = index < 0 ? "" : html.substring( index ); + + if (handler.chars) handler.chars( decodeEntities(text) ); + } + + } else { + html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), + function(all, text){ + text = text.replace(COMMENT_REGEXP, "$1").replace(CDATA_REGEXP, "$1"); + + if (handler.chars) handler.chars( decodeEntities(text) ); + + return ""; + }); + + parseEndTag( "", stack.last() ); + } + + if ( html == last ) { + throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block " + + "of html: {0}", html); + } + last = html; + } + + // Clean up any remaining tags + parseEndTag(); + + function parseStartTag( tag, tagName, rest, unary ) { + tagName = angular.lowercase(tagName); + if ( blockElements[ tagName ] ) { + while ( stack.last() && inlineElements[ stack.last() ] ) { + parseEndTag( "", stack.last() ); + } + } + + if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) { + parseEndTag( "", tagName ); + } + + unary = voidElements[ tagName ] || !!unary; + + if ( !unary ) + stack.push( tagName ); + + var attrs = {}; + + rest.replace(ATTR_REGEXP, + function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) { + var value = doubleQuotedValue + || singleQuotedValue + || unquotedValue + || ''; + + attrs[name] = decodeEntities(value); + }); + if (handler.start) handler.start( tagName, attrs, unary ); + } + + function parseEndTag( tag, tagName ) { + var pos = 0, i; + tagName = angular.lowercase(tagName); + if ( tagName ) + // Find the closest opened tag of the same type + for ( pos = stack.length - 1; pos >= 0; pos-- ) + if ( stack[ pos ] == tagName ) + break; + + if ( pos >= 0 ) { + // Close all the open elements, up the stack + for ( i = stack.length - 1; i >= pos; i-- ) + if (handler.end) handler.end( stack[ i ] ); + + // Remove the open elements from the stack + stack.length = pos; + } + } +} + +var hiddenPre=document.createElement("pre"); +var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/; +/** + * decodes all entities into regular string + * @param value + * @returns {string} A string with decoded entities. + */ +function decodeEntities(value) { + if (!value) { return ''; } + + // Note: IE8 does not preserve spaces at the start/end of innerHTML + // so we must capture them and reattach them afterward + var parts = spaceRe.exec(value); + var spaceBefore = parts[1]; + var spaceAfter = parts[3]; + var content = parts[2]; + if (content) { + hiddenPre.innerHTML=content.replace(/</g,"<"); + // innerText depends on styling as it doesn't display hidden elements. + // Therefore, it's better to use textContent not to cause unnecessary + // reflows. However, IE<9 don't support textContent so the innerText + // fallback is necessary. + content = 'textContent' in hiddenPre ? + hiddenPre.textContent : hiddenPre.innerText; + } + return spaceBefore + content + spaceAfter; +} + +/** + * Escapes all potentially dangerous characters, so that the + * resulting string can be safely inserted into attribute or + * element text. + * @param value + * @returns escaped text + */ +function encodeEntities(value) { + return value. + replace(/&/g, '&'). + replace(NON_ALPHANUMERIC_REGEXP, function(value){ + return '&#' + value.charCodeAt(0) + ';'; + }). + replace(/</g, '<'). + replace(/>/g, '>'); +} + +/** + * create an HTML/XML writer which writes to buffer + * @param {Array} buf use buf.jain('') to get out sanitized html string + * @returns {object} in the form of { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * } + */ +function htmlSanitizeWriter(buf, uriValidator){ + var ignore = false; + var out = angular.bind(buf, buf.push); + return { + start: function(tag, attrs, unary){ + tag = angular.lowercase(tag); + if (!ignore && specialElements[tag]) { + ignore = tag; + } + if (!ignore && validElements[tag] === true) { + out('<'); + out(tag); + angular.forEach(attrs, function(value, key){ + var lkey=angular.lowercase(key); + var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background'); + if (validAttrs[lkey] === true && + (uriAttrs[lkey] !== true || uriValidator(value, isImage))) { + out(' '); + out(key); + out('="'); + out(encodeEntities(value)); + out('"'); + } + }); + out(unary ? '/>' : '>'); + } + }, + end: function(tag){ + tag = angular.lowercase(tag); + if (!ignore && validElements[tag] === true) { + out('</'); + out(tag); + out('>'); + } + if (tag == ignore) { + ignore = false; + } + }, + chars: function(chars){ + if (!ignore) { + out(encodeEntities(chars)); + } + } + }; +} + + +// define ngSanitize module and register $sanitize service +angular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider); + +/* global sanitizeText: false */ + +/** + * @ngdoc filter + * @name ngSanitize.filter:linky + * @function + * + * @description + * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and + * plain email address links. + * + * Requires the {@link ngSanitize `ngSanitize`} module to be installed. + * + * @param {string} text Input text. + * @param {string} target Window (_blank|_self|_parent|_top) or named frame to open links in. + * @returns {string} Html-linkified text. + * + * @usage + <span ng-bind-html="linky_expression | linky"></span> + * + * @example + <doc:example module="ngSanitize"> + <doc:source> + <script> + function Ctrl($scope) { + $scope.snippet = + 'Pretty text with some links:\n'+ + 'http://angularjs.org/,\n'+ + 'mailto:us@somewhere.org,\n'+ + 'another@somewhere.org,\n'+ + 'and one more: ftp://127.0.0.1/.'; + $scope.snippetWithTarget = 'http://angularjs.org/'; + } + </script> + <div ng-controller="Ctrl"> + Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea> + <table> + <tr> + <td>Filter</td> + <td>Source</td> + <td>Rendered</td> + </tr> + <tr id="linky-filter"> + <td>linky filter</td> + <td> + <pre><div ng-bind-html="snippet | linky"><br></div></pre> + </td> + <td> + <div ng-bind-html="snippet | linky"></div> + </td> + </tr> + <tr id="linky-target"> + <td>linky target</td> + <td> + <pre><div ng-bind-html="snippetWithTarget | linky:'_blank'"><br></div></pre> + </td> + <td> + <div ng-bind-html="snippetWithTarget | linky:'_blank'"></div> + </td> + </tr> + <tr id="escaped-html"> + <td>no filter</td> + <td><pre><div ng-bind="snippet"><br></div></pre></td> + <td><div ng-bind="snippet"></div></td> + </tr> + </table> + </doc:source> + <doc:protractor> + it('should linkify the snippet with urls', function() { + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(4); + }); + + it('should not linkify snippet without the linky filter', function() { + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()). + toBe('Pretty text with some links: http://angularjs.org/, mailto:us@somewhere.org, ' + + 'another@somewhere.org, and one more: ftp://127.0.0.1/.'); + expect(element.all(by.css('#escaped-html a')).count()).toEqual(0); + }); + + it('should update', function() { + element(by.model('snippet')).clear(); + element(by.model('snippet')).sendKeys('new http://link.'); + expect(element(by.id('linky-filter')).element(by.binding('snippet | linky')).getText()). + toBe('new http://link.'); + expect(element.all(by.css('#linky-filter a')).count()).toEqual(1); + expect(element(by.id('escaped-html')).element(by.binding('snippet')).getText()) + .toBe('new http://link.'); + }); + + it('should work with the target property', function() { + expect(element(by.id('linky-target')). + element(by.binding("snippetWithTarget | linky:'_blank'")).getText()). + toBe('http://angularjs.org/'); + expect(element(by.css('#linky-target a')).getAttribute('target')).toEqual('_blank'); + }); + </doc:protractor> + </doc:example> + */ +angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) { + var LINKY_URL_REGEXP = + /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/, + MAILTO_REGEXP = /^mailto:/; + + return function(text, target) { + if (!text) return text; + var match; + var raw = text; + var html = []; + var url; + var i; + while ((match = raw.match(LINKY_URL_REGEXP))) { + // We can not end in these as they are sometimes found at the end of the sentence + url = match[0]; + // if we did not match ftp/http/mailto then assume mailto + if (match[2] == match[3]) url = 'mailto:' + url; + i = match.index; + addText(raw.substr(0, i)); + addLink(url, match[0].replace(MAILTO_REGEXP, '')); + raw = raw.substring(i + match[0].length); + } + addText(raw); + return $sanitize(html.join('')); + + function addText(text) { + if (!text) { + return; + } + html.push(sanitizeText(text)); + } + + function addLink(url, text) { + html.push('<a '); + if (angular.isDefined(target)) { + html.push('target="'); + html.push(target); + html.push('" '); + } + html.push('href="'); + html.push(url); + html.push('">'); + addText(text); + html.push('</a>'); + } + }; +}]); + + +})(window, window.angular); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js new file mode 100644 index 0000000..5bff6ba --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js @@ -0,0 +1,14 @@ +/* + AngularJS v1.2.13 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(p,h,q){'use strict';function E(a){var e=[];s(e,h.noop).chars(a);return e.join("")}function k(a){var e={};a=a.split(",");var d;for(d=0;d<a.length;d++)e[a[d]]=!0;return e}function F(a,e){function d(a,b,d,g){b=h.lowercase(b);if(t[b])for(;f.last()&&u[f.last()];)c("",f.last());v[b]&&f.last()==b&&c("",b);(g=w[b]||!!g)||f.push(b);var l={};d.replace(G,function(a,b,e,c,d){l[b]=r(e||c||d||"")});e.start&&e.start(b,l,g)}function c(a,b){var c=0,d;if(b=h.lowercase(b))for(c=f.length-1;0<=c&&f[c]!=b;c--); +if(0<=c){for(d=f.length-1;d>=c;d--)e.end&&e.end(f[d]);f.length=c}}var b,g,f=[],l=a;for(f.last=function(){return f[f.length-1]};a;){g=!0;if(f.last()&&x[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(b,a){a=a.replace(H,"$1").replace(I,"$1");e.chars&&e.chars(r(a));return""}),c("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(e.comment&&e.comment(a.substring(4,b)),a=a.substring(b+3),g=!1);else if(y.test(a)){if(b=a.match(y))a= +a.replace(b[0],""),g=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,c),g=!1}else K.test(a)&&(b=a.match(A))&&(a=a.substring(b[0].length),b[0].replace(A,d),g=!1);g&&(b=a.indexOf("<"),g=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),e.chars&&e.chars(r(g)))}if(a==l)throw L("badparse",a);l=a}c()}function r(a){if(!a)return"";var e=M.exec(a);a=e[1];var d=e[3];if(e=e[2])n.innerHTML=e.replace(/</g,"<"),e="textContent"in n?n.textContent:n.innerText;return a+e+d}function B(a){return a.replace(/&/g, +"&").replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function s(a,e){var d=!1,c=h.bind(a,a.push);return{start:function(a,g,f){a=h.lowercase(a);!d&&x[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(g,function(d,f){var g=h.lowercase(f),k="img"===a&&"src"===g||"background"===g;!0!==O[g]||!0===D[g]&&!e(d,k)||(c(" "),c(f),c('="'),c(B(d)),c('"'))}),c(f?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d|| +c(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,z=/^<\s*\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\s*\//,H=/\x3c!--(.*?)--\x3e/g,y=/<!DOCTYPE([^>]*?)>/i,I=/<!\[CDATA\[(.*?)]]\x3e/g,N=/([^\#-~| |!])/g,w=k("area,br,col,hr,img,wbr");p=k("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");q=k("rp,rt");var v=h.extend({},q,p),t=h.extend({},p,k("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")), +u=h.extend({},q,k("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),x=k("script,style"),C=h.extend({},w,t,u,v),D=k("background,cite,href,longdesc,src,usemap"),O=h.extend({},D,k("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")), +n=document.createElement("pre"),M=/^(\s*)([\s\S]*?)(\s*)$/;h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(e){var d=[];F(e,s(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var e=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,d=/^mailto:/;return function(c,b){function g(a){a&&m.push(E(a))}function f(a,c){m.push("<a ");h.isDefined(b)&& +(m.push('target="'),m.push(b),m.push('" '));m.push('href="');m.push(a);m.push('">');g(c);m.push("</a>")}if(!c)return c;for(var l,k=c,m=[],n,p;l=k.match(e);)n=l[0],l[2]==l[3]&&(n="mailto:"+n),p=l.index,g(k.substr(0,p)),f(n,l[0].replace(d,"")),k=k.substring(p+l[0].length);g(k);return a(m.join(""))}}])})(window,window.angular); +//# sourceMappingURL=angular-sanitize.min.js.map diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js.map b/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js.map new file mode 100644 index 0000000..c479150 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js.map @@ -0,0 +1,8 @@ +{ +"version":3, +"file":"angular-sanitize.min.js", +"lineCount":13, +"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAkJtCC,QAASA,EAAY,CAACC,CAAD,CAAQ,CAC3B,IAAIC,EAAM,EACGC,EAAAC,CAAmBF,CAAnBE,CAAwBN,CAAAO,KAAxBD,CACbH,MAAA,CAAaA,CAAb,CACA,OAAOC,EAAAI,KAAA,CAAS,EAAT,CAJoB,CAmE7BC,QAASA,EAAO,CAACC,CAAD,CAAM,CAAA,IAChBC,EAAM,EAAIC,EAAAA,CAAQF,CAAAG,MAAA,CAAU,GAAV,CAAtB,KAAsCC,CACtC,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBF,CAAAG,OAAhB,CAA8BD,CAAA,EAA9B,CAAmCH,CAAA,CAAIC,CAAA,CAAME,CAAN,CAAJ,CAAA,CAAgB,CAAA,CACnD,OAAOH,EAHa,CAmBtBK,QAASA,EAAU,CAAEC,CAAF,CAAQC,CAAR,CAAkB,CAiFnCC,QAASA,EAAa,CAAEC,CAAF,CAAOC,CAAP,CAAgBC,CAAhB,CAAsBC,CAAtB,CAA8B,CAClDF,CAAA,CAAUrB,CAAAwB,UAAA,CAAkBH,CAAlB,CACV,IAAKI,CAAA,CAAeJ,CAAf,CAAL,CACE,IAAA,CAAQK,CAAAC,KAAA,EAAR,EAAwBC,CAAA,CAAgBF,CAAAC,KAAA,EAAhB,CAAxB,CAAA,CACEE,CAAA,CAAa,EAAb,CAAiBH,CAAAC,KAAA,EAAjB,CAICG,EAAA,CAAwBT,CAAxB,CAA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AMA,CANMxE,CAAA,CAAM,CAAN,CAMN,CAJIA,CAAA,CAAM,CAAN,CAIJ,EAJgBA,CAAA,CAAM,CAAN,CAIhB,GAJ0BwE,CAI1B,CAJgC,SAIhC,CAJ4CA,CAI5C,EAHA9F,CAGA,CAHIsB,CAAAS,MAGJ,CAFA6D,CAAA,CAAQI,CAAAC,OAAA,CAAW,CAAX,CAAcjG,CAAd,CAAR,CAEA,CADA6F,CAAA,CAAQC,CAAR,CAAaxE,CAAA,CAAM,CAAN,CAAAF,QAAA,CAAiBsE,CAAjB,CAAgC,EAAhC,CAAb,CACA,CAAAM,CAAA,CAAMA,CAAAtD,UAAA,CAAc1C,CAAd,CAAkBsB,CAAA,CAAM,CAAN,CAAArB,OAAlB,CAER2F,EAAA,CAAQI,CAAR,CACA,OAAOR,EAAA,CAAUrF,CAAAT,KAAA,CAAU,EAAV,CAAV,CAlBqB,CAL+C,CAAlC,CAA7C,CA1jBsC,CAArC,CAAA,CA2mBET,MA3mBF,CA2mBUA,MAAAC,QA3mBV;", +"sources":["angular-sanitize.js"], +"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","obj","items","split","i","length","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","lowercase","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","stack.last","specialElements","RegExp","all","text","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","parts","spaceRe","exec","spaceBefore","spaceAfter","content","hiddenPre","innerHTML","textContent","innerText","encodeEntities","NON_ALPHANUMERIC_REGEXP","charCodeAt","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"] +} diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js new file mode 100644 index 0000000..d979dfe --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js @@ -0,0 +1 @@ +var duScrollDefaultEasing=function(e){return.5>e?Math.pow(2*e,2)/2:1-Math.pow(2*(1-e),2)/2};angular.module("duScroll",["duScroll.scrollspy","duScroll.requestAnimation","duScroll.smoothScroll","duScroll.scrollContainer","duScroll.scrollHelpers"]).value("duScrollDuration",350).value("duScrollGreedy",!1).value("duScrollEasing",duScrollDefaultEasing),angular.module("duScroll.scrollHelpers",[]).run(["$window","$q","cancelAnimation","requestAnimation","duScrollEasing",function(e,t,n,r,o){var l=angular.element.prototype;this.$get=function(){return l};var i=function(e){return"undefined"!=typeof HTMLDocument&&e instanceof HTMLDocument||e.nodeType&&e.nodeType===e.DOCUMENT_NODE},u=function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||e.nodeType&&e.nodeType===e.ELEMENT_NODE},c=function(e){return u(e)||i(e)?e:e[0]};l.scrollTo=function(t,n,r){var o;if(angular.isElement(t)?o=this.scrollToElement:r&&(o=this.scrollToAnimated),o)return o.apply(this,arguments);var l=c(this);return i(l)?e.scrollTo(t,n):(l.scrollLeft=t,void(l.scrollTop=n))};var a,s;l.scrollToAnimated=function(e,l,i,u){i&&!u&&(u=o);var c=this.scrollLeft(),d=this.scrollTop(),f=Math.round(e-c),p=Math.round(l-d),m=null;a&&(n(a),s.reject());var g=this;if(s=t.defer(),!f&&!p)return s.resolve(),s.promise;var v=function(e){null===m&&(m=e);var t=e-m,n=t>=i?1:u(t/i);g.scrollTo(c+Math.ceil(f*n),d+Math.ceil(p*n)),1>n?a=r(v):(a=null,s.resolve())};return g.scrollTo(c,d),a=r(v),s.promise},l.scrollToElement=function(e,t,n,r){var o=c(this),l=this.scrollTop()+c(e).getBoundingClientRect().top-t;return u(o)&&(l-=o.getBoundingClientRect().top),this.scrollTo(0,l,n,r)};var d={scrollLeft:function(t,n,r){if(angular.isNumber(t))return this.scrollTo(t,this.scrollTop(),n,r);var o=c(this);return i(o)?e.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft:o.scrollLeft},scrollTop:function(t,n,r){if(angular.isNumber(t))return this.scrollTo(this.scrollTop(),t,n,r);var o=c(this);return i(o)?e.scrollY||document.documentElement.scrollTop||document.body.scrollTop:o.scrollTop}},f=function(e,t){return function(n,r){return r?t.apply(this,arguments):e.apply(this,arguments)}};for(var p in d)l[p]=l[p]?f(l[p],d[p]):d[p]}]),angular.module("duScroll.polyfill",[]).factory("polyfill",["$window",function(e){var t=["webkit","moz","o","ms"];return function(n,r){if(e[n])return e[n];for(var o,l=n.substr(0,1).toUpperCase()+n.substr(1),i=0;i<t.length;i++)if(o=t[i]+l,e[o])return e[o];return r}}]),angular.module("duScroll.requestAnimation",["duScroll.polyfill"]).factory("requestAnimation",["polyfill","$timeout",function(e,t){var n=0,r=function(e){var r=(new Date).getTime(),o=Math.max(0,16-(r-n)),l=t(function(){e(r+o)},o);return n=r+o,l};return e("requestAnimationFrame",r)}]).factory("cancelAnimation",["polyfill","$timeout",function(e,t){var n=function(e){t.cancel(e)};return e("cancelAnimationFrame",n)}]),angular.module("duScroll.spyAPI",["duScroll.scrollContainerAPI"]).factory("spyAPI",["$rootScope","scrollContainerAPI","duScrollGreedy",function(e,t,n){var r=function(t){return function(){var r=t.container,o=r[0],l=0;o instanceof HTMLElement&&(l=o.getBoundingClientRect().top);var i,u,c,a,s,d;for(a=t.spies,u=t.currentlyActive,c=void 0,i=0;i<a.length;i++)s=a[i],d=s.getTargetPosition(),d&&d.top+s.offset-l<20&&-1*d.top+l<d.height&&(!c||c.top<d.top)&&(c={top:d.top,spy:s});c&&(c=c.spy),u===c||n&&!c||(u&&(u.$element.removeClass("active"),e.$broadcast("duScrollspy:becameInactive",u.$element)),c&&(c.$element.addClass("active"),e.$broadcast("duScrollspy:becameActive",c.$element)),t.currentlyActive=c)}},o={},l=function(e){var t=e.$id,n={spies:[]};return n.handler=r(n),o[t]=n,e.$on("$destroy",function(){i(e)}),t},i=function(e){var t=e.$id,n=o[t],r=n.container;r&&r.off("scroll",n.handler),delete o[t]},u=l(e),c=function(e){return o[e.$id]?o[e.$id]:e.$parent?c(e.$parent):o[u]},a=function(e){var t,n,r=e.$element.scope();if(r)return c(r);for(n in o)if(t=o[n],-1!==t.spies.indexOf(e))return t},s=function(e){var n=a(e);a(e).spies.push(e),n.container||(n.container=t.getContainer(e.$element.scope()),n.container.on("scroll",n.handler).triggerHandler("scroll"))},d=function(e){var t=a(e);e===t.currentlyActive&&(t.currentlyActive=null);var n=t.spies.indexOf(e);-1!==n&&t.spies.splice(n,1)};return{addSpy:s,removeSpy:d,createContext:l,destroyContext:i,getContextForScope:c}}]),angular.module("duScroll.scrollContainerAPI",[]).factory("scrollContainerAPI",["$document",function(e){var t={},n=function(e,n){var r=e.$id;return t[r]=n,r},r=function(e){return t[e.$id]?e.$id:e.$parent?r(e.$parent):void 0},o=function(n){var o=r(n);return o?t[o]:e},l=function(e){var n=r(e);n&&delete t[n]};return{getContainerId:r,getContainer:o,setContainer:n,removeContainer:l}}]),angular.module("duScroll.smoothScroll",["duScroll.scrollHelpers","duScroll.scrollContainerAPI"]).directive("duSmoothScroll",["duScrollDuration","scrollContainerAPI",function(e,t){return{link:function(n,r,o){r.on("click",function(r){if(o.href&&-1!==o.href.indexOf("#")){var l=document.getElementById(o.href.replace(/.*(?=#[^\s]+$)/,"").substring(1));if(l&&l.getBoundingClientRect){r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault();var i=o.offset?parseInt(o.offset,10):0,u=o.duration?parseInt(o.duration,10):e,c=t.getContainer(n);c.scrollToElement(angular.element(l),isNaN(i)?0:i,isNaN(u)?0:u)}}})}}}]),angular.module("duScroll.spyContext",["duScroll.spyAPI"]).directive("duSpyContext",["spyAPI",function(e){return{restrict:"A",scope:!0,compile:function(){return{pre:function(t){e.createContext(t)}}}}}]),angular.module("duScroll.scrollContainer",["duScroll.scrollContainerAPI"]).directive("duScrollContainer",["scrollContainerAPI",function(e){return{restrict:"A",scope:!0,compile:function(){return{pre:function(t,n,r){r.$observe("duScrollContainer",function(r){angular.isString(r)&&(r=document.getElementById(r)),r=angular.isElement(r)?angular.element(r):n,e.setContainer(t,r),t.$on("$destroy",function(){e.removeContainer(t)})})}}}}}]),angular.module("duScroll.scrollspy",["duScroll.spyAPI"]).directive("duScrollspy",["spyAPI","$timeout",function(e,t){var n=function(e,t,n){angular.isElement(e)?this.target=e:angular.isString(e)&&(this.targetId=e),this.$element=t,this.offset=n};return n.prototype.getTargetElement=function(){return!this.target&&this.targetId&&(this.target=document.getElementById(this.targetId)),this.target},n.prototype.getTargetPosition=function(){var e=this.getTargetElement();return e?e.getBoundingClientRect():void 0},n.prototype.flushTargetCache=function(){this.targetId&&(this.target=void 0)},{link:function(r,o,l){var i,u=l.ngHref||l.href;u&&-1!==u.indexOf("#")?i=u.replace(/.*(?=#[^\s]+$)/,"").substring(1):l.duScrollspy&&(i=l.duScrollspy),i&&t(function(){var t=new n(i,o,-(l.offset?parseInt(l.offset,10):0));e.addSpy(t),r.$on("$destroy",function(){e.removeSpy(t)}),r.$on("$locationChangeSuccess",t.flushTargetCache.bind(t)),r.$on("$stateChangeSuccess",t.flushTargetCache.bind(t))},0)}}}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js new file mode 100644 index 0000000..f2b4221 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js @@ -0,0 +1,9 @@ +/** + * angular-strap + * @version v2.0.5 - 2014-09-03 + * @link http://mgcrea.github.io/angular-strap + * @author Olivier Louvignes (olivier@mg-crea.com) + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +!function(e,t){"use strict";angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab"]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var e=this.defaults={offsetTop:"auto"};this.$get=["$window","debounce","dimensions",function(t,n,a){function o(o,s){function l(e,t,n){var a=u(),o=c();return h>=a?"top":null!==e&&a+e<=t.top?"middle":null!==v&&t.top+n+g>=o-v?"bottom":"middle"}function u(){return p[0]===t?t.pageYOffset:p[0].scrollTop}function c(){return p[0]===t?t.document.body.scrollHeight:p[0].scrollHeight}var d={},f=angular.extend({},e,s),p=f.target,m="affix affix-top affix-bottom",g=0,$=0,h=0,v=0,y=null,w=null,b=o.parent();if(f.offsetParent)if(f.offsetParent.match(/^\d+$/))for(var D=0;D<1*f.offsetParent-1;D++)b=b.parent();else b=angular.element(f.offsetParent);return d.init=function(){d.$parseOffsets(),$=a.offset(o[0]).top+g,p.on("scroll",d.checkPosition),p.on("click",d.checkPositionWithEventLoop),r.on("resize",d.$debouncedOnResize),d.checkPosition(),d.checkPositionWithEventLoop()},d.destroy=function(){p.off("scroll",d.checkPosition),p.off("click",d.checkPositionWithEventLoop),r.off("resize",d.$debouncedOnResize)},d.checkPositionWithEventLoop=function(){setTimeout(d.checkPosition,1)},d.checkPosition=function(){var e=u(),t=a.offset(o[0]),n=a.height(o[0]),r=l(w,t,n);y!==r&&(y=r,o.removeClass(m).addClass("affix"+("middle"!==r?"-"+r:"")),"top"===r?(w=null,o.css("position",f.offsetParent?"":"relative"),o.css("top","")):"bottom"===r?(w=f.offsetUnpin?-(1*f.offsetUnpin):t.top-e,o.css("position",f.offsetParent?"":"relative"),o.css("top",f.offsetParent?"":i[0].offsetHeight-v-n-$+"px")):(w=null,o.css("position","fixed"),o.css("top",g+"px")))},d.$onResize=function(){d.$parseOffsets(),d.checkPosition()},d.$debouncedOnResize=n(d.$onResize,50),d.$parseOffsets=function(){o.css("position",f.offsetParent?"":"relative"),f.offsetTop&&("auto"===f.offsetTop&&(f.offsetTop="+0"),f.offsetTop.match(/^[-+]\d+$/)?(g=1*-f.offsetTop,h=f.offsetParent?a.offset(b[0]).top+1*f.offsetTop:a.offset(o[0]).top-a.css(o[0],"marginTop",!0)+1*f.offsetTop):h=1*f.offsetTop),f.offsetBottom&&(v=f.offsetParent&&f.offsetBottom.match(/^[-+]\d+$/)?c()-(a.offset(b[0]).top+a.height(b[0]))+1*f.offsetBottom+1:1*f.offsetBottom)},d.init(),d}var i=angular.element(t.document.body),r=angular.element(t);return o}]}).directive("bsAffix",["$affix","$window",function(e,t){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(n,a,o,i){var r={scope:n,offsetTop:"auto",target:i?i.$element:angular.element(t)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin"],function(e){angular.isDefined(o[e])&&(r[e]=o[e])});var s=e(a,r);n.$on("$destroy",function(){s&&s.destroy(),r=null,s=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function(e){this.$element=e}]}}),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var e=this.defaults={animation:"am-fade",prefixClass:"alert",placement:null,template:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function(t,n){function a(a){var o={},i=angular.extend({},e,a);o=t(i),o.$scope.dismissable=!!i.dismissable,i.type&&(o.$scope.type=i.type);var r=o.show;return i.duration&&(o.show=function(){r(),n(function(){o.hide()},1e3*i.duration)}),o}return a}]}).directive("bsAlert",["$window","$sce","$alert",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","placement","keyboard","html","container","animation","duration","dismissable"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content","type"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsAlert&&e.$watch(o.bsAlert,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r&&r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var e=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",placement:"right",template:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function(t){function n(n){var a={},o=angular.extend({},e,n);return a=t(o)}return n}]}).directive("bsAside",["$window","$sce","$aside",function(e,t,n){e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsAside&&e.$watch(o.bsAside,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r&&r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var e=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:e}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(n,function(e){var n=angular.element(e);n.attr("bs-checkbox",""),n.attr("ng-model",t.ngModel+"."+n.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var s=n,l="INPUT"===o[0].nodeName,u=l?o.parent():o,c=angular.isDefined(i.trueValue)?i.trueValue:!0;a.test(i.trueValue)&&(c=e.$eval(i.trueValue));var d=angular.isDefined(i.falseValue)?i.falseValue:!1;a.test(i.falseValue)&&(d=e.$eval(i.falseValue));var f="boolean"!=typeof c||"boolean"!=typeof d;f&&(r.$parsers.push(function(e){return e?c:d}),e.$watch(i.ngModel,function(){r.$render()})),r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){l&&(o[0].checked=e),u.toggleClass(s.activeClass,e)})},o.bind(s.toggleEvent,function(){e.$apply(function(){l||r.$setViewValue(!u.hasClass("active")),f||r.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(e,t){e.attr("data-toggle","buttons"),e.removeAttr("ng-model");var n=e[0].querySelectorAll('input[type="radio"]');angular.forEach(n,function(e){angular.element(e).attr("bs-radio",""),angular.element(e).attr("ng-model",t.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function(e,t){var n=e.defaults,a=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(e,o,i,r){var s=n,l="INPUT"===o[0].nodeName,u=l?o.parent():o,c=a.test(i.value)?e.$eval(i.value):i.value;r.$render=function(){var e=angular.equals(r.$modelValue,c);t(function(){l&&(o[0].checked=e),u.toggleClass(s.activeClass,e)})},o.bind(s.toggleEvent,function(){e.$apply(function(){r.$setViewValue(c),r.$render()})})}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",template:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",modelDateFormat:null,dayFormat:"dd",strictFormat:!1,autoclose:!1,minDate:-1/0,maxDate:+1/0,startView:0,minView:0,startWeek:0,daysOfWeekDisabled:"",iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","datepickerViews","$tooltip",function(t,n,a,o,i,r,s,l){function u(t,n,a){function o(e){e.selected=r.$isSelected(e.date)}function i(){t[0].focus()}var r=l(t,angular.extend({},e,a)),u=a.scope,f=r.$options,p=r.$scope;f.startView&&(f.startView-=f.minView);var m=s(r);r.$views=m.views;var g=m.viewDate;p.$mode=f.startView,p.$iconLeft=f.iconLeft,p.$iconRight=f.iconRight;var $=r.$views[p.$mode];p.$select=function(e){r.select(e)},p.$selectPane=function(e){r.$selectPane(e)},p.$toggleMode=function(){r.setMode((p.$mode+1)%r.$views.length)},r.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())&&(r.$date=e,$.update.call($,e)),r.$build(!0)},r.updateDisabledDates=function(e){f.disabledDateRanges=e;for(var t=0,n=p.rows.length;n>t;t++)angular.forEach(p.rows[t],r.$setDisabledEl)},r.select=function(e,t){angular.isDate(n.$dateValue)||(n.$dateValue=new Date(e)),!p.$mode||t?(n.$setViewValue(angular.copy(e)),n.$render(),f.autoclose&&!t&&r.hide(!0)):(angular.extend(g,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),r.setMode(p.$mode-1),r.$build())},r.setMode=function(e){p.$mode=e,$=r.$views[p.$mode],r.$build()},r.$build=function(e){e===!0&&$.built||(e!==!1||$.built)&&$.build.call($)},r.$updateSelected=function(){for(var e=0,t=p.rows.length;t>e;e++)angular.forEach(p.rows[e],o)},r.$isSelected=function(e){return $.isSelected(e)},r.$setDisabledEl=function(e){e.disabled=$.isDisabled(e.date)},r.$selectPane=function(e){var t=$.steps,n=new Date(Date.UTC(g.year+(t.year||0)*e,g.month+(t.month||0)*e,g.date+(t.day||0)*e));angular.extend(g,{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate()}),r.$build()},r.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),d){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},r.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return p.$mode?p.$apply(function(){r.setMode(p.$mode-1)}):r.hide(!0);$.onKeyDown(e),u.$digest()}};var h=r.init;r.init=function(){return c&&f.useNative?(t.prop("type","date"),t.css("-webkit-appearance","textfield"),void 0):(d&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",i)),h(),void 0)};var v=r.destroy;r.destroy=function(){c&&f.useNative&&t.off("click",i),v()};var y=r.show;r.show=function(){y(),setTimeout(function(){r.$element.on(d?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.on("keydown",r.$onKeyDown)})};var w=r.hide;return r.hide=function(e){r.$element.off(d?"touchstart":"mousedown",r.$onMouseDown),f.keyboard&&t.off("keydown",r.$onKeyDown),w(e)},r}var c=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),d="createTouch"in t.document&&c;return e.lang||(e.lang=i.id),u.defaults=e,u}]}).directive("bsDatepicker",["$window","$parse","$q","$locale","dateFilter","$datepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){var s=(i.defaults,/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent)),l=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){function u(e){return e&&e.length?e:null}var c={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","dateType","dateFormat","modelDateFormat","dayFormat","strictFormat","startWeek","startDate","useNative","lang","startView","minView","iconLeft","iconRight","daysOfWeekDisabled"],function(e){angular.isDefined(n[e])&&(c[e]=n[e])}),n.bsShow&&e.$watch(n.bsShow,function(e){d&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(",?(datepicker),?")),e===!0?d.show():d.hide())}),s&&c.useNative&&(c.dateFormat="yyyy-MM-dd");var d=i(t,a,c);c=d.$options,angular.forEach(["minDate","maxDate"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){if("today"===t){var n=new Date;d.$options[e]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()+("maxDate"===e?1:0),0,0,0,"minDate"===e?0:-1)}else d.$options[e]=angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):l(t)?+new Date(parseInt(t,10)):angular.isString(t)&&0===t.length?"maxDate"===e?+1/0:-1/0:+new Date(t);!isNaN(d.$options[e])&&d.$build(!1)})}),e.$watch(n.ngModel,function(){d.update(a.$dateValue)},!0),angular.isDefined(n.disabledDates)&&e.$watch(n.disabledDates,function(e,t){e=u(e),t=u(t),e!==t&&d.updateDisabledDates(e)});var f=r({format:c.dateFormat,lang:c.lang,strict:c.strictFormat});a.$parsers.unshift(function(e){if(!e)return a.$setValidity("date",!0),void 0;var t=f.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))return a.$setValidity("date",!1),void 0;var n=isNaN(d.$options.minDate)||t.getTime()>=d.$options.minDate,i=isNaN(d.$options.maxDate)||t.getTime()<=d.$options.maxDate,r=n&&i;return a.$setValidity("date",r),a.$setValidity("min",n),a.$setValidity("max",i),r&&(a.$dateValue=t),"string"===c.dateType?o(t,c.modelDateFormat||c.dateFormat):"number"===c.dateType?a.$dateValue.getTime():"iso"===c.dateType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===c.dateType?f.parse(e,null,c.modelDateFormat):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,c.dateFormat))},e.$on("$destroy",function(){d&&d.destroy(),c=null,d=null})}}}]).provider("datepickerViews",function(){function e(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n}function t(e,t){return(e%t+t)%t}this.defaults={dayFormat:"dd",daySplit:7};this.$get=["$locale","$sce","dateFilter",function(n,a,o){return function(i){var r=i.$scope,s=i.$options,l=n.DATETIME_FORMATS.SHORTDAY,u=l.slice(s.startWeek).concat(l.slice(0,s.startWeek)),c=a.trustAsHtml('<th class="dow text-center">'+u.join('</th><th class="dow text-center">')+"</th>"),d=i.$date||(s.startDate?new Date(s.startDate):new Date),f={year:d.getFullYear(),month:d.getMonth(),date:d.getDate()},p=(6e4*d.getTimezoneOffset(),[{format:s.dayFormat,split:7,steps:{month:1},update:function(e,t){!this.built||t||e.getFullYear()!==f.year||e.getMonth()!==f.month?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getDate()!==f.date&&(f.date=i.$date.getDate(),i.$updateSelected())},build:function(){var n=new Date(f.year,f.month,1),a=n.getTimezoneOffset(),l=new Date(+n-864e5*t(n.getDay()-s.startWeek,7)),u=l.getTimezoneOffset(),d=(new Date).toDateString();u!==a&&(l=new Date(+l+6e4*(u-a)));for(var p,m=[],g=0;42>g;g++)p=new Date(l.getFullYear(),l.getMonth(),l.getDate()+g),m.push({date:p,isToday:p.toDateString()===d,label:o(p,this.format),selected:i.$date&&this.isSelected(p),muted:p.getMonth()!==f.month,disabled:this.isDisabled(p)});r.title=o(n,"MMMM yyyy"),r.showLabels=!0,r.labels=c,r.rows=e(m,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()&&e.getDate()===i.$date.getDate()},isDisabled:function(e){var t=e.getTime();if(t<s.minDate||t>s.maxDate)return!0;if(-1!==s.daysOfWeekDisabled.indexOf(e.getDay()))return!0;if(s.disabledDateRanges)for(var n=0;n<s.disabledDateRanges.length;n++)if(t>=s.disabledDateRanges[n].start)return t<=s.disabledDateRanges[n].end?!0:!1;return!1},onKeyDown:function(e){var t,n=i.$date.getTime();37===e.keyCode?t=new Date(n-864e5):38===e.keyCode?t=new Date(n-6048e5):39===e.keyCode?t=new Date(n+864e5):40===e.keyCode&&(t=new Date(n+6048e5)),this.isDisabled(t)||i.select(t,!0)}},{name:"month",format:"MMM",split:4,steps:{year:1},update:function(e){this.built&&e.getFullYear()===f.year?e.getMonth()!==f.month&&(angular.extend(f,{month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected()):(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build())},build:function(){for(var t,n=(new Date(f.year,0,1),[]),a=0;12>a;a++)t=new Date(f.year,a,1),n.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=o(t,"yyyy"),r.showLabels=!1,r.rows=e(n,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()&&e.getMonth()===i.$date.getMonth()},isDisabled:function(e){var t=+new Date(e.getFullYear(),e.getMonth()+1,0);return t<s.minDate||e.getTime()>s.maxDate},onKeyDown:function(e){var t=i.$date.getMonth(),n=new Date(i.$date);37===e.keyCode?n.setMonth(t-1):38===e.keyCode?n.setMonth(t-4):39===e.keyCode?n.setMonth(t+1):40===e.keyCode&&n.setMonth(t+4),this.isDisabled(n)||i.select(n,!0)}},{name:"year",format:"yyyy",split:4,steps:{year:12},update:function(e,t){!this.built||t||parseInt(e.getFullYear()/20,10)!==parseInt(f.year/20,10)?(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$build()):e.getFullYear()!==f.year&&(angular.extend(f,{year:i.$date.getFullYear(),month:i.$date.getMonth(),date:i.$date.getDate()}),i.$updateSelected())},build:function(){for(var t,n=f.year-f.year%(3*this.split),a=[],s=0;12>s;s++)t=new Date(n+s,0,1),a.push({date:t,label:o(t,this.format),selected:i.$isSelected(t),disabled:this.isDisabled(t)});r.title=a[0].label+"-"+a[a.length-1].label,r.showLabels=!1,r.rows=e(a,this.split),this.built=!0},isSelected:function(e){return i.$date&&e.getFullYear()===i.$date.getFullYear()},isDisabled:function(e){var t=+new Date(e.getFullYear()+1,0,0);return t<s.minDate||e.getTime()>s.maxDate},onKeyDown:function(e){var t=i.$date.getFullYear(),n=new Date(i.$date);37===e.keyCode?n.setYear(t-1):38===e.keyCode?n.setYear(t-4):39===e.keyCode?n.setYear(t+1):40===e.keyCode&&n.setYear(t+4),this.isDisabled(n)||i.select(n,!0)}}]);return{views:s.minView?Array.prototype.slice.call(p,s.minView):p,viewDate:f}}}]}),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var e=this.defaults={animation:"am-fade",prefixClass:"dropdown",placement:"bottom-left",template:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,o){function s(e){return e.target!==t[0]?e.target!==t[0]&&l.hide():void 0}{var l={},u=angular.extend({},e,o);l.$scope=u.scope&&u.scope.$new()||n.$new()}l=a(t,u);var c=t.parent();l.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var t=angular.element(l.$element[0].querySelectorAll("li:not(.divider) a"));if(t.length){var n;angular.forEach(t,function(e,t){r&&r.call(e,":focus")&&(n=t)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n<t.length-1?n++:angular.isUndefined(n)&&(n=0),t.eq(n)[0].focus()}}};var d=l.show;l.show=function(){d(),setTimeout(function(){u.keyboard&&l.$element.on("keydown",l.$onKeyDown),i.on("click",s)}),c.hasClass("dropdown")&&c.addClass("open")};var f=l.hide;return l.hide=function(){u.keyboard&&l.$element.off("keydown",l.$onKeyDown),i.off("click",s),c.hasClass("dropdown")&&c.removeClass("open"),f()},l}var i=angular.element(t.document.body),r=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector;return o}]}).directive("bsDropdown",["$window","$sce","$dropdown",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,t,a){var o={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template"],function(e){angular.isDefined(a[e])&&(o[e]=a[e])}),a.bsDropdown&&e.$watch(a.bsDropdown,function(t){e.content=t},!0),a.bsShow&&e.$watch(a.bsShow,function(e){i&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(",?(dropdown),?")),e===!0?i.show():i.hide())});var i=n(t,o);e.$on("$destroy",function(){i&&i.destroy(),o=null,i=null})}}}]),angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function(){function e(){}var t=Date.prototype,n=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale","dateFilter",function(a,o){var i=function(i){function r(e){var t,n=Object.keys(m),a=[],o=[],i=e;for(t=0;t<n.length;t++)if(e.split(n[t]).length>1){var r=i.search(n[t]);e=e.split(n[t]).join(""),m[n[t]]&&(a[r]=m[n[t]])}return angular.forEach(a,function(e){e&&o.push(e)}),o}function s(e){return e.replace(/\//g,"[\\/]").replace("/-/g","[-]").replace(/\./g,"[.]").replace(/\\s/g,"[\\s]")}function l(e){var t,n=Object.keys(p),a=e;for(t=0;t<n.length;t++)a=a.split(n[t]).join("${"+t+"}");for(t=0;t<n.length;t++)a=a.split("${"+t+"}").join("("+p[n[t]]+")");return e=s(e),new RegExp("^"+a+"$",["i"])}var u,c,d=angular.extend({},n,i),f={},p={sss:"[0-9]{3}",ss:"[0-5][0-9]",s:d.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",mm:"[0-5][0-9]",m:d.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",HH:"[01][0-9]|2[0-3]",H:d.strict?"1?[0-9]|2[0-3]":"[01]?[0-9]|2[0-3]",hh:"[0][1-9]|[1][012]",h:d.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",a:"AM|PM",EEEE:a.DATETIME_FORMATS.DAY.join("|"),EEE:a.DATETIME_FORMATS.SHORTDAY.join("|"),dd:"0[1-9]|[12][0-9]|3[01]",d:d.strict?"[1-9]|[1-2][0-9]|3[01]":"0?[1-9]|[1-2][0-9]|3[01]",MMMM:a.DATETIME_FORMATS.MONTH.join("|"),MMM:a.DATETIME_FORMATS.SHORTMONTH.join("|"),MM:"0[1-9]|1[012]",M:d.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",yyyy:"[1]{1}[0-9]{3}|[2]{1}[0-9]{3}",yy:"[0-9]{2}",y:d.strict?"-?(0|[1-9][0-9]{0,3})":"-?0*[0-9]{1,4}"},m={sss:t.setMilliseconds,ss:t.setSeconds,s:t.setSeconds,mm:t.setMinutes,m:t.setMinutes,HH:t.setHours,H:t.setHours,hh:t.setHours,h:t.setHours,EEEE:e,EEE:e,dd:t.setDate,d:t.setDate,a:function(e){var t=this.getHours();return this.setHours(e.match(/pm/i)?t+12:t)},MMMM:function(e){return this.setMonth(a.DATETIME_FORMATS.MONTH.indexOf(e))},MMM:function(e){return this.setMonth(a.DATETIME_FORMATS.SHORTMONTH.indexOf(e))},MM:function(e){return this.setMonth(1*e-1)},M:function(e){return this.setMonth(1*e-1)},yyyy:t.setFullYear,yy:function(e){return this.setFullYear(2e3+1*e)},y:t.setFullYear};return f.init=function(){f.$format=a.DATETIME_FORMATS[d.format]||d.format,u=l(f.$format),c=r(f.$format)},f.isValid=function(e){return angular.isDate(e)?!isNaN(e.getTime()):u.test(e)},f.parse=function(e,t,n){angular.isDate(e)&&(e=o(e,n||f.$format));var a=n?l(n):u,i=n?r(n):c,s=a.exec(e);if(!s)return!1;for(var d=t||new Date(0,0,1),p=0;p<s.length-1;p++)i[p]&&i[p].call(d,s[p+1]);return d},f.init(),f};return i}]}]),angular.module("mgcrea.ngStrap.helpers.debounce",[]).constant("debounce",function(e,t,n){var a,o,i,r,s;return function(){i=this,o=arguments,r=new Date;var l=function(){var u=new Date-r;t>u?a=setTimeout(l,t-u):(a=null,n||(s=e.apply(i,o)))},u=n&&!a;return a||(a=setTimeout(l,t)),u&&(s=e.apply(i,o)),s}}).constant("throttle",function(e,t,n){var a,o,i,r=null,s=0;n||(n={});var l=function(){s=n.leading===!1?0:new Date,r=null,i=e.apply(a,o)};return function(){var u=new Date;s||n.leading!==!1||(s=u);var c=t-(u-s);return a=this,o=arguments,0>=c?(clearTimeout(r),r=null,s=u,i=e.apply(a,o)):r||n.trailing===!1||(r=setTimeout(l,c)),i}}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",["$document","$window",function(){var t=(angular.element,{}),n=t.nodeName=function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()};t.css=function(t,n,a){var o;return o=t.currentStyle?t.currentStyle[n]:e.getComputedStyle?e.getComputedStyle(t)[n]:t.style[n],a===!0?parseFloat(o)||0:o},t.offset=function(t){var n=t.getBoundingClientRect(),a=t.ownerDocument;return{width:n.width||t.offsetWidth,height:n.height||t.offsetHeight,top:n.top+(e.pageYOffset||a.documentElement.scrollTop)-(a.documentElement.clientTop||0),left:n.left+(e.pageXOffset||a.documentElement.scrollLeft)-(a.documentElement.clientLeft||0)}},t.position=function(e){var o,i,r={top:0,left:0};return"fixed"===t.css(e,"position")?i=e.getBoundingClientRect():(o=a(e),i=t.offset(e),i=t.offset(e),n(o,"html")||(r=t.offset(o)),r.top+=t.css(o,"borderTopWidth",!0),r.left+=t.css(o,"borderLeftWidth",!0)),{width:e.offsetWidth,height:e.offsetHeight,top:i.top-r.top-t.css(e,"marginTop",!0),left:i.left-r.left-t.css(e,"marginLeft",!0)}};var a=function(e){var a=e.ownerDocument,o=e.offsetParent||a;if(n(o,"#document"))return a.documentElement;for(;o&&!n(o,"html")&&"static"===t.css(o,"position");)o=o.offsetParent;return o||a.documentElement};return t.height=function(e,n){var a=e.offsetHeight;return n?a+=t.css(e,"marginTop",!0)+t.css(e,"marginBottom",!0):a-=t.css(e,"paddingTop",!0)+t.css(e,"paddingBottom",!0)+t.css(e,"borderTopWidth",!0)+t.css(e,"borderBottomWidth",!0),a},t.width=function(e,n){var a=e.offsetWidth;return n?a+=t.css(e,"marginLeft",!0)+t.css(e,"marginRight",!0):a-=t.css(e,"paddingLeft",!0)+t.css(e,"paddingRight",!0)+t.css(e,"borderLeftWidth",!0)+t.css(e,"borderRightWidth",!0),a},t}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var e=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function(t,n){function a(a,o){function i(e,t){return e.map(function(e,n){var a,o,i={};return i[c]=e,a=u(t,i),o=p(t,i)||n,{label:a,value:o}})}var r={},s=angular.extend({},e,o);r.$values=[];var l,u,c,d,f,p,m;return r.init=function(){r.$match=l=a.match(s.regexp),u=t(l[2]||l[1]),c=l[4]||l[6],d=l[5],f=t(l[3]||""),p=t(l[2]?l[1]:c),m=t(l[7])},r.valuesFn=function(e,t){return n.when(m(e,t)).then(function(t){return r.$values=t?i(t,e):{},r.$values})},r.init(),r}return a}]}),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,a=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,o=!!n,i=o?function(e){var t=n(e);return function(){a(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return i.supported=o,i}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var e=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",prefixClass:"modal",prefixEvent:"modal",placement:"top",template:"modal/modal.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","$timeout","$sce","dimensions",function(n,a,o,i,r,s,l,u,c){function d(t){function n(e){e.target===e.currentTarget&&("static"===r.backdrop?i.focus():i.hide())}var i={},r=i.$options=angular.extend({},e,t);i.$promise=p(r.template);var s=i.$scope=r.scope&&r.scope.$new()||a.$new();r.element||r.container||(r.container="body"),m(["title","content"],function(e){r[e]&&(s[e]=c.trustAsHtml(r[e]))}),s.$hide=function(){s.$$postDigest(function(){i.hide()})},s.$show=function(){s.$$postDigest(function(){i.show()})},s.$toggle=function(){s.$$postDigest(function(){i.toggle()})},r.contentTemplate&&(i.$promise=i.$promise.then(function(e){var n=angular.element(e);return p(r.contentTemplate).then(function(e){var a=f('[ng-bind="content"]',n[0]).removeAttr("ng-bind").html(e);return t.template||a.next().remove(),n[0].outerHTML})}));var u,d,y=angular.element('<div class="'+r.prefixClass+'-backdrop"/>');return i.$promise.then(function(e){angular.isObject(e)&&(e=e.data),r.html&&(e=e.replace(v,'ng-bind-html="')),e=g.apply(e),u=o(e),i.init()}),i.init=function(){r.show&&s.$$postDigest(function(){i.show()})},i.destroy=function(){d&&(d.remove(),d=null),y&&(y.remove(),y=null),s.$destroy()},i.show=function(){s.$emit(r.prefixEvent+".show.before",i);var e;e=angular.isElement(r.container)?r.container:r.container?f(r.container):null;var t=r.container?null:r.element;d=i.$element=u(s,function(){}),d.css({display:"block"}).addClass(r.placement),r.animation&&(r.backdrop&&y.addClass(r.backdropAnimation),d.addClass(r.animation)),r.backdrop&&l.enter(y,h,null,function(){}),l.enter(d,e,t,function(){s.$emit(r.prefixEvent+".show",i)}),s.$isShown=!0,s.$$phase||s.$root&&s.$root.$$phase||s.$digest();var a=d[0];$(function(){a.focus()}),h.addClass(r.prefixClass+"-open"),r.animation&&h.addClass(r.prefixClass+"-with-"+r.animation),r.backdrop&&(d.on("click",n),y.on("click",n)),r.keyboard&&d.on("keyup",i.$onKeyUp)},i.hide=function(){s.$emit(r.prefixEvent+".hide.before",i),l.leave(d,function(){s.$emit(r.prefixEvent+".hide",i),h.removeClass(r.prefixClass+"-open"),r.animation&&h.removeClass(r.prefixClass+"-with-"+r.animation)}),r.backdrop&&l.leave(y,function(){}),s.$isShown=!1,s.$$phase||s.$root&&s.$root.$$phase||s.$digest(),r.backdrop&&(d.off("click",n),y.off("click",n)),r.keyboard&&d.off("keyup",i.$onKeyUp)},i.toggle=function(){s.$isShown?i.hide():i.show()},i.focus=function(){d[0].focus()},i.$onKeyUp=function(e){27===e.which&&s.$isShown&&(i.hide(),e.stopPropagation())},i}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function p(e){return i.when(r.get(e)||s.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var m=angular.forEach,g=String.prototype.trim,$=n.requestAnimationFrame||n.setTimeout,h=angular.element(n.document.body),v=/ng-bind="/gi;return d}]}).directive("bsModal",["$window","$sce","$modal",function(e,t,n){return{restrict:"EAC",scope:!0,link:function(e,a,o){var i={scope:e,element:a,show:!1};angular.forEach(["template","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),angular.forEach(["title","content"],function(n){o[n]&&o.$observe(n,function(a){e[n]=t.trustAsHtml(a)})}),o.bsModal&&e.$watch(o.bsModal,function(t){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var r=n(i);a.on(o.trigger||"click",r.toggle),e.$on("$destroy",function(){r&&r.destroy(),i=null,r=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var e=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:e}}}).directive("bsNavbar",["$window","$location","$navbar",function(e,t,n){var a=n.defaults;return{restrict:"A",link:function(e,n,o){var i=angular.copy(a);angular.forEach(Object.keys(a),function(e){angular.isDefined(o[e])&&(i[e]=o[e])}),e.$watch(function(){return t.path()},function(e){var t=n[0].querySelectorAll("li["+i.routeAttr+"]");angular.forEach(t,function(t){var n=angular.element(t),a=n.attr(i.routeAttr).replace("/","\\/");i.strict&&(a="^"+a+"$");var o=new RegExp(a,["i"]);o.test(e)?n.addClass(i.activeClass):n.removeClass(i.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var e=this.defaults={animation:"am-fade",customClass:"",container:!1,target:!1,placement:"right",template:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0};this.$get=["$tooltip",function(t){function n(n,a){var o=angular.extend({},e,a),i=t(n,o);return o.content&&(i.$scope.content=o.content),i}return n}]}).directive("bsPopover",["$window","$sce","$popover",function(e,t,n){var a=e.requestAnimationFrame||e.setTimeout;return{restrict:"EAC",scope:!0,link:function(e,o,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","customClass"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title","content"],function(n){i[n]&&i.$observe(n,function(o,i){e[n]=t.trustAsHtml(o),angular.isDefined(i)&&a(function(){s&&s.$applyPlacement() +})})}),i.bsPopover&&e.$watch(i.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&a(function(){s&&s.$applyPlacement()})},!0),i.bsShow&&e.$watch(i.bsShow,function(e){s&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(",?(popover),?")),e===!0?s.show():s.hide())});var s=n(o,r);e.$on("$destroy",function(){s&&s.destroy(),r=null,s=null})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var e=this.$$spies={},n=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function(a,o,i,r,s,l){function u(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function c(o){var c=angular.extend({},n,o);c.element||(c.element=p);var m=u(c.element,"body"),g=m?d:c.element,$=m?"window":c.id;if(e[$])return e[$].$$count++,e[$];var h,v,y,w,b,D,k,S,T={},x=T.$trackedElements=[],M=[];return T.init=function(){this.$$count=1,w=s(this.checkPosition,c.debounce),b=l(this.checkPosition,c.throttle),g.on("click",this.checkPositionWithEventLoop),d.on("resize",w),g.on("scroll",b),D=s(this.checkOffsets,c.debounce),h=i.$on("$viewContentLoaded",D),v=i.$on("$includeContentLoaded",D),D(),$&&(e[$]=T)},T.destroy=function(){this.$$count--,this.$$count>0||(g.off("click",this.checkPositionWithEventLoop),d.off("resize",w),g.off("scroll",w),h(),v(),$&&delete e[$])},T.checkPosition=function(){if(M.length){if(S=(m?a.pageYOffset:g.prop("scrollTop"))||0,k=Math.max(a.innerHeight,f.prop("clientHeight")),S<M[0].offsetTop&&y!==M[0].target)return T.$activateElement(M[0]);for(var e=M.length;e--;)if(!angular.isUndefined(M[e].offsetTop)&&null!==M[e].offsetTop&&y!==M[e].target&&!(S<M[e].offsetTop||M[e+1]&&S>M[e+1].offsetTop))return T.$activateElement(M[e])}},T.checkPositionWithEventLoop=function(){setTimeout(this.checkPosition,1)},T.$activateElement=function(e){if(y){var t=T.$getTrackedElement(y);t&&(t.source.removeClass("active"),u(t.source,"li")&&u(t.source.parent().parent(),"li")&&t.source.parent().parent().removeClass("active"))}y=e.target,e.source.addClass("active"),u(e.source,"li")&&u(e.source.parent().parent(),"li")&&e.source.parent().parent().addClass("active")},T.$getTrackedElement=function(e){return x.filter(function(t){return t.target===e})[0]},T.checkOffsets=function(){angular.forEach(x,function(e){var n=t.querySelector(e.target);e.offsetTop=n?r.offset(n).top:null,c.offset&&null!==e.offsetTop&&(e.offsetTop-=1*c.offset)}),M=x.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),w()},T.trackElement=function(e,t){x.push({target:e,source:t})},T.untrackElement=function(e,t){for(var n,a=x.length;a--;)if(x[a].target===e&&x[a].source===t){n=a;break}x=x.splice(n,1)},T.activate=function(e){x[e].addClass("active")},T.init(),T}var d=angular.element(a),f=angular.element(o.prop("documentElement")),p=angular.element(a.document.body);return c}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function(e,t,n,a){return{restrict:"EAC",link:function(e,t,n){var o={scope:e};angular.forEach(["offset","target"],function(e){angular.isDefined(n[e])&&(o[e]=n[e])});var i=a(o);i.trackElement(o.target,t),e.$on("$destroy",function(){i&&(i.untrackElement(o.target,t),i.destroy()),o=null,i=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function(){return{restrict:"A",compile:function(e){var t=e[0].querySelectorAll("li > a[href]");angular.forEach(t,function(e){var t=angular.element(e);t.parent().attr("bs-scrollspy","").attr("data-target",t.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var e=this.defaults={animation:"am-fade",prefixClass:"select",prefixEvent:"$select",placement:"bottom-left",template:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,allNoneButtons:!1,sort:!0,caretHtml:' <span class="caret"></span>',placeholder:"Choose among the following...",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok"};this.$get=["$window","$document","$rootScope","$tooltip",function(t,n,a,o){function i(t,n,a){var i={},r=angular.extend({},e,a);i=o(t,r);var l=i.$scope;l.$matches=[],l.$activeIndex=0,l.$isMultiple=r.multiple,l.$showAllNoneButtons=r.allNoneButtons&&r.multiple,l.$iconCheckmark=r.iconCheckmark,l.$activate=function(e){l.$$postDigest(function(){i.activate(e)})},l.$select=function(e){l.$$postDigest(function(){i.select(e)})},l.$isVisible=function(){return i.$isVisible()},l.$isActive=function(e){return i.$isActive(e)},l.$selectAll=function(){for(var e=0;e<l.$matches.length;e++)l.$isActive(e)||l.$select(e)},l.$selectNone=function(){for(var e=0;e<l.$matches.length;e++)l.$isActive(e)&&l.$select(e)},i.update=function(e){l.$matches=e,i.$updateActiveIndex()},i.activate=function(e){return r.multiple?(l.$activeIndex.sort(),i.$isActive(e)?l.$activeIndex.splice(l.$activeIndex.indexOf(e),1):l.$activeIndex.push(e),r.sort&&l.$activeIndex.sort()):l.$activeIndex=e,l.$activeIndex},i.select=function(e){var t=l.$matches[e].value;l.$apply(function(){i.activate(e),r.multiple?n.$setViewValue(l.$activeIndex.map(function(e){return l.$matches[e].value})):(n.$setViewValue(t),i.hide())}),l.$emit(r.prefixEvent+".select",t,e)},i.$updateActiveIndex=function(){n.$modelValue&&l.$matches.length?l.$activeIndex=r.multiple&&angular.isArray(n.$modelValue)?n.$modelValue.map(function(e){return i.$getIndex(e)}):i.$getIndex(n.$modelValue):l.$activeIndex>=l.$matches.length&&(l.$activeIndex=r.multiple?[]:0)},i.$isVisible=function(){return r.minLength&&n?l.$matches.length&&n.$viewValue.length>=r.minLength:l.$matches.length},i.$isActive=function(e){return r.multiple?-1!==l.$activeIndex.indexOf(e):l.$activeIndex===e},i.$getIndex=function(e){var t=l.$matches.length,n=t;if(t){for(n=t;n--&&l.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){if(e.preventDefault(),e.stopPropagation(),s){var t=angular.element(e.target);t.triggerHandler("click")}},i.$onKeyDown=function(e){if(/(9|13|38|40)/.test(e.keyCode)){if(e.preventDefault(),e.stopPropagation(),!r.multiple&&(13===e.keyCode||9===e.keyCode))return i.select(l.$activeIndex);38===e.keyCode&&l.$activeIndex>0?l.$activeIndex--:40===e.keyCode&&l.$activeIndex<l.$matches.length-1?l.$activeIndex++:angular.isUndefined(l.$activeIndex)&&(l.$activeIndex=0),l.$digest()}};var u=i.show;i.show=function(){u(),r.multiple&&i.$element.addClass("select-multiple"),setTimeout(function(){i.$element.on(s?"touchstart":"mousedown",i.$onMouseDown),r.keyboard&&t.on("keydown",i.$onKeyDown)})};var c=i.hide;return i.hide=function(){i.$element.off(s?"touchstart":"mousedown",i.$onMouseDown),r.keyboard&&t.off("keydown",i.$onKeyDown),c(!0)},i}var r=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),s="createTouch"in t.document&&r;return i.defaults=e,i}]}).directive("bsSelect",["$window","$parse","$q","$select","$parseOptions",function(e,t,n,a,o){var i=a.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,r){var s={scope:e};if(angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","placeholder","multiple","allNoneButtons","maxLength","maxLengthHtml"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])}),"select"===t[0].nodeName.toLowerCase()){var l=t;l.css("display","none"),t=angular.element('<button type="button" class="btn btn-default"></button>'),l.after(t)}var u=o(n.ngOptions),c=a(t,r,s),d=u.$match[7].replace(/\|.+/,"").trim();e.$watch(d,function(){u.valuesFn(e,r).then(function(e){c.update(e),r.$render()})},!0),e.$watch(n.ngModel,function(){c.$updateActiveIndex(),r.$render()},!0),r.$render=function(){var e,a;s.multiple&&angular.isArray(r.$modelValue)?(e=r.$modelValue.map(function(e){return a=c.$getIndex(e),angular.isDefined(a)?c.$scope.$matches[a].label:!1}).filter(angular.isDefined),e=e.length>(s.maxLength||i.maxLength)?e.length+" "+(s.maxLengthHtml||i.maxLengthHtml):e.join(", ")):(a=c.$getIndex(r.$modelValue),e=angular.isDefined(a)?c.$scope.$matches[a].label:!1),t.html((e?e:n.placeholder||i.placeholder)+i.caretHtml)},e.$on("$destroy",function(){c&&c.destroy(),s=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tab",[]).provider("$tab",function(){var e=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html",navClass:"nav-tabs"},t=this.controller=function(t,n,a){var o=this;o.$options=angular.copy(e),angular.forEach(["animation"],function(e){angular.isDefined(a[e])&&(o.$options[e]=a[e])}),o.$panes=t.$panes=[],o.$viewChangeListeners=[],o.$push=function(e){o.$panes.push(e)},o.$panes.$active=0,o.$setActive=t.$setActive=function(e){o.$panes.$active=e,o.$viewChangeListeners.forEach(function(e){e()})}};this.$get=function(){var n={};return n.defaults=e,n.controller=t,n}}).directive("bsTabs",["$window","$animate","$tab",function(e,t,n){var a=n.defaults;return{require:["?ngModel","bsTabs"],transclude:!0,scope:!0,controller:n.controller,templateUrl:function(e,t){return t.template||a.template},link:function(e,t,n,o){var i=o[0],r=o[1];e.$navClass=n.navClass||a.navClass,i&&(r.$viewChangeListeners.push(function(){i.$setViewValue(r.$panes.$active)}),i.$formatters.push(function(e){return r.$setActive(1*e),e}))}}}]).directive("bsPane",["$window","$animate","$sce",function(e,t,n){return{require:["^?ngModel","^bsTabs"],scope:!0,link:function(e,a,o,i){function r(){var n=s.$panes.indexOf(e),o=s.$panes.$active;t[n===o?"addClass":"removeClass"](a,"active")}var s=(i[0],i[1]);a.addClass("tab-pane"),o.$observe("title",function(t){e.title=n.trustAsHtml(t)}),s.$options.animation&&a.addClass(s.$options.animation),s.$push(e),s.$viewChangeListeners.push(function(){r()}),r()}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var e=this.defaults={animation:"am-fade",prefixClass:"timepicker",placement:"bottom-left",template:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",modelTimeFormat:null,autoclose:!1,minTime:-1/0,maxTime:+1/0,length:5,hourStep:1,minuteStep:5,iconUp:"glyphicon glyphicon-chevron-up",iconDown:"glyphicon glyphicon-chevron-down",arrowBehavior:"pager"};this.$get=["$window","$document","$rootScope","$sce","$locale","dateFilter","$tooltip",function(t,n,a,o,i,r,s){function l(t,n,a){function o(e,n){if(t[0].createTextRange){var a=t[0].createTextRange();a.collapse(!0),a.moveStart("character",e),a.moveEnd("character",n),a.select()}else t[0].setSelectionRange?t[0].setSelectionRange(e,n):angular.isUndefined(t[0].selectionStart)&&(t[0].selectionStart=e,t[0].selectionEnd=n)}function l(){t[0].focus()}var d=s(t,angular.extend({},e,a)),f=a.scope,p=d.$options,m=d.$scope,g=0,$=n.$dateValue||new Date,h={hour:$.getHours(),meridian:$.getHours()<12,minute:$.getMinutes(),second:$.getSeconds(),millisecond:$.getMilliseconds()},v=i.DATETIME_FORMATS[p.timeFormat]||p.timeFormat,y=/(h+)([:\.])?(m+)[ ]?(a?)/i.exec(v).slice(1);m.$iconUp=p.iconUp,m.$iconDown=p.iconDown,m.$select=function(e,t){d.select(e,t)},m.$moveIndex=function(e,t){d.$moveIndex(e,t)},m.$switchMeridian=function(e){d.switchMeridian(e)},d.update=function(e){angular.isDate(e)&&!isNaN(e.getTime())?(d.$date=e,angular.extend(h,{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}),d.$build()):d.$isBuilt||d.$build()},d.select=function(e,t,a){(!n.$dateValue||isNaN(n.$dateValue.getTime()))&&(n.$dateValue=new Date(1970,0,1)),angular.isDate(e)||(e=new Date(e)),0===t?n.$dateValue.setHours(e.getHours()):1===t&&n.$dateValue.setMinutes(e.getMinutes()),n.$setViewValue(n.$dateValue),n.$render(),p.autoclose&&!a&&d.hide(!0)},d.switchMeridian=function(e){var t=(e||n.$dateValue).getHours();n.$dateValue.setHours(12>t?t+12:t-12),n.$setViewValue(n.$dateValue),n.$render()},d.$build=function(){var e,t,n=m.midIndex=parseInt(p.length/2,10),a=[];for(e=0;e<p.length;e++)t=new Date(1970,0,1,h.hour-(n-e)*p.hourStep),a.push({date:t,label:r(t,y[0]),selected:d.$date&&d.$isSelected(t,0),disabled:d.$isDisabled(t,0)});var o,i=[];for(e=0;e<p.length;e++)o=new Date(1970,0,1,0,h.minute-(n-e)*p.minuteStep),i.push({date:o,label:r(o,y[2]),selected:d.$date&&d.$isSelected(o,1),disabled:d.$isDisabled(o,1)});var s=[];for(e=0;e<p.length;e++)s.push([a[e],i[e]]);m.rows=s,m.showAM=!!y[3],m.isAM=(d.$date||a[n].date).getHours()<12,m.timeSeparator=y[1],d.$isBuilt=!0},d.$isSelected=function(e,t){return d.$date?0===t?e.getHours()===d.$date.getHours():1===t?e.getMinutes()===d.$date.getMinutes():void 0:!1},d.$isDisabled=function(e,t){var n;return 0===t?n=e.getTime()+6e4*h.minute:1===t&&(n=e.getTime()+36e5*h.hour),n<1*p.minTime||n>1*p.maxTime},m.$arrowAction=function(e,t){"picker"===p.arrowBehavior?d.$setTimeByStep(e,t):d.$moveIndex(e,t)},d.$setTimeByStep=function(e,t){{var n=new Date(d.$date),a=n.getHours(),o=(r(n,"h").length,n.getMinutes());r(n,"mm").length}0===t?n.setHours(a-parseInt(p.hourStep,10)*e):n.setMinutes(o-parseInt(p.minuteStep,10)*e),d.select(n,t,!0),f.$digest()},d.$moveIndex=function(e,t){var n;0===t?(n=new Date(1970,0,1,h.hour+e*p.length,h.minute),angular.extend(h,{hour:n.getHours()})):1===t&&(n=new Date(1970,0,1,h.hour,h.minute+e*p.length*p.minuteStep),angular.extend(h,{minute:n.getMinutes()})),d.$build()},d.$onMouseDown=function(e){if("input"!==e.target.nodeName.toLowerCase()&&e.preventDefault(),e.stopPropagation(),c){var t=angular.element(e.target);"button"!==t[0].nodeName.toLowerCase()&&(t=t.parent()),t.triggerHandler("click")}},d.$onKeyDown=function(e){if(/(38|37|39|40|13)/.test(e.keyCode)&&!e.shiftKey&&!e.altKey){if(e.preventDefault(),e.stopPropagation(),13===e.keyCode)return d.hide(!0);var t=new Date(d.$date),n=t.getHours(),a=r(t,"h").length,i=t.getMinutes(),s=r(t,"mm").length,l=/(37|39)/.test(e.keyCode),u=2+1*!!y[3];l&&(37===e.keyCode?g=1>g?u-1:g-1:39===e.keyCode&&(g=u-1>g?g+1:0));var c=[0,a];0===g?(38===e.keyCode?t.setHours(n-parseInt(p.hourStep,10)):40===e.keyCode&&t.setHours(n+parseInt(p.hourStep,10)),c=[0,a]):1===g?(38===e.keyCode?t.setMinutes(i-parseInt(p.minuteStep,10)):40===e.keyCode&&t.setMinutes(i+parseInt(p.minuteStep,10)),c=[a+1,a+1+s]):2===g&&(l||d.switchMeridian(),c=[a+1+s+1,a+1+s+3]),d.select(t,g,!0),o(c[0],c[1]),f.$digest()}};var w=d.init;d.init=function(){return u&&p.useNative?(t.prop("type","time"),t.css("-webkit-appearance","textfield"),void 0):(c&&(t.prop("type","text"),t.attr("readonly","true"),t.on("click",l)),w(),void 0)};var b=d.destroy;d.destroy=function(){u&&p.useNative&&t.off("click",l),b()};var D=d.show;d.show=function(){D(),setTimeout(function(){d.$element.on(c?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.on("keydown",d.$onKeyDown)})};var k=d.hide;return d.hide=function(e){d.$element.off(c?"touchstart":"mousedown",d.$onMouseDown),p.keyboard&&t.off("keydown",d.$onKeyDown),k(e)},d}var u=(angular.element(t.document.body),/(ip(a|o)d|iphone|android)/gi.test(t.navigator.userAgent)),c="createTouch"in t.document&&u;return e.lang||(e.lang=i.id),l.defaults=e,l}]}).directive("bsTimepicker",["$window","$parse","$q","$locale","dateFilter","$timepicker","$dateParser","$timeout",function(e,t,n,a,o,i,r){{var s=i.defaults,l=/(ip(a|o)d|iphone|android)/gi.test(e.navigator.userAgent);e.requestAnimationFrame||e.setTimeout}return{restrict:"EAC",require:"ngModel",link:function(e,t,n,a){var u={scope:e,controller:a};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","autoclose","timeType","timeFormat","modelTimeFormat","useNative","hourStep","minuteStep","length","arrowBehavior"],function(e){angular.isDefined(n[e])&&(u[e]=n[e])}),n.bsShow&&e.$watch(n.bsShow,function(e){c&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(",?(timepicker),?")),e===!0?c.show():c.hide())}),l&&(u.useNative||s.useNative)&&(u.timeFormat="HH:mm");var c=i(t,a,u);u=c.$options;var d=r({format:u.timeFormat,lang:u.lang});angular.forEach(["minTime","maxTime"],function(e){angular.isDefined(n[e])&&n.$observe(e,function(t){c.$options[e]="now"===t?(new Date).setFullYear(1970,0,1):angular.isString(t)&&t.match(/^".+"$/)?+new Date(t.substr(1,t.length-2)):d.parse(t,new Date(1970,0,1,0)),!isNaN(c.$options[e])&&c.$build()})}),e.$watch(n.ngModel,function(){c.update(a.$dateValue)},!0),a.$parsers.unshift(function(e){if(!e)return a.$setValidity("date",!0),void 0;var t=d.parse(e,a.$dateValue);if(!t||isNaN(t.getTime()))a.$setValidity("date",!1);else{var n=t.getTime()>=u.minTime&&t.getTime()<=u.maxTime;a.$setValidity("date",n),n&&(a.$dateValue=t)}return"string"===u.timeType?o(t,u.modelTimeFormat||u.timeFormat):"number"===u.timeType?a.$dateValue.getTime():"iso"===u.timeType?a.$dateValue.toISOString():new Date(a.$dateValue)}),a.$formatters.push(function(e){var t;return t=angular.isUndefined(e)||null===e?0/0:angular.isDate(e)?e:"string"===u.timeType?d.parse(e,null,u.modelTimeFormat):new Date(e),a.$dateValue=t,a.$dateValue}),a.$render=function(){t.val(!a.$dateValue||isNaN(a.$dateValue.getTime())?"":o(a.$dateValue,u.timeFormat))},e.$on("$destroy",function(){c&&c.destroy(),u=null,c=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var e=this.defaults={animation:"am-fade",customClass:"",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,target:!1,placement:"top",template:"tooltip/tooltip.tpl.html",contentTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0};this.$get=["$window","$rootScope","$compile","$q","$templateCache","$http","$animate","dimensions","$$rAF",function(n,a,o,i,r,s,l,u,c){function d(t,n){function i(){return"body"===h.container?u.offset(h.target[0]||t[0]):u.position(h.target[0]||t[0])}function r(e,t,n,a){var o,i=e.split("-");switch(i[0]){case"right":o={top:t.top+t.height/2-a/2,left:t.left+t.width};break;case"bottom":o={top:t.top+t.height,left:t.left+t.width/2-n/2};break;case"left":o={top:t.top+t.height/2-a/2,left:t.left-n};break;default:o={top:t.top-a,left:t.left+t.width/2-n/2}}if(!i[1])return o;if("top"===i[0]||"bottom"===i[0])switch(i[1]){case"left":o.left=t.left;break;case"right":o.left=t.left+t.width-n}else if("left"===i[0]||"right"===i[0])switch(i[1]){case"top":o.top=t.top-a;break;case"bottom":o.top=t.top+t.height}return o}var s={},d=t[0].nodeName.toLowerCase(),h=s.$options=angular.extend({},e,n);s.$promise=p(h.template);var v=s.$scope=h.scope&&h.scope.$new()||a.$new();h.delay&&angular.isString(h.delay)&&(h.delay=parseFloat(h.delay)),h.title&&(s.$scope.title=h.title),v.$hide=function(){v.$$postDigest(function(){s.hide()})},v.$show=function(){v.$$postDigest(function(){s.show()})},v.$toggle=function(){v.$$postDigest(function(){s.toggle()})},s.$isShown=v.$isShown=!1;var y,w;h.contentTemplate&&(s.$promise=s.$promise.then(function(e){var t=angular.element(e);return p(h.contentTemplate).then(function(e){var n=f('[ng-bind="content"]',t[0]);return n.length||(n=f('[ng-bind="title"]',t[0])),n.removeAttr("ng-bind").html(e),t[0].outerHTML})}));var b,D,k,S;return s.$promise.then(function(e){angular.isObject(e)&&(e=e.data),h.html&&(e=e.replace($,'ng-bind-html="')),e=m.apply(e),k=e,b=o(e),s.init()}),s.init=function(){h.delay&&angular.isNumber(h.delay)&&(h.delay={show:h.delay,hide:h.delay}),"self"===h.container?S=t:angular.isElement(h.container)?S=h.container:h.container&&(S=f(h.container));var e=h.trigger.split(" ");angular.forEach(e,function(e){"click"===e?t.on("click",s.toggle):"manual"!==e&&(t.on("hover"===e?"mouseenter":"focus",s.enter),t.on("hover"===e?"mouseleave":"blur",s.leave),"button"===d&&"hover"!==e&&t.on(g?"touchstart":"mousedown",s.$onFocusElementMouseDown))}),h.target&&(h.target=angular.isElement(h.target)?h.target:f(h.target)),h.show&&v.$$postDigest(function(){"focus"===h.trigger?t[0].focus():s.show()})},s.destroy=function(){for(var e=h.trigger.split(" "),n=e.length;n--;){var a=e[n];"click"===a?t.off("click",s.toggle):"manual"!==a&&(t.off("hover"===a?"mouseenter":"focus",s.enter),t.off("hover"===a?"mouseleave":"blur",s.leave),"button"===d&&"hover"!==a&&t.off(g?"touchstart":"mousedown",s.$onFocusElementMouseDown))}D&&(D.remove(),D=null),clearTimeout(y),v.$destroy()},s.enter=function(){return clearTimeout(y),w="in",h.delay&&h.delay.show?(y=setTimeout(function(){"in"===w&&s.show()},h.delay.show),void 0):s.show()},s.show=function(){v.$emit(h.prefixEvent+".show.before",s);var e=h.container?S:null,n=h.container?null:t;D&&D.remove(),D=s.$element=b(v,function(){}),D.css({top:"-9999px",left:"-9999px",display:"block",visibility:"hidden"}).addClass(h.placement),h.animation&&D.addClass(h.animation),h.type&&D.addClass(h.prefixClass+"-"+h.type),h.customClass&&D.addClass(h.customClass),l.enter(D,e,n,function(){v.$emit(h.prefixEvent+".show",s)}),s.$isShown=v.$isShown=!0,v.$$phase||v.$root&&v.$root.$$phase||v.$digest(),c(function(){s.$applyPlacement(),D.css({visibility:"visible"})}),h.keyboard&&("focus"!==h.trigger?(s.focus(),D.on("keyup",s.$onKeyUp)):t.on("keyup",s.$onFocusKeyUp))},s.leave=function(){return clearTimeout(y),w="out",h.delay&&h.delay.hide?(y=setTimeout(function(){"out"===w&&s.hide()},h.delay.hide),void 0):s.hide()},s.hide=function(e){s.$isShown&&(v.$emit(h.prefixEvent+".hide.before",s),l.leave(D,function(){return v.$emit(h.prefixEvent+".hide",s),e&&"focus"===h.trigger?t[0].blur():void 0}),s.$isShown=v.$isShown=!1,v.$$phase||v.$root&&v.$root.$$phase||v.$digest(),h.keyboard&&null!==D&&D.off("keyup",s.$onKeyUp))},s.toggle=function(){s.$isShown?s.leave():s.enter()},s.focus=function(){D[0].focus()},s.$applyPlacement=function(){if(D){var e=i(),t=D.prop("offsetWidth"),n=D.prop("offsetHeight"),a=r(h.placement,e,t,n);a.top+="px",a.left+="px",D.css(a)}},s.$onKeyUp=function(e){27===e.which&&s.$isShown&&(s.hide(),e.stopPropagation())},s.$onFocusKeyUp=function(e){27===e.which&&(t[0].blur(),e.stopPropagation())},s.$onFocusElementMouseDown=function(e){e.preventDefault(),e.stopPropagation(),s.$isShown?t[0].blur():t[0].focus()},s}function f(e,n){return angular.element((n||t).querySelectorAll(e))}function p(e){return i.when(r.get(e)||s.get(e)).then(function(t){return angular.isObject(t)?(r.put(e,t.data),t.data):t})}var m=String.prototype.trim,g="createTouch"in n.document,$=/ng-bind="/gi;return d}]}).directive("bsTooltip",["$window","$location","$sce","$tooltip","$$rAF",function(e,t,n,a,o){return{restrict:"EAC",scope:!0,link:function(e,t,i){var r={scope:e};angular.forEach(["template","contentTemplate","placement","container","target","delay","trigger","keyboard","html","animation","type","customClass"],function(e){angular.isDefined(i[e])&&(r[e]=i[e])}),angular.forEach(["title"],function(t){i.$observe(t,function(a,i){e[t]=n.trustAsHtml(a),angular.isDefined(i)&&o(function(){s&&s.$applyPlacement()})})}),i.bsTooltip&&e.$watch(i.bsTooltip,function(t,n){angular.isObject(t)?angular.extend(e,t):e.title=t,angular.isDefined(n)&&o(function(){s&&s.$applyPlacement()})},!0),i.bsShow&&e.$watch(i.bsShow,function(e){s&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(",?(tooltip),?")),e===!0?s.show():s.hide())});var s=a(t,r);e.$on("$destroy",function(){s&&s.destroy(),r=null,s=null})}}}]),angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var e=this.defaults={animation:"am-fade",prefixClass:"typeahead",prefixEvent:"$typeahead",placement:"bottom-left",template:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"filter",limit:6};this.$get=["$window","$rootScope","$tooltip",function(t,n,a){function o(t,n,o){var i={},r=angular.extend({},e,o);i=a(t,r);var s=o.scope,l=i.$scope;l.$resetMatches=function(){l.$matches=[],l.$activeIndex=0},l.$resetMatches(),l.$activate=function(e){l.$$postDigest(function(){i.activate(e)})},l.$select=function(e){l.$$postDigest(function(){i.select(e)})},l.$isVisible=function(){return i.$isVisible()},i.update=function(e){l.$matches=e,l.$activeIndex>=e.length&&(l.$activeIndex=0)},i.activate=function(e){l.$activeIndex=e},i.select=function(e){var t=l.$matches[e].value;n.$setViewValue(t),n.$render(),l.$resetMatches(),s&&s.$digest(),l.$emit(r.prefixEvent+".select",t,e)},i.$isVisible=function(){return r.minLength&&n?l.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=r.minLength:!!l.$matches.length},i.$getIndex=function(e){var t=l.$matches.length,n=t;if(t){for(n=t;n--&&l.$matches[n].value!==e;);if(!(0>n))return n}},i.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},i.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(i.$isVisible()&&(e.preventDefault(),e.stopPropagation()),13===e.keyCode&&l.$matches.length?i.select(l.$activeIndex):38===e.keyCode&&l.$activeIndex>0?l.$activeIndex--:40===e.keyCode&&l.$activeIndex<l.$matches.length-1?l.$activeIndex++:angular.isUndefined(l.$activeIndex)&&(l.$activeIndex=0),l.$digest())};var u=i.show;i.show=function(){u(),setTimeout(function(){i.$element.on("mousedown",i.$onMouseDown),r.keyboard&&t.on("keydown",i.$onKeyDown)})};var c=i.hide;return i.hide=function(){i.$element.off("mousedown",i.$onMouseDown),r.keyboard&&t.off("keydown",i.$onKeyDown),c()},i}angular.element(t.document.body);return o.defaults=e,o}]}).directive("bsTypeahead",["$window","$parse","$q","$typeahead","$parseOptions",function(e,t,n,a,o){var i=a.defaults;return{restrict:"EAC",require:"ngModel",link:function(e,t,n,r){var s={scope:e};angular.forEach(["placement","container","delay","trigger","keyboard","html","animation","template","filter","limit","minLength","watchOptions","selectMode"],function(e){angular.isDefined(n[e])&&(s[e]=n[e])});var l=s.filter||i.filter,u=s.limit||i.limit,c=n.ngOptions;l&&(c+=" | "+l+":$viewValue"),u&&(c+=" | limitTo:"+u);var d=o(c),f=a(t,r,s);if(s.watchOptions){var p=d.$match[7].replace(/\|.+/,"").replace(/\(.*\)/g,"").trim();e.$watch(p,function(){d.valuesFn(e,r).then(function(e){f.update(e),r.$render()})},!0)}e.$watch(n.ngModel,function(t){e.$modelValue=t,d.valuesFn(e,r).then(function(e){if(s.selectMode&&!e.length&&t.length>0)return r.$setViewValue(r.$viewValue.substring(0,r.$viewValue.length-1)),void 0;e.length>u&&(e=e.slice(0,u));var n=f.$isVisible();n&&f.update(e),(1!==e.length||e[0].value!==t)&&(!n&&f.update(e),r.$render())})}),r.$render=function(){if(r.$isEmpty(r.$viewValue))return t.val("");var e=f.$getIndex(r.$modelValue),n=angular.isDefined(e)?f.$scope.$matches[e].label:r.$viewValue;n=angular.isObject(n)?n.label:n,t.val(n.replace(/<(?:.|\n)*?>/gm,"").trim())},e.$on("$destroy",function(){f&&f.destroy(),s=null,f=null})}}}])}(window,document); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js new file mode 100644 index 0000000..a01fd90 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js @@ -0,0 +1,8 @@ +/** + * angular-strap + * @version v2.0.5 - 2014-09-03 + * @link http://mgcrea.github.io/angular-strap + * @author Olivier Louvignes (olivier@mg-crea.com) + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +!function(){"use strict";angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function(t){t.put("alert/alert.tpl.html",'<div class="alert" tabindex="-1" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">×</button> <strong ng-bind="title"></strong> <span ng-bind-html="content"></span></div>')}]),angular.module("mgcrea.ngStrap.aside").run(["$templateCache",function(t){t.put("aside/aside.tpl.html",'<div class="aside" tabindex="-1" role="dialog"><div class="aside-dialog"><div class="aside-content"><div class="aside-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">×</button><h4 class="aside-title" ng-bind="title"></h4></div><div class="aside-body" ng-bind="content"></div><div class="aside-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function(t){t.put("datepicker/datepicker.tpl.html",'<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-show="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody></table></div>')}]),angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function(t){t.put("dropdown/dropdown.tpl.html",'<ul tabindex="-1" class="dropdown-menu" role="menu"><li role="presentation" ng-class="{divider: item.divider}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>')}]),angular.module("mgcrea.ngStrap.modal").run(["$templateCache",function(t){t.put("modal/modal.tpl.html",'<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">×</button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function(t){t.put("popover/popover.tpl.html",'<div class="popover"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>')}]),angular.module("mgcrea.ngStrap.select").run(["$templateCache",function(t){t.put("select/select.tpl.html",'<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li ng-if="$showAllNoneButtons"><div class="btn-group" style="margin-bottom: 5px; margin-left: 5px"><button class="btn btn-default btn-xs" ng-click="$selectAll()">All</button> <button class="btn btn-default btn-xs" ng-click="$selectNone()">None</button></div></li><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><span ng-bind="match.label"></span> <i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i></a></li></ul>')}]),angular.module("mgcrea.ngStrap.tab").run(["$templateCache",function(t){t.put("tab/tab.tpl.html",'<ul class="nav" ng-class="$navClass" role="tablist"><li ng-repeat="$pane in $panes" ng-class="{active: $index == $panes.$active}"><a role="tab" data-toggle="tab" ng-click="$setActive($index)" data-index="{{ $index }}" ng-bind-html="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>')}]),angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function(t){t.put("timepicker/timepicker.tpl.html",'<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 0)"><i class="{{ $iconUp }}"></i></button></th><th> </th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 1)"><i class="{{ $iconUp }}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showAM"> </td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 0)"><i class="{{ $iconDown }}"></i></button></th><th> </th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 1)"><i class="{{ $iconDown }}"></i></button></th></tr></tfoot></table></div>')}]),angular.module("mgcrea.ngStrap.tooltip").run(["$templateCache",function(t){t.put("tooltip/tooltip.tpl.html",'<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>')}]),angular.module("mgcrea.ngStrap.typeahead").run(["$templateCache",function(t){t.put("typeahead/typeahead.tpl.html",'<ul tabindex="-1" class="typeahead dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $index == $activeIndex}"><a role="menuitem" tabindex="-1" ng-click="$select($index, $event)" ng-bind="match.label"></a></li></ul>')}])}(window,document); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/.bower.json b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/.bower.json new file mode 100644 index 0000000..d2b66a9 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "angular-translate-loader-static-files", + "version": "0.1.6", + "main": "./angular-translate-loader-static-files.js", + "dependencies": { + "angular": "1.0.8", + "angular-translate": "~1.1.1" + }, + "homepage": "https://github.com/PascalPrecht/bower-angular-translate-loader-static-files", + "_release": "0.1.6", + "_resolution": { + "type": "version", + "tag": "0.1.6", + "commit": "eaac546d29d6cde45873e6bad9d18cdff071d983" + }, + "_source": "git://github.com/PascalPrecht/bower-angular-translate-loader-static-files.git", + "_target": "0.1.6", + "_originalSource": "angular-translate-loader-static-files" +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js new file mode 100644 index 0000000..ee3303e --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js @@ -0,0 +1,31 @@ +/*! + * angular-translate - v2.4.2 - 2014-10-21 + * http://github.com/angular-translate/angular-translate + * Copyright (c) 2014 ; Licensed MIT + */ +angular.module('pascalprecht.translate').factory('$translateStaticFilesLoader', [ + '$q', + '$http', + function ($q, $http) { + return function (options) { + if (!options || (!angular.isString(options.prefix) || !angular.isString(options.suffix))) { + throw new Error('Couldn\'t load static files, no prefix or suffix specified!'); + } + var deferred = $q.defer(); + $http(angular.extend({ + url: [ + options.prefix, + options.key, + options.suffix + ].join(''), + method: 'GET', + params: '' + }, options.$http)).success(function (data) { + deferred.resolve(data); + }).error(function (data) { + deferred.reject(options.key); + }); + return deferred.promise; + }; + } +]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js new file mode 100644 index 0000000..c8938bd --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js @@ -0,0 +1,6 @@ +/*! + * angular-translate - v2.4.2 - 2014-10-21 + * http://github.com/angular-translate/angular-translate + * Copyright (c) 2014 ; Licensed MIT + */ +angular.module("pascalprecht.translate").factory("$translateStaticFilesLoader",["$q","$http",function(a,b){return function(c){if(!c||!angular.isString(c.prefix)||!angular.isString(c.suffix))throw new Error("Couldn't load static files, no prefix or suffix specified!");var d=a.defer();return b(angular.extend({url:[c.prefix,c.key,c.suffix].join(""),method:"GET",params:""},c.$http)).success(function(a){d.resolve(a)}).error(function(){d.reject(c.key)}),d.promise}}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/.bower.json b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/.bower.json new file mode 100644 index 0000000..39d2dce --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "angular-translate-storage-cookie", + "version": "0.1.6", + "main": "./angular-translate-storage-cookie.js", + "dependencies": { + "angular": "1.0.8", + "angular-cookies": "1.0.8", + "angular-translate": "~1.1.1" + }, + "homepage": "https://github.com/PascalPrecht/bower-angular-translate-storage-cookie", + "_release": "0.1.6", + "_resolution": { + "type": "version", + "tag": "0.1.6", + "commit": "fc9ea3275f0f9bf0a60ca073b58488d934a348ac" + }, + "_source": "git://github.com/PascalPrecht/bower-angular-translate-storage-cookie.git", + "_target": "0.1.6", + "_originalSource": "angular-translate-storage-cookie" +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js new file mode 100644 index 0000000..34f180b --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js @@ -0,0 +1,19 @@ +/*! + * angular-translate - v2.4.2 - 2014-10-21 + * http://github.com/angular-translate/angular-translate + * Copyright (c) 2014 ; Licensed MIT + */ +angular.module('pascalprecht.translate').factory('$translateCookieStorage', [ + '$cookieStore', + function ($cookieStore) { + var $translateCookieStorage = { + get: function (name) { + return $cookieStore.get(name); + }, + set: function (name, value) { + $cookieStore.put(name, value); + } + }; + return $translateCookieStorage; + } +]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js new file mode 100644 index 0000000..66f0b92 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js @@ -0,0 +1,6 @@ +/*! + * angular-translate - v2.4.2 - 2014-10-21 + * http://github.com/angular-translate/angular-translate + * Copyright (c) 2014 ; Licensed MIT + */ +angular.module("pascalprecht.translate").factory("$translateCookieStorage",["$cookieStore",function(a){var b={get:function(b){return a.get(b)},set:function(b,c){a.put(b,c)}};return b}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.js new file mode 100644 index 0000000..46bcb55 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.js @@ -0,0 +1,960 @@ +/*! + * angular-translate - v2.4.2 - 2014-10-21 + * http://github.com/angular-translate/angular-translate + * Copyright (c) 2014 ; Licensed MIT + */ +angular.module('pascalprecht.translate', ['ng']).run([ + '$translate', + function ($translate) { + var key = $translate.storageKey(), storage = $translate.storage(); + if (storage) { + if (!storage.get(key)) { + if (angular.isString($translate.preferredLanguage())) { + $translate.use($translate.preferredLanguage()); + } else { + storage.set(key, $translate.use()); + } + } else { + $translate.use(storage.get(key)); + } + } else if (angular.isString($translate.preferredLanguage())) { + $translate.use($translate.preferredLanguage()); + } + } +]); +angular.module('pascalprecht.translate').provider('$translate', [ + '$STORAGE_KEY', + function ($STORAGE_KEY) { + var $translationTable = {}, $preferredLanguage, $availableLanguageKeys = [], $languageKeyAliases, $fallbackLanguage, $fallbackWasString, $uses, $nextLang, $storageFactory, $storageKey = $STORAGE_KEY, $storagePrefix, $missingTranslationHandlerFactory, $interpolationFactory, $interpolatorFactories = [], $interpolationSanitizationStrategy = false, $loaderFactory, $cloakClassName = 'translate-cloak', $loaderOptions, $notFoundIndicatorLeft, $notFoundIndicatorRight, $postCompilingEnabled = false, NESTED_OBJECT_DELIMITER = '.', loaderCache; + var version = '2.4.2'; + var getLocale = function () { + var nav = window.navigator; + return ((angular.isArray(nav.languages) ? nav.languages[0] : nav.language || nav.browserLanguage || nav.systemLanguage || nav.userLanguage) || '').split('-').join('_'); + }; + var indexOf = function (array, searchElement) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === searchElement) { + return i; + } + } + return -1; + }; + var trim = function () { + return this.replace(/^\s+|\s+$/g, ''); + }; + var negotiateLocale = function (preferred) { + var avail = [], locale = angular.lowercase(preferred), i = 0, n = $availableLanguageKeys.length; + for (; i < n; i++) { + avail.push(angular.lowercase($availableLanguageKeys[i])); + } + if (indexOf(avail, locale) > -1) { + return preferred; + } + if ($languageKeyAliases) { + var alias; + for (var langKeyAlias in $languageKeyAliases) { + var hasWildcardKey = false; + var hasExactKey = Object.prototype.hasOwnProperty.call($languageKeyAliases, langKeyAlias) && angular.lowercase(langKeyAlias) === angular.lowercase(preferred); + if (langKeyAlias.slice(-1) === '*') { + hasWildcardKey = langKeyAlias.slice(0, -1) === preferred.slice(0, langKeyAlias.length - 1); + } + if (hasExactKey || hasWildcardKey) { + alias = $languageKeyAliases[langKeyAlias]; + if (indexOf(avail, angular.lowercase(alias)) > -1) { + return alias; + } + } + } + } + var parts = preferred.split('_'); + if (parts.length > 1 && indexOf(avail, angular.lowercase(parts[0])) > -1) { + return parts[0]; + } + return preferred; + }; + var translations = function (langKey, translationTable) { + if (!langKey && !translationTable) { + return $translationTable; + } + if (langKey && !translationTable) { + if (angular.isString(langKey)) { + return $translationTable[langKey]; + } + } else { + if (!angular.isObject($translationTable[langKey])) { + $translationTable[langKey] = {}; + } + angular.extend($translationTable[langKey], flatObject(translationTable)); + } + return this; + }; + this.translations = translations; + this.cloakClassName = function (name) { + if (!name) { + return $cloakClassName; + } + $cloakClassName = name; + return this; + }; + var flatObject = function (data, path, result, prevKey) { + var key, keyWithPath, keyWithShortPath, val; + if (!path) { + path = []; + } + if (!result) { + result = {}; + } + for (key in data) { + if (!Object.prototype.hasOwnProperty.call(data, key)) { + continue; + } + val = data[key]; + if (angular.isObject(val)) { + flatObject(val, path.concat(key), result, key); + } else { + keyWithPath = path.length ? '' + path.join(NESTED_OBJECT_DELIMITER) + NESTED_OBJECT_DELIMITER + key : key; + if (path.length && key === prevKey) { + keyWithShortPath = '' + path.join(NESTED_OBJECT_DELIMITER); + result[keyWithShortPath] = '@:' + keyWithPath; + } + result[keyWithPath] = val; + } + } + return result; + }; + this.addInterpolation = function (factory) { + $interpolatorFactories.push(factory); + return this; + }; + this.useMessageFormatInterpolation = function () { + return this.useInterpolation('$translateMessageFormatInterpolation'); + }; + this.useInterpolation = function (factory) { + $interpolationFactory = factory; + return this; + }; + this.useSanitizeValueStrategy = function (value) { + $interpolationSanitizationStrategy = value; + return this; + }; + this.preferredLanguage = function (langKey) { + setupPreferredLanguage(langKey); + return this; + }; + var setupPreferredLanguage = function (langKey) { + if (langKey) { + $preferredLanguage = langKey; + } + return $preferredLanguage; + }; + this.translationNotFoundIndicator = function (indicator) { + this.translationNotFoundIndicatorLeft(indicator); + this.translationNotFoundIndicatorRight(indicator); + return this; + }; + this.translationNotFoundIndicatorLeft = function (indicator) { + if (!indicator) { + return $notFoundIndicatorLeft; + } + $notFoundIndicatorLeft = indicator; + return this; + }; + this.translationNotFoundIndicatorRight = function (indicator) { + if (!indicator) { + return $notFoundIndicatorRight; + } + $notFoundIndicatorRight = indicator; + return this; + }; + this.fallbackLanguage = function (langKey) { + fallbackStack(langKey); + return this; + }; + var fallbackStack = function (langKey) { + if (langKey) { + if (angular.isString(langKey)) { + $fallbackWasString = true; + $fallbackLanguage = [langKey]; + } else if (angular.isArray(langKey)) { + $fallbackWasString = false; + $fallbackLanguage = langKey; + } + if (angular.isString($preferredLanguage) && indexOf($fallbackLanguage, $preferredLanguage) < 0) { + $fallbackLanguage.push($preferredLanguage); + } + return this; + } else { + if ($fallbackWasString) { + return $fallbackLanguage[0]; + } else { + return $fallbackLanguage; + } + } + }; + this.use = function (langKey) { + if (langKey) { + if (!$translationTable[langKey] && !$loaderFactory) { + throw new Error('$translateProvider couldn\'t find translationTable for langKey: \'' + langKey + '\''); + } + $uses = langKey; + return this; + } + return $uses; + }; + var storageKey = function (key) { + if (!key) { + if ($storagePrefix) { + return $storagePrefix + $storageKey; + } + return $storageKey; + } + $storageKey = key; + }; + this.storageKey = storageKey; + this.useUrlLoader = function (url, options) { + return this.useLoader('$translateUrlLoader', angular.extend({ url: url }, options)); + }; + this.useStaticFilesLoader = function (options) { + return this.useLoader('$translateStaticFilesLoader', options); + }; + this.useLoader = function (loaderFactory, options) { + $loaderFactory = loaderFactory; + $loaderOptions = options || {}; + return this; + }; + this.useLocalStorage = function () { + return this.useStorage('$translateLocalStorage'); + }; + this.useCookieStorage = function () { + return this.useStorage('$translateCookieStorage'); + }; + this.useStorage = function (storageFactory) { + $storageFactory = storageFactory; + return this; + }; + this.storagePrefix = function (prefix) { + if (!prefix) { + return prefix; + } + $storagePrefix = prefix; + return this; + }; + this.useMissingTranslationHandlerLog = function () { + return this.useMissingTranslationHandler('$translateMissingTranslationHandlerLog'); + }; + this.useMissingTranslationHandler = function (factory) { + $missingTranslationHandlerFactory = factory; + return this; + }; + this.usePostCompiling = function (value) { + $postCompilingEnabled = !!value; + return this; + }; + this.determinePreferredLanguage = function (fn) { + var locale = fn && angular.isFunction(fn) ? fn() : getLocale(); + if (!$availableLanguageKeys.length) { + $preferredLanguage = locale; + } else { + $preferredLanguage = negotiateLocale(locale); + } + return this; + }; + this.registerAvailableLanguageKeys = function (languageKeys, aliases) { + if (languageKeys) { + $availableLanguageKeys = languageKeys; + if (aliases) { + $languageKeyAliases = aliases; + } + return this; + } + return $availableLanguageKeys; + }; + this.useLoaderCache = function (cache) { + if (cache === false) { + loaderCache = undefined; + } else if (cache === true) { + loaderCache = true; + } else if (typeof cache === 'undefined') { + loaderCache = '$translationCache'; + } else if (cache) { + loaderCache = cache; + } + return this; + }; + this.$get = [ + '$log', + '$injector', + '$rootScope', + '$q', + function ($log, $injector, $rootScope, $q) { + var Storage, defaultInterpolator = $injector.get($interpolationFactory || '$translateDefaultInterpolation'), pendingLoader = false, interpolatorHashMap = {}, langPromises = {}, fallbackIndex, startFallbackIteration; + var $translate = function (translationId, interpolateParams, interpolationId) { + if (angular.isArray(translationId)) { + var translateAll = function (translationIds) { + var results = {}; + var promises = []; + var translate = function (translationId) { + var deferred = $q.defer(); + var regardless = function (value) { + results[translationId] = value; + deferred.resolve([ + translationId, + value + ]); + }; + $translate(translationId, interpolateParams, interpolationId).then(regardless, regardless); + return deferred.promise; + }; + for (var i = 0, c = translationIds.length; i < c; i++) { + promises.push(translate(translationIds[i])); + } + return $q.all(promises).then(function () { + return results; + }); + }; + return translateAll(translationId); + } + var deferred = $q.defer(); + if (translationId) { + translationId = trim.apply(translationId); + } + var promiseToWaitFor = function () { + var promise = $preferredLanguage ? langPromises[$preferredLanguage] : langPromises[$uses]; + fallbackIndex = 0; + if ($storageFactory && !promise) { + var langKey = Storage.get($storageKey); + promise = langPromises[langKey]; + if ($fallbackLanguage && $fallbackLanguage.length) { + var index = indexOf($fallbackLanguage, langKey); + fallbackIndex = index === 0 ? 1 : 0; + if (indexOf($fallbackLanguage, $preferredLanguage) < 0) { + $fallbackLanguage.push($preferredLanguage); + } + } + } + return promise; + }(); + if (!promiseToWaitFor) { + determineTranslation(translationId, interpolateParams, interpolationId).then(deferred.resolve, deferred.reject); + } else { + promiseToWaitFor.then(function () { + determineTranslation(translationId, interpolateParams, interpolationId).then(deferred.resolve, deferred.reject); + }, deferred.reject); + } + return deferred.promise; + }; + var applyNotFoundIndicators = function (translationId) { + if ($notFoundIndicatorLeft) { + translationId = [ + $notFoundIndicatorLeft, + translationId + ].join(' '); + } + if ($notFoundIndicatorRight) { + translationId = [ + translationId, + $notFoundIndicatorRight + ].join(' '); + } + return translationId; + }; + var useLanguage = function (key) { + $uses = key; + $rootScope.$emit('$translateChangeSuccess', { language: key }); + if ($storageFactory) { + Storage.set($translate.storageKey(), $uses); + } + defaultInterpolator.setLocale($uses); + angular.forEach(interpolatorHashMap, function (interpolator, id) { + interpolatorHashMap[id].setLocale($uses); + }); + $rootScope.$emit('$translateChangeEnd', { language: key }); + }; + var loadAsync = function (key) { + if (!key) { + throw 'No language key specified for loading.'; + } + var deferred = $q.defer(); + $rootScope.$emit('$translateLoadingStart', { language: key }); + pendingLoader = true; + var cache = loaderCache; + if (typeof cache === 'string') { + cache = $injector.get(cache); + } + var loaderOptions = angular.extend({}, $loaderOptions, { + key: key, + $http: angular.extend({}, { cache: cache }, $loaderOptions.$http) + }); + $injector.get($loaderFactory)(loaderOptions).then(function (data) { + var translationTable = {}; + $rootScope.$emit('$translateLoadingSuccess', { language: key }); + if (angular.isArray(data)) { + angular.forEach(data, function (table) { + angular.extend(translationTable, flatObject(table)); + }); + } else { + angular.extend(translationTable, flatObject(data)); + } + pendingLoader = false; + deferred.resolve({ + key: key, + table: translationTable + }); + $rootScope.$emit('$translateLoadingEnd', { language: key }); + }, function (key) { + $rootScope.$emit('$translateLoadingError', { language: key }); + deferred.reject(key); + $rootScope.$emit('$translateLoadingEnd', { language: key }); + }); + return deferred.promise; + }; + if ($storageFactory) { + Storage = $injector.get($storageFactory); + if (!Storage.get || !Storage.set) { + throw new Error('Couldn\'t use storage \'' + $storageFactory + '\', missing get() or set() method!'); + } + } + if (angular.isFunction(defaultInterpolator.useSanitizeValueStrategy)) { + defaultInterpolator.useSanitizeValueStrategy($interpolationSanitizationStrategy); + } + if ($interpolatorFactories.length) { + angular.forEach($interpolatorFactories, function (interpolatorFactory) { + var interpolator = $injector.get(interpolatorFactory); + interpolator.setLocale($preferredLanguage || $uses); + if (angular.isFunction(interpolator.useSanitizeValueStrategy)) { + interpolator.useSanitizeValueStrategy($interpolationSanitizationStrategy); + } + interpolatorHashMap[interpolator.getInterpolationIdentifier()] = interpolator; + }); + } + var getTranslationTable = function (langKey) { + var deferred = $q.defer(); + if (Object.prototype.hasOwnProperty.call($translationTable, langKey)) { + deferred.resolve($translationTable[langKey]); + } else if (langPromises[langKey]) { + langPromises[langKey].then(function (data) { + translations(data.key, data.table); + deferred.resolve(data.table); + }, deferred.reject); + } else { + deferred.reject(); + } + return deferred.promise; + }; + var getFallbackTranslation = function (langKey, translationId, interpolateParams, Interpolator) { + var deferred = $q.defer(); + getTranslationTable(langKey).then(function (translationTable) { + if (Object.prototype.hasOwnProperty.call(translationTable, translationId)) { + Interpolator.setLocale(langKey); + deferred.resolve(Interpolator.interpolate(translationTable[translationId], interpolateParams)); + Interpolator.setLocale($uses); + } else { + deferred.reject(); + } + }, deferred.reject); + return deferred.promise; + }; + var getFallbackTranslationInstant = function (langKey, translationId, interpolateParams, Interpolator) { + var result, translationTable = $translationTable[langKey]; + if (Object.prototype.hasOwnProperty.call(translationTable, translationId)) { + Interpolator.setLocale(langKey); + result = Interpolator.interpolate(translationTable[translationId], interpolateParams); + Interpolator.setLocale($uses); + } + return result; + }; + var translateByHandler = function (translationId) { + if ($missingTranslationHandlerFactory) { + var resultString = $injector.get($missingTranslationHandlerFactory)(translationId, $uses); + if (resultString !== undefined) { + return resultString; + } else { + return translationId; + } + } else { + return translationId; + } + }; + var resolveForFallbackLanguage = function (fallbackLanguageIndex, translationId, interpolateParams, Interpolator) { + var deferred = $q.defer(); + if (fallbackLanguageIndex < $fallbackLanguage.length) { + var langKey = $fallbackLanguage[fallbackLanguageIndex]; + getFallbackTranslation(langKey, translationId, interpolateParams, Interpolator).then(deferred.resolve, function () { + resolveForFallbackLanguage(fallbackLanguageIndex + 1, translationId, interpolateParams, Interpolator).then(deferred.resolve); + }); + } else { + deferred.resolve(translateByHandler(translationId)); + } + return deferred.promise; + }; + var resolveForFallbackLanguageInstant = function (fallbackLanguageIndex, translationId, interpolateParams, Interpolator) { + var result; + if (fallbackLanguageIndex < $fallbackLanguage.length) { + var langKey = $fallbackLanguage[fallbackLanguageIndex]; + result = getFallbackTranslationInstant(langKey, translationId, interpolateParams, Interpolator); + if (!result) { + result = resolveForFallbackLanguageInstant(fallbackLanguageIndex + 1, translationId, interpolateParams, Interpolator); + } + } + return result; + }; + var fallbackTranslation = function (translationId, interpolateParams, Interpolator) { + return resolveForFallbackLanguage(startFallbackIteration > 0 ? startFallbackIteration : fallbackIndex, translationId, interpolateParams, Interpolator); + }; + var fallbackTranslationInstant = function (translationId, interpolateParams, Interpolator) { + return resolveForFallbackLanguageInstant(startFallbackIteration > 0 ? startFallbackIteration : fallbackIndex, translationId, interpolateParams, Interpolator); + }; + var determineTranslation = function (translationId, interpolateParams, interpolationId) { + var deferred = $q.defer(); + var table = $uses ? $translationTable[$uses] : $translationTable, Interpolator = interpolationId ? interpolatorHashMap[interpolationId] : defaultInterpolator; + if (table && Object.prototype.hasOwnProperty.call(table, translationId)) { + var translation = table[translationId]; + if (translation.substr(0, 2) === '@:') { + $translate(translation.substr(2), interpolateParams, interpolationId).then(deferred.resolve, deferred.reject); + } else { + deferred.resolve(Interpolator.interpolate(translation, interpolateParams)); + } + } else { + var missingTranslationHandlerTranslation; + if ($missingTranslationHandlerFactory && !pendingLoader) { + missingTranslationHandlerTranslation = translateByHandler(translationId); + } + if ($uses && $fallbackLanguage && $fallbackLanguage.length) { + fallbackTranslation(translationId, interpolateParams, Interpolator).then(function (translation) { + deferred.resolve(translation); + }, function (_translationId) { + deferred.reject(applyNotFoundIndicators(_translationId)); + }); + } else if ($missingTranslationHandlerFactory && !pendingLoader && missingTranslationHandlerTranslation) { + deferred.resolve(missingTranslationHandlerTranslation); + } else { + deferred.reject(applyNotFoundIndicators(translationId)); + } + } + return deferred.promise; + }; + var determineTranslationInstant = function (translationId, interpolateParams, interpolationId) { + var result, table = $uses ? $translationTable[$uses] : $translationTable, Interpolator = interpolationId ? interpolatorHashMap[interpolationId] : defaultInterpolator; + if (table && Object.prototype.hasOwnProperty.call(table, translationId)) { + var translation = table[translationId]; + if (translation.substr(0, 2) === '@:') { + result = determineTranslationInstant(translation.substr(2), interpolateParams, interpolationId); + } else { + result = Interpolator.interpolate(translation, interpolateParams); + } + } else { + var missingTranslationHandlerTranslation; + if ($missingTranslationHandlerFactory && !pendingLoader) { + missingTranslationHandlerTranslation = translateByHandler(translationId); + } + if ($uses && $fallbackLanguage && $fallbackLanguage.length) { + fallbackIndex = 0; + result = fallbackTranslationInstant(translationId, interpolateParams, Interpolator); + } else if ($missingTranslationHandlerFactory && !pendingLoader && missingTranslationHandlerTranslation) { + result = missingTranslationHandlerTranslation; + } else { + result = applyNotFoundIndicators(translationId); + } + } + return result; + }; + $translate.preferredLanguage = function (langKey) { + if (langKey) { + setupPreferredLanguage(langKey); + } + return $preferredLanguage; + }; + $translate.cloakClassName = function () { + return $cloakClassName; + }; + $translate.fallbackLanguage = function (langKey) { + if (langKey !== undefined && langKey !== null) { + fallbackStack(langKey); + if ($loaderFactory) { + if ($fallbackLanguage && $fallbackLanguage.length) { + for (var i = 0, len = $fallbackLanguage.length; i < len; i++) { + if (!langPromises[$fallbackLanguage[i]]) { + langPromises[$fallbackLanguage[i]] = loadAsync($fallbackLanguage[i]); + } + } + } + } + $translate.use($translate.use()); + } + if ($fallbackWasString) { + return $fallbackLanguage[0]; + } else { + return $fallbackLanguage; + } + }; + $translate.useFallbackLanguage = function (langKey) { + if (langKey !== undefined && langKey !== null) { + if (!langKey) { + startFallbackIteration = 0; + } else { + var langKeyPosition = indexOf($fallbackLanguage, langKey); + if (langKeyPosition > -1) { + startFallbackIteration = langKeyPosition; + } + } + } + }; + $translate.proposedLanguage = function () { + return $nextLang; + }; + $translate.storage = function () { + return Storage; + }; + $translate.use = function (key) { + if (!key) { + return $uses; + } + var deferred = $q.defer(); + $rootScope.$emit('$translateChangeStart', { language: key }); + var aliasedKey = negotiateLocale(key); + if (aliasedKey) { + key = aliasedKey; + } + if (!$translationTable[key] && $loaderFactory && !langPromises[key]) { + $nextLang = key; + langPromises[key] = loadAsync(key).then(function (translation) { + translations(translation.key, translation.table); + deferred.resolve(translation.key); + useLanguage(translation.key); + if ($nextLang === key) { + $nextLang = undefined; + } + }, function (key) { + if ($nextLang === key) { + $nextLang = undefined; + } + $rootScope.$emit('$translateChangeError', { language: key }); + deferred.reject(key); + $rootScope.$emit('$translateChangeEnd', { language: key }); + }); + } else { + deferred.resolve(key); + useLanguage(key); + } + return deferred.promise; + }; + $translate.storageKey = function () { + return storageKey(); + }; + $translate.isPostCompilingEnabled = function () { + return $postCompilingEnabled; + }; + $translate.refresh = function (langKey) { + if (!$loaderFactory) { + throw new Error('Couldn\'t refresh translation table, no loader registered!'); + } + var deferred = $q.defer(); + function resolve() { + deferred.resolve(); + $rootScope.$emit('$translateRefreshEnd', { language: langKey }); + } + function reject() { + deferred.reject(); + $rootScope.$emit('$translateRefreshEnd', { language: langKey }); + } + $rootScope.$emit('$translateRefreshStart', { language: langKey }); + if (!langKey) { + var tables = [], loadingKeys = {}; + if ($fallbackLanguage && $fallbackLanguage.length) { + for (var i = 0, len = $fallbackLanguage.length; i < len; i++) { + tables.push(loadAsync($fallbackLanguage[i])); + loadingKeys[$fallbackLanguage[i]] = true; + } + } + if ($uses && !loadingKeys[$uses]) { + tables.push(loadAsync($uses)); + } + $q.all(tables).then(function (tableData) { + angular.forEach(tableData, function (data) { + if ($translationTable[data.key]) { + delete $translationTable[data.key]; + } + translations(data.key, data.table); + }); + if ($uses) { + useLanguage($uses); + } + resolve(); + }); + } else if ($translationTable[langKey]) { + loadAsync(langKey).then(function (data) { + translations(data.key, data.table); + if (langKey === $uses) { + useLanguage($uses); + } + resolve(); + }, reject); + } else { + reject(); + } + return deferred.promise; + }; + $translate.instant = function (translationId, interpolateParams, interpolationId) { + if (translationId === null || angular.isUndefined(translationId)) { + return translationId; + } + if (angular.isArray(translationId)) { + var results = {}; + for (var i = 0, c = translationId.length; i < c; i++) { + results[translationId[i]] = $translate.instant(translationId[i], interpolateParams, interpolationId); + } + return results; + } + if (angular.isString(translationId) && translationId.length < 1) { + return translationId; + } + if (translationId) { + translationId = trim.apply(translationId); + } + var result, possibleLangKeys = []; + if ($preferredLanguage) { + possibleLangKeys.push($preferredLanguage); + } + if ($uses) { + possibleLangKeys.push($uses); + } + if ($fallbackLanguage && $fallbackLanguage.length) { + possibleLangKeys = possibleLangKeys.concat($fallbackLanguage); + } + for (var j = 0, d = possibleLangKeys.length; j < d; j++) { + var possibleLangKey = possibleLangKeys[j]; + if ($translationTable[possibleLangKey]) { + if (typeof $translationTable[possibleLangKey][translationId] !== 'undefined') { + result = determineTranslationInstant(translationId, interpolateParams, interpolationId); + } + } + if (typeof result !== 'undefined') { + break; + } + } + if (!result && result !== '') { + result = defaultInterpolator.interpolate(translationId, interpolateParams); + if ($missingTranslationHandlerFactory && !pendingLoader) { + result = translateByHandler(translationId); + } + } + return result; + }; + $translate.versionInfo = function () { + return version; + }; + $translate.loaderCache = function () { + return loaderCache; + }; + if ($loaderFactory) { + if (angular.equals($translationTable, {})) { + $translate.use($translate.use()); + } + if ($fallbackLanguage && $fallbackLanguage.length) { + var processAsyncResult = function (translation) { + translations(translation.key, translation.table); + $rootScope.$emit('$translateChangeEnd', { language: translation.key }); + }; + for (var i = 0, len = $fallbackLanguage.length; i < len; i++) { + langPromises[$fallbackLanguage[i]] = loadAsync($fallbackLanguage[i]).then(processAsyncResult); + } + } + } + return $translate; + } + ]; + } +]); +angular.module('pascalprecht.translate').factory('$translateDefaultInterpolation', [ + '$interpolate', + function ($interpolate) { + var $translateInterpolator = {}, $locale, $identifier = 'default', $sanitizeValueStrategy = null, sanitizeValueStrategies = { + escaped: function (params) { + var result = {}; + for (var key in params) { + if (Object.prototype.hasOwnProperty.call(params, key)) { + result[key] = angular.element('<div></div>').text(params[key]).html(); + } + } + return result; + } + }; + var sanitizeParams = function (params) { + var result; + if (angular.isFunction(sanitizeValueStrategies[$sanitizeValueStrategy])) { + result = sanitizeValueStrategies[$sanitizeValueStrategy](params); + } else { + result = params; + } + return result; + }; + $translateInterpolator.setLocale = function (locale) { + $locale = locale; + }; + $translateInterpolator.getInterpolationIdentifier = function () { + return $identifier; + }; + $translateInterpolator.useSanitizeValueStrategy = function (value) { + $sanitizeValueStrategy = value; + return this; + }; + $translateInterpolator.interpolate = function (string, interpolateParams) { + if ($sanitizeValueStrategy) { + interpolateParams = sanitizeParams(interpolateParams); + } + return $interpolate(string)(interpolateParams || {}); + }; + return $translateInterpolator; + } +]); +angular.module('pascalprecht.translate').constant('$STORAGE_KEY', 'NG_TRANSLATE_LANG_KEY'); +angular.module('pascalprecht.translate').directive('translate', [ + '$translate', + '$q', + '$interpolate', + '$compile', + '$parse', + '$rootScope', + function ($translate, $q, $interpolate, $compile, $parse, $rootScope) { + return { + restrict: 'AE', + scope: true, + compile: function (tElement, tAttr) { + var translateValuesExist = tAttr.translateValues ? tAttr.translateValues : undefined; + var translateInterpolation = tAttr.translateInterpolation ? tAttr.translateInterpolation : undefined; + var translateValueExist = tElement[0].outerHTML.match(/translate-value-+/i); + var interpolateRegExp = '^(.*)(' + $interpolate.startSymbol() + '.*' + $interpolate.endSymbol() + ')(.*)'; + return function linkFn(scope, iElement, iAttr) { + scope.interpolateParams = {}; + scope.preText = ''; + scope.postText = ''; + iAttr.$observe('translate', function (translationId) { + if (angular.equals(translationId, '') || !angular.isDefined(translationId)) { + var interpolateMatches = iElement.text().match(interpolateRegExp); + if (angular.isArray(interpolateMatches)) { + scope.preText = interpolateMatches[1]; + scope.postText = interpolateMatches[3]; + scope.translationId = $interpolate(interpolateMatches[2])(scope.$parent); + } else { + scope.translationId = iElement.text().replace(/^\s+|\s+$/g, ''); + } + } else { + scope.translationId = translationId; + } + }); + iAttr.$observe('translateDefault', function (value) { + scope.defaultText = value; + }); + if (translateValuesExist) { + iAttr.$observe('translateValues', function (interpolateParams) { + if (interpolateParams) { + scope.$parent.$watch(function () { + angular.extend(scope.interpolateParams, $parse(interpolateParams)(scope.$parent)); + }); + } + }); + } + if (translateValueExist) { + var fn = function (attrName) { + iAttr.$observe(attrName, function (value) { + scope.interpolateParams[angular.lowercase(attrName.substr(14, 1)) + attrName.substr(15)] = value; + }); + }; + for (var attr in iAttr) { + if (Object.prototype.hasOwnProperty.call(iAttr, attr) && attr.substr(0, 14) === 'translateValue' && attr !== 'translateValues') { + fn(attr); + } + } + } + var applyElementContent = function (value, scope, successful) { + if (!successful && typeof scope.defaultText !== 'undefined') { + value = scope.defaultText; + } + iElement.html(scope.preText + value + scope.postText); + var globallyEnabled = $translate.isPostCompilingEnabled(); + var locallyDefined = typeof tAttr.translateCompile !== 'undefined'; + var locallyEnabled = locallyDefined && tAttr.translateCompile !== 'false'; + if (globallyEnabled && !locallyDefined || locallyEnabled) { + $compile(iElement.contents())(scope); + } + }; + var updateTranslationFn = function () { + if (!translateValuesExist && !translateValueExist) { + return function () { + var unwatch = scope.$watch('translationId', function (value) { + if (scope.translationId && value) { + $translate(value, {}, translateInterpolation).then(function (translation) { + applyElementContent(translation, scope, true); + unwatch(); + }, function (translationId) { + applyElementContent(translationId, scope, false); + unwatch(); + }); + } + }, true); + }; + } else { + return function () { + var updateTranslations = function () { + if (scope.translationId && scope.interpolateParams) { + $translate(scope.translationId, scope.interpolateParams, translateInterpolation).then(function (translation) { + applyElementContent(translation, scope, true); + }, function (translationId) { + applyElementContent(translationId, scope, false); + }); + } + }; + scope.$watch('interpolateParams', updateTranslations, true); + scope.$watch('translationId', updateTranslations); + }; + } + }(); + var unbind = $rootScope.$on('$translateChangeSuccess', updateTranslationFn); + updateTranslationFn(); + scope.$on('$destroy', unbind); + }; + } + }; + } +]); +angular.module('pascalprecht.translate').directive('translateCloak', [ + '$rootScope', + '$translate', + function ($rootScope, $translate) { + return { + compile: function (tElement) { + var applyCloak = function () { + tElement.addClass($translate.cloakClassName()); + }, removeCloak = function () { + tElement.removeClass($translate.cloakClassName()); + }, removeListener = $rootScope.$on('$translateChangeEnd', function () { + removeCloak(); + removeListener(); + removeListener = null; + }); + applyCloak(); + return function linkFn(scope, iElement, iAttr) { + if (iAttr.translateCloak && iAttr.translateCloak.length) { + iAttr.$observe('translateCloak', function (translationId) { + $translate(translationId).then(removeCloak, applyCloak); + }); + } + }; + } + }; + } +]); +angular.module('pascalprecht.translate').filter('translate', [ + '$parse', + '$translate', + function ($parse, $translate) { + var translateFilter = function (translationId, interpolateParams, interpolation) { + if (!angular.isObject(interpolateParams)) { + interpolateParams = $parse(interpolateParams)(this); + } + return $translate.instant(translationId, interpolateParams, interpolation); + }; + translateFilter.$stateful = true; + return translateFilter; + } +]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.min.js new file mode 100644 index 0000000..d5a421d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular-translate_2.4.2/angular-translate.min.js @@ -0,0 +1,6 @@ +/*! + * angular-translate - v2.4.2 - 2014-10-21 + * http://github.com/angular-translate/angular-translate + * Copyright (c) 2014 ; Licensed MIT + */ +angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(a){var b=a.storageKey(),c=a.storage();c?c.get(b)?a.use(c.get(b)):angular.isString(a.preferredLanguage())?a.use(a.preferredLanguage()):c.set(b,a.use()):angular.isString(a.preferredLanguage())&&a.use(a.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q={},r=[],s=a,t=[],u=!1,v="translate-cloak",w=!1,x=".",y="2.4.2",z=function(){var a=window.navigator;return((angular.isArray(a.languages)?a.languages[0]:a.language||a.browserLanguage||a.systemLanguage||a.userLanguage)||"").split("-").join("_")},A=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},B=function(){return this.replace(/^\s+|\s+$/g,"")},C=function(a){for(var b=[],d=angular.lowercase(a),e=0,f=r.length;f>e;e++)b.push(angular.lowercase(r[e]));if(A(b,d)>-1)return a;if(c){var g;for(var h in c){var i=!1,j=Object.prototype.hasOwnProperty.call(c,h)&&angular.lowercase(h)===angular.lowercase(a);if("*"===h.slice(-1)&&(i=h.slice(0,-1)===a.slice(0,h.length-1)),(j||i)&&(g=c[h],A(b,angular.lowercase(g))>-1))return g}}var k=a.split("_");return k.length>1&&A(b,angular.lowercase(k[0]))>-1?k[0]:a},D=function(a,b){if(!a&&!b)return q;if(a&&!b){if(angular.isString(a))return q[a]}else angular.isObject(q[a])||(q[a]={}),angular.extend(q[a],E(b));return this};this.translations=D,this.cloakClassName=function(a){return a?(v=a,this):v};var E=function(a,b,c,d){var e,f,g,h;b||(b=[]),c||(c={});for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(h=a[e],angular.isObject(h)?E(h,b.concat(e),c,e):(f=b.length?""+b.join(x)+x+e:e,b.length&&e===d&&(g=""+b.join(x),c[g]="@:"+f),c[f]=h));return c};this.addInterpolation=function(a){return t.push(a),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(a){return k=a,this},this.useSanitizeValueStrategy=function(a){return u=a,this},this.preferredLanguage=function(a){return F(a),this};var F=function(a){return a&&(b=a),b};this.translationNotFoundIndicator=function(a){return this.translationNotFoundIndicatorLeft(a),this.translationNotFoundIndicatorRight(a),this},this.translationNotFoundIndicatorLeft=function(a){return a?(n=a,this):n},this.translationNotFoundIndicatorRight=function(a){return a?(o=a,this):o},this.fallbackLanguage=function(a){return G(a),this};var G=function(a){return a?(angular.isString(a)?(e=!0,d=[a]):angular.isArray(a)&&(e=!1,d=a),angular.isString(b)&&A(d,b)<0&&d.push(b),this):e?d[0]:d};this.use=function(a){if(a){if(!q[a]&&!l)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+a+"'");return f=a,this}return f};var H=function(a){return a?void(s=a):i?i+s:s};this.storageKey=H,this.useUrlLoader=function(a,b){return this.useLoader("$translateUrlLoader",angular.extend({url:a},b))},this.useStaticFilesLoader=function(a){return this.useLoader("$translateStaticFilesLoader",a)},this.useLoader=function(a,b){return l=a,m=b||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(a){return h=a,this},this.storagePrefix=function(a){return a?(i=a,this):a},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(a){return j=a,this},this.usePostCompiling=function(a){return w=!!a,this},this.determinePreferredLanguage=function(a){var c=a&&angular.isFunction(a)?a():z();return b=r.length?C(c):c,this},this.registerAvailableLanguageKeys=function(a,b){return a?(r=a,b&&(c=b),this):r},this.useLoaderCache=function(a){return a===!1?p=void 0:a===!0?p=!0:"undefined"==typeof a?p="$translationCache":a&&(p=a),this},this.$get=["$log","$injector","$rootScope","$q",function(a,c,i,r){var x,z,I,J=c.get(k||"$translateDefaultInterpolation"),K=!1,L={},M={},N=function(a,c,e){if(angular.isArray(a)){var g=function(a){for(var b={},d=[],f=function(a){var d=r.defer(),f=function(c){b[a]=c,d.resolve([a,c])};return N(a,c,e).then(f,f),d.promise},g=0,h=a.length;h>g;g++)d.push(f(a[g]));return r.all(d).then(function(){return b})};return g(a)}var i=r.defer();a&&(a=B.apply(a));var j=function(){var a=b?M[b]:M[f];if(z=0,h&&!a){var c=x.get(s);if(a=M[c],d&&d.length){var e=A(d,c);z=0===e?1:0,A(d,b)<0&&d.push(b)}}return a}();return j?j.then(function(){Z(a,c,e).then(i.resolve,i.reject)},i.reject):Z(a,c,e).then(i.resolve,i.reject),i.promise},O=function(a){return n&&(a=[n,a].join(" ")),o&&(a=[a,o].join(" ")),a},P=function(a){f=a,i.$emit("$translateChangeSuccess",{language:a}),h&&x.set(N.storageKey(),f),J.setLocale(f),angular.forEach(L,function(a,b){L[b].setLocale(f)}),i.$emit("$translateChangeEnd",{language:a})},Q=function(a){if(!a)throw"No language key specified for loading.";var b=r.defer();i.$emit("$translateLoadingStart",{language:a}),K=!0;var d=p;"string"==typeof d&&(d=c.get(d));var e=angular.extend({},m,{key:a,$http:angular.extend({},{cache:d},m.$http)});return c.get(l)(e).then(function(c){var d={};i.$emit("$translateLoadingSuccess",{language:a}),angular.isArray(c)?angular.forEach(c,function(a){angular.extend(d,E(a))}):angular.extend(d,E(c)),K=!1,b.resolve({key:a,table:d}),i.$emit("$translateLoadingEnd",{language:a})},function(a){i.$emit("$translateLoadingError",{language:a}),b.reject(a),i.$emit("$translateLoadingEnd",{language:a})}),b.promise};if(h&&(x=c.get(h),!x.get||!x.set))throw new Error("Couldn't use storage '"+h+"', missing get() or set() method!");angular.isFunction(J.useSanitizeValueStrategy)&&J.useSanitizeValueStrategy(u),t.length&&angular.forEach(t,function(a){var d=c.get(a);d.setLocale(b||f),angular.isFunction(d.useSanitizeValueStrategy)&&d.useSanitizeValueStrategy(u),L[d.getInterpolationIdentifier()]=d});var R=function(a){var b=r.defer();return Object.prototype.hasOwnProperty.call(q,a)?b.resolve(q[a]):M[a]?M[a].then(function(a){D(a.key,a.table),b.resolve(a.table)},b.reject):b.reject(),b.promise},S=function(a,b,c,d){var e=r.defer();return R(a).then(function(g){Object.prototype.hasOwnProperty.call(g,b)?(d.setLocale(a),e.resolve(d.interpolate(g[b],c)),d.setLocale(f)):e.reject()},e.reject),e.promise},T=function(a,b,c,d){var e,g=q[a];return Object.prototype.hasOwnProperty.call(g,b)&&(d.setLocale(a),e=d.interpolate(g[b],c),d.setLocale(f)),e},U=function(a){if(j){var b=c.get(j)(a,f);return void 0!==b?b:a}return a},V=function(a,b,c,e){var f=r.defer();if(a<d.length){var g=d[a];S(g,b,c,e).then(f.resolve,function(){V(a+1,b,c,e).then(f.resolve)})}else f.resolve(U(b));return f.promise},W=function(a,b,c,e){var f;if(a<d.length){var g=d[a];f=T(g,b,c,e),f||(f=W(a+1,b,c,e))}return f},X=function(a,b,c){return V(I>0?I:z,a,b,c)},Y=function(a,b,c){return W(I>0?I:z,a,b,c)},Z=function(a,b,c){var e=r.defer(),g=f?q[f]:q,h=c?L[c]:J;if(g&&Object.prototype.hasOwnProperty.call(g,a)){var i=g[a];"@:"===i.substr(0,2)?N(i.substr(2),b,c).then(e.resolve,e.reject):e.resolve(h.interpolate(i,b))}else{var k;j&&!K&&(k=U(a)),f&&d&&d.length?X(a,b,h).then(function(a){e.resolve(a)},function(a){e.reject(O(a))}):j&&!K&&k?e.resolve(k):e.reject(O(a))}return e.promise},$=function(a,b,c){var e,g=f?q[f]:q,h=c?L[c]:J;if(g&&Object.prototype.hasOwnProperty.call(g,a)){var i=g[a];e="@:"===i.substr(0,2)?$(i.substr(2),b,c):h.interpolate(i,b)}else{var k;j&&!K&&(k=U(a)),f&&d&&d.length?(z=0,e=Y(a,b,h)):e=j&&!K&&k?k:O(a)}return e};if(N.preferredLanguage=function(a){return a&&F(a),b},N.cloakClassName=function(){return v},N.fallbackLanguage=function(a){if(void 0!==a&&null!==a){if(G(a),l&&d&&d.length)for(var b=0,c=d.length;c>b;b++)M[d[b]]||(M[d[b]]=Q(d[b]));N.use(N.use())}return e?d[0]:d},N.useFallbackLanguage=function(a){if(void 0!==a&&null!==a)if(a){var b=A(d,a);b>-1&&(I=b)}else I=0},N.proposedLanguage=function(){return g},N.storage=function(){return x},N.use=function(a){if(!a)return f;var b=r.defer();i.$emit("$translateChangeStart",{language:a});var c=C(a);return c&&(a=c),q[a]||!l||M[a]?(b.resolve(a),P(a)):(g=a,M[a]=Q(a).then(function(c){D(c.key,c.table),b.resolve(c.key),P(c.key),g===a&&(g=void 0)},function(a){g===a&&(g=void 0),i.$emit("$translateChangeError",{language:a}),b.reject(a),i.$emit("$translateChangeEnd",{language:a})})),b.promise},N.storageKey=function(){return H()},N.isPostCompilingEnabled=function(){return w},N.refresh=function(a){function b(){e.resolve(),i.$emit("$translateRefreshEnd",{language:a})}function c(){e.reject(),i.$emit("$translateRefreshEnd",{language:a})}if(!l)throw new Error("Couldn't refresh translation table, no loader registered!");var e=r.defer();if(i.$emit("$translateRefreshStart",{language:a}),a)q[a]?Q(a).then(function(c){D(c.key,c.table),a===f&&P(f),b()},c):c();else{var g=[],h={};if(d&&d.length)for(var j=0,k=d.length;k>j;j++)g.push(Q(d[j])),h[d[j]]=!0;f&&!h[f]&&g.push(Q(f)),r.all(g).then(function(a){angular.forEach(a,function(a){q[a.key]&&delete q[a.key],D(a.key,a.table)}),f&&P(f),b()})}return e.promise},N.instant=function(a,c,e){if(null===a||angular.isUndefined(a))return a;if(angular.isArray(a)){for(var g={},h=0,i=a.length;i>h;h++)g[a[h]]=N.instant(a[h],c,e);return g}if(angular.isString(a)&&a.length<1)return a;a&&(a=B.apply(a));var k,l=[];b&&l.push(b),f&&l.push(f),d&&d.length&&(l=l.concat(d));for(var m=0,n=l.length;n>m;m++){var o=l[m];if(q[o]&&"undefined"!=typeof q[o][a]&&(k=$(a,c,e)),"undefined"!=typeof k)break}return k||""===k||(k=J.interpolate(a,c),j&&!K&&(k=U(a))),k},N.versionInfo=function(){return y},N.loaderCache=function(){return p},l&&(angular.equals(q,{})&&N.use(N.use()),d&&d.length))for(var _=function(a){D(a.key,a.table),i.$emit("$translateChangeEnd",{language:a.key})},ab=0,bb=d.length;bb>ab;ab++)M[d[ab]]=Q(d[ab]).then(_);return N}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(a){var b,c={},d="default",e=null,f={escaped:function(a){var b={};for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=angular.element("<div></div>").text(a[c]).html());return b}},g=function(a){var b;return b=angular.isFunction(f[e])?f[e](a):a};return c.setLocale=function(a){b=a},c.getInterpolationIdentifier=function(){return d},c.useSanitizeValueStrategy=function(a){return e=a,this},c.interpolate=function(b,c){return e&&(c=g(c)),a(b)(c||{})},c}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function(a,b,c,d,e,f){return{restrict:"AE",scope:!0,compile:function(b,g){var h=g.translateValues?g.translateValues:void 0,i=g.translateInterpolation?g.translateInterpolation:void 0,j=b[0].outerHTML.match(/translate-value-+/i),k="^(.*)("+c.startSymbol()+".*"+c.endSymbol()+")(.*)";return function(b,l,m){if(b.interpolateParams={},b.preText="",b.postText="",m.$observe("translate",function(a){if(angular.equals(a,"")||!angular.isDefined(a)){var d=l.text().match(k);angular.isArray(d)?(b.preText=d[1],b.postText=d[3],b.translationId=c(d[2])(b.$parent)):b.translationId=l.text().replace(/^\s+|\s+$/g,"")}else b.translationId=a}),m.$observe("translateDefault",function(a){b.defaultText=a}),h&&m.$observe("translateValues",function(a){a&&b.$parent.$watch(function(){angular.extend(b.interpolateParams,e(a)(b.$parent))})}),j){var n=function(a){m.$observe(a,function(c){b.interpolateParams[angular.lowercase(a.substr(14,1))+a.substr(15)]=c})};for(var o in m)Object.prototype.hasOwnProperty.call(m,o)&&"translateValue"===o.substr(0,14)&&"translateValues"!==o&&n(o)}var p=function(b,c,e){e||"undefined"==typeof c.defaultText||(b=c.defaultText),l.html(c.preText+b+c.postText);var f=a.isPostCompilingEnabled(),h="undefined"!=typeof g.translateCompile,i=h&&"false"!==g.translateCompile;(f&&!h||i)&&d(l.contents())(c)},q=function(){return h||j?function(){var c=function(){b.translationId&&b.interpolateParams&&a(b.translationId,b.interpolateParams,i).then(function(a){p(a,b,!0)},function(a){p(a,b,!1)})};b.$watch("interpolateParams",c,!0),b.$watch("translationId",c)}:function(){var c=b.$watch("translationId",function(d){b.translationId&&d&&a(d,{},i).then(function(a){p(a,b,!0),c()},function(a){p(a,b,!1),c()})},!0)}}(),r=f.$on("$translateChangeSuccess",q);q(),b.$on("$destroy",r)}}}}]),angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function(a,b){return{compile:function(c){var d=function(){c.addClass(b.cloakClassName())},e=function(){c.removeClass(b.cloakClassName())},f=a.$on("$translateChangeEnd",function(){e(),f(),f=null});return d(),function(a,c,f){f.translateCloak&&f.translateCloak.length&&f.$observe("translateCloak",function(a){b(a).then(e,d)})}}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(a,b){var c=function(c,d,e){return angular.isObject(d)||(d=a(d)(this)),b.instant(c,d,e)};return c.$stateful=!0,c}]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular-animate.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular-animate.min.js new file mode 100644 index 0000000..4502865 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular-animate.min.js @@ -0,0 +1,27 @@ +/* + AngularJS v1.2.13 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(z,f,T){'use strict';f.module("ngAnimate",["ng"]).factory("$$animateReflow",["$window","$timeout","$document",function(f,h,d){var n=f.requestAnimationFrame||f.webkitRequestAnimationFrame||function(d){return h(d,10,!1)},w=f.cancelAnimationFrame||f.webkitCancelAnimationFrame||function(d){return h.cancel(d)};return function(d){var f=n(function(){d()});return function(){w(f)}}}]).factory("$$asyncQueueBuffer",["$timeout",function(f){var h,d=[];return function(n){f.cancel(h);d.push(n);h=f(function(){for(var f= +0;f<d.length;f++)d[f]();d=[]},0,!1)}}]).config(["$provide","$animateProvider",function($,h){function d(d){for(var f=0;f<d.length;f++){var l=d[f];if(l.nodeType==da)return l}}function n(l){return f.element(d(l))}var w=f.noop,D=f.forEach,ia=h.$$selectors,da=1,l="$$ngAnimateState",U="ng-animate",s={running:!0};$.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$$asyncQueueBuffer","$rootScope","$document",function(x,z,ca,F,J,B,T){function V(a){if(a){var c=[],e={};a=a.substr(1).split("."); +(ca.transitions||ca.animations)&&a.push("");for(var A=0;A<a.length;A++){var d=a[A],f=ia[d];f&&!e[d]&&(c.push(z.get(f)),e[d]=!0)}return c}}function t(a,c,e,d,k,C,s){function t(b){var g=e.data(l);b=b||!g||!g.active[c]||m&&g.active[c].event!=a;K();!0===b?G():(g.active[c].done=G,n(L,"after",G))}function n(b,g,ja){"after"==g?H():x();var fa=g+"End";D(b,function(d,f){var A=function(){a:{var a=g+"Complete",c=b[f];c[a]=!0;(c[fa]||w)();for(c=0;c<b.length;c++)if(!b[c][a])break a;ja()}};"before"!=g||"enter"!= +a&&"move"!=a?d[g]?d[fa]=F?d[g](e,E,z,A):m?d[g](e,c,A):d[g](e,A):A():A()})}function h(b){var g="$animate:"+b;u&&(u[g]&&0<u[g].length)&&J(function(){e.triggerHandler(g,{event:a,className:c})})}function x(){h("before")}function H(){h("after")}function B(){h("close");s&&J(function(){s()})}function K(){K.hasBeenRun||(K.hasBeenRun=!0,C())}function G(){if(!G.hasBeenRun){G.hasBeenRun=!0;var b=e.data(l);b&&(m?M(e,c):(J(function(){var b=e.data(l)||{};Q==b.index&&M(e,c,a)}),e.data(l,b)));B()}}var E,z,F="setClass"== +a;F&&(E=c[0],z=c[1],c=E+" "+z);var v,y=e[0];y&&(v=y.className,v=v+" "+c);if(y&&W(v)){var u=f.element._data(y),u=u&&u.events,y=(" "+v).replace(/\s+/g,".");d||(d=k?k.parent():e.parent());var q=V(y),m="addClass"==a||"removeClass"==a||F,I=e.data(l)||{};k=I.active||{};y=I.totalActive||0;v=I.last;if(R(e,d)||0===q.length)K(),x(),H(),G();else{var L=[];m&&(I.disabled||v&&!v.classBased)||D(q,function(b){if(!b.allowCancel||b.allowCancel(e,a,c)){var g=b[a];"leave"==a?(b=g,g=null):b=b["before"+a.charAt(0).toUpperCase()+ +a.substr(1)];L.push({before:b,after:g})}});if(0===L.length)K(),x(),H(),B();else{d=!1;if(0<y){q=[];if(m)"setClass"==v.event?(q.push(v),M(e,c)):k[c]&&(N=k[c],N.event==a?d=!0:(q.push(N),M(e,c)));else if("leave"==a&&k["ng-leave"])d=!0;else{for(var N in k)q.push(k[N]),M(e,N);k={};y=0}0<q.length&&f.forEach(q,function(b){(b.done||w)(!0);X(b.animations)})}!m||(F||d)||(d="addClass"==a==e.hasClass(c));if(d)x(),H(),B();else{e.addClass(U);var Q=S++;v={classBased:m,event:a,animations:L,done:t};y++;k[c]=v;e.data(l, +{last:v,active:k,index:Q,totalActive:y});n(L,"before",t)}}}}else K(),x(),H(),B()}function Y(a){a=d(a);D(a.querySelectorAll("."+U),function(a){a=f.element(a);(a=a.data(l))&&a.active&&f.forEach(a.active,function(a){(a.done||w)(!0);X(a.animations)})})}function X(a){D(a,function(a){a.beforeComplete||(a.beforeEnd||w)(!0);a.afterComplete||(a.afterEnd||w)(!0)})}function M(a,c){if(d(a)==d(F))s.disabled||(s.running=!1,s.structural=!1);else if(c){var e=a.data(l)||{},f=!0===c;!f&&(e.active&&e.active[c])&&(e.totalActive--, +delete e.active[c]);if(f||!e.totalActive)a.removeClass(U),a.removeData(l)}}function R(a,c){if(s.disabled)return!0;if(d(a)==d(F))return s.disabled||s.running;do{if(0===c.length)break;var e=d(c)==d(F),f=e?s:c.data(l),f=f&&(!!f.disabled||f.running||0<f.totalActive);if(e||f)return f;if(e)break}while(c=c.parent());return!0}var S=0;F.data(l,s);B.$$postDigest(function(){B.$$postDigest(function(){s.running=!1})});var Z=h.classNameFilter(),W=Z?function(a){return Z.test(a)}:function(){return!0};return{enter:function(a, +c,e,d){this.enabled(!1,a);x.enter(a,c,e);B.$$postDigest(function(){a=n(a);t("enter","ng-enter",a,c,e,w,d)})},leave:function(a,c){Y(a);this.enabled(!1,a);B.$$postDigest(function(){a=n(a);t("leave","ng-leave",a,null,null,function(){x.leave(a)},c)})},move:function(a,c,e,d){Y(a);this.enabled(!1,a);x.move(a,c,e);B.$$postDigest(function(){a=n(a);t("move","ng-move",a,c,e,w,d)})},addClass:function(a,c,d){a=n(a);t("addClass",c,a,null,null,function(){x.addClass(a,c)},d)},removeClass:function(a,c,d){a=n(a); +t("removeClass",c,a,null,null,function(){x.removeClass(a,c)},d)},setClass:function(a,c,d,f){a=n(a);t("setClass",[c,d],a,null,null,function(){x.setClass(a,c,d)},f)},enabled:function(a,c){switch(arguments.length){case 2:if(a)M(c);else{var d=c.data(l)||{};d.disabled=!0;c.data(l,d)}break;case 1:s.disabled=!a;break;default:a=!s.disabled}return!!a}}}]);h.register("",["$window","$sniffer","$timeout","$$animateReflow",function(l,s,h,n){function J(b,g){I&&I();m.push(g);I=n(function(){D(m,function(b){b()}); +m=[];I=null;u={}})}function B(b,g){var a=Date.now()+1E3*g;if(!(a<=N)){h.cancel(L);var c=d(b);b=f.element(c);Q.push(b);N=a;L=h(function(){U(Q);Q=[]},g,!1)}}function U(b){D(b,function(b){(b=b.data(E))&&(b.closeAnimationFn||w)()})}function V(b,g){var a=g?u[g]:null;if(!a){var c=0,d=0,f=0,e=0,k,p,r,h;D(b,function(b){if(b.nodeType==da){b=l.getComputedStyle(b)||{};r=b[O+ea];c=Math.max(t(r),c);h=b[O+H];k=b[O+ha];d=Math.max(t(k),d);p=b[P+ha];e=Math.max(t(p),e);var g=t(b[P+ea]);0<g&&(g*=parseInt(b[P+K],10)|| +1);f=Math.max(g,f)}});a={total:0,transitionPropertyStyle:h,transitionDurationStyle:r,transitionDelayStyle:k,transitionDelay:d,transitionDuration:c,animationDelayStyle:p,animationDelay:e,animationDuration:f};g&&(u[g]=a)}return a}function t(b){var g=0;b=f.isString(b)?b.split(/\s*,\s*/):[];D(b,function(b){g=Math.max(parseFloat(b)||0,g)});return g}function Y(b){var g=b.parent(),a=g.data(G);a||(g.data(G,++q),a=q);return a+"-"+d(b).className}function X(b,g,a,c){var e=Y(g),k=e+" "+a,l=u[k]?++u[k].total: +0,h={};if(0<l){var p=a+"-stagger",h=e+" "+p;(e=!u[h])&&g.addClass(p);h=V(g,h);e&&g.removeClass(p)}c=c||function(b){return b()};g.addClass(a);var p=g.data(E)||{},r=c(function(){return V(g,k)});c=r.transitionDuration;e=r.animationDuration;if(0===c&&0===e)return g.removeClass(a),!1;g.data(E,{running:p.running||0,itemIndex:l,stagger:h,timings:r,closeAnimationFn:f.noop});b=0<p.running||"setClass"==b;0<c&&M(g,a,b);0<e&&(d(g).style[P]="none 0s");return!0}function M(b,a,c){"ng-enter"!=a&&("ng-move"!=a&&"ng-leave"!= +a)&&c?b.addClass(ga):d(b).style[O+H]="none"}function R(b,a){var c=O+H,e=d(b);e.style[c]&&0<e.style[c].length&&(e.style[c]="");b.removeClass(ga)}function S(b){var a=P;b=d(b);b.style[a]&&0<b.style[a].length&&(b.style[a]="")}function Z(b,a,c,e){function f(b){a.off(w,k);a.removeClass(l);A(a,c);b=d(a);for(var e in q)b.style.removeProperty(q[e])}function k(b){b.stopPropagation();var a=b.originalEvent||b;b=a.$manualTimeStamp||a.timeStamp||Date.now();a=parseFloat(a.elapsedTime.toFixed($));Math.max(b-x,0)>= +u&&a>=s&&e()}var h=d(a);b=a.data(E);if(-1!=h.className.indexOf(c)&&b){var l="";D(c.split(" "),function(b,a){l+=(0<a?" ":"")+b+"-active"});var p=b.stagger,r=b.timings,n=b.itemIndex,s=Math.max(r.transitionDuration,r.animationDuration),t=Math.max(r.transitionDelay,r.animationDelay),u=t*y,x=Date.now(),w=ba+" "+aa,m="",q=[];if(0<r.transitionDuration){var z=r.transitionPropertyStyle;-1==z.indexOf("all")&&(m+=C+"transition-property: "+z+";",m+=C+"transition-duration: "+r.transitionDurationStyle+";",q.push(C+ +"transition-property"),q.push(C+"transition-duration"))}0<n&&(0<p.transitionDelay&&0===p.transitionDuration&&(m+=C+"transition-delay: "+W(r.transitionDelayStyle,p.transitionDelay,n)+"; ",q.push(C+"transition-delay")),0<p.animationDelay&&0===p.animationDuration&&(m+=C+"animation-delay: "+W(r.animationDelayStyle,p.animationDelay,n)+"; ",q.push(C+"animation-delay")));0<q.length&&(r=h.getAttribute("style")||"",h.setAttribute("style",r+" "+m));a.on(w,k);a.addClass(l);b.closeAnimationFn=function(){f(); +e()};h=(n*(Math.max(p.animationDelay,p.transitionDelay)||0)+(t+s)*v)*y;b.running++;B(a,h);return f}e()}function W(b,a,c){var d="";D(b.split(","),function(b,e){d+=(0<e?",":"")+(c*a+parseInt(b,10))+"s"});return d}function a(b,a,c,d){if(X(b,a,c,d))return function(b){b&&A(a,c)}}function c(b,a,c,d){if(a.data(E))return Z(b,a,c,d);A(a,c);d()}function e(b,g,d,e){var f=a(b,g,d);if(f){var h=f;J(g,function(){R(g,d);S(g);h=c(b,g,d,e)});return function(b){(h||w)(b)}}e()}function A(b,a){b.removeClass(a);var c= +b.data(E);c&&(c.running&&c.running--,c.running&&0!==c.running||b.removeData(E))}function k(b,a){var c="";b=f.isArray(b)?b:b.split(/\s+/);D(b,function(b,d){b&&0<b.length&&(c+=(0<d?" ":"")+b+a)});return c}var C="",O,aa,P,ba;z.ontransitionend===T&&z.onwebkittransitionend!==T?(C="-webkit-",O="WebkitTransition",aa="webkitTransitionEnd transitionend"):(O="transition",aa="transitionend");z.onanimationend===T&&z.onwebkitanimationend!==T?(C="-webkit-",P="WebkitAnimation",ba="webkitAnimationEnd animationend"): +(P="animation",ba="animationend");var ea="Duration",H="Property",ha="Delay",K="IterationCount",G="$$ngAnimateKey",E="$$ngAnimateCSS3Data",ga="ng-animate-block-transitions",$=3,v=1.5,y=1E3,u={},q=0,m=[],I,L=null,N=0,Q=[];return{enter:function(b,a){return e("enter",b,"ng-enter",a)},leave:function(b,a){return e("leave",b,"ng-leave",a)},move:function(a,c){return e("move",a,"ng-move",c)},beforeSetClass:function(b,c,d,e){var f=k(d,"-remove")+" "+k(c,"-add"),h=a("setClass",b,f,function(a){var e=b.attr("class"); +b.removeClass(d);b.addClass(c);a=a();b.attr("class",e);return a});if(h)return J(b,function(){R(b,f);S(b);e()}),h;e()},beforeAddClass:function(b,c,d){var e=a("addClass",b,k(c,"-add"),function(a){b.addClass(c);a=a();b.removeClass(c);return a});if(e)return J(b,function(){R(b,c);S(b);d()}),e;d()},setClass:function(a,d,e,f){e=k(e,"-remove");d=k(d,"-add");return c("setClass",a,e+" "+d,f)},addClass:function(a,d,e){return c("addClass",a,k(d,"-add"),e)},beforeRemoveClass:function(b,c,d){var e=a("removeClass", +b,k(c,"-remove"),function(a){var d=b.attr("class");b.removeClass(c);a=a();b.attr("class",d);return a});if(e)return J(b,function(){R(b,c);S(b);d()}),e;d()},removeClass:function(a,d,e){return c("removeClass",a,k(d,"-remove"),e)}}}])}])})(window,window.angular); +//# sourceMappingURL=angular-animate.min.js.map diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular.min.js new file mode 100644 index 0000000..8e7bb50 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/angular_1.2.13/angular.min.js @@ -0,0 +1,204 @@ +/* + AngularJS v1.2.13 + (c) 2010-2014 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(C,T,s){'use strict';function E(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.13/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function vb(b){if(null==b||za(b))return!1; +var a=b.length;return 1===b.nodeType&&a?!0:D(b)||H(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function r(b,a,c){var d;if(b)if(N(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(b.forEach&&b.forEach!==r)b.forEach(a,c);else if(vb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Qb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Qc(b, +a,c){for(var d=Qb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Rb(b){return function(a,c){b(c,a)}}function $a(){for(var b=ja.length,a;b;){b--;a=ja[b].charCodeAt(0);if(57==a)return ja[b]="A",ja.join("");if(90==a)ja[b]="0";else return ja[b]=String.fromCharCode(a+1),ja.join("")}ja.unshift("0");return ja.join("")}function Sb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function t(b){var a=b.$$hashKey;r(arguments,function(a){a!==b&&r(a,function(a,c){b[c]=a})});Sb(b,a);return b}function Q(b){return parseInt(b, +10)}function Tb(b,a){return t(new (t(function(){},{prototype:b})),a)}function w(){}function Aa(b){return b}function aa(b){return function(){return b}}function x(b){return"undefined"===typeof b}function v(b){return"undefined"!==typeof b}function Z(b){return null!=b&&"object"===typeof b}function D(b){return"string"===typeof b}function wb(b){return"number"===typeof b}function La(b){return"[object Date]"===Ma.call(b)}function H(b){return"[object Array]"===Ma.call(b)}function N(b){return"function"===typeof b} +function ab(b){return"[object RegExp]"===Ma.call(b)}function za(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Rc(b){return!(!b||!(b.nodeName||b.on&&b.find))}function Sc(b,a,c){var d=[];r(b,function(b,f,g){d.push(a.call(c,b,f,g))});return d}function bb(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Na(b,a){var c=bb(b,a);0<=c&&b.splice(c,1);return a}function ca(b,a){if(za(b)||b&&b.$evalAsync&&b.$watch)throw Oa("cpws");if(a){if(b=== +a)throw Oa("cpi");if(H(b))for(var c=a.length=0;c<b.length;c++)a.push(ca(b[c]));else{c=a.$$hashKey;r(a,function(b,c){delete a[c]});for(var d in b)a[d]=ca(b[d]);Sb(a,c)}}else(a=b)&&(H(b)?a=ca(b,[]):La(b)?a=new Date(b.getTime()):ab(b)?a=RegExp(b.source):Z(b)&&(a=ca(b,{})));return a}function Ub(b,a){a=a||{};for(var c in b)!b.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(a[c]=b[c]);return a}function ta(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b, +d;if(c==typeof a&&"object"==c)if(H(b)){if(!H(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ta(b[d],a[d]))return!1;return!0}}else{if(La(b))return La(a)&&b.getTime()==a.getTime();if(ab(b)&&ab(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||za(b)||za(a)||H(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!N(b[d])){if(!ta(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==s&&!N(a[d]))return!1;return!0}return!1} +function Vb(){return T.securityPolicy&&T.securityPolicy.isActive||T.querySelector&&!(!T.querySelector("[ng-csp]")&&!T.querySelector("[data-ng-csp]"))}function cb(b,a){var c=2<arguments.length?ua.call(arguments,2):[];return!N(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(ua.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Tc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=s:za(a)?c="$WINDOW": +a&&T===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function oa(b,a){return"undefined"===typeof b?s:JSON.stringify(b,Tc,a?" ":null)}function Wb(b){return D(b)?JSON.parse(b):b}function Pa(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=O(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function ga(b){b=z(b).clone();try{b.empty()}catch(a){}var c=z("<div>").append(b).html();try{return 3===b[0].nodeType?O(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/, +function(a,b){return"<"+O(b)})}catch(d){return O(c)}}function Xb(b){try{return decodeURIComponent(b)}catch(a){}}function Yb(b){var a={},c,d;r((b||"").split("&"),function(b){b&&(c=b.split("="),d=Xb(c[0]),v(d)&&(b=v(c[1])?Xb(c[1]):!0,a[d]?H(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Zb(b){var a=[];r(b,function(b,d){H(b)?r(b,function(b){a.push(va(d,!0)+(!0===b?"":"="+va(b,!0)))}):a.push(va(d,!0)+(!0===b?"":"="+va(b,!0)))});return a.length?a.join("&"):""}function xb(b){return va(b, +!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function va(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Uc(b,a){function c(a){a&&d.push(a)}var d=[b],e,f,g=["ng:app","ng-app","x-ng-app","data-ng-app"],h=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(g,function(a){g[a]=!0;c(T.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(r(b.querySelectorAll("."+a),c),r(b.querySelectorAll("."+ +a+"\\:"),c),r(b.querySelectorAll("["+a+"]"),c))});r(d,function(a){if(!e){var b=h.exec(" "+a.className+" ");b?(e=a,f=(b[2]||"").replace(/\s+/g,",")):r(a.attributes,function(b){!e&&g[b.name]&&(e=a,f=b.value)})}});e&&a(e,f?[f]:[])}function $b(b,a){var c=function(){b=z(b);if(b.injector()){var c=b[0]===T?"document":ga(b);throw Oa("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=ac(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate", +function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(C&&!d.test(C.name))return c();C.name=C.name.replace(d,"");Ba.resumeBootstrap=function(b){r(b,function(b){a.push(b)});c()}}function db(b,a){a=a||"_";return b.replace(Vc,function(b,d){return(d?a:"")+b.toLowerCase()})}function yb(b,a,c){if(!b)throw Oa("areq",a||"?",c||"required");return b}function Qa(b,a,c){c&&H(b)&&(b=b[b.length-1]);yb(N(b),a,"not a function, got "+(b&&"object"==typeof b? +b.constructor.name||"Object":typeof b));return b}function wa(b,a){if("hasOwnProperty"===b)throw Oa("badname",a);}function bc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,g=0;g<f;g++)d=a[g],b&&(b=(e=b)[d]);return!c&&N(b)?cb(e,b):b}function zb(b){var a=b[0];b=b[b.length-1];if(a===b)return z(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return z(c)}function Wc(b){var a=E("$injector"),c=E("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||E;return b.module|| +(b.module=function(){var b={};return function(e,f,g){if("hasOwnProperty"===e)throw c("badname","module");f&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return m}}if(!f)throw a("nomod",e);var c=[],d=[],l=b("$injector","invoke"),m={_invokeQueue:c,_runBlocks:d,requires:f,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide", +"constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};g&&l(g);return m}())}}())}function Ra(b){return b.replace(Xc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(Yc,"Moz$1")}function Ab(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],n=a,k,l,m,p,q,A;if(!d||null!=b)for(;e.length;)for(k=e.shift(), +l=0,m=k.length;l<m;l++)for(p=z(k[l]),n?p.triggerHandler("$destroy"):n=!n,q=0,p=(A=p.children()).length;q<p;q++)e.push(Ca(A[q]));return f.apply(this,arguments)}var f=Ca.fn[b],f=f.$original||f;e.$original=f;Ca.fn[b]=e}function R(b){if(b instanceof R)return b;D(b)&&(b=da(b));if(!(this instanceof R)){if(D(b)&&"<"!=b.charAt(0))throw Bb("nosel");return new R(b)}if(D(b)){var a=T.createElement("div");a.innerHTML="<div> </div>"+b;a.removeChild(a.firstChild);Cb(this,a.childNodes);z(T.createDocumentFragment()).append(this)}else Cb(this, +b)}function Db(b){return b.cloneNode(!0)}function Da(b){cc(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Da(b[a])}function dc(b,a,c,d){if(v(d))throw Bb("offargs");var e=ka(b,"events");ka(b,"handle")&&(x(a)?r(e,function(a,c){Eb(b,c,a);delete e[c]}):r(a.split(" "),function(a){x(c)?(Eb(b,a,e[a]),delete e[a]):Na(e[a]||[],c)}))}function cc(b,a){var c=b[eb],d=Sa[c];d&&(a?delete Sa[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),dc(b)),delete Sa[c],b[eb]=s))}function ka(b,a,c){var d= +b[eb],d=Sa[d||-1];if(v(c))d||(b[eb]=d=++Zc,d=Sa[d]={}),d[a]=c;else return d&&d[a]}function ec(b,a,c){var d=ka(b,"data"),e=v(c),f=!e&&v(a),g=f&&!Z(a);d||g||ka(b,"data",d={});if(e)d[a]=c;else if(f){if(g)return d&&d[a];t(d,a)}else return d}function Fb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function fb(b,a){a&&b.setAttribute&&r(a.split(" "),function(a){b.setAttribute("class",da((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g, +" ").replace(" "+da(a)+" "," ")))})}function gb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(a.split(" "),function(a){a=da(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",da(c))}}function Cb(b,a){if(a){a=a.nodeName||!v(a.length)||za(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function fc(b,a){return hb(b,"$"+(a||"ngController")+"Controller")}function hb(b,a,c){b=z(b);9==b[0].nodeType&&(b=b.find("html"));for(a=H(a)?a:[a];b.length;){for(var d= +0,e=a.length;d<e;d++)if((c=b.data(a[d]))!==s)return c;b=b.parent()}}function gc(b){for(var a=0,c=b.childNodes;a<c.length;a++)Da(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function hc(b,a){var c=ib[a.toLowerCase()];return c&&ic[b.nodeName]&&c}function $c(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||T);if(x(c.defaultPrevented)){var f=c.preventDefault; +c.preventDefault=function(){c.defaultPrevented=!0;f.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};var g=Ub(a[e||c.type]||[]);r(g,function(a){a.call(b,c)});8>=P?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ea(b){var a=typeof b,c;"object"==a&&null!==b?"function"==typeof(c=b.$$hashKey)?c=b.$$hashKey():c=== +s&&(c=b.$$hashKey=$a()):c=b;return a+":"+c}function Ta(b){r(b,this.put,this)}function jc(b){var a,c;"function"==typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(ad,""),c=c.match(bd),r(c[1].split(cd),function(b){b.replace(dd,function(b,c,d){a.push(d)})})),b.$inject=a):H(b)?(c=b.length-1,Qa(b[c],"fn"),a=b.slice(0,c)):Qa(b,"fn",!0);return a}function ac(b){function a(a){return function(b,c){if(Z(b))r(b,Rb(a));else return a(b,c)}}function c(a,b){wa(a,"service");if(N(b)||H(b))b=m.instantiate(b); +if(!b.$get)throw Ua("pget",a);return l[a+h]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,f,h;r(a,function(a){if(!k.get(a)){k.put(a,!0);try{if(D(a))for(c=Va(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,f=0,h=d.length;f<h;f++){var g=d[f],n=m.get(g[0]);n[g[1]].apply(n,g[2])}else N(a)?b.push(m.invoke(a)):H(a)?b.push(m.invoke(a)):Qa(a,"module")}catch(q){throw H(a)&&(a=a[a.length-1]),q.message&&(q.stack&&-1==q.stack.indexOf(q.message))&&(q=q.message+"\n"+q.stack), +Ua("modulerr",a,q.stack||q.message||q);}}});return b}function f(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===g)throw Ua("cdep",n.join(" <- "));return a[d]}try{return n.unshift(d),a[d]=g,a[d]=b(d)}catch(e){throw a[d]===g&&delete a[d],e;}finally{n.shift()}}function d(a,b,e){var f=[],h=jc(a),g,n,k;n=0;for(g=h.length;n<g;n++){k=h[n];if("string"!==typeof k)throw Ua("itkn",k);f.push(e&&e.hasOwnProperty(k)?e[k]:c(k))}a.$inject||(a=a[g]);return a.apply(b,f)}return{invoke:d,instantiate:function(a, +b){var c=function(){},e;c.prototype=(H(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return Z(e)||N(e)?e:c},get:c,annotate:jc,has:function(b){return l.hasOwnProperty(b+h)||a.hasOwnProperty(b)}}}var g={},h="Provider",n=[],k=new Ta,l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,aa(b))}),constant:a(function(a,b){wa(a,"constant");l[a]=b;p[a]=b}),decorator:function(a,b){var c=m.get(a+h), +d=c.$get;c.$get=function(){var a=q.invoke(d,c);return q.invoke(b,null,{$delegate:a})}}}},m=l.$injector=f(l,function(){throw Ua("unpr",n.join(" <- "));}),p={},q=p.$injector=f(p,function(a){a=m.get(a+h);return q.invoke(a.$get,a)});r(e(b),function(a){q.invoke(a||w)});return q}function ed(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;r(a,function(a){b||"a"!==O(a.nodeName)||(b=a)});return b}function f(){var b= +c.hash(),d;b?(d=g.getElementById(b))?d.scrollIntoView():(d=e(g.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var g=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(f)});return f}]}function fd(b,a,c,d){function e(a){try{a.apply(null,ua.call(arguments,1))}finally{if(A--,0===A)for(;B.length;)try{B.pop()()}catch(b){c.error(b)}}}function f(a,b){(function kb(){r(I,function(a){a()});u=b(kb,a)})()}function g(){y=null;G!=h.url()&&(G=h.url(), +r(Y,function(a){a(h.url())}))}var h=this,n=a[0],k=b.location,l=b.history,m=b.setTimeout,p=b.clearTimeout,q={};h.isMock=!1;var A=0,B=[];h.$$completeOutstandingRequest=e;h.$$incOutstandingRequestCount=function(){A++};h.notifyWhenNoOutstandingRequests=function(a){r(I,function(a){a()});0===A?a():B.push(a)};var I=[],u;h.addPollFn=function(a){x(u)&&f(100,m);I.push(a);return a};var G=k.href,W=a.find("base"),y=null;h.url=function(a,c){k!==b.location&&(k=b.location);l!==b.history&&(l=b.history);if(a){if(G!= +a)return G=a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),W.attr("href",W.attr("href"))):(y=a,c?k.replace(a):k.href=a),h}else return y||k.href.replace(/%27/g,"'")};var Y=[],S=!1;h.onUrlChange=function(a){if(!S){if(d.history)z(b).on("popstate",g);if(d.hashchange)z(b).on("hashchange",g);else h.addPollFn(g);S=!0}Y.push(a);return a};h.baseHref=function(){var a=W.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var L={},ba="",U=h.baseHref();h.cookies=function(a,b){var d, +e,f,h;if(a)b===s?n.cookie=escape(a)+"=;path="+U+";expires=Thu, 01 Jan 1970 00:00:00 GMT":D(b)&&(d=(n.cookie=escape(a)+"="+escape(b)+";path="+U).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(n.cookie!==ba)for(ba=n.cookie,d=ba.split("; "),L={},f=0;f<d.length;f++)e=d[f],h=e.indexOf("="),0<h&&(a=unescape(e.substring(0,h)),L[a]===s&&(L[a]=unescape(e.substring(h+1))));return L}};h.defer=function(a,b){var c;A++;c=m(function(){delete q[c]; +e(a)},b||0);q[c]=!0;return c};h.defer.cancel=function(a){return q[a]?(delete q[a],p(a),e(w),!0):!1}}function gd(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new fd(b,d,a,c)}]}function hd(){this.$get=function(){function b(b,d){function e(a){a!=m&&(p?p==a&&(p=a.n):p=a,f(a.n,a.p),f(a,m),m=a,m.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw E("$cacheFactory")("iid",b);var g=0,h=t({},d,{id:b}),n={},k=d&&d.capacity||Number.MAX_VALUE,l={},m=null,p=null; +return a[b]={put:function(a,b){var c=l[a]||(l[a]={key:a});e(c);if(!x(b))return a in n||g++,n[a]=b,g>k&&this.remove(p.key),b},get:function(a){var b=l[a];if(b)return e(b),n[a]},remove:function(a){var b=l[a];b&&(b==m&&(m=b.p),b==p&&(p=b.n),f(b.n,b.p),delete l[a],delete n[a],g--)},removeAll:function(){n={};g=0;l={};m=p=null},destroy:function(){l=h=n=null;delete a[b]},info:function(){return t({},h,{size:g})}}}var a={};b.info=function(){var b={};r(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]}; +return b}}function id(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function kc(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,f=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g=/^<\s*(tr|th|td|tbody)(\s+[^>]*)?>/i,h=/^(on[a-z]+|formaction)$/;this.directive=function k(a,e){wa(a,"directive");D(a)?(yb(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];r(c[a],function(c,f){try{var h=b.invoke(c);N(h)?h= +{compile:aa(h)}:!h.compile&&h.link&&(h.compile=aa(h.link));h.priority=h.priority||0;h.index=f;h.name=h.name||a;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"A";e.push(h)}catch(g){d(g)}});return e}])),c[a].push(e)):r(a,Rb(k));return this};this.aHrefSanitizationWhitelist=function(b){return v(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return v(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()}; +this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,m,p,q,A,B,I,u,G,W,y){function Y(a,b,c,d,e){a instanceof z||(a=z(a));r(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=z(b).wrap("<span></span>").parent()[0])});var f=L(a,b,a,c,d,e);S(a,"ng-scope");return function(b,c,d){yb(b,"scope");var e=c?Fa.clone.call(a):a;r(d,function(a,b){e.data("$"+b+"Controller",a)}); +d=0;for(var h=e.length;d<h;d++){var g=e[d].nodeType;1!==g&&9!==g||e.eq(d).data("$scope",b)}c&&c(e,b);f&&f(b,e,e);return e}}function S(a,b){try{a.addClass(b)}catch(c){}}function L(a,b,c,d,e,f){function h(a,c,d,e){var f,k,q,l,m,p,K;f=c.length;var A=Array(f);for(m=0;m<f;m++)A[m]=c[m];K=m=0;for(p=g.length;m<p;K++)k=A[K],c=g[m++],f=g[m++],q=z(k),c?(c.scope?(l=a.$new(),q.data("$scope",l)):l=a,(q=c.transclude)||!e&&b?c(f,l,k,d,ba(a,q||b)):c(f,l,k,d,e)):f&&f(a,k.childNodes,s,e)}for(var g=[],k,q,l,m,p=0;p< +a.length;p++)k=new Gb,q=U(a[p],[],k,0===p?d:s,e),(f=q.length?Wa(q,a[p],k,b,c,null,[],[],f):null)&&f.scope&&S(z(a[p]),"ng-scope"),k=f&&f.terminal||!(l=a[p].childNodes)||!l.length?null:L(l,f?f.transclude:b),g.push(f,k),m=m||f||k,f=null;return m?h:null}function ba(a,b){return function(c,d,e){var f=!1;c||(c=a.$new(),f=c.$$transcluded=!0);d=b(c,d,e);if(f)d.on("$destroy",cb(c,c.$destroy));return d}}function U(a,b,c,d,h){var g=c.$attr,k;switch(a.nodeType){case 1:v(b,la(Ga(a).toLowerCase()),"E",d,h);var q, +l,m;k=a.attributes;for(var p=0,A=k&&k.length;p<A;p++){var B=!1,G=!1;q=k[p];if(!P||8<=P||q.specified){l=q.name;m=la(l);pa.test(m)&&(l=db(m.substr(6),"-"));var I=m.replace(/(Start|End)$/,"");m===I+"Start"&&(B=l,G=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));m=la(l.toLowerCase());g[m]=l;c[m]=q=da(q.value);hc(a,m)&&(c[m]=!0);ha(a,b,q,m);v(b,m,"A",d,h,B,G)}}a=a.className;if(D(a)&&""!==a)for(;k=f.exec(a);)m=la(k[2]),v(b,m,"C",d,h)&&(c[m]=da(k[3])),a=a.substr(k.index+k[0].length);break;case 3:C(b, +a.nodeValue);break;case 8:try{if(k=e.exec(a.nodeValue))m=la(k[1]),v(b,m,"M",d,h)&&(c[m]=da(k[2]))}catch(y){}}b.sort(E);return b}function M(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ia("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return z(d)}function jb(a,b,c){return function(d,e,f,h,g){e=M(e[0],b,c);return a(d,e,f,h,g)}}function Wa(a,c,d,e,f,h,g,k,q){function p(a,b,c,d){if(a){c&& +(a=jb(a,c,d));a.require=F.require;if(L===F||F.$$isolateScope)a=lc(a,{isolateScope:!0});g.push(a)}if(b){c&&(b=jb(b,c,d));b.require=F.require;if(L===F||F.$$isolateScope)b=lc(b,{isolateScope:!0});k.push(b)}}function G(a,b,c){var d,e="data",f=!1;if(D(a)){for(;"^"==(d=a.charAt(0))||"?"==d;)a=a.substr(1),"^"==d&&(e="inheritedData"),f=f||"?"==d;d=null;c&&"data"===e&&(d=c[a]);d=d||b[e]("$"+a+"Controller");if(!d&&!f)throw ia("ctreq",a,ha);}else H(a)&&(d=[],r(a,function(a){d.push(G(a,b,c))}));return d}function I(a, +e,f,h,q){function p(a,b){var c;2>arguments.length&&(b=a,a=s);Ha&&(c=lb);return q(a,b,c)}var K,y,u,Y,M,U,lb={},v;K=c===f?d:Ub(d,new Gb(z(f),d.$attr));y=K.$$element;if(L){var t=/^\s*([@=&])(\??)\s*(\w*)\s*$/;h=z(f);U=e.$new(!0);ba&&ba===L.$$originalDirective?h.data("$isolateScope",U):h.data("$isolateScopeNoTemplate",U);S(h,"ng-isolate-scope");r(L.scope,function(a,c){var d=a.match(t)||[],f=d[3]||c,h="?"==d[2],d=d[1],g,k,q,m;U.$$isolateBindings[c]=d+f;switch(d){case "@":K.$observe(f,function(a){U[c]= +a});K.$$observers[f].$$scope=e;K[f]&&(U[c]=b(K[f])(e));break;case "=":if(h&&!K[f])break;k=A(K[f]);m=k.literal?ta:function(a,b){return a===b};q=k.assign||function(){g=U[c]=k(e);throw ia("nonassign",K[f],L.name);};g=U[c]=k(e);U.$watch(function(){var a=k(e);m(a,U[c])||(m(a,g)?q(e,a=U[c]):U[c]=a);return g=a},null,k.literal);break;case "&":k=A(K[f]);U[c]=function(a){return k(e,a)};break;default:throw ia("iscp",L.name,c,a);}})}v=q&&p;W&&r(W,function(a){var b={$scope:a===L||a.$$isolateScope?U:e,$element:y, +$attrs:K,$transclude:v},c;M=a.controller;"@"==M&&(M=K[a.name]);c=B(M,b);lb[a.name]=c;Ha||y.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});h=0;for(u=g.length;h<u;h++)try{Y=g[h],Y(Y.isolateScope?U:e,y,K,Y.require&&G(Y.require,y,lb),v)}catch(J){m(J,ga(y))}h=e;L&&(L.template||null===L.templateUrl)&&(h=U);a&&a(h,f.childNodes,s,q);for(h=k.length-1;0<=h;h--)try{Y=k[h],Y(Y.isolateScope?U:e,y,K,Y.require&&G(Y.require,y,lb),v)}catch(jb){m(jb,ga(y))}}q=q||{};for(var y=-Number.MAX_VALUE, +u,W=q.controllerDirectives,L=q.newIsolateScopeDirective,ba=q.templateDirective,v=q.nonTlbTranscludeDirective,Wa=!1,Ha=q.hasElementTranscludeDirective,J=d.$$element=z(c),F,ha,t,E=e,pa,C=0,P=a.length;C<P;C++){F=a[C];var Q=F.$$start,V=F.$$end;Q&&(J=M(c,Q,V));t=s;if(y>F.priority)break;if(t=F.scope)u=u||F,F.templateUrl||(R("new/isolated scope",L,F,J),Z(t)&&(L=F));ha=F.name;!F.templateUrl&&F.controller&&(t=F.controller,W=W||{},R("'"+ha+"' controller",W[ha],F,J),W[ha]=F);if(t=F.transclude)Wa=!0,F.$$tlb|| +(R("transclusion",v,F,J),v=F),"element"==t?(Ha=!0,y=F.priority,t=M(c,Q,V),J=d.$$element=z(T.createComment(" "+ha+": "+d[ha]+" ")),c=J[0],mb(f,z(ua.call(t,0)),c),E=Y(t,e,y,h&&h.name,{nonTlbTranscludeDirective:v})):(t=z(Db(c)).contents(),J.empty(),E=Y(t,e));if(F.template)if(R("template",ba,F,J),ba=F,t=N(F.template)?F.template(J,d):F.template,t=X(t),F.replace){h=F;t=x(t);c=t[0];if(1!=t.length||1!==c.nodeType)throw ia("tplrt",ha,"");mb(f,J,c);P={$attr:{}};t=U(c,[],P);var $=a.splice(C+1,a.length-(C+1)); +L&&kb(t);a=a.concat(t).concat($);w(d,P);P=a.length}else J.html(t);if(F.templateUrl)R("template",ba,F,J),ba=F,F.replace&&(h=F),I=O(a.splice(C,a.length-C),J,d,f,E,g,k,{controllerDirectives:W,newIsolateScopeDirective:L,templateDirective:ba,nonTlbTranscludeDirective:v}),P=a.length;else if(F.compile)try{pa=F.compile(J,d,E),N(pa)?p(null,pa,Q,V):pa&&p(pa.pre,pa.post,Q,V)}catch(aa){m(aa,ga(J))}F.terminal&&(I.terminal=!0,y=Math.max(y,F.priority))}I.scope=u&&!0===u.scope;I.transclude=Wa&&E;q.hasElementTranscludeDirective= +Ha;return I}function kb(a){for(var b=0,c=a.length;b<c;b++)a[b]=Tb(a[b],{$$isolateScope:!0})}function v(b,e,f,h,g,q,l){if(e===g)return null;g=null;if(c.hasOwnProperty(e)){var p;e=a.get(e+d);for(var A=0,G=e.length;A<G;A++)try{p=e[A],(h===s||h>p.priority)&&-1!=p.restrict.indexOf(f)&&(q&&(p=Tb(p,{$$start:q,$$end:l})),b.push(p),g=p)}catch(B){m(B)}}return g}function w(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;r(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}); +r(b,function(b,f){"class"==f?(S(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function x(a){var b;a=da(a);if(b=g.exec(a)){b=b[1].toLowerCase();a=z("<table>"+a+"</table>");var c=a.children("tbody"),d=/(td|th)/.test(b)&&a.find("tr");c.length&&"tbody"!==b&&(a=c);d&&d.length&&(a=d);return a.contents()}return z("<div>"+a+"</div>").contents()}function O(a, +b,c,d,e,f,h,g){var k=[],l,m,A=b[0],B=a.shift(),y=t({},B,{templateUrl:null,transclude:null,replace:null,$$originalDirective:B}),I=N(B.templateUrl)?B.templateUrl(b,c):B.templateUrl;b.empty();p.get(G.getTrustedResourceUrl(I),{cache:q}).success(function(q){var p,G;q=X(q);if(B.replace){q=x(q);p=q[0];if(1!=q.length||1!==p.nodeType)throw ia("tplrt",B.name,I);q={$attr:{}};mb(d,b,p);var u=U(p,[],q);Z(B.scope)&&kb(u);a=u.concat(a);w(c,q)}else p=A,b.html(q);a.unshift(y);l=Wa(a,p,c,e,b,B,f,h,g);r(d,function(a, +c){a==p&&(d[c]=b[0])});for(m=L(b[0].childNodes,e);k.length;){q=k.shift();G=k.shift();var W=k.shift(),Y=k.shift(),u=b[0];if(G!==A){var M=G.className;g.hasElementTranscludeDirective&&B.replace||(u=Db(p));mb(W,z(G),u);S(z(u),M)}G=l.transclude?ba(q,l.transclude):Y;l(m,q,u,d,G)}k=null}).error(function(a,b,c,d){throw ia("tpload",d.url);});return function(a,b,c,d,e){k?(k.push(b),k.push(c),k.push(d),k.push(e)):l(m,b,c,d,e)}}function E(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name< +b.name?-1:1:a.index-b.index}function R(a,b,c,d){if(b)throw ia("multidir",b.name,c.name,a,ga(d));}function C(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:aa(function(a,b){var c=b.parent(),e=c.data("$binding")||[];e.push(d);S(c.data("$binding",e),"ng-binding");a.$watch(d,function(a){b[0].nodeValue=a})})})}function Ha(a,b){if("srcdoc"==b)return G.HTML;var c=Ga(a);if("xlinkHref"==b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return G.RESOURCE_URL}function ha(a,c,d,e){var f=b(d,!0);if(f){if("multiple"=== +e&&"SELECT"===Ga(a))throw ia("selmulti",ga(a));c.push({priority:100,compile:function(){return{pre:function(c,d,g){d=g.$$observers||(g.$$observers={});if(h.test(e))throw ia("nodomevents");if(f=b(g[e],!0,Ha(a,e)))g[e]=f(c),(d[e]||(d[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope||c).$watch(f,function(a,b){"class"===e&&a!=b?g.$updateClass(a,b):g.$set(e,a)})}}}})}}function mb(a,b,c){var d=b[0],e=b.length,f=d.parentNode,h,g;if(a)for(h=0,g=a.length;h<g;h++)if(a[h]==d){a[h++]=c;g=h+e-1;for(var k= +a.length;h<k;h++,g++)g<k?a[h]=a[g]:delete a[h];a.length-=e-1;break}f&&f.replaceChild(c,d);a=T.createDocumentFragment();a.appendChild(d);c[z.expando]=d[z.expando];d=1;for(e=b.length;d<e;d++)f=b[d],z(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function lc(a,b){return t(function(){return a.apply(null,arguments)},a,b)}var Gb=function(a,b){this.$$element=a;this.$attr=b||{}};Gb.prototype={$normalize:la,$addClass:function(a){a&&0<a.length&&W.addClass(this.$$element,a)},$removeClass:function(a){a&& +0<a.length&&W.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=mc(a,b),d=mc(b,a);0===c.length?W.removeClass(this.$$element,d):0===d.length?W.addClass(this.$$element,c):W.setClass(this.$$element,c,d)},$set:function(a,b,c,d){var e=hc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=db(a,"-"));e=Ga(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]=b=y(b,"src"===a);!1!==c&&(null===b||b===s?this.$$element.removeAttr(d): +this.$$element.attr(d,b));(c=this.$$observers)&&r(c[a],function(a){try{a(b)}catch(c){m(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);I.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var Q=b.startSymbol(),V=b.endSymbol(),X="{{"==Q||"}}"==V?Aa:function(a){return a.replace(/\{\{/g,Q).replace(/}}/g,V)},pa=/^ngAttr[A-Z]/;return Y}]}function la(b){return Ra(b.replace(jd,""))}function mc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),f=0; +a:for(;f<d.length;f++){for(var g=d[f],h=0;h<e.length;h++)if(g==e[h])continue a;c+=(0<c.length?" ":"")+g}return c}function kd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){wa(a,"controller");Z(a)?t(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,f){var g,h,n;D(e)&&(g=e.match(a),h=g[1],n=g[3],e=b.hasOwnProperty(h)?b[h]:bc(f.$scope,h,!0)||bc(d,h,!0),Qa(e,h,!0));g=c.instantiate(e,f);if(n){if(!f||"object"!=typeof f.$scope)throw E("$controller")("noscp", +h||e.name,n);f.$scope[n]=g}return g}}]}function ld(){this.$get=["$window",function(b){return z(b.document)}]}function md(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function nc(b){var a={},c,d,e;if(!b)return a;r(b.split("\n"),function(b){e=b.indexOf(":");c=O(da(b.substr(0,e)));d=da(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function oc(b){var a=Z(b)?b:s;return function(c){a||(a=nc(b));return c?a[O(c)]||null:a}}function pc(b,a,c){if(N(c))return c(b, +a);r(c,function(c){b=c(b,a)});return b}function nd(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){D(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=Wb(d)));return d}],transformRequest:[function(a){return Z(a)&&"[object File]"!==Ma.call(a)?oa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ca(d),put:ca(d),patch:ca(d)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}, +f=this.interceptors=[],g=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,m,p){function q(a){function c(a){var b=t({},a,{data:pc(a.data,a.headers,d.transformResponse)});return 200<=a.status&&300>a.status?b:m.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},f=function(a){function b(a){var c;r(a,function(b,d){N(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=t({},a.headers), +f,h,c=t({},c.common,c[O(a.method)]);b(c);b(d);a:for(f in c){a=O(f);for(h in d)if(O(h)===a)continue a;d[f]=c[f]}return d}(a);t(d,a);d.headers=f;d.method=Ia(d.method);(a=Hb(d.url)?b.cookies()[d.xsrfCookieName||e.xsrfCookieName]:s)&&(f[d.xsrfHeaderName||e.xsrfHeaderName]=a);var h=[function(a){f=a.headers;var b=pc(a.data,oc(f),a.transformRequest);x(a.data)&&r(f,function(a,b){"content-type"===O(b)&&delete f[b]});x(a.withCredentials)&&!x(e.withCredentials)&&(a.withCredentials=e.withCredentials);return A(a, +b,f).then(c,c)},s],g=m.when(d);for(r(u,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&h.push(a.response,a.responseError)});h.length;){a=h.shift();var k=h.shift(),g=g.then(a,k)}g.success=function(a){g.then(function(b){a(b.data,b.status,b.headers,d)});return g};g.error=function(a){g.then(null,function(b){a(b.data,b.status,b.headers,d)});return g};return g}function A(b,c,f){function g(a,b,c){u&&(200<=a&&300>a?u.put(s,[a,b,nc(c)]):u.remove(s)); +k(b,a,c);d.$$phase||d.$apply()}function k(a,c,d){c=Math.max(c,0);(200<=c&&300>c?p.resolve:p.reject)({data:a,status:c,headers:oc(d),config:b})}function n(){var a=bb(q.pendingRequests,b);-1!==a&&q.pendingRequests.splice(a,1)}var p=m.defer(),A=p.promise,u,r,s=B(b.url,b.params);q.pendingRequests.push(b);A.then(n,n);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(u=Z(b.cache)?b.cache:Z(e.cache)?e.cache:I);if(u)if(r=u.get(s),v(r)){if(r.then)return r.then(n,n),r;H(r)?k(r[1],r[0],ca(r[2])):k(r,200, +{})}else u.put(s,A);x(r)&&a(b.method,s,c,g,f,b.timeout,b.withCredentials,b.responseType);return A}function B(a,b){if(!b)return a;var c=[];Qc(b,function(a,b){null===a||x(a)||(H(a)||(a=[a]),r(a,function(a){Z(a)&&(a=oa(a));c.push(va(b)+"="+va(a))}))});return a+(-1==a.indexOf("?")?"?":"&")+c.join("&")}var I=c("$http"),u=[];r(f,function(a){u.unshift(D(a)?p.get(a):p.invoke(a))});r(g,function(a,b){var c=D(a)?p.get(a):p.invoke(a);u.splice(b,0,{response:function(a){return c(m.when(a))},responseError:function(a){return c(m.reject(a))}})}); +q.pendingRequests=[];(function(a){r(arguments,function(a){q[a]=function(b,c){return q(t(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){q[a]=function(b,c,d){return q(t(d||{},{method:a,url:b,data:c}))}})})("post","put");q.defaults=e;return q}]}function od(b){if(8>=P&&(!b.match(/^(get|post|head|put|delete|options)$/i)||!C.XMLHttpRequest))return new C.ActiveXObject("Microsoft.XMLHTTP");if(C.XMLHttpRequest)return new C.XMLHttpRequest;throw E("$httpBackend")("noxhr"); +}function pd(){this.$get=["$browser","$window","$document",function(b,a,c){return qd(b,od,b.defer,a.angular.callbacks,c[0])}]}function qd(b,a,c,d,e){function f(a,b){var c=e.createElement("script"),d=function(){c.onreadystatechange=c.onload=c.onerror=null;e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;P&&8>=P?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=function(){d()};e.body.appendChild(c);return d}var g=-1;return function(e,n,k,l,m, +p,q,A){function B(){u=g;W&&W();y&&y.abort()}function I(a,d,e,f){S&&c.cancel(S);W=y=null;d=0===d?e?200:404:d;a(1223==d?204:d,e,f);b.$$completeOutstandingRequest(w)}var u;b.$$incOutstandingRequestCount();n=n||b.url();if("jsonp"==O(e)){var G="_"+(d.counter++).toString(36);d[G]=function(a){d[G].data=a};var W=f(n.replace("JSON_CALLBACK","angular.callbacks."+G),function(){d[G].data?I(l,200,d[G].data):I(l,u||-2);d[G]=Ba.noop})}else{var y=a(e);y.open(e,n,!0);r(m,function(a,b){v(a)&&y.setRequestHeader(b,a)}); +y.onreadystatechange=function(){if(y&&4==y.readyState){var a=null,b=null;u!==g&&(a=y.getAllResponseHeaders(),b="response"in y?y.response:y.responseText);I(l,u||y.status,b,a)}};q&&(y.withCredentials=!0);if(A)try{y.responseType=A}catch(Y){if("json"!==A)throw Y;}y.send(k||null)}if(0<p)var S=c(B,p);else p&&p.then&&p.then(B)}}function rd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce", +function(c,d,e){function f(f,k,l){for(var m,p,q=0,A=[],B=f.length,I=!1,u=[];q<B;)-1!=(m=f.indexOf(b,q))&&-1!=(p=f.indexOf(a,m+g))?(q!=m&&A.push(f.substring(q,m)),A.push(q=c(I=f.substring(m+g,p))),q.exp=I,q=p+h,I=!0):(q!=B&&A.push(f.substring(q)),q=B);(B=A.length)||(A.push(""),B=1);if(l&&1<A.length)throw qc("noconcat",f);if(!k||I)return u.length=B,q=function(a){try{for(var b=0,c=B,h;b<c;b++)"function"==typeof(h=A[b])&&(h=h(a),h=l?e.getTrusted(l,h):e.valueOf(h),null===h||x(h)?h="":"string"!=typeof h&& +(h=oa(h))),u[b]=h;return u.join("")}catch(g){a=qc("interr",f,g.toString()),d(a)}},q.exp=f,q.parts=A,q}var g=b.length,h=a.length;f.startSymbol=function(){return b};f.endSymbol=function(){return a};return f}]}function sd(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,g,h,n){var k=a.setInterval,l=a.clearInterval,m=c.defer(),p=m.promise,q=0,A=v(n)&&!n;h=v(h)?h:0;p.then(null,null,d);p.$$intervalId=k(function(){m.notify(q++);0<h&&q>=h&&(m.resolve(q),l(p.$$intervalId),delete e[p.$$intervalId]); +A||b.$apply()},g);e[p.$$intervalId]=m;return p}var e={};d.cancel=function(a){return a&&a.$$intervalId in e?(e[a.$$intervalId].reject("canceled"),clearInterval(a.$$intervalId),delete e[a.$$intervalId],!0):!1};return d}]}function td(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")", +gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy", +mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function rc(b){b=b.split("/");for(var a=b.length;a--;)b[a]=xb(b[a]);return b.join("/")}function sc(b,a,c){b=xa(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=Q(b.port)||ud[b.protocol]||null}function tc(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=xa(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=Yb(b.search);a.$$hash=decodeURIComponent(b.hash); +a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function ma(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Xa(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Ib(b){return b.substr(0,Xa(b).lastIndexOf("/")+1)}function uc(b,a){this.$$html5=!0;a=a||"";var c=Ib(b);sc(b,this,b);this.$$parse=function(a){var e=ma(c,a);if(!D(e))throw Jb("ipthprfx",a,c);tc(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Zb(this.$$search),b=this.$$hash? +"#"+xb(this.$$hash):"";this.$$url=rc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;if((e=ma(b,d))!==s)return d=e,(e=ma(a,e))!==s?c+(ma("/",e)||e):b+d;if((e=ma(c,d))!==s)return c+e;if(c==d+"/")return c}}function Kb(b,a){var c=Ib(b);sc(b,this,b);this.$$parse=function(d){var e=ma(b,d)||ma(c,d),e="#"==e.charAt(0)?ma(a,e):this.$$html5?e:"";if(!D(e))throw Jb("ihshprfx",d,a);tc(e,this,b);d=this.$$path;var f=/^\/?.*?:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b, +""));f.exec(e)||(d=(e=f.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Zb(this.$$search),e=this.$$hash?"#"+xb(this.$$hash):"";this.$$url=rc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(Xa(b)==Xa(a))return a}}function vc(b,a){this.$$html5=!0;Kb.apply(this,arguments);var c=Ib(b);this.$$rewrite=function(d){var e;if(b==Xa(d))return d;if(e=ma(c,d))return b+a+e;if(c===d+"/")return c}}function nb(b){return function(){return this[b]}} +function wc(b,a){return function(c){if(x(c))return this[b];this[b]=a(c);this.$$compose();return this}}function vd(){var b="",a=!1;this.hashPrefix=function(a){return v(a)?(b=a,this):b};this.html5Mode=function(b){return v(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,f){function g(a){c.$broadcast("$locationChangeSuccess",h.absUrl(),a)}var h,n=d.baseHref(),k=d.url();a?(n=k.substring(0,k.indexOf("/",k.indexOf("//")+2))+(n||"/"),e=e.history?uc:vc):(n=Xa(k), +e=Kb);h=new e(n,"#"+b);h.$$parse(h.$$rewrite(k));f.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var b=z(a.target);"a"!==O(b[0].nodeName);)if(b[0]===f[0]||!(b=b.parent())[0])return;var e=b.prop("href");Z(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=xa(e.animVal).href);var g=h.$$rewrite(e);e&&(!b.attr("target")&&g&&!a.isDefaultPrevented())&&(a.preventDefault(),g!=d.url()&&(h.$$parse(g),c.$apply(),C.angular["ff-684208-preventDefault"]=!0))}});h.absUrl()!=k&&d.url(h.absUrl(), +!0);d.onUrlChange(function(a){h.absUrl()!=a&&(c.$evalAsync(function(){var b=h.absUrl();h.$$parse(a);c.$broadcast("$locationChangeStart",a,b).defaultPrevented?(h.$$parse(b),d.url(b)):g(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=h.$$replace;l&&a==h.absUrl()||(l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",h.absUrl(),a).defaultPrevented?h.$$parse(a):(d.url(h.absUrl(),b),g(a))}));h.$$replace=!1;return l});return h}]}function wd(){var b=!0,a=this;this.debugEnabled= +function(a){return v(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||w;a=!1;try{a=!!e.apply}catch(n){}return a?function(){var a=[];r(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"), +warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ea(b,a){if("constructor"===b)throw ya("isecfld",a);return b}function Ya(b,a){if(b){if(b.constructor===b)throw ya("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw ya("isecwindow",a);if(b.children&&(b.nodeName||b.on&&b.find))throw ya("isecdom",a);}return b}function ob(b,a,c,d,e){e=e||{};a=a.split(".");for(var f,g=0;1<a.length;g++){f=ea(a.shift(),d);var h=b[f]; +h||(h={},b[f]=h);b=h;b.then&&e.unwrapPromises&&(qa(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===s&&(b.$$v={}),b=b.$$v)}f=ea(a.shift(),d);return b[f]=c}function xc(b,a,c,d,e,f,g){ea(b,f);ea(a,f);ea(c,f);ea(d,f);ea(e,f);return g.unwrapPromises?function(h,g){var k=g&&g.hasOwnProperty(b)?g:h,l;if(null==k)return k;(k=k[b])&&k.then&&(qa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!a)return k;if(null==k)return s;(k=k[a])&&k.then&&(qa(f),"$$v"in k||(l=k,l.$$v= +s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!c)return k;if(null==k)return s;(k=k[c])&&k.then&&(qa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!d)return k;if(null==k)return s;(k=k[d])&&k.then&&(qa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!e)return k;if(null==k)return s;(k=k[e])&&k.then&&(qa(f),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);return k}:function(f,g){var k=g&&g.hasOwnProperty(b)?g:f;if(null==k)return k;k=k[b];if(!a)return k; +if(null==k)return s;k=k[a];if(!c)return k;if(null==k)return s;k=k[c];if(!d)return k;if(null==k)return s;k=k[d];return e?null==k?s:k=k[e]:k}}function xd(b,a){ea(b,a);return function(a,d){return null==a?s:(d&&d.hasOwnProperty(b)?d:a)[b]}}function yd(b,a,c){ea(b,c);ea(a,c);return function(c,e){if(null==c)return s;c=(e&&e.hasOwnProperty(b)?e:c)[b];return null==c?s:c[a]}}function yc(b,a,c){if(Lb.hasOwnProperty(b))return Lb[b];var d=b.split("."),e=d.length,f;if(a.unwrapPromises||1!==e)if(a.unwrapPromises|| +2!==e)if(a.csp)f=6>e?xc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,f){var h=0,g;do g=xc(d[h++],d[h++],d[h++],d[h++],d[h++],c,a)(b,f),f=s,b=g;while(h<e);return g};else{var g="var p;\n";r(d,function(b,d){ea(b,c);g+="if(s == null) return undefined;\ns="+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")}); +var g=g+"return s;",h=new Function("s","k","pw",g);h.toString=aa(g);f=a.unwrapPromises?function(a,b){return h(a,b,qa)}:h}else f=yd(d[0],d[1],c);else f=xd(d[0],c);"hasOwnProperty"!==b&&(Lb[b]=f);return f}function zd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(b){return v(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return v(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log", +function(c,d,e){a.csp=d.csp;qa=function(b){a.logPromiseWarnings&&!zc.hasOwnProperty(b)&&(zc[b]=!0,e.warn("[$parse] Promise found in the expression `"+b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];e=new Mb(a);e=(new Za(e,c,a)).parse(d,!1);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return w}}}]}function Ad(){this.$get=["$rootScope","$exceptionHandler", +function(b,a){return Bd(function(a){b.$evalAsync(a)},a)}]}function Bd(b,a){function c(a){return a}function d(a){return g(a)}var e=function(){var g=[],k,l;return l={resolve:function(a){if(g){var c=g;g=s;k=f(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],k.then(a[0],a[1],a[2])})}},reject:function(a){l.resolve(h(a))},notify:function(a){if(g){var c=g;g.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,f,h){var l=e(),B=function(d){try{l.resolve((N(b)? +b:c)(d))}catch(e){l.reject(e),a(e)}},I=function(b){try{l.resolve((N(f)?f:d)(b))}catch(c){l.reject(c),a(c)}},u=function(b){try{l.notify((N(h)?h:c)(b))}catch(d){a(d)}};g?g.push([B,I,u]):k.then(B,I,u);return l.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):d.reject(a);return d.promise}function d(e,f){var h=null;try{h=(a||c)()}catch(g){return b(g,!1)}return h&&N(h.then)?h.then(function(){return b(e,f)},function(a){return b(a,!1)}): +b(e,f)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},f=function(a){return a&&N(a.then)?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},g=function(a){var b=e();b.reject(a);return b.promise},h=function(c){return{then:function(f,h){var g=e();b(function(){try{g.resolve((N(h)?h:d)(c))}catch(b){g.reject(b),a(b)}});return g.promise}}};return{defer:e,reject:g,when:function(h,k,l,m){var p=e(),q,A=function(b){try{return(N(k)?k:c)(b)}catch(d){return a(d), +g(d)}},B=function(b){try{return(N(l)?l:d)(b)}catch(c){return a(c),g(c)}},r=function(b){try{return(N(m)?m:c)(b)}catch(d){a(d)}};b(function(){f(h).then(function(a){q||(q=!0,p.resolve(f(a).then(A,B,r)))},function(a){q||(q=!0,p.resolve(B(a)))},function(a){q||p.notify(r(a))})});return p.promise},all:function(a){var b=e(),c=0,d=H(a)?[]:{};r(a,function(a,e){c++;f(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}} +function Cd(){var b=10,a=E("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,e,f,g){function h(){this.$id=$a();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}} +function n(b){if(p.$$phase)throw a("inprog",p.$$phase);p.$$phase=b}function k(a,b){var c=f(a);Qa(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function m(){}h.prototype={constructor:h,$new:function(a){a?(a=new h,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(a=function(){},a.prototype=this,a=new a,a.$id=$a());a["this"]=a;a.$$listeners={};a.$$listenerCount={};a.$parent= +this;a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,d){var e=k(a,"watch"),f=this.$$watchers,h={fn:b,last:m,get:e,exp:a,eq:!!d};c=null;if(!N(b)){var g=k(b||w,"listener");h.fn=function(a,b,c){g(c)}}if("string"==typeof a&&e.constant){var n=h.fn;h.fn=function(a,b,c){n.call(this,a,b,c);Na(f,h)}}f||(f=this.$$watchers=[]);f.unshift(h); +return function(){Na(f,h);c=null}},$watchCollection:function(a,b){var c=this,d,e,h=0,g=f(a),k=[],n={},l=0;return this.$watch(function(){e=g(c);var a,b;if(Z(e))if(vb(e))for(d!==k&&(d=k,l=d.length=0,h++),a=e.length,l!==a&&(h++,d.length=l=a),b=0;b<a;b++)d[b]!==e[b]&&(h++,d[b]=e[b]);else{d!==n&&(d=n={},l=0,h++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,d.hasOwnProperty(b)?d[b]!==e[b]&&(h++,d[b]=e[b]):(l++,d[b]=e[b],h++));if(l>a)for(b in h++,d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&(l--,delete d[b])}else d!== +e&&(d=e,h++);return h},function(){b(e,d,c)})},$digest:function(){var d,f,h,g,k=this.$$asyncQueue,l=this.$$postDigestQueue,r,y,s=b,S,L=[],v,t,M;n("$digest");c=null;do{y=!1;for(S=this;k.length;){try{M=k.shift(),M.scope.$eval(M.expression)}catch(z){p.$$phase=null,e(z)}c=null}a:do{if(g=S.$$watchers)for(r=g.length;r--;)try{if(d=g[r])if((f=d.get(S))!==(h=d.last)&&!(d.eq?ta(f,h):"number"==typeof f&&"number"==typeof h&&isNaN(f)&&isNaN(h)))y=!0,c=d,d.last=d.eq?ca(f):f,d.fn(f,h===m?f:h,S),5>s&&(v=4-s,L[v]|| +(L[v]=[]),t=N(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,t+="; newVal: "+oa(f)+"; oldVal: "+oa(h),L[v].push(t));else if(d===c){y=!1;break a}}catch(D){p.$$phase=null,e(D)}if(!(g=S.$$childHead||S!==this&&S.$$nextSibling))for(;S!==this&&!(g=S.$$nextSibling);)S=S.$parent}while(S=g);if((y||k.length)&&!s--)throw p.$$phase=null,a("infdig",b,oa(L));}while(y||k.length);for(p.$$phase=null;l.length;)try{l.shift()()}catch(w){e(w)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"); +this.$$destroyed=!0;this!==p&&(r(this.$$listenerCount,cb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null)}},$eval:function(a,b){return f(a)(this,b)},$evalAsync:function(a){p.$$phase||p.$$asyncQueue.length|| +g.defer(function(){p.$$asyncQueue.length&&p.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return n("$apply"),this.$eval(a)}catch(b){e(b)}finally{p.$$phase=null;try{p.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[bb(c, +b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,h=!1,g={name:a,targetScope:f,stopPropagation:function(){h=!0},preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1},k=[g].concat(ua.call(arguments,1)),n,l;do{d=f.$$listeners[a]||c;g.currentScope=f;n=0;for(l=d.length;n<l;n++)if(d[n])try{d[n].apply(null,k)}catch(p){e(p)}else d.splice(n,1),n--,l--;if(h)break;f=f.$parent}while(f);return g},$broadcast:function(a,b){for(var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented= +!0},defaultPrevented:!1},h=[f].concat(ua.call(arguments,1)),g,k;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];g=0;for(k=d.length;g<k;g++)if(d[g])try{d[g].apply(null,h)}catch(n){e(n)}else d.splice(g,1),g--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return f}};var p=new h;return p}]}function Dd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return v(a)? +(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return v(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,f;if(!P||8<=P)if(f=xa(c).href,""!==f&&!f.match(e))return"unsafe:"+f;return c}}}function Ed(b){if("self"===b)return b;if(D(b)){if(-1<b.indexOf("***"))throw ra("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(ab(b))return RegExp("^"+b.source+"$"); +throw ra("imatcher");}function Ac(b){var a=[];v(b)&&r(b,function(b){a.push(Ed(b))});return a}function Fd(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&(b=Ac(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=Ac(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()}; +b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw ra("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize"));var f=d(),g={};g[fa.HTML]=d(f);g[fa.CSS]=d(f);g[fa.URL]=d(f);g[fa.JS]=d(f);g[fa.RESOURCE_URL]=d(g[fa.URL]);return{trustAs:function(a,b){var c=g.hasOwnProperty(a)?g[a]:null;if(!c)throw ra("icontext",a,b);if(null===b||b===s||""===b)return b;if("string"!==typeof b)throw ra("itype",a);return new c(b)},getTrusted:function(c,d){if(null=== +d||d===s||""===d)return d;var f=g.hasOwnProperty(c)?g[c]:null;if(f&&d instanceof f)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var f=xa(d.toString()),l,m,p=!1;l=0;for(m=b.length;l<m;l++)if("self"===b[l]?Hb(f):b[l].exec(f.href)){p=!0;break}if(p)for(l=0,m=a.length;l<m;l++)if("self"===a[l]?Hb(f):a[l].exec(f.href)){p=!1;break}if(p)return d;throw ra("insecurl",d.toString());}if(c===fa.HTML)return e(d);throw ra("unsafe");},valueOf:function(a){return a instanceof f?a.$$unwrapTrustedValue():a}}}]} +function Gd(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw ra("iequirks");var e=ca(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Aa);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var f=e.parseAs, +g=e.getTrusted,h=e.trustAs;r(fa,function(a,b){var c=O(b);e[Ra("parse_as_"+c)]=function(b){return f(a,b)};e[Ra("get_trusted_"+c)]=function(b){return g(a,b)};e[Ra("trust_as_"+c)]=function(b){return h(a,b)}});return e}]}function Hd(){this.$get=["$window","$document",function(b,a){var c={},d=Q((/android (\d+)/.exec(O((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},g=f.documentMode,h,n=/^(Moz|webkit|O|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var p in k)if(l= +n.exec(p)){h=l[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||h+"Transition"in k);m=!!("animation"in k||h+"Animation"in k);!d||l&&m||(l=D(f.body.style.webkitTransition),m=D(f.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!g||7<g),hasEvent:function(a){if("input"==a&&9==P)return!1;if(x(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:Vb(),vendorPrefix:h, +transitions:l,animations:m,android:d,msie:P,msieDocumentMode:g}}]}function Id(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,h,n){var k=c.defer(),l=k.promise,m=v(n)&&!n;h=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}finally{delete f[l.$$timeoutId]}m||b.$apply()},h);l.$$timeoutId=h;f[h]=k;return l}var f={};e.cancel=function(b){return b&&b.$$timeoutId in f?(f[b.$$timeoutId].reject("canceled"),delete f[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)): +!1};return e}]}function xa(b,a){var c=b;P&&(V.setAttribute("href",c),c=V.href);V.setAttribute("href",c);return{href:V.href,protocol:V.protocol?V.protocol.replace(/:$/,""):"",host:V.host,search:V.search?V.search.replace(/^\?/,""):"",hash:V.hash?V.hash.replace(/^#/,""):"",hostname:V.hostname,port:V.port,pathname:"/"===V.pathname.charAt(0)?V.pathname:"/"+V.pathname}}function Hb(b){b=D(b)?xa(b):b;return b.protocol===Bc.protocol&&b.host===Bc.host}function Jd(){this.$get=aa(C)}function Cc(b){function a(d, +e){if(Z(d)){var f={};r(d,function(b,c){f[c]=a(c,b)});return f}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Dc);a("date",Ec);a("filter",Kd);a("json",Ld);a("limitTo",Md);a("lowercase",Nd);a("number",Fc);a("orderBy",Gc);a("uppercase",Od)}function Kd(){return function(b,a,c){if(!H(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&& +(c="boolean"===d&&c?function(a,b){return Ba.equals(a,b)}:function(a,b){if(a&&b&&"object"===typeof a&&"object"===typeof b){for(var d in a)if("$"!==d.charAt(0)&&Pd.call(a,d)&&c(a[d],b[d]))return!0;return!1}b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var f=function(a,b){if("string"==typeof b&&"!"===b.charAt(0))return!f(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!== +d.charAt(0)&&f(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(f(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var g in a)(function(b){"undefined"!=typeof a[b]&&e.push(function(c){return f("$"==b?c:c&&c[b],a[b])})})(g);break;case "function":e.push(a);break;default:return b}d=[];for(g=0;g<b.length;g++){var h=b[g];e.check(h)&&d.push(h)}return d}}function Dc(b){var a=b.NUMBER_FORMATS;return function(b, +d){x(d)&&(d=a.CURRENCY_SYM);return Hc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Fc(b){var a=b.NUMBER_FORMATS;return function(b,d){return Hc(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Hc(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var f=0>b;b=Math.abs(b);var g=b+"",h="",n=[],k=!1;if(-1!==g.indexOf("e")){var l=g.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?g="0":(h=g,k=!0)}if(k)0<e&&(-1<b&&1>b)&&(h=b.toFixed(e));else{g=(g.split(Ic)[1]||"").length; +x(e)&&(e=Math.min(Math.max(a.minFrac,g),a.maxFrac));g=Math.pow(10,e);b=Math.round(b*g)/g;b=(""+b).split(Ic);g=b[0];b=b[1]||"";var l=0,m=a.lgSize,p=a.gSize;if(g.length>=m+p)for(l=g.length-m,k=0;k<l;k++)0===(l-k)%p&&0!==k&&(h+=c),h+=g.charAt(k);for(k=l;k<g.length;k++)0===(g.length-k)%m&&0!==k&&(h+=c),h+=g.charAt(k);for(;b.length<e;)b+="0";e&&"0"!==e&&(h+=d+b.substr(0,e))}n.push(f?a.negPre:a.posPre);n.push(h);n.push(f?a.negSuf:a.posSuf);return n.join("")}function Nb(b,a,c){var d="";0>b&&(d="-",b=-b); +for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function $(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Nb(e,a,d)}}function pb(b,a){return function(c,d){var e=c["get"+b](),f=Ia(a?"SHORT"+b:b);return d[f][e]}}function Ec(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,n=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Q(b[9]+b[10]),g=Q(b[9]+b[11]));h.call(a,Q(b[1]),Q(b[2])-1,Q(b[3])); +f=Q(b[4]||0)-f;g=Q(b[5]||0)-g;h=Q(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));n.call(a,f,g,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var f="",g=[],h,n;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;D(c)&&(c=Qd.test(c)?Q(c):a(c));wb(c)&&(c=new Date(c));if(!La(c))return c;for(;e;)(n=Rd.exec(e))?(g=g.concat(ua.call(n,1)),e=g.pop()):(g.push(e),e=null);r(g,function(a){h=Sd[a];f+=h?h(c,b.DATETIME_FORMATS): +a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return f}}function Ld(){return function(b){return oa(b,!0)}}function Md(){return function(b,a){if(!H(b)&&!D(b))return b;a=Q(a);if(D(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Gc(b){return function(a,c,d){function e(a,b){return Pa(b)?function(b,c){return a(c,b)}:a}if(!H(a)||!c)return a;c=H(c)?c:[c]; +c=Sc(c,function(a){var c=!1,d=a||Aa;if(D(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,h=typeof e;f==h?("string"==f&&(c=c.toLowerCase(),e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<h?-1:1;return c},c)});for(var f=[],g=0;g<a.length;g++)f.push(a[g]);return f.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function sa(b){N(b)&&(b={link:b});b.restrict=b.restrict|| +"AC";return aa(b)}function Jc(b,a){function c(a,c){c=c?"-"+db(c,"-"):"";b.removeClass((a?qb:rb)+c).addClass((a?rb:qb)+c)}var d=this,e=b.parent().controller("form")||sb,f=0,g=d.$error={},h=[];d.$name=a.name||a.ngForm;d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Ja);c(!0);d.$addControl=function(a){wa(a.$name,"input");h.push(a);a.$name&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];r(g,function(b,c){d.$setValidity(c,!0,a)}); +Na(h,a)};d.$setValidity=function(a,b,h){var m=g[a];if(b)m&&(Na(m,h),m.length||(f--,f||(c(b),d.$valid=!0,d.$invalid=!1),g[a]=!1,c(!0,a),e.$setValidity(a,!0,d)));else{f||c(b);if(m){if(-1!=bb(m,h))return}else g[a]=m=[],f++,c(!1,a),e.$setValidity(a,!1,d);m.push(h);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Ja).addClass(tb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()};d.$setPristine=function(){b.removeClass(tb).addClass(Ja);d.$dirty=!1;d.$pristine=!0;r(h,function(a){a.$setPristine()})}} +function na(b,a,c,d){b.$setValidity(a,c);return c?d:s}function ub(b,a,c,d,e,f){if(!e.android){var g=!1;a.on("compositionstart",function(a){g=!0});a.on("compositionend",function(){g=!1;h()})}var h=function(){if(!g){var e=a.val();Pa(c.ngTrim||"T")&&(e=da(e));d.$viewValue!==e&&(b.$$phase?d.$setViewValue(e):b.$apply(function(){d.$setViewValue(e)}))}};if(e.hasEvent("input"))a.on("input",h);else{var n,k=function(){n||(n=f.defer(function(){h();n=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15< +a&&19>a||37<=a&&40>=a)||k()});if(e.hasEvent("paste"))a.on("paste cut",k)}a.on("change",h);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var l=c.ngPattern;l&&((e=l.match(/^\/(.*)\/([gim]*)$/))?(l=RegExp(e[1],e[2]),e=function(a){return na(d,"pattern",d.$isEmpty(a)||l.test(a),a)}):e=function(c){var e=b.$eval(l);if(!e||!e.test)throw E("ngPattern")("noregexp",l,e,ga(a));return na(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var m= +Q(c.ngMinlength);e=function(a){return na(d,"minlength",d.$isEmpty(a)||a.length>=m,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var p=Q(c.ngMaxlength);e=function(a){return na(d,"maxlength",d.$isEmpty(a)||a.length<=p,a)};d.$parsers.push(e);d.$formatters.push(e)}}function Ob(b,a){b="ngClass"+b;return function(){return{restrict:"AC",link:function(c,d,e){function f(b){if(!0===a||c.$index%2===a){var d=g(b||"");h?ta(b,h)||e.$updateClass(d,g(h)):e.$addClass(d)}h=ca(b)}function g(a){if(H(a))return a.join(" "); +if(Z(a)){var b=[];r(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var h;c.$watch(e[b],f,!0);e.$observe("class",function(a){f(c.$eval(e[b]))});"ngClass"!==b&&c.$watch("$index",function(d,f){var h=d&1;if(h!==f&1){var m=g(c.$eval(e[b]));h===a?e.$addClass(m):e.$removeClass(m)}})}}}}var O=function(b){return D(b)?b.toLowerCase():b},Pd=Object.prototype.hasOwnProperty,Ia=function(b){return D(b)?b.toUpperCase():b},P,z,Ca,ua=[].slice,Td=[].push,Ma=Object.prototype.toString,Oa=E("ng"),Ba=C.angular|| +(C.angular={}),Va,Ga,ja=["0","0","0"];P=Q((/msie (\d+)/.exec(O(navigator.userAgent))||[])[1]);isNaN(P)&&(P=Q((/trident\/.*; rv:(\d+)/.exec(O(navigator.userAgent))||[])[1]));w.$inject=[];Aa.$inject=[];var da=function(){return String.prototype.trim?function(b){return D(b)?b.trim():b}:function(b){return D(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();Ga=9>P?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName? +b.nodeName:b[0].nodeName};var Vc=/[A-Z]/g,Ud={full:"1.2.13",major:1,minor:2,dot:13,codeName:"romantic-transclusion"},Sa=R.cache={},eb=R.expando="ng-"+(new Date).getTime(),Zc=1,Kc=C.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Eb=C.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)};R._data=function(b){return this.cache[b[this.expando]]||{}};var Xc=/([\:\-\_]+(.))/g,Yc= +/^moz([A-Z])/,Bb=E("jqLite"),Fa=R.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===T.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),R(C).on("load",a))},toString:function(){var b=[];r(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?z(this[b]):z(this[this.length+b])},length:0,push:Td,sort:[].sort,splice:[].splice},ib={};r("multiple selected checked disabled readOnly required open".split(" "),function(b){ib[O(b)]=b});var ic= +{};r("input select option textarea button form details".split(" "),function(b){ic[Ia(b)]=!0});r({data:ec,inheritedData:hb,scope:function(b){return z(b).data("$scope")||hb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return z(b).data("$isolateScope")||z(b).data("$isolateScopeNoTemplate")},controller:fc,injector:function(b){return hb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Fb,css:function(b,a,c){a=Ra(a);if(v(c))b.style[a]=c;else{var d;8>=P&&(d= +b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=P&&(d=""===d?s:d);return d}},attr:function(b,a,c){var d=O(a);if(ib[d])if(v(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||w).specified?d:s;else if(v(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?s:b},prop:function(b,a,c){if(v(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(x(d))return e? +b[e]:"";b[e]=d}var a=[];9>P?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(x(a)){if("SELECT"===Ga(b)&&b.multiple){var c=[];r(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(x(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Da(d[c]);b.innerHTML=a},empty:gc},function(b,a){R.prototype[a]=function(a,d){var e,f;if(b!==gc&&(2==b.length&&b!==Fb&&b!== +fc?a:d)===s){if(Z(a)){for(e=0;e<this.length;e++)if(b===ec)b(this[e],a);else for(f in a)b(this[e],f,a[f]);return this}e=b.$dv;f=e===s?Math.min(this.length,1):this.length;for(var g=0;g<f;g++){var h=b(this[g],a,d);e=e?e+h:h}return e}for(e=0;e<this.length;e++)b(this[e],a,d);return this}});r({removeData:cc,dealoc:Da,on:function a(c,d,e,f){if(v(f))throw Bb("onargs");var g=ka(c,"events"),h=ka(c,"handle");g||ka(c,"events",g={});h||ka(c,"handle",h=$c(c,g));r(d.split(" "),function(d){var f=g[d];if(!f){if("mouseenter"== +d||"mouseleave"==d){var l=T.body.contains||T.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};g[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||h(a,d)})}else Kc(c,d,h),g[d]=[];f=g[d]}f.push(e)})}, +off:dc,one:function(a,c,d){a=z(a);a.on(c,function f(){a.off(c,d);a.off(c,f)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;Da(a);r(new R(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];r(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){r(new R(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d= +a.firstChild;r(new R(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=z(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Da(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;r(new R(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:gb,removeClass:fb,toggleClass:function(a,c,d){x(d)&&(d=!Fb(a,c));(d?gb:fb)(a,c)},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling; +for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Db,triggerHandler:function(a,c,d){c=(ka(a,"events")||{})[c];d=d||[];var e=[{preventDefault:w,stopPropagation:w}];r(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){R.prototype[c]=function(c,e,f){for(var g,h=0;h<this.length;h++)x(g)?(g=a(this[h],c,e,f),v(g)&&(g=z(g))):Cb(g,a(this[h],c,e,f));return v(g)?g:this};R.prototype.bind=R.prototype.on; +R.prototype.unbind=R.prototype.off});Ta.prototype={put:function(a,c){this[Ea(a)]=c},get:function(a){return this[Ea(a)]},remove:function(a){var c=this[a=Ea(a)];delete this[a];return c}};var bd=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,cd=/,/,dd=/^\s*(_?)(\S+?)\1\s*$/,ad=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ua=E("$injector"),Vd=E("$animate"),Wd=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Vd("notcsel",c);this.$$selectors[c.substr(1)]= +e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout",function(a){return{enter:function(d,e,f,g){f?f.after(d):(e&&e[0]||(e=f.parent()),e.append(d));g&&a(g,0,!1)},leave:function(d,e){d.remove();e&&a(e,0,!1)},move:function(a,c,f,g){this.enter(a,c,f,g)},addClass:function(d,e,f){e=D(e)?e:H(e)?e.join(" "):"";r(d,function(a){gb(a,e)});f&&a(f,0,!1)},removeClass:function(d,e,f){e=D(e)? +e:H(e)?e.join(" "):"";r(d,function(a){fb(a,e)});f&&a(f,0,!1)},setClass:function(d,e,f,g){r(d,function(a){gb(a,e);fb(a,f)});g&&a(g,0,!1)},enabled:w}}]}],ia=E("$compile");kc.$inject=["$provide","$$sanitizeUriProvider"];var jd=/^(x[\:\-_]|data[\:\-_])/i,qc=E("$interpolate"),Xd=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,ud={http:80,https:443,ftp:21},Jb=E("$location");vc.prototype=Kb.prototype=uc.prototype={$$html5:!1,$$replace:!1,absUrl:nb("$$absUrl"),url:function(a,c){if(x(a))return this.$$url;var d=Xd.exec(a); +d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:nb("$$protocol"),host:nb("$$host"),port:nb("$$port"),path:wc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(D(a))this.$$search=Yb(a);else if(Z(a))this.$$search=a;else throw Jb("isrcharg");break;default:x(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this}, +hash:wc("$$hash",Aa),replace:function(){this.$$replace=!0;return this}};var ya=E("$parse"),zc={},qa,Ka={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:w,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return v(d)?v(e)?d+e:d:v(e)?e:s},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(v(d)?d:0)-(v(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a, +c)^e(a,c)},"=":w,"===":function(a,c,d,e){return d(a,c)===e(a,c)},"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a, +c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Yd={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Mb=function(a){this.options=a};Mb.prototype={constructor:Mb,lex:function(a){this.text=a;this.index=0;this.ch=s;this.lastCh=":";this.tokens=[];var c;for(a=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber(); +else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&("{"===a[0]&&(c=this.tokens[this.tokens.length-1]))&&(c.json=-1===c.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&a.unshift(this.ch),this.is("}]")&&a.shift(),this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{var d=this.ch+this.peek(),e=d+this.peek(2),f=Ka[this.ch],g=Ka[d],h=Ka[e];h?(this.tokens.push({index:this.index, +text:e,fn:h}),this.index+=3):g?(this.tokens.push({index:this.index,text:d,fn:g}),this.index+=2):f?(this.tokens.push({index:this.index,text:this.ch,fn:f,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+ +a):!1},isNumber:function(a){return"0"<=a&&"9">=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=v(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw ya("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d= +O(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,text:a,json:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,f,g,h;this.index<this.text.length;){h= +this.text.charAt(this.index);if("."===h||this.isIdent(h)||this.isNumber(h))"."===h&&(e=this.index),c+=h;else break;this.index++}if(e)for(f=this.index;f<this.text.length;){h=this.text.charAt(f);if("("===h){g=c.substr(e-d+1);c=c.substr(0,e-d);this.index=f;break}if(this.isWhitespace(h))f++;else break}d={index:d,text:c};if(Ka.hasOwnProperty(c))d.fn=Ka[c],d.json=Ka[c];else{var n=yc(c,this.options,this.text);d.fn=t(function(a,c){return n(a,c)},{assign:function(d,e){return ob(d,c,e,a.text,a.options)}})}this.tokens.push(d); +g&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+1,text:g,json:!1}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,f=!1;this.index<this.text.length;){var g=this.text.charAt(this.index),e=e+g;if(f)"u"===g?(g=this.text.substring(this.index+1,this.index+5),g.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+g+"]"),this.index+=4,d+=String.fromCharCode(parseInt(g,16))):d=(f=Yd[g])?d+f:d+g,f=!1;else if("\\"===g)f=!0;else{if(g===a){this.index++; +this.tokens.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}d+=g}this.index++}this.throwError("Unterminated quote",c)}};var Za=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};Za.ZERO=function(){return 0};Za.prototype={constructor:Za,parse:function(a,c){this.text=a;this.json=c;this.tokens=this.lexer.lex(a);c&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:a, +index:0})});var d=c?this.primary():this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);d.literal=!!d.literal;d.constant=!!d.constant;return d},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();else if(this.expect("{"))a=this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);c.json&&(a.constant=!0,a.literal=!0)}for(var d;c=this.expect("(", +"[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw ya("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw ya("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var f=this.tokens[0],g=f.text;if(g===a||g===c||g===d||g===e||!(a||c||d||e))return f}return!1}, +expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.json&&!a.json&&this.throwError("is not valid json",a),this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return t(function(d,e){return a(d,e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return t(function(e,f){return a(e,f)?c(e,f):d(e,f)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return t(function(e,f){return c(e, +f,a,d)},{constant:a.constant&&d.constant})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,f=0;f<a.length;f++){var g=a[f];g&&(e=g(c,d))}return e}},filterChain:function(){for(var a=this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression()); +else{var e=function(a,e,h){h=[h];for(var n=0;n<d.length;n++)h.push(d[n](a,e));return c.apply(a,h)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),function(d,f){return a.assign(d,c(d,f),f)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary(); +if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a}, +relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(Za.ZERO,a.fn, +this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=yc(d,this.options,this.text);return t(function(c,d,h){return e(h||a(c,d))},{assign:function(e,g,h){return ob(a(e,h),d,g,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return t(function(e,f){var g=a(e,f),h=d(e,f),n;if(!g)return s;(g=Ya(g[h],c.text))&&(g.then&&c.options.unwrapPromises)&&(n=g,"$$v"in g||(n.$$v=s,n.then(function(a){n.$$v= +a})),g=g.$$v);return g},{assign:function(e,f,g){var h=d(e,g);return Ya(a(e,g),c.text)[h]=f}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(f,g){for(var h=[],n=c?c(f,g):f,k=0;k<d.length;k++)h.push(d[k](f,g));k=a(f,g,n)||w;Ya(n,e.text);Ya(k,e.text);h=k.apply?k.apply(n,h):k(h[0],h[1],h[2],h[3],h[4]);return Ya(h,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{var d= +this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return t(function(c,d){for(var g=[],h=0;h<a.length;h++)g.push(a[h](c,d));return g},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{var d=this.expect(),d=d.string||d.text;this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return t(function(c,d){for(var e={},n=0;n<a.length;n++){var k=a[n];e[k.key]= +k.value(c,d)}return e},{literal:!0,constant:c})}};var Lb={},ra=E("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},V=T.createElement("a"),Bc=xa(C.location.href,!0);Cc.$inject=["$provide"];Dc.$inject=["$locale"];Fc.$inject=["$locale"];var Ic=".",Sd={yyyy:$("FullYear",4),yy:$("FullYear",2,0,!0),y:$("FullYear",1),MMMM:pb("Month"),MMM:pb("Month",!0),MM:$("Month",2,1),M:$("Month",1,1),dd:$("Date",2),d:$("Date",1),HH:$("Hours",2),H:$("Hours",1),hh:$("Hours",2,-12),h:$("Hours", +1,-12),mm:$("Minutes",2),m:$("Minutes",1),ss:$("Seconds",2),s:$("Seconds",1),sss:$("Milliseconds",3),EEEE:pb("Day"),EEE:pb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Nb(Math[0<a?"floor":"ceil"](a/60),2)+Nb(Math.abs(a%60),2))}},Rd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Qd=/^\-?\d+$/;Ec.$inject=["$locale"];var Nd=aa(O),Od=aa(Ia);Gc.$inject=["$parse"];var Zd=aa({restrict:"E", +compile:function(a,c){8>=P&&(c.href||c.name||c.$set("href",""),a.append(T.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var f="[object SVGAnimatedString]"===Ma.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(f)||a.preventDefault()})}}}),Pb={};r(ib,function(a,c){if("multiple"!=a){var d=la("ng-"+c);Pb[d]=function(){return{priority:100,link:function(a,f,g){a.$watch(g[d],function(a){g.$set(c,!!a)})}}}}});r(["src","srcset","href"],function(a){var c= +la("ng-"+a);Pb[c]=function(){return{priority:99,link:function(d,e,f){f.$observe(c,function(c){c&&(f.$set(a,c),P&&e.prop(a,f[a]))})}}}});var sb={$addControl:w,$removeControl:w,$setValidity:w,$setDirty:w,$setPristine:w};Jc.$inject=["$element","$attrs","$scope"];var Lc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Jc,compile:function(){return{pre:function(a,e,f,g){if(!f.action){var h=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};Kc(e[0], +"submit",h);e.on("$destroy",function(){c(function(){Eb(e[0],"submit",h)},0,!1)})}var n=e.parent().controller("form"),k=f.name||f.ngForm;k&&ob(a,k,g,k);if(n)e.on("$destroy",function(){n.$removeControl(g);k&&ob(a,k,s,k);t(g,sb)})}}}}}]},$d=Lc(),ae=Lc(!0),be=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,ce=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,de=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Mc={text:ub,number:function(a,c,d,e,f,g){ub(a,c,d,e,f,g); +e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||de.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return s});e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return na(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);return na(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return na(e, +"number",e.$isEmpty(a)||wb(a),a)})},url:function(a,c,d,e,f,g){ub(a,c,d,e,f,g);a=function(a){return na(e,"url",e.$isEmpty(a)||be.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,f,g){ub(a,c,d,e,f,g);a=function(a){return na(e,"email",e.$isEmpty(a)||ce.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){x(d.name)&&c.attr("name",$a());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked= +d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var f=d.ngTrueValue,g=d.ngFalseValue;D(f)||(f=!0);D(g)||(g=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==f};e.$formatters.push(function(a){return a===f});e.$parsers.push(function(a){return a?f:g})},hidden:w,button:w,submit:w,reset:w,file:w},Nc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel", +link:function(d,e,f,g){g&&(Mc[O(f.type)]||Mc.text)(d,e,f,g,c,a)}}}],rb="ng-valid",qb="ng-invalid",Ja="ng-pristine",tb="ng-dirty",ee=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,f){function g(a,c){c=c?"-"+db(c,"-"):"";e.removeClass((a?qb:rb)+c).addClass((a?rb:qb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var h=f(d.ngModel), +n=h.assign;if(!n)throw E("ngModel")("nonassign",d.ngModel,ga(e));this.$render=w;this.$isEmpty=function(a){return x(a)||""===a||null===a||a!==a};var k=e.inheritedData("$formController")||sb,l=0,m=this.$error={};e.addClass(Ja);g(!0);this.$setValidity=function(a,c){m[a]!==!c&&(c?(m[a]&&l--,l||(g(!0),this.$valid=!0,this.$invalid=!1)):(g(!1),this.$invalid=!0,this.$valid=!1,l++),m[a]=!c,g(c,a),k.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;e.removeClass(tb).addClass(Ja)}; +this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,e.removeClass(Ja).addClass(tb),k.$setDirty());r(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,n(a,d),r(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var p=this;a.$watch(function(){var c=h(a);if(p.$modelValue!==c){var d=p.$formatters,e=d.length;for(p.$modelValue=c;e--;)c=d[e](c);p.$viewValue!==c&&(p.$viewValue=c,p.$render())}return c})}],fe=function(){return{require:["ngModel", +"^?form"],controller:ee,link:function(a,c,d,e){var f=e[0],g=e[1]||sb;g.$addControl(f);a.$on("$destroy",function(){g.$removeControl(f)})}}},ge=aa({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Oc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var f=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(f);e.$parsers.unshift(f);d.$observe("required", +function(){f(e.$viewValue)})}}}},he=function(){return{require:"ngModel",link:function(a,c,d,e){var f=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!x(a)){var c=[];a&&r(a.split(f),function(a){a&&c.push(da(a))});return c}});e.$formatters.push(function(a){return H(a)?a.join(", "):s});e.$isEmpty=function(a){return!a||!a.length}}}},ie=/^(true|false|\d+)$/,je=function(){return{priority:100,compile:function(a,c){return ie.test(c.ngValue)?function(a,c,f){f.$set("value", +a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",a)})}}}},ke=sa(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==s?"":a)})}),le=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],me=["$sce","$parse",function(a,c){return function(d,e,f){e.addClass("ng-binding").data("$binding", +f.ngBindHtml);var g=c(f.ngBindHtml);d.$watch(function(){return(g(d)||"").toString()},function(c){e.html(a.getTrustedHtml(g(d))||"")})}}],ne=Ob("",!0),oe=Ob("Odd",0),pe=Ob("Even",1),qe=sa({compile:function(a,c){c.$set("ngCloak",s);a.removeClass("ng-cloak")}}),re=[function(){return{scope:!0,controller:"@",priority:500}}],Pc={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=la("ng-"+ +a);Pc[c]=["$parse",function(d){return{compile:function(e,f){var g=d(f[c]);return function(c,d,e){d.on(O(a),function(a){c.$apply(function(){g(c,{$event:a})})})}}}}]});var se=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,n;c.$watch(e.ngIf,function(f){Pa(f)?n||(n=c.$new(),g(n,function(c){c[c.length++]=T.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)})):(n&&(n.$destroy(),n=null),h&&(a.leave(zb(h.clone)), +h=null))})}}}],te=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,f){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ba.noop,compile:function(g,h){var n=h.ngInclude||h.src,k=h.onload||"",l=h.autoscroll;return function(g,h,q,r,B){var s=0,u,t,z=function(){u&&(u.$destroy(),u=null);t&&(e.leave(t),t=null)};g.$watch(f.parseAsResourceUrl(n),function(f){var n=function(){!v(l)||l&&!g.$eval(l)||d()},q=++s;f?(a.get(f,{cache:c}).success(function(a){if(q=== +s){var c=g.$new();r.template=a;a=B(c,function(a){z();e.enter(a,null,h,n)});u=c;t=a;u.$emit("$includeContentLoaded");g.$eval(k)}}).error(function(){q===s&&z()}),g.$emit("$includeContentRequested")):(z(),r.template=null)})}}}}],ue=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){d.html(f.template);a(d.contents())(c)}}}],ve=sa({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),we=sa({terminal:!0,priority:1E3}),xe=["$locale", +"$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,f,g){var h=g.count,n=g.$attr.when&&f.attr(g.$attr.when),k=g.offset||0,l=e.$eval(n)||{},m={},p=c.startSymbol(),q=c.endSymbol(),s=/^when(Minus)?(.+)$/;r(g,function(a,c){s.test(c)&&(l[O(c.replace("when","").replace("Minus","-"))]=f.attr(g.$attr[c]))});r(l,function(a,e){m[e]=c(a.replace(d,p+h+"-"+k+q))});e.$watch(function(){var c=parseFloat(e.$eval(h));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-k));return m[c](e,f,!0)},function(a){f.text(a)})}}}], +ye=["$parse","$animate",function(a,c){var d=E("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,f,g,h,n){var k=g.ngRepeat,l=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),m,p,q,s,t,v,u={$id:Ea};if(!l)throw d("iexp",k);g=l[1];h=l[2];(l=l[3])?(m=a(l),p=function(a,c,d){v&&(u[v]=a);u[t]=c;u.$index=d;return m(e,u)}):(q=function(a,c){return Ea(c)},s=function(a){return a});l=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp", +g);t=l[3]||l[1];v=l[2];var G={};e.$watchCollection(h,function(a){var g,h,l=f[0],m,u={},D,M,w,x,E,J,H=[];if(vb(a))E=a,m=p||q;else{m=p||s;E=[];for(w in a)a.hasOwnProperty(w)&&"$"!=w.charAt(0)&&E.push(w);E.sort()}D=E.length;h=H.length=E.length;for(g=0;g<h;g++)if(w=a===E?g:E[g],x=a[w],x=m(w,x,g),wa(x,"`track by` id"),G.hasOwnProperty(x))J=G[x],delete G[x],u[x]=J,H[g]=J;else{if(u.hasOwnProperty(x))throw r(H,function(a){a&&a.scope&&(G[a.id]=a)}),d("dupes",k,x);H[g]={id:x};u[x]=!1}for(w in G)G.hasOwnProperty(w)&& +(J=G[w],g=zb(J.clone),c.leave(g),r(g,function(a){a.$$NG_REMOVED=!0}),J.scope.$destroy());g=0;for(h=E.length;g<h;g++){w=a===E?g:E[g];x=a[w];J=H[g];H[g-1]&&(l=H[g-1].clone[H[g-1].clone.length-1]);if(J.scope){M=J.scope;m=l;do m=m.nextSibling;while(m&&m.$$NG_REMOVED);J.clone[0]!=m&&c.move(zb(J.clone),null,z(l));l=J.clone[J.clone.length-1]}else M=e.$new();M[t]=x;v&&(M[v]=w);M.$index=g;M.$first=0===g;M.$last=g===D-1;M.$middle=!(M.$first||M.$last);M.$odd=!(M.$even=0===(g&1));J.scope||n(M,function(a){a[a.length++]= +T.createComment(" end ngRepeat: "+k+" ");c.enter(a,null,z(l));l=a;J.scope=M;J.clone=a;u[J.id]=J})}G=u})}}}],ze=["$animate",function(a){return function(c,d,e){c.$watch(e.ngShow,function(c){a[Pa(c)?"removeClass":"addClass"](d,"ng-hide")})}}],Ae=["$animate",function(a){return function(c,d,e){c.$watch(e.ngHide,function(c){a[Pa(c)?"addClass":"removeClass"](d,"ng-hide")})}}],Be=sa(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Ce=["$animate", +function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,f){var g,h,n=[];c.$watch(e.ngSwitch||e.on,function(d){for(var l=0,m=n.length;l<m;l++)n[l].$destroy(),a.leave(h[l]);h=[];n=[];if(g=f.cases["!"+d]||f.cases["?"])c.$eval(e.change),r(g,function(d){var e=c.$new();n.push(e);d.transclude(e,function(c){var e=d.element;h.push(c);a.enter(c,e.parent(),e)})})})}}}],De=sa({transclude:"element",priority:800,require:"^ngSwitch",link:function(a, +c,d,e,f){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:f,element:c})}}),Ee=sa({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,f){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:f,element:c})}}),Fe=sa({link:function(a,c,d,e,f){if(!f)throw E("ngTransclude")("orphan",ga(c));f(function(a){c.empty();c.append(a)})}}),Ge=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"== +d.type&&a.put(d.id,c[0].text)}}}],He=E("ngOptions"),Ie=aa({terminal:!0}),Je=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,e={$setViewValue:w};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var n=this,k={},l=e,m;n.databound=d.ngModel;n.init=function(a, +c,d){l=a;m=d};n.addOption=function(c){wa(c,'"option value"');k[c]=!0;l.$viewValue==c&&(a.val(c),m.parent()&&m.remove())};n.removeOption=function(a){this.hasOption(a)&&(delete k[a],l.$viewValue==a&&this.renderUnknownOption(a))};n.renderUnknownOption=function(c){c="? "+Ea(c)+" ?";m.val(c);a.prepend(m);a.val(c);m.prop("selected",!0)};n.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){n.renderUnknownOption=w})}],link:function(e,g,h,n){function k(a,c,d,e){d.$render=function(){var a= +d.$viewValue;e.hasOption(a)?(D.parent()&&D.remove(),c.val(a),""===a&&w.prop("selected",!0)):x(a)&&w?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){D.parent()&&D.remove();d.$setViewValue(c.val())})})}function l(a,c,d){var e;d.$render=function(){var a=new Ta(d.$viewValue);r(c.find("option"),function(c){c.selected=v(a.get(c.value))})};a.$watch(function(){ta(e,d.$viewValue)||(e=ca(d.$viewValue),d.$render())});c.on("change",function(){a.$apply(function(){var a=[];r(c.find("option"), +function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function m(e,f,g){function h(){var a={"":[]},c=[""],d,k,s,t,x;t=g.$modelValue;x=z(e)||[];var A=n?Qb(x):x,D,X,C;X={};s=!1;var K,I;if(q)if(w&&H(t))for(s=new Ta([]),C=0;C<t.length;C++)X[m]=t[C],s.put(w(e,X),t[C]);else s=new Ta(t);for(C=0;D=A.length,C<D;C++){k=C;if(n){k=A[C];if("$"===k.charAt(0))continue;X[n]=k}X[m]=x[k];d=p(e,X)||"";(k=a[d])||(k=a[d]=[],c.push(d));q?d=v(s.remove(w?w(e,X):r(e,X))):(w?(d={},d[m]=t,d=w(e,d)===w(e,X)):d=t=== +r(e,X),s=s||d);K=l(e,X);K=v(K)?K:"";k.push({id:w?w(e,X):n?A[C]:C,label:K,selected:d})}q||(B||null===t?a[""].unshift({id:"",label:"",selected:!s}):s||a[""].unshift({id:"?",label:"",selected:!0}));X=0;for(A=c.length;X<A;X++){d=c[X];k=a[d];y.length<=X?(t={element:E.clone().attr("label",d),label:k.label},x=[t],y.push(x),f.append(t.element)):(x=y[X],t=x[0],t.label!=d&&t.element.attr("label",t.label=d));K=null;C=0;for(D=k.length;C<D;C++)s=k[C],(d=x[C+1])?(K=d.element,d.label!==s.label&&K.text(d.label=s.label), +d.id!==s.id&&K.val(d.id=s.id),K[0].selected!==s.selected&&K.prop("selected",d.selected=s.selected)):(""===s.id&&B?I=B:(I=u.clone()).val(s.id).attr("selected",s.selected).text(s.label),x.push({element:I,label:s.label,id:s.id,selected:s.selected}),K?K.after(I):t.element.append(I),K=I);for(C++;x.length>C;)x.pop().element.remove()}for(;y.length>X;)y.pop()[0].element.remove()}var k;if(!(k=t.match(d)))throw He("iexp",t,ga(f));var l=c(k[2]||k[1]),m=k[4]||k[6],n=k[5],p=c(k[3]||""),r=c(k[2]?k[1]:m),z=c(k[7]), +w=k[8]?c(k[8]):null,y=[[{element:f,label:""}]];B&&(a(B)(e),B.removeClass("ng-scope"),B.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=z(e)||[],d={},h,k,l,p,t,v,u;if(q)for(k=[],p=0,v=y.length;p<v;p++)for(a=y[p],l=1,t=a.length;l<t;l++){if((h=a[l].element)[0].selected){h=h.val();n&&(d[n]=h);if(w)for(u=0;u<c.length&&(d[m]=c[u],w(e,d)!=h);u++);else d[m]=c[h];k.push(r(e,d))}}else if(h=f.val(),"?"==h)k=s;else if(""===h)k=null;else if(w)for(u=0;u<c.length;u++){if(d[m]=c[u],w(e,d)== +h){k=r(e,d);break}}else d[m]=c[h],n&&(d[n]=h),k=r(e,d);g.$setViewValue(k)})});g.$render=h;e.$watch(h)}if(n[1]){var p=n[0];n=n[1];var q=h.multiple,t=h.ngOptions,B=!1,w,u=z(T.createElement("option")),E=z(T.createElement("optgroup")),D=u.clone();h=0;for(var y=g.children(),C=y.length;h<C;h++)if(""===y[h].value){w=B=y.eq(h);break}p.init(n,B,D);q&&(n.$isEmpty=function(a){return!a||0===a.length});t?m(e,g,n):q?l(e,g,n):k(e,g,n,p)}}}}],Ke=["$interpolate",function(a){var c={addOption:w,removeOption:w};return{restrict:"E", +priority:100,compile:function(d,e){if(x(e.value)){var f=a(d.text(),!0);f||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),l=k.data("$selectController")||k.parent().data("$selectController");l&&l.databound?d.prop("selected",!1):l=c;f?a.$watch(f,function(a,c){e.$set("value",a);a!==c&&l.removeOption(c);l.addOption(a)}):l.addOption(e.value);d.on("$destroy",function(){l.removeOption(e.value)})}}}}],Le=aa({restrict:"E",terminal:!0});(Ca=C.jQuery)?(z=Ca,t(Ca.fn,{scope:Fa.scope,isolateScope:Fa.isolateScope, +controller:Fa.controller,injector:Fa.injector,inheritedData:Fa.inheritedData}),Ab("remove",!0,!0,!1),Ab("empty",!1,!1,!1),Ab("html",!1,!1,!0)):z=R;Ba.element=z;(function(a){t(a,{bootstrap:$b,copy:ca,extend:t,equals:ta,element:z,forEach:r,injector:ac,noop:w,bind:cb,toJson:oa,fromJson:Wb,identity:Aa,isUndefined:x,isDefined:v,isString:D,isFunction:N,isObject:Z,isNumber:wb,isElement:Rc,isArray:H,version:Ud,isDate:La,lowercase:O,uppercase:Ia,callbacks:{counter:0},$$minErr:E,$$csp:Vb});Va=Wc(C);try{Va("ngLocale")}catch(c){Va("ngLocale", +[]).provider("$locale",td)}Va("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Dd});a.provider("$compile",kc).directive({a:Zd,input:Nc,textarea:Nc,form:$d,script:Ge,select:Je,style:Le,option:Ke,ngBind:ke,ngBindHtml:me,ngBindTemplate:le,ngClass:ne,ngClassEven:pe,ngClassOdd:oe,ngCloak:qe,ngController:re,ngForm:ae,ngHide:Ae,ngIf:se,ngInclude:te,ngInit:ve,ngNonBindable:we,ngPluralize:xe,ngRepeat:ye,ngShow:ze,ngStyle:Be,ngSwitch:Ce,ngSwitchWhen:De,ngSwitchDefault:Ee,ngOptions:Ie,ngTransclude:Fe, +ngModel:fe,ngList:he,ngChange:ge,required:Oc,ngRequired:Oc,ngValue:je}).directive({ngInclude:ue}).directive(Pb).directive(Pc);a.provider({$anchorScroll:ed,$animate:Wd,$browser:gd,$cacheFactory:hd,$controller:kd,$document:ld,$exceptionHandler:md,$filter:Cc,$interpolate:rd,$interval:sd,$http:nd,$httpBackend:pd,$location:vd,$log:wd,$parse:zd,$rootScope:Cd,$q:Ad,$sce:Gd,$sceDelegate:Fd,$sniffer:Hd,$templateCache:id,$timeout:Id,$window:Jd})}])})(Ba);z(T).ready(function(){Uc(T,$b)})})(window,document); +!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>'); +//# sourceMappingURL=angular.min.js.map diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css new file mode 100644 index 0000000..abcaa46 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css @@ -0,0 +1,267 @@ +/*! + * Stylesheet for the Date Range Picker, for use with Bootstrap 3.x + * + * Copyright 2013 Dan Grossman ( http://www.dangrossman.info ) + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Built for http://www.improvely.com + */ + +.daterangepicker.dropdown-menu { + max-width: none; + z-index: 3000; +} + +.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar { + float: left; + margin: 4px; +} + +.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar { + float: right; + margin: 4px; +} + +.daterangepicker .ranges { + width: 160px; + text-align: left; +} + +.daterangepicker .ranges .range_inputs>div { + float: left; +} + +.daterangepicker .ranges .range_inputs>div:nth-child(2) { + padding-left: 11px; +} + +.daterangepicker .calendar { + display: none; + max-width: 270px; +} + +.daterangepicker.show-calendar .calendar { + display: block; +} + +.daterangepicker .calendar.single .calendar-date { + border: none; +} + +.daterangepicker .calendar th, .daterangepicker .calendar td { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + white-space: nowrap; + text-align: center; + min-width: 32px; +} + +.daterangepicker .daterangepicker_start_input label, +.daterangepicker .daterangepicker_end_input label { + color: #333; + display: block; + font-size: 11px; + font-weight: normal; + height: 20px; + line-height: 20px; + margin-bottom: 2px; + text-shadow: #fff 1px 1px 0px; + text-transform: uppercase; + width: 74px; +} + +.daterangepicker .ranges input { + font-size: 11px; +} + +.daterangepicker .ranges .input-mini { + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; + color: #555; + display: block; + font-size: 11px; + height: 30px; + line-height: 30px; + vertical-align: middle; + margin: 0 0 10px 0; + padding: 0 6px; + width: 74px; +} + +.daterangepicker .ranges ul { + list-style: none; + margin: 0; + padding: 0; +} + +.daterangepicker .ranges li { + font-size: 13px; + background: #f5f5f5; + border: 1px solid #f5f5f5; + color: #08c; + padding: 3px 12px; + margin-bottom: 8px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + cursor: pointer; +} + +.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover { + background: #08c; + border: 1px solid #08c; + color: #fff; +} + +.daterangepicker .calendar-date { + border: 1px solid #ddd; + padding: 4px; + border-radius: 4px; + background: #fff; +} + +.daterangepicker .calendar-time { + text-align: center; + margin: 8px auto 0 auto; + line-height: 30px; +} + +.daterangepicker { + position: absolute; + background: #fff; + top: 100px; + left: 20px; + padding: 4px; + margin-top: 1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.daterangepicker.opensleft:before { + position: absolute; + top: -7px; + right: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.opensleft:after { + position: absolute; + top: -6px; + right: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker.opensright:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.opensright:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker table { + width: 100%; + margin: 0; +} + +.daterangepicker td, .daterangepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + cursor: pointer; + white-space: nowrap; +} + +.daterangepicker td.off { + color: #999; +} + +.daterangepicker td.disabled { + color: #999; +} + +.daterangepicker td.available:hover, .daterangepicker th.available:hover { + background: #eee; +} + +.daterangepicker td.in-range { + background: #ebf4f8; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.daterangepicker td.active, .daterangepicker td.active:hover { + background-color: #357ebd; + border-color: #3071a9; + color: #fff; +} + +.daterangepicker td.week, .daterangepicker th.week { + font-size: 80%; + color: #ccc; +} + +.daterangepicker select.monthselect, .daterangepicker select.yearselect { + font-size: 12px; + padding: 1px; + height: auto; + margin: 0; + cursor: default; +} + +.daterangepicker select.monthselect { + margin-right: 2%; + width: 56%; +} + +.daterangepicker select.yearselect { + width: 40%; +} + +.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.ampmselect { + width: 50px; + margin-bottom: 0; +} + +.daterangepicker_start_input { + float: left; +} + +.daterangepicker_end_input { + float: left; + padding-left: 11px +} + +.daterangepicker th.month { + width: auto; +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js new file mode 100644 index 0000000..579e875 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js @@ -0,0 +1,1026 @@ +/** + * @version: 1.3.7 + * @author: Dan Grossman http://www.dangrossman.info/ + * @date: 2014-04-29 + * @copyright: Copyright (c) 2012-2014 Dan Grossman. All rights reserved. + * @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0 + * @website: http://www.improvely.com/ + */ +!function ($, moment) { + + var DateRangePicker = function (element, options, cb) { + + // by default, the daterangepicker element is placed at the bottom of HTML body + this.parentEl = 'body'; + + //element that triggered the date range picker + this.element = $(element); + + //create the picker HTML object + var DRPTemplate = '<div class="daterangepicker dropdown-menu">' + + '<div class="calendar left"></div>' + + '<div class="calendar right"></div>' + + '<div class="ranges">' + + '<div class="range_inputs">' + + '<div class="daterangepicker_start_input">' + + '<label for="daterangepicker_start"></label>' + + '<input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" />' + + '</div>' + + '<div class="daterangepicker_end_input">' + + '<label for="daterangepicker_end"></label>' + + '<input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" />' + + '</div>' + + '<button class="applyBtn" disabled="disabled"></button> ' + + '<button class="cancelBtn"></button>' + + '</div>' + + '</div>' + + '</div>'; + + //custom options + if (typeof options !== 'object' || options === null) + options = {}; + + this.parentEl = (typeof options === 'object' && options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl); + this.container = $(DRPTemplate).appendTo(this.parentEl); + + this.setOptions(options, cb); + + //apply CSS classes and labels to buttons + var c = this.container; + $.each(this.buttonClasses, function (idx, val) { + c.find('button').addClass(val); + }); + this.container.find('.daterangepicker_start_input label').html(this.locale.fromLabel); + this.container.find('.daterangepicker_end_input label').html(this.locale.toLabel); + if (this.applyClass.length) + this.container.find('.applyBtn').addClass(this.applyClass); + if (this.cancelClass.length) + this.container.find('.cancelBtn').addClass(this.cancelClass); + this.container.find('.applyBtn').html(this.locale.applyLabel); + this.container.find('.cancelBtn').html(this.locale.cancelLabel); + + //event listeners + + this.container.find('.calendar') + .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this)) + .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this)) + .on('click.daterangepicker', 'td.available', $.proxy(this.clickDate, this)) + .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.enterDate, this)) + .on('mouseleave.daterangepicker', 'td.available', $.proxy(this.updateFormInputs, this)) + .on('change.daterangepicker', 'select.yearselect', $.proxy(this.updateMonthYear, this)) + .on('change.daterangepicker', 'select.monthselect', $.proxy(this.updateMonthYear, this)) + .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.ampmselect', $.proxy(this.updateTime, this)); + + this.container.find('.ranges') + .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) + .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)) + .on('click.daterangepicker', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.showCalendars, this)) + .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)) + .on('mouseenter.daterangepicker', 'li', $.proxy(this.enterRange, this)) + .on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this)); + + if (this.element.is('input')) { + this.element.on({ + 'click.daterangepicker': $.proxy(this.show, this), + 'focus.daterangepicker': $.proxy(this.show, this), + 'keyup.daterangepicker': $.proxy(this.updateFromControl, this) + }); + } else { + this.element.on('click.daterangepicker', $.proxy(this.toggle, this)); + } + + }; + + DateRangePicker.prototype = { + + constructor: DateRangePicker, + + setOptions: function(options, callback) { + + this.startDate = moment().startOf('day'); + this.endDate = moment().endOf('day'); + this.minDate = false; + this.maxDate = false; + this.dateLimit = false; + + this.showDropdowns = false; + this.showWeekNumbers = false; + this.timePicker = false; + this.timePickerIncrement = 30; + this.timePicker12Hour = true; + this.singleDatePicker = false; + this.ranges = {}; + + this.opens = 'right'; + if (this.element.hasClass('pull-right')) + this.opens = 'left'; + + this.buttonClasses = ['btn', 'btn-small']; + this.applyClass = 'btn-success'; + this.cancelClass = 'btn-default'; + + this.format = 'MM/DD/YYYY'; + this.separator = ' - '; + + this.locale = { + applyLabel: 'Apply', + cancelLabel: 'Cancel', + fromLabel: 'From', + toLabel: 'To', + weekLabel: 'W', + customRangeLabel: 'Custom Range', + daysOfWeek: moment()._lang._weekdaysMin.slice(), + monthNames: moment()._lang._monthsShort.slice(), + firstDay: 0 + }; + + this.cb = function () { }; + + if (typeof options.format === 'string') + this.format = options.format; + + if (typeof options.separator === 'string') + this.separator = options.separator; + + if (typeof options.startDate === 'string') + this.startDate = moment(options.startDate, this.format); + + if (typeof options.endDate === 'string') + this.endDate = moment(options.endDate, this.format); + + if (typeof options.minDate === 'string') + this.minDate = moment(options.minDate, this.format); + + if (typeof options.maxDate === 'string') + this.maxDate = moment(options.maxDate, this.format); + + if (typeof options.startDate === 'object') + this.startDate = moment(options.startDate); + + if (typeof options.endDate === 'object') + this.endDate = moment(options.endDate); + + if (typeof options.minDate === 'object') + this.minDate = moment(options.minDate); + + if (typeof options.maxDate === 'object') + this.maxDate = moment(options.maxDate); + + if (typeof options.applyClass === 'string') + this.applyClass = options.applyClass; + + if (typeof options.cancelClass === 'string') + this.cancelClass = options.cancelClass; + + if (typeof options.dateLimit === 'object') + this.dateLimit = options.dateLimit; + + // update day names order to firstDay + if (typeof options.locale === 'object') { + + if (typeof options.locale.daysOfWeek === 'object') { + // Create a copy of daysOfWeek to avoid modification of original + // options object for reusability in multiple daterangepicker instances + this.locale.daysOfWeek = options.locale.daysOfWeek.slice(); + } + + if (typeof options.locale.monthNames === 'object') { + this.locale.monthNames = options.locale.monthNames.slice(); + } + + if (typeof options.locale.firstDay === 'number') { + this.locale.firstDay = options.locale.firstDay; + var iterator = options.locale.firstDay; + while (iterator > 0) { + this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()); + iterator--; + } + } + + if (typeof options.locale.applyLabel === 'string') { + this.locale.applyLabel = options.locale.applyLabel; + } + + if (typeof options.locale.cancelLabel === 'string') { + this.locale.cancelLabel = options.locale.cancelLabel; + } + + if (typeof options.locale.fromLabel === 'string') { + this.locale.fromLabel = options.locale.fromLabel; + } + + if (typeof options.locale.toLabel === 'string') { + this.locale.toLabel = options.locale.toLabel; + } + + if (typeof options.locale.weekLabel === 'string') { + this.locale.weekLabel = options.locale.weekLabel; + } + + if (typeof options.locale.customRangeLabel === 'string') { + this.locale.customRangeLabel = options.locale.customRangeLabel; + } + } + + if (typeof options.opens === 'string') + this.opens = options.opens; + + if (typeof options.showWeekNumbers === 'boolean') { + this.showWeekNumbers = options.showWeekNumbers; + } + + if (typeof options.buttonClasses === 'string') { + this.buttonClasses = [options.buttonClasses]; + } + + if (typeof options.buttonClasses === 'object') { + this.buttonClasses = options.buttonClasses; + } + + if (typeof options.showDropdowns === 'boolean') { + this.showDropdowns = options.showDropdowns; + } + + if (typeof options.singleDatePicker === 'boolean') { + this.singleDatePicker = options.singleDatePicker; + } + + if (typeof options.timePicker === 'boolean') { + this.timePicker = options.timePicker; + } + + if (typeof options.timePickerIncrement === 'number') { + this.timePickerIncrement = options.timePickerIncrement; + } + + if (typeof options.timePicker12Hour === 'boolean') { + this.timePicker12Hour = options.timePicker12Hour; + } + + var start, end, range; + + //if no start/end dates set, check if an input element contains initial values + if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') { + if ($(this.element).is('input[type=text]')) { + var val = $(this.element).val(); + var split = val.split(this.separator); + start = end = null; + if (split.length == 2) { + start = moment(split[0], this.format); + end = moment(split[1], this.format); + } else if (this.singleDatePicker) { + start = moment(val, this.format); + end = moment(val, this.format); + } + if (start !== null && end !== null) { + this.startDate = start; + this.endDate = end; + } + } + } + + if (typeof options.ranges === 'object') { + for (range in options.ranges) { + + start = moment(options.ranges[range][0]); + end = moment(options.ranges[range][1]); + + // If we have a min/max date set, bound this range + // to it, but only if it would otherwise fall + // outside of the min/max. + if (this.minDate && start.isBefore(this.minDate)) + start = moment(this.minDate); + + if (this.maxDate && end.isAfter(this.maxDate)) + end = moment(this.maxDate); + + // If the end of the range is before the minimum (if min is set) OR + // the start of the range is after the max (also if set) don't display this + // range option. + if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) { + continue; + } + + this.ranges[range] = [start, end]; + } + + var list = '<ul>'; + for (range in this.ranges) { + list += '<li>' + range + '</li>'; + } + list += '<li>' + this.locale.customRangeLabel + '</li>'; + list += '</ul>'; + this.container.find('.ranges ul').remove(); + this.container.find('.ranges').prepend(list); + } + + if (typeof callback === 'function') { + this.cb = callback; + } + + if (!this.timePicker) { + this.startDate = this.startDate.startOf('day'); + this.endDate = this.endDate.endOf('day'); + } + + if (this.singleDatePicker) { + this.opens = 'right'; + this.container.find('.calendar.right').show(); + this.container.find('.calendar.left').hide(); + this.container.find('.ranges').hide(); + if (!this.container.find('.calendar.right').hasClass('single')) + this.container.find('.calendar.right').addClass('single'); + } else { + this.container.find('.calendar.right').removeClass('single'); + this.container.find('.ranges').show(); + } + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + this.oldChosenLabel = this.chosenLabel; + + this.leftCalendar = { + month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute()]), + calendar: [] + }; + + this.rightCalendar = { + month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute()]), + calendar: [] + }; + + if (this.opens == 'right') { + //swap calendar positions + var left = this.container.find('.calendar.left'); + var right = this.container.find('.calendar.right'); + left.removeClass('left').addClass('right'); + right.removeClass('right').addClass('left'); + } + + if (typeof options.ranges === 'undefined' && !this.singleDatePicker) { + this.container.addClass('show-calendar'); + } + + this.container.addClass('opens' + this.opens); + + this.updateView(); + this.updateCalendars(); + + }, + + setStartDate: function(startDate) { + if (typeof startDate === 'string') + this.startDate = moment(startDate, this.format); + + if (typeof startDate === 'object') + this.startDate = moment(startDate); + + if (!this.timePicker) + this.startDate = this.startDate.startOf('day'); + + this.oldStartDate = this.startDate.clone(); + + this.updateView(); + this.updateCalendars(); + }, + + setEndDate: function(endDate) { + if (typeof endDate === 'string') + this.endDate = moment(endDate, this.format); + + if (typeof endDate === 'object') + this.endDate = moment(endDate); + + if (!this.timePicker) + this.endDate = this.endDate.endOf('day'); + + this.oldEndDate = this.endDate.clone(); + + this.updateView(); + this.updateCalendars(); + }, + + updateView: function () { + this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()); + this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()); + this.updateFormInputs(); + }, + + updateFormInputs: function () { + this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format)); + this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format)); + + if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) { + this.container.find('button.applyBtn').removeAttr('disabled'); + } else { + this.container.find('button.applyBtn').attr('disabled', 'disabled'); + } + }, + + updateFromControl: function () { + if (!this.element.is('input')) return; + if (!this.element.val().length) return; + + var dateString = this.element.val().split(this.separator), + start = null, + end = null; + + if(dateString.length === 2) { + start = moment(dateString[0], this.format); + end = moment(dateString[1], this.format); + } + + if (this.singleDatePicker || start === null || end === null) { + start = moment(this.element.val(), this.format); + end = start; + } + + if (end.isBefore(start)) return; + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + + this.startDate = start; + this.endDate = end; + + if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) + this.notify(); + + this.updateCalendars(); + }, + + notify: function () { + this.updateView(); + this.cb(this.startDate, this.endDate, this.chosenLabel); + }, + + move: function () { + var parentOffset = { top: 0, left: 0 }; + if (!this.parentEl.is('body')) { + parentOffset = { + top: this.parentEl.offset().top - this.parentEl.scrollTop(), + left: this.parentEl.offset().left - this.parentEl.scrollLeft() + }; + } + + if (this.opens == 'left') { + this.container.css({ + top: this.element.offset().top + this.element.outerHeight() - parentOffset.top, + right: $(window).width() - this.element.offset().left - this.element.outerWidth() - parentOffset.left, + left: 'auto' + }); + if (this.container.offset().left < 0) { + this.container.css({ + right: 'auto', + left: 9 + }); + } + } else { + this.container.css({ + top: this.element.offset().top + this.element.outerHeight() - parentOffset.top, + left: this.element.offset().left - parentOffset.left, + right: 'auto' + }); + if (this.container.offset().left + this.container.outerWidth() > $(window).width()) { + this.container.css({ + left: 'auto', + right: 0 + }); + } + } + }, + + toggle: function (e) { + if (this.element.hasClass('active')) { + this.hide(); + } else { + this.show(); + } + }, + + show: function (e) { + this.element.addClass('active'); + this.container.show(); + this.move(); + + // Create a click proxy that is private to this instance of datepicker, for unbinding + this._outsideClickProxy = $.proxy(function (e) { this.outsideClick(e); }, this); + // Bind global datepicker mousedown for hiding and + $(document) + .on('mousedown.daterangepicker', this._outsideClickProxy) + // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them + .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy) + // and also close when focus changes to outside the picker (eg. tabbing between controls) + .on('focusin.daterangepicker', this._outsideClickProxy); + + this.element.trigger('show.daterangepicker', this); + }, + + outsideClick: function (e) { + var target = $(e.target); + // if the page is clicked anywhere except within the daterangerpicker/button + // itself then call this.hide() + if ( + target.closest(this.element).length || + target.closest(this.container).length || + target.closest('.calendar-date').length + ) return; + this.hide(); + }, + + hide: function (e) { + $(document) + .off('mousedown.daterangepicker', this._outsideClickProxy) + .off('click.daterangepicker', this._outsideClickProxy) + .off('focusin.daterangepicker', this._outsideClickProxy); + + this.element.removeClass('active'); + this.container.hide(); + + if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) + this.notify(); + + this.oldStartDate = this.startDate.clone(); + this.oldEndDate = this.endDate.clone(); + + this.element.trigger('hide.daterangepicker', this); + }, + + enterRange: function (e) { + // mouse pointer has entered a range label + var label = e.target.innerHTML; + if (label == this.locale.customRangeLabel) { + this.updateView(); + } else { + var dates = this.ranges[label]; + this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format)); + this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format)); + } + }, + + showCalendars: function() { + this.container.addClass('show-calendar'); + this.move(); + }, + + hideCalendars: function() { + this.container.removeClass('show-calendar'); + }, + + updateInputText: function() { + if (this.element.is('input') && !this.singleDatePicker) { + this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format)); + } else if (this.element.is('input')) { + this.element.val(this.startDate.format(this.format)); + } + }, + + clickRange: function (e) { + var label = e.target.innerHTML; + this.chosenLabel = label; + if (label == this.locale.customRangeLabel) { + this.showCalendars(); + } else { + var dates = this.ranges[label]; + + this.startDate = dates[0]; + this.endDate = dates[1]; + + if (!this.timePicker) { + this.startDate.startOf('day'); + this.endDate.endOf('day'); + } + + this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()); + this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()); + this.updateCalendars(); + + this.updateInputText(); + + this.hideCalendars(); + this.hide(); + this.element.trigger('apply.daterangepicker', this); + } + }, + + clickPrev: function (e) { + var cal = $(e.target).parents('.calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.subtract('month', 1); + } else { + this.rightCalendar.month.subtract('month', 1); + } + this.updateCalendars(); + }, + + clickNext: function (e) { + var cal = $(e.target).parents('.calendar'); + if (cal.hasClass('left')) { + this.leftCalendar.month.add('month', 1); + } else { + this.rightCalendar.month.add('month', 1); + } + this.updateCalendars(); + }, + + enterDate: function (e) { + + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.calendar'); + + if (cal.hasClass('left')) { + this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format)); + } else { + this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format)); + } + + }, + + clickDate: function (e) { + var title = $(e.target).attr('data-title'); + var row = title.substr(1, 1); + var col = title.substr(3, 1); + var cal = $(e.target).parents('.calendar'); + + var startDate, endDate; + if (cal.hasClass('left')) { + startDate = this.leftCalendar.calendar[row][col]; + endDate = this.endDate; + if (typeof this.dateLimit === 'object') { + var maxDate = moment(startDate).add(this.dateLimit).startOf('day'); + if (endDate.isAfter(maxDate)) { + endDate = maxDate; + } + } + } else { + startDate = this.startDate; + endDate = this.rightCalendar.calendar[row][col]; + if (typeof this.dateLimit === 'object') { + var minDate = moment(endDate).subtract(this.dateLimit).startOf('day'); + if (startDate.isBefore(minDate)) { + startDate = minDate; + } + } + } + + if (this.singleDatePicker && cal.hasClass('left')) { + endDate = startDate.clone(); + } else if (this.singleDatePicker && cal.hasClass('right')) { + startDate = endDate.clone(); + } + + cal.find('td').removeClass('active'); + + if (startDate.isSame(endDate) || startDate.isBefore(endDate)) { + $(e.target).addClass('active'); + this.startDate = startDate; + this.endDate = endDate; + this.chosenLabel = this.locale.customRangeLabel; + } else if (startDate.isAfter(endDate)) { + $(e.target).addClass('active'); + var difference = this.endDate.diff(this.startDate); + this.startDate = startDate; + this.endDate = moment(startDate).add('ms', difference); + this.chosenLabel = this.locale.customRangeLabel; + } + + this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()); + this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()); + this.updateCalendars(); + + if (!this.timePicker) + endDate.endOf('day'); + + if (this.singleDatePicker) + this.clickApply(); + }, + + clickApply: function (e) { + this.updateInputText(); + this.hide(); + this.element.trigger('apply.daterangepicker', this); + }, + + clickCancel: function (e) { + this.startDate = this.oldStartDate; + this.endDate = this.oldEndDate; + this.chosenLabel = this.oldChosenLabel; + this.updateView(); + this.updateCalendars(); + this.hide(); + this.element.trigger('cancel.daterangepicker', this); + }, + + updateMonthYear: function (e) { + var isLeft = $(e.target).closest('.calendar').hasClass('left'), + leftOrRight = isLeft ? 'left' : 'right', + cal = this.container.find('.calendar.'+leftOrRight); + + // Month must be Number for new moment versions + var month = parseInt(cal.find('.monthselect').val(), 10); + var year = cal.find('.yearselect').val(); + + this[leftOrRight+'Calendar'].month.month(month).year(year); + this.updateCalendars(); + }, + + updateTime: function(e) { + + var cal = $(e.target).closest('.calendar'), + isLeft = cal.hasClass('left'); + + var hour = parseInt(cal.find('.hourselect').val(), 10); + var minute = parseInt(cal.find('.minuteselect').val(), 10); + + if (this.timePicker12Hour) { + var ampm = cal.find('.ampmselect').val(); + if (ampm === 'PM' && hour < 12) + hour += 12; + if (ampm === 'AM' && hour === 12) + hour = 0; + } + + if (isLeft) { + var start = this.startDate.clone(); + start.hour(hour); + start.minute(minute); + this.startDate = start; + this.leftCalendar.month.hour(hour).minute(minute); + } else { + var end = this.endDate.clone(); + end.hour(hour); + end.minute(minute); + this.endDate = end; + this.rightCalendar.month.hour(hour).minute(minute); + } + + this.updateCalendars(); + }, + + updateCalendars: function () { + this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), 'left'); + this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), 'right'); + this.container.find('.calendar.left').empty().html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate)); + this.container.find('.calendar.right').empty().html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.startDate, this.maxDate)); + + this.container.find('.ranges li').removeClass('active'); + var customRange = true; + var i = 0; + for (var range in this.ranges) { + if (this.timePicker) { + if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')') + .addClass('active').html(); + } + } else { + //ignore times when comparing dates if time picker is not enabled + if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) { + customRange = false; + this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')') + .addClass('active').html(); + } + } + i++; + } + if (customRange) { + this.chosenLabel = this.container.find('.ranges li:last') + .addClass('active').html(); + } + }, + + buildCalendar: function (month, year, hour, minute, side) { + var firstDay = moment([year, month, 1]); + var lastMonth = moment(firstDay).subtract('month', 1).month(); + var lastYear = moment(firstDay).subtract('month', 1).year(); + + var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth(); + + var dayOfWeek = firstDay.day(); + + var i; + + //initialize a 6 rows x 7 columns array for the calendar + var calendar = []; + for (i = 0; i < 6; i++) { + calendar[i] = []; + } + + //populate the calendar with date objects + var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1; + if (startDay > daysInLastMonth) + startDay -= 7; + + if (dayOfWeek == this.locale.firstDay) + startDay = daysInLastMonth - 6; + + var curDate = moment([lastYear, lastMonth, startDay, 12, minute]); + var col, row; + for (i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('hour', 24)) { + if (i > 0 && col % 7 === 0) { + col = 0; + row++; + } + calendar[row][col] = curDate.clone().hour(hour); + curDate.hour(12); + } + + return calendar; + }, + + renderDropdowns: function (selected, minDate, maxDate) { + var currentMonth = selected.month(); + var monthHtml = '<select class="monthselect">'; + var inMinYear = false; + var inMaxYear = false; + + for (var m = 0; m < 12; m++) { + if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) { + monthHtml += "<option value='" + m + "'" + + (m === currentMonth ? " selected='selected'" : "") + + ">" + this.locale.monthNames[m] + "</option>"; + } + } + monthHtml += "</select>"; + + var currentYear = selected.year(); + var maxYear = (maxDate && maxDate.year()) || (currentYear + 5); + var minYear = (minDate && minDate.year()) || (currentYear - 50); + var yearHtml = '<select class="yearselect">'; + + for (var y = minYear; y <= maxYear; y++) { + yearHtml += '<option value="' + y + '"' + + (y === currentYear ? ' selected="selected"' : '') + + '>' + y + '</option>'; + } + + yearHtml += '</select>'; + + return monthHtml + yearHtml; + }, + + renderCalendar: function (calendar, selected, minDate, maxDate) { + + var html = '<div class="calendar-date">'; + html += '<table class="table-condensed">'; + html += '<thead>'; + html += '<tr>'; + + // add empty cell for week number + if (this.showWeekNumbers) + html += '<th></th>'; + + if (!minDate || minDate.isBefore(calendar[1][1])) { + html += '<th class="prev available"><i class="fa fa-arrow-left icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>'; + } else { + html += '<th></th>'; + } + + var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY"); + + if (this.showDropdowns) { + dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate); + } + + html += '<th colspan="5" class="month">' + dateHtml + '</th>'; + if (!maxDate || maxDate.isAfter(calendar[1][1])) { + html += '<th class="next available"><i class="fa fa-arrow-right icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>'; + } else { + html += '<th></th>'; + } + + html += '</tr>'; + html += '<tr>'; + + // add week number label + if (this.showWeekNumbers) + html += '<th class="week">' + this.locale.weekLabel + '</th>'; + + $.each(this.locale.daysOfWeek, function (index, dayOfWeek) { + html += '<th>' + dayOfWeek + '</th>'; + }); + + html += '</tr>'; + html += '</thead>'; + html += '<tbody>'; + + for (var row = 0; row < 6; row++) { + html += '<tr>'; + + // add week number + if (this.showWeekNumbers) + html += '<td class="week">' + calendar[row][0].week() + '</td>'; + + for (var col = 0; col < 7; col++) { + var cname = 'available '; + cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off'; + + if ((minDate && calendar[row][col].isBefore(minDate, 'day')) || (maxDate && calendar[row][col].isAfter(maxDate, 'day'))) { + cname = ' off disabled '; + } else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) { + cname += ' active '; + if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) { + cname += ' start-date '; + } + if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) { + cname += ' end-date '; + } + } else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) { + cname += ' in-range '; + if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; } + if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; } + } + + var title = 'r' + row + 'c' + col; + html += '<td class="' + cname.replace(/\s+/g, ' ').replace(/^\s?(.*?)\s?$/, '$1') + '" data-title="' + title + '">' + calendar[row][col].date() + '</td>'; + } + html += '</tr>'; + } + + html += '</tbody>'; + html += '</table>'; + html += '</div>'; + + var i; + if (this.timePicker) { + + html += '<div class="calendar-time">'; + html += '<select class="hourselect">'; + var start = 0; + var end = 23; + var selected_hour = selected.hour(); + if (this.timePicker12Hour) { + start = 1; + end = 12; + if (selected_hour >= 12) + selected_hour -= 12; + if (selected_hour === 0) + selected_hour = 12; + } + + for (i = start; i <= end; i++) { + if (i == selected_hour) { + html += '<option value="' + i + '" selected="selected">' + i + '</option>'; + } else { + html += '<option value="' + i + '">' + i + '</option>'; + } + } + + html += '</select> : '; + + html += '<select class="minuteselect">'; + + for (i = 0; i < 60; i += this.timePickerIncrement) { + var num = i; + if (num < 10) + num = '0' + num; + if (i == selected.minute()) { + html += '<option value="' + i + '" selected="selected">' + num + '</option>'; + } else { + html += '<option value="' + i + '">' + num + '</option>'; + } + } + + html += '</select> '; + + if (this.timePicker12Hour) { + html += '<select class="ampmselect">'; + if (selected.hour() >= 12) { + html += '<option value="AM">AM</option><option value="PM" selected="selected">PM</option>'; + } else { + html += '<option value="AM" selected="selected">AM</option><option value="PM">PM</option>'; + } + html += '</select>'; + } + + html += '</div>'; + + } + + return html; + + }, + + remove: function() { + + this.container.remove(); + this.element.off('.daterangepicker'); + this.element.removeData('daterangepicker'); + + } + + }; + + $.fn.daterangepicker = function (options, cb) { + this.each(function () { + var el = $(this); + if (el.data('daterangepicker')) + el.data('daterangepicker').remove(); + el.data('daterangepicker', new DateRangePicker(el, options, cb)); + }); + return this; + }; + +}(window.jQuery, window.moment); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css new file mode 100644 index 0000000..a406992 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css @@ -0,0 +1,347 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +.btn-default, +.btn-primary, +.btn-success, +.btn-info, +.btn-warning, +.btn-danger { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); +} +.btn-default:active, +.btn-primary:active, +.btn-success:active, +.btn-info:active, +.btn-warning:active, +.btn-danger:active, +.btn-default.active, +.btn-primary.active, +.btn-success.active, +.btn-info.active, +.btn-warning.active, +.btn-danger.active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn:active, +.btn.active { + background-image: none; +} +.btn-default { + text-shadow: 0 1px 0 #fff; + background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); + background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #dbdbdb; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus { + background-color: #e0e0e0; + background-position: 0 -15px; +} +.btn-default:active, +.btn-default.active { + background-color: #e0e0e0; + border-color: #dbdbdb; +} +.btn-primary { + background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); + background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #2b669a; +} +.btn-primary:hover, +.btn-primary:focus { + background-color: #2d6ca2; + background-position: 0 -15px; +} +.btn-primary:active, +.btn-primary.active { + background-color: #2d6ca2; + border-color: #2b669a; +} +.btn-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); + background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #3e8f3e; +} +.btn-success:hover, +.btn-success:focus { + background-color: #419641; + background-position: 0 -15px; +} +.btn-success:active, +.btn-success.active { + background-color: #419641; + border-color: #3e8f3e; +} +.btn-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); + background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #28a4c9; +} +.btn-info:hover, +.btn-info:focus { + background-color: #2aabd2; + background-position: 0 -15px; +} +.btn-info:active, +.btn-info.active { + background-color: #2aabd2; + border-color: #28a4c9; +} +.btn-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #e38d13; +} +.btn-warning:hover, +.btn-warning:focus { + background-color: #eb9316; + background-position: 0 -15px; +} +.btn-warning:active, +.btn-warning.active { + background-color: #eb9316; + border-color: #e38d13; +} +.btn-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); + background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-color: #b92c28; +} +.btn-danger:hover, +.btn-danger:focus { + background-color: #c12e2a; + background-position: 0 -15px; +} +.btn-danger:active, +.btn-danger.active { + background-color: #c12e2a; + border-color: #b92c28; +} +.thumbnail, +.img-thumbnail { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + background-color: #e8e8e8; + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + background-color: #357ebd; + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); + background-repeat: repeat-x; +} +.navbar-default { + background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); + background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); +} +.navbar-default .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); + background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); +} +.navbar-brand, +.navbar-nav > li > a { + text-shadow: 0 1px 0 rgba(255, 255, 255, .25); +} +.navbar-inverse { + background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); + background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background-repeat: repeat-x; +} +.navbar-inverse .navbar-nav > .active > a { + background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%); + background-image: linear-gradient(to bottom, #222 0%, #282828 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); + background-repeat: repeat-x; + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); +} +.navbar-inverse .navbar-brand, +.navbar-inverse .navbar-nav > li > a { + text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); +} +.navbar-static-top, +.navbar-fixed-top, +.navbar-fixed-bottom { + border-radius: 0; +} +.alert { + text-shadow: 0 1px 0 rgba(255, 255, 255, .2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); +} +.alert-success { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); + background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); + background-repeat: repeat-x; + border-color: #b2dba1; +} +.alert-info { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); + background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); + background-repeat: repeat-x; + border-color: #9acfea; +} +.alert-warning { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); + background-repeat: repeat-x; + border-color: #f5e79e; +} +.alert-danger { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); + background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); + background-repeat: repeat-x; + border-color: #dca7a7; +} +.progress { + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); + background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar { + background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); + background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-success { + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); + background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-info { + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); + background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-warning { + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); + background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); + background-repeat: repeat-x; +} +.progress-bar-danger { + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); + background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); + background-repeat: repeat-x; +} +.list-group { + border-radius: 4px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + text-shadow: 0 -1px 0 #3071a9; + background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); + background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); + background-repeat: repeat-x; + border-color: #3278b3; +} +.panel { + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); + box-shadow: 0 1px 2px rgba(0, 0, 0, .05); +} +.panel-default > .panel-heading { + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); + background-repeat: repeat-x; +} +.panel-primary > .panel-heading { + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); + background-repeat: repeat-x; +} +.panel-success > .panel-heading { + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); + background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); + background-repeat: repeat-x; +} +.panel-info > .panel-heading { + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); + background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); + background-repeat: repeat-x; +} +.panel-warning > .panel-heading { + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); + background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); + background-repeat: repeat-x; +} +.panel-danger > .panel-heading { + background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); + background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); + background-repeat: repeat-x; +} +.well { + background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); + background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); + background-repeat: repeat-x; + border-color: #dcdcdc; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); +} +/*# sourceMappingURL=bootstrap-theme.css.map */ diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css.map b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css.map new file mode 100644 index 0000000..b36fc9a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/theme.less","less/mixins.less"],"names":[],"mappings":"AAeA;AACA;AACA;AACA;AACA;AACA;EACE,wCAAA;ECoGA,2FAAA;EACQ,mFAAA;;ADhGR,YAAC;AAAD,YAAC;AAAD,YAAC;AAAD,SA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AlB;EACA,2BAAA;EACA,sHAAA;;ADtFJ,WAAY;ECmFR,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADrFJ,cAAe;ECkFX,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADpFJ,aAAc;ECiFV,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;AD5EJ;ECyEI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED1EF,qBAAA;EC1HA,yFAAA;EACQ,iFAAA","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n}\n\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","//\n// Mixins\n// --------------------------------------------------\n\n\n// Utilities\n// -------------------------\n\n// Clearfix\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n\n// WebKit-style focus\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n// Center-align a block level element\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n// Sizing shortcuts\n.size(@width; @height) {\n width: @width;\n height: @height;\n}\n.square(@size) {\n .size(@size; @size);\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n &::-moz-placeholder { color: @color; // Firefox\n opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Text overflow\n// Requires inline-block or block for proper styling\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note\n// that we cannot chain the mixins together in Less, so they are repeated.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n\n\n\n// CSS3 PROPERTIES\n// --------------------------------------------------\n\n// Single side border-radius\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support the\n// standard `box-shadow` property.\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Transitions\n.transition(@transition) {\n -webkit-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n// Transformations\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n transform: rotate(@degrees);\n}\n.scale(@ratio; @ratio-y...) {\n -webkit-transform: scale(@ratio, @ratio-y);\n -ms-transform: scale(@ratio, @ratio-y); // IE9 only\n transform: scale(@ratio, @ratio-y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n transform: translate(@x, @y);\n}\n.skew(@x; @y) {\n -webkit-transform: skew(@x, @y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n transform: skew(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// User select\n// For selecting text on the page\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n\n// Resize anything\n.resizable(@direction) {\n resize: @direction; // Options: horizontal, vertical, both\n overflow: auto; // Safari fix\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Opacity\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n\n\n\n// GRADIENTS\n// --------------------------------------------------\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n\n// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n\n\n\n// Retina images\n//\n// Short retina mixin for setting background-image and -size\n\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// COMPONENT MIXINS\n// --------------------------------------------------\n\n// Horizontal dividers\n// -------------------------\n// Dividers (basically an hr) within dropdowns and nav lists\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n\n// Panels\n// -------------------------\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse .panel-body {\n border-top-color: @border;\n }\n }\n & > .panel-footer {\n + .panel-collapse .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n\n// Alerts\n// -------------------------\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n\n// Tables\n// -------------------------\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n\n// List Groups\n// -------------------------\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a& {\n color: @color;\n\n .list-group-item-heading { color: inherit; }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n\n// Button variants\n// -------------------------\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:hover,\n &:focus,\n &:active,\n &.active,\n .open .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 8%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n// -------------------------\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n\n// Pagination\n// -------------------------\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n\n// Labels\n// -------------------------\n.label-variant(@color) {\n background-color: @color;\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n\n// Contextual backgrounds\n// -------------------------\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n\n// Typography\n// -------------------------\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n\n// Navbar vertical align\n// -------------------------\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n\n// Progress bars\n// -------------------------\n.progress-bar-variant(@color) {\n background-color: @color;\n .progress-striped & {\n #gradient > .striped();\n }\n}\n\n// Responsive utilities\n// -------------------------\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n\n\n// Grid System\n// -----------\n\n// Centered container element\n.container-fixed() {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n @media (min-width: @screen-xs-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-push(@columns) {\n @media (min-width: @screen-xs-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-pull(@columns) {\n @media (min-width: @screen-xs-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n\n// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-focus-border` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n"]} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.min.css b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.min.css new file mode 100644 index 0000000..ba4bd28 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css new file mode 100644 index 0000000..7f36651 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css @@ -0,0 +1,5785 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + select { + background: #fff !important; + } + .navbar { + display: none; + } + .table td, + .table th { + background-color: #fff !important; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 62.5%; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #428bca; + text-decoration: none; +} +a:hover, +a:focus { + color: #2a6496; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #999; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 200; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +cite { + font-style: normal; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-muted { + color: #999; +} +.text-primary { + color: #428bca; +} +a.text-primary:hover { + color: #3071a9; +} +.text-success { + color: #3c763d; +} +a.text-success:hover { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #428bca; +} +a.bg-primary:hover { + background-color: #3071a9; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #999; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +blockquote:before, +blockquote:after { + content: ""; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + white-space: nowrap; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: 0; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: 0; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: 0; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: 0; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: 0; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: 0; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: 0; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: 0; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + max-width: 100%; + background-color: transparent; +} +th { + text-align: left; +} +.table { + width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-child(odd) > td, +.table-striped > tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover > td, +.table-hover > tbody > tr:hover > th { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +@media (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + /* IE8-9 */ + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999; +} +.form-control::-webkit-input-placeholder { + color: #999; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + cursor: not-allowed; + background-color: #eee; + opacity: 1; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +input[type="date"] { + line-height: 34px; +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + display: block; + min-height: 20px; + padding-left: 20px; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + display: inline; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +.radio[disabled], +.radio-inline[disabled], +.checkbox[disabled], +.checkbox-inline[disabled], +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"], +fieldset[disabled] .radio, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.has-feedback .form-control-feedback { + position: absolute; + top: 25px; + right: 0; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.form-control-static { + margin-bottom: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + padding-left: 0; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + float: none; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .control-label, +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +.form-horizontal .form-control-static { + padding-top: 7px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + top: 0; + right: 15px; +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:hover, +.btn-default:focus, +.btn-default:active, +.btn-default.active, +.open .dropdown-toggle.btn-default { + color: #333; + background-color: #ebebeb; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #428bca; + border-color: #357ebd; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.open .dropdown-toggle.btn-primary { + color: #fff; + background-color: #3276b1; + border-color: #285e8e; +} +.btn-primary:active, +.btn-primary.active, +.open .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled, +.btn-primary[disabled], +fieldset[disabled] .btn-primary, +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled:active, +.btn-primary[disabled]:active, +fieldset[disabled] .btn-primary:active, +.btn-primary.disabled.active, +.btn-primary[disabled].active, +fieldset[disabled] .btn-primary.active { + background-color: #428bca; + border-color: #357ebd; +} +.btn-primary .badge { + color: #428bca; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.open .dropdown-toggle.btn-success { + color: #fff; + background-color: #47a447; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled, +.btn-success[disabled], +fieldset[disabled] .btn-success, +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled:active, +.btn-success[disabled]:active, +fieldset[disabled] .btn-success:active, +.btn-success.disabled.active, +.btn-success[disabled].active, +fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.open .dropdown-toggle.btn-info { + color: #fff; + background-color: #39b3d7; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled, +.btn-info[disabled], +fieldset[disabled] .btn-info, +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled:active, +.btn-info[disabled]:active, +fieldset[disabled] .btn-info:active, +.btn-info.disabled.active, +.btn-info[disabled].active, +fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.open .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ed9c28; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled, +.btn-warning[disabled], +fieldset[disabled] .btn-warning, +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled:active, +.btn-warning[disabled]:active, +fieldset[disabled] .btn-warning:active, +.btn-warning.disabled.active, +.btn-warning[disabled].active, +fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.open .dropdown-toggle.btn-danger { + color: #fff; + background-color: #d2322d; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled, +.btn-danger[disabled], +fieldset[disabled] .btn-danger, +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled:active, +.btn-danger[disabled]:active, +fieldset[disabled] .btn-danger:active, +.btn-danger.disabled.active, +.btn-danger[disabled].active, +fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #428bca; + cursor: pointer; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #2a6496; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #999; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; +} +.collapse.in { + display: block; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height .35s ease; + transition: height .35s ease; +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\2a"; +} +.glyphicon-plus:before { + content: "\2b"; +} +.glyphicon-euro:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + list-style: none; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #428bca; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #999; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px solid; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus { + outline: none; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child > .btn:last-child, +.btn-group > .btn-group:first-child > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +[data-toggle="buttons"] > .btn > input[type="radio"], +[data-toggle="buttons"] > .btn > input[type="checkbox"] { + display: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.33; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #999; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #999; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #428bca; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #428bca; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + max-height: 340px; + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: none; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } + .navbar-nav.navbar-right:last-child { + margin-right: -15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + padding-left: 0; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + float: none; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-form.navbar-right:last-child { + margin-right: -15px; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } + .navbar-text.navbar-right:last-child { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #999; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #999; +} +.navbar-inverse .navbar-nav > li > a { + color: #999; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #999; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #999; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #999; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #428bca; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + color: #2a6496; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 2; + color: #fff; + cursor: default; + background-color: #428bca; + border-color: #428bca; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #999; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +.label[href]:hover, +.label[href]:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #999; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #808080; +} +.label-primary { + background-color: #428bca; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #3071a9; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + background-color: #999; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +a.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #428bca; + background-color: #fff; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.container .jumbotron { + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + .container .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #428bca; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable { + padding-right: 35px; +} +.alert-dismissable .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #428bca; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-size: 40px 40px; +} +.progress.active .progress-bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media, +.media-body { + overflow: hidden; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +a.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +a.list-group-item:focus { + text-decoration: none; + background-color: #f5f5f5; +} +a.list-group-item.active, +a.list-group-item.active:hover, +a.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #428bca; + border-color: #428bca; +} +a.list-group-item.active .list-group-item-heading, +a.list-group-item.active:hover .list-group-item-heading, +a.list-group-item.active:focus .list-group-item-heading { + color: inherit; +} +a.list-group-item.active .list-group-item-text, +a.list-group-item.active:hover .list-group-item-text, +a.list-group-item.active:focus .list-group-item-text { + color: #e1edf7; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +a.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +a.list-group-item-success.active:hover, +a.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +a.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +a.list-group-item-info.active:hover, +a.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +a.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +a.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table { + margin-bottom: 0; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + overflow: hidden; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse .panel-body { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #428bca; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #428bca; + border-color: #428bca; +} +.panel-primary > .panel-heading + .panel-collapse .panel-body { + border-top-color: #428bca; +} +.panel-primary > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #428bca; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-footer + .panel-collapse .panel-body { + border-bottom-color: #ebccd1; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: auto; + overflow-y: scroll; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -moz-transition: -moz-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + transform: translate(0, -25%); +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + min-height: 16.42857143px; + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 20px; +} +.modal-footer { + padding: 19px 20px 20px; + margin-top: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + font-size: 12px; + line-height: 1.4; + visibility: visible; + filter: alpha(opacity=0); + opacity: 0; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + text-decoration: none; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + bottom: 0; + left: 5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + right: 5px; + bottom: 0; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + left: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + right: 5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, .5) 0%), color-stop(rgba(0, 0, 0, .0001) 100%)); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, .0001) 0%), color-stop(rgba(0, 0, 0, .5) 100%)); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: none; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + margin-left: -10px; + font-family: serif; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + margin-left: -15px; + font-size: 30px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; + visibility: hidden !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css.map b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css.map new file mode 100644 index 0000000..6bc5a2d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/normalize.less","less/print.less","less/scaffolding.less","less/mixins.less","less/variables.less","less/thumbnails.less","less/carousel.less","less/type.less","less/code.less","less/grid.less","less/tables.less","less/forms.less","less/buttons.less","less/button-groups.less","less/component-animations.less","less/glyphicons.less","less/dropdowns.less","less/input-groups.less","less/navs.less","less/navbar.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/pager.less","less/labels.less","less/badges.less","less/jumbotron.less","less/alerts.less","less/progress-bars.less","less/media.less","less/list-group.less","less/panels.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/responsive-utilities.less"],"names":[],"mappings":";AAQA;EACE,uBAAA;EACA,0BAAA;EACA,8BAAA;;AAOF;EACE,SAAA;;AAUF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,cAAA;;AAQF;AACA;AACA;AACA;EACE,qBAAA;EACA,wBAAA;;AAQF,KAAK,IAAI;EACP,aAAA;EACA,SAAA;;AAQF;AACA;EACE,aA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ACF,EAAE;IAAQ,mBAAA;;;AkCthBZ;EAAA;IlC0hBE,wBAAA","sourcesContent":["/*! normalize.css v3.0.0 | MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS text size adjust after orientation change, without disabling\n// user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined in IE 8/9.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9.\n// Hide the `template` element in IE, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background: transparent;\n}\n\n//\n// Improve readability when focused and also mouse hovered in all browsers.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9, Safari 5, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari 5 and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari 5, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow displayed oddly in IE 9.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari 5.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8+, and Opera\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n// (include `-moz` to future-proof).\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; // 2\n box-sizing: content-box;\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}","//\n// Basic print styles\n// --------------------------------------------------\n// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css\n\n@media print {\n\n * {\n text-shadow: none !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n background: transparent !important;\n box-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links for images, or javascript/internal links\n a[href^=\"javascript:\"]:after,\n a[href^=\"#\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245\n // Once fixed, we can just straight up remove this.\n select {\n background: #fff !important;\n }\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .table {\n td,\n th {\n background-color: #fff !important;\n }\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n}\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 62.5%;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: underline;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n","//\n// Mixins\n// --------------------------------------------------\n\n\n// Utilities\n// -------------------------\n\n// Clearfix\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n\n// WebKit-style focus\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n// Center-align a block level element\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n// Sizing shortcuts\n.size(@width; @height) {\n width: @width;\n height: @height;\n}\n.square(@size) {\n .size(@size; @size);\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n &::-moz-placeholder { color: @color; // Firefox\n opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Text overflow\n// Requires inline-block or block for proper styling\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note\n// that we cannot chain the mixins together in Less, so they are repeated.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n\n\n\n// CSS3 PROPERTIES\n// --------------------------------------------------\n\n// Single side border-radius\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support the\n// standard `box-shadow` property.\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Transitions\n.transition(@transition) {\n -webkit-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n// Transformations\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n transform: rotate(@degrees);\n}\n.scale(@ratio; @ratio-y...) {\n -webkit-transform: scale(@ratio, @ratio-y);\n -ms-transform: scale(@ratio, @ratio-y); // IE9 only\n transform: scale(@ratio, @ratio-y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n transform: translate(@x, @y);\n}\n.skew(@x; @y) {\n -webkit-transform: skew(@x, @y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n transform: skew(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// User select\n// For selecting text on the page\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n\n// Resize anything\n.resizable(@direction) {\n resize: @direction; // Options: horizontal, vertical, both\n overflow: auto; // Safari fix\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Opacity\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n\n\n\n// GRADIENTS\n// --------------------------------------------------\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n\n// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n\n\n\n// Retina images\n//\n// Short retina mixin for setting background-image and -size\n\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// COMPONENT MIXINS\n// --------------------------------------------------\n\n// Horizontal dividers\n// -------------------------\n// Dividers (basically an hr) within dropdowns and nav lists\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n\n// Panels\n// -------------------------\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse .panel-body {\n border-top-color: @border;\n }\n }\n & > .panel-footer {\n + .panel-collapse .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n\n// Alerts\n// -------------------------\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n\n// Tables\n// -------------------------\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n\n// List Groups\n// -------------------------\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a& {\n color: @color;\n\n .list-group-item-heading { color: inherit; }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n\n// Button variants\n// -------------------------\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:hover,\n &:focus,\n &:active,\n &.active,\n .open .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 8%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n// -------------------------\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n\n// Pagination\n// -------------------------\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n\n// Labels\n// -------------------------\n.label-variant(@color) {\n background-color: @color;\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n\n// Contextual backgrounds\n// -------------------------\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n\n// Typography\n// -------------------------\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n\n// Navbar vertical align\n// -------------------------\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n\n// Progress bars\n// -------------------------\n.progress-bar-variant(@color) {\n background-color: @color;\n .progress-striped & {\n #gradient > .striped();\n }\n}\n\n// Responsive utilities\n// -------------------------\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n\n\n// Grid System\n// -----------\n\n// Centered container element\n.container-fixed() {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n @media (min-width: @screen-xs-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-push(@columns) {\n @media (min-width: @screen-xs-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-pull(@columns) {\n @media (min-width: @screen-xs-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n\n// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-focus-border` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Variables\n// --------------------------------------------------\n\n\n//== Colors\n//\n//## Gray and brand colors for use across Bootstrap.\n\n@gray-darker: lighten(#000, 13.5%); // #222\n@gray-dark: lighten(#000, 20%); // #333\n@gray: lighten(#000, 33.5%); // #555\n@gray-light: lighten(#000, 60%); // #999\n@gray-lighter: lighten(#000, 93.5%); // #eee\n\n@brand-primary: #428bca;\n@brand-success: #5cb85c;\n@brand-info: #5bc0de;\n@brand-warning: #f0ad4e;\n@brand-danger: #d9534f;\n\n\n//== Scaffolding\n//\n// ## Settings for some of the most global styles.\n\n//** Background color for `<body>`.\n@body-bg: #fff;\n//** Global text color on `<body>`.\n@text-color: @gray-dark;\n\n//** Global textual link color.\n@link-color: @brand-primary;\n//** Link hover color set via `darken()` function.\n@link-hover-color: darken(@link-color, 15%);\n\n\n//== Typography\n//\n//## Font, line-height, and color for body text, headings, and more.\n\n@font-family-sans-serif: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n@font-family-serif: Georgia, \"Times New Roman\", Times, serif;\n//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.\n@font-family-monospace: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n@font-family-base: @font-family-sans-serif;\n\n@font-size-base: 14px;\n@font-size-large: ceil((@font-size-base * 1.25)); // ~18px\n@font-size-small: ceil((@font-size-base * 0.85)); // ~12px\n\n@font-size-h1: floor((@font-size-base * 2.6)); // ~36px\n@font-size-h2: floor((@font-size-base * 2.15)); // ~30px\n@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px\n@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px\n@font-size-h5: @font-size-base;\n@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px\n\n//** Unit-less `line-height` for use in components like buttons.\n@line-height-base: 1.428571429; // 20/14\n//** Computed \"line-height\" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.\n@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px\n\n//** By default, this inherits from the `<body>`.\n@headings-font-family: inherit;\n@headings-font-weight: 500;\n@headings-line-height: 1.1;\n@headings-color: inherit;\n\n\n//-- Iconography\n//\n//## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.\n\n@icon-font-path: \"../fonts/\";\n@icon-font-name: \"glyphicons-halflings-regular\";\n@icon-font-svg-id: \"glyphicons_halflingsregular\";\n\n//== Components\n//\n//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).\n\n@padding-base-vertical: 6px;\n@padding-base-horizontal: 12px;\n\n@padding-large-vertical: 10px;\n@padding-large-horizontal: 16px;\n\n@padding-small-vertical: 5px;\n@padding-small-horizontal: 10px;\n\n@padding-xs-vertical: 1px;\n@padding-xs-horizontal: 5px;\n\n@line-height-large: 1.33;\n@line-height-small: 1.5;\n\n@border-radius-base: 4px;\n@border-radius-large: 6px;\n@border-radius-small: 3px;\n\n//** Global color for active items (e.g., navs or dropdowns).\n@component-active-color: #fff;\n//** Global background color for active items (e.g., navs or dropdowns).\n@component-active-bg: @brand-primary;\n\n//** Width of the `border` for generating carets that indicator dropdowns.\n@caret-width-base: 4px;\n//** Carets increase slightly in size for larger components.\n@caret-width-large: 5px;\n\n\n//== Tables\n//\n//## Customizes the `.table` component with basic values, each used across all table variations.\n\n//** Padding for `<th>`s and `<td>`s.\n@table-cell-padding: 8px;\n//** Padding for cells in `.table-condensed`.\n@table-condensed-cell-padding: 5px;\n\n//** Default background color used for all tables.\n@table-bg: transparent;\n//** Background color used for `.table-striped`.\n@table-bg-accent: #f9f9f9;\n//** Background color used for `.table-hover`.\n@table-bg-hover: #f5f5f5;\n@table-bg-active: @table-bg-hover;\n\n//** Border color for table and cell borders.\n@table-border-color: #ddd;\n\n\n//== Buttons\n//\n//## For each of Bootstrap's buttons, define text, background and border color.\n\n@btn-font-weight: normal;\n\n@btn-default-color: #333;\n@btn-default-bg: #fff;\n@btn-default-border: #ccc;\n\n@btn-primary-color: #fff;\n@btn-primary-bg: @brand-primary;\n@btn-primary-border: darken(@btn-primary-bg, 5%);\n\n@btn-success-color: #fff;\n@btn-success-bg: @brand-success;\n@btn-success-border: darken(@btn-success-bg, 5%);\n\n@btn-info-color: #fff;\n@btn-info-bg: @brand-info;\n@btn-info-border: darken(@btn-info-bg, 5%);\n\n@btn-warning-color: #fff;\n@btn-warning-bg: @brand-warning;\n@btn-warning-border: darken(@btn-warning-bg, 5%);\n\n@btn-danger-color: #fff;\n@btn-danger-bg: @brand-danger;\n@btn-danger-border: darken(@btn-danger-bg, 5%);\n\n@btn-link-disabled-color: @gray-light;\n\n\n//== Forms\n//\n//##\n\n//** `<input>` background color\n@input-bg: #fff;\n//** `<input disabled>` background color\n@input-bg-disabled: @gray-lighter;\n\n//** Text color for `<input>`s\n@input-color: @gray;\n//** `<input>` border color\n@input-border: #ccc;\n//** `<input>` border radius\n@input-border-radius: @border-radius-base;\n//** Border color for inputs on focus\n@input-border-focus: #66afe9;\n\n//** Placeholder text color\n@input-color-placeholder: @gray-light;\n\n//** Default `.form-control` height\n@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);\n//** Large `.form-control` height\n@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);\n//** Small `.form-control` height\n@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);\n\n@legend-color: @gray-dark;\n@legend-border-color: #e5e5e5;\n\n//** Background color for textual input addons\n@input-group-addon-bg: @gray-lighter;\n//** Border color for textual input addons\n@input-group-addon-border-color: @input-border;\n\n\n//== Dropdowns\n//\n//## Dropdown menu container and contents.\n\n//** Background for the dropdown menu.\n@dropdown-bg: #fff;\n//** Dropdown menu `border-color`.\n@dropdown-border: rgba(0,0,0,.15);\n//** Dropdown menu `border-color` **for IE8**.\n@dropdown-fallback-border: #ccc;\n//** Divider color for between dropdown items.\n@dropdown-divider-bg: #e5e5e5;\n\n//** Dropdown link text color.\n@dropdown-link-color: @gray-dark;\n//** Hover color for dropdown links.\n@dropdown-link-hover-color: darken(@gray-dark, 5%);\n//** Hover background for dropdown links.\n@dropdown-link-hover-bg: #f5f5f5;\n\n//** Active dropdown menu item text color.\n@dropdown-link-active-color: @component-active-color;\n//** Active dropdown menu item background color.\n@dropdown-link-active-bg: @component-active-bg;\n\n//** Disabled dropdown menu item background color.\n@dropdown-link-disabled-color: @gray-light;\n\n//** Text color for headers within dropdown menus.\n@dropdown-header-color: @gray-light;\n\n// Note: Deprecated @dropdown-caret-color as of v3.1.0\n@dropdown-caret-color: #000;\n\n\n//-- Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n//\n// Note: These variables are not generated into the Customizer.\n\n@zindex-navbar: 1000;\n@zindex-dropdown: 1000;\n@zindex-popover: 1010;\n@zindex-tooltip: 1030;\n@zindex-navbar-fixed: 1030;\n@zindex-modal-background: 1040;\n@zindex-modal: 1050;\n\n\n//== Media queries breakpoints\n//\n//## Define the breakpoints at which your layout will change, adapting to different screen sizes.\n\n// Extra small screen / phone\n// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1\n@screen-xs: 480px;\n@screen-xs-min: @screen-xs;\n@screen-phone: @screen-xs-min;\n\n// Small screen / tablet\n// Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1\n@screen-sm: 768px;\n@screen-sm-min: @screen-sm;\n@screen-tablet: @screen-sm-min;\n\n// Medium screen / desktop\n// Note: Deprecated @screen-md and @screen-desktop as of v3.0.1\n@screen-md: 992px;\n@screen-md-min: @screen-md;\n@screen-desktop: @screen-md-min;\n\n// Large screen / wide desktop\n// Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1\n@screen-lg: 1200px;\n@screen-lg-min: @screen-lg;\n@screen-lg-desktop: @screen-lg-min;\n\n// So media queries don't overlap when required, provide a maximum\n@screen-xs-max: (@screen-sm-min - 1);\n@screen-sm-max: (@screen-md-min - 1);\n@screen-md-max: (@screen-lg-min - 1);\n\n\n//== Grid system\n//\n//## Define your custom responsive grid.\n\n//** Number of columns in the grid.\n@grid-columns: 12;\n//** Padding between columns. Gets divided in half for the left and right.\n@grid-gutter-width: 30px;\n// Navbar collapse\n//** Point at which the navbar becomes uncollapsed.\n@grid-float-breakpoint: @screen-sm-min;\n//** Point at which the navbar begins collapsing.\n@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);\n\n\n//== Container sizes\n//\n//## Define the maximum width of `.container` for different screen sizes.\n\n// Small screen / tablet\n@container-tablet: ((720px + @grid-gutter-width));\n//** For `@screen-sm-min` and up.\n@container-sm: @container-tablet;\n\n// Medium screen / desktop\n@container-desktop: ((940px + @grid-gutter-width));\n//** For `@screen-md-min` and up.\n@container-md: @container-desktop;\n\n// Large screen / wide desktop\n@container-large-desktop: ((1140px + @grid-gutter-width));\n//** For `@screen-lg-min` and up.\n@container-lg: @container-large-desktop;\n\n\n//== Navbar\n//\n//##\n\n// Basics of a navbar\n@navbar-height: 50px;\n@navbar-margin-bottom: @line-height-computed;\n@navbar-border-radius: @border-radius-base;\n@navbar-padding-horizontal: floor((@grid-gutter-width / 2));\n@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);\n@navbar-collapse-max-height: 340px;\n\n@navbar-default-color: #777;\n@navbar-default-bg: #f8f8f8;\n@navbar-default-border: darken(@navbar-default-bg, 6.5%);\n\n// Navbar links\n@navbar-default-link-color: #777;\n@navbar-default-link-hover-color: #333;\n@navbar-default-link-hover-bg: transparent;\n@navbar-default-link-active-color: #555;\n@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);\n@navbar-default-link-disabled-color: #ccc;\n@navbar-default-link-disabled-bg: transparent;\n\n// Navbar brand label\n@navbar-default-brand-color: @navbar-default-link-color;\n@navbar-default-brand-hover-color: darken(@navbar-default-brand-color, 10%);\n@navbar-default-brand-hover-bg: transparent;\n\n// Navbar toggle\n@navbar-default-toggle-hover-bg: #ddd;\n@navbar-default-toggle-icon-bar-bg: #888;\n@navbar-default-toggle-border-color: #ddd;\n\n\n// Inverted navbar\n// Reset inverted navbar basics\n@navbar-inverse-color: @gray-light;\n@navbar-inverse-bg: #222;\n@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);\n\n// Inverted navbar links\n@navbar-inverse-link-color: @gray-light;\n@navbar-inverse-link-hover-color: #fff;\n@navbar-inverse-link-hover-bg: transparent;\n@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color;\n@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%);\n@navbar-inverse-link-disabled-color: #444;\n@navbar-inverse-link-disabled-bg: transparent;\n\n// Inverted navbar brand label\n@navbar-inverse-brand-color: @navbar-inverse-link-color;\n@navbar-inverse-brand-hover-color: #fff;\n@navbar-inverse-brand-hover-bg: transparent;\n\n// Inverted navbar toggle\n@navbar-inverse-toggle-hover-bg: #333;\n@navbar-inverse-toggle-icon-bar-bg: #fff;\n@navbar-inverse-toggle-border-color: #333;\n\n\n//== Navs\n//\n//##\n\n//=== Shared nav styles\n@nav-link-padding: 10px 15px;\n@nav-link-hover-bg: @gray-lighter;\n\n@nav-disabled-link-color: @gray-light;\n@nav-disabled-link-hover-color: @gray-light;\n\n@nav-open-link-hover-color: #fff;\n\n//== Tabs\n@nav-tabs-border-color: #ddd;\n\n@nav-tabs-link-hover-border-color: @gray-lighter;\n\n@nav-tabs-active-link-hover-bg: @body-bg;\n@nav-tabs-active-link-hover-color: @gray;\n@nav-tabs-active-link-hover-border-color: #ddd;\n\n@nav-tabs-justified-link-border-color: #ddd;\n@nav-tabs-justified-active-link-border-color: @body-bg;\n\n//== Pills\n@nav-pills-border-radius: @border-radius-base;\n@nav-pills-active-link-hover-bg: @component-active-bg;\n@nav-pills-active-link-hover-color: @component-active-color;\n\n\n//== Pagination\n//\n//##\n\n@pagination-color: @link-color;\n@pagination-bg: #fff;\n@pagination-border: #ddd;\n\n@pagination-hover-color: @link-hover-color;\n@pagination-hover-bg: @gray-lighter;\n@pagination-hover-border: #ddd;\n\n@pagination-active-color: #fff;\n@pagination-active-bg: @brand-primary;\n@pagination-active-border: @brand-primary;\n\n@pagination-disabled-color: @gray-light;\n@pagination-disabled-bg: #fff;\n@pagination-disabled-border: #ddd;\n\n\n//== Pager\n//\n//##\n\n@pager-bg: @pagination-bg;\n@pager-border: @pagination-border;\n@pager-border-radius: 15px;\n\n@pager-hover-bg: @pagination-hover-bg;\n\n@pager-active-bg: @pagination-active-bg;\n@pager-active-color: @pagination-active-color;\n\n@pager-disabled-color: @pagination-disabled-color;\n\n\n//== Jumbotron\n//\n//##\n\n@jumbotron-padding: 30px;\n@jumbotron-color: inherit;\n@jumbotron-bg: @gray-lighter;\n@jumbotron-heading-color: inherit;\n@jumbotron-font-size: ceil((@font-size-base * 1.5));\n\n\n//== Form states and alerts\n//\n//## Define colors for form feedback states and, by default, alerts.\n\n@state-success-text: #3c763d;\n@state-success-bg: #dff0d8;\n@state-success-border: darken(spin(@state-success-bg, -10), 5%);\n\n@state-info-text: #31708f;\n@state-info-bg: #d9edf7;\n@state-info-border: darken(spin(@state-info-bg, -10), 7%);\n\n@state-warning-text: #8a6d3b;\n@state-warning-bg: #fcf8e3;\n@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);\n\n@state-danger-text: #a94442;\n@state-danger-bg: #f2dede;\n@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);\n\n\n//== Tooltips\n//\n//##\n\n//** Tooltip max width\n@tooltip-max-width: 200px;\n//** Tooltip text color\n@tooltip-color: #fff;\n//** Tooltip background color\n@tooltip-bg: #000;\n@tooltip-opacity: .9;\n\n//** Tooltip arrow width\n@tooltip-arrow-width: 5px;\n//** Tooltip arrow color\n@tooltip-arrow-color: @tooltip-bg;\n\n\n//== Popovers\n//\n//##\n\n//** Popover body background color\n@popover-bg: #fff;\n//** Popover maximum width\n@popover-max-width: 276px;\n//** Popover border color\n@popover-border-color: rgba(0,0,0,.2);\n//** Popover fallback border color\n@popover-fallback-border-color: #ccc;\n\n//** Popover title background color\n@popover-title-bg: darken(@popover-bg, 3%);\n\n//** Popover arrow width\n@popover-arrow-width: 10px;\n//** Popover arrow color\n@popover-arrow-color: #fff;\n\n//** Popover outer arrow width\n@popover-arrow-outer-width: (@popover-arrow-width + 1);\n//** Popover outer arrow color\n@popover-arrow-outer-color: fadein(@popover-border-color, 5%);\n//** Popover outer arrow fallback color\n@popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);\n\n\n//== Labels\n//\n//##\n\n//** Default label background color\n@label-default-bg: @gray-light;\n//** Primary label background color\n@label-primary-bg: @brand-primary;\n//** Success label background color\n@label-success-bg: @brand-success;\n//** Info label background color\n@label-info-bg: @brand-info;\n//** Warning label background color\n@label-warning-bg: @brand-warning;\n//** Danger label background color\n@label-danger-bg: @brand-danger;\n\n//** Default label text color\n@label-color: #fff;\n//** Default text color of a linked label\n@label-link-hover-color: #fff;\n\n\n//== Modals\n//\n//##\n\n//** Padding applied to the modal body\n@modal-inner-padding: 20px;\n\n//** Padding applied to the modal title\n@modal-title-padding: 15px;\n//** Modal title line-height\n@modal-title-line-height: @line-height-base;\n\n//** Background color of modal content area\n@modal-content-bg: #fff;\n//** Modal content border color\n@modal-content-border-color: rgba(0,0,0,.2);\n//** Modal content border color **for IE8**\n@modal-content-fallback-border-color: #999;\n\n//** Modal backdrop background color\n@modal-backdrop-bg: #000;\n//** Modal backdrop opacity\n@modal-backdrop-opacity: .5;\n//** Modal header border color\n@modal-header-border-color: #e5e5e5;\n//** Modal footer border color\n@modal-footer-border-color: @modal-header-border-color;\n\n@modal-lg: 900px;\n@modal-md: 600px;\n@modal-sm: 300px;\n\n\n//== Alerts\n//\n//## Define alert colors, border radius, and padding.\n\n@alert-padding: 15px;\n@alert-border-radius: @border-radius-base;\n@alert-link-font-weight: bold;\n\n@alert-success-bg: @state-success-bg;\n@alert-success-text: @state-success-text;\n@alert-success-border: @state-success-border;\n\n@alert-info-bg: @state-info-bg;\n@alert-info-text: @state-info-text;\n@alert-info-border: @state-info-border;\n\n@alert-warning-bg: @state-warning-bg;\n@alert-warning-text: @state-warning-text;\n@alert-warning-border: @state-warning-border;\n\n@alert-danger-bg: @state-danger-bg;\n@alert-danger-text: @state-danger-text;\n@alert-danger-border: @state-danger-border;\n\n\n//== Progress bars\n//\n//##\n\n//** Background color of the whole progress component\n@progress-bg: #f5f5f5;\n//** Progress bar text color\n@progress-bar-color: #fff;\n\n//** Default progress bar color\n@progress-bar-bg: @brand-primary;\n//** Success progress bar color\n@progress-bar-success-bg: @brand-success;\n//** Warning progress bar color\n@progress-bar-warning-bg: @brand-warning;\n//** Danger progress bar color\n@progress-bar-danger-bg: @brand-danger;\n//** Info progress bar color\n@progress-bar-info-bg: @brand-info;\n\n\n//== List group\n//\n//##\n\n//** Background color on `.list-group-item`\n@list-group-bg: #fff;\n//** `.list-group-item` border color\n@list-group-border: #ddd;\n//** List group border radius\n@list-group-border-radius: @border-radius-base;\n\n//** Background color of single list elements on hover\n@list-group-hover-bg: #f5f5f5;\n//** Text color of active list elements\n@list-group-active-color: @component-active-color;\n//** Background color of active list elements\n@list-group-active-bg: @component-active-bg;\n//** Border color of active list elements\n@list-group-active-border: @list-group-active-bg;\n@list-group-active-text-color: lighten(@list-group-active-bg, 40%);\n\n@list-group-link-color: #555;\n@list-group-link-heading-color: #333;\n\n\n//== Panels\n//\n//##\n\n@panel-bg: #fff;\n@panel-body-padding: 15px;\n@panel-border-radius: @border-radius-base;\n\n//** Border color for elements within panels\n@panel-inner-border: #ddd;\n@panel-footer-bg: #f5f5f5;\n\n@panel-default-text: @gray-dark;\n@panel-default-border: #ddd;\n@panel-default-heading-bg: #f5f5f5;\n\n@panel-primary-text: #fff;\n@panel-primary-border: @brand-primary;\n@panel-primary-heading-bg: @brand-primary;\n\n@panel-success-text: @state-success-text;\n@panel-success-border: @state-success-border;\n@panel-success-heading-bg: @state-success-bg;\n\n@panel-info-text: @state-info-text;\n@panel-info-border: @state-info-border;\n@panel-info-heading-bg: @state-info-bg;\n\n@panel-warning-text: @state-warning-text;\n@panel-warning-border: @state-warning-border;\n@panel-warning-heading-bg: @state-warning-bg;\n\n@panel-danger-text: @state-danger-text;\n@panel-danger-border: @state-danger-border;\n@panel-danger-heading-bg: @state-danger-bg;\n\n\n//== Thumbnails\n//\n//##\n\n//** Padding around the thumbnail image\n@thumbnail-padding: 4px;\n//** Thumbnail background color\n@thumbnail-bg: @body-bg;\n//** Thumbnail border color\n@thumbnail-border: #ddd;\n//** Thumbnail border radius\n@thumbnail-border-radius: @border-radius-base;\n\n//** Custom text color for thumbnail captions\n@thumbnail-caption-color: @text-color;\n//** Padding around the thumbnail caption\n@thumbnail-caption-padding: 9px;\n\n\n//== Wells\n//\n//##\n\n@well-bg: #f5f5f5;\n@well-border: darken(@well-bg, 7%);\n\n\n//== Badges\n//\n//##\n\n@badge-color: #fff;\n//** Linked badge text color on hover\n@badge-link-hover-color: #fff;\n@badge-bg: @gray-light;\n\n//** Badge text color in active nav link\n@badge-active-color: @link-color;\n//** Badge background color in active nav link\n@badge-active-bg: #fff;\n\n@badge-font-weight: bold;\n@badge-line-height: 1;\n@badge-border-radius: 10px;\n\n\n//== Breadcrumbs\n//\n//##\n\n@breadcrumb-padding-vertical: 8px;\n@breadcrumb-padding-horizontal: 15px;\n//** Breadcrumb background color\n@breadcrumb-bg: #f5f5f5;\n//** Breadcrumb text color\n@breadcrumb-color: #ccc;\n//** Text color of current page in the breadcrumb\n@breadcrumb-active-color: @gray-light;\n//** Textual separator for between breadcrumb elements\n@breadcrumb-separator: \"/\";\n\n\n//== Carousel\n//\n//##\n\n@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);\n\n@carousel-control-color: #fff;\n@carousel-control-width: 15%;\n@carousel-control-opacity: .5;\n@carousel-control-font-size: 20px;\n\n@carousel-indicator-active-bg: #fff;\n@carousel-indicator-border-color: #fff;\n\n@carousel-caption-color: #fff;\n\n\n//== Close\n//\n//##\n\n@close-font-weight: bold;\n@close-color: #000;\n@close-text-shadow: 0 1px 0 #fff;\n\n\n//== Code\n//\n//##\n\n@code-color: #c7254e;\n@code-bg: #f9f2f4;\n\n@kbd-color: #fff;\n@kbd-bg: #333;\n\n@pre-bg: #f5f5f5;\n@pre-color: @gray-dark;\n@pre-border-color: #ccc;\n@pre-scrollable-max-height: 340px;\n\n\n//== Type\n//\n//##\n\n//** Text muted color\n@text-muted: @gray-light;\n//** Abbreviations and acronyms border color\n@abbr-border-color: @gray-light;\n//** Headings small color\n@headings-small-color: @gray-light;\n//** Blockquote small color\n@blockquote-small-color: @gray-light;\n//** Blockquote font size\n@blockquote-font-size: (@font-size-base * 1.25);\n//** Blockquote border color\n@blockquote-border-color: @gray-lighter;\n//** Page header border color\n@page-header-border-color: @gray-lighter;\n\n\n//== Miscellaneous\n//\n//##\n\n//** Horizontal line color.\n@hr-border: @gray-lighter;\n\n//** Horizontal offset for forms and lists.\n@component-offset-horizontal: 180px;\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n }\n\n > .active,\n > .next,\n > .prev { display: block; }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: none;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n margin-left: -10px;\n font-family: serif;\n }\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n margin-left: -15px;\n font-size: 30px;\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 200;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: 14px base font * 85% = about 12px\nsmall,\n.small { font-size: 85%; }\n\n// Undo browser default styling\ncite { font-style: normal; }\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// --------------------------------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n@media (min-width: @grid-float-breakpoint) {\n .dl-horizontal {\n dt {\n float: left;\n width: (@component-offset-horizontal - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @component-offset-horizontal;\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n }\n}\n\n// MISC\n// ----\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Quotes\nblockquote:before,\nblockquote:after {\n content: \"\";\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n white-space: nowrap;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n max-width: 100%;\n background-color: @table-bg;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-child(odd) {\n > td,\n > th {\n background-color: @table-bg-accent;\n }\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n > td,\n > th {\n background-color: @table-bg-hover;\n }\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n@media (max-width: @screen-xs-max) {\n .table-responsive {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n overflow-x: scroll;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n -webkit-overflow-scrolling: touch;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; /* IE8-9 */\n line-height: normal;\n}\n\n// Set the height of file controls to match text inputs\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n cursor: not-allowed;\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS date input\n//\n// In Mobile Safari, date inputs require a pixel line-height that matches the\n// given height of the input.\n\ninput[type=\"date\"] {\n line-height: @input-height-base;\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: 15px;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n display: block;\n min-height: @line-height-computed; // clear the floating input if there is no label text\n margin-top: 10px;\n margin-bottom: 10px;\n padding-left: 20px;\n label {\n display: inline;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n float: left;\n margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"],\n.radio,\n.radio-inline,\n.checkbox,\n.checkbox-inline {\n &[disabled],\n fieldset[disabled] & {\n cursor: not-allowed;\n }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n\n.input-sm {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n\n.input-lg {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n // Enable absolute positioning\n position: relative;\n\n // Ensure icons don't overlap text\n .form-control {\n padding-right: (@input-height-base * 1.25);\n }\n\n // Feedback icon (requires .glyphicon classes)\n .form-control-feedback {\n position: absolute;\n top: (@line-height-computed + 5); // Height of the `label` and its margin\n right: 0;\n display: block;\n width: @input-height-base;\n height: @input-height-base;\n line-height: @input-height-base;\n text-align: center;\n }\n}\n\n// Feedback states\n.has-success {\n .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n margin-bottom: 0; // Remove default margin from `p`\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n display: block; // account for any element using help-block\n margin-top: 5px;\n margin-bottom: 10px;\n color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n // Kick in the inline\n @media (min-width: @screen-sm-min) {\n // Inline-block all the things for \"inline\"\n .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // In navbar-form, allow folks to *not* use `.form-group`\n .form-control {\n display: inline-block;\n width: auto; // Prevent labels from stacking above inputs in `.form-group`\n vertical-align: middle;\n }\n // Input groups need that 100% width though\n .input-group > .form-control {\n width: 100%;\n }\n\n .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // Remove default margin on radios/checkboxes that were used for stacking, and\n // then undo the floating of radios and checkboxes to match (which also avoids\n // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).\n .radio,\n .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 0;\n vertical-align: middle;\n }\n .radio input[type=\"radio\"],\n .checkbox input[type=\"checkbox\"] {\n float: none;\n margin-left: 0;\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n top: 0;\n }\n }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n // Consistent vertical alignment of labels, radios, and checkboxes\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n // Account for padding we're adding to ensure the alignment and of help text\n // and other content below items\n .radio,\n .checkbox {\n min-height: (@line-height-computed + (@padding-base-vertical + 1));\n }\n\n // Make form groups behave like rows\n .form-group {\n .make-row();\n }\n\n .form-control-static {\n padding-top: (@padding-base-vertical + 1);\n }\n\n // Only right align form labels here when the columns stop stacking\n @media (min-width: @screen-sm-min) {\n .control-label {\n text-align: right;\n }\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n top: 0;\n right: (@grid-gutter-width / 2);\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: not-allowed;\n pointer-events: none; // Future-proof disabling of clicks\n .opacity(.65);\n .box-shadow(none);\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n cursor: pointer;\n border-radius: 0;\n\n &,\n &:active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: underline;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n padding-left: 0;\n padding-right: 0;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n &:focus {\n // Remove focus outline when dropdown JS adds it after closing the menu\n outline: none;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n border-top-right-radius: @border-radius-base;\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n border-bottom-left-radius: @border-radius-base;\n .border-top-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n}\n\n\n// Checkbox and radio options\n[data-toggle=\"buttons\"] > .btn > input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn > input[type=\"checkbox\"] {\n display: none;\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n &.in {\n display: block;\n }\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition(height .35s ease);\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: ~\"url('@{icon-font-path}@{icon-font-name}.eot')\";\n src: ~\"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')\",\n ~\"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')\",\n ~\"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')\",\n ~\"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')\";\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\2a\"; } }\n.glyphicon-plus { &:before { content: \"\\2b\"; } }\n.glyphicon-euro { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base solid;\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n}\n// Nuke hover/focus effects\n.dropdown-menu > .disabled > a {\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: not-allowed;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base solid;\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 1px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn { .input-lg(); }\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn { .input-sm(); }\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @border-radius-base;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n max-height: @navbar-collapse-max-height;\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: none;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n\n &.navbar-right:last-child {\n margin-right: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right { .pull-right(); }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n\n // Outdent the form if last child to line up with content down the page\n &.navbar-right:last-child {\n margin-right: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n\n // Outdent the form if last child to line up with content down the page\n &.navbar-right:last-child {\n margin-right: 0;\n }\n }\n}\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n visibility: hidden !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: not-allowed;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: not-allowed;\n }\n }\n\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n &[href] {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base classes\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: baseline;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n .btn-xs & {\n top: 0;\n padding: 1px 5px;\n }\n}\n\n// Hover state, but only for links\na.badge {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n}\n\n// Account for counters in navs\na.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n .container & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: (@font-size-base * 4.5);\n }\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissable alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n.progress-striped .progress-bar {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n.progress.active .progress-bar {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Media objects\n// Source: http://stubbornella.org/content/?p=497\n// --------------------------------------------------\n\n\n// Common styles\n// -------------------------\n\n// Clear the floats\n.media,\n.media-body {\n overflow: hidden;\n zoom: 1;\n}\n\n// Proper spacing between instances of .media\n.media,\n.media .media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n\n// For images and videos, set to block\n.media-object {\n display: block;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin: 0 0 5px;\n}\n\n\n// Media image alignment\n// -------------------------\n\n.media {\n > .pull-left {\n margin-right: 10px;\n }\n > .pull-right {\n margin-left: 10px;\n }\n}\n\n\n// Media list variation\n// -------------------------\n\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n\n // Align badges within list items\n > .badge {\n float: right;\n }\n > .badge + .badge {\n margin-right: 5px;\n }\n}\n\n\n// Linked list items\n//\n// Use anchor elements instead of `li`s or `div`s to create linked list items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @list-group-hover-bg;\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: 10px 15px;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table {\n margin-bottom: 0;\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsable panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n overflow: hidden; // crop contents when collapsed\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n + .panel-collapse .panel-body {\n border-top: 1px solid @panel-inner-border;\n }\n }\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: auto;\n overflow-y: scroll;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0)}\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: none;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n min-height: (@modal-title-padding + @modal-title-line-height);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n margin-top: 15px;\n padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n visibility: visible;\n font-size: @font-size-small;\n line-height: 1.4;\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n text-decoration: none;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n text-align: left; // Reset given new insertion method\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Overrides for proper insertion\n white-space: normal;\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 18px;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: 5px 5px 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#browsers\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n"]} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css new file mode 100644 index 0000000..679272d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.eot b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..4a4ca865d67e86f961bc6e2ef00bffa4e34bb9ed GIT binary patch literal 20335 zcma%iRa9Lu*X_aGIXLtH2X}XOcXxM};>BGK?k>gMi@Uo+afec%&=$Y_zI(@iAMVRd zMzYtMnVHGh`(bBgBrYld0G2WU0R1n+0{)ZW{#ye8Pyh%N;2)-_`hS4`dHjR_o8s?3 z%Kr!aAA=Sk15gC$0aO9906BmJKn0)-&;Wq`d1e4dfc3v(2XF@106hNnKnJJ;tp3?v z|4=i4`#;17p#2YV|JP~<aQVjr0oVY{0M>t*4IuDO^FK=e+xx$$?LVd`z~aAr@Bit+ z4B+|46aYB=Q+D{L`5%t;Kdt|aZw_GpXL0?v@B%pgd3^uI=KcSkIq3hHHvk~6A@l#d zDHwovCxFWvz!d;sGQ^&}h@CLq(3!MVaFhSyL!rg*&d8F%X_&hML`QYBTiRZ}i=N8C zfX|m2SCm$2B^?XKJ=3POS<xXNB{p2XXK+_wMOGVZnBZVi5e}6Y|6&<yQ)U%t_?I)| z$UxGPI3f<gbzDcS=uvd*F-hJ48@*B~rQ%a$ce$2W*h2m|CL*EzQysJG(21!-486pi z9Op(2E~L-}(eO7?`oQPh!vSmW(NSH=-))ZKL~;2xY%vBbW>}r1sVM9Nj*l5q`5#S% zQ}FD^zy1Pj*xUG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6OP#jbGb=pA)02JE-dS`b1O+ zr1=;C6wFyiI!Tq?@<bwOp$VQ6<}27az_&?Ed(ewMf%20<^Z~F$y);Gm$3>HI2^Lq9 zN)VG}(M5cuIe|8Czv84=B1p?kNhb&-+kCJ~Cp@^WbcRlQNgg+8V1=ctJWBX)kq0fd zAfF&H0wQim;D^RNLt*)8>Blbt34>^ZniMi^9|qnB%ES;E!kSQ!IK8Y>A1x=m76zre zZ2g#{aC_l);B}ZbGf3Y$5Pf?Ha!#0t3<5F`ED$p<#rl0e5CFtqc!!Oi7M~UH7I8~> zKcNUu8%}Z~Bb?-HK-;xoKCjL8>_&0cLO;{MS&3$vA|)_!KSn*s%ug690fdLcraD7- fD&x8tjE$WbXjs&snU8)|^B;s6yTptcKAzx$Qp3K0 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.svg b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..e3e2dc7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > +<svg xmlns="http://www.w3.org/2000/svg"> +<metadata></metadata> +<defs> +<font id="glyphicons_halflingsregular" horiz-adv-x="1200" > +<font-face units-per-em="1200" ascent="960" descent="-240" /> +<missing-glyph horiz-adv-x="500" /> +<glyph /> +<glyph /> +<glyph unicode="
" /> +<glyph unicode=" " /> +<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" /> +<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" /> +<glyph unicode=" " /> +<glyph unicode=" " horiz-adv-x="652" /> +<glyph unicode=" " horiz-adv-x="1304" /> +<glyph unicode=" " horiz-adv-x="652" /> +<glyph unicode=" " horiz-adv-x="1304" /> +<glyph unicode=" " horiz-adv-x="434" /> +<glyph unicode=" " horiz-adv-x="326" /> +<glyph unicode=" " horiz-adv-x="217" /> +<glyph unicode=" " horiz-adv-x="217" /> +<glyph unicode=" " horiz-adv-x="163" /> +<glyph unicode=" " horiz-adv-x="260" /> +<glyph unicode=" " horiz-adv-x="72" /> +<glyph unicode=" " horiz-adv-x="260" /> +<glyph unicode=" " horiz-adv-x="326" /> +<glyph unicode="€" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" /> +<glyph unicode="−" d="M200 400h900v300h-900v-300z" /> +<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" /> +<glyph unicode="☁" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" /> +<glyph unicode="✉" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" /> +<glyph unicode="✏" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" /> +<glyph unicode="" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" /> +<glyph unicode="" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" /> +<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" /> +<glyph unicode="" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" /> +<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" /> +<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" /> +<glyph unicode="" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" /> +<glyph unicode="" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" /> +<glyph unicode="" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" /> +<glyph unicode="" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" /> +<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" /> +<glyph unicode="" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" /> +<glyph unicode="" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" /> +<glyph unicode="" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" /> +<glyph unicode="" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" /> +<glyph unicode="" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" /> +<glyph unicode="" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" /> +<glyph unicode="" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" /> +<glyph unicode="" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" /> +<glyph unicode="" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" /> +<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" /> +<glyph unicode="" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" /> +<glyph unicode="" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" /> +<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" /> +<glyph unicode="" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" /> +<glyph unicode="" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" /> +<glyph unicode="" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" /> +<glyph unicode="" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" /> +<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" /> +<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" /> +<glyph unicode="" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" /> +<glyph unicode="" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" /> +<glyph unicode="" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" /> +<glyph unicode="" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" /> +<glyph unicode="" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" /> +<glyph unicode="" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" /> +<glyph unicode="" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" /> +<glyph unicode="" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" /> +<glyph unicode="" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" /> +<glyph unicode="" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" /> +<glyph unicode="" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" /> +<glyph unicode="" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" /> +<glyph unicode="" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " /> +<glyph unicode="" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" /> +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" /> +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" /> +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" /> +<glyph unicode="" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" /> +<glyph unicode="" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" /> +<glyph unicode="" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " /> +<glyph unicode="" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" /> +<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" /> +<glyph unicode="" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" /> +<glyph unicode="" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" /> +<glyph unicode="" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" /> +<glyph unicode="" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" /> +<glyph unicode="" d="M200 0l900 550l-900 550v-1100z" /> +<glyph unicode="" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" /> +<glyph unicode="" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" /> +<glyph unicode="" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" /> +<glyph unicode="" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" /> +<glyph unicode="" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" /> +<glyph unicode="" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" /> +<glyph unicode="" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" /> +<glyph unicode="" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" /> +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" /> +<glyph unicode="" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" /> +<glyph unicode="" d="M0 547l600 453v-300h600v-300h-600v-301z" /> +<glyph unicode="" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" /> +<glyph unicode="" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" /> +<glyph unicode="" d="M104 600h296v600h300v-600h298l-449 -600z" /> +<glyph unicode="" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" /> +<glyph unicode="" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" /> +<glyph unicode="" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" /> +<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" /> +<glyph unicode="" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" /> +<glyph unicode="" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" /> +<glyph unicode="" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" /> +<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" /> +<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" /> +<glyph unicode="" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" /> +<glyph unicode="" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" /> +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" /> +<glyph unicode="" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" /> +<glyph unicode="" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" /> +<glyph unicode="" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" /> +<glyph unicode="" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" /> +<glyph unicode="" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" /> +<glyph unicode="" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" /> +<glyph unicode="" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" /> +<glyph unicode="" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" /> +<glyph unicode="" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" /> +<glyph unicode="" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" /> +<glyph unicode="" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" /> +<glyph unicode="" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" /> +<glyph unicode="" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" /> +<glyph unicode="" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" /> +<glyph unicode="" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" /> +<glyph unicode="" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" /> +<glyph unicode="" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" /> +<glyph unicode="" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" /> +<glyph unicode="" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" /> +<glyph unicode="" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" /> +<glyph unicode="" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" /> +<glyph unicode="" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" /> +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-56 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" /> +<glyph unicode="" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" /> +<glyph unicode="" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" /> +<glyph unicode="" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" /> +<glyph unicode="" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" /> +<glyph unicode="" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" /> +<glyph unicode="" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" /> +<glyph unicode="" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" /> +<glyph unicode="" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" /> +<glyph unicode="" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" /> +<glyph unicode="" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" /> +<glyph unicode="" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" /> +<glyph unicode="" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" /> +<glyph unicode="" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" /> +<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" /> +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" /> +<glyph unicode="" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" /> +<glyph unicode="" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" /> +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" /> +<glyph unicode="" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" /> +<glyph unicode="" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" /> +<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " /> +<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" /> +<glyph unicode="" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" /> +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" /> +<glyph unicode="" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" /> +<glyph unicode="" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" /> +<glyph unicode="" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" /> +<glyph unicode="" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" /> +<glyph unicode="" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" /> +<glyph unicode="" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" /> +<glyph unicode="" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" /> +<glyph unicode="" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" /> +<glyph unicode="" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" /> +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" /> +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" /> +<glyph unicode="" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" /> +<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" /> +<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" /> +<glyph unicode="" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" /> +<glyph unicode="" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" /> +</font> +</defs></svg> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.ttf b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..67fa00bf83801d2fa568546b982c80d27f6ef74e GIT binary patch literal 41280 zcmc${2b>$#wLd<0X4JKkMs=IoY9(#guC%-Ix~!LV@5XgawLzwtVoFRi&4B<;Yzzq| z1QHw)z@da0*@PsIyqA!`6G@b6oWOe_b_$P#@)GbXG2Zd-d+unfZAkvV-{<pRThcUX z?mhS1bI<vnG6E9>LBX3Wc;?Pswd9i3FaAXkSUrx`&zn7GF0<l{z@}h7wrpi4d*Ks{ zZpZ!*_Sc_(*@n#v|6=<B_P;3z;#KEwxh5twNq6GM+Hl@_!R8AuTe&~;1opdee&dB3 zuHKB}9zifaOy@7W^!f`Tkz5@6UloMAr(d*jLqR-mNEd{A4&i+7ML1y3%5Fi}RgL|| zi!Qt7y6=5Y*@^w>_`M^SUUB}0?t9iO6@<@rQX4MYaNTB6W_twTb8q4L*yS58+j!vF z2j3Nh`>lc?ZQXpu)z^G$?&B8=!spQk>+PGb+PGPLztt}YU&eW%<JyhqT`=_QiZ`)O z{War7)DeC><I$he=TDu%_l-|m2S4M&9<>aO!9EjS$4lmWxSf0(+a;I;S#pX$!?81r zPxe(ID}q`APM!R3^`f;)g#n@JcY^fY<DiwPTG)y!c}ptai19rMd-SR|&aq3eM_1Jg zGFy(%<@gm7QCp}IVnVC1CuWajV&}%5Zty0LrC8dQb{~=s*$&klYChC=Xu+X%ht?mu z_|Wx-?mqOuVcX%F!_9~L4$nQj;PAS`7azX<@ZE>+Km6eDgyYBYd&V!e;1`7xevutA z9r7HC9qK$ZaA-Mx@w`Ku58Zlb*I{<pb2xUm^YFmo`G=PuUVnJ=;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ab_>ja=;;7viq!Ukxr^Hj@De-*7^AXQSJRk9V z#Pbo)M?4?#e8lq+&rdu*@%+T|6VFdPKk@v;^ApccJU{UQ#0wBFK)e9)0>ldtFF?Ei z@dCsP5HCo)An}643lc9#ydd#{#0wHHNW38NLc|LZCq$eOaYDoi5hp~P5OG4p2@@ww zyTZf^6E94>F!92~3llF)yfE=1#ETFwLc9p^BE*XjFG9Qs@gl^F5HCu+DDk4iixMwN zyeRRa#EUw3O5Q7ZujIXYopMV4EBUYFzmoq-{ww*f<iC>tO8zVPujIdy|4RNV`LE=^ zlK)EnEBUYFzmoq-{ww*f<iC>tO8zVPujIdy|4RNV`Hv+t&3R&ulK)EnEBUYFzmoq- z{ww*f<iC>tO8zVPujIXw_e$O?d9UO>y#F|MkoQX7D|xTvy^{Az-Ya>pA%_o2{ww*f z<iC>tO8zVPujIdy|4RNV`LE=^lK)EnV@(LhUh-ebe<lBw{8#c{$$usPmHb!oU&((Z z|CRh#@?Xh+CI6ND$GmXI4)R~ge<lAl#`~yq9BI@!j_~i(EB#OO$dlH*o`jm(<09MZ pj#tL#*G}k3t((`AwgAebb>n*C^B33F^`zzF+C&yytvzO0{|1%B6xsj) literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.woff b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000000000000000000000000000000000000..8c54182aa5d4d1ab3c9171976b615c1dcb1dc187 GIT binary patch literal 23320 zcmY&<V{j&2v~_ITn%EQDwryvUOl&(7+qP}nwr%T)@#Xz))vdaxYSlh#^~UKsfBJOq zc9j<s0|Ey68QNGt$p6_qf&bzE&HwKZ6H}1|0s{8?QStu6AJzU_aS>6mA1(8T6a0V( z7zzkXUYUXEN9+9I!ap!DFOd#1wlTB=0s{G=z_>rwLFyJd-Ppy62nY!Dzg$rNAC#b> zW_IQ_KN{(eU)_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^J7Vi7mCaI@F_FKI3sd<8_eMbourB6&~Cdum*g)JJey@P;F<#P|pt$Y2u zv|ucA;JmeX?e$>YW!4kITQvWO?tT;Vf8g(x{~xTU8MmMO%erSx?CP6!SO0-5{u$k4 zCf4<hx+~Qu+W&&9CQjw8nroG(^IrBME%~b|mgN^F3Ee{`mh}xw%MK^}w`Bgc-HRp; z^({-Q4yP@*2LFOvCjUEvm*dV#9*@K!R9pSE>#NV_{<R`qa@SPPa<G};|2}QV-OU7g zQ2n1&-dYYjl6XjZDfw>_?ECrJF}4UgOzZ`I+?ZFg9Uc||hEIS~1iw|&Yk-GO)NhbQ mX4Rts<LE1b2{c|8A^H?xWL6_ReJ}y*KfbXV2YPjIaQ_1m_8C<G literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js new file mode 100644 index 0000000..8ae571b --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js @@ -0,0 +1,1951 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } + +/* ======================================================================== + * Bootstrap: transition.js v3.1.1 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd', + 'MozTransition' : 'transitionend', + 'OTransition' : 'oTransitionEnd otransitionend', + 'transition' : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false, $el = this + $(this).one($.support.transition.end, function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: alert.js v3.1.1 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.hasClass('alert') ? $this : $this.parent() + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent.trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one($.support.transition.end, removeElement) + .emulateTransitionEnd(150) : + removeElement() + } + + + // ALERT PLUGIN DEFINITION + // ======================= + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + // ALERT NO CONFLICT + // ================= + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + // ALERT DATA-API + // ============== + + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: button.js v3.1.1 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state = state + 'Text' + + if (!data.resetText) $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false + else $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + } + + if (changed) this.$element.toggleClass('active') + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.Constructor = Button + + + // BUTTON NO CONFLICT + // ================== + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + // BUTTON DATA-API + // =============== + + $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + e.preventDefault() + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: carousel.js v3.1.1 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = + this.sliding = + this.interval = + this.$active = + this.$items = null + + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getActiveIndex = function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + + return this.$items.index(this.$active) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getActiveIndex() + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + + this.interval = clearInterval(this.interval) + + return this + } + + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } + + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } + + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || $active[type]() + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var fallback = type == 'next' ? 'first' : 'last' + var that = this + + if (!$next.length) { + if (!this.options.wrap) return + $next = this.$element.find('.item')[fallback]() + } + + if ($next.hasClass('active')) return this.sliding = false + + var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid.bs.carousel', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) + }) + .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid.bs.carousel') + } + + isCycling && this.cycle() + + return this + } + + + // CAROUSEL PLUGIN DEFINITION + // ========================== + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide + + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.Constructor = Carousel + + + // CAROUSEL NO CONFLICT + // ==================== + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + }) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + $carousel.carousel($carousel.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: collapse.js v3.1.1 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.transitioning = null + + if (this.options.parent) this.$parent = $(this.options.parent) + if (this.options.toggle) this.toggle() + } + + Collapse.DEFAULTS = { + toggle: true + } + + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var actives = this.$parent && this.$parent.find('> .panel > .in') + + if (actives && actives.length) { + var hasData = actives.data('bs.collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing') + [dimension](0) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in') + [dimension]('auto') + this.transitioning = 0 + this.$element.trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + [dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element + [dimension](this.$element[dimension]()) + [0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse') + .removeClass('in') + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .trigger('hidden.bs.collapse') + .removeClass('collapsing') + .addClass('collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && option == 'show') option = !option + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.Constructor = Collapse + + + // COLLAPSE NO CONFLICT + // ==================== + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + // COLLAPSE DATA-API + // ================= + + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + var target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + var $target = $(target) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $this.data() + var parent = $this.attr('data-parent') + var $parent = parent && $(parent) + + if (!data || !data.transitioning) { + if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') + $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + } + + $target.collapse(option) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: dropdown.js v3.1.1 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle=dropdown]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus) + } + + var relatedTarget = { relatedTarget: this } + $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $parent + .toggleClass('open') + .trigger('shown.bs.dropdown', relatedTarget) + + $this.focus() + } + + return false + } + + Dropdown.prototype.keydown = function (e) { + if (!/(38|40|27)/.test(e.keyCode)) return + + var $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) { + if (e.which == 27) $parent.find(toggle).focus() + return $this.click() + } + + var desc = ' li:not(.divider):visible a' + var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc) + + if (!$items.length) return + + var index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items.eq(index).focus() + } + + function clearMenus(e) { + $(backdrop).remove() + $(toggle).each(function () { + var $parent = getParent($(this)) + var relatedTarget = { relatedTarget: this } + if (!$parent.hasClass('open')) return + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + if (e.isDefaultPrevented()) return + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) + }) + } + + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() + } + + + // DROPDOWN PLUGIN DEFINITION + // ========================== + + var old = $.fn.dropdown + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.dropdown') + + if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + // DROPDOWN NO CONFLICT + // ==================== + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + // APPLY TO STANDARD DROPDOWN ELEMENTS + // =================================== + + $(document) + .on('click.bs.dropdown.data-api', clearMenus) + .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) + .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: modal.js v3.1.1 + * http://getbootstrap.com/javascript/#modals + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // MODAL CLASS DEFINITION + // ====================== + + var Modal = function (element, options) { + this.options = options + this.$element = $(element) + this.$backdrop = + this.isShown = null + + if (this.options.remote) { + this.$element + .find('.modal-content') + .load(this.options.remote, $.proxy(function () { + this.$element.trigger('loaded.bs.modal') + }, this)) + } + } + + Modal.DEFAULTS = { + backdrop: true, + keyboard: true, + show: true + } + + Modal.prototype.toggle = function (_relatedTarget) { + return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) + } + + Modal.prototype.show = function (_relatedTarget) { + var that = this + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + this.isShown = true + + this.escape() + + this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) // don't move modals dom position + } + + that.$element + .show() + .scrollTop(0) + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element + .addClass('in') + .attr('aria-hidden', false) + + that.enforceFocus() + + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) + + transition ? + that.$element.find('.modal-dialog') // wait for modal to slide in + .one($.support.transition.end, function () { + that.$element.focus().trigger(e) + }) + .emulateTransitionEnd(300) : + that.$element.focus().trigger(e) + }) + } + + Modal.prototype.hide = function (e) { + if (e) e.preventDefault() + + e = $.Event('hide.bs.modal') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + + $(document).off('focusin.bs.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + .off('click.dismiss.bs.modal') + + $.support.transition && this.$element.hasClass('fade') ? + this.$element + .one($.support.transition.end, $.proxy(this.hideModal, this)) + .emulateTransitionEnd(300) : + this.hideModal() + } + + Modal.prototype.enforceFocus = function () { + $(document) + .off('focusin.bs.modal') // guard against infinite focus loop + .on('focusin.bs.modal', $.proxy(function (e) { + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { + this.$element.focus() + } + }, this)) + } + + Modal.prototype.escape = function () { + if (this.isShown && this.options.keyboard) { + this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { + e.which == 27 && this.hide() + }, this)) + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.bs.modal') + } + } + + Modal.prototype.hideModal = function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden.bs.modal') + }) + } + + Modal.prototype.removeBackdrop = function () { + this.$backdrop && this.$backdrop.remove() + this.$backdrop = null + } + + Modal.prototype.backdrop = function (callback) { + var animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') + .appendTo(document.body) + + this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { + if (e.target !== e.currentTarget) return + this.options.backdrop == 'static' + ? this.$element[0].focus.call(this.$element[0]) + : this.hide.call(this) + }, this)) + + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow + + this.$backdrop.addClass('in') + + if (!callback) return + + doAnimate ? + this.$backdrop + .one($.support.transition.end, callback) + .emulateTransitionEnd(150) : + callback() + + } else if (!this.isShown && this.$backdrop) { + this.$backdrop.removeClass('in') + + $.support.transition && this.$element.hasClass('fade') ? + this.$backdrop + .one($.support.transition.end, callback) + .emulateTransitionEnd(150) : + callback() + + } else if (callback) { + callback() + } + } + + + // MODAL PLUGIN DEFINITION + // ======================= + + var old = $.fn.modal + + $.fn.modal = function (option, _relatedTarget) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.modal') + var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data) $this.data('bs.modal', (data = new Modal(this, options))) + if (typeof option == 'string') data[option](_relatedTarget) + else if (options.show) data.show(_relatedTarget) + }) + } + + $.fn.modal.Constructor = Modal + + + // MODAL NO CONFLICT + // ================= + + $.fn.modal.noConflict = function () { + $.fn.modal = old + return this + } + + + // MODAL DATA-API + // ============== + + $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { + var $this = $(this) + var href = $this.attr('href') + var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 + var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) + + if ($this.is('a')) e.preventDefault() + + $target + .modal(option, this) + .one('hide', function () { + $this.is(':visible') && $this.focus() + }) + }) + + $(document) + .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') }) + .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: tooltip.js v3.1.1 + * http://getbootstrap.com/javascript/#tooltip + * Inspired by the original jQuery.tipsy by Jason Frame + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // TOOLTIP PUBLIC CLASS DEFINITION + // =============================== + + var Tooltip = function (element, options) { + this.type = + this.options = + this.enabled = + this.timeout = + this.hoverState = + this.$element = null + + this.init('tooltip', element, options) + } + + Tooltip.DEFAULTS = { + animation: true, + placement: 'top', + selector: false, + template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + container: false + } + + Tooltip.prototype.init = function (type, element, options) { + this.enabled = true + this.type = type + this.$element = $(element) + this.options = this.getOptions(options) + + var triggers = this.options.trigger.split(' ') + + for (var i = triggers.length; i--;) { + var trigger = triggers[i] + + if (trigger == 'click') { + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) + } else if (trigger != 'manual') { + var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' + var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' + + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + } + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle() + } + + Tooltip.prototype.getDefaults = function () { + return Tooltip.DEFAULTS + } + + Tooltip.prototype.getOptions = function (options) { + options = $.extend({}, this.getDefaults(), this.$element.data(), options) + + if (options.delay && typeof options.delay == 'number') { + options.delay = { + show: options.delay, + hide: options.delay + } + } + + return options + } + + Tooltip.prototype.getDelegateOptions = function () { + var options = {} + var defaults = this.getDefaults() + + this._options && $.each(this._options, function (key, value) { + if (defaults[key] != value) options[key] = value + }) + + return options + } + + Tooltip.prototype.enter = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) + + clearTimeout(self.timeout) + + self.hoverState = 'in' + + if (!self.options.delay || !self.options.delay.show) return self.show() + + self.timeout = setTimeout(function () { + if (self.hoverState == 'in') self.show() + }, self.options.delay.show) + } + + Tooltip.prototype.leave = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) + + clearTimeout(self.timeout) + + self.hoverState = 'out' + + if (!self.options.delay || !self.options.delay.hide) return self.hide() + + self.timeout = setTimeout(function () { + if (self.hoverState == 'out') self.hide() + }, self.options.delay.hide) + } + + Tooltip.prototype.show = function () { + var e = $.Event('show.bs.' + this.type) + + if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + var that = this; + + var $tip = this.tip() + + this.setContent() + + if (this.options.animation) $tip.addClass('fade') + + var placement = typeof this.options.placement == 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement + + var autoToken = /\s?auto?\s?/i + var autoPlace = autoToken.test(placement) + if (autoPlace) placement = placement.replace(autoToken, '') || 'top' + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + .addClass(placement) + + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + + var pos = this.getPosition() + var actualWidth = $tip[0].offsetWidth + var actualHeight = $tip[0].offsetHeight + + if (autoPlace) { + var $parent = this.$element.parent() + + var orgPlacement = placement + var docScroll = document.documentElement.scrollTop || document.body.scrollTop + var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() + var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() + var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left + + placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' : + placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' : + placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' : + placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' : + placement + + $tip + .removeClass(orgPlacement) + .addClass(placement) + } + + var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) + + this.applyPlacement(calculatedOffset, placement) + this.hoverState = null + + var complete = function() { + that.$element.trigger('shown.bs.' + that.type) + } + + $.support.transition && this.$tip.hasClass('fade') ? + $tip + .one($.support.transition.end, complete) + .emulateTransitionEnd(150) : + complete() + } + } + + Tooltip.prototype.applyPlacement = function (offset, placement) { + var replace + var $tip = this.tip() + var width = $tip[0].offsetWidth + var height = $tip[0].offsetHeight + + // manually read margins because getBoundingClientRect includes difference + var marginTop = parseInt($tip.css('margin-top'), 10) + var marginLeft = parseInt($tip.css('margin-left'), 10) + + // we must check for NaN for ie 8/9 + if (isNaN(marginTop)) marginTop = 0 + if (isNaN(marginLeft)) marginLeft = 0 + + offset.top = offset.top + marginTop + offset.left = offset.left + marginLeft + + // $.fn.offset doesn't round pixel values + // so we use setOffset directly with our own function B-0 + $.offset.setOffset($tip[0], $.extend({ + using: function (props) { + $tip.css({ + top: Math.round(props.top), + left: Math.round(props.left) + }) + } + }, offset), 0) + + $tip.addClass('in') + + // check to see if placing tip in new offset caused the tip to resize itself + var actualWidth = $tip[0].offsetWidth + var actualHeight = $tip[0].offsetHeight + + if (placement == 'top' && actualHeight != height) { + replace = true + offset.top = offset.top + height - actualHeight + } + + if (/bottom|top/.test(placement)) { + var delta = 0 + + if (offset.left < 0) { + delta = offset.left * -2 + offset.left = 0 + + $tip.offset(offset) + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + } + + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') + } else { + this.replaceArrow(actualHeight - height, actualHeight, 'top') + } + + if (replace) $tip.offset(offset) + } + + Tooltip.prototype.replaceArrow = function (delta, dimension, position) { + this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '') + } + + Tooltip.prototype.setContent = function () { + var $tip = this.tip() + var title = this.getTitle() + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) + $tip.removeClass('fade in top bottom left right') + } + + Tooltip.prototype.hide = function () { + var that = this + var $tip = this.tip() + var e = $.Event('hide.bs.' + this.type) + + function complete() { + if (that.hoverState != 'in') $tip.detach() + that.$element.trigger('hidden.bs.' + that.type) + } + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + $tip.removeClass('in') + + $.support.transition && this.$tip.hasClass('fade') ? + $tip + .one($.support.transition.end, complete) + .emulateTransitionEnd(150) : + complete() + + this.hoverState = null + + return this + } + + Tooltip.prototype.fixTitle = function () { + var $e = this.$element + if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') + } + } + + Tooltip.prototype.hasContent = function () { + return this.getTitle() + } + + Tooltip.prototype.getPosition = function () { + var el = this.$element[0] + return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { + width: el.offsetWidth, + height: el.offsetHeight + }, this.$element.offset()) + } + + Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { + return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : + /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } + } + + Tooltip.prototype.getTitle = function () { + var title + var $e = this.$element + var o = this.options + + title = $e.attr('data-original-title') + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + + return title + } + + Tooltip.prototype.tip = function () { + return this.$tip = this.$tip || $(this.options.template) + } + + Tooltip.prototype.arrow = function () { + return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow') + } + + Tooltip.prototype.validate = function () { + if (!this.$element[0].parentNode) { + this.hide() + this.$element = null + this.options = null + } + } + + Tooltip.prototype.enable = function () { + this.enabled = true + } + + Tooltip.prototype.disable = function () { + this.enabled = false + } + + Tooltip.prototype.toggleEnabled = function () { + this.enabled = !this.enabled + } + + Tooltip.prototype.toggle = function (e) { + var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this + self.tip().hasClass('in') ? self.leave(self) : self.enter(self) + } + + Tooltip.prototype.destroy = function () { + clearTimeout(this.timeout) + this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) + } + + + // TOOLTIP PLUGIN DEFINITION + // ========================= + + var old = $.fn.tooltip + + $.fn.tooltip = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tooltip') + var options = typeof option == 'object' && option + + if (!data && option == 'destroy') return + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tooltip.Constructor = Tooltip + + + // TOOLTIP NO CONFLICT + // =================== + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old + return this + } + +}(jQuery); + +/* ======================================================================== + * Bootstrap: popover.js v3.1.1 + * http://getbootstrap.com/javascript/#popovers + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // POPOVER PUBLIC CLASS DEFINITION + // =============================== + + var Popover = function (element, options) { + this.init('popover', element, options) + } + + if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') + + Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { + placement: 'right', + trigger: 'click', + content: '', + template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' + }) + + + // NOTE: POPOVER EXTENDS tooltip.js + // ================================ + + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) + + Popover.prototype.constructor = Popover + + Popover.prototype.getDefaults = function () { + return Popover.DEFAULTS + } + + Popover.prototype.setContent = function () { + var $tip = this.tip() + var title = this.getTitle() + var content = this.getContent() + + $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) + $tip.find('.popover-content')[ // we use append for html objects to maintain js events + this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' + ](content) + + $tip.removeClass('fade top bottom left right in') + + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do + // this manually by checking the contents. + if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() + } + + Popover.prototype.hasContent = function () { + return this.getTitle() || this.getContent() + } + + Popover.prototype.getContent = function () { + var $e = this.$element + var o = this.options + + return $e.attr('data-content') + || (typeof o.content == 'function' ? + o.content.call($e[0]) : + o.content) + } + + Popover.prototype.arrow = function () { + return this.$arrow = this.$arrow || this.tip().find('.arrow') + } + + Popover.prototype.tip = function () { + if (!this.$tip) this.$tip = $(this.options.template) + return this.$tip + } + + + // POPOVER PLUGIN DEFINITION + // ========================= + + var old = $.fn.popover + + $.fn.popover = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.popover') + var options = typeof option == 'object' && option + + if (!data && option == 'destroy') return + if (!data) $this.data('bs.popover', (data = new Popover(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.popover.Constructor = Popover + + + // POPOVER NO CONFLICT + // =================== + + $.fn.popover.noConflict = function () { + $.fn.popover = old + return this + } + +}(jQuery); + +/* ======================================================================== + * Bootstrap: scrollspy.js v3.1.1 + * http://getbootstrap.com/javascript/#scrollspy + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // SCROLLSPY CLASS DEFINITION + // ========================== + + function ScrollSpy(element, options) { + var href + var process = $.proxy(this.process, this) + + this.$element = $(element).is('body') ? $(window) : $(element) + this.$body = $('body') + this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process) + this.options = $.extend({}, ScrollSpy.DEFAULTS, options) + this.selector = (this.options.target + || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + || '') + ' .nav li > a' + this.offsets = $([]) + this.targets = $([]) + this.activeTarget = null + + this.refresh() + this.process() + } + + ScrollSpy.DEFAULTS = { + offset: 10 + } + + ScrollSpy.prototype.refresh = function () { + var offsetMethod = this.$element[0] == window ? 'offset' : 'position' + + this.offsets = $([]) + this.targets = $([]) + + var self = this + var $targets = this.$body + .find(this.selector) + .map(function () { + var $el = $(this) + var href = $el.data('target') || $el.attr('href') + var $href = /^#./.test(href) && $(href) + + return ($href + && $href.length + && $href.is(':visible') + && [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null + }) + .sort(function (a, b) { return a[0] - b[0] }) + .each(function () { + self.offsets.push(this[0]) + self.targets.push(this[1]) + }) + } + + ScrollSpy.prototype.process = function () { + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight + var maxScroll = scrollHeight - this.$scrollElement.height() + var offsets = this.offsets + var targets = this.targets + var activeTarget = this.activeTarget + var i + + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets.last()[0]) && this.activate(i) + } + + if (activeTarget && scrollTop <= offsets[0]) { + return activeTarget != (i = targets[0]) && this.activate(i) + } + + for (i = offsets.length; i--;) { + activeTarget != targets[i] + && scrollTop >= offsets[i] + && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) + && this.activate( targets[i] ) + } + } + + ScrollSpy.prototype.activate = function (target) { + this.activeTarget = target + + $(this.selector) + .parentsUntil(this.options.target, '.active') + .removeClass('active') + + var selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]' + + var active = $(selector) + .parents('li') + .addClass('active') + + if (active.parent('.dropdown-menu').length) { + active = active + .closest('li.dropdown') + .addClass('active') + } + + active.trigger('activate.bs.scrollspy') + } + + + // SCROLLSPY PLUGIN DEFINITION + // =========================== + + var old = $.fn.scrollspy + + $.fn.scrollspy = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.scrollspy') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.scrollspy.Constructor = ScrollSpy + + + // SCROLLSPY NO CONFLICT + // ===================== + + $.fn.scrollspy.noConflict = function () { + $.fn.scrollspy = old + return this + } + + + // SCROLLSPY DATA-API + // ================== + + $(window).on('load', function () { + $('[data-spy="scroll"]').each(function () { + var $spy = $(this) + $spy.scrollspy($spy.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: tab.js v3.1.1 + * http://getbootstrap.com/javascript/#tabs + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // TAB CLASS DEFINITION + // ==================== + + var Tab = function (element) { + this.element = $(element) + } + + Tab.prototype.show = function () { + var $this = this.element + var $ul = $this.closest('ul:not(.dropdown-menu)') + var selector = $this.data('target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + if ($this.parent('li').hasClass('active')) return + + var previous = $ul.find('.active:last a')[0] + var e = $.Event('show.bs.tab', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + var $target = $(selector) + + this.activate($this.parent('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown.bs.tab', + relatedTarget: previous + }) + }) + } + + Tab.prototype.activate = function (element, container, callback) { + var $active = container.find('> .active') + var transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if (element.parent('.dropdown-menu')) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active + .one($.support.transition.end, next) + .emulateTransitionEnd(150) : + next() + + $active.removeClass('in') + } + + + // TAB PLUGIN DEFINITION + // ===================== + + var old = $.fn.tab + + $.fn.tab = function ( option ) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tab') + + if (!data) $this.data('bs.tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tab.Constructor = Tab + + + // TAB NO CONFLICT + // =============== + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + // TAB DATA-API + // ============ + + $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + $(this).tab('show') + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: affix.js v3.1.1 + * http://getbootstrap.com/javascript/#affix + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // AFFIX CLASS DEFINITION + // ====================== + + var Affix = function (element, options) { + this.options = $.extend({}, Affix.DEFAULTS, options) + this.$window = $(window) + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) + + this.$element = $(element) + this.affixed = + this.unpin = + this.pinnedOffset = null + + this.checkPosition() + } + + Affix.RESET = 'affix affix-top affix-bottom' + + Affix.DEFAULTS = { + offset: 0 + } + + Affix.prototype.getPinnedOffset = function () { + if (this.pinnedOffset) return this.pinnedOffset + this.$element.removeClass(Affix.RESET).addClass('affix') + var scrollTop = this.$window.scrollTop() + var position = this.$element.offset() + return (this.pinnedOffset = position.top - scrollTop) + } + + Affix.prototype.checkPositionWithEventLoop = function () { + setTimeout($.proxy(this.checkPosition, this), 1) + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + var scrollTop = this.$window.scrollTop() + var position = this.$element.offset() + var offset = this.options.offset + var offsetTop = offset.top + var offsetBottom = offset.bottom + + if (this.affixed == 'top') position.top += scrollTop + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) + + var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : + offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : + offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false + + if (this.affixed === affix) return + if (this.unpin) this.$element.css('top', '') + + var affixType = 'affix' + (affix ? '-' + affix : '') + var e = $.Event(affixType + '.bs.affix') + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + + this.$element + .removeClass(Affix.RESET) + .addClass(affixType) + .trigger($.Event(affixType.replace('affix', 'affixed'))) + + if (affix == 'bottom') { + this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() }) + } + } + + + // AFFIX PLUGIN DEFINITION + // ======================= + + var old = $.fn.affix + + $.fn.affix = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.affix') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.affix.Constructor = Affix + + + // AFFIX NO CONFLICT + // ================= + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + // AFFIX DATA-API + // ============== + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + var data = $spy.data() + + data.offset = data.offset || {} + + if (data.offsetBottom) data.offset.bottom = data.offsetBottom + if (data.offsetTop) data.offset.top = data.offsetTop + + $spy.affix(data) + }) + }) + +}(jQuery); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js new file mode 100644 index 0000000..b04a0e8 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.bower.json b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.bower.json new file mode 100644 index 0000000..146a31e --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.bower.json @@ -0,0 +1,14 @@ +{ + "name": "es5-shim", + "homepage": "https://github.com/es-shims/es5-shim", + "version": "2.1.0", + "_release": "2.1.0", + "_resolution": { + "type": "version", + "tag": "v2.1.0", + "commit": "07da727ff7db2a3a25d6bc25d13e374b3bbc99c2" + }, + "_source": "git://github.com/es-shims/es5-shim.git", + "_target": "~2.1.0", + "_originalSource": "es5-shim" +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.gitignore b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.gitignore new file mode 100644 index 0000000..fd4f2b0 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/.gitignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CHANGES b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CHANGES new file mode 100644 index 0000000..f6f4f04 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CHANGES @@ -0,0 +1,93 @@ + +2.0.0 + - Separate reliable shims from dubious shims (shams). + +1.2.10 + - Group-effort Style Cleanup + - Took a stab at fixing Object.defineProperty on IE8 without + bad side-effects. (@hax) + - Object.isExtensible no longer fakes it. (@xavierm) + - Date.prototype.toISOString no longer deals with partial + ISO dates, per spec (@kitcambridge) + - More (mostly from @bryanforbes) + +1.2.9 + - Corrections to toISOString by @kitcambridge + - Fixed three bugs in array methods revealed by Jasmine tests. + - Cleaned up Function.prototype.bind with more fixes and tests from + @bryanforbes. + +1.2.8 + - Actually fixed problems with Function.prototype.bind, and regressions + from 1.2.7 (@bryanforbes, @jdalton #36) + +1.2.7 - REGRESSED + - Fixed problems with Function.prototype.bind when called as a constructor. + (@jdalton #36) + +1.2.6 + - Revised Date.parse to match ES 5.1 (kitcambridge) + +1.2.5 + - Fixed a bug for padding it Date..toISOString (tadfisher issue #33) + +1.2.4 + - Fixed a descriptor bug in Object.defineProperty (raynos) + +1.2.3 + - Cleaned up RequireJS and <script> boilerplate + +1.2.2 + - Changed reduce to follow the letter of the spec with regard to having and + owning properties. + - Fixed a bug where RegExps pass as Functions in some engines in reduce. + +1.2.1 + - Adding few fixes to make jshint happy. + - Fix for issue #12, function expressions can cause scoping issues in IE. + - NPM will minify on install or when `npm run-script install` is executed. + - Adding .gitignore to avoid publishing dev dependencies. + +1.2.0 + - Making script loadable as AMD module. + - Adding `indexOf` to the list of safe shims. + +1.1.0 + - Added support for accessor properties where possible (which is all browsers + except IE). + - Stop exposing bound function's (that are returned by + `Function.prototype.bind`) internal properties (`bound, boundTo, boundArgs`) + as in some cases (when using facade objects for example) capabilities of the + enclosed functions will be leaked. + - `Object.create` now explicitly sets `__proto__` property to guarantee + correct behavior of `Object.getPrototypeOf`'s on all objects created using + `Object.create`. + - Switched to `===` from `==` where possible as it's slightly faster on older + browsers that are target of this lib. + - Added names to all anonymous functions to have a better stack traces. + +1.0.0 + - fixed Date.toISODate, using UTC accessors, as in + http://code.google.com/p/v8/source/browse/trunk/src/date.js?r=6120#986 + (arian) + +0.0.4 + - Revised Object.getPrototypeOf to work in more cases + in response to http://ejohn.org/blog/objectgetprototypeof/ + [issue #2] (fschaefer) + +0.0.3 + - Fixed typos in Object.keys (samsonjs) + +0.0.2 + Per kangax's recommendations: + - faster Object.create(null) + - fixed a function-scope function declaration statement in Object.create + +0.0.1 + - fixed Object.create(null), in so far as that's possible + - reworked Rhino Object.freeze(Function) bug detector and patcher + +0.0.0 + - forked from narwhal-lib + diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CONTRIBUTORS.md b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CONTRIBUTORS.md new file mode 100644 index 0000000..f1a3354 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/CONTRIBUTORS.md @@ -0,0 +1,25 @@ + +- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License +- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal + Project) +- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA +- fschaefer Florian Schäfer Copyright (C) 2010 MIT License +- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License +- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License +- kossnocorp Sasha Koss XXX TODO License or CLA +- bryanforbes Bryan Forbes XXX TODO License or CLA +- killdream Quildreen Motta Copyright (C) 2011 MIT Licence +- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD + License +- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License +- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain) +- iwyg XXX TODO License or CLA +- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License +- xavierm02 Montillet Xavier Copyright (C) 2011 MIT License +- Raynos Jake Verbaten Copyright (C) 2011 MIT Licence +- samsonjs Sami Samhuri Copyright (C) 2010 MIT License +- rwldrn Rick Waldron Copyright (C) 2011 MIT License +- lexer Alexey Zakharov XXX TODO License or CLA +- 280 North Inc. (Now Motorola LLC, a subsidiary of Google Inc.) + Copyright (C) 2009 MIT License +- Steven Levithan Copyright (C) 2012 MIT License diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/LICENSE b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/LICENSE new file mode 100644 index 0000000..fee0825 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/LICENSE @@ -0,0 +1,19 @@ + +Copyright 2009, 2010 Kristopher Michael Kowal. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/README.md b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/README.md new file mode 100644 index 0000000..9a1945d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/README.md @@ -0,0 +1,161 @@ + +`es5-shim.js` and `es5-shim.min.js` monkey-patch a JavaScript context to +contain all EcmaScript 5 methods that can be faithfully emulated with a +legacy JavaScript engine. + +`es5-sham.js` and `es5-sham.min.js` monkey-patch other ES5 methods as +closely as possible. For these methods, as closely as possible to ES5 +is not very close. Many of these shams are intended only to allow code +to be written to ES5 without causing run-time errors in older engines. +In many cases, this means that these shams cause many ES5 methods to +silently fail. Decide carefully whether this is what you want. + + +## Tests + +The tests are written with the Jasmine BDD test framework. +To run the tests, navigate to <root-folder>/tests/. + +In order to run against the shim-code, the tests attempt to kill the current +implementation of the missing methods. This happens in <root-folder>/tests/helpers/h-kill.js. +So in order to run the tests against the built-in methods, invalidate that file somehow +(comment-out, delete the file, delete the script-tag, etc.). + +## Shims + +### Complete tests ### + +* Array.prototype.every +* Array.prototype.filter +* Array.prototype.forEach +* Array.prototype.indexOf +* Array.prototype.lastIndexOf +* Array.prototype.map +* Array.prototype.some +* Array.prototype.reduce +* Array.prototype.reduceRight +* Array.isArray +* Date.now +* Date.prototype.toJSON +* Function.prototype.bind + * /!\ Caveat: the bound function's length is always 0. + * /!\ Caveat: the bound function has a prototype property. + * /!\ Caveat: bound functions do not try too hard to keep you + from manipulating their ``arguments`` and ``caller`` properties. + * /!\ Caveat: bound functions don't have checks in ``call`` and + ``apply`` to avoid executing as a constructor. +* Object.keys +* String.prototype.trim + +### Untested ### + +* Date.parse (for ISO parsing) +* Date.prototype.toISOString + +## Shams + +* /?\ Object.create + + For the case of simply "begetting" an object that + inherits prototypically from another, this should work + fine across legacy engines. + + /!\ Object.create(null) will work only in browsers that + support prototype assignment. This creates an object + that does not have any properties inherited from + Object.prototype. It will silently fail otherwise. + + /!\ The second argument is passed to + Object.defineProperties which will probably fail + silently. + +* /?\ Object.getPrototypeOf + + This will return "undefined" in some cases. It uses + __proto__ if it's available. Failing that, it uses + constructor.prototype, which depends on the constructor + property of the object's prototype having not been + replaced. If your object was created like this, it + won't work: + + function Foo() { + } + Foo.prototype = {}; + + Because the prototype reassignment destroys the + constructor property. + + This will work for all objects that were created using + `Object.create` implemented with this library. + +* /!\ Object.getOwnPropertyNames + + This method uses Object.keys, so it will not be accurate + on legacy engines. + +* Object.isSealed + + Returns "false" in all legacy engines for all objects, + which is conveniently guaranteed to be accurate. + +* Object.isFrozen + + Returns "false" in all legacy engines for all objects, + which is conveniently guaranteed to be accurate. + +* Object.isExtensible + + Works like a charm, by trying very hard to extend the + object then redacting the extension. + +### Fail silently + +* /!\ Object.getOwnPropertyDescriptor + + The behavior of this shim does not conform to ES5. It + should probably not be used at this time, until its + behavior has been reviewed and been confirmed to be + useful in legacy engines. + +* /!\ Object.defineProperty + + This method will silently fail to set "writable", + "enumerable", and "configurable" properties. + + Providing a getter or setter with "get" or "set" on a + descriptor will silently fail on engines that lack + "__defineGetter__" and "__defineSetter__", which include + all versions of IE up to version 8 so far. + + IE 8 provides a version of this method but it only works + on DOM objects. Thus, the shim will not get installed + and attempts to set "value" properties will fail + silently on non-DOM objects. + + https://github.com/kriskowal/es5-shim/issues#issue/5 + +* /!\ Object.defineProperties + + This uses the Object.defineProperty shim + +* Object.seal + + Silently fails on all legacy engines. This should be + fine unless you are depending on the safety and security + provisions of this method, which you cannot possibly + obtain in legacy engines. + +* Object.freeze + + Silently fails on all legacy engines. This should be + fine unless you are depending on the safety and security + provisions of this method, which you cannot possibly + obtain in legacy engines. + +* Object.preventExtensions + + Silently fails on all legacy engines. This should be + fine unless you are depending on the safety and security + provisions of this method, which you cannot possibly + obtain in legacy engines. + diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js new file mode 100644 index 0000000..d8d8905 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js @@ -0,0 +1,444 @@ +// Copyright 2009-2012 by contributors, MIT License +// vim: ts=4 sts=4 sw=4 expandtab + +// Module systems magic dance +(function (definition) { + // RequireJS + if (typeof define == "function") { + define(definition); + // YUI3 + } else if (typeof YUI == "function") { + YUI.add("es5-sham", definition); + // CommonJS and <script> + } else { + definition(); + } +})(function () { + + +var call = Function.prototype.call; +var prototypeOfObject = Object.prototype; +var owns = call.bind(prototypeOfObject.hasOwnProperty); + +// If JS engine supports accessors creating shortcuts. +var defineGetter; +var defineSetter; +var lookupGetter; +var lookupSetter; +var supportsAccessors; +if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); +} + +// ES5 15.2.3.2 +// http://es5.github.com/#x15.2.3.2 +if (!Object.getPrototypeOf) { + // https://github.com/kriskowal/es5-shim/issues#issue/2 + // http://ejohn.org/blog/objectgetprototypeof/ + // recommended by fschaefer on github + Object.getPrototypeOf = function getPrototypeOf(object) { + return object.__proto__ || ( + object.constructor + ? object.constructor.prototype + : prototypeOfObject + ); + }; +} + +//ES5 15.2.3.3 +//http://es5.github.com/#x15.2.3.3 + +function doesGetOwnPropertyDescriptorWork(object) { + try { + object.sentinel = 0; + return Object.getOwnPropertyDescriptor( + object, + "sentinel" + ).value === 0; + } catch (exception) { + // returns falsy + } +} + +//check whether getOwnPropertyDescriptor works if it's given. Otherwise, +//shim partially. +if (Object.defineProperty) { + var getOwnPropertyDescriptorWorksOnObject = + doesGetOwnPropertyDescriptorWork({}); + var getOwnPropertyDescriptorWorksOnDom = typeof document == "undefined" || + doesGetOwnPropertyDescriptorWork(document.createElement("div")); + if (!getOwnPropertyDescriptorWorksOnDom || + !getOwnPropertyDescriptorWorksOnObject + ) { + var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor; + } +} + +if (!Object.getOwnPropertyDescriptor || getOwnPropertyDescriptorFallback) { + var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a non-object: "; + + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if ((typeof object != "object" && typeof object != "function") || object === null) { + throw new TypeError(ERR_NON_OBJECT + object); + } + + // make a valiant attempt to use the real getOwnPropertyDescriptor + // for I8's DOM elements. + if (getOwnPropertyDescriptorFallback) { + try { + return getOwnPropertyDescriptorFallback.call(Object, object, property); + } catch (exception) { + // try the shim if the real one doesn't work + } + } + + // If object does not owns property return undefined immediately. + if (!owns(object, property)) { + return; + } + + // If object has a property then it's for sure both `enumerable` and + // `configurable`. + var descriptor = { enumerable: true, configurable: true }; + + // If JS engine supports accessor properties then property may be a + // getter or setter. + if (supportsAccessors) { + // Unfortunately `__lookupGetter__` will return a getter even + // if object has own non getter property along with a same named + // inherited getter. To avoid misbehavior we temporary remove + // `__proto__` so that `__lookupGetter__` will return getter only + // if it's owned by an object. + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + + // Once we have getter and setter we can put values back. + object.__proto__ = prototype; + + if (getter || setter) { + if (getter) { + descriptor.get = getter; + } + if (setter) { + descriptor.set = setter; + } + // If it was accessor property we're done and return here + // in order to avoid adding `value` to the descriptor. + return descriptor; + } + } + + // If we got this far we know that object has an own property that is + // not an accessor so we set it as a value and return descriptor. + descriptor.value = object[property]; + descriptor.writable = true; + return descriptor; + }; +} + +// ES5 15.2.3.4 +// http://es5.github.com/#x15.2.3.4 +if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object); + }; +} + +// ES5 15.2.3.5 +// http://es5.github.com/#x15.2.3.5 +if (!Object.create) { + + // Contributed by Brandon Benvie, October, 2012 + var createEmpty; + var supportsProto = Object.prototype.__proto__ === null; + if (supportsProto || typeof document == 'undefined') { + createEmpty = function () { + return { "__proto__": null }; + }; + } else { + // In old IE __proto__ can't be used to manually set `null`, nor does + // any other method exist to make an object that inherits from nothing, + // aside from Object.prototype itself. Instead, create a new global + // object and *steal* its Object.prototype and strip it bare. This is + // used as the prototype to create nullary objects. + createEmpty = function () { + var iframe = document.createElement('iframe'); + var parent = document.body || document.documentElement; + iframe.style.display = 'none'; + parent.appendChild(iframe); + iframe.src = 'javascript:'; + var empty = iframe.contentWindow.Object.prototype; + parent.removeChild(iframe); + iframe = null; + delete empty.constructor; + delete empty.hasOwnProperty; + delete empty.propertyIsEnumerable; + delete empty.isPrototypeOf; + delete empty.toLocaleString; + delete empty.toString; + delete empty.valueOf; + empty.__proto__ = null; + + function Empty() {} + Empty.prototype = empty; + // short-circuit future calls + createEmpty = function () { + return new Empty(); + }; + return new Empty(); + }; + } + + Object.create = function create(prototype, properties) { + + var object; + function Type() {} // An empty constructor. + + if (prototype === null) { + object = createEmpty(); + } else { + if (typeof prototype !== "object" && typeof prototype !== "function") { + // In the native implementation `parent` can be `null` + // OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc) + // Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object` + // like they are in modern browsers. Using `Object.create` on DOM elements + // is...err...probably inappropriate, but the native version allows for it. + throw new TypeError("Object prototype may only be an Object or null"); // same msg as Chrome + } + Type.prototype = prototype; + object = new Type(); + // IE has no built-in implementation of `Object.getPrototypeOf` + // neither `__proto__`, but this manually setting `__proto__` will + // guarantee that `Object.getPrototypeOf` will work as expected with + // objects created using `Object.create` + object.__proto__ = prototype; + } + + if (properties !== void 0) { + Object.defineProperties(object, properties); + } + + return object; + }; +} + +// ES5 15.2.3.6 +// http://es5.github.com/#x15.2.3.6 + +// Patch for WebKit and IE8 standard mode +// Designed by hax <hax.github.com> +// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5 +// IE8 Reference: +// http://msdn.microsoft.com/en-us/library/dd282900.aspx +// http://msdn.microsoft.com/en-us/library/dd229916.aspx +// WebKit Bugs: +// https://bugs.webkit.org/show_bug.cgi?id=36423 + +function doesDefinePropertyWork(object) { + try { + Object.defineProperty(object, "sentinel", {}); + return "sentinel" in object; + } catch (exception) { + // returns falsy + } +} + +// check whether defineProperty works if it's given. Otherwise, +// shim partially. +if (Object.defineProperty) { + var definePropertyWorksOnObject = doesDefinePropertyWork({}); + var definePropertyWorksOnDom = typeof document == "undefined" || + doesDefinePropertyWork(document.createElement("div")); + if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { + var definePropertyFallback = Object.defineProperty, + definePropertiesFallback = Object.defineProperties; + } +} + +if (!Object.defineProperty || definePropertyFallback) { + var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; + var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + + "on this javascript engine"; + + Object.defineProperty = function defineProperty(object, property, descriptor) { + if ((typeof object != "object" && typeof object != "function") || object === null) { + throw new TypeError(ERR_NON_OBJECT_TARGET + object); + } + if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) { + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); + } + // make a valiant attempt to use the real defineProperty + // for I8's DOM elements. + if (definePropertyFallback) { + try { + return definePropertyFallback.call(Object, object, property, descriptor); + } catch (exception) { + // try the shim if the real one doesn't work + } + } + + // If it's a data property. + if (owns(descriptor, "value")) { + // fail silently if "writable", "enumerable", or "configurable" + // are requested but not supported + /* + // alternate approach: + if ( // can't implement these features; allow false but not true + !(owns(descriptor, "writable") ? descriptor.writable : true) || + !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) || + !(owns(descriptor, "configurable") ? descriptor.configurable : true) + ) + throw new RangeError( + "This implementation of Object.defineProperty does not " + + "support configurable, enumerable, or writable." + ); + */ + + if (supportsAccessors && (lookupGetter(object, property) || + lookupSetter(object, property))) + { + // As accessors are supported only on engines implementing + // `__proto__` we can safely override `__proto__` while defining + // a property to make sure that we don't hit an inherited + // accessor. + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + // Deleting a property anyway since getter / setter may be + // defined on object itself. + delete object[property]; + object[property] = descriptor.value; + // Setting original `__proto__` back now. + object.__proto__ = prototype; + } else { + object[property] = descriptor.value; + } + } else { + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + // If we got that far then getters and setters can be defined !! + if (owns(descriptor, "get")) { + defineGetter(object, property, descriptor.get); + } + if (owns(descriptor, "set")) { + defineSetter(object, property, descriptor.set); + } + } + return object; + }; +} + +// ES5 15.2.3.7 +// http://es5.github.com/#x15.2.3.7 +if (!Object.defineProperties || definePropertiesFallback) { + Object.defineProperties = function defineProperties(object, properties) { + // make a valiant attempt to use the real defineProperties + if (definePropertiesFallback) { + try { + return definePropertiesFallback.call(Object, object, properties); + } catch (exception) { + // try the shim if the real one doesn't work + } + } + + for (var property in properties) { + if (owns(properties, property) && property != "__proto__") { + Object.defineProperty(object, property, properties[property]); + } + } + return object; + }; +} + +// ES5 15.2.3.8 +// http://es5.github.com/#x15.2.3.8 +if (!Object.seal) { + Object.seal = function seal(object) { + // this is misleading and breaks feature-detection, but + // allows "securable" code to "gracefully" degrade to working + // but insecure code. + return object; + }; +} + +// ES5 15.2.3.9 +// http://es5.github.com/#x15.2.3.9 +if (!Object.freeze) { + Object.freeze = function freeze(object) { + // this is misleading and breaks feature-detection, but + // allows "securable" code to "gracefully" degrade to working + // but insecure code. + return object; + }; +} + +// detect a Rhino bug and patch it +try { + Object.freeze(function () {}); +} catch (exception) { + Object.freeze = (function freeze(freezeObject) { + return function freeze(object) { + if (typeof object == "function") { + return object; + } else { + return freezeObject(object); + } + }; + })(Object.freeze); +} + +// ES5 15.2.3.10 +// http://es5.github.com/#x15.2.3.10 +if (!Object.preventExtensions) { + Object.preventExtensions = function preventExtensions(object) { + // this is misleading and breaks feature-detection, but + // allows "securable" code to "gracefully" degrade to working + // but insecure code. + return object; + }; +} + +// ES5 15.2.3.11 +// http://es5.github.com/#x15.2.3.11 +if (!Object.isSealed) { + Object.isSealed = function isSealed(object) { + return false; + }; +} + +// ES5 15.2.3.12 +// http://es5.github.com/#x15.2.3.12 +if (!Object.isFrozen) { + Object.isFrozen = function isFrozen(object) { + return false; + }; +} + +// ES5 15.2.3.13 +// http://es5.github.com/#x15.2.3.13 +if (!Object.isExtensible) { + Object.isExtensible = function isExtensible(object) { + // 1. If Type(O) is not Object throw a TypeError exception. + if (Object(object) !== object) { + throw new TypeError(); // TODO message + } + // 2. Return the Boolean value of the [[Extensible]] internal property of O. + var name = ''; + while (owns(object, name)) { + name += '?'; + } + object[name] = true; + var returnValue = owns(object, name); + delete object[name]; + return returnValue; + }; +} + +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.map b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.map new file mode 100644 index 0000000..880dd39 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.map @@ -0,0 +1 @@ +{"version":3,"sources":["es5-sham.js"],"names":["definition","define","YUI","add","call","Function","prototype","prototypeOfObject","Object","owns","bind","hasOwnProperty","defineGetter","defineSetter","lookupGetter","lookupSetter","supportsAccessors","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","getPrototypeOf","object","__proto__","constructor","doesGetOwnPropertyDescriptorWork","sentinel","getOwnPropertyDescriptor","value","exception","defineProperty","getOwnPropertyDescriptorWorksOnObject","getOwnPropertyDescriptorWorksOnDom","document","createElement","getOwnPropertyDescriptorFallback","ERR_NON_OBJECT","property","TypeError","descriptor","enumerable","configurable","getter","setter","get","set","writable","getOwnPropertyNames","keys","create","createEmpty","supportsProto","iframe","parent","body","documentElement","style","display","appendChild","src","empty","contentWindow","removeChild","propertyIsEnumerable","isPrototypeOf","toLocaleString","toString","valueOf","Empty","properties","Type","defineProperties","doesDefinePropertyWork","definePropertyWorksOnObject","definePropertyWorksOnDom","definePropertyFallback","definePropertiesFallback","ERR_NON_OBJECT_DESCRIPTOR","ERR_NON_OBJECT_TARGET","ERR_ACCESSORS_NOT_SUPPORTED","seal","freeze","freezeObject","preventExtensions","isSealed","isFrozen","isExtensible","name","returnValue"],"mappings":"CAIA,SAAWA,YAEP,SAAWC,SAAU,WAAY,CAC7BA,OAAOD,gBAEJ,UAAWE,MAAO,WAAY,CACjCA,IAAIC,IAAI,WAAYH,gBAEjB,CACHA,gBAEL,WAGH,GAAII,MAAOC,SAASC,UAAUF,IAC9B,IAAIG,mBAAoBC,OAAOF,SAC/B,IAAIG,MAAOL,KAAKM,KAAKH,kBAAkBI,eAGvC,IAAIC,aACJ,IAAIC,aACJ,IAAIC,aACJ,IAAIC,aACJ,IAAIC,kBACJ,IAAKA,kBAAoBP,KAAKF,kBAAmB,oBAAsB,CACnEK,aAAeR,KAAKM,KAAKH,kBAAkBU,iBAC3CJ,cAAeT,KAAKM,KAAKH,kBAAkBW,iBAC3CJ,cAAeV,KAAKM,KAAKH,kBAAkBY,iBAC3CJ,cAAeX,KAAKM,KAAKH,kBAAkBa,kBAK/C,IAAKZ,OAAOa,eAAgB,CAIxBb,OAAOa,eAAiB,QAASA,gBAAeC,QAC5C,MAAOA,QAAOC,YACVD,OAAOE,YACDF,OAAOE,YAAYlB,UACnBC,oBAQlB,QAASkB,kCAAiCH,QACtC,IACIA,OAAOI,SAAW,CAClB,OAAOlB,QAAOmB,yBACNL,OACA,YACNM,QAAU,EACd,MAAOC,aAOb,GAAIrB,OAAOsB,eAAgB,CACvB,GAAIC,uCACAN,oCACJ,IAAIO,0CAA4CC,WAAY,aAC5DR,iCAAiCQ,SAASC,cAAc,OACxD,KAAKF,qCACID,sCACP,CACE,GAAII,kCAAmC3B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CAC7B,MAAOA,YACJ,CACH,MAAO4D,cAAa5D,WAG7Bd,OAAOyE,QAKd,IAAKzE,OAAO2E,kBAAmB,CAC3B3E,OAAO2E,kBAAoB,QAASA,mBAAkB7D,QAIlD,MAAOA,SAMf,IAAKd,OAAO4E,SAAU,CAClB5E,OAAO4E,SAAW,QAASA,UAAS9D,QAChC,MAAO,QAMf,IAAKd,OAAO6E,SAAU,CAClB7E,OAAO6E,SAAW,QAASA,UAAS/D,QAChC,MAAO,QAMf,IAAKd,OAAO8E,aAAc,CACtB9E,OAAO8E,aAAe,QAASA,cAAahE,QAExC,GAAId,OAAOc,UAAYA,OAAQ,CAC3B,KAAM,IAAIgB,WAGd,GAAIiD,MAAO,EACX,OAAO9E,KAAKa,OAAQiE,MAAO,CACvBA,MAAQ,IAEZjE,OAAOiE,MAAQ,IACf,IAAIC,aAAc/E,KAAKa,OAAQiE,YACxBjE,QAAOiE,KACd,OAAOC"} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.min.js new file mode 100644 index 0000000..a671709 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-sham.min.js @@ -0,0 +1,280 @@ +(function (definition) { + if (typeof define == "function") { + define(definition) + } else if (typeof YUI == "function") { + YUI.add("es5-sham", definition) + } else { + definition() + } +})(function () { + var call = Function.prototype.call; + var prototypeOfObject = Object.prototype; + var owns = call.bind(prototypeOfObject.hasOwnProperty); + var defineGetter; + var defineSetter; + var lookupGetter; + var lookupSetter; + var supportsAccessors; + if (supportsAccessors = owns(prototypeOfObject, "__defineGetter__")) { + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__) + } + if (!Object.getPrototypeOf) { + Object.getPrototypeOf = function getPrototypeOf(object) { + return object.__proto__ || (object.constructor ? object.constructor.prototype : prototypeOfObject) + } + } + + function doesGetOwnPropertyDescriptorWork(object) { + try { + object.sentinel = 0; + return Object.getOwnPropertyDescriptor(object, "sentinel").value === 0 + } catch (exception) { + var abcdef = 1 + } + } + + if (Object.defineProperty) { + var getOwnPropertyDescriptorWorksOnObject = doesGetOwnPropertyDescriptorWork({}); + var getOwnPropertyDescriptorWorksOnDom = typeof document == "undefined" || doesGetOwnPropertyDescriptorWork(document.createElement("div")); + if (!getOwnPropertyDescriptorWorksOnDom || !getOwnPropertyDescriptorWorksOnObject) { + var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor + } + } + if (!Object.getOwnPropertyDescriptor || getOwnPropertyDescriptorFallback) { + var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a non-object: "; + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if (typeof object != "object" && typeof object != "function" || object === null) { + throw new TypeError(ERR_NON_OBJECT + object) + } + if (getOwnPropertyDescriptorFallback) { + try { + return getOwnPropertyDescriptorFallback.call(Object, object, property) + } catch (exception) { + var abcdef = 1 + } + } + if (!owns(object, property)) { + return + } + var descriptor = {enumerable: true, configurable: true}; + if (supportsAccessors) { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + object.__proto__ = prototype; + if (getter || setter) { + if (getter) { + descriptor.get = getter + } + if (setter) { + descriptor.set = setter + } + return descriptor + } + } + descriptor.value = object[property]; + descriptor.writable = true; + return descriptor + } + } + if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object) + } + } + if (!Object.create) { + var createEmpty; + var supportsProto = Object.prototype.__proto__ === null; + if (supportsProto || typeof document == "undefined") { + createEmpty = function () { + return {__proto__: null} + } + } else { + createEmpty = function () { + var iframe = document.createElement("iframe"); + var parent = document.body || document.documentElement; + iframe.style.display = "none"; + parent.appendChild(iframe); + iframe.src = "javascript:"; + var empty = iframe.contentWindow.Object.prototype; + parent.removeChild(iframe); + iframe = null; + delete empty.constructor; + delete empty.hasOwnProperty; + delete empty.propertyIsEnumerable; + delete empty.isPrototypeOf; + delete empty.toLocaleString; + delete empty.toString; + delete empty.valueOf; + empty.__proto__ = null; + + function Empty() { + } + + Empty.prototype = empty; + createEmpty = function () { + return new Empty + }; + return new Empty + } + } + Object.create = function create(prototype, properties) { + var object; + + function Type() { + } + + if (prototype === null) { + object = createEmpty() + } else { + if (typeof prototype !== "object" && typeof prototype !== "function") { + throw new TypeError("Object prototype may only be an Object or null") + } + Type.prototype = prototype; + object = new Type; + object.__proto__ = prototype + } + if (properties !== void 0) { + Object.defineProperties(object, properties) + } + return object + } + } + + function doesDefinePropertyWork(object) { + try { + Object.defineProperty(object, "sentinel", {}); + return "sentinel" in object + } catch (exception) { + var abcdef = 1 + } + } + + if (Object.defineProperty) { + var definePropertyWorksOnObject = doesDefinePropertyWork({}); + var definePropertyWorksOnDom = typeof document == "undefined" || doesDefinePropertyWork(document.createElement("div")); + if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { + var definePropertyFallback = Object.defineProperty, definePropertiesFallback = Object.defineProperties + } + } + if (!Object.defineProperty || definePropertyFallback) { + var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; + var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "; + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + "on this javascript engine"; + Object.defineProperty = function defineProperty(object, property, descriptor) { + if (typeof object != "object" && typeof object != "function" || object === null) { + throw new TypeError(ERR_NON_OBJECT_TARGET + object) + } + if (typeof descriptor != "object" && typeof descriptor != "function" || descriptor === null) { + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor) + } + if (definePropertyFallback) { + try { + return definePropertyFallback.call(Object, object, property, descriptor) + } catch (exception) { + var abcdef = 1 + } + } + if (owns(descriptor, "value")) { + if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + delete object[property]; + object[property] = descriptor.value; + object.__proto__ = prototype + } else { + object[property] = descriptor.value + } + } else { + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED) + } + if (owns(descriptor, "get")) { + defineGetter(object, property, descriptor.get) + } + if (owns(descriptor, "set")) { + defineSetter(object, property, descriptor.set) + } + } + return object + } + } + if (!Object.defineProperties || definePropertiesFallback) { + Object.defineProperties = function defineProperties(object, properties) { + if (definePropertiesFallback) { + try { + return definePropertiesFallback.call(Object, object, properties) + } catch (exception) { + var abcdef = 1 + } + } + for (var property in properties) { + if (owns(properties, property) && property != "__proto__") { + Object.defineProperty(object, property, properties[property]) + } + } + return object + } + } + if (!Object.seal) { + Object.seal = function seal(object) { + return object + } + } + if (!Object.freeze) { + Object.freeze = function freeze(object) { + return object + } + } + try { + Object.freeze(function () { + }) + } catch (exception) { + Object.freeze = function freeze(freezeObject) { + return function freeze(object) { + if (typeof object == "function") { + return object + } else { + return freezeObject(object) + } + } + }(Object.freeze) + } + if (!Object.preventExtensions) { + Object.preventExtensions = function preventExtensions(object) { + return object + } + } + if (!Object.isSealed) { + Object.isSealed = function isSealed(object) { + return false + } + } + if (!Object.isFrozen) { + Object.isFrozen = function isFrozen(object) { + return false + } + } + if (!Object.isExtensible) { + Object.isExtensible = function isExtensible(object) { + if (Object(object) !== object) { + throw new TypeError + } + var name = ""; + while (owns(object, name)) { + name += "?" + } + object[name] = true; + var returnValue = owns(object, name); + delete object[name]; + return returnValue + } + } +}); +/* +//@ sourceMappingURL=es5-sham.map +*/ \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js new file mode 100644 index 0000000..7572ef3 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js @@ -0,0 +1,1314 @@ +// Copyright 2009-2012 by contributors, MIT License +// vim: ts=4 sts=4 sw=4 expandtab + +// Module systems magic dance +(function (definition) { + // RequireJS + if (typeof define == "function") { + define(definition); + // YUI3 + } else if (typeof YUI == "function") { + YUI.add("es5", definition); + // CommonJS and <script> + } else { + definition(); + } +})(function () { + +/** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + +// +// Function +// ======== +// + +// ES-5 15.3.4.5 +// http://es5.github.com/#x15.3.4.5 + +function Empty() {} + +if (!Function.prototype.bind) { + Function.prototype.bind = function bind(that) { // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (typeof target != "function") { + throw new TypeError("Function.prototype.bind called on incompatible " + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = _Array_slice_.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound = function () { + + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = target.apply( + this, + args.concat(_Array_slice_.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return target.apply( + that, + args.concat(_Array_slice_.call(arguments)) + ); + + } + + }; + if(target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + // XXX bound.length is never writable, so don't even try + // + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + }; +} + +// Shortcut to an often accessed properties, in order to avoid multiple +// dereference that costs universally. +// _Please note: Shortcuts are defined after `Function.prototype.bind` as we +// us it in defining shortcuts. +var call = Function.prototype.call; +var prototypeOfArray = Array.prototype; +var prototypeOfObject = Object.prototype; +var _Array_slice_ = prototypeOfArray.slice; +// Having a toString local variable name breaks in Opera so use _toString. +var _toString = call.bind(prototypeOfObject.toString); +var owns = call.bind(prototypeOfObject.hasOwnProperty); + +// If JS engine supports accessors creating shortcuts. +var defineGetter; +var defineSetter; +var lookupGetter; +var lookupSetter; +var supportsAccessors; +if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); +} + +// +// Array +// ===== +// + +// ES5 15.4.4.12 +// http://es5.github.com/#x15.4.4.12 +// Default value for second param +// [bugfix, ielt9, old browsers] +// IE < 9 bug: [1,2].splice(0).join("") == "" but should be "12" +if ([1,2].splice(0).length != 2) { + var array_splice = Array.prototype.splice; + + if(function() { // test IE < 9 to splice bug - see issue #138 + function makeArray(l) { + var a = []; + while (l--) { + a.unshift(l) + } + return a + } + + var array = [] + , lengthBefore + ; + + array.splice.bind(array, 0, 0).apply(null, makeArray(20)); + array.splice.bind(array, 0, 0).apply(null, makeArray(26)); + + lengthBefore = array.length; //20 + array.splice(5, 0, "XXX"); // add one element + + if(lengthBefore + 1 == array.length) { + return true;// has right splice implementation without bugs + } + // else { + // IE8 bug + // } + }()) {//IE 6/7 + Array.prototype.splice = function(start, deleteCount) { + if (!arguments.length) { + return []; + } else { + return array_splice.apply(this, [ + start === void 0 ? 0 : start, + deleteCount === void 0 ? (this.length - start) : deleteCount + ].concat(_Array_slice_.call(arguments, 2))) + } + }; + } + else {//IE8 + Array.prototype.splice = function(start, deleteCount) { + var result + , args = _Array_slice_.call(arguments, 2) + , addElementsCount = args.length + ; + + if(!arguments.length) { + return []; + } + + if(start === void 0) { // default + start = 0; + } + if(deleteCount === void 0) { // default + deleteCount = this.length - start; + } + + if(addElementsCount > 0) { + if(deleteCount <= 0) { + if(start == this.length) { // tiny optimisation #1 + this.push.apply(this, args); + return []; + } + + if(start == 0) { // tiny optimisation #2 + this.unshift.apply(this, args); + return []; + } + } + + // Array.prototype.splice implementation + result = _Array_slice_.call(this, start, start + deleteCount);// delete part + args.push.apply(args, _Array_slice_.call(this, start + deleteCount, this.length));// right part + args.unshift.apply(args, _Array_slice_.call(this, 0, start));// left part + + // delete all items from this array and replace it to 'left part' + _Array_slice_.call(arguments, 2) + 'right part' + args.unshift(0, this.length); + + array_splice.apply(this, args); + + return result; + } + + return array_splice.call(this, start, deleteCount); + } + + } +} + +// ES5 15.4.4.12 +// http://es5.github.com/#x15.4.4.13 +// Return len+argCount. +// [bugfix, ielt8] +// IE < 8 bug: [].unshift(0) == undefined but should be "1" +if ([].unshift(0) != 1) { + var array_unshift = Array.prototype.unshift; + Array.prototype.unshift = function() { + array_unshift.apply(this, arguments); + return this.length; + }; +} + +// ES5 15.4.3.2 +// http://es5.github.com/#x15.4.3.2 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray +if (!Array.isArray) { + Array.isArray = function isArray(obj) { + return _toString(obj) == "[object Array]"; + }; +} + +// The IsCallable() check in the Array functions +// has been replaced with a strict check on the +// internal class of the object to trap cases where +// the provided function was actually a regular +// expression literal, which in V8 and +// JavaScriptCore is a typeof "function". Only in +// V8 are regular expression literals permitted as +// reduce parameters, so it is desirable in the +// general case for the shim to match the more +// strict and common behavior of rejecting regular +// expressions. + +// ES5 15.4.4.18 +// http://es5.github.com/#x15.4.4.18 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + +// Check failure of by-index access of string characters (IE < 9) +// and failure of `0 in boxedString` (Rhino) +var boxedString = Object("a"), + splitString = boxedString[0] != "a" || !(0 in boxedString); + +if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + thisp = arguments[1], + i = -1, + length = self.length >>> 0; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(); // TODO message + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + // context + fun.call(thisp, self[i], i, object); + } + } + }; +} + +// ES5 15.4.4.19 +// http://es5.github.com/#x15.4.4.19 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map +if (!Array.prototype.map) { + Array.prototype.map = function map(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = Array(length), + thisp = arguments[1]; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) + result[i] = fun.call(thisp, self[i], i, object); + } + return result; + }; +} + +// ES5 15.4.4.20 +// http://es5.github.com/#x15.4.4.20 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter +if (!Array.prototype.filter) { + Array.prototype.filter = function filter(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = [], + value, + thisp = arguments[1]; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (fun.call(thisp, value, i, object)) { + result.push(value); + } + } + } + return result; + }; +} + +// ES5 15.4.4.16 +// http://es5.github.com/#x15.4.4.16 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every +if (!Array.prototype.every) { + Array.prototype.every = function every(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && !fun.call(thisp, self[i], i, object)) { + return false; + } + } + return true; + }; +} + +// ES5 15.4.4.17 +// http://es5.github.com/#x15.4.4.17 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some +if (!Array.prototype.some) { + Array.prototype.some = function some(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && fun.call(thisp, self[i], i, object)) { + return true; + } + } + return false; + }; +} + +// ES5 15.4.4.21 +// http://es5.github.com/#x15.4.4.21 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce +if (!Array.prototype.reduce) { + Array.prototype.reduce = function reduce(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + // no value to return if no initial value and an empty array + if (!length && arguments.length == 1) { + throw new TypeError("reduce of empty array with no initial value"); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError("reduce of empty array with no initial value"); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = fun.call(void 0, result, self[i], i, object); + } + } + + return result; + }; +} + +// ES5 15.4.4.22 +// http://es5.github.com/#x15.4.4.22 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight +if (!Array.prototype.reduceRight) { + Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + + // If no callback function or if callback is not a callable function + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + // no value to return if no initial value, empty array + if (!length && arguments.length == 1) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + + var result, i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in this) { + result = fun.call(void 0, result, self[i], i, object); + } + } while (i--); + + return result; + }; +} + +// ES5 15.4.4.14 +// http://es5.github.com/#x15.4.4.14 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf +if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { + Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = toInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : Math.max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === sought) { + return i; + } + } + return -1; + }; +} + +// ES5 15.4.4.15 +// http://es5.github.com/#x15.4.4.15 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf +if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { + Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = Math.min(i, toInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && sought === self[i]) { + return i; + } + } + return -1; + }; +} + +// +// Object +// ====== +// + +// ES5 15.2.3.14 +// http://es5.github.com/#x15.2.3.14 +if (!Object.keys) { + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = true, + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + dontEnumsLength = dontEnums.length; + + for (var key in {"toString": null}) { + hasDontEnumBug = false; + } + + Object.keys = function keys(object) { + + if ( + (typeof object != "object" && typeof object != "function") || + object === null + ) { + throw new TypeError("Object.keys called on a non-object"); + } + + var keys = []; + for (var name in object) { + if (owns(object, name)) { + keys.push(name); + } + } + + if (hasDontEnumBug) { + for (var i = 0, ii = dontEnumsLength; i < ii; i++) { + var dontEnum = dontEnums[i]; + if (owns(object, dontEnum)) { + keys.push(dontEnum); + } + } + } + return keys; + }; + +} + +// +// Date +// ==== +// + +// ES5 15.9.5.43 +// http://es5.github.com/#x15.9.5.43 +// This function returns a String value represent the instance in time +// represented by this Date object. The format of the String is the Date Time +// string format defined in 15.9.1.15. All fields are present in the String. +// The time zone is always UTC, denoted by the suffix Z. If the time value of +// this object is not a finite Number a RangeError exception is thrown. +var negativeDate = -62198755200000, + negativeYearString = "-000001"; +if ( + !Date.prototype.toISOString || + (new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1) +) { + Date.prototype.toISOString = function toISOString() { + var result, length, value, year, month; + if (!isFinite(this)) { + throw new RangeError("Date.prototype.toISOString called on non-finite value."); + } + + year = this.getUTCFullYear(); + + month = this.getUTCMonth(); + // see https://github.com/kriskowal/es5-shim/issues/111 + year += Math.floor(month / 12); + month = (month % 12 + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + result = [month + 1, this.getUTCDate(), + this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()]; + year = ( + (year < 0 ? "-" : (year > 9999 ? "+" : "")) + + ("00000" + Math.abs(year)) + .slice(0 <= year && year <= 9999 ? -4 : -6) + ); + + length = result.length; + while (length--) { + value = result[length]; + // pad months, days, hours, minutes, and seconds to have two + // digits. + if (value < 10) { + result[length] = "0" + value; + } + } + // pad milliseconds to have three digits. + return ( + year + "-" + result.slice(0, 2).join("-") + + "T" + result.slice(2).join(":") + "." + + ("000" + this.getUTCMilliseconds()).slice(-3) + "Z" + ); + }; +} + + +// ES5 15.9.5.44 +// http://es5.github.com/#x15.9.5.44 +// This function provides a String representation of a Date object for use by +// JSON.stringify (15.12.3). +var dateToJSONIsSupported = false; +try { + dateToJSONIsSupported = ( + Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ // generic + toISOString: function () { + return true; + } + }) + ); +} catch (e) { +} +if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be toPrimitive(O, hint Number). + var o = Object(this), + tv = toPrimitive(o), + toISO; + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === "number" && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + toISO = o.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (typeof toISO != "function") { + throw new TypeError("toISOString property is not callable"); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(o); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; +} + +// ES5 15.9.4.2 +// http://es5.github.com/#x15.9.4.2 +// based on work shared by Daniel Friesen (dantman) +// http://gist.github.com/303249 +if (!Date.parse || "Date.parse is buggy") { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + Date = (function(NativeDate) { + + // Date.length === 7 + function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + if (this instanceof NativeDate) { + var date = length == 1 && String(Y) === Y ? // isString(Y) + // We explicitly pass it through parse: + new NativeDate(Date.parse(Y)) : + // We have to manually make calls depending on argument + // length here + length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) : + length >= 6 ? new NativeDate(Y, M, D, h, m, s) : + length >= 5 ? new NativeDate(Y, M, D, h, m) : + length >= 4 ? new NativeDate(Y, M, D, h) : + length >= 3 ? new NativeDate(Y, M, D) : + length >= 2 ? new NativeDate(Y, M) : + length >= 1 ? new NativeDate(Y) : + new NativeDate(); + // Prevent mixups with unfixed Date object + date.constructor = Date; + return date; + } + return NativeDate.apply(this, arguments); + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp("^" + + "(\\d{4}|[\+\-]\\d{6})" + // four-digit year capture or sign + + // 6-digit extended year + "(?:-(\\d{2})" + // optional month capture + "(?:-(\\d{2})" + // optional day capture + "(?:" + // capture hours:minutes:seconds.milliseconds + "T(\\d{2})" + // hours capture + ":(\\d{2})" + // minutes capture + "(?:" + // optional :seconds.milliseconds + ":(\\d{2})" + // seconds capture + "(?:(\\.\\d{1,}))?" + // milliseconds capture + ")?" + + "(" + // capture UTC offset component + "Z|" + // UTC capture + "(?:" + // offset specifier +/-hours:minutes + "([-+])" + // sign capture + "(\\d{2})" + // hours offset capture + ":(\\d{2})" + // minutes offset capture + ")" + + ")?)?)?)?" + + "$"); + + var months = [ + 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 + ]; + + function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + } + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + Date[key] = NativeDate[key]; + } + + // Copy "native" methods explicitly; they may be non-enumerable + Date.now = NativeDate.now; + Date.UTC = NativeDate.UTC; + Date.prototype = NativeDate.prototype; + Date.prototype.constructor = Date; + + // Upgrade Date.parse to handle simplified ISO 8601 strings + Date.parse = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = Number(match[1]), + month = Number(match[2] || 1) - 1, + day = Number(match[3] || 1) - 1, + hour = Number(match[4] || 0), + minute = Number(match[5] || 0), + second = Number(match[6] || 0), + millisecond = Math.floor(Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + offset = !match[4] || match[8] ? + 0 : Number(new NativeDate(1970, 0)), + signOffset = match[9] === "-" ? 1 : -1, + hourOffset = Number(match[10] || 0), + minuteOffset = Number(match[11] || 0), + result; + if ( + hour < ( + minute > 0 || second > 0 || millisecond > 0 ? + 24 : 25 + ) && + minute < 60 && second < 60 && millisecond < 1000 && + month > -1 && month < 12 && hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < ( + dayFromMonth(year, month + 1) - + dayFromMonth(year, month) + ) + ) { + result = ( + (dayFromMonth(year, month) + day) * 24 + + hour + + hourOffset * signOffset + ) * 60; + result = ( + (result + minute + minuteOffset * signOffset) * 60 + + second + ) * 1000 + millisecond + offset; + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + + return Date; + })(Date); +} + +// ES5 15.9.4.4 +// http://es5.github.com/#x15.9.4.4 +if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; +} + + +// +// Number +// ====== +// + +// ES5.1 15.7.4.5 +// http://es5.github.com/#x15.7.4.5 +if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' || (0.9).toFixed(0) === '0' || (1.255).toFixed(2) !== '1.25' || (1000000000000000128).toFixed(0) !== "1000000000000000128") { + // Hide these variables and functions + (function () { + var base, size, data, i; + + base = 1e7; + size = 6; + data = [0, 0, 0, 0, 0, 0]; + + function multiply(n, c) { + var i = -1; + while (++i < size) { + c += n * data[i]; + data[i] = c % base; + c = Math.floor(c / base); + } + } + + function divide(n) { + var i = size, c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = Math.floor(c / n); + c = (c % n) * base; + } + } + + function toString() { + var i = size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + if (s === '') { + s = t; + } else { + s += '0000000'.slice(0, 7 - t.length) + t; + } + } + } + return s; + } + + function pow(x, n, acc) { + return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc))); + } + + function log(x) { + var n = 0; + while (x >= 4096) { + n += 12; + x /= 4096; + } + while (x >= 2) { + n += 1; + x /= 2; + } + return n; + } + + Number.prototype.toFixed = function (fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = Number(fractionDigits); + f = f !== f ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError("Number.toFixed called with invalid number of decimals"); + } + + x = Number(this); + + // Test for NaN + if (x !== x) { + return "NaN"; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return String(x); + } + + s = ""; + + if (x < 0) { + s = "-"; + x = -x; + } + + m = "0"; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = log(x * pow(2, 69, 1)) - 69; + z = (e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1)); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + multiply(0, z); + j = f; + + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + + multiply(pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + + divide(1 << j); + multiply(1, 1); + divide(2); + m = toString(); + } else { + multiply(0, z); + multiply(1 << (-e), 0); + m = toString() + '0.00000000000000000000'.slice(2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + '0.0000000000000000000'.slice(0, f - k + 2) + m; + } else { + m = s + m.slice(0, k - f) + '.' + m.slice(k - f); + } + } else { + m = s + m; + } + + return m; + } + }()); +} + + +// +// String +// ====== +// + + +// ES5 15.5.4.14 +// http://es5.github.com/#x15.5.4.14 + +// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] +// Many browsers do not split properly with regular expressions or they +// do not perform the split correctly under obscure conditions. +// See http://blog.stevenlevithan.com/archives/cross-browser-split +// I've tested in many browsers and this seems to cover the deviant ones: +// 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] +// '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] +// 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not +// [undefined, "t", undefined, "e", ...] +// ''.split(/.?/) should be [], not [""] +// '.'.split(/()()/) should be ["."], not ["", "", "."] + +var string_split = String.prototype.split; +if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === "t" || + ''.split(/.?/).length === 0 || + '.'.split(/()()/).length > 1 +) { + (function () { + var compliantExecNpcg = /()??/.exec("")[1] === void 0; // NPCG: nonparticipating capturing group + + String.prototype.split = function (separator, limit) { + var string = this; + if (separator === void 0 && limit === 0) + return []; + + // If `separator` is not a regex, use native split + if (Object.prototype.toString.call(separator) !== "[object RegExp]") { + return string_split.apply(this, arguments); + } + + var output = [], + flags = (separator.ignoreCase ? "i" : "") + + (separator.multiline ? "m" : "") + + (separator.extended ? "x" : "") + // Proposed for ES6 + (separator.sticky ? "y" : ""), // Firefox 3+ + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator = new RegExp(separator.source, flags + "g"), + separator2, match, lastIndex, lastLength; + string += ""; // Type-convert + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // Math.pow(2, 32) - 1 + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + limit = limit === void 0 ? + -1 >>> 0 : // Math.pow(2, 32) - 1 + limit >>> 0; // ToUint32(limit) + while (match = separator.exec(string)) { + // `separator.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === void 0) { + match[i] = void 0; + } + } + }); + } + if (match.length > 1 && match.index < string.length) { + Array.prototype.push.apply(output, match.slice(1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= limit) { + break; + } + } + if (separator.lastIndex === match.index) { + separator.lastIndex++; // Avoid an infinite loop + } + } + if (lastLastIndex === string.length) { + if (lastLength || !separator.test("")) { + output.push(""); + } + } else { + output.push(string.slice(lastLastIndex)); + } + return output.length > limit ? output.slice(0, limit) : output; + }; + }()); + +// [bugfix, chrome] +// If separator is undefined, then the result array contains just one String, +// which is the this value (converted to a String). If limit is not undefined, +// then the output array is truncated so that it contains no more than limit +// elements. +// "0".split(undefined, 0) -> [] +} else if ("0".split(void 0, 0).length) { + String.prototype.split = function(separator, limit) { + if (separator === void 0 && limit === 0) return []; + return string_split.apply(this, arguments); + } +} + + +// ECMA-262, 3rd B.2.3 +// Note an ECMAScript standart, although ECMAScript 3rd Edition has a +// non-normative section suggesting uniform semantics and it should be +// normalized across all browsers +// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE +if("".substr && "0b".substr(-1) !== "b") { + var string_substr = String.prototype.substr; + /** + * Get the substring of a string + * @param {integer} start where to start the substring + * @param {integer} length how many characters to return + * @return {string} + */ + String.prototype.substr = function(start, length) { + return string_substr.call( + this, + start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start, + length + ); + } +} + +// ES5 15.5.4.20 +// http://es5.github.com/#x15.5.4.20 +var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + + "\u2029\uFEFF"; +if (!String.prototype.trim || ws.trim()) { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + ws = "[" + ws + "]"; + var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), + trimEndRegexp = new RegExp(ws + ws + "*$"); + String.prototype.trim = function trim() { + if (this === void 0 || this === null) { + throw new TypeError("can't convert "+this+" to object"); + } + return String(this) + .replace(trimBeginRegexp, "") + .replace(trimEndRegexp, ""); + }; +} + +// +// Util +// ====== +// + +// ES5 9.4 +// http://es5.github.com/#x9.4 +// http://jsperf.com/to-integer + +function toInteger(n) { + n = +n; + if (n !== n) { // isNaN + n = 0; + } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; +} + +function isPrimitive(input) { + var type = typeof input; + return ( + input === null || + type === "undefined" || + type === "boolean" || + type === "number" || + type === "string" + ); +} + +function toPrimitive(input) { + var val, valueOf, toString; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (typeof valueOf === "function") { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toString = input.toString; + if (typeof toString === "function") { + val = toString.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); +} + +// ES5 9.9 +// http://es5.github.com/#x9.9 +var toObject = function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert "+o+" to object"); + } + return Object(o); +}; + +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.map b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.map new file mode 100644 index 0000000..3f56fe6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.map @@ -0,0 +1 @@ +{"version":3,"sources":["es5-shim.js"],"names":["definition","define","YUI","add","Empty","Function","prototype","bind","that","target","this","TypeError","args","_Array_slice_","call","arguments","bound","result","apply","concat","Object","prototypeOfArray","Array","prototypeOfObject","slice","_toString","toString","owns","hasOwnProperty","defineGetter","defineSetter","lookupGetter","lookupSetter","supportsAccessors","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","splice","length","array_splice","makeArray","l","a","unshift","array","lengthBefore","start","deleteCount","addElementsCount","push","array_unshift","isArray","obj","boxedString","splitString","forEach","fun","object","toObject","self","split","thisp","i","map","filter","value","every","some","reduce","reduceRight","indexOf","sought","toInteger","Math","max","lastIndexOf","min","abs","keys","hasDontEnumBug","dontEnums","dontEnumsLength","key","name","ii","dontEnum","negativeDate","negativeYearString","Date","toISOString","year","month","isFinite","RangeError","getUTCFullYear","getUTCMonth","floor","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","join","getUTCMilliseconds","dateToJSONIsSupported","toJSON","NaN","e","o","tv","toPrimitive","toISO","parse","NativeDate","Y","M","D","h","m","s","ms","date","String","constructor","isoDateExpression","RegExp","months","dayFromMonth","t","now","UTC","string","match","exec","Number","day","hour","minute","second","millisecond","offset","signOffset","hourOffset","minuteOffset","getTime","toFixed","base","size","data","multiply","n","c","divide","pow","x","acc","log","fractionDigits","f","z","j","k","string_split","compliantExecNpcg","separator","limit","output","flags","ignoreCase","multiline","extended","sticky","lastLastIndex","source","separator2","lastIndex","lastLength","index","replace","test","substr","string_substr","ws","trim","trimBeginRegexp","trimEndRegexp","isPrimitive","input","type","val","valueOf"],"mappings":"CAIA,SAAWA,YAEP,SAAWC,SAAU,WAAY,CAC7BA,OAAOD,gBAEJ,UAAWE,MAAO,WAAY,CACjCA,IAAIC,IAAI,MAAOH,gBAEZ,CACHA,gBAEL,WAmBH,QAASI,UAET,IAAKC,SAASC,UAAUC,KAAM,CAC1BF,SAASC,UAAUC,KAAO,QAASA,MAAKC,MAEpC,GAAIC,QAASC,IAEb,UAAWD,SAAU,WAAY,CAC7B,KAAM,IAAIE,WAAU,kDAAoDF,QAK5E,GAAIG,MAAOC,cAAcC,KAAKC,UAAW,EAUzC,IAAIC,OAAQ,WAER,GAAIN,eAAgBM,OAAO,CAiBvB,GAAIC,QAASR,OAAOS,MAChBR,KACAE,KAAKO,OAAON,cAAcC,KAAKC,YAEnC,IAAIK,OAAOH,UAAYA,OAAQ,CAC3B,MAAOA,QAEX,MAAOP,UAEJ,CAoBH,MAAOD,QAAOS,MACVV,KACAI,KAAKO,OAAON,cAAcC,KAAKC,cAM3C,IAAGN,OAAOH,UAAW,CACjBF,MAAME,UAAYG,OAAOH,SACzBU,OAAMV,UAAY,GAAIF,MAEtBA,OAAME,UAAY,KAiCtB,MAAOU,QAQf,GAAIF,MAAOT,SAASC,UAAUQ,IAC9B,IAAIO,kBAAmBC,MAAMhB,SAC7B,IAAIiB,mBAAoBH,OAAOd,SAC/B,IAAIO,eAAgBQ,iBAAiBG,KAErC,IAAIC,WAAYX,KAAKP,KAAKgB,kBAAkBG,SAC5C,IAAIC,MAAOb,KAAKP,KAAKgB,kBAAkBK,eAGvC,IAAIC,aACJ,IAAIC,aACJ,IAAIC,aACJ,IAAIC,aACJ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,KAAM,CAClB,MAAOA,MAGfnK,SAAWiK,MAAMjK,QACjB,UAAWA,YAAa,WAAY,CAChCmK,IAAMnK,SAASZ,KAAK6K,MACpB,IAAID,YAAYG,KAAM,CAClB,MAAOA,MAGf,KAAM,IAAIlL,WAKd,GAAIgD,UAAW,SAAUiD,GACrB,GAAIA,GAAK,KAAM,CACX,KAAM,IAAIjG,WAAU,iBAAiBiG,EAAE,cAE3C,MAAOxF,QAAOwF"} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.min.js new file mode 100644 index 0000000..5d265c5 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/es5-shim.min.js @@ -0,0 +1,4 @@ +(function(definition){if(typeof define=="function"){define(definition)}else if(typeof YUI=="function"){YUI.add("es5",definition)}else{definition()}})(function(){function Empty(){}if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;if(typeof target!="function"){throw new TypeError("Function.prototype.bind called on incompatible "+target)}var args=_Array_slice_.call(arguments,1);var bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(_Array_slice_.call(arguments)));if(Object(result)===result){return result}return this}else{return target.apply(that,args.concat(_Array_slice_.call(arguments)))}};if(target.prototype){Empty.prototype=target.prototype;bound.prototype=new Empty;Empty.prototype=null}return bound}}var call=Function.prototype.call;var prototypeOfArray=Array.prototype;var prototypeOfObject=Object.prototype;var _Array_slice_=prototypeOfArray.slice;var _toString=call.bind(prototypeOfObject.toString);var owns=call.bind(prototypeOfObject.hasOwnProperty);var defineGetter;var defineSetter;var lookupGetter;var lookupSetter;var supportsAccessors;if(supportsAccessors=owns(prototypeOfObject,"__defineGetter__")){defineGetter=call.bind(prototypeOfObject.__defineGetter__);defineSetter=call.bind(prototypeOfObject.__defineSetter__);lookupGetter=call.bind(prototypeOfObject.__lookupGetter__);lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)}if([1,2].splice(0).length!=2){var array_splice=Array.prototype.splice;if(function(){function makeArray(l){var a=[];while(l--){a.unshift(l)}return a}var array=[],lengthBefore;array.splice.bind(array,0,0).apply(null,makeArray(20));array.splice.bind(array,0,0).apply(null,makeArray(26));lengthBefore=array.length;array.splice(5,0,"XXX");if(lengthBefore+1==array.length){return true}}()){Array.prototype.splice=function(start,deleteCount){if(!arguments.length){return[]}else{return array_splice.apply(this,[start===void 0?0:start,deleteCount===void 0?this.length-start:deleteCount].concat(_Array_slice_.call(arguments,2)))}}}else{Array.prototype.splice=function(start,deleteCount){var result,args=_Array_slice_.call(arguments,2),addElementsCount=args.length;if(!arguments.length){return[]}if(start===void 0){start=0}if(deleteCount===void 0){deleteCount=this.length-start}if(addElementsCount>0){if(deleteCount<=0){if(start==this.length){this.push.apply(this,args);return[]}if(start==0){this.unshift.apply(this,args);return[]}}result=_Array_slice_.call(this,start,start+deleteCount);args.push.apply(args,_Array_slice_.call(this,start+deleteCount,this.length));args.unshift.apply(args,_Array_slice_.call(this,0,start));args.unshift(0,this.length);array_splice.apply(this,args);return result}return array_splice.call(this,start,deleteCount)}}}if([].unshift(0)!=1){var array_unshift=Array.prototype.unshift;Array.prototype.unshift=function(){array_unshift.apply(this,arguments);return this.length}}if(!Array.isArray){Array.isArray=function isArray(obj){return _toString(obj)=="[object Array]"}}var boxedString=Object("a"),splitString=boxedString[0]!="a"||!(0 in boxedString);if(!Array.prototype.forEach){Array.prototype.forEach=function forEach(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(_toString(fun)!="[object Function]"){throw new TypeError}while(++i<length){if(i in self){fun.call(thisp,self[i],i,object)}}}}if(!Array.prototype.map){Array.prototype.map=function map(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self)result[i]=fun.call(thisp,self[i],i,object)}return result}}if(!Array.prototype.filter){Array.prototype.filter=function filter(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,result=[],value,thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self){value=self[i];if(fun.call(thisp,value,i,object)){result.push(value)}}}return result}}if(!Array.prototype.every){Array.prototype.every=function every(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self&&!fun.call(thisp,self[i],i,object)){return false}}return true}}if(!Array.prototype.some){Array.prototype.some=function some(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self&&fun.call(thisp,self[i],i,object)){return true}}return false}}if(!Array.prototype.reduce){Array.prototype.reduce=function reduce(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0;if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}if(!length&&arguments.length==1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var result;if(arguments.length>=2){result=arguments[1]}else{do{if(i in self){result=self[i++];break}if(++i>=length){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<length;i++){if(i in self){result=fun.call(void 0,result,self[i],i,object)}}return result}}if(!Array.prototype.reduceRight){Array.prototype.reduceRight=function reduceRight(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0;if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}if(!length&&arguments.length==1){throw new TypeError("reduceRight of empty array with no initial value")}var result,i=length-1;if(arguments.length>=2){result=arguments[1]}else{do{if(i in self){result=self[i--];break}if(--i<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(i<0){return result}do{if(i in this){result=fun.call(void 0,result,self[i],i,object)}}while(i--);return result}}if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1){Array.prototype.indexOf=function indexOf(sought){var self=splitString&&_toString(this)=="[object String]"?this.split(""):toObject(this),length=self.length>>>0;if(!length){return-1}var i=0;if(arguments.length>1){i=toInteger(arguments[1])}i=i>=0?i:Math.max(0,length+i);for(;i<length;i++){if(i in self&&self[i]===sought){return i}}return-1}}if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1){Array.prototype.lastIndexOf=function lastIndexOf(sought){var self=splitString&&_toString(this)=="[object String]"?this.split(""):toObject(this),length=self.length>>>0;if(!length){return-1}var i=length-1;if(arguments.length>1){i=Math.min(i,toInteger(arguments[1]))}i=i>=0?i:length-Math.abs(i);for(;i>=0;i--){if(i in self&&sought===self[i]){return i}}return-1}}if(!Object.keys){var hasDontEnumBug=true,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null}){hasDontEnumBug=false}Object.keys=function keys(object){if(typeof object!="object"&&typeof object!="function"||object===null){throw new TypeError("Object.keys called on a non-object")}var keys=[];for(var name in object){if(owns(object,name)){keys.push(name)}}if(hasDontEnumBug){for(var i=0,ii=dontEnumsLength;i<ii;i++){var dontEnum=dontEnums[i];if(owns(object,dontEnum)){keys.push(dontEnum)}}}return keys}}var negativeDate=-621987552e5,negativeYearString="-000001";if(!Date.prototype.toISOString||new Date(negativeDate).toISOString().indexOf(negativeYearString)===-1){Date.prototype.toISOString=function toISOString(){var result,length,value,year,month;if(!isFinite(this)){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}year=this.getUTCFullYear();month=this.getUTCMonth();year+=Math.floor(month/12);month=(month%12+12)%12;result=[month+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];year=(year<0?"-":year>9999?"+":"")+("00000"+Math.abs(year)).slice(0<=year&&year<=9999?-4:-6);length=result.length;while(length--){value=result[length];if(value<10){result[length]="0"+value}}return year+"-"+result.slice(0,2).join("-")+"T"+result.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}}var dateToJSONIsSupported=false;try{dateToJSONIsSupported=Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(negativeDate).toJSON().indexOf(negativeYearString)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(e){}if(!dateToJSONIsSupported){Date.prototype.toJSON=function toJSON(key){var o=Object(this),tv=toPrimitive(o),toISO;if(typeof tv==="number"&&!isFinite(tv)){return null}toISO=o.toISOString;if(typeof toISO!="function"){throw new TypeError("toISOString property is not callable")}return toISO.call(o)}}if(!Date.parse||"Date.parse is buggy"){Date=function(NativeDate){function Date(Y,M,D,h,m,s,ms){var length=arguments.length;if(this instanceof NativeDate){var date=length==1&&String(Y)===Y?new NativeDate(Date.parse(Y)):length>=7?new NativeDate(Y,M,D,h,m,s,ms):length>=6?new NativeDate(Y,M,D,h,m,s):length>=5?new NativeDate(Y,M,D,h,m):length>=4?new NativeDate(Y,M,D,h):length>=3?new NativeDate(Y,M,D):length>=2?new NativeDate(Y,M):length>=1?new NativeDate(Y):new NativeDate;date.constructor=Date;return date}return NativeDate.apply(this,arguments)}var isoDateExpression=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var months=[0,31,59,90,120,151,181,212,243,273,304,334,365];function dayFromMonth(year,month){var t=month>1?1:0;return months[month]+Math.floor((year-1969+t)/4)-Math.floor((year-1901+t)/100)+Math.floor((year-1601+t)/400)+365*(year-1970)}for(var key in NativeDate){Date[key]=NativeDate[key]}Date.now=NativeDate.now;Date.UTC=NativeDate.UTC;Date.prototype=NativeDate.prototype;Date.prototype.constructor=Date;Date.parse=function parse(string){var match=isoDateExpression.exec(string);if(match){var year=Number(match[1]),month=Number(match[2]||1)-1,day=Number(match[3]||1)-1,hour=Number(match[4]||0),minute=Number(match[5]||0),second=Number(match[6]||0),millisecond=Math.floor(Number(match[7]||0)*1e3),offset=!match[4]||match[8]?0:Number(new NativeDate(1970,0)),signOffset=match[9]==="-"?1:-1,hourOffset=Number(match[10]||0),minuteOffset=Number(match[11]||0),result;if(hour<(minute>0||second>0||millisecond>0?24:25)&&minute<60&&second<60&&millisecond<1e3&&month>-1&&month<12&&hourOffset<24&&minuteOffset<60&&day>-1&&day<dayFromMonth(year,month+1)-dayFromMonth(year,month)){result=((dayFromMonth(year,month)+day)*24+hour+hourOffset*signOffset)*60;result=((result+minute+minuteOffset*signOffset)*60+second)*1e3+millisecond+offset;if(-864e13<=result&&result<=864e13){return result}}return NaN}return NativeDate.parse.apply(this,arguments)};return Date}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}if(!Number.prototype.toFixed||8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)==="0"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128"){(function(){var base,size,data,i;base=1e7;size=6;data=[0,0,0,0,0,0];function multiply(n,c){var i=-1;while(++i<size){c+=n*data[i];data[i]=c%base;c=Math.floor(c/base)}}function divide(n){var i=size,c=0;while(--i>=0){c+=data[i];data[i]=Math.floor(c/n);c=c%n*base}}function toString(){var i=size;var s="";while(--i>=0){if(s!==""||i===0||data[i]!==0){var t=String(data[i]);if(s===""){s=t}else{s+="0000000".slice(0,7-t.length)+t}}}return s}function pow(x,n,acc){return n===0?acc:n%2===1?pow(x,n-1,acc*x):pow(x*x,n/2,acc)}function log(x){var n=0;while(x>=4096){n+=12;x/=4096}while(x>=2){n+=1;x/=2}return n}Number.prototype.toFixed=function(fractionDigits){var f,x,s,m,e,z,j,k;f=Number(fractionDigits);f=f!==f?0:Math.floor(f);if(f<0||f>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}x=Number(this);if(x!==x){return"NaN"}if(x<=-1e21||x>=1e21){return String(x)}s="";if(x<0){s="-";x=-x}m="0";if(x>1e-21){e=log(x*pow(2,69,1))-69;z=e<0?x*pow(2,-e,1):x/pow(2,e,1);z*=4503599627370496;e=52-e;if(e>0){multiply(0,z);j=f;while(j>=7){multiply(1e7,0);j-=7}multiply(pow(10,j,1),0);j=e-1;while(j>=23){divide(1<<23);j-=23}divide(1<<j);multiply(1,1);divide(2);m=toString()}else{multiply(0,z);multiply(1<<-e,0);m=toString()+"0.00000000000000000000".slice(2,2+f)}}if(f>0){k=m.length;if(k<=f){m=s+"0.0000000000000000000".slice(0,f-k+2)+m}else{m=s+m.slice(0,k-f)+"."+m.slice(k-f)}}else{m=s+m}return m}})()}var string_split=String.prototype.split;if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"".split(/.?/).length===0||".".split(/()()/).length>1){(function(){var compliantExecNpcg=/()??/.exec("")[1]===void 0;String.prototype.split=function(separator,limit){var string=this;if(separator===void 0&&limit===0)return[];if(Object.prototype.toString.call(separator)!=="[object RegExp]"){return string_split.apply(this,arguments)}var output=[],flags=(separator.ignoreCase?"i":"")+(separator.multiline?"m":"")+(separator.extended?"x":"")+(separator.sticky?"y":""),lastLastIndex=0,separator=new RegExp(separator.source,flags+"g"),separator2,match,lastIndex,lastLength;string+="";if(!compliantExecNpcg){separator2=new RegExp("^"+separator.source+"$(?!\\s)",flags)}limit=limit===void 0?-1>>>0:limit>>>0;while(match=separator.exec(string)){lastIndex=match.index+match[0].length;if(lastIndex>lastLastIndex){output.push(string.slice(lastLastIndex,match.index));if(!compliantExecNpcg&&match.length>1){match[0].replace(separator2,function(){for(var i=1;i<arguments.length-2;i++){if(arguments[i]===void 0){match[i]=void 0}}})}if(match.length>1&&match.index<string.length){Array.prototype.push.apply(output,match.slice(1))}lastLength=match[0].length;lastLastIndex=lastIndex;if(output.length>=limit){break}}if(separator.lastIndex===match.index){separator.lastIndex++}}if(lastLastIndex===string.length){if(lastLength||!separator.test("")){output.push("")}}else{output.push(string.slice(lastLastIndex))}return output.length>limit?output.slice(0,limit):output}})()}else if("0".split(void 0,0).length){String.prototype.split=function(separator,limit){if(separator===void 0&&limit===0)return[];return string_split.apply(this,arguments)}}if("".substr&&"0b".substr(-1)!=="b"){var string_substr=String.prototype.substr;String.prototype.substr=function(start,length){return string_substr.call(this,start<0?(start=this.length+start)<0?0:start:start,length)}}var ws=" \n\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=new RegExp("^"+ws+ws+"*"),trimEndRegexp=new RegExp(ws+ws+"*$");String.prototype.trim=function trim(){if(this===void 0||this===null){throw new TypeError("can't convert "+this+" to object")}return String(this).replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}function toInteger(n){n=+n;if(n!==n){n=0}else if(n!==0&&n!==1/0&&n!==-(1/0)){n=(n>0||-1)*Math.floor(Math.abs(n))}return n}function isPrimitive(input){var type=typeof input;return input===null||type==="undefined"||type==="boolean"||type==="number"||type==="string"}function toPrimitive(input){var val,valueOf,toString;if(isPrimitive(input)){return input}valueOf=input.valueOf;if(typeof valueOf==="function"){val=valueOf.call(input);if(isPrimitive(val)){return val}}toString=input.toString;if(typeof toString==="function"){val=toString.call(input);if(isPrimitive(val)){return val}}throw new TypeError}var toObject=function(o){if(o==null){throw new TypeError("can't convert "+o+" to object")}return Object(o)}}); +/* +//@ sourceMappingURL=es5-shim.map +*/ \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/package.json b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/package.json new file mode 100644 index 0000000..82c863f --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/package.json @@ -0,0 +1,34 @@ +{ + "name": "es5-shim", + "version": "2.1.0", + "description": "ES5 as implementable on previous engines", + "homepage": "http://github.com/kriskowal/es5-shim/", + "contributors": [ + "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/)", + "Sami Samhuri <sami.samhuri@gmail.com> (http://samhuri.net/)", + "Florian Schäfer <florian.schaefer@gmail.com> (http://github.com/fschaefer)", + "Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)", + "Kit Cambridge <kitcambridge@gmail.com> (http://kitcambridge.github.com)" + ], + "bugs": { + "mail": "kris@cixar.com", + "url": "http://github.com/kriskowal/es5-shim/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/kriskowal/es5-shim/raw/master/LICENSE" + } + ], + "main": "es5-shim.js", + "repository": { + "type": "git", + "url": "http://github.com/kriskowal/es5-shim.git" + }, + "scripts": { + "minify": "uglifyjs es5-shim.js --source-map=es5-shim.map -b ascii_only=true,beautify=false > es5-shim.min.js; uglifyjs es5-sham.js --source-map=es5-sham.map -b ascii_only=true,beautify=false > es5-sham.min.js" + }, + "engines": { + "node": ">=0.2.0" + } +} diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-kill.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-kill.js new file mode 100644 index 0000000..172ccdd --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-kill.js @@ -0,0 +1,64 @@ +// This methods allows the killing of built-in functions, +// so the shim can take over with that implementation +var HLP = (function() { + "use strict"; + var kill; + + kill = function(_class, methods) { + /*if(!Array.isArray(methods)) + return;*/ + if(!_class.originals) + _class.originals = {}; + + for (var i = 0, len = methods.length; i < len; i++) { + var obj = methods[i]; + _class.originals[obj] = _class[obj]; + delete _class[obj]; + if (obj in _class) { + // try something more aggressive since V8 at least + // appears to ignore the delete. + _class[obj] = null; + if (_class[obj]) { + console.log("Couln't overwrite", obj, "of", _class); + } + } + } + }; + return { kill: kill }; +}()); + +HLP.kill(Function.prototype, [ + 'bind' +]); + +HLP.kill(Array, [ + 'isArray' +]); + +HLP.kill(String.prototype, [ + "trim" +]); + +HLP.kill(Object, [ + 'keys' +]); + +HLP.kill(Number.prototype, [ + 'toFixed' +]); + +HLP.kill(Date, [ + 'now', 'parse' +]); + +HLP.kill(Date.prototype, [ + "toJSON", "toISOString" +]); + +HLP.kill(Array.prototype, [ + 'forEach', 'some', 'every', + 'indexOf', 'lastIndexOf', + 'map', 'filter', + 'reduce', 'reduceRight' +]); + diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js new file mode 100644 index 0000000..dda7513 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js @@ -0,0 +1,34 @@ +beforeEach(function() { + this.addMatchers({ + toExactlyMatch: function(expected) { + var a1, a2, + l, i, + key, + actual = this.actual; + + var getKeys = function(o) { + var a = []; + for(key in o) { + if(o.hasOwnProperty(key)) { + a.push(key); + } + } + return a; + } + a1 = getKeys(actual); + a2 = getKeys(expected); + + l = a1.length; + if(l !== a2.length) { + return false; + } + for(i = 0; i < l; i++) { + key = a1[i]; + expect(key).toEqual(a2[i]); + expect(actual[key]).toEqual(expected[key]); + } + + return true; + } + }) +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h.js new file mode 100644 index 0000000..ede51ef --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h.js @@ -0,0 +1,3 @@ +function implement() { + throw 'Not implemented'; +} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.html b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.html new file mode 100644 index 0000000..6539476 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.html @@ -0,0 +1,64 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>Jasmine Spec Runner</title> + + <link rel="shortcut icon" type="image/png" href="lib/jasmine_favicon.png"> + + <link rel="stylesheet" type="text/css" href="lib/jasmine.css"> + <script type="text/javascript" src="lib/jasmine.js"></script> + <script type="text/javascript" src="lib/jasmine-html.js"></script> + <script type="text/javascript" src="lib/json2.js"></script> + + <!-- include helper files here... --> + <script src="helpers/h.js"></script> + <script src="helpers/h-kill.js"></script> + <script src="helpers/h-matchers.js"></script> + + <!-- include source files here... --> + <script src="../es5-shim.js"></script> + <script src="../es5-sham.js"></script> + + <!-- include spec files here... --> + <script src="spec/s-array.js"></script> + <script src="spec/s-function.js"></script> + <script src="spec/s-string.js"></script> + <script src="spec/s-object.js"></script> + <script src="spec/s-number.js"></script> + <script src="spec/s-date.js"></script> + + + <script type="text/javascript"> + (function() { + var jasmineEnv = jasmine.getEnv(); + jasmineEnv.updateInterval = 1000; + + var trivialReporter = new jasmine.TrivialReporter(); + + jasmineEnv.addReporter(trivialReporter); + + jasmineEnv.specFilter = function(spec) { + return trivialReporter.specFilter(spec); + }; + + var currentWindowOnload = window.onload; + + window.onload = function() { + if (currentWindowOnload) { + currentWindowOnload(); + } + execJasmine(); + }; + + function execJasmine() { + jasmineEnv.execute(); + } + + })(); + </script> + +</head> + +<body> +</body> +</html> diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.min.html b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.min.html new file mode 100644 index 0000000..65e590a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/index.min.html @@ -0,0 +1,63 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>Jasmine Spec Runner</title> + + <link rel="shortcut icon" type="image/png" href="lib/jasmine_favicon.png"> + + <link rel="stylesheet" type="text/css" href="lib/jasmine.css"> + <script type="text/javascript" src="lib/jasmine.js"></script> + <script type="text/javascript" src="lib/jasmine-html.js"></script> + <script type="text/javascript" src="lib/json2.js"></script> + + <!-- include helper files here... --> + <script src="helpers/h.js"></script> + <script src="helpers/h-kill.js"></script> + <script src="helpers/h-matchers.js"></script> + + <!-- include source files here... --> + <script src="../es5-shim.min.js"></script> + + <!-- include spec files here... --> + <script src="spec/s-array.js"></script> + <script src="spec/s-function.js"></script> + <script src="spec/s-string.js"></script> + <script src="spec/s-object.js"></script> + <script src="spec/s-number.js"></script> + <script src="spec/s-date.js"></script> + + + <script type="text/javascript"> + (function() { + var jasmineEnv = jasmine.getEnv(); + jasmineEnv.updateInterval = 1000; + + var trivialReporter = new jasmine.TrivialReporter(); + + jasmineEnv.addReporter(trivialReporter); + + jasmineEnv.specFilter = function(spec) { + return trivialReporter.specFilter(spec); + }; + + var currentWindowOnload = window.onload; + + window.onload = function() { + if (currentWindowOnload) { + currentWindowOnload(); + } + execJasmine(); + }; + + function execJasmine() { + jasmineEnv.execute(); + } + + })(); + </script> + +</head> + +<body> +</body> +</html> diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine-html.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine-html.js new file mode 100644 index 0000000..7383401 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine-html.js @@ -0,0 +1,190 @@ +jasmine.TrivialReporter = function(doc) { + this.document = doc || document; + this.suiteDivs = {}; + this.logRunningSpecs = false; +}; + +jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) { + var el = document.createElement(type); + + for (var i = 2; i < arguments.length; i++) { + var child = arguments[i]; + + if (typeof child === 'string') { + el.appendChild(document.createTextNode(child)); + } else { + if (child) { el.appendChild(child); } + } + } + + for (var attr in attrs) { + if (attr == "className") { + el[attr] = attrs[attr]; + } else { + el.setAttribute(attr, attrs[attr]); + } + } + + return el; +}; + +jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) { + var showPassed, showSkipped; + + this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' }, + this.createDom('div', { className: 'banner' }, + this.createDom('div', { className: 'logo' }, + this.createDom('span', { className: 'title' }, "Jasmine"), + this.createDom('span', { className: 'version' }, runner.env.versionString())), + this.createDom('div', { className: 'options' }, + "Show ", + showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }), + this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "), + showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }), + this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped") + ) + ), + + this.runnerDiv = this.createDom('div', { className: 'runner running' }, + this.createDom('a', { className: 'run_spec', href: '?' }, "run all"), + this.runnerMessageSpan = this.createDom('span', {}, "Running..."), + this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, "")) + ); + + this.document.body.appendChild(this.outerDiv); + + var suites = runner.suites(); + for (var i = 0; i < suites.length; i++) { + var suite = suites[i]; + var suiteDiv = this.createDom('div', { className: 'suite' }, + this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"), + this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description)); + this.suiteDivs[suite.id] = suiteDiv; + var parentDiv = this.outerDiv; + if (suite.parentSuite) { + parentDiv = this.suiteDivs[suite.parentSuite.id]; + } + parentDiv.appendChild(suiteDiv); + } + + this.startedAt = new Date(); + + var self = this; + showPassed.onclick = function(evt) { + if (showPassed.checked) { + self.outerDiv.className += ' show-passed'; + } else { + self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, ''); + } + }; + + showSkipped.onclick = function(evt) { + if (showSkipped.checked) { + self.outerDiv.className += ' show-skipped'; + } else { + self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, ''); + } + }; +}; + +jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) { + var results = runner.results(); + var className = (results.failedCount > 0) ? "runner failed" : "runner passed"; + this.runnerDiv.setAttribute("class", className); + //do it twice for IE + this.runnerDiv.setAttribute("className", className); + var specs = runner.specs(); + var specCount = 0; + for (var i = 0; i < specs.length; i++) { + if (this.specFilter(specs[i])) { + specCount++; + } + } + var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s"); + message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"; + this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild); + + this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString())); +}; + +jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) { + var results = suite.results(); + var status = results.passed() ? 'passed' : 'failed'; + if (results.totalCount === 0) { // todo: change this to check results.skipped + status = 'skipped'; + } + this.suiteDivs[suite.id].className += " " + status; +}; + +jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) { + if (this.logRunningSpecs) { + this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...'); + } +}; + +jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) { + var results = spec.results(); + var status = results.passed() ? 'passed' : 'failed'; + if (results.skipped) { + status = 'skipped'; + } + var specDiv = this.createDom('div', { className: 'spec ' + status }, + this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"), + this.createDom('a', { + className: 'description', + href: '?spec=' + encodeURIComponent(spec.getFullName()), + title: spec.getFullName() + }, spec.description)); + + + var resultItems = results.getItems(); + var messagesDiv = this.createDom('div', { className: 'messages' }); + for (var i = 0; i < resultItems.length; i++) { + var result = resultItems[i]; + + if (result.type == 'log') { + messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString())); + } else if (result.type == 'expect' && result.passed && !result.passed()) { + messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message)); + + if (result.trace.stack) { + messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); + } + } + } + + if (messagesDiv.childNodes.length > 0) { + specDiv.appendChild(messagesDiv); + } + + this.suiteDivs[spec.suite.id].appendChild(specDiv); +}; + +jasmine.TrivialReporter.prototype.log = function() { + var console = jasmine.getGlobal().console; + if (console && console.log) { + if (console.log.apply) { + console.log.apply(console, arguments); + } else { + console.log(arguments); // ie fix: console.log.apply doesn't exist on ie + } + } +}; + +jasmine.TrivialReporter.prototype.getLocation = function() { + return this.document.location; +}; + +jasmine.TrivialReporter.prototype.specFilter = function(spec) { + var paramMap = {}; + var params = this.getLocation().search.substring(1).split('&'); + for (var i = 0; i < params.length; i++) { + var p = params[i].split('='); + paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); + } + + if (!paramMap.spec) { + return true; + } + return spec.getFullName().indexOf(paramMap.spec) === 0; +}; diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.css b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.css new file mode 100644 index 0000000..6583fe7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.css @@ -0,0 +1,166 @@ +body { + font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif; +} + + +.jasmine_reporter a:visited, .jasmine_reporter a { + color: #303; +} + +.jasmine_reporter a:hover, .jasmine_reporter a:active { + color: blue; +} + +.run_spec { + float:right; + padding-right: 5px; + font-size: .8em; + text-decoration: none; +} + +.jasmine_reporter { + margin: 0 5px; +} + +.banner { + color: #303; + background-color: #fef; + padding: 5px; +} + +.logo { + float: left; + font-size: 1.1em; + padding-left: 5px; +} + +.logo .version { + font-size: .6em; + padding-left: 1em; +} + +.runner.running { + background-color: yellow; +} + + +.options { + text-align: right; + font-size: .8em; +} + + + + +.suite { + border: 1px outset gray; + margin: 5px 0; + padding-left: 1em; +} + +.suite .suite { + margin: 5px; +} + +.suite.passed { + background-color: #dfd; +} + +.suite.failed { + background-color: #fdd; +} + +.spec { + margin: 5px; + padding-left: 1em; + clear: both; +} + +.spec.failed, .spec.passed, .spec.skipped { + padding-bottom: 5px; + border: 1px solid gray; +} + +.spec.failed { + background-color: #fbb; + border-color: red; +} + +.spec.passed { + background-color: #bfb; + border-color: green; +} + +.spec.skipped { + background-color: #bbb; +} + +.messages { + border-left: 1px dashed gray; + padding-left: 1em; + padding-right: 1em; +} + +.passed { + background-color: #cfc; + display: none; +} + +.failed { + background-color: #fbb; +} + +.skipped { + color: #777; + background-color: #eee; + display: none; +} + + +/*.resultMessage {*/ + /*white-space: pre;*/ +/*}*/ + +.resultMessage span.result { + display: block; + line-height: 2em; + color: black; +} + +.resultMessage .mismatch { + color: black; +} + +.stackTrace { + white-space: pre; + font-size: .8em; + margin-left: 10px; + max-height: 5em; + overflow: auto; + border: 1px inset red; + padding: 1em; + background: #eef; +} + +.finished-at { + padding-left: 1em; + font-size: .6em; +} + +.show-passed .passed, +.show-skipped .skipped { + display: block; +} + + +#jasmine_content { + position:fixed; + right: 100%; +} + +.runner { + border: 1px solid gray; + display: block; + margin: 5px 0; + padding: 2px 0 2px 10px; +} diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.js new file mode 100644 index 0000000..b0892cd --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.js @@ -0,0 +1,2479 @@ +var isCommonJS = typeof window == "undefined"; + +/** + * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. + * + * @namespace + */ +var jasmine = {}; +if (isCommonJS) exports.jasmine = jasmine; +/** + * @private + */ +jasmine.unimplementedMethod_ = function() { + throw new Error("unimplemented method"); +}; + +/** + * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just + * a plain old variable and may be redefined by somebody else. + * + * @private + */ +jasmine.undefined = jasmine.___undefined___; + +/** + * Show diagnostic messages in the console if set to true + * + */ +jasmine.VERBOSE = false; + +/** + * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed. + * + */ +jasmine.DEFAULT_UPDATE_INTERVAL = 250; + +/** + * Default timeout interval in milliseconds for waitsFor() blocks. + */ +jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; + +jasmine.getGlobal = function() { + function getGlobal() { + return this; + } + + return getGlobal(); +}; + +/** + * Allows for bound functions to be compared. Internal use only. + * + * @ignore + * @private + * @param base {Object} bound 'this' for the function + * @param name {Function} function to find + */ +jasmine.bindOriginal_ = function(base, name) { + var original = base[name]; + if (original.apply) { + return function() { + return original.apply(base, arguments); + }; + } else { + // IE support + return jasmine.getGlobal()[name]; + } +}; + +jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout'); +jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout'); +jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval'); +jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval'); + +jasmine.MessageResult = function(values) { + this.type = 'log'; + this.values = values; + this.trace = new Error(); // todo: test better +}; + +jasmine.MessageResult.prototype.toString = function() { + var text = ""; + for (var i = 0; i < this.values.length; i++) { + if (i > 0) text += " "; + if (jasmine.isString_(this.values[i])) { + text += this.values[i]; + } else { + text += jasmine.pp(this.values[i]); + } + } + return text; +}; + +jasmine.ExpectationResult = function(params) { + this.type = 'expect'; + this.matcherName = params.matcherName; + this.passed_ = params.passed; + this.expected = params.expected; + this.actual = params.actual; + this.message = this.passed_ ? 'Passed.' : params.message; + + var trace = (params.trace || new Error(this.message)); + this.trace = this.passed_ ? '' : trace; +}; + +jasmine.ExpectationResult.prototype.toString = function () { + return this.message; +}; + +jasmine.ExpectationResult.prototype.passed = function () { + return this.passed_; +}; + +/** + * Getter for the Jasmine environment. Ensures one gets created + */ +jasmine.getEnv = function() { + var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env(); + return env; +}; + +/** + * @ignore + * @private + * @param value + * @returns {Boolean} + */ +jasmine.isArray_ = function(value) { + return jasmine.isA_("Array", value); +}; + +/** + * @ignore + * @private + * @param value + * @returns {Boolean} + */ +jasmine.isString_ = function(value) { + return jasmine.isA_("String", value); +}; + +/** + * @ignore + * @private + * @param value + * @returns {Boolean} + */ +jasmine.isNumber_ = function(value) { + return jasmine.isA_("Number", value); +}; + +/** + * @ignore + * @private + * @param {String} typeName + * @param value + * @returns {Boolean} + */ +jasmine.isA_ = function(typeName, value) { + return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; +}; + +/** + * Pretty printer for expecations. Takes any object and turns it into a human-readable string. + * + * @param value {Object} an object to be outputted + * @returns {String} + */ +jasmine.pp = function(value) { + var stringPrettyPrinter = new jasmine.StringPrettyPrinter(); + stringPrettyPrinter.format(value); + return stringPrettyPrinter.string; +}; + +/** + * Returns true if the object is a DOM Node. + * + * @param {Object} obj object to check + * @returns {Boolean} + */ +jasmine.isDomNode = function(obj) { + return obj.nodeType > 0; +}; + +/** + * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter. + * + * @example + * // don't care about which function is passed in, as long as it's a function + * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function)); + * + * @param {Class} clazz + * @returns matchable object of the type clazz + */ +jasmine.any = function(clazz) { + return new jasmine.Matchers.Any(clazz); +}; + +/** + * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks. + * + * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine + * expectation syntax. Spies can be checked if they were called or not and what the calling params were. + * + * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs). + * + * Spies are torn down at the end of every spec. + * + * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. + * + * @example + * // a stub + * var myStub = jasmine.createSpy('myStub'); // can be used anywhere + * + * // spy example + * var foo = { + * not: function(bool) { return !bool; } + * } + * + * // actual foo.not will not be called, execution stops + * spyOn(foo, 'not'); + + // foo.not spied upon, execution will continue to implementation + * spyOn(foo, 'not').andCallThrough(); + * + * // fake example + * var foo = { + * not: function(bool) { return !bool; } + * } + * + * // foo.not(val) will return val + * spyOn(foo, 'not').andCallFake(function(value) {return value;}); + * + * // mock example + * foo.not(7 == 7); + * expect(foo.not).toHaveBeenCalled(); + * expect(foo.not).toHaveBeenCalledWith(true); + * + * @constructor + * @see spyOn, jasmine.createSpy, jasmine.createSpyObj + * @param {String} name + */ +jasmine.Spy = function(name) { + /** + * The name of the spy, if provided. + */ + this.identity = name || 'unknown'; + /** + * Is this Object a spy? + */ + this.isSpy = true; + /** + * The actual function this spy stubs. + */ + this.plan = function() { + }; + /** + * Tracking of the most recent call to the spy. + * @example + * var mySpy = jasmine.createSpy('foo'); + * mySpy(1, 2); + * mySpy.mostRecentCall.args = [1, 2]; + */ + this.mostRecentCall = {}; + + /** + * Holds arguments for each call to the spy, indexed by call count + * @example + * var mySpy = jasmine.createSpy('foo'); + * mySpy(1, 2); + * mySpy(7, 8); + * mySpy.mostRecentCall.args = [7, 8]; + * mySpy.argsForCall[0] = [1, 2]; + * mySpy.argsForCall[1] = [7, 8]; + */ + this.argsForCall = []; + this.calls = []; +}; + +/** + * Tells a spy to call through to the actual implemenatation. + * + * @example + * var foo = { + * bar: function() { // do some stuff } + * } + * + * // defining a spy on an existing property: foo.bar + * spyOn(foo, 'bar').andCallThrough(); + */ +jasmine.Spy.prototype.andCallThrough = function() { + this.plan = this.originalValue; + return this; +}; + +/** + * For setting the return value of a spy. + * + * @example + * // defining a spy from scratch: foo() returns 'baz' + * var foo = jasmine.createSpy('spy on foo').andReturn('baz'); + * + * // defining a spy on an existing property: foo.bar() returns 'baz' + * spyOn(foo, 'bar').andReturn('baz'); + * + * @param {Object} value + */ +jasmine.Spy.prototype.andReturn = function(value) { + this.plan = function() { + return value; + }; + return this; +}; + +/** + * For throwing an exception when a spy is called. + * + * @example + * // defining a spy from scratch: foo() throws an exception w/ message 'ouch' + * var foo = jasmine.createSpy('spy on foo').andThrow('baz'); + * + * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch' + * spyOn(foo, 'bar').andThrow('baz'); + * + * @param {String} exceptionMsg + */ +jasmine.Spy.prototype.andThrow = function(exceptionMsg) { + this.plan = function() { + throw exceptionMsg; + }; + return this; +}; + +/** + * Calls an alternate implementation when a spy is called. + * + * @example + * var baz = function() { + * // do some stuff, return something + * } + * // defining a spy from scratch: foo() calls the function baz + * var foo = jasmine.createSpy('spy on foo').andCall(baz); + * + * // defining a spy on an existing property: foo.bar() calls an anonymnous function + * spyOn(foo, 'bar').andCall(function() { return 'baz';} ); + * + * @param {Function} fakeFunc + */ +jasmine.Spy.prototype.andCallFake = function(fakeFunc) { + this.plan = fakeFunc; + return this; +}; + +/** + * Resets all of a spy's the tracking variables so that it can be used again. + * + * @example + * spyOn(foo, 'bar'); + * + * foo.bar(); + * + * expect(foo.bar.callCount).toEqual(1); + * + * foo.bar.reset(); + * + * expect(foo.bar.callCount).toEqual(0); + */ +jasmine.Spy.prototype.reset = function() { + this.wasCalled = false; + this.callCount = 0; + this.argsForCall = []; + this.calls = []; + this.mostRecentCall = {}; +}; + +jasmine.createSpy = function(name) { + + var spyObj = function() { + spyObj.wasCalled = true; + spyObj.callCount++; + var args = jasmine.util.argsToArray(arguments); + spyObj.mostRecentCall.object = this; + spyObj.mostRecentCall.args = args; + spyObj.argsForCall.push(args); + spyObj.calls.push({object: this, args: args}); + return spyObj.plan.apply(this, arguments); + }; + + var spy = new jasmine.Spy(name); + + for (var prop in spy) { + spyObj[prop] = spy[prop]; + } + + spyObj.reset(); + + return spyObj; +}; + +/** + * Determines whether an object is a spy. + * + * @param {jasmine.Spy|Object} putativeSpy + * @returns {Boolean} + */ +jasmine.isSpy = function(putativeSpy) { + return putativeSpy && putativeSpy.isSpy; +}; + +/** + * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something + * large in one call. + * + * @param {String} baseName name of spy class + * @param {Array} methodNames array of names of methods to make spies + */ +jasmine.createSpyObj = function(baseName, methodNames) { + if (!jasmine.isArray_(methodNames) || methodNames.length === 0) { + throw new Error('createSpyObj requires a non-empty array of method names to create spies for'); + } + var obj = {}; + for (var i = 0; i < methodNames.length; i++) { + obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]); + } + return obj; +}; + +/** + * All parameters are pretty-printed and concatenated together, then written to the current spec's output. + * + * Be careful not to leave calls to <code>jasmine.log</code> in production code. + */ +jasmine.log = function() { + var spec = jasmine.getEnv().currentSpec; + spec.log.apply(spec, arguments); +}; + +/** + * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy. + * + * @example + * // spy example + * var foo = { + * not: function(bool) { return !bool; } + * } + * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops + * + * @see jasmine.createSpy + * @param obj + * @param methodName + * @returns a Jasmine spy that can be chained with all spy methods + */ +var spyOn = function(obj, methodName) { + return jasmine.getEnv().currentSpec.spyOn(obj, methodName); +}; +if (isCommonJS) exports.spyOn = spyOn; + +/** + * Creates a Jasmine spec that will be added to the current suite. + * + * // TODO: pending tests + * + * @example + * it('should be true', function() { + * expect(true).toEqual(true); + * }); + * + * @param {String} desc description of this specification + * @param {Function} func defines the preconditions and expectations of the spec + */ +var it = function(desc, func) { + return jasmine.getEnv().it(desc, func); +}; +if (isCommonJS) exports.it = it; + +/** + * Creates a <em>disabled</em> Jasmine spec. + * + * A convenience method that allows existing specs to be disabled temporarily during development. + * + * @param {String} desc description of this specification + * @param {Function} func defines the preconditions and expectations of the spec + */ +var xit = function(desc, func) { + return jasmine.getEnv().xit(desc, func); +}; +if (isCommonJS) exports.xit = xit; + +/** + * Starts a chain for a Jasmine expectation. + * + * It is passed an Object that is the actual value and should chain to one of the many + * jasmine.Matchers functions. + * + * @param {Object} actual Actual value to test against and expected value + */ +var expect = function(actual) { + return jasmine.getEnv().currentSpec.expect(actual); +}; +if (isCommonJS) exports.expect = expect; + +/** + * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs. + * + * @param {Function} func Function that defines part of a jasmine spec. + */ +var runs = function(func) { + jasmine.getEnv().currentSpec.runs(func); +}; +if (isCommonJS) exports.runs = runs; + +/** + * Waits a fixed time period before moving to the next block. + * + * @deprecated Use waitsFor() instead + * @param {Number} timeout milliseconds to wait + */ +var waits = function(timeout) { + jasmine.getEnv().currentSpec.waits(timeout); +}; +if (isCommonJS) exports.waits = waits; + +/** + * Waits for the latchFunction to return true before proceeding to the next block. + * + * @param {Function} latchFunction + * @param {String} optional_timeoutMessage + * @param {Number} optional_timeout + */ +var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { + jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments); +}; +if (isCommonJS) exports.waitsFor = waitsFor; + +/** + * A function that is called before each spec in a suite. + * + * Used for spec setup, including validating assumptions. + * + * @param {Function} beforeEachFunction + */ +var beforeEach = function(beforeEachFunction) { + jasmine.getEnv().beforeEach(beforeEachFunction); +}; +if (isCommonJS) exports.beforeEach = beforeEach; + +/** + * A function that is called after each spec in a suite. + * + * Used for restoring any state that is hijacked during spec execution. + * + * @param {Function} afterEachFunction + */ +var afterEach = function(afterEachFunction) { + jasmine.getEnv().afterEach(afterEachFunction); +}; +if (isCommonJS) exports.afterEach = afterEach; + +/** + * Defines a suite of specifications. + * + * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared + * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization + * of setup in some tests. + * + * @example + * // TODO: a simple suite + * + * // TODO: a simple suite with a nested describe block + * + * @param {String} description A string, usually the class under test. + * @param {Function} specDefinitions function that defines several specs. + */ +var describe = function(description, specDefinitions) { + return jasmine.getEnv().describe(description, specDefinitions); +}; +if (isCommonJS) exports.describe = describe; + +/** + * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development. + * + * @param {String} description A string, usually the class under test. + * @param {Function} specDefinitions function that defines several specs. + */ +var xdescribe = function(description, specDefinitions) { + return jasmine.getEnv().xdescribe(description, specDefinitions); +}; +if (isCommonJS) exports.xdescribe = xdescribe; + + +// Provide the XMLHttpRequest class for IE 5.x-6.x: +jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() { + function tryIt(f) { + try { + return f(); + } catch(e) { + var abcdef = 1 + } + return null; + } + + var xhr = tryIt(function() { + return new ActiveXObject("Msxml2.XMLHTTP.6.0"); + }) || + tryIt(function() { + return new ActiveXObject("Msxml2.XMLHTTP.3.0"); + }) || + tryIt(function() { + return new ActiveXObject("Msxml2.XMLHTTP"); + }) || + tryIt(function() { + return new ActiveXObject("Microsoft.XMLHTTP"); + }); + + if (!xhr) throw new Error("This browser does not support XMLHttpRequest."); + + return xhr; +} : XMLHttpRequest; +/** + * @namespace + */ +jasmine.util = {}; + +/** + * Declare that a child class inherit it's prototype from the parent class. + * + * @private + * @param {Function} childClass + * @param {Function} parentClass + */ +jasmine.util.inherit = function(childClass, parentClass) { + /** + * @private + */ + var subclass = function() { + }; + subclass.prototype = parentClass.prototype; + childClass.prototype = new subclass(); +}; + +jasmine.util.formatException = function(e) { + var lineNumber; + if (e.line) { + lineNumber = e.line; + } + else if (e.lineNumber) { + lineNumber = e.lineNumber; + } + + var file; + + if (e.sourceURL) { + file = e.sourceURL; + } + else if (e.fileName) { + file = e.fileName; + } + + var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); + + if (file && lineNumber) { + message += ' in ' + file + ' (line ' + lineNumber + ')'; + } + + return message; +}; + +jasmine.util.htmlEscape = function(str) { + if (!str) return str; + return str.replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>'); +}; + +jasmine.util.argsToArray = function(args) { + var arrayOfArgs = []; + for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); + return arrayOfArgs; +}; + +jasmine.util.extend = function(destination, source) { + for (var property in source) destination[property] = source[property]; + return destination; +}; + +/** + * Environment for Jasmine + * + * @constructor + */ +jasmine.Env = function() { + this.currentSpec = null; + this.currentSuite = null; + this.currentRunner_ = new jasmine.Runner(this); + + this.reporter = new jasmine.MultiReporter(); + + this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL; + this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL; + this.lastUpdate = 0; + this.specFilter = function() { + return true; + }; + + this.nextSpecId_ = 0; + this.nextSuiteId_ = 0; + this.equalityTesters_ = []; + + // wrap matchers + this.matchersClass = function() { + jasmine.Matchers.apply(this, arguments); + }; + jasmine.util.inherit(this.matchersClass, jasmine.Matchers); + + jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass); +}; + + +jasmine.Env.prototype.setTimeout = jasmine.setTimeout; +jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout; +jasmine.Env.prototype.setInterval = jasmine.setInterval; +jasmine.Env.prototype.clearInterval = jasmine.clearInterval; + +/** + * @returns an object containing jasmine version build info, if set. + */ +jasmine.Env.prototype.version = function () { + if (jasmine.version_) { + return jasmine.version_; + } else { + throw new Error('Version not set'); + } +}; + +/** + * @returns string containing jasmine version build info, if set. + */ +jasmine.Env.prototype.versionString = function() { + if (!jasmine.version_) { + return "version unknown"; + } + + var version = this.version(); + var versionString = version.major + "." + version.minor + "." + version.build; + if (version.release_candidate) { + versionString += ".rc" + version.release_candidate + } + versionString += " revision " + version.revision; + return versionString; +}; + +/** + * @returns a sequential integer starting at 0 + */ +jasmine.Env.prototype.nextSpecId = function () { + return this.nextSpecId_++; +}; + +/** + * @returns a sequential integer starting at 0 + */ +jasmine.Env.prototype.nextSuiteId = function () { + return this.nextSuiteId_++; +}; + +/** + * Register a reporter to receive status updates from Jasmine. + * @param {jasmine.Reporter} reporter An object which will receive status updates. + */ +jasmine.Env.prototype.addReporter = function(reporter) { + this.reporter.addReporter(reporter); +}; + +jasmine.Env.prototype.execute = function() { + this.currentRunner_.execute(); +}; + +jasmine.Env.prototype.describe = function(description, specDefinitions) { + var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite); + + var parentSuite = this.currentSuite; + if (parentSuite) { + parentSuite.add(suite); + } else { + this.currentRunner_.add(suite); + } + + this.currentSuite = suite; + + var declarationError = null; + try { + specDefinitions.call(suite); + } catch(e) { + declarationError = e; + } + + if (declarationError) { + this.it("encountered a declaration exception", function() { + throw declarationError; + }); + } + + this.currentSuite = parentSuite; + + return suite; +}; + +jasmine.Env.prototype.beforeEach = function(beforeEachFunction) { + if (this.currentSuite) { + this.currentSuite.beforeEach(beforeEachFunction); + } else { + this.currentRunner_.beforeEach(beforeEachFunction); + } +}; + +jasmine.Env.prototype.currentRunner = function () { + return this.currentRunner_; +}; + +jasmine.Env.prototype.afterEach = function(afterEachFunction) { + if (this.currentSuite) { + this.currentSuite.afterEach(afterEachFunction); + } else { + this.currentRunner_.afterEach(afterEachFunction); + } + +}; + +jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) { + return { + execute: function() { + } + }; +}; + +jasmine.Env.prototype.it = function(description, func) { + var spec = new jasmine.Spec(this, this.currentSuite, description); + this.currentSuite.add(spec); + this.currentSpec = spec; + + if (func) { + spec.runs(func); + } + + return spec; +}; + +jasmine.Env.prototype.xit = function(desc, func) { + return { + id: this.nextSpecId(), + runs: function() { + } + }; +}; + +jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) { + if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) { + return true; + } + + a.__Jasmine_been_here_before__ = b; + b.__Jasmine_been_here_before__ = a; + + var hasKey = function(obj, keyName) { + return obj !== null && obj[keyName] !== jasmine.undefined; + }; + + for (var property in b) { + if (!hasKey(a, property) && hasKey(b, property)) { + mismatchKeys.push("expected has key '" + property + "', but missing from actual."); + } + } + for (property in a) { + if (!hasKey(b, property) && hasKey(a, property)) { + mismatchKeys.push("expected missing key '" + property + "', but present in actual."); + } + } + for (property in b) { + if (property == '__Jasmine_been_here_before__') continue; + if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) { + mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual."); + } + } + + if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) { + mismatchValues.push("arrays were not the same length"); + } + + delete a.__Jasmine_been_here_before__; + delete b.__Jasmine_been_here_before__; + return (mismatchKeys.length === 0 && mismatchValues.length === 0); +}; + +jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) { + mismatchKeys = mismatchKeys || []; + mismatchValues = mismatchValues || []; + + for (var i = 0; i < this.equalityTesters_.length; i++) { + var equalityTester = this.equalityTesters_[i]; + var result = equalityTester(a, b, this, mismatchKeys, mismatchValues); + if (result !== jasmine.undefined) return result; + } + + if (a === b) return true; + + if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) { + return (a == jasmine.undefined && b == jasmine.undefined); + } + + if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) { + return a === b; + } + + if (a instanceof Date && b instanceof Date) { + return a.getTime() == b.getTime(); + } + + if (a instanceof jasmine.Matchers.Any) { + return a.matches(b); + } + + if (b instanceof jasmine.Matchers.Any) { + return b.matches(a); + } + + if (jasmine.isString_(a) && jasmine.isString_(b)) { + return (a == b); + } + + if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) { + return (a == b); + } + + if (typeof a === "object" && typeof b === "object") { + return this.compareObjects_(a, b, mismatchKeys, mismatchValues); + } + + //Straight check + return (a === b); +}; + +jasmine.Env.prototype.contains_ = function(haystack, needle) { + if (jasmine.isArray_(haystack)) { + for (var i = 0; i < haystack.length; i++) { + if (this.equals_(haystack[i], needle)) return true; + } + return false; + } + return haystack.indexOf(needle) >= 0; +}; + +jasmine.Env.prototype.addEqualityTester = function(equalityTester) { + this.equalityTesters_.push(equalityTester); +}; +/** No-op base class for Jasmine reporters. + * + * @constructor + */ +jasmine.Reporter = function() { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.Reporter.prototype.reportRunnerStarting = function(runner) { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.Reporter.prototype.reportRunnerResults = function(runner) { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.Reporter.prototype.reportSuiteResults = function(suite) { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.Reporter.prototype.reportSpecStarting = function(spec) { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.Reporter.prototype.reportSpecResults = function(spec) { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.Reporter.prototype.log = function(str) { +}; + +/** + * Blocks are functions with executable code that make up a spec. + * + * @constructor + * @param {jasmine.Env} env + * @param {Function} func + * @param {jasmine.Spec} spec + */ +jasmine.Block = function(env, func, spec) { + this.env = env; + this.func = func; + this.spec = spec; +}; + +jasmine.Block.prototype.execute = function(onComplete) { + try { + this.func.apply(this.spec); + } catch (e) { + this.spec.fail(e); + } + onComplete(); +}; +/** JavaScript API reporter. + * + * @constructor + */ +jasmine.JsApiReporter = function() { + this.started = false; + this.finished = false; + this.suites_ = []; + this.results_ = {}; +}; + +jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) { + this.started = true; + var suites = runner.topLevelSuites(); + for (var i = 0; i < suites.length; i++) { + var suite = suites[i]; + this.suites_.push(this.summarize_(suite)); + } +}; + +jasmine.JsApiReporter.prototype.suites = function() { + return this.suites_; +}; + +jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) { + var isSuite = suiteOrSpec instanceof jasmine.Suite; + var summary = { + id: suiteOrSpec.id, + name: suiteOrSpec.description, + type: isSuite ? 'suite' : 'spec', + children: [] + }; + + if (isSuite) { + var children = suiteOrSpec.children(); + for (var i = 0; i < children.length; i++) { + summary.children.push(this.summarize_(children[i])); + } + } + return summary; +}; + +jasmine.JsApiReporter.prototype.results = function() { + return this.results_; +}; + +jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) { + return this.results_[specId]; +}; + +//noinspection JSUnusedLocalSymbols +jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) { + this.finished = true; +}; + +//noinspection JSUnusedLocalSymbols +jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) { +}; + +//noinspection JSUnusedLocalSymbols +jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) { + this.results_[spec.id] = { + messages: spec.results().getItems(), + result: spec.results().failedCount > 0 ? "failed" : "passed" + }; +}; + +//noinspection JSUnusedLocalSymbols +jasmine.JsApiReporter.prototype.log = function(str) { +}; + +jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){ + var results = {}; + for (var i = 0; i < specIds.length; i++) { + var specId = specIds[i]; + results[specId] = this.summarizeResult_(this.results_[specId]); + } + return results; +}; + +jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){ + var summaryMessages = []; + var messagesLength = result.messages.length; + for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) { + var resultMessage = result.messages[messageIndex]; + summaryMessages.push({ + text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined, + passed: resultMessage.passed ? resultMessage.passed() : true, + type: resultMessage.type, + message: resultMessage.message, + trace: { + stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined + } + }); + } + + return { + result : result.result, + messages : summaryMessages + }; +}; + +/** + * @constructor + * @param {jasmine.Env} env + * @param actual + * @param {jasmine.Spec} spec + */ +jasmine.Matchers = function(env, actual, spec, opt_isNot) { + this.env = env; + this.actual = actual; + this.spec = spec; + this.isNot = opt_isNot || false; + this.reportWasCalled_ = false; +}; + +// todo: @deprecated as of Jasmine 0.11, remove soon [xw] +jasmine.Matchers.pp = function(str) { + throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!"); +}; + +// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw] +jasmine.Matchers.prototype.report = function(result, failing_message, details) { + throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs"); +}; + +jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) { + for (var methodName in prototype) { + if (methodName == 'report') continue; + var orig = prototype[methodName]; + matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig); + } +}; + +jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) { + return function() { + var matcherArgs = jasmine.util.argsToArray(arguments); + var result = matcherFunction.apply(this, arguments); + + if (this.isNot) { + result = !result; + } + + if (this.reportWasCalled_) return result; + + var message; + if (!result) { + if (this.message) { + message = this.message.apply(this, arguments); + if (jasmine.isArray_(message)) { + message = message[this.isNot ? 1 : 0]; + } + } else { + var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); }); + message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate; + if (matcherArgs.length > 0) { + for (var i = 0; i < matcherArgs.length; i++) { + if (i > 0) message += ","; + message += " " + jasmine.pp(matcherArgs[i]); + } + } + message += "."; + } + } + var expectationResult = new jasmine.ExpectationResult({ + matcherName: matcherName, + passed: result, + expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0], + actual: this.actual, + message: message + }); + this.spec.addMatcherResult(expectationResult); + return jasmine.undefined; + }; +}; + + + + +/** + * toBe: compares the actual to the expected using === + * @param expected + */ +jasmine.Matchers.prototype.toBe = function(expected) { + return this.actual === expected; +}; + +/** + * toNotBe: compares the actual to the expected using !== + * @param expected + * @deprecated as of 1.0. Use not.toBe() instead. + */ +jasmine.Matchers.prototype.toNotBe = function(expected) { + return this.actual !== expected; +}; + +/** + * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc. + * + * @param expected + */ +jasmine.Matchers.prototype.toEqual = function(expected) { + return this.env.equals_(this.actual, expected); +}; + +/** + * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual + * @param expected + * @deprecated as of 1.0. Use not.toNotEqual() instead. + */ +jasmine.Matchers.prototype.toNotEqual = function(expected) { + return !this.env.equals_(this.actual, expected); +}; + +/** + * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes + * a pattern or a String. + * + * @param expected + */ +jasmine.Matchers.prototype.toMatch = function(expected) { + return new RegExp(expected).test(this.actual); +}; + +/** + * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch + * @param expected + * @deprecated as of 1.0. Use not.toMatch() instead. + */ +jasmine.Matchers.prototype.toNotMatch = function(expected) { + return !(new RegExp(expected).test(this.actual)); +}; + +/** + * Matcher that compares the actual to jasmine.undefined. + */ +jasmine.Matchers.prototype.toBeDefined = function() { + return (this.actual !== jasmine.undefined); +}; + +/** + * Matcher that compares the actual to jasmine.undefined. + */ +jasmine.Matchers.prototype.toBeUndefined = function() { + return (this.actual === jasmine.undefined); +}; + +/** + * Matcher that compares the actual to null. + */ +jasmine.Matchers.prototype.toBeNull = function() { + return (this.actual === null); +}; + +/** + * Matcher that boolean not-nots the actual. + */ +jasmine.Matchers.prototype.toBeTruthy = function() { + return !!this.actual; +}; + + +/** + * Matcher that boolean nots the actual. + */ +jasmine.Matchers.prototype.toBeFalsy = function() { + return !this.actual; +}; + + +/** + * Matcher that checks to see if the actual, a Jasmine spy, was called. + */ +jasmine.Matchers.prototype.toHaveBeenCalled = function() { + if (arguments.length > 0) { + throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); + } + + if (!jasmine.isSpy(this.actual)) { + throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); + } + + this.message = function() { + return [ + "Expected spy " + this.actual.identity + " to have been called.", + "Expected spy " + this.actual.identity + " not to have been called." + ]; + }; + + return this.actual.wasCalled; +}; + +/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */ +jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled; + +/** + * Matcher that checks to see if the actual, a Jasmine spy, was not called. + * + * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead + */ +jasmine.Matchers.prototype.wasNotCalled = function() { + if (arguments.length > 0) { + throw new Error('wasNotCalled does not take arguments'); + } + + if (!jasmine.isSpy(this.actual)) { + throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); + } + + this.message = function() { + return [ + "Expected spy " + this.actual.identity + " to not have been called.", + "Expected spy " + this.actual.identity + " to have been called." + ]; + }; + + return !this.actual.wasCalled; +}; + +/** + * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters. + * + * @example + * + */ +jasmine.Matchers.prototype.toHaveBeenCalledWith = function() { + var expectedArgs = jasmine.util.argsToArray(arguments); + if (!jasmine.isSpy(this.actual)) { + throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); + } + this.message = function() { + if (this.actual.callCount === 0) { + // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw] + return [ + "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.", + "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was." + ]; + } else { + return [ + "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall), + "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall) + ]; + } + }; + + return this.env.contains_(this.actual.argsForCall, expectedArgs); +}; + +/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */ +jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith; + +/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */ +jasmine.Matchers.prototype.wasNotCalledWith = function() { + var expectedArgs = jasmine.util.argsToArray(arguments); + if (!jasmine.isSpy(this.actual)) { + throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); + } + + this.message = function() { + return [ + "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was", + "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was" + ]; + }; + + return !this.env.contains_(this.actual.argsForCall, expectedArgs); +}; + +/** + * Matcher that checks that the expected item is an element in the actual Array. + * + * @param {Object} expected + */ +jasmine.Matchers.prototype.toContain = function(expected) { + return this.env.contains_(this.actual, expected); +}; + +/** + * Matcher that checks that the expected item is NOT an element in the actual Array. + * + * @param {Object} expected + * @deprecated as of 1.0. Use not.toNotContain() instead. + */ +jasmine.Matchers.prototype.toNotContain = function(expected) { + return !this.env.contains_(this.actual, expected); +}; + +jasmine.Matchers.prototype.toBeLessThan = function(expected) { + return this.actual < expected; +}; + +jasmine.Matchers.prototype.toBeGreaterThan = function(expected) { + return this.actual > expected; +}; + +/** + * Matcher that checks that the expected item is equal to the actual item + * up to a given level of decimal precision (default 2). + * + * @param {Number} expected + * @param {Number} precision + */ +jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) { + if (!(precision === 0)) { + precision = precision || 2; + } + var multiplier = Math.pow(10, precision); + var actual = Math.round(this.actual * multiplier); + expected = Math.round(expected * multiplier); + return expected == actual; +}; + +/** + * Matcher that checks that the expected exception was thrown by the actual. + * + * @param {String} expected + */ +jasmine.Matchers.prototype.toThrow = function(expected) { + var result = false; + var exception; + if (typeof this.actual != 'function') { + throw new Error('Actual is not a function'); + } + try { + this.actual(); + } catch (e) { + exception = e; + } + if (exception) { + result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected)); + } + + var not = this.isNot ? "not " : ""; + + this.message = function() { + if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) { + return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' '); + } else { + return "Expected function to throw an exception."; + } + }; + + return result; +}; + +jasmine.Matchers.Any = function(expectedClass) { + this.expectedClass = expectedClass; +}; + +jasmine.Matchers.Any.prototype.matches = function(other) { + if (this.expectedClass == String) { + return typeof other == 'string' || other instanceof String; + } + + if (this.expectedClass == Number) { + return typeof other == 'number' || other instanceof Number; + } + + if (this.expectedClass == Function) { + return typeof other == 'function' || other instanceof Function; + } + + if (this.expectedClass == Object) { + return typeof other == 'object'; + } + + return other instanceof this.expectedClass; +}; + +jasmine.Matchers.Any.prototype.toString = function() { + return '<jasmine.any(' + this.expectedClass + ')>'; +}; + +/** + * @constructor + */ +jasmine.MultiReporter = function() { + this.subReporters_ = []; +}; +jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter); + +jasmine.MultiReporter.prototype.addReporter = function(reporter) { + this.subReporters_.push(reporter); +}; + +(function() { + var functionNames = [ + "reportRunnerStarting", + "reportRunnerResults", + "reportSuiteResults", + "reportSpecStarting", + "reportSpecResults", + "log" + ]; + for (var i = 0; i < functionNames.length; i++) { + var functionName = functionNames[i]; + jasmine.MultiReporter.prototype[functionName] = (function(functionName) { + return function() { + for (var j = 0; j < this.subReporters_.length; j++) { + var subReporter = this.subReporters_[j]; + if (subReporter[functionName]) { + subReporter[functionName].apply(subReporter, arguments); + } + } + }; + })(functionName); + } +})(); +/** + * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults + * + * @constructor + */ +jasmine.NestedResults = function() { + /** + * The total count of results + */ + this.totalCount = 0; + /** + * Number of passed results + */ + this.passedCount = 0; + /** + * Number of failed results + */ + this.failedCount = 0; + /** + * Was this suite/spec skipped? + */ + this.skipped = false; + /** + * @ignore + */ + this.items_ = []; +}; + +/** + * Roll up the result counts. + * + * @param result + */ +jasmine.NestedResults.prototype.rollupCounts = function(result) { + this.totalCount += result.totalCount; + this.passedCount += result.passedCount; + this.failedCount += result.failedCount; +}; + +/** + * Adds a log message. + * @param values Array of message parts which will be concatenated later. + */ +jasmine.NestedResults.prototype.log = function(values) { + this.items_.push(new jasmine.MessageResult(values)); +}; + +/** + * Getter for the results: message & results. + */ +jasmine.NestedResults.prototype.getItems = function() { + return this.items_; +}; + +/** + * Adds a result, tracking counts (total, passed, & failed) + * @param {jasmine.ExpectationResult|jasmine.NestedResults} result + */ +jasmine.NestedResults.prototype.addResult = function(result) { + if (result.type != 'log') { + if (result.items_) { + this.rollupCounts(result); + } else { + this.totalCount++; + if (result.passed()) { + this.passedCount++; + } else { + this.failedCount++; + } + } + } + this.items_.push(result); +}; + +/** + * @returns {Boolean} True if <b>everything</b> below passed + */ +jasmine.NestedResults.prototype.passed = function() { + return this.passedCount === this.totalCount; +}; +/** + * Base class for pretty printing for expectation results. + */ +jasmine.PrettyPrinter = function() { + this.ppNestLevel_ = 0; +}; + +/** + * Formats a value in a nice, human-readable string. + * + * @param value + */ +jasmine.PrettyPrinter.prototype.format = function(value) { + if (this.ppNestLevel_ > 40) { + throw new Error('jasmine.PrettyPrinter: format() nested too deeply!'); + } + + this.ppNestLevel_++; + try { + if (value === jasmine.undefined) { + this.emitScalar('undefined'); + } else if (value === null) { + this.emitScalar('null'); + } else if (value === jasmine.getGlobal()) { + this.emitScalar('<global>'); + } else if (value instanceof jasmine.Matchers.Any) { + this.emitScalar(value.toString()); + } else if (typeof value === 'string') { + this.emitString(value); + } else if (jasmine.isSpy(value)) { + this.emitScalar("spy on " + value.identity); + } else if (value instanceof RegExp) { + this.emitScalar(value.toString()); + } else if (typeof value === 'function') { + this.emitScalar('Function'); + } else if (typeof value.nodeType === 'number') { + this.emitScalar('HTMLNode'); + } else if (value instanceof Date) { + this.emitScalar('Date(' + value + ')'); + } else if (value.__Jasmine_been_here_before__) { + this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>'); + } else if (jasmine.isArray_(value) || typeof value == 'object') { + value.__Jasmine_been_here_before__ = true; + if (jasmine.isArray_(value)) { + this.emitArray(value); + } else { + this.emitObject(value); + } + delete value.__Jasmine_been_here_before__; + } else { + this.emitScalar(value.toString()); + } + } finally { + this.ppNestLevel_--; + } +}; + +jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { + for (var property in obj) { + if (property == '__Jasmine_been_here_before__') continue; + fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && + obj.__lookupGetter__(property) !== null) : false); + } +}; + +jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_; +jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_; +jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_; +jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_; + +jasmine.StringPrettyPrinter = function() { + jasmine.PrettyPrinter.call(this); + + this.string = ''; +}; +jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter); + +jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) { + this.append(value); +}; + +jasmine.StringPrettyPrinter.prototype.emitString = function(value) { + this.append("'" + value + "'"); +}; + +jasmine.StringPrettyPrinter.prototype.emitArray = function(array) { + this.append('[ '); + for (var i = 0; i < array.length; i++) { + if (i > 0) { + this.append(', '); + } + this.format(array[i]); + } + this.append(' ]'); +}; + +jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) { + var self = this; + this.append('{ '); + var first = true; + + this.iterateObject(obj, function(property, isGetter) { + if (first) { + first = false; + } else { + self.append(', '); + } + + self.append(property); + self.append(' : '); + if (isGetter) { + self.append('<getter>'); + } else { + self.format(obj[property]); + } + }); + + this.append(' }'); +}; + +jasmine.StringPrettyPrinter.prototype.append = function(value) { + this.string += value; +}; +jasmine.Queue = function(env) { + this.env = env; + this.blocks = []; + this.running = false; + this.index = 0; + this.offset = 0; + this.abort = false; +}; + +jasmine.Queue.prototype.addBefore = function(block) { + this.blocks.unshift(block); +}; + +jasmine.Queue.prototype.add = function(block) { + this.blocks.push(block); +}; + +jasmine.Queue.prototype.insertNext = function(block) { + this.blocks.splice((this.index + this.offset + 1), 0, block); + this.offset++; +}; + +jasmine.Queue.prototype.start = function(onComplete) { + this.running = true; + this.onComplete = onComplete; + this.next_(); +}; + +jasmine.Queue.prototype.isRunning = function() { + return this.running; +}; + +jasmine.Queue.LOOP_DONT_RECURSE = true; + +jasmine.Queue.prototype.next_ = function() { + var self = this; + var goAgain = true; + + while (goAgain) { + goAgain = false; + + if (self.index < self.blocks.length && !this.abort) { + var calledSynchronously = true; + var completedSynchronously = false; + + var onComplete = function () { + if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) { + completedSynchronously = true; + return; + } + + if (self.blocks[self.index].abort) { + self.abort = true; + } + + self.offset = 0; + self.index++; + + var now = new Date().getTime(); + if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) { + self.env.lastUpdate = now; + self.env.setTimeout(function() { + self.next_(); + }, 0); + } else { + if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) { + goAgain = true; + } else { + self.next_(); + } + } + }; + self.blocks[self.index].execute(onComplete); + + calledSynchronously = false; + if (completedSynchronously) { + onComplete(); + } + + } else { + self.running = false; + if (self.onComplete) { + self.onComplete(); + } + } + } +}; + +jasmine.Queue.prototype.results = function() { + var results = new jasmine.NestedResults(); + for (var i = 0; i < this.blocks.length; i++) { + if (this.blocks[i].results) { + results.addResult(this.blocks[i].results()); + } + } + return results; +}; + + +/** + * Runner + * + * @constructor + * @param {jasmine.Env} env + */ +jasmine.Runner = function(env) { + var self = this; + self.env = env; + self.queue = new jasmine.Queue(env); + self.before_ = []; + self.after_ = []; + self.suites_ = []; +}; + +jasmine.Runner.prototype.execute = function() { + var self = this; + if (self.env.reporter.reportRunnerStarting) { + self.env.reporter.reportRunnerStarting(this); + } + self.queue.start(function () { + self.finishCallback(); + }); +}; + +jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) { + beforeEachFunction.typeName = 'beforeEach'; + this.before_.splice(0,0,beforeEachFunction); +}; + +jasmine.Runner.prototype.afterEach = function(afterEachFunction) { + afterEachFunction.typeName = 'afterEach'; + this.after_.splice(0,0,afterEachFunction); +}; + + +jasmine.Runner.prototype.finishCallback = function() { + this.env.reporter.reportRunnerResults(this); +}; + +jasmine.Runner.prototype.addSuite = function(suite) { + this.suites_.push(suite); +}; + +jasmine.Runner.prototype.add = function(block) { + if (block instanceof jasmine.Suite) { + this.addSuite(block); + } + this.queue.add(block); +}; + +jasmine.Runner.prototype.specs = function () { + var suites = this.suites(); + var specs = []; + for (var i = 0; i < suites.length; i++) { + specs = specs.concat(suites[i].specs()); + } + return specs; +}; + +jasmine.Runner.prototype.suites = function() { + return this.suites_; +}; + +jasmine.Runner.prototype.topLevelSuites = function() { + var topLevelSuites = []; + for (var i = 0; i < this.suites_.length; i++) { + if (!this.suites_[i].parentSuite) { + topLevelSuites.push(this.suites_[i]); + } + } + return topLevelSuites; +}; + +jasmine.Runner.prototype.results = function() { + return this.queue.results(); +}; +/** + * Internal representation of a Jasmine specification, or test. + * + * @constructor + * @param {jasmine.Env} env + * @param {jasmine.Suite} suite + * @param {String} description + */ +jasmine.Spec = function(env, suite, description) { + if (!env) { + throw new Error('jasmine.Env() required'); + } + if (!suite) { + throw new Error('jasmine.Suite() required'); + } + var spec = this; + spec.id = env.nextSpecId ? env.nextSpecId() : null; + spec.env = env; + spec.suite = suite; + spec.description = description; + spec.queue = new jasmine.Queue(env); + + spec.afterCallbacks = []; + spec.spies_ = []; + + spec.results_ = new jasmine.NestedResults(); + spec.results_.description = description; + spec.matchersClass = null; +}; + +jasmine.Spec.prototype.getFullName = function() { + return this.suite.getFullName() + ' ' + this.description + '.'; +}; + + +jasmine.Spec.prototype.results = function() { + return this.results_; +}; + +/** + * All parameters are pretty-printed and concatenated together, then written to the spec's output. + * + * Be careful not to leave calls to <code>jasmine.log</code> in production code. + */ +jasmine.Spec.prototype.log = function() { + return this.results_.log(arguments); +}; + +jasmine.Spec.prototype.runs = function (func) { + var block = new jasmine.Block(this.env, func, this); + this.addToQueue(block); + return this; +}; + +jasmine.Spec.prototype.addToQueue = function (block) { + if (this.queue.isRunning()) { + this.queue.insertNext(block); + } else { + this.queue.add(block); + } +}; + +/** + * @param {jasmine.ExpectationResult} result + */ +jasmine.Spec.prototype.addMatcherResult = function(result) { + this.results_.addResult(result); +}; + +jasmine.Spec.prototype.expect = function(actual) { + var positive = new (this.getMatchersClass_())(this.env, actual, this); + positive.not = new (this.getMatchersClass_())(this.env, actual, this, true); + return positive; +}; + +/** + * Waits a fixed time period before moving to the next block. + * + * @deprecated Use waitsFor() instead + * @param {Number} timeout milliseconds to wait + */ +jasmine.Spec.prototype.waits = function(timeout) { + var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this); + this.addToQueue(waitsFunc); + return this; +}; + +/** + * Waits for the latchFunction to return true before proceeding to the next block. + * + * @param {Function} latchFunction + * @param {String} optional_timeoutMessage + * @param {Number} optional_timeout + */ +jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { + var latchFunction_ = null; + var optional_timeoutMessage_ = null; + var optional_timeout_ = null; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + switch (typeof arg) { + case 'function': + latchFunction_ = arg; + break; + case 'string': + optional_timeoutMessage_ = arg; + break; + case 'number': + optional_timeout_ = arg; + break; + } + } + + var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this); + this.addToQueue(waitsForFunc); + return this; +}; + +jasmine.Spec.prototype.fail = function (e) { + var expectationResult = new jasmine.ExpectationResult({ + passed: false, + message: e ? jasmine.util.formatException(e) : 'Exception', + trace: { stack: e.stack } + }); + this.results_.addResult(expectationResult); +}; + +jasmine.Spec.prototype.getMatchersClass_ = function() { + return this.matchersClass || this.env.matchersClass; +}; + +jasmine.Spec.prototype.addMatchers = function(matchersPrototype) { + var parent = this.getMatchersClass_(); + var newMatchersClass = function() { + parent.apply(this, arguments); + }; + jasmine.util.inherit(newMatchersClass, parent); + jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass); + this.matchersClass = newMatchersClass; +}; + +jasmine.Spec.prototype.finishCallback = function() { + this.env.reporter.reportSpecResults(this); +}; + +jasmine.Spec.prototype.finish = function(onComplete) { + this.removeAllSpies(); + this.finishCallback(); + if (onComplete) { + onComplete(); + } +}; + +jasmine.Spec.prototype.after = function(doAfter) { + if (this.queue.isRunning()) { + this.queue.add(new jasmine.Block(this.env, doAfter, this)); + } else { + this.afterCallbacks.unshift(doAfter); + } +}; + +jasmine.Spec.prototype.execute = function(onComplete) { + var spec = this; + if (!spec.env.specFilter(spec)) { + spec.results_.skipped = true; + spec.finish(onComplete); + return; + } + + this.env.reporter.reportSpecStarting(this); + + spec.env.currentSpec = spec; + + spec.addBeforesAndAftersToQueue(); + + spec.queue.start(function () { + spec.finish(onComplete); + }); +}; + +jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() { + var runner = this.env.currentRunner(); + var i; + + for (var suite = this.suite; suite; suite = suite.parentSuite) { + for (i = 0; i < suite.before_.length; i++) { + this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this)); + } + } + for (i = 0; i < runner.before_.length; i++) { + this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this)); + } + for (i = 0; i < this.afterCallbacks.length; i++) { + this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this)); + } + for (suite = this.suite; suite; suite = suite.parentSuite) { + for (i = 0; i < suite.after_.length; i++) { + this.queue.add(new jasmine.Block(this.env, suite.after_[i], this)); + } + } + for (i = 0; i < runner.after_.length; i++) { + this.queue.add(new jasmine.Block(this.env, runner.after_[i], this)); + } +}; + +jasmine.Spec.prototype.explodes = function() { + throw 'explodes function should not have been called'; +}; + +jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) { + if (obj == jasmine.undefined) { + throw "spyOn could not find an object to spy upon for " + methodName + "()"; + } + + if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) { + throw methodName + '() method does not exist'; + } + + if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) { + throw new Error(methodName + ' has already been spied upon'); + } + + var spyObj = jasmine.createSpy(methodName); + + this.spies_.push(spyObj); + spyObj.baseObj = obj; + spyObj.methodName = methodName; + spyObj.originalValue = obj[methodName]; + + obj[methodName] = spyObj; + + return spyObj; +}; + +jasmine.Spec.prototype.removeAllSpies = function() { + for (var i = 0; i < this.spies_.length; i++) { + var spy = this.spies_[i]; + spy.baseObj[spy.methodName] = spy.originalValue; + } + this.spies_ = []; +}; + +/** + * Internal representation of a Jasmine suite. + * + * @constructor + * @param {jasmine.Env} env + * @param {String} description + * @param {Function} specDefinitions + * @param {jasmine.Suite} parentSuite + */ +jasmine.Suite = function(env, description, specDefinitions, parentSuite) { + var self = this; + self.id = env.nextSuiteId ? env.nextSuiteId() : null; + self.description = description; + self.queue = new jasmine.Queue(env); + self.parentSuite = parentSuite; + self.env = env; + self.before_ = []; + self.after_ = []; + self.children_ = []; + self.suites_ = []; + self.specs_ = []; +}; + +jasmine.Suite.prototype.getFullName = function() { + var fullName = this.description; + for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) { + fullName = parentSuite.description + ' ' + fullName; + } + return fullName; +}; + +jasmine.Suite.prototype.finish = function(onComplete) { + this.env.reporter.reportSuiteResults(this); + this.finished = true; + if (typeof(onComplete) == 'function') { + onComplete(); + } +}; + +jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) { + beforeEachFunction.typeName = 'beforeEach'; + this.before_.unshift(beforeEachFunction); +}; + +jasmine.Suite.prototype.afterEach = function(afterEachFunction) { + afterEachFunction.typeName = 'afterEach'; + this.after_.unshift(afterEachFunction); +}; + +jasmine.Suite.prototype.results = function() { + return this.queue.results(); +}; + +jasmine.Suite.prototype.add = function(suiteOrSpec) { + this.children_.push(suiteOrSpec); + if (suiteOrSpec instanceof jasmine.Suite) { + this.suites_.push(suiteOrSpec); + this.env.currentRunner().addSuite(suiteOrSpec); + } else { + this.specs_.push(suiteOrSpec); + } + this.queue.add(suiteOrSpec); +}; + +jasmine.Suite.prototype.specs = function() { + return this.specs_; +}; + +jasmine.Suite.prototype.suites = function() { + return this.suites_; +}; + +jasmine.Suite.prototype.children = function() { + return this.children_; +}; + +jasmine.Suite.prototype.execute = function(onComplete) { + var self = this; + this.queue.start(function () { + self.finish(onComplete); + }); +}; +jasmine.WaitsBlock = function(env, timeout, spec) { + this.timeout = timeout; + jasmine.Block.call(this, env, null, spec); +}; + +jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block); + +jasmine.WaitsBlock.prototype.execute = function (onComplete) { + if (jasmine.VERBOSE) { + this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...'); + } + this.env.setTimeout(function () { + onComplete(); + }, this.timeout); +}; +/** + * A block which waits for some condition to become true, with timeout. + * + * @constructor + * @extends jasmine.Block + * @param {jasmine.Env} env The Jasmine environment. + * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true. + * @param {Function} latchFunction A function which returns true when the desired condition has been met. + * @param {String} message The message to display if the desired condition hasn't been met within the given time period. + * @param {jasmine.Spec} spec The Jasmine spec. + */ +jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) { + this.timeout = timeout || env.defaultTimeoutInterval; + this.latchFunction = latchFunction; + this.message = message; + this.totalTimeSpentWaitingForLatch = 0; + jasmine.Block.call(this, env, null, spec); +}; +jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block); + +jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10; + +jasmine.WaitsForBlock.prototype.execute = function(onComplete) { + if (jasmine.VERBOSE) { + this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen')); + } + var latchFunctionResult; + try { + latchFunctionResult = this.latchFunction.apply(this.spec); + } catch (e) { + this.spec.fail(e); + onComplete(); + return; + } + + if (latchFunctionResult) { + onComplete(); + } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) { + var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen'); + this.spec.fail({ + name: 'timeout', + message: message + }); + + this.abort = true; + onComplete(); + } else { + this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT; + var self = this; + this.env.setTimeout(function() { + self.execute(onComplete); + }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT); + } +}; +// Mock setTimeout, clearTimeout +// Contributed by Pivotal Computer Systems, www.pivotalsf.com + +jasmine.FakeTimer = function() { + this.reset(); + + var self = this; + self.setTimeout = function(funcToCall, millis) { + self.timeoutsMade++; + self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false); + return self.timeoutsMade; + }; + + self.setInterval = function(funcToCall, millis) { + self.timeoutsMade++; + self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true); + return self.timeoutsMade; + }; + + self.clearTimeout = function(timeoutKey) { + self.scheduledFunctions[timeoutKey] = jasmine.undefined; + }; + + self.clearInterval = function(timeoutKey) { + self.scheduledFunctions[timeoutKey] = jasmine.undefined; + }; + +}; + +jasmine.FakeTimer.prototype.reset = function() { + this.timeoutsMade = 0; + this.scheduledFunctions = {}; + this.nowMillis = 0; +}; + +jasmine.FakeTimer.prototype.tick = function(millis) { + var oldMillis = this.nowMillis; + var newMillis = oldMillis + millis; + this.runFunctionsWithinRange(oldMillis, newMillis); + this.nowMillis = newMillis; +}; + +jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) { + var scheduledFunc; + var funcsToRun = []; + for (var timeoutKey in this.scheduledFunctions) { + scheduledFunc = this.scheduledFunctions[timeoutKey]; + if (scheduledFunc != jasmine.undefined && + scheduledFunc.runAtMillis >= oldMillis && + scheduledFunc.runAtMillis <= nowMillis) { + funcsToRun.push(scheduledFunc); + this.scheduledFunctions[timeoutKey] = jasmine.undefined; + } + } + + if (funcsToRun.length > 0) { + funcsToRun.sort(function(a, b) { + return a.runAtMillis - b.runAtMillis; + }); + for (var i = 0; i < funcsToRun.length; ++i) { + try { + var funcToRun = funcsToRun[i]; + this.nowMillis = funcToRun.runAtMillis; + funcToRun.funcToCall(); + if (funcToRun.recurring) { + this.scheduleFunction(funcToRun.timeoutKey, + funcToRun.funcToCall, + funcToRun.millis, + true); + } + } catch(e) { + var abcdef = 1 + } + } + this.runFunctionsWithinRange(oldMillis, nowMillis); + } +}; + +jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) { + this.scheduledFunctions[timeoutKey] = { + runAtMillis: this.nowMillis + millis, + funcToCall: funcToCall, + recurring: recurring, + timeoutKey: timeoutKey, + millis: millis + }; +}; + +/** + * @namespace + */ +jasmine.Clock = { + defaultFakeTimer: new jasmine.FakeTimer(), + + reset: function() { + jasmine.Clock.assertInstalled(); + jasmine.Clock.defaultFakeTimer.reset(); + }, + + tick: function(millis) { + jasmine.Clock.assertInstalled(); + jasmine.Clock.defaultFakeTimer.tick(millis); + }, + + runFunctionsWithinRange: function(oldMillis, nowMillis) { + jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis); + }, + + scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) { + jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring); + }, + + useMock: function() { + if (!jasmine.Clock.isInstalled()) { + var spec = jasmine.getEnv().currentSpec; + spec.after(jasmine.Clock.uninstallMock); + + jasmine.Clock.installMock(); + } + }, + + installMock: function() { + jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer; + }, + + uninstallMock: function() { + jasmine.Clock.assertInstalled(); + jasmine.Clock.installed = jasmine.Clock.real; + }, + + real: { + setTimeout: jasmine.getGlobal().setTimeout, + clearTimeout: jasmine.getGlobal().clearTimeout, + setInterval: jasmine.getGlobal().setInterval, + clearInterval: jasmine.getGlobal().clearInterval + }, + + assertInstalled: function() { + if (!jasmine.Clock.isInstalled()) { + throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); + } + }, + + isInstalled: function() { + return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer; + }, + + installed: null +}; +jasmine.Clock.installed = jasmine.Clock.real; + +//else for IE support +jasmine.getGlobal().setTimeout = function(funcToCall, millis) { + if (jasmine.Clock.installed.setTimeout.apply) { + return jasmine.Clock.installed.setTimeout.apply(this, arguments); + } else { + return jasmine.Clock.installed.setTimeout(funcToCall, millis); + } +}; + +jasmine.getGlobal().setInterval = function(funcToCall, millis) { + if (jasmine.Clock.installed.setInterval.apply) { + return jasmine.Clock.installed.setInterval.apply(this, arguments); + } else { + return jasmine.Clock.installed.setInterval(funcToCall, millis); + } +}; + +jasmine.getGlobal().clearTimeout = function(timeoutKey) { + if (jasmine.Clock.installed.clearTimeout.apply) { + return jasmine.Clock.installed.clearTimeout.apply(this, arguments); + } else { + return jasmine.Clock.installed.clearTimeout(timeoutKey); + } +}; + +jasmine.getGlobal().clearInterval = function(timeoutKey) { + if (jasmine.Clock.installed.clearTimeout.apply) { + return jasmine.Clock.installed.clearInterval.apply(this, arguments); + } else { + return jasmine.Clock.installed.clearInterval(timeoutKey); + } +}; + +jasmine.version_= { + "major": 1, + "minor": 1, + "build": 0, + "revision": 1308618948, + "release_candidate": 1 +}; diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine_favicon.png b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine_favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..218f3b43713598fa5a3e78b57aceb909c33f46df GIT binary patch literal 905 zcmV;419tq0P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006O% z3;baP00001b5ch_0Itp)=>Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_0008u zNkl<ZILoDyOGs2<7>3{fod28|PjmA)7fYg4w8-(2my9xtBGOs}K`n&t1VzxMO^X)M zrW+Ln1udc?q6<Y)(LD{L(i$z9GDpX9#xk86(;3g`=$!v=Q4><Qh@RE^!S}s<H-cYG zPPb2Azo}+-ds~O+{=K@3T5Mzx01UE}GQXm1#k8!<0s^k<iLv<AE4NQ-vEc~Dlkd*0 zeC=!0+CIIF9Xqk_MsCiuB8iI9)@|$ddOtKpf&*Rr(_nyKzjM)RvznaAI+_%P#Rc=y zoK7Q^Bw@{lbt|W5XJy~Idj0mcojbPMUFl}V7(`Ko-`CL=jcWaW8H~n9HO?8~061eP ztC;W3n3~}>TP)z5gAjt)P&D!M$+HJK<B4RQkQB9#>#x<`xnD030zwD?KrxxY!2tlA zGc-58?0D7SsT)7Km=v+tNVNUk`?s@;^OxCF)y6P}_mL;~7;S<@b|MzmKq)m8l@yky zT1~ECpxZw@64!nkI34QLiUsA%i%N>-$&zGYR7WJyi<ZzsSd9*3x(cB>9ERMyS(%kf z7A_r)X>!90&m(FwDQZ>q;+nOa*KR2+E6Fz)QwU=W1Oyo*4>_qlm|~joa|{4_A_3W8 z#FFZzRp-xMIx5a7D_Fj3&#r^TbIY@cND1d0f*^qDIs{!pw!IWGQ_%l4#ASm_D5Vet z0%ek7^)@xPihX_G0&hIc9*14ca=D!8oG}vW?H%~w^F?f_s>zU|fKrNJXJ_d6{v!t( zpEoqMws_yQws>3o?VW8Txq~#->dJG^ELW5irR!s`(_JvD^6;r+ho~eIK@ia8_lH(h zt*-p?CFC1_h2MV=?jP){uW!7WjLjCaO&c1D+tf582!XEaoB#xWAYcN5f$sLtf$koW zQs{{>)ZTq?FC6|J_%n}AWbiFK(Bo-%^-{H`*)E(ucjo-r%SYm)W5f6tN=xz=S646E fNXW#U{x?4WXWJ<z_BK4B00000NkvXXu0mjfP&k;h literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/json2.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/json2.js new file mode 100644 index 0000000..ae22a41 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/lib/json2.js @@ -0,0 +1,481 @@ +/* + http://www.JSON.org/json2.js + 2009-08-17 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + See http://www.JSON.org/js.html + + This file creates a global JSON object containing two methods: stringify + and parse. + + JSON.stringify(value, replacer, space) + value any JavaScript value, usually an object or array. + + replacer an optional parameter that determines how object + values are stringified for objects. It can be a + function or an array of strings. + + space an optional parameter that specifies the indentation + of nested structures. If it is omitted, the text will + be packed without extra whitespace. If it is a number, + it will specify the number of spaces to indent at each + level. If it is a string (such as '\t' or ' '), + it contains the characters used to indent at each level. + + This method produces a JSON text from a JavaScript value. + + When an object value is found, if the object contains a toJSON + method, its toJSON method will be called and the result will be + stringified. A toJSON method does not serialize: it returns the + value represented by the name/value pair that should be serialized, + or undefined if nothing should be serialized. The toJSON method + will be passed the key associated with the value, and this will be + bound to the value + + For example, this would serialize Dates as ISO strings. + + Date.prototype.toJSON = function (key) { + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + return this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z'; + }; + + You can provide an optional replacer method. It will be passed the + key and value of each member, with this bound to the containing + object. The value that is returned from your method will be + serialized. If your method returns undefined, then the member will + be excluded from the serialization. + + If the replacer parameter is an array of strings, then it will be + used to select the members to be serialized. It filters the results + such that only members with keys listed in the replacer array are + stringified. + + Values that do not have JSON representations, such as undefined or + functions, will not be serialized. Such values in objects will be + dropped; in arrays they will be replaced with null. You can use + a replacer function to replace those with JSON values. + JSON.stringify(undefined) returns undefined. + + The optional space parameter produces a stringification of the + value that is filled with line breaks and indentation to make it + easier to read. + + If the space parameter is a non-empty string, then that string will + be used for indentation. If the space parameter is a number, then + the indentation will be that many spaces. + + Example: + + text = JSON.stringify(['e', {pluribus: 'unum'}]); + // text is '["e",{"pluribus":"unum"}]' + + + text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); + // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' + + text = JSON.stringify([new Date()], function (key, value) { + return this[key] instanceof Date ? + 'Date(' + this[key] + ')' : value; + }); + // text is '["Date(---current time---)"]' + + + JSON.parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = JSON.parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { + var d; + if (typeof value === 'string' && + value.slice(0, 5) === 'Date(' && + value.slice(-1) === ')') { + d = new Date(value.slice(5, -1)); + if (d) { + return d; + } + } + return value; + }); + + + This is a reference implementation. You are free to copy, modify, or + redistribute. + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. +*/ + +/*jslint evil: true */ + +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, + call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, + getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, + lastIndex, length, parse, prototype, push, replace, slice, stringify, + test, toJSON, toString, valueOf +*/ + +"use strict"; + +// Create a JSON object only if one does not already exist. We create the +// methods in a closure to avoid creating global variables. + +if (!this.JSON) { + this.JSON = {}; +} + +(function () { + function evil(fn){ + var FN = Function; + return new FN('return' + fn)(); + } + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + if (typeof Date.prototype.toJSON !== 'function') { + + Date.prototype.toJSON = function (key) { + + return isFinite(this.valueOf()) ? + this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z' : null; + }; + + String.prototype.toJSON = + Number.prototype.toJSON = + Boolean.prototype.toJSON = function (key) { + return this.valueOf(); + }; + } + + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + + + function quote(string) { + +// If the string contains no control characters, no quote characters, and no +// backslash characters, then we can safely slap some quotes around it. +// Otherwise we must also replace the offending characters with safe escape +// sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? + '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : + '"' + string + '"'; + } + + + function str(key, holder) { +// Produce a string from holder[key]. + + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + +// If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + +// If we were called with a replacer function, then call the replacer to +// obtain a replacement value. + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + +// What happens next depends on the value's type. + + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + +// JSON numbers must be finite. Encode non-finite numbers as null. + + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + +// If the value is a boolean or null, convert it to a string. Note: +// typeof null does not produce 'null'. The case is included here in +// the remote chance that this gets fixed someday. + + return String(value); + +// If the type is 'object', we might be dealing with an object or an array or +// null. + + case 'object': + +// Due to a specification blunder in ECMAScript, typeof null is 'object', +// so watch out for that case. + + if (!value) { + return 'null'; + } + +// Make an array to hold the partial results of stringifying this object value. + + gap += indent; + partial = []; + +// Is the value an array? + + if (Object.prototype.toString.apply(value) === '[object Array]') { + +// The value is an array. Stringify every element. Use null as a placeholder +// for non-JSON values. + + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + +// Join all of the elements together, separated with commas, and wrap them in +// brackets. + + v = partial.length === 0 ? '[]' : + gap ? '[\n' + gap + + partial.join(',\n' + gap) + '\n' + + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + +// If the replacer is an array, use it to select the members to be stringified. + + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { + +// Otherwise, iterate through all of the keys in the object. + + for (k in value) { + if (Object.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + +// Join all of the member texts together, separated with commas, +// and wrap them in braces. + + v = partial.length === 0 ? '{}' : + gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + + mind + '}' : '{' + partial.join(',') + '}'; + gap = mind; + return v; + } + } + +// If the JSON object does not yet have a stringify method, give it one. + + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { +// The stringify method takes a value and an optional replacer, and an optional +// space parameter, and returns a JSON text. The replacer can be a function +// that can replace values, or an array of strings that will select the keys. +// A default replacer method can be provided. Use of the space parameter can +// produce text that is more easily readable. + + var i; + gap = ''; + indent = ''; + +// If the space parameter is a number, make an indent string containing that +// many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + +// If the space parameter is a string, it will be used as the indent string. + + } else if (typeof space === 'string') { + indent = space; + } + +// If there is a replacer, it must be a function or an array. +// Otherwise, throw an error. + + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + +// Make a fake root object containing our value under the key of ''. +// Return the result of stringifying the value. + + return str('', {'': value}); + }; + } + + +// If the JSON object does not yet have a parse method, give it one. + + if (typeof JSON.parse !== 'function') { + JSON.parse = function (text, reviver) { + +// The parse method takes a text and an optional reviver function, and returns +// a JavaScript value if the text is a valid JSON text. + + var j; + + function walk(holder, key) { + +// The walk method is used to recursively walk the resulting structure so +// that modifications can be made. + + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + } + + +// Parsing happens in four stages. In the first stage, we replace certain +// Unicode characters with escape sequences. JavaScript handles many characters +// incorrectly, either silently deleting them, or treating them as line endings. + + cx.lastIndex = 0; + if (cx.test(text)) { + text = text.replace(cx, function (a) { + return '\\u' + + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }); + } + +// In the second stage, we run the text against regular expressions that look +// for non-JSON patterns. We are especially concerned with '()' and 'new' +// because they can cause invocation, and '=' because it can cause mutation. +// But just to be safe, we want to reject all unexpected forms. + +// We split the second stage into 4 regexp operations in order to work around +// crippling inefficiencies in IE's and Safari's regexp engines. First we +// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we +// replace all simple value tokens with ']' characters. Third, we delete all +// open brackets that follow a colon or comma or that begin the text. Finally, +// we look to see that the remaining characters are only whitespace or ']' or +// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. + + if (/^[\],:{}\s]*$/. +test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). +replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). +replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { + +// In the third stage we use the eval function to compile the text into a +// JavaScript structure. The '{' operator is subject to a syntactic ambiguity +// in JavaScript: it can begin a block or an object literal. We wrap the text +// in parens to eliminate the ambiguity. + + j = evil('(' + text + ')'); + +// In the optional fourth stage, we recursively walk the new structure, passing +// each name/value pair to a reviver function for possible transformation. + + return typeof reviver === 'function' ? + walk({'': j}, '') : j; + } + +// If the text is not JSON parseable, then a SyntaxError is thrown. + + throw new SyntaxError('JSON.parse'); + }; + } +}()); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-array.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-array.js new file mode 100644 index 0000000..3a44f31 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-array.js @@ -0,0 +1,1223 @@ +describe('Array', function() { + var testSubject; + beforeEach(function() { + testSubject = [2, 3, undefined, true, 'hej', null, false, 0]; + delete testSubject[1]; + }); + function createArrayLikeFromArray(arr) { + var o = {}; + Array.prototype.forEach.call(arr, function(e, i) { + o[i]=e; + }); + o.length = arr.length; + return o; + }; + + describe('forEach', function() { + "use strict"; + var expected, actual; + + beforeEach(function() { + expected = {0:2, 2: undefined, 3:true, 4: 'hej', 5:null, 6:false, 7:0 }; + actual = {}; + }); + it('should pass the right parameters', function() { + var callback = jasmine.createSpy('callback'), + array = ['1']; + array.forEach(callback); + expect(callback).toHaveBeenCalledWith('1', 0, array); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = [1,2,3], + i = 0; + arr.forEach(function(a) { + i++; + arr.push(a+3); + }); + expect(arr).toEqual([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + + it('should set the right context when given none', function() { + var context; + [1].forEach(function() {context = this;}); + expect(context).toBe(function() {return this}.call()); + }); + it('should iterate all', function() { + testSubject.forEach(function(obj, index) { + actual[index] = obj; + }); + expect(actual).toExactlyMatch(expected); + }); + it('should iterate all using a context', function() { + var o = { a: actual }; + + testSubject.forEach(function(obj, index) { + this.a[index] = obj; + }, o); + expect(actual).toExactlyMatch(expected); + }); + + it('should iterate all in an array-like object', function() { + var ts = createArrayLikeFromArray(testSubject); + Array.prototype.forEach.call(ts, function(obj, index) { + actual[index] = obj; + }); + expect(actual).toExactlyMatch(expected); + }); + it('should iterate all in an array-like object using a context', function() { + var ts = createArrayLikeFromArray(testSubject), + o = { a: actual }; + + Array.prototype.forEach.call(ts, function(obj, index) { + this.a[index] = obj; + }, o); + expect(actual).toExactlyMatch(expected); + }); + + describe('strings', function() { + var str = 'Hello, World!', + toString = Object.prototype.toString; + it('should iterate all in a string', function() { + actual = []; + Array.prototype.forEach.call(str, function(item, index) { + actual[index] = item; + }); + expect(actual).toExactlyMatch(str.split('')); + }); + it('should iterate all in a string using a context', function() { + actual = []; + var o = { a: actual }; + Array.prototype.forEach.call(str, function(item, index) { + this.a[index] = item; + }, o); + expect(actual).toExactlyMatch(str.split('')); + }); + it('should have String object for third argument of callback', function() { + Array.prototype.forEach.call(str, function(item, index, obj) { + actual = obj; + }); + expect(typeof actual).toBe("object"); + expect(toString.call(actual)).toBe("[object String]"); + }); + }); + }); + describe('some', function() { + var actual, expected, numberOfRuns; + + beforeEach(function() { + expected = {0:2, 2: undefined, 3:true }; + actual = {}; + numberOfRuns = 0; + }); + + it('should pass the correct values along to the callback', function() { + var callback = jasmine.createSpy('callback'); + var array = ['1']; + array.some(callback); + expect(callback).toHaveBeenCalledWith('1', 0, array); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = [1,2,3], + i = 0; + arr.some(function(a) { + i++; + arr.push(a+3); + return i > 3; + }); + expect(arr).toEqual([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + it('should set the right context when given none', function() { + var context; + [1].some(function() {context = this;}); + expect(context).toBe(function() {return this}.call()); + }); + + it('should return false if it runs to the end', function() { + actual = testSubject.some(function() {}); + expect(actual).toBeFalsy(); + }); + it('should return true if it is stopped somewhere', function() { + actual = testSubject.some(function() { return true; }); + expect(actual).toBeTruthy(); + }); + it('should return false if there are no elements', function() { + actual = [].some(function() { return true; }); + expect(actual).toBeFalsy(); + }); + + it('should stop after 3 elements', function() { + testSubject.some(function(obj, index) { + actual[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return true; + } + return false; + }); + expect(actual).toExactlyMatch(expected); + }); + it('should stop after 3 elements using a context', function() { + var o = { a: actual }; + testSubject.some(function(obj, index) { + this.a[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return true; + } + return false; + }, o); + expect(actual).toExactlyMatch(expected); + }); + + it('should stop after 3 elements in an array-like object', function() { + var ts = createArrayLikeFromArray(testSubject); + Array.prototype.some.call(ts, function(obj, index) { + actual[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return true; + } + return false; + }); + expect(actual).toExactlyMatch(expected); + }); + it('should stop after 3 elements in an array-like object using a context', function() { + var ts = createArrayLikeFromArray(testSubject); + var o = { a: actual }; + Array.prototype.some.call(ts, function(obj, index) { + this.a[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return true; + } + return false; + }, o); + expect(actual).toExactlyMatch(expected); + }); + }); + describe('every', function() { + var actual, expected, numberOfRuns; + + beforeEach(function() { + expected = {0:2, 2: undefined, 3:true }; + actual = {}; + numberOfRuns = 0; + }); + + it('should pass the correct values along to the callback', function() { + var callback = jasmine.createSpy('callback'); + var array = ['1']; + array.every(callback); + expect(callback).toHaveBeenCalledWith('1', 0, array); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = [1,2,3], + i = 0; + arr.every(function(a) { + i++; + arr.push(a+3); + return i <= 3; + }); + expect(arr).toEqual([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + it('should set the right context when given none', function() { + var context; + [1].every(function() {context = this;}); + expect(context).toBe(function() {return this}.call()); + }); + + it('should return true if the array is empty', function() { + actual = [].every(function() { return true; }); + expect(actual).toBeTruthy(); + + actual = [].every(function() { return false; }); + expect(actual).toBeTruthy(); + }); + it('should return true if it runs to the end', function() { + actual = [1,2,3].every(function() { return true; }); + expect(actual).toBeTruthy(); + }); + it('should return false if it is stopped before the end', function() { + actual = [1,2,3].every(function() { return false; }); + expect(actual).toBeFalsy(); + }); + + it('should return after 3 elements', function() { + testSubject.every(function(obj, index) { + actual[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return false; + } + return true; + }); + expect(actual).toExactlyMatch(expected); + }); + it('should stop after 3 elements using a context', function() { + var o = { a: actual }; + testSubject.every(function(obj, index) { + this.a[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return false; + } + return true; + }, o); + expect(actual).toExactlyMatch(expected); + }); + + it('should stop after 3 elements in an array-like object', function() { + var ts = createArrayLikeFromArray(testSubject); + Array.prototype.every.call(ts, function(obj, index) { + actual[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return false; + } + return true; + }); + expect(actual).toExactlyMatch(expected); + }); + it('should stop after 3 elements in an array-like object using a context', function() { + var ts = createArrayLikeFromArray(testSubject); + var o = { a: actual }; + Array.prototype.every.call(ts, function(obj, index) { + this.a[index] = obj; + numberOfRuns += 1; + if(numberOfRuns == 3) { + return false; + } + return true; + }, o); + expect(actual).toExactlyMatch(expected); + }); + }); + + describe('indexOf', function() { + "use strict"; + var actual, expected, testSubject; + + beforeEach(function() { + testSubject = [2, 3, undefined, true, 'hej', null, 2, false, 0]; + delete testSubject[1]; + + }); + + it('should find the element', function() { + expected = 4; + actual = testSubject.indexOf('hej'); + expect(actual).toEqual(expected); + }); + it('should not find the element', function() { + expected = -1; + actual = testSubject.indexOf('mus'); + expect(actual).toEqual(expected); + }); + it('should find undefined as well', function() { + expected = -1; + actual = testSubject.indexOf(undefined); + expect(actual).not.toEqual(expected); + }); + it('should skip unset indexes', function() { + expected = 2; + actual = testSubject.indexOf(undefined); + expect(actual).toEqual(expected); + }); + it('should use a strict test', function() { + actual = testSubject.indexOf(null); + expect(actual).toEqual(5); + + actual = testSubject.indexOf('2'); + expect(actual).toEqual(-1); + }); + it('should skip the first if fromIndex is set', function() { + expect(testSubject.indexOf(2, 2)).toEqual(6); + expect(testSubject.indexOf(2, 0)).toEqual(0); + expect(testSubject.indexOf(2, 6)).toEqual(6); + }); + it('should work with negative fromIndex', function() { + expect(testSubject.indexOf(2, -3)).toEqual(6); + expect(testSubject.indexOf(2, -9)).toEqual(0); + }); + it('should work with fromIndex being greater than the length', function() { + expect(testSubject.indexOf(0, 20)).toEqual(-1); + }); + it('should work with fromIndex being negative and greater than the length', function() { + expect(testSubject.indexOf('hej', -20)).toEqual(4); + }); + + describe('Array-like', function ArrayLike() { + var indexOf = Array.prototype.indexOf, + testAL; + beforeEach(function beforeEach() { + testAL = {}; + testSubject = [2, 3, undefined, true, 'hej', null, 2, false, 0]; + testSubject.forEach(function (o,i) { + testAL[i] = o; + }); + testAL.length = testSubject.length; + }); + it('should find the element (array-like)', function() { + expected = 4; + actual = indexOf.call(testAL, 'hej'); + expect(actual).toEqual(expected); + }); + it('should not find the element (array-like)', function() { + expected = -1; + actual = indexOf.call(testAL, 'mus'); + expect(actual).toEqual(expected); + }); + it('should find undefined as well (array-like)', function() { + expected = -1; + actual = indexOf.call(testAL, undefined); + expect(actual).not.toEqual(expected); + }); + it('should skip unset indexes (array-like)', function() { + expected = 2; + actual = indexOf.call(testAL, undefined); + expect(actual).toEqual(expected); + }); + it('should use a strict test (array-like)', function() { + actual = Array.prototype.indexOf.call(testAL, null); + expect(actual).toEqual(5); + + actual = Array.prototype.indexOf.call(testAL, '2'); + expect(actual).toEqual(-1); + }); + it('should skip the first if fromIndex is set (array-like)', function() { + expect(indexOf.call(testAL, 2, 2)).toEqual(6); + expect(indexOf.call(testAL, 2, 0)).toEqual(0); + expect(indexOf.call(testAL, 2, 6)).toEqual(6); + }); + it('should work with negative fromIndex (array-like)', function() { + expect(indexOf.call(testAL, 2, -3)).toEqual(6); + expect(indexOf.call(testAL, 2, -9)).toEqual(0); + }); + it('should work with fromIndex being greater than the length (array-like)', function() { + expect(indexOf.call(testAL, 0, 20)).toEqual(-1); + }); + it('should work with fromIndex being negative and greater than the length (array-like)', function() { + expect(indexOf.call(testAL, 'hej', -20)).toEqual(4); + }); + }); + }); + describe('lastIndexOf', function() { + "use strict"; + var actual, expected, testSubject, testAL; + + beforeEach(function() { + testSubject = [2, 3, undefined, true, 'hej', null, 2, 3, false, 0]; + delete testSubject[1]; + delete testSubject[7]; + }); + describe('Array', function() { + it('should find the element', function() { + expected = 4; + actual = testSubject.lastIndexOf('hej'); + expect(actual).toEqual(expected); + }); + it('should not find the element', function() { + expected = -1; + actual = testSubject.lastIndexOf('mus'); + expect(actual).toEqual(expected); + }); + it('should find undefined as well', function() { + expected = -1; + actual = testSubject.lastIndexOf(undefined); + expect(actual).not.toEqual(expected); + }); + it('should skip unset indexes', function() { + expected = 2; + actual = testSubject.lastIndexOf(undefined); + expect(actual).toEqual(expected); + }); + it('should use a strict test', function() { + actual = testSubject.lastIndexOf(null); + expect(actual).toEqual(5); + + actual = testSubject.lastIndexOf('2'); + expect(actual).toEqual(-1); + }); + it('should skip the first if fromIndex is set', function() { + expect(testSubject.lastIndexOf(2, 2)).toEqual(0); + expect(testSubject.lastIndexOf(2, 0)).toEqual(0); + expect(testSubject.lastIndexOf(2, 6)).toEqual(6); + }); + it('should work with negative fromIndex', function() { + expect(testSubject.lastIndexOf(2, -3)).toEqual(6); + expect(testSubject.lastIndexOf(2, -9)).toEqual(0); + }); + it('should work with fromIndex being greater than the length', function() { + expect(testSubject.lastIndexOf(2, 20)).toEqual(6); + }); + it('should work with fromIndex being negative and greater than the length', function() { + expect(testSubject.lastIndexOf(2, -20)).toEqual(-1); + }); + }); + + describe('Array like', function() { + var lastIndexOf = Array.prototype.lastIndexOf, + testAL; + beforeEach(function() { + testAL = {}; + testSubject.forEach(function (o,i) { + testAL[i] = o; + }); + testAL.length = testSubject.length; + }); + it('should find the element (array-like)', function() { + expected = 4; + actual = lastIndexOf.call(testAL, 'hej'); + expect(actual).toEqual(expected); + }); + it('should not find the element (array-like)', function() { + expected = -1; + actual = lastIndexOf.call(testAL, 'mus'); + expect(actual).toEqual(expected); + }); + it('should find undefined as well (array-like)', function() { + expected = -1; + actual = lastIndexOf.call(testAL, undefined); + expect(actual).not.toEqual(expected); + }); + it('should skip unset indexes (array-like)', function() { + expected = 2; + actual = lastIndexOf.call(testAL, undefined); + expect(actual).toEqual(expected); + }); + it('should use a strict test (array-like)', function() { + actual = lastIndexOf.call(testAL, null); + expect(actual).toEqual(5); + + actual = lastIndexOf.call(testAL, '2'); + expect(actual).toEqual(-1); + }); + it('should skip the first if fromIndex is set', function() { + expect(lastIndexOf.call(testAL, 2, 2)).toEqual(0); + expect(lastIndexOf.call(testAL, 2, 0)).toEqual(0); + expect(lastIndexOf.call(testAL, 2, 6)).toEqual(6); + }); + it('should work with negative fromIndex', function() { + expect(lastIndexOf.call(testAL, 2, -3)).toEqual(6); + expect(lastIndexOf.call(testAL, 2, -9)).toEqual(0); + }); + it('should work with fromIndex being greater than the length', function() { + expect(lastIndexOf.call(testAL, 2, 20)).toEqual(6); + }); + it('should work with fromIndex being negative and greater than the length', function() { + expect(lastIndexOf.call(testAL, 2, -20)).toEqual(-1); + }); + }); + }); + + describe('filter', function() { + var filteredArray, + callback = function callback(o, i, arr) { + return ( + i != 3 && i != 5 + ); + }; + + beforeEach(function() { + testSubject = [2, 3, undefined, true, 'hej', 3, null, false, 0]; + delete testSubject[1]; + filteredArray = [2, undefined, 'hej', null, false, 0]; + }); + describe('Array object', function() { + + it('should call the callback with the proper arguments', function() { + var callback = jasmine.createSpy('callback'), + arr = ['1']; + arr.filter(callback); + expect(callback).toHaveBeenCalledWith('1', 0, arr); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = [1,2,3], + i = 0; + arr.filter(function(a) { + i++; + if(i <= 4) { + arr.push(a+3); + } + return true; + }); + expect(arr).toEqual([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + it('should skip non-set values', function() { + var passedValues = {}; + testSubject = [1,2,3,4]; + delete testSubject[1]; + testSubject.filter(function(o, i) { + passedValues[i] = o; + return true; + }); + expect(passedValues).toExactlyMatch(testSubject); + }); + it('should pass the right context to the filter', function() { + var passedValues = {}; + testSubject = [1,2,3,4]; + delete testSubject[1]; + testSubject.filter(function(o, i) { + this[i] = o; + return true; + }, passedValues); + expect(passedValues).toExactlyMatch(testSubject); + }); + it('should set the right context when given none', function() { + var context; + [1].filter(function() {context = this;}); + expect(context).toBe(function() {return this}.call()); + }); + it('should remove only the values for which the callback returns false', function() { + var result = testSubject.filter(callback); + expect(result).toExactlyMatch(filteredArray); + }); + it('should leave the original array untouched', function() { + var copy = testSubject.slice(); + testSubject.filter(callback); + expect(testSubject).toExactlyMatch(copy); + }); + it('should not be affected by same-index mutation', function () { + var results = [1, 2, 3] + .filter(function (value, index, array) { + array[index] = 'a'; + return true; + }); + expect(results).toEqual([1, 2, 3]); + }); + }); + describe('Array like', function() { + beforeEach(function() { + testSubject = createArrayLikeFromArray(testSubject); + }); + it('should call the callback with the proper arguments', function() { + var callback = jasmine.createSpy('callback'), + arr = createArrayLikeFromArray(['1']); + Array.prototype.filter.call(arr, callback); + expect(callback).toHaveBeenCalledWith('1', 0, arr); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = createArrayLikeFromArray([1,2,3]), + i = 0; + Array.prototype.filter.call(arr, function(a) { + i++; + if(i <= 4) { + arr[i+2] = a+3; + } + return true; + }); + delete arr.length; + expect(arr).toExactlyMatch([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + it('should skip non-set values', function() { + var passedValues = {}; + testSubject = createArrayLikeFromArray([1,2,3,4]); + delete testSubject[1]; + Array.prototype.filter.call(testSubject, function(o, i) { + passedValues[i] = o; + return true; + }); + delete testSubject.length; + expect(passedValues).toExactlyMatch(testSubject); + }); + it('should set the right context when given none', function() { + var context; + Array.prototype.filter.call(createArrayLikeFromArray([1]), function() {context = this;}, undefined); + expect(context).toBe(function() {return this}.call()); + }); + it('should pass the right context to the filter', function() { + var passedValues = {}; + testSubject = createArrayLikeFromArray([1,2,3,4]); + delete testSubject[1]; + Array.prototype.filter.call(testSubject, function(o, i) { + this[i] = o; + return true; + }, passedValues); + delete testSubject.length; + expect(passedValues).toExactlyMatch(testSubject); + }); + it('should remove only the values for which the callback returns false', function() { + var result = Array.prototype.filter.call(testSubject, callback); + expect(result).toExactlyMatch(filteredArray); + }); + it('should leave the original array untouched', function() { + var copy = createArrayLikeFromArray(testSubject); + Array.prototype.filter.call(testSubject, callback); + expect(testSubject).toExactlyMatch(copy); + }); + }); + }); + describe('map', function() { + var callback; + beforeEach(function() { + var i = 0; + callback = function() { + return i++; + }; + }); + describe('Array object', function() { + it('should call callback with the right parameters', function() { + var callback = jasmine.createSpy('callback'), + array = [1]; + array.map(callback); + expect(callback).toHaveBeenCalledWith(1, 0, array); + }); + it('should set the context correctly', function() { + var context = {}; + testSubject.map(function(o,i) { + this[i] = o; + }, context); + expect(context).toExactlyMatch(testSubject); + }); + it('should set the right context when given none', function() { + var context; + [1].map(function() {context = this;}); + expect(context).toBe(function() {return this}.call()); + }); + it('should not change the array it is called on', function() { + var copy = testSubject.slice(); + testSubject.map(callback); + expect(testSubject).toExactlyMatch(copy); + }); + it('should only run for the number of objects in the array when it started', function() { + var arr = [1,2,3], + i = 0; + arr.map(function(o) { + arr.push(o+3); + i++; + return o; + }); + expect(arr).toExactlyMatch([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + it('should properly translate the values as according to the callback', function() { + var result = testSubject.map(callback), + expected = [0,0,1,2,3,4,5,6]; + delete expected[1]; + expect(result).toExactlyMatch(expected); + }); + it('should skip non-existing values', function() { + var array = [1,2,3,4], + i = 0; + delete array[2]; + array.map(function() { + i++; + }); + expect(i).toBe(3); + }); + }); + describe('Array-like', function() { + beforeEach(function() { + testSubject = createArrayLikeFromArray(testSubject); + }); + it('should call callback with the right parameters', function() { + var callback = jasmine.createSpy('callback'), + array = createArrayLikeFromArray([1]); + Array.prototype.map.call(array, callback); + expect(callback).toHaveBeenCalledWith(1, 0, array); + }); + it('should set the context correctly', function() { + var context = {}; + Array.prototype.map.call(testSubject, function(o,i) { + this[i] = o; + }, context); + delete testSubject.length; + expect(context).toExactlyMatch(testSubject); + }); + it('should set the right context when given none', function() { + var context; + Array.prototype.map.call(createArrayLikeFromArray([1]), function() {context = this;}); + expect(context).toBe(function() {return this}.call()); + }); + it('should not change the array it is called on', function() { + var copy = createArrayLikeFromArray(testSubject); + Array.prototype.map.call(testSubject, callback); + expect(testSubject).toExactlyMatch(copy); + }); + it('should only run for the number of objects in the array when it started', function() { + var arr = createArrayLikeFromArray([1,2,3]), + i = 0; + Array.prototype.map.call(arr, function(o) { + Array.prototype.push.call(arr, o+3); + i++; + return o; + }); + delete arr.length; + expect(arr).toExactlyMatch([1,2,3,4,5,6]); + expect(i).toBe(3); + }); + it('should properly translate the values as according to the callback', function() { + var result = Array.prototype.map.call(testSubject, callback), + expected = [0,0,1,2,3,4,5,6]; + delete expected[1]; + expect(result).toExactlyMatch(expected); + }); + it('should skip non-existing values', function() { + var array = createArrayLikeFromArray([1,2,3,4]), + i = 0; + delete array[2]; + Array.prototype.map.call(array, function() { + i++; + }); + expect(i).toBe(3); + }); + }); + }); + + describe('reduce', function() { + beforeEach(function() { + testSubject = [1,2,3]; + }); + + describe('Array', function() { + it('should pass the correct arguments to the callback', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduce(spy); + expect(spy.calls[0].args).toExactlyMatch([1, 2, 1, testSubject]); + }); + it('should start with the right initialValue', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduce(spy, 0); + expect(spy.calls[0].args).toExactlyMatch([0, 1, 0, testSubject]); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = [1,2,3], + i = 0; + arr.reduce(function(a, b) { + i++; + if(i <= 4) { + arr.push(a+3); + }; + return b; + }); + expect(arr).toEqual([1,2,3,4,5]); + expect(i).toBe(2); + }); + it('should work as expected for empty arrays', function() { + var spy = jasmine.createSpy(); + expect(function() { + [].reduce(spy); + }).toThrow(); + expect(spy).not.toHaveBeenCalled(); + }); + it('should throw correctly if no callback is given', function() { + expect(function() { + testSubject.reduce(); + }).toThrow(); + }); + it('should return the expected result', function() { + expect(testSubject.reduce(function(a,b) { + return (a||'').toString()+(b||'').toString(); + })).toEqual(testSubject.join('')); + }); + it('should not directly affect the passed array', function() { + var copy = testSubject.slice(); + testSubject.reduce(function(a,b) { + return a+b; + }); + expect(testSubject).toEqual(copy); + }); + it('should skip non-set values', function() { + delete testSubject[1]; + var visited = {}; + testSubject.reduce(function(a,b) { + if(a) + visited[a] = true; + if(b) + visited[b] = true; + return 0; + }); + + expect(visited).toEqual({ '1': true, '3': true }); + }); + it('should have the right length', function() { + expect(testSubject.reduce.length).toBe(1); + }); + }); + describe('Array-like objects', function() { + beforeEach(function() { + testSubject = createArrayLikeFromArray(testSubject); + testSubject.reduce = Array.prototype.reduce; + }); + it('should pass the correct arguments to the callback', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduce(spy); + expect(spy.calls[0].args).toExactlyMatch([1, 2, 1, testSubject]); + }); + it('should start with the right initialValue', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduce(spy, 0); + expect(spy.calls[0].args).toExactlyMatch([0, 1, 0, testSubject]); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = createArrayLikeFromArray([1,2,3]), + i = 0; + Array.prototype.reduce.call(arr, function(a, b) { + i++; + if(i <= 4) { + arr[i+2] = a+3; + }; + return b; + }); + expect(arr).toEqual({ + 0: 1, + 1: 2, + 2: 3, + 3: 4, + 4: 5, + length: 3 + }); + expect(i).toBe(2); + }); + it('should work as expected for empty arrays', function() { + var spy = jasmine.createSpy(); + expect(function() { + Array.prototype.reduce.call({length: 0}, spy); + }).toThrow(); + expect(spy).not.toHaveBeenCalled(); + }); + it('should throw correctly if no callback is given', function() { + expect(function() { + testSubject.reduce(); + }).toThrow(); + }); + it('should return the expected result', function() { + expect(testSubject.reduce(function(a,b) { + return (a||'').toString()+(b||'').toString(); + })).toEqual('123'); + }); + it('should not directly affect the passed array', function() { + var copy = createArrayLikeFromArray(testSubject); + testSubject.reduce(function(a,b) { + return a+b; + }); + delete(testSubject.reduce); + expect(testSubject).toEqual(copy); + }); + it('should skip non-set values', function() { + delete testSubject[1]; + var visited = {}; + testSubject.reduce(function(a,b) { + if(a) + visited[a] = true; + if(b) + visited[b] = true; + return 0; + }); + + expect(visited).toEqual({ '1': true, '3': true }); + }); + it('should have the right length', function() { + expect(testSubject.reduce.length).toBe(1); + }); + }); + }); + describe('reduceRight', function() { + beforeEach(function() { + testSubject = [1,2,3]; + }); + + describe('Array', function() { + it('should pass the correct arguments to the callback', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduceRight(spy); + expect(spy.calls[0].args).toExactlyMatch([3, 2, 1, testSubject]); + }); + it('should start with the right initialValue', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduceRight(spy, 0); + expect(spy.calls[0].args).toExactlyMatch([0, 3, 2, testSubject]); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = [1,2,3], + i = 0; + arr.reduceRight(function(a, b) { + i++; + if(i <= 4) { + arr.push(a+3); + }; + return b; + }); + expect(arr).toEqual([1,2,3,6,5]); + expect(i).toBe(2); + }); + it('should work as expected for empty arrays', function() { + var spy = jasmine.createSpy(); + expect(function() { + [].reduceRight(spy); + }).toThrow(); + expect(spy).not.toHaveBeenCalled(); + }); + it('should work as expected for empty arrays with an initial value', function() { + var spy = jasmine.createSpy(), + result; + + result = [].reduceRight(spy, ''); + expect(spy).not.toHaveBeenCalled(); + expect(result).toBe(''); + }); + it('should throw correctly if no callback is given', function() { + expect(function() { + testSubject.reduceRight(); + }).toThrow(); + }); + it('should return the expected result', function() { + expect(testSubject.reduceRight(function(a,b) { + return (a||'').toString()+(b||'').toString(); + })).toEqual('321'); + }); + it('should not directly affect the passed array', function() { + var copy = testSubject.slice(); + testSubject.reduceRight(function(a,b) { + return a+b; + }); + expect(testSubject).toEqual(copy); + }); + it('should skip non-set values', function() { + delete testSubject[1]; + var visited = {}; + testSubject.reduceRight(function(a,b) { + if(a) + visited[a] = true; + if(b) + visited[b] = true; + return 0; + }); + + expect(visited).toEqual({ '1': true, '3': true }); + }); + it('should have the right length', function() { + expect(testSubject.reduceRight.length).toBe(1); + }); + }); + describe('Array-like objects', function() { + beforeEach(function() { + testSubject = createArrayLikeFromArray(testSubject); + testSubject.reduceRight = Array.prototype.reduceRight; + }); + it('should pass the correct arguments to the callback', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduceRight(spy); + expect(spy.calls[0].args).toExactlyMatch([3, 2, 1, testSubject]); + }); + it('should start with the right initialValue', function() { + var spy = jasmine.createSpy().andReturn(0); + testSubject.reduceRight(spy, 0); + expect(spy.calls[0].args).toExactlyMatch([0, 3, 2, testSubject]); + }); + it('should not affect elements added to the array after it has begun', function() { + var arr = createArrayLikeFromArray([1,2,3]), + i = 0; + Array.prototype.reduceRight.call(arr, function(a, b) { + i++; + if(i <= 4) { + arr[i+2] = a+3; + }; + return b; + }); + expect(arr).toEqual({ + 0: 1, + 1: 2, + 2: 3, + 3: 6, + 4: 5, + length: 3 // does not get updated on property assignment + }); + expect(i).toBe(2); + }); + it('should work as expected for empty arrays', function() { + var spy = jasmine.createSpy(); + expect(function() { + Array.prototype.reduceRight.call({length:0}, spy); + }).toThrow(); + expect(spy).not.toHaveBeenCalled(); + }); + it('should throw correctly if no callback is given', function() { + expect(function() { + testSubject.reduceRight(); + }).toThrow(); + }); + it('should return the expected result', function() { + expect(testSubject.reduceRight(function(a,b) { + return (a||'').toString()+(b||'').toString(); + })).toEqual('321'); + }); + it('should not directly affect the passed array', function() { + var copy = createArrayLikeFromArray(testSubject); + testSubject.reduceRight(function(a,b) { + return a+b; + }); + delete(testSubject.reduceRight); + expect(testSubject).toEqual(copy); + }); + it('should skip non-set values', function() { + delete testSubject[1]; + var visited = {}; + testSubject.reduceRight(function(a,b) { + if(a) + visited[a] = true; + if(b) + visited[b] = true; + return 0; + }); + + expect(visited).toEqual({ '1': true, '3': true }); + }); + it('should have the right length', function() { + expect(testSubject.reduceRight.length).toBe(1); + }); + }); + }); + + describe('isArray', function () { + it('should work for Array', function () { + var ret = Array.isArray([]); + + expect(ret).toBe(true); + }); + + it('should fail for other objects', function () { + var objects = [ + "someString", + true, + false, + 42, + 0, + {}, + Object.create && Object.create(null) || null, + /foo/, + arguments, + document.getElementsByTagName("div") + ]; + + objects.forEach(function (v) { + expect(Array.isArray(v)).toBe(false); + }); + }); + }); + + describe('unshift', function () { + it('should return length', function () { + expect([].unshift(0)).toEqual(1); + }); + }); + + describe('splice', function () { + var b = ["b"], + a = [1, "a", b], + test; + + var makeArray = function(l, prefix) { + prefix = prefix || ""; + var a = []; + while (l--) { + a.unshift(prefix + Array(l + 1).join(" ") + l) + } + return a + }; + + beforeEach(function() { + test = a.slice(0); + }); + + it('basic implementation test 1', function () { + expect(test.splice(0)).toEqual(a); + }); + it('basic implementation test 2', function () { + test.splice(0, 2); + expect(test).toEqual([b]); + }); + + it('should return right result 1', function () { + expect((function() { + var array = []; + + array.splice(0, 0, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); + array.splice(1, 0, "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21","F22", "F23", "F24", "F25", "F26"); + array.splice(5, 0, "XXX"); + + return array.join("|"); + }())).toBe("1|F1|F2|F3|F4|XXX|F5|F6|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|F25|F26|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20"); + }); + + it('should return right result 2', function () { + expect((function() { + var array = makeArray(6); + + array.splice(array.length - 1, 1, ""); + array.splice(0, 1, 1,2,3,4); + array.splice(0, 0, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, 21, 22, 23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45); + + array.splice(4, 0, "99999999999999"); + return array.join("|"); + }())).toBe("1|2|3|4|99999999999999|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|1|2|3|4| 1| 2| 3| 4|"); + }); + + it('should return right result 3', function () { + expect((function() { + var array = [1,2,3]; + + array.splice(0); + array.splice(0, 1, 1,2,3,4,5,6,7,8,9,10); + array.splice(1, 1, "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21","F22", "F23", "F24", "F25", "F26"); + array.splice(5, 1, "YYY", "XXX"); + array.splice(0, 1); + array.splice(0, 2); + array.pop(); + array.push.apply(array, makeArray(10, "-")); + array.splice(array.length - 2, 10); + array.splice(); + array.splice(1, 1, 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9); + array.splice(1, 1, "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21","F22", "F23", "F24", "F25", "F26",1,23,4,5,6,7,8); + array.splice(30, 10); + array.splice(30, 1); + array.splice(30, 0); + array.splice(2, 5, 1,2,3,"P", "LLL", "CCC", "YYY", "XXX"); + array.push(1,2,3,4,5,6); + array.splice(1, 6, 1,2,3,4,5,6,7,8,9,4,5,6,7,8,9); + array.splice(3, 7); + array.unshift(7,8,9,10,11); + array.pop(); + array.splice(5, 2); + array.pop(); + array.unshift.apply(array, makeArray(8, "~")); + array.pop(); + array.splice(3, 1, "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21","F22", "F23", "F24", "F25", "F26",1,23,4,5,6,7,8); + array.splice(4, 5, "P", "LLL", "CCC", "YYY", "XXX"); + + return array.join("|"); + }())).toBe("~0|~ 1|~ 2|F1|P|LLL|CCC|YYY|XXX|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|F25|F26|1|23|4|5|6|7|8|~ 4|~ 5|~ 6|~ 7|7|8|9|10|11|2|4|5|6|7|8|9|CCC|YYY|XXX|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|F25|F26|1|23|4|9|10|1|2|3|4|5|6|7|8|9|YYY|XXX|F6|F7|F8|F9|F10|F11|F12|F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|F25|F26|3|4|5|6|7|8|9|-0|- 1|- 2|- 3|- 4|- 5|- 6|- 7|1|2|3"); + }); + + + it('should do nothing if method called with no arguments', function () { + expect(test.splice()).toEqual([]); + expect(test).toEqual(a); + }); + //TODO:: Is this realy TRUE behavior? + it('should set first argument to 0 if first argument is set but undefined', function () { + var test2 = test.slice(0); + expect(test.splice(void 0, 2)).toEqual(test2.splice(0, 2)); + expect(test).toEqual(test2); + }); + + it('should deleted and return all items after "start" when second argument is undefined', function () { + expect(test.splice(0)).toEqual(a); + expect(test).toEqual([]); + }); + it('should deleted and return all items after "start" when second argument is undefined', function () { + expect(test.splice(2)).toEqual([b]); + expect(test).toEqual([1, "a"]); + }); + it('runshould have the right length', function () { + expect(test.splice.length).toBe(2); + }); + }); + + +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-date.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-date.js new file mode 100644 index 0000000..82619e9 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-date.js @@ -0,0 +1,152 @@ +describe('Date', function () { + + describe('now', function () { + it('should be the current time', function () { + expect(Date.now() === new Date().getTime()).toBe(true); + }); + }); + + describe("parse", function () { + // TODO: Write the rest of the test. + + it('should support extended years', function () { + + expect(Date.parse('0001-01-01T00:00:00Z')).toBe(-62135596800000); + expect(Date.parse('+275760-09-13T00:00:00.000Z')).toBe(8.64e15); + expect(Date.parse('+033658-09-27T01:46:40.000Z')).toBe(1e15); + expect(Date.parse('-000001-01-01T00:00:00Z')).toBe(-62198755200000); + expect(Date.parse('+002009-12-15T00:00:00Z')).toBe(1260835200000); + + }); + + it('should work', function () { + //Chrome 19 Opera 12 Firefox 11 IE 9 Safari 5.1.1 + expect(Date.parse("2012-11-31T23:59:59.000Z")).toBeFalsy(); //1354406399000 NaN NaN 1354406399000 NaN + expect(Date.parse("2012-12-31T23:59:59.000Z")).toBe(1356998399000); //1356998399000 1356998399000 1356998399000 1356998399000 1356998399000 + expect(Date.parse("2012-12-31T23:59:60.000Z")).toBeFalsy(); //NaN NaN NaN NaN 1356998400000 + expect(Date.parse("2012-04-04T05:02:02.170Z")).toBe(1333515722170); //1333515722170 1333515722170 1333515722170 1333515722170 1333515722170 + expect(Date.parse("2012-04-04T05:02:02.170999Z")).toBe(1333515722170); //1333515722170 1333515722170 1333515722170 1333515722170 1333515722170 + expect(Date.parse("2012-04-04T05:02:02.17Z")).toBe(1333515722170); //1333515722170 1333515722170 1333515722170 1333515722170 1333515722170 + expect(Date.parse("2012-04-04T05:02:02.1Z")).toBe(1333515722100); //1333515722170 1333515722170 1333515722170 1333515722170 1333515722170 + expect(Date.parse("2012-04-04T24:00:00.000Z")).toBe(1333584000000); //NaN 1333584000000 1333584000000 1333584000000 1333584000000 + expect(Date.parse("2012-04-04T24:00:00.500Z")).toBeFalsy(); //NaN NaN 1333584000500 1333584000500 NaN + expect(Date.parse("2012-12-31T10:08:60.000Z")).toBeFalsy(); //NaN NaN NaN NaN 1356948540000 + expect(Date.parse("2012-13-01T12:00:00.000Z")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-12-32T12:00:00.000Z")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-12-31T25:00:00.000Z")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-12-31T24:01:00.000Z")).toBeFalsy(); //NaN NaN NaN 1356998460000 NaN + expect(Date.parse("2012-12-31T12:60:00.000Z")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-12-31T12:00:60.000Z")).toBeFalsy(); //NaN NaN NaN NaN 1356955260000 + expect(Date.parse("2012-00-31T23:59:59.000Z")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-12-00T23:59:59.000Z")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-02-29T12:00:00.000Z")).toBe(1330516800000); //1330516800000 1330516800000 1330516800000 1330516800000 1330516800000 + expect(Date.parse("2011-02-29T12:00:00.000Z")).toBeFalsy(); //1298980800000 NaN NaN 1298980800000 NaN + expect(Date.parse("2011-03-01T12:00:00.000Z")).toBe(1298980800000); //1298980800000 1298980800000 1298980800000 1298980800000 1298980800000 + + // extended years: + expect(Date.parse("0000-01-01T00:00:00.000Z")).toBe(-621672192e5); //-621672192e5 -621672192e5 -621672192e5 -621672192e5 -621672192e5 + expect(Date.parse("+275760-09-13T00:00:00.000Z")).toBe(8.64e15); //8.64e15 NaN 8.64e15 8.64e15 8.64e15 + expect(Date.parse("-271821-04-20T00:00:00.000Z")).toBe(-8.64e15); //-8.64e15 NaN -8.64e15 -8.64e15 -8.6400000864e15 + expect(Date.parse("+275760-09-13T00:00:00.001Z")).toBeFalsy(); //NaN NaN NaN 8.64e15 + 1 8.64e15 + 1 + expect(Date.parse("-271821-04-19T23:59:59.999Z")).toBeFalsy(); //NaN NaN NaN -8.64e15 - 1 -8.6400000864e15 - 1 + + // https://github.com/kriskowal/es5-shim/issues/80 Safari bug with leap day + expect(Date.parse("2034-03-01T00:00:00.000Z") - + Date.parse("2034-02-27T23:59:59.999Z")).toBe(86400001); //86400001 86400001 86400001 86400001 1 + + // Time Zone Offset + expect(Date.parse("2012-01-29T12:00:00.000+01:00")).toBe(132783480e4);//132783480e4 132783480e4 132783480e4 132783480e4 132783480e4 + expect(Date.parse("2012-01-29T12:00:00.000-00:00")).toBe(132783840e4);//132783840e4 132783840e4 132783840e4 132783840e4 132783840e4 + expect(Date.parse("2012-01-29T12:00:00.000+00:00")).toBe(132783840e4);//132783840e4 132783840e4 132783840e4 132783840e4 132783840e4 + expect(Date.parse("2012-01-29T12:00:00.000+23:59")).toBe(132775206e4);//132775206e4 132775206e4 132775206e4 132775206e4 132775206e4 + expect(Date.parse("2012-01-29T12:00:00.000-23:59")).toBe(132792474e4);//132792474e4 132792474e4 132792474e4 132792474e4 132792474e4 + expect(Date.parse("2012-01-29T12:00:00.000+24:00")).toBeFalsy(); //NaN 1327752e6 NaN 1327752000000 1327752000000 + expect(Date.parse("2012-01-29T12:00:00.000+24:01")).toBeFalsy(); //NaN NaN NaN 1327751940000 1327751940000 + expect(Date.parse("2012-01-29T12:00:00.000+24:59")).toBeFalsy(); //NaN NaN NaN 1327748460000 1327748460000 + expect(Date.parse("2012-01-29T12:00:00.000+25:00")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("2012-01-29T12:00:00.000+00:60")).toBeFalsy(); //NaN NaN NaN NaN NaN + expect(Date.parse("-271821-04-20T00:00:00.000+00:01")).toBeFalsy(); //NaN NaN NaN -864000000006e4 -864000008646e4 + expect(Date.parse("-271821-04-20T00:01:00.000+00:01")).toBe(-8.64e15);//-8.64e15 NaN -8.64e15 -8.64e15 -864000008640e4 + + // When time zone is missed, local offset should be used (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + var tzOffset = Number(new Date(1970, 0)); + // same as (new Date().getTimezoneOffset() * 60000) + expect(Date.parse('1970-01-01T00:00:00')).toBe(tzOffset); //tzOffset 0 0 0 NaN + }); + + it("should be able to coerce to a number", function(){ + var actual = Number(new Date(1970, 0)); + var expected = parseInt(actual, 10); + expect(actual).toBeDefined(); + expect(actual).toEqual(expected); + expect(isNaN(actual)).toBeFalsy(); + }); + + }); + + describe("toString", function(){ + var actual = (new Date(1970, 0)).toString(); + beforeEach(function(){ + actual = (new Date(1970, 0)).toString(); + }); + it("should show correct date info for "+actual, function(){ + expect(actual).toMatch(/1970/); + expect(actual).toMatch(/jan/i); + expect(actual).toMatch(/thu/i); + expect(actual).toMatch(/00:00:00/); + }); + }); + + describe("valueOf", function(){ + var actual = (new Date(1970, 0)); + beforeEach(function(){ + actual = (new Date(1970, 0)).valueOf(); + }); + it("should give an int value", function(){ + expect(parseInt(actual, 10)).toBeTruthy(); + }); + }); + + describe("toISOString", function () { + // TODO: write the rest of the test. + + it('should support extended years', function () { + expect(new Date(-62198755200000).toISOString().indexOf('-000001-01-01')).toBe(0); + expect(new Date(8.64e15).toISOString().indexOf('+275760-09-13')).toBe(0); + }); + + it('should return correct dates', function () { + expect(new Date(-1).toISOString()).toBe('1969-12-31T23:59:59.999Z');// Safari 5.1.5 "1969-12-31T23:59:59.-01Z" + expect(new Date(-3509827334573292).toISOString()).toBe('-109252-01-01T10:37:06.708Z'); // Opera 11.61/Opera 12 bug with Date#getUTCMonth + }); + + }); + + describe("toJSON", function () { + + // Opera 11.6x/12 bug + it('should call toISOString', function () { + var date = new Date(0); + date.toISOString = function () { + return 1; + }; + expect(date.toJSON()).toBe(1); + }); + + it('should return null for not finite dates', function () { + var date = new Date(NaN), + json; + try { + json = date.toJSON(); + } catch (e) { var abcdef = 1} + expect(json).toBe(null); + }); + + it('should return the isoString when stringified', function () { + var date = new Date(); + expect(JSON.stringify(date.toISOString())).toBe(JSON.stringify(date)); + }) + }); + +}); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-function.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-function.js new file mode 100644 index 0000000..aa4361e --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-function.js @@ -0,0 +1,147 @@ + +describe('Function', function() { + "use strict"; + describe('bind', function() { + var actual, expected, + testSubject; + + testSubject = { + push: function(o) { + this.a.push(o); + } + }; + + function func() { + Array.prototype.forEach.call(arguments, function(a) { + this.push(a); + }, this); + return this; + }; + + beforeEach(function() { + actual = []; + testSubject.a = []; + }); + + it('binds properly without a context', function() { + var context; + testSubject.func = function() { + context = this; + }.bind(); + testSubject.func(); + expect(context).toBe(function() {return this}.call()); + }); + it('binds properly without a context, and still supplies bound arguments', function() { + var a, context; + testSubject.func = function() { + a = Array.prototype.slice.call(arguments); + context = this; + }.bind(undefined, 1,2,3); + testSubject.func(1,2,3); + expect(a).toEqual([1,2,3,1,2,3]); + expect(context).toBe(function() {return this}.call()); + }); + it('binds a context properly', function() { + testSubject.func = func.bind(actual); + testSubject.func(1,2,3); + expect(actual).toEqual([1,2,3]); + expect(testSubject.a).toEqual([]); + }); + it('binds a context and supplies bound arguments', function() { + testSubject.func = func.bind(actual, 1,2,3); + testSubject.func(4,5,6); + expect(actual).toEqual([1,2,3,4,5,6]); + expect(testSubject.a).toEqual([]); + }); + + it('returns properly without binding a context', function() { + testSubject.func = function() { + return this; + }.bind(); + var context = testSubject.func(); + expect(context).toBe(function() {return this}.call()); + }); + it('returns properly without binding a context, and still supplies bound arguments', function() { + var context; + testSubject.func = function() { + context = this; + return Array.prototype.slice.call(arguments); + }.bind(undefined, 1,2,3); + actual = testSubject.func(1,2,3); + expect(context).toBe(function() {return this}.call()); + expect(actual).toEqual([1,2,3,1,2,3]); + }); + it('returns properly while binding a context properly', function() { + var ret; + testSubject.func = func.bind(actual); + ret = testSubject.func(1,2,3); + expect(ret).toBe(actual); + expect(ret).not.toBe(testSubject); + }); + it('returns properly while binding a context and supplies bound arguments', function() { + var ret; + testSubject.func = func.bind(actual, 1,2,3); + ret = testSubject.func(4,5,6); + expect(ret).toBe(actual); + expect(ret).not.toBe(testSubject); + }); + it('passes the correct arguments as a constructor', function() { + var ret, expected = { name: "Correct" }; + testSubject.func = function(arg) { + return arg; + }.bind({ name: "Incorrect" }); + ret = new testSubject.func(expected); + expect(ret).toBe(expected); + }); + it('returns the return value of the bound function when called as a constructor', function () { + var oracle = [1, 2, 3]; + var subject = function () { + return oracle; + }.bind(null); + var result = new subject; + expect(result).toBe(oracle); + }); + it('returns the correct value if constructor returns primitive', function() { + var oracle = [1, 2, 3]; + var subject = function () { + return oracle; + }.bind(null); + var result = new subject; + expect(result).toBe(oracle); + + oracle = {}; + result = new subject; + expect(result).toBe(oracle); + + oracle = function(){}; + result = new subject; + expect(result).toBe(oracle); + + oracle = "asdf"; + result = new subject; + expect(result).not.toBe(oracle); + + oracle = null; + result = new subject; + expect(result).not.toBe(oracle); + + oracle = true; + result = new subject; + expect(result).not.toBe(oracle); + + oracle = 1; + result = new subject; + expect(result).not.toBe(oracle); + }); + it('returns the value that instance of original "class" when called as a constructor', function() { + var classA = function(x) { + this.name = x || "A"; + } + var classB = classA.bind(null, "B"); + + var result = new classB; + expect(result instanceof classA).toBe(true); + expect(result instanceof classB).toBe(true); + }); + }); +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-number.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-number.js new file mode 100644 index 0000000..b09ae2b --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-number.js @@ -0,0 +1,14 @@ +describe('Number', function () { + 'use strict'; + + describe('toFixed', function () { + it('should convert numbers correctly', function () { + expect((0.00008).toFixed(3)).toBe('0.000'); + expect((0.9).toFixed(0)).toBe('1'); + expect((1.255).toFixed(2)).toBe('1.25'); + expect((1843654265.0774949).toFixed(5)).toBe('1843654265.07749'); + expect((1000000000000000128).toFixed(0)).toBe('1000000000000000128'); + }); + }); + +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-object.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-object.js new file mode 100644 index 0000000..4c540bf --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-object.js @@ -0,0 +1,181 @@ +describe('Object', function () { + "use strict"; + + describe("Object.keys", function () { + var obj = { + "str": "boz", + "obj": { }, + "arr": [], + "bool": true, + "num": 42, + "null": null, + "undefined": undefined + }; + + var loopedValues = []; + for (var k in obj) { + loopedValues.push(k); + } + + var keys = Object.keys(obj); + it('should have correct length', function () { + expect(keys.length).toBe(7); + }); + + it('should return an Array', function () { + expect(Array.isArray(keys)).toBe(true); + }); + + it('should return names which are own properties', function () { + keys.forEach(function (name) { + expect(obj.hasOwnProperty(name)).toBe(true); + }); + }); + + it('should return names which are enumerable', function () { + keys.forEach(function (name) { + expect(loopedValues.indexOf(name)).toNotBe(-1); + }) + }); + + it('should throw error for non object', function () { + var e = {}; + expect(function () { + try { + Object.keys(42) + } catch (err) { + throw e; + } + }).toThrow(e); + }); + }); + + describe("Object.isExtensible", function () { + var obj = { }; + + it('should return true if object is extensible', function () { + expect(Object.isExtensible(obj)).toBe(true); + }); + + it('should return false if object is not extensible', function () { + expect(Object.isExtensible(Object.preventExtensions(obj))).toBe(false); + }); + + it('should return false if object is seal', function () { + expect(Object.isExtensible(Object.seal(obj))).toBe(false); + }); + + it('should return false if object is freeze', function () { + expect(Object.isExtensible(Object.freeze(obj))).toBe(false); + }); + + it('should throw error for non object', function () { + var e1 = {}; + expect(function () { + try { + Object.isExtensible(42) + } catch (err) { + throw e1; + } + }).toThrow(e1); + }); + }); + + describe("Object.defineProperty", function () { + var obj; + + beforeEach(function() { + obj = {}; + + Object.defineProperty(obj, 'name', { + value : 'Testing', + configurable: true, + enumerable: true, + writable: true + }); + }); + + it('should return the initial value', function () { + expect(obj.hasOwnProperty('name')).toBeTruthy(); + expect(obj.name).toBe('Testing'); + }); + + it('should be setable', function () { + obj.name = 'Other'; + expect(obj.name).toBe('Other'); + }); + + it('should return the parent initial value', function () { + var child = Object.create(obj, {}); + + expect(child.name).toBe('Testing'); + expect(child.hasOwnProperty('name')).toBeFalsy(); + }); + + it('should not override the parent value', function () { + var child = Object.create(obj, {}); + + Object.defineProperty(child, 'name', { + value : 'Other' + }); + + expect(obj.name).toBe('Testing'); + expect(child.name).toBe('Other'); + }); + + it('should throw error for non object', function () { + expect(function () { + Object.defineProperty(42, 'name', {}); + }).toThrow(); + }); + }); + + describe("Object.getOwnPropertyDescriptor", function () { + it('should return undefined because the object does not own the property', function () { + var descr = Object.getOwnPropertyDescriptor({}, 'name'); + + expect(descr).toBeUndefined() + }); + + it('should return a data descriptor', function () { + var descr = Object.getOwnPropertyDescriptor({name: 'Testing'}, 'name'); + + expect(descr).not.toBeUndefined(); + expect(descr.value).toBe('Testing'); + expect(descr.writable).toBe(true); + expect(descr.enumerable).toBe(true); + expect(descr.configurable).toBe(true); + }); + + it('should return undefined because the object does not own the property', function () { + var descr = Object.getOwnPropertyDescriptor(Object.create({name: 'Testing'}, {}), 'name'); + + expect(descr).toBeUndefined() + }); + + it('should return a data descriptor', function () { + var obj = Object.create({}, { + name: { + value : 'Testing', + configurable: true, + enumerable: true, + writable: true + } + }); + + var descr = Object.getOwnPropertyDescriptor(obj, 'name'); + + expect(descr).not.toBeUndefined(); + expect(descr.value).toBe('Testing'); + expect(descr.writable).toBe(true); + expect(descr.enumerable).toBe(true); + expect(descr.configurable).toBe(true); + }); + + it('should throw error for non object', function () { + expect(function () { + Object.getOwnPropertyDescriptor(42, 'name'); + }).toThrow(); + }); + }); +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-string.js b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-string.js new file mode 100644 index 0000000..9b6910d --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-string.js @@ -0,0 +1,204 @@ +describe('String', function() { + "use strict"; + describe("trim", function() { + var test = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFFHello, World!\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"; + + it('trims all ES5 whitespace', function() { + expect(test.trim()).toEqual("Hello, World!"); + expect(test.trim().length).toEqual(13); + }); + }); + + describe("split", function() { + var test = "ab"; + + it('If "separator" is undefined must return Array with one String - "this" string', function() { + expect(test.split()).toEqual([test]); + expect(test.split(void 0)).toEqual([test]); + }); + + it('If "separator" is undefined and "limit" set to 0 must return Array[]', function() { + expect(test.split(void 0, 0)).toEqual([]); + }); + + describe('Tests from Steven Levithan', function () { + it("''.split() results in ['']", function () { + expect(''.split()).toEqual(['']); + }); + it("''.split(/./) results in ['']", function () { + expect(''.split(/./)).toEqual(['']); + }); + it("''.split(/.?/) results in []", function () { + expect(''.split(/.?/)).toEqual([]); + }); + it("''.split(/.??/) results in []", function () { + expect(''.split(/.??/)).toEqual([]); + }); + it("'ab'.split(/a*/) results in ['', 'b']", function () { + expect('ab'.split(/a*/)).toEqual(['', 'b']); + }); + it("'ab'.split(/a*?/) results in ['a', 'b']", function () { + expect('ab'.split(/a*?/)).toEqual(['a', 'b']); + }); + it("'ab'.split(/(?:ab)/) results in ['', '']", function () { + expect('ab'.split(/(?:ab)/)).toEqual(['', '']); + }); + it("'ab'.split(/(?:ab)*/) results in ['', '']", function () { + expect('ab'.split(/(?:ab)*/)).toEqual(['', '']); + }); + it("'ab'.split(/(?:ab)*?/) results in ['a', 'b']", function () { + expect('ab'.split(/(?:ab)*?/)).toEqual(['a', 'b']); + }); + it("'test'.split('') results in ['t', 'e', 's', 't']", function () { + expect('test'.split('')).toEqual(['t', 'e', 's', 't']); + }); + it("'test'.split() results in ['test']", function () { + expect('test'.split()).toEqual(['test']); + }); + it("'111'.split(1) results in ['', '', '', '']", function () { + expect('111'.split(1)).toEqual(['', '', '', '']); + }); + it("'test'.split(/(?:)/, 2) results in ['t', 'e']", function () { + expect('test'.split(/(?:)/, 2)).toEqual(['t', 'e']); + }); + it("'test'.split(/(?:)/, -1) results in ['t', 'e', 's', 't']", function () { + expect('test'.split(/(?:)/, -1)).toEqual(['t', 'e', 's', 't']); + }); + it("'test'.split(/(?:)/, undefined) results in ['t', 'e', 's', 't']", function () { + expect('test'.split(/(?:)/, undefined)).toEqual(['t', 'e', 's', 't']); + }); + it("'test'.split(/(?:)/, null) results in []", function () { + expect('test'.split(/(?:)/, null)).toEqual([]); + }); + it("'test'.split(/(?:)/, NaN) results in []", function () { + expect('test'.split(/(?:)/, NaN)).toEqual([]); + }); + it("'test'.split(/(?:)/, true) results in ['t']", function () { + expect('test'.split(/(?:)/, true)).toEqual(['t']); + }); + it("'test'.split(/(?:)/, '2') results in ['t', 'e']", function () { + expect('test'.split(/(?:)/, '2')).toEqual(['t', 'e']); + }); + it("'test'.split(/(?:)/, 'two') results in []", function () { + expect('test'.split(/(?:)/, 'two')).toEqual([]); + }); + it("'a'.split(/-/) results in ['a']", function () { + expect('a'.split(/-/)).toEqual(['a']); + }); + it("'a'.split(/-?/) results in ['a']", function () { + expect('a'.split(/-?/)).toEqual(['a']); + }); + it("'a'.split(/-??/) results in ['a']", function () { + expect('a'.split(/-??/)).toEqual(['a']); + }); + it("'a'.split(/a/) results in ['', '']", function () { + expect('a'.split(/a/)).toEqual(['', '']); + }); + it("'a'.split(/a?/) results in ['', '']", function () { + expect('a'.split(/a?/)).toEqual(['', '']); + }); + it("'a'.split(/a??/) results in ['a']", function () { + expect('a'.split(/a??/)).toEqual(['a']); + }); + it("'ab'.split(/-/) results in ['ab']", function () { + expect('ab'.split(/-/)).toEqual(['ab']); + }); + it("'ab'.split(/-?/) results in ['a', 'b']", function () { + expect('ab'.split(/-?/)).toEqual(['a', 'b']); + }); + it("'ab'.split(/-??/) results in ['a', 'b']", function () { + expect('ab'.split(/-??/)).toEqual(['a', 'b']); + }); + it("'a-b'.split(/-/) results in ['a', 'b']", function () { + expect('a-b'.split(/-/)).toEqual(['a', 'b']); + }); + it("'a-b'.split(/-?/) results in ['a', 'b']", function () { + expect('a-b'.split(/-?/)).toEqual(['a', 'b']); + }); + it("'a-b'.split(/-??/) results in ['a', '-', 'b']", function () { + expect('a-b'.split(/-??/)).toEqual(['a', '-', 'b']); + }); + it("'a--b'.split(/-/) results in ['a', '', 'b']", function () { + expect('a--b'.split(/-/)).toEqual(['a', '', 'b']); + }); + it("'a--b'.split(/-?/) results in ['a', '', 'b']", function () { + expect('a--b'.split(/-?/)).toEqual(['a', '', 'b']); + }); + it("'a--b'.split(/-??/) results in ['a', '-', '-', 'b']", function () { + expect('a--b'.split(/-??/)).toEqual(['a', '-', '-', 'b']); + }); + it("''.split(/()()/) results in []", function () { + expect(''.split(/()()/)).toEqual([]); + }); + it("'.'.split(/()()/) results in ['.']", function () { + expect('.'.split(/()()/)).toEqual(['.']); + }); + it("'.'.split(/(.?)(.?)/) results in ['', '.', '', '']", function () { + expect('.'.split(/(.?)(.?)/)).toEqual(['', '.', '', '']); + }); + it("'.'.split(/(.??)(.??)/) results in ['.']", function () { + expect('.'.split(/(.??)(.??)/)).toEqual(['.']); + }); + it("'.'.split(/(.)?(.)?/) results in ['', '.', undefined, '']", function () { + expect('.'.split(/(.)?(.)?/)).toEqual(['', '.', undefined, '']); + }); + it("'A<B>bold</B>and<CODE>coded</CODE>'.split(/<(\\/)?([^<>]+)>/) results in ['A', undefined, 'B', 'bold', '/', 'B', 'and', undefined, 'CODE', 'coded', '/', 'CODE', '']", function () { + expect('A<B>bold</B>and<CODE>coded</CODE>'.split(/<(\/)?([^<>]+)>/)).toEqual(['A', undefined, 'B', 'bold', '/', 'B', 'and', undefined, 'CODE', 'coded', '/', 'CODE', '']); + }); + it("'tesst'.split(/(s)*/) results in ['t', undefined, 'e', 's', 't']", function () { + expect('tesst'.split(/(s)*/)).toEqual(['t', undefined, 'e', 's', 't']); + }); + it("'tesst'.split(/(s)*?/) results in ['t', undefined, 'e', undefined, 's', undefined, 's', undefined, 't']", function () { + expect('tesst'.split(/(s)*?/)).toEqual(['t', undefined, 'e', undefined, 's', undefined, 's', undefined, 't']); + }); + it("'tesst'.split(/(s*)/) results in ['t', '', 'e', 'ss', 't']", function () { + expect('tesst'.split(/(s*)/)).toEqual(['t', '', 'e', 'ss', 't']); + }); + it("'tesst'.split(/(s*?)/) results in ['t', '', 'e', '', 's', '', 's', '', 't']", function () { + expect('tesst'.split(/(s*?)/)).toEqual(['t', '', 'e', '', 's', '', 's', '', 't']); + }); + it("'tesst'.split(/(?:s)*/) results in ['t', 'e', 't']", function () { + expect('tesst'.split(/(?:s)*/)).toEqual(['t', 'e', 't']); + }); + it("'tesst'.split(/(?=s+)/) results in ['te', 's', 'st']", function () { + expect('tesst'.split(/(?=s+)/)).toEqual(['te', 's', 'st']); + }); + it("'test'.split('t') results in ['', 'es', '']", function () { + expect('test'.split('t')).toEqual(['', 'es', '']); + }); + it("'test'.split('es') results in ['t', 't']", function () { + expect('test'.split('es')).toEqual(['t', 't']); + }); + it("'test'.split(/t/) results in ['', 'es', '']", function () { + expect('test'.split(/t/)).toEqual(['', 'es', '']); + }); + it("'test'.split(/es/) results in ['t', 't']", function () { + expect('test'.split(/es/)).toEqual(['t', 't']); + }); + it("'test'.split(/(t)/) results in ['', 't', 'es', 't', '']", function () { + expect('test'.split(/(t)/)).toEqual(['', 't', 'es', 't', '']); + }); + it("'test'.split(/(es)/) results in ['t', 'es', 't']", function () { + expect('test'.split(/(es)/)).toEqual(['t', 'es', 't']); + }); + it("'test'.split(/(t)(e)(s)(t)/) results in ['', 't', 'e', 's', 't', '']", function () { + expect('test'.split(/(t)(e)(s)(t)/)).toEqual(['', 't', 'e', 's', 't', '']); + }); + it("'.'.split(/(((.((.??)))))/) results in ['', '.', '.', '.', '', '', '']", function () { + expect('.'.split(/(((.((.??)))))/)).toEqual(['', '.', '.', '.', '', '', '']); + }); + it("'.'.split(/(((((.??)))))/) results in ['.']", function () { + expect('.'.split(/(((((.??)))))/)).toEqual(['.']); + }); + it("'a b c d'.split(/ /, -(Math.pow(2, 32) - 1)) results in ['a']", function () { + expect('a b c d'.split(/ /, -(Math.pow(2, 32) - 1))).toEqual(['a']); + }); + it("'a b c d'.split(/ /, Math.pow(2, 32) + 1) results in ['a']", function () { + expect('a b c d'.split(/ /, Math.pow(2, 32) + 1)).toEqual(['a']); + }); + it("'a b c d'.split(/ /, Infinity) results in []", function () { + expect('a b c d'.split(/ /, Infinity)).toEqual([]); + }); + }); + }); +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/jquery-ui-1.10.3.custom.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/jquery-ui-1.10.3.custom.min.js new file mode 100644 index 0000000..ab56d77 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/jquery-ui-1.10.3.custom.min.js @@ -0,0 +1,1588 @@ +/*! jQuery UI - v1.10.3 - 2013-08-29 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +(function (e, t) { + function i(t, i) { + var a, n, r, o = t.nodeName.toLowerCase(); + return "area" === o ? (a = t.parentNode, n = a.name, t.href && n && "map" === a.nodeName.toLowerCase() ? (r = e("img[usemap=#" + n + "]")[0], !!r && s(r)) : !1) : (/input|select|textarea|button|object/.test(o) ? !t.disabled : "a" === o ? t.href || i : i) && s(t) + } + + function s(t) { + return e.expr.filters.visible(t) && !e(t).parents().addBack().filter(function () { + return "hidden" === e.css(this, "visibility") + }).length + } + + var a = 0, n = /^ui-id-\d+$/; + e.ui = e.ui || {}, e.extend(e.ui, { + version: "1.10.3", + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } + }), e.fn.extend({ + focus: function (t) { + return function (i, s) { + return "number" == typeof i ? this.each(function () { + var t = this; + setTimeout(function () { + e(t).focus(), s && s.call(t) + }, i) + }) : t.apply(this, arguments) + } + }(e.fn.focus), scrollParent: function () { + var t; + return t = e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function () { + return /(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x")) + }).eq(0) : this.parents().filter(function () { + return /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x")) + }).eq(0), /fixed/.test(this.css("position")) || !t.length ? e(document) : t + }, zIndex: function (i) { + if (i !== t) return this.css("zIndex", i); + if (this.length) for (var s, a, n = e(this[0]); n.length && n[0] !== document;) { + if (s = n.css("position"), ("absolute" === s || "relative" === s || "fixed" === s) && (a = parseInt(n.css("zIndex"), 10), !isNaN(a) && 0 !== a)) return a; + n = n.parent() + } + return 0 + }, uniqueId: function () { + return this.each(function () { + this.id || (this.id = "ui-id-" + ++a) + }) + }, removeUniqueId: function () { + return this.each(function () { + n.test(this.id) && e(this).removeAttr("id") + }) + } + }), e.extend(e.expr[":"], { + data: e.expr.createPseudo ? e.expr.createPseudo(function (t) { + return function (i) { + return !!e.data(i, t) + } + }) : function (t, i, s) { + return !!e.data(t, s[3]) + }, focusable: function (t) { + return i(t, !isNaN(e.attr(t, "tabindex"))) + }, tabbable: function (t) { + var s = e.attr(t, "tabindex"), a = isNaN(s); + return (a || s >= 0) && i(t, !a) + } + }), e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function (i, s) { + function a(t, i, s, a) { + return e.each(n, function () { + i -= parseFloat(e.css(t, "padding" + this)) || 0, s && (i -= parseFloat(e.css(t, "border" + this + "Width")) || 0), a && (i -= parseFloat(e.css(t, "margin" + this)) || 0) + }), i + } + + var n = "Width" === s ? ["Left", "Right"] : ["Top", "Bottom"], r = s.toLowerCase(), o = { + innerWidth: e.fn.innerWidth, + innerHeight: e.fn.innerHeight, + outerWidth: e.fn.outerWidth, + outerHeight: e.fn.outerHeight + }; + e.fn["inner" + s] = function (i) { + return i === t ? o["inner" + s].call(this) : this.each(function () { + e(this).css(r, a(this, i) + "px") + }) + }, e.fn["outer" + s] = function (t, i) { + return "number" != typeof t ? o["outer" + s].call(this, t) : this.each(function () { + e(this).css(r, a(this, t, !0, i) + "px") + }) + } + }), e.fn.addBack || (e.fn.addBack = function (e) { + return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) + }), e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function (t) { + return function (i) { + return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this) + } + }(e.fn.removeData)), e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), e.support.selectstart = "onselectstart" in document.createElement("div"), e.fn.extend({ + disableSelection: function () { + return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (e) { + e.preventDefault() + }) + }, enableSelection: function () { + return this.unbind(".ui-disableSelection") + } + }), e.extend(e.ui, { + plugin: { + add: function (t, i, s) { + var a, n = e.ui[t].prototype; + for (a in s) n.plugins[a] = n.plugins[a] || [], n.plugins[a].push([i, s[a]]) + }, call: function (e, t, i) { + var s, a = e.plugins[t]; + if (a && e.element[0].parentNode && 11 !== e.element[0].parentNode.nodeType) for (s = 0; a.length > s; s++) e.options[a[s][0]] && a[s][1].apply(e.element, i) + } + }, hasScroll: function (t, i) { + if ("hidden" === e(t).css("overflow")) return !1; + var s = i && "left" === i ? "scrollLeft" : "scrollTop", a = !1; + return t[s] > 0 ? !0 : (t[s] = 1, a = t[s] > 0, t[s] = 0, a) + } + }) +})(jQuery); +(function (e, t) { + var i = 0, s = Array.prototype.slice, n = e.cleanData; + e.cleanData = function (t) { + for (var i, s = 0; null != (i = t[s]); s++) try { + e(i).triggerHandler("remove") + } catch (a) { + var abcdef = 1 + } + n(t) + }, e.widget = function (i, s, n) { + var a, r, o, h, l = {}, u = i.split(".")[0]; + i = i.split(".")[1], a = u + "-" + i, n || (n = s, s = e.Widget), e.expr[":"][a.toLowerCase()] = function (t) { + return !!e.data(t, a) + }, e[u] = e[u] || {}, r = e[u][i], o = e[u][i] = function (e, i) { + return this._createWidget ? (arguments.length && this._createWidget(e, i), t) : new o(e, i) + }, e.extend(o, r, { + version: n.version, + _proto: e.extend({}, n), + _childConstructors: [] + }), h = new s, h.options = e.widget.extend({}, h.options), e.each(n, function (i, n) { + return e.isFunction(n) ? (l[i] = function () { + var e = function () { + return s.prototype[i].apply(this, arguments) + }, t = function (e) { + return s.prototype[i].apply(this, e) + }; + return function () { + var i, s = this._super, a = this._superApply; + return this._super = e, this._superApply = t, i = n.apply(this, arguments), this._super = s, this._superApply = a, i + } + }(), t) : (l[i] = n, t) + }), o.prototype = e.widget.extend(h, {widgetEventPrefix: r ? h.widgetEventPrefix : i}, l, { + constructor: o, + namespace: u, + widgetName: i, + widgetFullName: a + }), r ? (e.each(r._childConstructors, function (t, i) { + var s = i.prototype; + e.widget(s.namespace + "." + s.widgetName, o, i._proto) + }), delete r._childConstructors) : s._childConstructors.push(o), e.widget.bridge(i, o) + }, e.widget.extend = function (i) { + for (var n, a, r = s.call(arguments, 1), o = 0, h = r.length; h > o; o++) for (n in r[o]) a = r[o][n], r[o].hasOwnProperty(n) && a !== t && (i[n] = e.isPlainObject(a) ? e.isPlainObject(i[n]) ? e.widget.extend({}, i[n], a) : e.widget.extend({}, a) : a); + return i + }, e.widget.bridge = function (i, n) { + var a = n.prototype.widgetFullName || i; + e.fn[i] = function (r) { + var o = "string" == typeof r, h = s.call(arguments, 1), l = this; + return r = !o && h.length ? e.widget.extend.apply(null, [r].concat(h)) : r, o ? this.each(function () { + var s, n = e.data(this, a); + return n ? e.isFunction(n[r]) && "_" !== r.charAt(0) ? (s = n[r].apply(n, h), s !== n && s !== t ? (l = s && s.jquery ? l.pushStack(s.get()) : s, !1) : t) : e.error("no such method '" + r + "' for " + i + " widget instance") : e.error("cannot call methods on " + i + " prior to initialization; " + "attempted to call method '" + r + "'") + }) : this.each(function () { + var t = e.data(this, a); + t ? t.option(r || {})._init() : e.data(this, a, new n(r, this)) + }), l + } + }, e.Widget = function () { + }, e.Widget._childConstructors = [], e.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "<div>", + options: {disabled: !1, create: null}, + _createWidget: function (t, s) { + s = e(s || this.defaultElement || this)[0], this.element = e(s), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), s !== this && (e.data(s, this.widgetFullName, this), this._on(!0, this.element, { + remove: function (e) { + e.target === s && this.destroy() + } + }), this.document = e(s.style ? s.ownerDocument : s.document || s), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init() + }, + _getCreateOptions: e.noop, + _getCreateEventData: e.noop, + _create: e.noop, + _init: e.noop, + destroy: function () { + this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus") + }, + _destroy: e.noop, + widget: function () { + return this.element + }, + option: function (i, s) { + var n, a, r, o = i; + if (0 === arguments.length) return e.widget.extend({}, this.options); + if ("string" == typeof i) if (o = {}, n = i.split("."), i = n.shift(), n.length) { + for (a = o[i] = e.widget.extend({}, this.options[i]), r = 0; n.length - 1 > r; r++) a[n[r]] = a[n[r]] || {}, a = a[n[r]]; + if (i = n.pop(), s === t) return a[i] === t ? null : a[i]; + a[i] = s + } else { + if (s === t) return this.options[i] === t ? null : this.options[i]; + o[i] = s + } + return this._setOptions(o), this + }, + _setOptions: function (e) { + var t; + for (t in e) this._setOption(t, e[t]); + return this + }, + _setOption: function (e, t) { + return this.options[e] = t, "disabled" === e && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this + }, + enable: function () { + return this._setOption("disabled", !1) + }, + disable: function () { + return this._setOption("disabled", !0) + }, + _on: function (i, s, n) { + var a, r = this; + "boolean" != typeof i && (n = s, s = i, i = !1), n ? (s = a = e(s), this.bindings = this.bindings.add(s)) : (n = s, s = this.element, a = this.widget()), e.each(n, function (n, o) { + function h() { + return i || r.options.disabled !== !0 && !e(this).hasClass("ui-state-disabled") ? ("string" == typeof o ? r[o] : o).apply(r, arguments) : t + } + + "string" != typeof o && (h.guid = o.guid = o.guid || h.guid || e.guid++); + var l = n.match(/^(\w+)\s*(.*)$/), u = l[1] + r.eventNamespace, c = l[2]; + c ? a.delegate(c, u, h) : s.bind(u, h) + }) + }, + _off: function (e, t) { + t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t) + }, + _delay: function (e, t) { + function i() { + return ("string" == typeof e ? s[e] : e).apply(s, arguments) + } + + var s = this; + return setTimeout(i, t || 0) + }, + _hoverable: function (t) { + this.hoverable = this.hoverable.add(t), this._on(t, { + mouseenter: function (t) { + e(t.currentTarget).addClass("ui-state-hover") + }, mouseleave: function (t) { + e(t.currentTarget).removeClass("ui-state-hover") + } + }) + }, + _focusable: function (t) { + this.focusable = this.focusable.add(t), this._on(t, { + focusin: function (t) { + e(t.currentTarget).addClass("ui-state-focus") + }, focusout: function (t) { + e(t.currentTarget).removeClass("ui-state-focus") + } + }) + }, + _trigger: function (t, i, s) { + var n, a, r = this.options[t]; + if (s = s || {}, i = e.Event(i), i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), i.target = this.element[0], a = i.originalEvent) for (n in a) n in i || (i[n] = a[n]); + return this.element.trigger(i, s), !(e.isFunction(r) && r.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented()) + } + }, e.each({show: "fadeIn", hide: "fadeOut"}, function (t, i) { + e.Widget.prototype["_" + t] = function (s, n, a) { + "string" == typeof n && (n = {effect: n}); + var r, o = n ? n === !0 || "number" == typeof n ? i : n.effect || i : t; + n = n || {}, "number" == typeof n && (n = {duration: n}), r = !e.isEmptyObject(n), n.complete = a, n.delay && s.delay(n.delay), r && e.effects && e.effects.effect[o] ? s[t](n) : o !== t && s[o] ? s[o](n.duration, n.easing, a) : s.queue(function (i) { + e(this)[t](), a && a.call(s[0]), i() + }) + } + }) +})(jQuery); +(function (e) { + var t = !1; + e(document).mouseup(function () { + t = !1 + }), e.widget("ui.mouse", { + version: "1.10.3", + options: {cancel: "input,textarea,button,select,option", distance: 1, delay: 0}, + _mouseInit: function () { + var t = this; + this.element.bind("mousedown." + this.widgetName, function (e) { + return t._mouseDown(e) + }).bind("click." + this.widgetName, function (i) { + return !0 === e.data(i.target, t.widgetName + ".preventClickEvent") ? (e.removeData(i.target, t.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) : undefined + }), this.started = !1 + }, + _mouseDestroy: function () { + this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate) + }, + _mouseDown: function (i) { + if (!t) { + this._mouseStarted && this._mouseUp(i), this._mouseDownEvent = i; + var s = this, n = 1 === i.which, + a = "string" == typeof this.options.cancel && i.target.nodeName ? e(i.target).closest(this.options.cancel).length : !1; + return n && !a && this._mouseCapture(i) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { + s.mouseDelayMet = !0 + }, this.options.delay)), this._mouseDistanceMet(i) && this._mouseDelayMet(i) && (this._mouseStarted = this._mouseStart(i) !== !1, !this._mouseStarted) ? (i.preventDefault(), !0) : (!0 === e.data(i.target, this.widgetName + ".preventClickEvent") && e.removeData(i.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (e) { + return s._mouseMove(e) + }, this._mouseUpDelegate = function (e) { + return s._mouseUp(e) + }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), i.preventDefault(), t = !0, !0)) : !0 + } + }, + _mouseMove: function (t) { + return e.ui.ie && (!document.documentMode || 9 > document.documentMode) && !t.button ? this._mouseUp(t) : this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) + }, + _mouseUp: function (t) { + return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1 + }, + _mouseDistanceMet: function (e) { + return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance + }, + _mouseDelayMet: function () { + return this.mouseDelayMet + }, + _mouseStart: function () { + }, + _mouseDrag: function () { + }, + _mouseStop: function () { + }, + _mouseCapture: function () { + return !0 + } + }) +})(jQuery); +(function (e) { + e.widget("ui.draggable", e.ui.mouse, { + version: "1.10.3", + widgetEventPrefix: "drag", + options: { + addClasses: !0, + appendTo: "parent", + axis: !1, + connectToSortable: !1, + containment: !1, + cursor: "auto", + cursorAt: !1, + grid: !1, + handle: !1, + helper: "original", + iframeFix: !1, + opacity: !1, + refreshPositions: !1, + revert: !1, + revertDuration: 500, + scope: "default", + scroll: !0, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: !1, + snapMode: "both", + snapTolerance: 20, + stack: !1, + zIndex: !1, + drag: null, + start: null, + stop: null + }, + _create: function () { + "original" !== this.options.helper || /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit() + }, + _destroy: function () { + this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy() + }, + _mouseCapture: function (t) { + var i = this.options; + return this.helper || i.disabled || e(t.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(t), this.handle ? (e(i.iframeFix === !0 ? "iframe" : i.iframeFix).each(function () { + e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({ + width: this.offsetWidth + "px", + height: this.offsetHeight + "px", + position: "absolute", + opacity: "0.001", + zIndex: 1e3 + }).css(e(this).offset()).appendTo("body") + }), !0) : !1) + }, + _mouseStart: function (t) { + var i = this.options; + return this.helper = this._createHelper(t), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), e.ui.ddmanager && (e.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offsetParent = this.helper.offsetParent(), this.offsetParentCssPosition = this.offsetParent.css("position"), this.offset = this.positionAbs = this.element.offset(), this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }, this.offset.scroll = !1, e.extend(this.offset, { + click: { + left: t.pageX - this.offset.left, + top: t.pageY - this.offset.top + }, parent: this._getParentOffset(), relative: this._getRelativeOffset() + }), this.originalPosition = this.position = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), !0) + }, + _mouseDrag: function (t, i) { + if ("fixed" === this.offsetParentCssPosition && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"), !i) { + var s = this._uiHash(); + if (this._trigger("drag", t, s) === !1) return this._mouseUp({}), !1; + this.position = s.position + } + return this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1 + }, + _mouseStop: function (t) { + var i = this, s = !1; + return e.ui.ddmanager && !this.options.dropBehaviour && (s = e.ui.ddmanager.drop(this, t)), this.dropped && (s = this.dropped, this.dropped = !1), "original" !== this.options.helper || e.contains(this.element[0].ownerDocument, this.element[0]) ? ("invalid" === this.options.revert && !s || "valid" === this.options.revert && s || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, s) ? e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { + i._trigger("stop", t) !== !1 && i._clear() + }) : this._trigger("stop", t) !== !1 && this._clear(), !1) : !1 + }, + _mouseUp: function (t) { + return e("div.ui-draggable-iframeFix").each(function () { + this.parentNode.removeChild(this) + }), e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), e.ui.mouse.prototype._mouseUp.call(this, t) + }, + cancel: function () { + return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this + }, + _getHandle: function (t) { + return this.options.handle ? !!e(t.target).closest(this.element.find(this.options.handle)).length : !0 + }, + _createHelper: function (t) { + var i = this.options, + s = e.isFunction(i.helper) ? e(i.helper.apply(this.element[0], [t])) : "clone" === i.helper ? this.element.clone().removeAttr("id") : this.element; + return s.parents("body").length || s.appendTo("parent" === i.appendTo ? this.element[0].parentNode : i.appendTo), s[0] === this.element[0] || /(fixed|absolute)/.test(s.css("position")) || s.css("position", "absolute"), s + }, + _adjustOffsetFromHelper: function (t) { + "string" == typeof t && (t = t.split(" ")), e.isArray(t) && (t = { + left: +t[0], + top: +t[1] || 0 + }), "left" in t && (this.offset.click.left = t.left + this.margins.left), "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left), "top" in t && (this.offset.click.top = t.top + this.margins.top), "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) + }, + _getParentOffset: function () { + var t = this.offsetParent.offset(); + return "absolute" === this.cssPosition && this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && e.ui.ie) && (t = { + top: 0, + left: 0 + }), { + top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) + } + }, + _getRelativeOffset: function () { + if ("relative" === this.cssPosition) { + var e = this.element.position(); + return { + top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), + left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() + } + } + return {top: 0, left: 0} + }, + _cacheMargins: function () { + this.margins = { + left: parseInt(this.element.css("marginLeft"), 10) || 0, + top: parseInt(this.element.css("marginTop"), 10) || 0, + right: parseInt(this.element.css("marginRight"), 10) || 0, + bottom: parseInt(this.element.css("marginBottom"), 10) || 0 + } + }, + _cacheHelperProportions: function () { + this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} + }, + _setContainment: function () { + var t, i, s, n = this.options; + return n.containment ? "window" === n.containment ? (this.containment = [e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, e(window).scrollLeft() + e(window).width() - this.helperProportions.width - this.margins.left, e(window).scrollTop() + (e(window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], undefined) : "document" === n.containment ? (this.containment = [0, 0, e(document).width() - this.helperProportions.width - this.margins.left, (e(document).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], undefined) : n.containment.constructor === Array ? (this.containment = n.containment, undefined) : ("parent" === n.containment && (n.containment = this.helper[0].parentNode), i = e(n.containment), s = i[0], s && (t = "hidden" !== i.css("overflow"), this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) + (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"), 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (t ? Math.max(s.scrollWidth, s.offsetWidth) : s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) || 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t ? Math.max(s.scrollHeight, s.offsetHeight) : s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = i), undefined) : (this.containment = null, undefined) + }, + _convertPositionTo: function (t, i) { + i || (i = this.position); + var s = "absolute" === t ? 1 : -1, + n = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent; + return this.offset.scroll || (this.offset.scroll = { + top: n.scrollTop(), + left: n.scrollLeft() + }), { + top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top) * s, + left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left) * s + } + }, + _generatePosition: function (t) { + var i, s, n, a, o = this.options, + r = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, + h = t.pageX, l = t.pageY; + return this.offset.scroll || (this.offset.scroll = { + top: r.scrollTop(), + left: r.scrollLeft() + }), this.originalPosition && (this.containment && (this.relative_container ? (s = this.relative_container.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment, t.pageX - this.offset.click.left < i[0] && (h = i[0] + this.offset.click.left), t.pageY - this.offset.click.top < i[1] && (l = i[1] + this.offset.click.top), t.pageX - this.offset.click.left > i[2] && (h = i[2] + this.offset.click.left), t.pageY - this.offset.click.top > i[3] && (l = i[3] + this.offset.click.top)), o.grid && (n = o.grid[1] ? this.originalPageY + Math.round((l - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY, l = i ? n - this.offset.click.top >= i[1] || n - this.offset.click.top > i[3] ? n : n - this.offset.click.top >= i[1] ? n - o.grid[1] : n + o.grid[1] : n, a = o.grid[0] ? this.originalPageX + Math.round((h - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX, h = i ? a - this.offset.click.left >= i[0] || a - this.offset.click.left > i[2] ? a : a - this.offset.click.left >= i[0] ? a - o.grid[0] : a + o.grid[0] : a)), { + top: l - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top), + left: h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left) + } + }, + _clear: function () { + this.helper.removeClass("ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1 + }, + _trigger: function (t, i, s) { + return s = s || this._uiHash(), e.ui.plugin.call(this, t, [i, s]), "drag" === t && (this.positionAbs = this._convertPositionTo("absolute")), e.Widget.prototype._trigger.call(this, t, i, s) + }, + plugins: {}, + _uiHash: function () { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + } + } + }), e.ui.plugin.add("draggable", "connectToSortable", { + start: function (t, i) { + var s = e(this).data("ui-draggable"), n = s.options, a = e.extend({}, i, {item: s.element}); + s.sortables = [], e(n.connectToSortable).each(function () { + var i = e.data(this, "ui-sortable"); + i && !i.options.disabled && (s.sortables.push({ + instance: i, + shouldRevert: i.options.revert + }), i.refreshPositions(), i._trigger("activate", t, a)) + }) + }, stop: function (t, i) { + var s = e(this).data("ui-draggable"), n = e.extend({}, i, {item: s.element}); + e.each(s.sortables, function () { + this.instance.isOver ? (this.instance.isOver = 0, s.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = this.shouldRevert), this.instance._mouseStop(t), this.instance.options.helper = this.instance.options._helper, "original" === s.options.helper && this.instance.currentItem.css({ + top: "auto", + left: "auto" + })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", t, n)) + }) + }, drag: function (t, i) { + var s = e(this).data("ui-draggable"), n = this; + e.each(s.sortables, function () { + var a = !1, o = this; + this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions, this.instance.offset.click = s.offset.click, this.instance._intersectsWith(this.instance.containerCache) && (a = !0, e.each(s.sortables, function () { + return this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions, this.instance.offset.click = s.offset.click, this !== o && this.instance._intersectsWith(this.instance.containerCache) && e.contains(o.instance.element[0], this.instance.element[0]) && (a = !1), a + })), a ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function () { + return i.helper[0] + }, t.target = this.instance.currentItem[0], this.instance._mouseCapture(t, !0), this.instance._mouseStart(t, !0, !0), this.instance.offset.click.top = s.offset.click.top, this.instance.offset.click.left = s.offset.click.left, this.instance.offset.parent.left -= s.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= s.offset.parent.top - this.instance.offset.parent.top, s._trigger("toSortable", t), s.dropped = this.instance.element, s.currentItem = s.element, this.instance.fromOutside = s), this.instance.currentItem && this.instance._mouseDrag(t)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", t, this.instance._uiHash(this.instance)), this.instance._mouseStop(t, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), s._trigger("fromSortable", t), s.dropped = !1) + }) + } + }), e.ui.plugin.add("draggable", "cursor", { + start: function () { + var t = e("body"), i = e(this).data("ui-draggable").options; + t.css("cursor") && (i._cursor = t.css("cursor")), t.css("cursor", i.cursor) + }, stop: function () { + var t = e(this).data("ui-draggable").options; + t._cursor && e("body").css("cursor", t._cursor) + } + }), e.ui.plugin.add("draggable", "opacity", { + start: function (t, i) { + var s = e(i.helper), n = e(this).data("ui-draggable").options; + s.css("opacity") && (n._opacity = s.css("opacity")), s.css("opacity", n.opacity) + }, stop: function (t, i) { + var s = e(this).data("ui-draggable").options; + s._opacity && e(i.helper).css("opacity", s._opacity) + } + }), e.ui.plugin.add("draggable", "scroll", { + start: function () { + var t = e(this).data("ui-draggable"); + t.scrollParent[0] !== document && "HTML" !== t.scrollParent[0].tagName && (t.overflowOffset = t.scrollParent.offset()) + }, drag: function (t) { + var i = e(this).data("ui-draggable"), s = i.options, n = !1; + i.scrollParent[0] !== document && "HTML" !== i.scrollParent[0].tagName ? (s.axis && "x" === s.axis || (i.overflowOffset.top + i.scrollParent[0].offsetHeight - t.pageY < s.scrollSensitivity ? i.scrollParent[0].scrollTop = n = i.scrollParent[0].scrollTop + s.scrollSpeed : t.pageY - i.overflowOffset.top < s.scrollSensitivity && (i.scrollParent[0].scrollTop = n = i.scrollParent[0].scrollTop - s.scrollSpeed)), s.axis && "y" === s.axis || (i.overflowOffset.left + i.scrollParent[0].offsetWidth - t.pageX < s.scrollSensitivity ? i.scrollParent[0].scrollLeft = n = i.scrollParent[0].scrollLeft + s.scrollSpeed : t.pageX - i.overflowOffset.left < s.scrollSensitivity && (i.scrollParent[0].scrollLeft = n = i.scrollParent[0].scrollLeft - s.scrollSpeed))) : (s.axis && "x" === s.axis || (t.pageY - e(document).scrollTop() < s.scrollSensitivity ? n = e(document).scrollTop(e(document).scrollTop() - s.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < s.scrollSensitivity && (n = e(document).scrollTop(e(document).scrollTop() + s.scrollSpeed))), s.axis && "y" === s.axis || (t.pageX - e(document).scrollLeft() < s.scrollSensitivity ? n = e(document).scrollLeft(e(document).scrollLeft() - s.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < s.scrollSensitivity && (n = e(document).scrollLeft(e(document).scrollLeft() + s.scrollSpeed)))), n !== !1 && e.ui.ddmanager && !s.dropBehaviour && e.ui.ddmanager.prepareOffsets(i, t) + } + }), e.ui.plugin.add("draggable", "snap", { + start: function () { + var t = e(this).data("ui-draggable"), i = t.options; + t.snapElements = [], e(i.snap.constructor !== String ? i.snap.items || ":data(ui-draggable)" : i.snap).each(function () { + var i = e(this), s = i.offset(); + this !== t.element[0] && t.snapElements.push({ + item: this, + width: i.outerWidth(), + height: i.outerHeight(), + top: s.top, + left: s.left + }) + }) + }, drag: function (t, i) { + var s, n, a, o, r, h, l, u, c, d, p = e(this).data("ui-draggable"), f = p.options, m = f.snapTolerance, + g = i.offset.left, v = g + p.helperProportions.width, b = i.offset.top, + y = b + p.helperProportions.height; + for (c = p.snapElements.length - 1; c >= 0; c--) r = p.snapElements[c].left, h = r + p.snapElements[c].width, l = p.snapElements[c].top, u = l + p.snapElements[c].height, r - m > v || g > h + m || l - m > y || b > u + m || !e.contains(p.snapElements[c].item.ownerDocument, p.snapElements[c].item) ? (p.snapElements[c].snapping && p.options.snap.release && p.options.snap.release.call(p.element, t, e.extend(p._uiHash(), {snapItem: p.snapElements[c].item})), p.snapElements[c].snapping = !1) : ("inner" !== f.snapMode && (s = m >= Math.abs(l - y), n = m >= Math.abs(u - b), a = m >= Math.abs(r - v), o = m >= Math.abs(h - g), s && (i.position.top = p._convertPositionTo("relative", { + top: l - p.helperProportions.height, + left: 0 + }).top - p.margins.top), n && (i.position.top = p._convertPositionTo("relative", { + top: u, + left: 0 + }).top - p.margins.top), a && (i.position.left = p._convertPositionTo("relative", { + top: 0, + left: r - p.helperProportions.width + }).left - p.margins.left), o && (i.position.left = p._convertPositionTo("relative", { + top: 0, + left: h + }).left - p.margins.left)), d = s || n || a || o, "outer" !== f.snapMode && (s = m >= Math.abs(l - b), n = m >= Math.abs(u - y), a = m >= Math.abs(r - g), o = m >= Math.abs(h - v), s && (i.position.top = p._convertPositionTo("relative", { + top: l, + left: 0 + }).top - p.margins.top), n && (i.position.top = p._convertPositionTo("relative", { + top: u - p.helperProportions.height, + left: 0 + }).top - p.margins.top), a && (i.position.left = p._convertPositionTo("relative", { + top: 0, + left: r + }).left - p.margins.left), o && (i.position.left = p._convertPositionTo("relative", { + top: 0, + left: h - p.helperProportions.width + }).left - p.margins.left)), !p.snapElements[c].snapping && (s || n || a || o || d) && p.options.snap.snap && p.options.snap.snap.call(p.element, t, e.extend(p._uiHash(), {snapItem: p.snapElements[c].item})), p.snapElements[c].snapping = s || n || a || o || d) + } + }), e.ui.plugin.add("draggable", "stack", { + start: function () { + var t, i = this.data("ui-draggable").options, s = e.makeArray(e(i.stack)).sort(function (t, i) { + return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(i).css("zIndex"), 10) || 0) + }); + s.length && (t = parseInt(e(s[0]).css("zIndex"), 10) || 0, e(s).each(function (i) { + e(this).css("zIndex", t + i) + }), this.css("zIndex", t + s.length)) + } + }), e.ui.plugin.add("draggable", "zIndex", { + start: function (t, i) { + var s = e(i.helper), n = e(this).data("ui-draggable").options; + s.css("zIndex") && (n._zIndex = s.css("zIndex")), s.css("zIndex", n.zIndex) + }, stop: function (t, i) { + var s = e(this).data("ui-draggable").options; + s._zIndex && e(i.helper).css("zIndex", s._zIndex) + } + }) +})(jQuery); +(function (e) { + function t(e, t, i) { + return e > t && t + i > e + } + + e.widget("ui.droppable", { + version: "1.10.3", + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: !1, + addClasses: !0, + greedy: !1, + hoverClass: !1, + scope: "default", + tolerance: "intersect", + activate: null, + deactivate: null, + drop: null, + out: null, + over: null + }, + _create: function () { + var t = this.options, i = t.accept; + this.isover = !1, this.isout = !0, this.accept = e.isFunction(i) ? i : function (e) { + return e.is(i) + }, this.proportions = { + width: this.element[0].offsetWidth, + height: this.element[0].offsetHeight + }, e.ui.ddmanager.droppables[t.scope] = e.ui.ddmanager.droppables[t.scope] || [], e.ui.ddmanager.droppables[t.scope].push(this), t.addClasses && this.element.addClass("ui-droppable") + }, + _destroy: function () { + for (var t = 0, i = e.ui.ddmanager.droppables[this.options.scope]; i.length > t; t++) i[t] === this && i.splice(t, 1); + this.element.removeClass("ui-droppable ui-droppable-disabled") + }, + _setOption: function (t, i) { + "accept" === t && (this.accept = e.isFunction(i) ? i : function (e) { + return e.is(i) + }), e.Widget.prototype._setOption.apply(this, arguments) + }, + _activate: function (t) { + var i = e.ui.ddmanager.current; + this.options.activeClass && this.element.addClass(this.options.activeClass), i && this._trigger("activate", t, this.ui(i)) + }, + _deactivate: function (t) { + var i = e.ui.ddmanager.current; + this.options.activeClass && this.element.removeClass(this.options.activeClass), i && this._trigger("deactivate", t, this.ui(i)) + }, + _over: function (t) { + var i = e.ui.ddmanager.current; + i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", t, this.ui(i))) + }, + _out: function (t) { + var i = e.ui.ddmanager.current; + i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", t, this.ui(i))) + }, + _drop: function (t, i) { + var s = i || e.ui.ddmanager.current, n = !1; + return s && (s.currentItem || s.element)[0] !== this.element[0] ? (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () { + var t = e.data(this, "ui-droppable"); + return t.options.greedy && !t.options.disabled && t.options.scope === s.options.scope && t.accept.call(t.element[0], s.currentItem || s.element) && e.ui.intersect(s, e.extend(t, {offset: t.element.offset()}), t.options.tolerance) ? (n = !0, !1) : undefined + }), n ? !1 : this.accept.call(this.element[0], s.currentItem || s.element) ? (this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", t, this.ui(s)), this.element) : !1) : !1 + }, + ui: function (e) { + return { + draggable: e.currentItem || e.element, + helper: e.helper, + position: e.position, + offset: e.positionAbs + } + } + }), e.ui.intersect = function (e, i, s) { + if (!i.offset) return !1; + var n, a, o = (e.positionAbs || e.position.absolute).left, r = o + e.helperProportions.width, + h = (e.positionAbs || e.position.absolute).top, l = h + e.helperProportions.height, u = i.offset.left, + c = u + i.proportions.width, d = i.offset.top, p = d + i.proportions.height; + switch (s) { + case"fit": + return o >= u && c >= r && h >= d && p >= l; + case"intersect": + return o + e.helperProportions.width / 2 > u && c > r - e.helperProportions.width / 2 && h + e.helperProportions.height / 2 > d && p > l - e.helperProportions.height / 2; + case"pointer": + return n = (e.positionAbs || e.position.absolute).left + (e.clickOffset || e.offset.click).left, a = (e.positionAbs || e.position.absolute).top + (e.clickOffset || e.offset.click).top, t(a, d, i.proportions.height) && t(n, u, i.proportions.width); + case"touch": + return (h >= d && p >= h || l >= d && p >= l || d > h && l > p) && (o >= u && c >= o || r >= u && c >= r || u > o && r > c); + default: + return !1 + } + }, e.ui.ddmanager = { + current: null, droppables: {"default": []}, prepareOffsets: function (t, i) { + var s, n, a = e.ui.ddmanager.droppables[t.options.scope] || [], o = i ? i.type : null, + r = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(); + e:for (s = 0; a.length > s; s++) if (!(a[s].options.disabled || t && !a[s].accept.call(a[s].element[0], t.currentItem || t.element))) { + for (n = 0; r.length > n; n++) if (r[n] === a[s].element[0]) { + a[s].proportions.height = 0; + continue e + } + a[s].visible = "none" !== a[s].element.css("display"), a[s].visible && ("mousedown" === o && a[s]._activate.call(a[s], i), a[s].offset = a[s].element.offset(), a[s].proportions = { + width: a[s].element[0].offsetWidth, + height: a[s].element[0].offsetHeight + }) + } + }, drop: function (t, i) { + var s = !1; + return e.each((e.ui.ddmanager.droppables[t.options.scope] || []).slice(), function () { + this.options && (!this.options.disabled && this.visible && e.ui.intersect(t, this, this.options.tolerance) && (s = this._drop.call(this, i) || s), !this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i))) + }), s + }, dragStart: function (t, i) { + t.element.parentsUntil("body").bind("scroll.droppable", function () { + t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i) + }) + }, drag: function (t, i) { + t.options.refreshPositions && e.ui.ddmanager.prepareOffsets(t, i), e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function () { + if (!this.options.disabled && !this.greedyChild && this.visible) { + var s, n, a, o = e.ui.intersect(t, this, this.options.tolerance), + r = !o && this.isover ? "isout" : o && !this.isover ? "isover" : null; + r && (this.options.greedy && (n = this.options.scope, a = this.element.parents(":data(ui-droppable)").filter(function () { + return e.data(this, "ui-droppable").options.scope === n + }), a.length && (s = e.data(a[0], "ui-droppable"), s.greedyChild = "isover" === r)), s && "isover" === r && (s.isover = !1, s.isout = !0, s._out.call(s, i)), this[r] = !0, this["isout" === r ? "isover" : "isout"] = !1, this["isover" === r ? "_over" : "_out"].call(this, i), s && "isout" === r && (s.isout = !1, s.isover = !0, s._over.call(s, i))) + } + }) + }, dragStop: function (t, i) { + t.element.parentsUntil("body").unbind("scroll.droppable"), t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i) + } + } +})(jQuery); +(function (e) { + function t(e) { + return parseInt(e, 10) || 0 + } + + function i(e) { + return !isNaN(parseInt(e, 10)) + } + + e.widget("ui.resizable", e.ui.mouse, { + version: "1.10.3", + widgetEventPrefix: "resize", + options: { + alsoResize: !1, + animate: !1, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: !1, + autoHide: !1, + containment: !1, + ghost: !1, + grid: !1, + handles: "e,s,se", + helper: !1, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + zIndex: 90, + resize: null, + start: null, + stop: null + }, + _create: function () { + var t, i, s, n, a, o = this, r = this.options; + if (this.element.addClass("ui-resizable"), e.extend(this, { + _aspectRatio: !!r.aspectRatio, + aspectRatio: r.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: r.helper || r.ghost || r.animate ? r.helper || "ui-resizable-helper" : null + }), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left") + })), this.element = this.element.parent().data("ui-resizable", this.element.data("ui-resizable")), this.elementIsWrapper = !0, this.element.css({ + marginLeft: this.originalElement.css("marginLeft"), + marginTop: this.originalElement.css("marginTop"), + marginRight: this.originalElement.css("marginRight"), + marginBottom: this.originalElement.css("marginBottom") + }), this.originalElement.css({ + marginLeft: 0, + marginTop: 0, + marginRight: 0, + marginBottom: 0 + }), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ + position: "static", + zoom: 1, + display: "block" + })), this.originalElement.css({margin: this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = r.handles || (e(".ui-resizable-handle", this.element).length ? { + n: ".ui-resizable-n", + e: ".ui-resizable-e", + s: ".ui-resizable-s", + w: ".ui-resizable-w", + se: ".ui-resizable-se", + sw: ".ui-resizable-sw", + ne: ".ui-resizable-ne", + nw: ".ui-resizable-nw" + } : "e,s,se"), this.handles.constructor === String) for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), t = this.handles.split(","), this.handles = {}, i = 0; t.length > i; i++) s = e.trim(t[i]), a = "ui-resizable-" + s, n = e("<div class='ui-resizable-handle " + a + "'></div>"), n.css({zIndex: r.zIndex}), "se" === s && n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(n); + this._renderAxis = function (t) { + var i, s, n, a; + t = t || this.element; + for (i in this.handles) this.handles[i].constructor === String && (this.handles[i] = e(this.handles[i], this.element).show()), this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i) && (s = e(this.handles[i], this.element), a = /sw|ne|nw|se|n|s/.test(i) ? s.outerHeight() : s.outerWidth(), n = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""), t.css(n, a), this._proportionallyResize()), e(this.handles[i]).length + }, this._renderAxis(this.element), this._handles = e(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function () { + o.resizing || (this.className && (n = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), o.axis = n && n[1] ? n[1] : "se") + }), r.autoHide && (this._handles.hide(), e(this.element).addClass("ui-resizable-autohide").mouseenter(function () { + r.disabled || (e(this).removeClass("ui-resizable-autohide"), o._handles.show()) + }).mouseleave(function () { + r.disabled || o.resizing || (e(this).addClass("ui-resizable-autohide"), o._handles.hide()) + })), this._mouseInit() + }, + _destroy: function () { + this._mouseDestroy(); + var t, i = function (t) { + e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove() + }; + return this.elementIsWrapper && (i(this.element), t = this.element, this.originalElement.css({ + position: t.css("position"), + width: t.outerWidth(), + height: t.outerHeight(), + top: t.css("top"), + left: t.css("left") + }).insertAfter(t), t.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this + }, + _mouseCapture: function (t) { + var i, s, n = !1; + for (i in this.handles) s = e(this.handles[i])[0], (s === t.target || e.contains(s, t.target)) && (n = !0); + return !this.options.disabled && n + }, + _mouseStart: function (i) { + var s, n, a, o = this.options, r = this.element.position(), h = this.element; + return this.resizing = !0, /absolute/.test(h.css("position")) ? h.css({ + position: "absolute", + top: h.css("top"), + left: h.css("left") + }) : h.is(".ui-draggable") && h.css({ + position: "absolute", + top: r.top, + left: r.left + }), this._renderProxy(), s = t(this.helper.css("left")), n = t(this.helper.css("top")), o.containment && (s += e(o.containment).scrollLeft() || 0, n += e(o.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { + left: s, + top: n + }, this.size = this._helper ? {width: h.outerWidth(), height: h.outerHeight()} : { + width: h.width(), + height: h.height() + }, this.originalSize = this._helper ? {width: h.outerWidth(), height: h.outerHeight()} : { + width: h.width(), + height: h.height() + }, this.originalPosition = {left: s, top: n}, this.sizeDiff = { + width: h.outerWidth() - h.width(), + height: h.outerHeight() - h.height() + }, this.originalMousePosition = { + left: i.pageX, + top: i.pageY + }, this.aspectRatio = "number" == typeof o.aspectRatio ? o.aspectRatio : this.originalSize.width / this.originalSize.height || 1, a = e(".ui-resizable-" + this.axis).css("cursor"), e("body").css("cursor", "auto" === a ? this.axis + "-resize" : a), h.addClass("ui-resizable-resizing"), this._propagate("start", i), !0 + }, + _mouseDrag: function (t) { + var i, s = this.helper, n = {}, a = this.originalMousePosition, o = this.axis, r = this.position.top, + h = this.position.left, l = this.size.width, u = this.size.height, c = t.pageX - a.left || 0, + d = t.pageY - a.top || 0, p = this._change[o]; + return p ? (i = p.apply(this, [t, c, d]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (i = this._updateRatio(i, t)), i = this._respectSize(i, t), this._updateCache(i), this._propagate("resize", t), this.position.top !== r && (n.top = this.position.top + "px"), this.position.left !== h && (n.left = this.position.left + "px"), this.size.width !== l && (n.width = this.size.width + "px"), this.size.height !== u && (n.height = this.size.height + "px"), s.css(n), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), e.isEmptyObject(n) || this._trigger("resize", t, this.ui()), !1) : !1 + }, + _mouseStop: function (t) { + this.resizing = !1; + var i, s, n, a, o, r, h, l = this.options, u = this; + return this._helper && (i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), n = s && e.ui.hasScroll(i[0], "left") ? 0 : u.sizeDiff.height, a = s ? 0 : u.sizeDiff.width, o = { + width: u.helper.width() - a, + height: u.helper.height() - n + }, r = parseInt(u.element.css("left"), 10) + (u.position.left - u.originalPosition.left) || null, h = parseInt(u.element.css("top"), 10) + (u.position.top - u.originalPosition.top) || null, l.animate || this.element.css(e.extend(o, { + top: h, + left: r + })), u.helper.height(u.size.height), u.helper.width(u.size.width), this._helper && !l.animate && this._proportionallyResize()), e("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1 + }, + _updateVirtualBoundaries: function (e) { + var t, s, n, a, o, r = this.options; + o = { + minWidth: i(r.minWidth) ? r.minWidth : 0, + maxWidth: i(r.maxWidth) ? r.maxWidth : 1 / 0, + minHeight: i(r.minHeight) ? r.minHeight : 0, + maxHeight: i(r.maxHeight) ? r.maxHeight : 1 / 0 + }, (this._aspectRatio || e) && (t = o.minHeight * this.aspectRatio, n = o.minWidth / this.aspectRatio, s = o.maxHeight * this.aspectRatio, a = o.maxWidth / this.aspectRatio, t > o.minWidth && (o.minWidth = t), n > o.minHeight && (o.minHeight = n), o.maxWidth > s && (o.maxWidth = s), o.maxHeight > a && (o.maxHeight = a)), this._vBoundaries = o + }, + _updateCache: function (e) { + this.offset = this.helper.offset(), i(e.left) && (this.position.left = e.left), i(e.top) && (this.position.top = e.top), i(e.height) && (this.size.height = e.height), i(e.width) && (this.size.width = e.width) + }, + _updateRatio: function (e) { + var t = this.position, s = this.size, n = this.axis; + return i(e.height) ? e.width = e.height * this.aspectRatio : i(e.width) && (e.height = e.width / this.aspectRatio), "sw" === n && (e.left = t.left + (s.width - e.width), e.top = null), "nw" === n && (e.top = t.top + (s.height - e.height), e.left = t.left + (s.width - e.width)), e + }, + _respectSize: function (e) { + var t = this._vBoundaries, s = this.axis, n = i(e.width) && t.maxWidth && t.maxWidth < e.width, + a = i(e.height) && t.maxHeight && t.maxHeight < e.height, + o = i(e.width) && t.minWidth && t.minWidth > e.width, + r = i(e.height) && t.minHeight && t.minHeight > e.height, + h = this.originalPosition.left + this.originalSize.width, l = this.position.top + this.size.height, + u = /sw|nw|w/.test(s), c = /nw|ne|n/.test(s); + return o && (e.width = t.minWidth), r && (e.height = t.minHeight), n && (e.width = t.maxWidth), a && (e.height = t.maxHeight), o && u && (e.left = h - t.minWidth), n && u && (e.left = h - t.maxWidth), r && c && (e.top = l - t.minHeight), a && c && (e.top = l - t.maxHeight), e.width || e.height || e.left || !e.top ? e.width || e.height || e.top || !e.left || (e.left = null) : e.top = null, e + }, + _proportionallyResize: function () { + if (this._proportionallyResizeElements.length) { + var e, t, i, s, n, a = this.helper || this.element; + for (e = 0; this._proportionallyResizeElements.length > e; e++) { + if (n = this._proportionallyResizeElements[e], !this.borderDif) for (this.borderDif = [], i = [n.css("borderTopWidth"), n.css("borderRightWidth"), n.css("borderBottomWidth"), n.css("borderLeftWidth")], s = [n.css("paddingTop"), n.css("paddingRight"), n.css("paddingBottom"), n.css("paddingLeft")], t = 0; i.length > t; t++) this.borderDif[t] = (parseInt(i[t], 10) || 0) + (parseInt(s[t], 10) || 0); + n.css({ + height: a.height() - this.borderDif[0] - this.borderDif[2] || 0, + width: a.width() - this.borderDif[1] - this.borderDif[3] || 0 + }) + } + } + }, + _renderProxy: function () { + var t = this.element, i = this.options; + this.elementOffset = t.offset(), this._helper ? (this.helper = this.helper || e("<div style='overflow:hidden;'></div>"), this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() - 1, + height: this.element.outerHeight() - 1, + position: "absolute", + left: this.elementOffset.left + "px", + top: this.elementOffset.top + "px", + zIndex: ++i.zIndex + }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element + }, + _change: { + e: function (e, t) { + return {width: this.originalSize.width + t} + }, w: function (e, t) { + var i = this.originalSize, s = this.originalPosition; + return {left: s.left + t, width: i.width - t} + }, n: function (e, t, i) { + var s = this.originalSize, n = this.originalPosition; + return {top: n.top + i, height: s.height - i} + }, s: function (e, t, i) { + return {height: this.originalSize.height + i} + }, se: function (t, i, s) { + return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, i, s])) + }, sw: function (t, i, s) { + return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, i, s])) + }, ne: function (t, i, s) { + return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, i, s])) + }, nw: function (t, i, s) { + return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, i, s])) + } + }, + _propagate: function (t, i) { + e.ui.plugin.call(this, t, [i, this.ui()]), "resize" !== t && this._trigger(t, i, this.ui()) + }, + plugins: {}, + ui: function () { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + } + } + }), e.ui.plugin.add("resizable", "animate", { + stop: function (t) { + var i = e(this).data("ui-resizable"), s = i.options, n = i._proportionallyResizeElements, + a = n.length && /textarea/i.test(n[0].nodeName), + o = a && e.ui.hasScroll(n[0], "left") ? 0 : i.sizeDiff.height, r = a ? 0 : i.sizeDiff.width, + h = {width: i.size.width - r, height: i.size.height - o}, + l = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) || null, + u = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null; + i.element.animate(e.extend(h, u && l ? {top: u, left: l} : {}), { + duration: s.animateDuration, + easing: s.animateEasing, + step: function () { + var s = { + width: parseInt(i.element.css("width"), 10), + height: parseInt(i.element.css("height"), 10), + top: parseInt(i.element.css("top"), 10), + left: parseInt(i.element.css("left"), 10) + }; + n && n.length && e(n[0]).css({ + width: s.width, + height: s.height + }), i._updateCache(s), i._propagate("resize", t) + } + }) + } + }), e.ui.plugin.add("resizable", "containment", { + start: function () { + var i, s, n, a, o, r, h, l = e(this).data("ui-resizable"), u = l.options, c = l.element, d = u.containment, + p = d instanceof e ? d.get(0) : /parent/.test(d) ? c.parent().get(0) : d; + p && (l.containerElement = e(p), /document/.test(d) || d === document ? (l.containerOffset = { + left: 0, + top: 0 + }, l.containerPosition = {left: 0, top: 0}, l.parentData = { + element: e(document), + left: 0, + top: 0, + width: e(document).width(), + height: e(document).height() || document.body.parentNode.scrollHeight + }) : (i = e(p), s = [], e(["Top", "Right", "Left", "Bottom"]).each(function (e, n) { + s[e] = t(i.css("padding" + n)) + }), l.containerOffset = i.offset(), l.containerPosition = i.position(), l.containerSize = { + height: i.innerHeight() - s[3], + width: i.innerWidth() - s[1] + }, n = l.containerOffset, a = l.containerSize.height, o = l.containerSize.width, r = e.ui.hasScroll(p, "left") ? p.scrollWidth : o, h = e.ui.hasScroll(p) ? p.scrollHeight : a, l.parentData = { + element: p, + left: n.left, + top: n.top, + width: r, + height: h + })) + }, resize: function (t) { + var i, s, n, a, o = e(this).data("ui-resizable"), r = o.options, h = o.containerOffset, l = o.position, + u = o._aspectRatio || t.shiftKey, c = {top: 0, left: 0}, d = o.containerElement; + d[0] !== document && /static/.test(d.css("position")) && (c = h), l.left < (o._helper ? h.left : 0) && (o.size.width = o.size.width + (o._helper ? o.position.left - h.left : o.position.left - c.left), u && (o.size.height = o.size.width / o.aspectRatio), o.position.left = r.helper ? h.left : 0), l.top < (o._helper ? h.top : 0) && (o.size.height = o.size.height + (o._helper ? o.position.top - h.top : o.position.top), u && (o.size.width = o.size.height * o.aspectRatio), o.position.top = o._helper ? h.top : 0), o.offset.left = o.parentData.left + o.position.left, o.offset.top = o.parentData.top + o.position.top, i = Math.abs((o._helper ? o.offset.left - c.left : o.offset.left - c.left) + o.sizeDiff.width), s = Math.abs((o._helper ? o.offset.top - c.top : o.offset.top - h.top) + o.sizeDiff.height), n = o.containerElement.get(0) === o.element.parent().get(0), a = /relative|absolute/.test(o.containerElement.css("position")), n && a && (i -= o.parentData.left), i + o.size.width >= o.parentData.width && (o.size.width = o.parentData.width - i, u && (o.size.height = o.size.width / o.aspectRatio)), s + o.size.height >= o.parentData.height && (o.size.height = o.parentData.height - s, u && (o.size.width = o.size.height * o.aspectRatio)) + }, stop: function () { + var t = e(this).data("ui-resizable"), i = t.options, s = t.containerOffset, n = t.containerPosition, + a = t.containerElement, o = e(t.helper), r = o.offset(), h = o.outerWidth() - t.sizeDiff.width, + l = o.outerHeight() - t.sizeDiff.height; + t._helper && !i.animate && /relative/.test(a.css("position")) && e(this).css({ + left: r.left - n.left - s.left, + width: h, + height: l + }), t._helper && !i.animate && /static/.test(a.css("position")) && e(this).css({ + left: r.left - n.left - s.left, + width: h, + height: l + }) + } + }), e.ui.plugin.add("resizable", "alsoResize", { + start: function () { + var t = e(this).data("ui-resizable"), i = t.options, s = function (t) { + e(t).each(function () { + var t = e(this); + t.data("ui-resizable-alsoresize", { + width: parseInt(t.width(), 10), + height: parseInt(t.height(), 10), + left: parseInt(t.css("left"), 10), + top: parseInt(t.css("top"), 10) + }) + }) + }; + "object" != typeof i.alsoResize || i.alsoResize.parentNode ? s(i.alsoResize) : i.alsoResize.length ? (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : e.each(i.alsoResize, function (e) { + s(e) + }) + }, resize: function (t, i) { + var s = e(this).data("ui-resizable"), n = s.options, a = s.originalSize, o = s.originalPosition, r = { + height: s.size.height - a.height || 0, + width: s.size.width - a.width || 0, + top: s.position.top - o.top || 0, + left: s.position.left - o.left || 0 + }, h = function (t, s) { + e(t).each(function () { + var t = e(this), n = e(this).data("ui-resizable-alsoresize"), a = {}, + o = s && s.length ? s : t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; + e.each(o, function (e, t) { + var i = (n[t] || 0) + (r[t] || 0); + i && i >= 0 && (a[t] = i || null) + }), t.css(a) + }) + }; + "object" != typeof n.alsoResize || n.alsoResize.nodeType ? h(n.alsoResize) : e.each(n.alsoResize, function (e, t) { + h(e, t) + }) + }, stop: function () { + e(this).removeData("resizable-alsoresize") + } + }), e.ui.plugin.add("resizable", "ghost", { + start: function () { + var t = e(this).data("ui-resizable"), i = t.options, s = t.size; + t.ghost = t.originalElement.clone(), t.ghost.css({ + opacity: .25, + display: "block", + position: "relative", + height: s.height, + width: s.width, + margin: 0, + left: 0, + top: 0 + }).addClass("ui-resizable-ghost").addClass("string" == typeof i.ghost ? i.ghost : ""), t.ghost.appendTo(t.helper) + }, resize: function () { + var t = e(this).data("ui-resizable"); + t.ghost && t.ghost.css({position: "relative", height: t.size.height, width: t.size.width}) + }, stop: function () { + var t = e(this).data("ui-resizable"); + t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0)) + } + }), e.ui.plugin.add("resizable", "grid", { + resize: function () { + var t = e(this).data("ui-resizable"), i = t.options, s = t.size, n = t.originalSize, a = t.originalPosition, + o = t.axis, r = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid, h = r[0] || 1, l = r[1] || 1, + u = Math.round((s.width - n.width) / h) * h, c = Math.round((s.height - n.height) / l) * l, + d = n.width + u, p = n.height + c, f = i.maxWidth && d > i.maxWidth, m = i.maxHeight && p > i.maxHeight, + g = i.minWidth && i.minWidth > d, v = i.minHeight && i.minHeight > p; + i.grid = r, g && (d += h), v && (p += l), f && (d -= h), m && (p -= l), /^(se|s|e)$/.test(o) ? (t.size.width = d, t.size.height = p) : /^(ne)$/.test(o) ? (t.size.width = d, t.size.height = p, t.position.top = a.top - c) : /^(sw)$/.test(o) ? (t.size.width = d, t.size.height = p, t.position.left = a.left - u) : (t.size.width = d, t.size.height = p, t.position.top = a.top - c, t.position.left = a.left - u) + } + }) +})(jQuery); +(function (e) { + e.widget("ui.selectable", e.ui.mouse, { + version: "1.10.3", + options: { + appendTo: "body", + autoRefresh: !0, + distance: 0, + filter: "*", + tolerance: "touch", + selected: null, + selecting: null, + start: null, + stop: null, + unselected: null, + unselecting: null + }, + _create: function () { + var t, i = this; + this.element.addClass("ui-selectable"), this.dragged = !1, this.refresh = function () { + t = e(i.options.filter, i.element[0]), t.addClass("ui-selectee"), t.each(function () { + var t = e(this), i = t.offset(); + e.data(this, "selectable-item", { + element: this, + $element: t, + left: i.left, + top: i.top, + right: i.left + t.outerWidth(), + bottom: i.top + t.outerHeight(), + startselected: !1, + selected: t.hasClass("ui-selected"), + selecting: t.hasClass("ui-selecting"), + unselecting: t.hasClass("ui-unselecting") + }) + }) + }, this.refresh(), this.selectees = t.addClass("ui-selectee"), this._mouseInit(), this.helper = e("<div class='ui-selectable-helper'></div>") + }, + _destroy: function () { + this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled"), this._mouseDestroy() + }, + _mouseStart: function (t) { + var i = this, s = this.options; + this.opos = [t.pageX, t.pageY], this.options.disabled || (this.selectees = e(s.filter, this.element[0]), this._trigger("start", t), e(s.appendTo).append(this.helper), this.helper.css({ + left: t.pageX, + top: t.pageY, + width: 0, + height: 0 + }), s.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { + var s = e.data(this, "selectable-item"); + s.startselected = !0, t.metaKey || t.ctrlKey || (s.$element.removeClass("ui-selected"), s.selected = !1, s.$element.addClass("ui-unselecting"), s.unselecting = !0, i._trigger("unselecting", t, {unselecting: s.element})) + }), e(t.target).parents().addBack().each(function () { + var s, n = e.data(this, "selectable-item"); + return n ? (s = !t.metaKey && !t.ctrlKey || !n.$element.hasClass("ui-selected"), n.$element.removeClass(s ? "ui-unselecting" : "ui-selected").addClass(s ? "ui-selecting" : "ui-unselecting"), n.unselecting = !s, n.selecting = s, n.selected = s, s ? i._trigger("selecting", t, {selecting: n.element}) : i._trigger("unselecting", t, {unselecting: n.element}), !1) : undefined + })) + }, + _mouseDrag: function (t) { + if (this.dragged = !0, !this.options.disabled) { + var i, s = this, n = this.options, a = this.opos[0], o = this.opos[1], r = t.pageX, h = t.pageY; + return a > r && (i = r, r = a, a = i), o > h && (i = h, h = o, o = i), this.helper.css({ + left: a, + top: o, + width: r - a, + height: h - o + }), this.selectees.each(function () { + var i = e.data(this, "selectable-item"), l = !1; + i && i.element !== s.element[0] && ("touch" === n.tolerance ? l = !(i.left > r || a > i.right || i.top > h || o > i.bottom) : "fit" === n.tolerance && (l = i.left > a && r > i.right && i.top > o && h > i.bottom), l ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, s._trigger("selecting", t, {selecting: i.element}))) : (i.selecting && ((t.metaKey || t.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), s._trigger("unselecting", t, {unselecting: i.element}))), i.selected && (t.metaKey || t.ctrlKey || i.startselected || (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, s._trigger("unselecting", t, {unselecting: i.element}))))) + }), !1 + } + }, + _mouseStop: function (t) { + var i = this; + return this.dragged = !1, e(".ui-unselecting", this.element[0]).each(function () { + var s = e.data(this, "selectable-item"); + s.$element.removeClass("ui-unselecting"), s.unselecting = !1, s.startselected = !1, i._trigger("unselected", t, {unselected: s.element}) + }), e(".ui-selecting", this.element[0]).each(function () { + var s = e.data(this, "selectable-item"); + s.$element.removeClass("ui-selecting").addClass("ui-selected"), s.selecting = !1, s.selected = !0, s.startselected = !0, i._trigger("selected", t, {selected: s.element}) + }), this._trigger("stop", t), this.helper.remove(), !1 + } + }) +})(jQuery); +(function (t) { + function e(t, e, i) { + return t > e && e + i > t + } + + function i(t) { + return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display")) + } + + t.widget("ui.sortable", t.ui.mouse, { + version: "1.10.3", + widgetEventPrefix: "sort", + ready: !1, + options: { + appendTo: "parent", + axis: !1, + connectWith: !1, + containment: !1, + cursor: "auto", + cursorAt: !1, + dropOnEmpty: !0, + forcePlaceholderSize: !1, + forceHelperSize: !1, + grid: !1, + handle: !1, + helper: "original", + items: "> *", + opacity: !1, + placeholder: !1, + revert: !1, + scroll: !0, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1e3, + activate: null, + beforeStop: null, + change: null, + deactivate: null, + out: null, + over: null, + receive: null, + remove: null, + sort: null, + start: null, + stop: null, + update: null + }, + _create: function () { + var t = this.options; + this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.floating = this.items.length ? "x" === t.axis || i(this.items[0].item) : !1, this.offset = this.element.offset(), this._mouseInit(), this.ready = !0 + }, + _destroy: function () { + this.element.removeClass("ui-sortable ui-sortable-disabled"), this._mouseDestroy(); + for (var t = this.items.length - 1; t >= 0; t--) this.items[t].item.removeData(this.widgetName + "-item"); + return this + }, + _setOption: function (e, i) { + "disabled" === e ? (this.options[e] = i, this.widget().toggleClass("ui-sortable-disabled", !!i)) : t.Widget.prototype._setOption.apply(this, arguments) + }, + _mouseCapture: function (e, i) { + var s = null, n = !1, a = this; + return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(e), t(e.target).parents().each(function () { + return t.data(this, a.widgetName + "-item") === a ? (s = t(this), !1) : undefined + }), t.data(e.target, a.widgetName + "-item") === a && (s = t(e.target)), s ? !this.options.handle || i || (t(this.options.handle, s).find("*").addBack().each(function () { + this === e.target && (n = !0) + }), n) ? (this.currentItem = s, this._removeCurrentsFromItems(), !0) : !1 : !1) + }, + _mouseStart: function (e, i, s) { + var n, a, o = this.options; + if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }, t.extend(this.offset, { + click: {left: e.pageX - this.offset.left, top: e.pageY - this.offset.top}, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() + }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY = e.pageY, o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt), this.domPosition = { + prev: this.currentItem.prev()[0], + parent: this.currentItem.parent()[0] + }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), o.containment && this._setContainment(), o.cursor && "auto" !== o.cursor && (a = this.document.find("body"), this.storedCursor = a.css("cursor"), a.css("cursor", o.cursor), this.storedStylesheet = t("<style>*{ cursor: " + o.cursor + " !important; }</style>").appendTo(a)), o.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", o.opacity)), o.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", o.zIndex)), this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", e, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !s) for (n = this.containers.length - 1; n >= 0; n--) this.containers[n]._trigger("activate", e, this._uiHash(this)); + return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !o.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(e), !0 + }, + _mouseDrag: function (e) { + var i, s, n, a, o = this.options, r = !1; + for (this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - e.pageY < o.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + o.scrollSpeed : e.pageY - this.overflowOffset.top < o.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - o.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - e.pageX < o.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + o.scrollSpeed : e.pageX - this.overflowOffset.left < o.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - o.scrollSpeed)) : (e.pageY - t(document).scrollTop() < o.scrollSensitivity ? r = t(document).scrollTop(t(document).scrollTop() - o.scrollSpeed) : t(window).height() - (e.pageY - t(document).scrollTop()) < o.scrollSensitivity && (r = t(document).scrollTop(t(document).scrollTop() + o.scrollSpeed)), e.pageX - t(document).scrollLeft() < o.scrollSensitivity ? r = t(document).scrollLeft(t(document).scrollLeft() - o.scrollSpeed) : t(window).width() - (e.pageX - t(document).scrollLeft()) < o.scrollSensitivity && (r = t(document).scrollLeft(t(document).scrollLeft() + o.scrollSpeed))), r !== !1 && t.ui.ddmanager && !o.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), i = this.items.length - 1; i >= 0; i--) if (s = this.items[i], n = s.item[0], a = this._intersectsWithPointer(s), a && s.instance === this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === a ? "next" : "prev"]()[0] !== n && !t.contains(this.placeholder[0], n) && ("semi-dynamic" === this.options.type ? !t.contains(this.element[0], n) : !0)) { + if (this.direction = 1 === a ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(s)) break; + this._rearrange(e, s), this._trigger("change", e, this._uiHash()); + break + } + return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger("sort", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1 + }, + _mouseStop: function (e, i) { + if (e) { + if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options.revert) { + var s = this, n = this.placeholder.offset(), a = this.options.axis, o = {}; + a && "x" !== a || (o.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft)), a && "y" !== a || (o.top = n.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, t(this.helper).animate(o, parseInt(this.options.revert, 10) || 500, function () { + s._clear(e) + }) + } else this._clear(e, i); + return !1 + } + }, + cancel: function () { + if (this.dragging) { + this._mouseUp({target: null}), "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show(); + for (var e = this.containers.length - 1; e >= 0; e--) this.containers[e]._trigger("deactivate", null, this._uiHash(this)), this.containers[e].containerCache.over && (this.containers[e]._trigger("out", null, this._uiHash(this)), this.containers[e].containerCache.over = 0) + } + return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), t.extend(this, { + helper: null, + dragging: !1, + reverting: !1, + _noFinalSort: null + }), this.domPosition.prev ? t(this.domPosition.prev).after(this.currentItem) : t(this.domPosition.parent).prepend(this.currentItem)), this + }, + serialize: function (e) { + var i = this._getItemsAsjQuery(e && e.connected), s = []; + return e = e || {}, t(i).each(function () { + var i = (t(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/); + i && s.push((e.key || i[1] + "[]") + "=" + (e.key && e.expression ? i[1] : i[2])) + }), !s.length && e.key && s.push(e.key + "="), s.join("&") + }, + toArray: function (e) { + var i = this._getItemsAsjQuery(e && e.connected), s = []; + return e = e || {}, i.each(function () { + s.push(t(e.item || this).attr(e.attribute || "id") || "") + }), s + }, + _intersectsWith: function (t) { + var e = this.positionAbs.left, i = e + this.helperProportions.width, s = this.positionAbs.top, + n = s + this.helperProportions.height, a = t.left, o = a + t.width, r = t.top, h = r + t.height, + l = this.offset.click.top, c = this.offset.click.left, + u = "x" === this.options.axis || s + l > r && h > s + l, + d = "y" === this.options.axis || e + c > a && o > e + c, p = u && d; + return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > t[this.floating ? "width" : "height"] ? p : e + this.helperProportions.width / 2 > a && o > i - this.helperProportions.width / 2 && s + this.helperProportions.height / 2 > r && h > n - this.helperProportions.height / 2 + }, + _intersectsWithPointer: function (t) { + var i = "x" === this.options.axis || e(this.positionAbs.top + this.offset.click.top, t.top, t.height), + s = "y" === this.options.axis || e(this.positionAbs.left + this.offset.click.left, t.left, t.width), + n = i && s, a = this._getDragVerticalDirection(), o = this._getDragHorizontalDirection(); + return n ? this.floating ? o && "right" === o || "down" === a ? 2 : 1 : a && ("down" === a ? 2 : 1) : !1 + }, + _intersectsWithSides: function (t) { + var i = e(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height), + s = e(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width), + n = this._getDragVerticalDirection(), a = this._getDragHorizontalDirection(); + return this.floating && a ? "right" === a && s || "left" === a && !s : n && ("down" === n && i || "up" === n && !i) + }, + _getDragVerticalDirection: function () { + var t = this.positionAbs.top - this.lastPositionAbs.top; + return 0 !== t && (t > 0 ? "down" : "up") + }, + _getDragHorizontalDirection: function () { + var t = this.positionAbs.left - this.lastPositionAbs.left; + return 0 !== t && (t > 0 ? "right" : "left") + }, + refresh: function (t) { + return this._refreshItems(t), this.refreshPositions(), this + }, + _connectWith: function () { + var t = this.options; + return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith + }, + _getItemsAsjQuery: function (e) { + var i, s, n, a, o = [], r = [], h = this._connectWith(); + if (h && e) for (i = h.length - 1; i >= 0; i--) for (n = t(h[i]), s = n.length - 1; s >= 0; s--) a = t.data(n[s], this.widgetFullName), a && a !== this && !a.options.disabled && r.push([t.isFunction(a.options.items) ? a.options.items.call(a.element) : t(a.options.items, a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), a]); + for (r.push([t.isFunction(this.options.items) ? this.options.items.call(this.element, null, { + options: this.options, + item: this.currentItem + }) : t(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), i = r.length - 1; i >= 0; i--) r[i][0].each(function () { + o.push(this) + }); + return t(o) + }, + _removeCurrentsFromItems: function () { + var e = this.currentItem.find(":data(" + this.widgetName + "-item)"); + this.items = t.grep(this.items, function (t) { + for (var i = 0; e.length > i; i++) if (e[i] === t.item[0]) return !1; + return !0 + }) + }, + _refreshItems: function (e) { + this.items = [], this.containers = [this]; + var i, s, n, a, o, r, h, l, c = this.items, + u = [[t.isFunction(this.options.items) ? this.options.items.call(this.element[0], e, {item: this.currentItem}) : t(this.options.items, this.element), this]], + d = this._connectWith(); + if (d && this.ready) for (i = d.length - 1; i >= 0; i--) for (n = t(d[i]), s = n.length - 1; s >= 0; s--) a = t.data(n[s], this.widgetFullName), a && a !== this && !a.options.disabled && (u.push([t.isFunction(a.options.items) ? a.options.items.call(a.element[0], e, {item: this.currentItem}) : t(a.options.items, a.element), a]), this.containers.push(a)); + for (i = u.length - 1; i >= 0; i--) for (o = u[i][1], r = u[i][0], s = 0, l = r.length; l > s; s++) h = t(r[s]), h.data(this.widgetName + "-item", o), c.push({ + item: h, + instance: o, + width: 0, + height: 0, + left: 0, + top: 0 + }) + }, + refreshPositions: function (e) { + this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); + var i, s, n, a; + for (i = this.items.length - 1; i >= 0; i--) s = this.items[i], s.instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ? t(this.options.toleranceElement, s.item) : s.item, e || (s.width = n.outerWidth(), s.height = n.outerHeight()), a = n.offset(), s.left = a.left, s.top = a.top); + if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this); else for (i = this.containers.length - 1; i >= 0; i--) a = this.containers[i].element.offset(), this.containers[i].containerCache.left = a.left, this.containers[i].containerCache.top = a.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + return this + }, + _createPlaceholder: function (e) { + e = e || this; + var i, s = e.options; + s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = { + element: function () { + var s = e.currentItem[0].nodeName.toLowerCase(), + n = t("<" + s + ">", e.document[0]).addClass(i || e.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper"); + return "tr" === s ? e.currentItem.children().each(function () { + t("<td> </td>", e.document[0]).attr("colspan", t(this).attr("colspan") || 1).appendTo(n) + }) : "img" === s && n.attr("src", e.currentItem.attr("src")), i || n.css("visibility", "hidden"), n + }, update: function (t, n) { + (!i || s.forcePlaceholderSize) && (n.height() || n.height(e.currentItem.innerHeight() - parseInt(e.currentItem.css("paddingTop") || 0, 10) - parseInt(e.currentItem.css("paddingBottom") || 0, 10)), n.width() || n.width(e.currentItem.innerWidth() - parseInt(e.currentItem.css("paddingLeft") || 0, 10) - parseInt(e.currentItem.css("paddingRight") || 0, 10))) + } + }), e.placeholder = t(s.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(e.placeholder), s.placeholder.update(e, e.placeholder) + }, + _contactContainers: function (s) { + var n, a, o, r, h, l, c, u, d, p, f = null, m = null; + for (n = this.containers.length - 1; n >= 0; n--) if (!t.contains(this.currentItem[0], this.containers[n].element[0])) if (this._intersectsWith(this.containers[n].containerCache)) { + if (f && t.contains(this.containers[n].element[0], f.element[0])) continue; + f = this.containers[n], m = n + } else this.containers[n].containerCache.over && (this.containers[n]._trigger("out", s, this._uiHash(this)), this.containers[n].containerCache.over = 0); + if (f) if (1 === this.containers.length) this.containers[m].containerCache.over || (this.containers[m]._trigger("over", s, this._uiHash(this)), this.containers[m].containerCache.over = 1); else { + for (o = 1e4, r = null, p = f.floating || i(this.currentItem), h = p ? "left" : "top", l = p ? "width" : "height", c = this.positionAbs[h] + this.offset.click[h], a = this.items.length - 1; a >= 0; a--) t.contains(this.containers[m].element[0], this.items[a].item[0]) && this.items[a].item[0] !== this.currentItem[0] && (!p || e(this.positionAbs.top + this.offset.click.top, this.items[a].top, this.items[a].height)) && (u = this.items[a].item.offset()[h], d = !1, Math.abs(u - c) > Math.abs(u + this.items[a][l] - c) && (d = !0, u += this.items[a][l]), o > Math.abs(u - c) && (o = Math.abs(u - c), r = this.items[a], this.direction = d ? "up" : "down")); + if (!r && !this.options.dropOnEmpty) return; + if (this.currentContainer === this.containers[m]) return; + r ? this._rearrange(s, r, null, !0) : this._rearrange(s, null, this.containers[m].element, !0), this._trigger("change", s, this._uiHash()), this.containers[m]._trigger("change", s, this._uiHash(this)), this.currentContainer = this.containers[m], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[m]._trigger("over", s, this._uiHash(this)), this.containers[m].containerCache.over = 1 + } + }, + _createHelper: function (e) { + var i = this.options, + s = t.isFunction(i.helper) ? t(i.helper.apply(this.element[0], [e, this.currentItem])) : "clone" === i.helper ? this.currentItem.clone() : this.currentItem; + return s.parents("body").length || t("parent" !== i.appendTo ? i.appendTo : this.currentItem[0].parentNode)[0].appendChild(s[0]), s[0] === this.currentItem[0] && (this._storedCSS = { + width: this.currentItem[0].style.width, + height: this.currentItem[0].style.height, + position: this.currentItem.css("position"), + top: this.currentItem.css("top"), + left: this.currentItem.css("left") + }), (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()), (!s[0].style.height || i.forceHelperSize) && s.height(this.currentItem.height()), s + }, + _adjustOffsetFromHelper: function (e) { + "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = { + left: +e[0], + top: +e[1] || 0 + }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top) + }, + _getParentOffset: function () { + this.offsetParent = this.helper.offsetParent(); + var e = this.offsetParent.offset(); + return "absolute" === this.cssPosition && this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = { + top: 0, + left: 0 + }), { + top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) + } + }, + _getRelativeOffset: function () { + if ("relative" === this.cssPosition) { + var t = this.currentItem.position(); + return { + top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), + left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() + } + } + return {top: 0, left: 0} + }, + _cacheMargins: function () { + this.margins = { + left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, + top: parseInt(this.currentItem.css("marginTop"), 10) || 0 + } + }, + _cacheHelperProportions: function () { + this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} + }, + _setContainment: function () { + var e, i, s, n = this.options; + "parent" === n.containment && (n.containment = this.helper[0].parentNode), ("document" === n.containment || "window" === n.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, t("document" === n.containment ? document : window).width() - this.helperProportions.width - this.margins.left, (t("document" === n.containment ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(n.containment) || (e = t(n.containment)[0], i = t(n.containment).offset(), s = "hidden" !== t(e).css("overflow"), this.containment = [i.left + (parseInt(t(e).css("borderLeftWidth"), 10) || 0) + (parseInt(t(e).css("paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(t(e).css("borderTopWidth"), 10) || 0) + (parseInt(t(e).css("paddingTop"), 10) || 0) - this.margins.top, i.left + (s ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - (parseInt(t(e).css("borderLeftWidth"), 10) || 0) - (parseInt(t(e).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(t(e).css("borderTopWidth"), 10) || 0) - (parseInt(t(e).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]) + }, + _convertPositionTo: function (e, i) { + i || (i = this.position); + var s = "absolute" === e ? 1 : -1, + n = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, + a = /(html|body)/i.test(n[0].tagName); + return { + top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : a ? 0 : n.scrollTop()) * s, + left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : a ? 0 : n.scrollLeft()) * s + } + }, + _generatePosition: function (e) { + var i, s, n = this.options, a = e.pageX, o = e.pageY, + r = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, + h = /(html|body)/i.test(r[0].tagName); + return "relative" !== this.cssPosition || this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[0] && (a = this.containment[0] + this.offset.click.left), e.pageY - this.offset.click.top < this.containment[1] && (o = this.containment[1] + this.offset.click.top), e.pageX - this.offset.click.left > this.containment[2] && (a = this.containment[2] + this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] && (o = this.containment[3] + this.offset.click.top)), n.grid && (i = this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1], o = this.containment ? i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3] ? i : i - this.offset.click.top >= this.containment[1] ? i - n.grid[1] : i + n.grid[1] : i, s = this.originalPageX + Math.round((a - this.originalPageX) / n.grid[0]) * n.grid[0], a = this.containment ? s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s : s - this.offset.click.left >= this.containment[0] ? s - n.grid[0] : s + n.grid[0] : s)), { + top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : h ? 0 : r.scrollTop()), + left: a - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : h ? 0 : r.scrollLeft()) + } + }, + _rearrange: function (t, e, i, s) { + i ? i[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? e.item[0] : e.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1; + var n = this.counter; + this._delay(function () { + n === this.counter && this.refreshPositions(!s) + }) + }, + _clear: function (t, e) { + this.reverting = !1; + var i, s = []; + if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) { + for (i in this._storedCSS) ("auto" === this._storedCSS[i] || "static" === this._storedCSS[i]) && (this._storedCSS[i] = ""); + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") + } else this.currentItem.show(); + for (this.fromOutside && !e && s.push(function (t) { + this._trigger("receive", t, this._uiHash(this.fromOutside)) + }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || s.push(function (t) { + this._trigger("update", t, this._uiHash()) + }), this !== this.currentContainer && (e || (s.push(function (t) { + this._trigger("remove", t, this._uiHash()) + }), s.push(function (t) { + return function (e) { + t._trigger("receive", e, this._uiHash(this)) + } + }.call(this, this.currentContainer)), s.push(function (t) { + return function (e) { + t._trigger("update", e, this._uiHash(this)) + } + }.call(this, this.currentContainer)))), i = this.containers.length - 1; i >= 0; i--) e || s.push(function (t) { + return function (e) { + t._trigger("deactivate", e, this._uiHash(this)) + } + }.call(this, this.containers[i])), this.containers[i].containerCache.over && (s.push(function (t) { + return function (e) { + t._trigger("out", e, this._uiHash(this)) + } + }.call(this, this.containers[i])), this.containers[i].containerCache.over = 0); + if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = !1, this.cancelHelperRemoval) { + if (!e) { + for (this._trigger("beforeStop", t, this._uiHash()), i = 0; s.length > i; i++) s[i].call(this, t); + this._trigger("stop", t, this._uiHash()) + } + return this.fromOutside = !1, !1 + } + if (e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null, !e) { + for (i = 0; s.length > i; i++) s[i].call(this, t); + this._trigger("stop", t, this._uiHash()) + } + return this.fromOutside = !1, !0 + }, + _trigger: function () { + t.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() + }, + _uiHash: function (e) { + var i = e || this; + return { + helper: i.helper, + placeholder: i.placeholder || t([]), + position: i.position, + originalPosition: i.originalPosition, + offset: i.positionAbs, + item: i.currentItem, + sender: e ? e.element : null + } + } + }) +})(jQuery); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/jquery.autogrow-textarea.js b/src/main/resources/static/activiti-editor/editor-app/libs/jquery.autogrow-textarea.js new file mode 100644 index 0000000..2ae9cc3 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/jquery.autogrow-textarea.js @@ -0,0 +1,61 @@ +(function($) +{ + /** + * Auto-growing textareas; technique ripped from Facebook + * + * http://github.com/jaz303/jquery-grab-bag/tree/master/javascripts/jquery.autogrow-textarea.js + */ + $.fn.autogrow = function(options) + { + return this.filter('textarea').each(function() + { + var self = this; + var $self = $(self); + var minHeight = $self.height(); + var noFlickerPad = $self.hasClass('autogrow-short') ? 0 : parseInt($self.css('lineHeight')) || 0; + + var shadow = $('<div></div>').css({ + position: 'absolute', + top: -10000, + left: -10000, + width: $self.width(), + fontSize: $self.css('fontSize'), + fontFamily: $self.css('fontFamily'), + fontWeight: $self.css('fontWeight'), + lineHeight: $self.css('lineHeight'), + resize: 'none', + 'word-wrap': 'break-word' + }).appendTo(document.body); + + var update = function(event) + { + var times = function(string, number) + { + for (var i=0, r=''; i<number; i++) r += string; + return r; + }; + + var val = self.value.replace(/</g, '<') + .replace(/>/g, '>') + .replace(/&/g, '&') + .replace(/\n$/, '<br/> ') + .replace(/\n/g, '<br/>') + .replace(/ {2,}/g, function(space){ return times(' ', space.length - 1) + ' ' }); + + // Did enter get pressed? Resize in this keydown event so that the flicker doesn't occur. + if (event && event.data && event.data.event === 'keydown' && event.keyCode === 13) { + val += '<br />'; + } + + shadow.css('width', $self.width()); + shadow.html(val + (noFlickerPad === 0 ? '...' : '')); // Append '...' to resize pre-emptively. + $self.height(Math.max(shadow.height() + noFlickerPad, minHeight)); + } + + $self.change(update).keyup(update).keydown({event:'keydown'},update); + $(window).resize(update); + + update(); + }); + }; +})(jQuery); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.js b/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.js new file mode 100644 index 0000000..c5c6482 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.js @@ -0,0 +1,9789 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "<div class='a'></div><div class='a i'></div>"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = "<select><option selected=''></option></select>"; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = "<a href='#'></a>"; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = "<input/>"; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "<div></div>"; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG <use> instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /<tbody/i, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "<select multiple='multiple'>", "</select>" ], + legend: [ 1, "<fieldset>", "</fieldset>" ], + area: [ 1, "<map>", "</map>" ], + param: [ 1, "<object>", "</object>" ], + thead: [ 1, "<table>", "</table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1></$2>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted <tbody> from table fragments + if ( !jQuery.support.tbody ) { + + // String was a <table>, *may* have spurious <tbody> + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare <thead> or <tfoot> + wrap[1] === "<table>" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("<iframe frameborder='0' width='0' height='0'/>") + .css( "cssText", "display:block !important" ) + ).appendTo( doc.documentElement ); + + // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse + doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; + doc.write("<!doctype html><html><body>"); + doc.close(); + + display = actualDisplay( nodeName, doc ); + iframe.detach(); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + } + + return display; +} + +// Called ONLY from within css_defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + display = jQuery.css( elem[0], "display" ); + elem.remove(); + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + // certain elements can have dimension info if we invisibly show them + // however, it must have a current display style that would benefit from this + return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? + jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var styles = extra && getStyles( elem ); + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + // if value === "", then remove inline opacity #12685 + if ( ( value >= 1 || value === "" ) && + jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there is no filter style applied in a css rule or unset inline opacity, we are done + if ( value === "" || currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + if ( computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, + curCSS, [ elem, "marginRight" ] ); + } + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + computed = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( computed ) ? + jQuery( elem ).position()[ prop ] + "px" : + computed; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + // Support: Opera <= 12.12 + // Opera reports offsetWidths and offsetHeights less than zero on some elements + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || + (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + }) + .filter(function(){ + var type = this.type; + // Use .is(":disabled") so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !manipulation_rcheckableType.test( type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // Item is non-scalar (array or object), encode its numeric index. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +}); + +jQuery.fn.extend({ + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + } +}); +var + // Document location + ajaxLocParts, + ajaxLocation, + ajax_nonce = jQuery.now(), + + ajax_rquery = /\?/, + rhash = /#.*$/, + rts = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat("*"); + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + while ( (dataType = dataTypes[i++]) ) { + // Prepend if requested + if ( dataType[0] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + + // Otherwise append + } else { + (structure[ dataType ] = structure[ dataType ] || []).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + }); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var deep, key, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + var selector, response, type, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // If we have elements to modify, make the request + if ( self.length > 0 ) { + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + self.html( selector ? + + // If a selector was specified, locate the right elements in a dummy div + // Exclude scripts to avoid IE 'Permission Denied' errors + jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + + // Otherwise use the full result + responseText ); + + }).complete( callback && function( jqXHR, status ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + }); + } + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ + jQuery.fn[ type ] = function( fn ){ + return this.on( type, fn ); + }; +}); + +jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: ajaxLocation, + type: "GET", + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // Cross-domain detection vars + parts, + // Loop variable + i, + // URL without anti-cache param + cacheURL, + // Response headers as string + responseHeadersString, + // timeout handle + timeoutTimer, + + // To know if global events are to be dispatched + fireGlobals, + + transport, + // Response headers + responseHeaders, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks("once memory"), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( (match = rheaders.exec( responseHeadersString )) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + var lname = name.toLowerCase(); + if ( !state ) { + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( state < 2 ) { + for ( code in map ) { + // Lazy-add the new callback in a way that preserves old ones + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } else { + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ).complete = completeDeferred.add; + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger("ajaxStart"); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + cacheURL = s.url; + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add anti-cache in url if needed + if ( s.cache === false ) { + s.url = rts.test( cacheURL ) ? + + // If there is already a '_' parameter, set its value + cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : + + // Otherwise add one to the end + cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; + } + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout(function() { + jqXHR.abort("timeout"); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch ( e ) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader("etag"); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger("ajaxStop"); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + url: url, + type: method, + dataType: type, + data: data, + success: callback + }); + }; +}); + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + var firstDataType, ct, finalDataType, type, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s[ "throws" ] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /(?:java|ecma)script/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || jQuery("head")[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement("script"); + + script.async = true; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( script.parentNode ) { + script.parentNode.removeChild( script ); + } + + // Dereference the script + script = null; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + + // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending + // Use native DOM manipulation to avoid our domManip AJAX trickery + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( undefined, true ); + } + } + }; + } +}); +var oldCallbacks = [], + rjsonp = /(=)\?(?=&|$)|\?\?/; + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? + "url" : + typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + + // Insert callback into url or form data + if ( jsonProp ) { + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); + } else if ( s.jsonp !== false ) { + s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + overwritten = window[ callbackName ]; + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +var xhrCallbacks, xhrSupported, + xhrId = 0, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject && function() { + // Abort all pending requests + var key; + for ( key in xhrCallbacks ) { + xhrCallbacks[ key ]( undefined, true ); + } + }; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +xhrSupported = jQuery.ajaxSettings.xhr(); +jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +xhrSupported = jQuery.support.ajax = !!xhrSupported; + +// Create transport if the browser can provide an xhr +if ( xhrSupported ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers["X-Requested-With"] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( err ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + var status, responseHeaders, statusText, responses; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + responses = {}; + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + if ( typeof xhr.responseText === "string" ) { + responses.text = xhr.responseText; + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback( undefined, true ); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var tween = this.createTween( prop, value ), + target = tween.cur(), + parts = rfxnum.exec( value ), + unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && + rfxnum.exec( jQuery.css( tween.elem, prop ) ), + scale = 1, + maxIterations = 20; + + if ( start && start[ 3 ] !== unit ) { + // Trust units reported by jQuery.css + unit = unit || start[ 3 ]; + + // Make sure we update the tween properties later on + parts = parts || []; + + // Iteratively approximate from a nonzero starting point + start = +target || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + // Update tween properties + if ( parts ) { + start = tween.start = +start || +target || 0; + tween.unit = unit; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[ 1 ] ? + start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : + +parts[ 2 ]; + } + + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }); + return ( fxNow = jQuery.now() ); +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( (tween = collection[ index ].call( animation, prop, value )) ) { + + // we're done with this property + return tween; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + /* jshint validthis: true */ + var prop, value, toggle, tween, hooks, oldfire, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHidden( elem ), + dataShow = jQuery._data( elem, "fxshow" ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.always(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.exec( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + if ( !jQuery.isEmptyObject( orig ) ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = jQuery._data( elem, "fxshow", {} ); + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery._removeData( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( prop in orig ) { + tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 +// Panic based approach to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || jQuery._data( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each(function() { + var index, + data = jQuery._data( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // enable finishing flag on private data + data.finish = true; + + // empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // turn off finishing flag + delete data.finish; + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) ) { + jQuery.fx.start(); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.start = function() { + if ( !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, win, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== core_strundefined ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + return { + top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), + left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) + }; +}; + +jQuery.offset = { + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[ 0 ] ) { + return; + } + + var offsetParent, offset, + parentOffset = { top: 0, left: 0 }, + elem = this[ 0 ]; + + // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent + if ( jQuery.css( elem, "position" ) === "fixed" ) { + // we assume that getBoundingClientRect is available when computed position is fixed + offset = elem.getBoundingClientRect(); + } else { + // Get *real* offsetParent + offsetParent = this.offsetParent(); + + // Get correct offsets + offset = this.offset(); + if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { + parentOffset = offsetParent.offset(); + } + + // Add offsetParent borders + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + } + + // Subtract parent offsets and element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + return { + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || docElem; + while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || docElem; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Limit scope pollution from any deprecated API +// (function() { + +// The number of elements contained in the matched element set +jQuery.fn.size = function() { + return this.length; +}; + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// })(); +if ( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose jQuery as module.exports in loaders that implement the Node + // module pattern (including browserify). Do not create the global, since + // the user will be storing it themselves locally, and globals are frowned + // upon in the Node module world. + module.exports = jQuery; +} else { + // Otherwise expose jQuery to the global object as usual + window.jQuery = window.$ = jQuery; + + // Register as a named AMD module, since jQuery can be concatenated with other + // files that may use define, but not via a proper concatenation script that + // understands anonymous AMD modules. A named AMD is safest and most robust + // way to register. Lowercase jquery is used because AMD module names are + // derived from file names, and jQuery is normally delivered in a lowercase + // file name. Do this after creating the global so that if an AMD module wants + // to call noConflict to hide this version of jQuery, it will work. + if ( typeof define === "function" && define.amd ) { + define( "jquery", [], function () { return jQuery; } ); + } +} + +})( window ); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.js new file mode 100644 index 0000000..046e93a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.map b/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.map new file mode 100644 index 0000000..2dd27a6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/jquery_1.11.0/jquery.min.map @@ -0,0 +1 @@ +{"version":3,"file":"jquery-1.10.2.min.js","sources":["jquery-1.10.2.js"],"names":["window","undefined","readyList","rootjQuery","core_strundefined","location","document","docElem","documentElement","_jQuery","jQuery","_$","$","class2type","core_deletedIds","core_version","core_concat","concat","core_push","push","core_slice","slice","core_indexOf","indexOf","core_toString","toString","core_hasOwn","hasOwnProperty","core_trim","trim","selector","context","fn","init","core_pnum","source","core_rnotwhite","rtrim","rquickExpr","rsingleTag","rvalidchars","rvalidbraces","rvalidescape","rvalidtokens","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","completed","event","addEventListener","type","readyState","detach","ready","removeEventListener","detachEvent","prototype","jquery","constructor","match","elem","this","charAt","length","exec","find","merge","parseHTML","nodeType","ownerDocument","test","isPlainObject","isFunction","attr","getElementById","parentNode","id","makeArray","toArray","call","get","num","pushStack","elems","ret","prevObject","each","callback","args","promise","done","apply","arguments","first","eq","last","i","len","j","map","end","sort","splice","extend","src","copyIsArray","copy","name","options","clone","target","deep","isArray","expando","Math","random","replace","noConflict","isReady","readyWait","holdReady","hold","wait","body","setTimeout","resolveWith","trigger","off","obj","Array","isWindow","isNumeric","isNaN","parseFloat","isFinite","String","key","e","support","ownLast","isEmptyObject","error","msg","Error","data","keepScripts","parsed","scripts","createElement","buildFragment","remove","childNodes","parseJSON","JSON","parse","Function","parseXML","xml","tmp","DOMParser","parseFromString","ActiveXObject","async","loadXML","getElementsByTagName","noop","globalEval","execScript","camelCase","string","nodeName","toLowerCase","value","isArraylike","text","arr","results","Object","inArray","max","second","l","grep","inv","retVal","arg","guid","proxy","access","chainable","emptyGet","raw","bulk","now","Date","getTime","swap","old","style","Deferred","attachEvent","top","frameElement","doScroll","doScrollCheck","split","cachedruns","Expr","getText","isXML","compile","outermostContext","sortInput","setDocument","documentIsHTML","rbuggyQSA","rbuggyMatches","matches","contains","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","hasDuplicate","sortOrder","a","b","strundefined","MAX_NEGATIVE","hasOwn","pop","push_native","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","RegExp","rcomma","rcombinators","rsibling","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rnative","rinputs","rheader","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","fromCharCode","els","Sizzle","seed","m","groups","nid","newContext","newSelector","getElementsByClassName","qsa","tokenize","getAttribute","setAttribute","toSelector","join","querySelectorAll","qsaError","removeAttribute","select","keys","cache","cacheLength","shift","markFunction","assert","div","removeChild","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","node","doc","parent","defaultView","className","appendChild","createComment","innerHTML","firstChild","getById","getElementsByName","filter","attrId","getAttributeNode","tag","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","dirkey","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","group","contexts","token","div1","defaultValue","unique","isXMLDoc","optionsCache","createOptions","object","flag","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","list","stack","once","fire","stopOnFalse","self","disable","add","index","lock","locked","fireWith","func","tuples","state","always","deferred","fail","then","fns","newDefer","tuple","action","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","progressContexts","resolveContexts","fragment","opt","eventName","isSupported","cssText","getSetAttribute","leadingWhitespace","tbody","htmlSerialize","hrefNormalized","opacity","cssFloat","checkOn","optSelected","enctype","html5Clone","cloneNode","outerHTML","inlineBlockNeedsLayout","shrinkWrapBlocks","pixelPosition","deleteExpando","noCloneEvent","reliableMarginRight","boxSizingReliable","noCloneChecked","optDisabled","radioValue","createDocumentFragment","appendChecked","checkClone","click","change","focusin","backgroundClip","clearCloneStyle","container","marginDiv","tds","divReset","offsetHeight","display","reliableHiddenOffsets","zoom","boxSizing","offsetWidth","getComputedStyle","width","marginRight","rbrace","rmultiDash","internalData","pvt","acceptData","thisCache","internalKey","isNode","toJSON","internalRemoveData","isEmptyDataObject","cleanData","noData","applet","embed","hasData","removeData","_data","_removeData","dataAttr","queue","dequeue","startLength","hooks","_queueHooks","next","stop","setter","delay","time","fx","speeds","timeout","clearTimeout","clearQueue","count","defer","nodeHook","boolHook","rclass","rreturn","rfocusable","rclickable","ruseDefault","getSetInput","removeAttr","prop","removeProp","propFix","addClass","classes","clazz","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","valHooks","set","option","one","optionSet","nType","attrHooks","propName","attrNames","for","class","notxml","propHooks","tabindex","parseInt","getter","setAttributeNode","createAttribute","coords","contenteditable","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","global","types","events","t","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","srcElement","metaKey","original","which","charCode","keyCode","eventDoc","fromElement","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","relatedTarget","toElement","load","blur","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","getPreventDefault","timeStamp","cancelBubble","stopImmediatePropagation","mouseenter","mouseleave","orig","related","submitBubbles","form","_submit_bubble","changeBubbles","propertyName","_just_changed","focusinBubbles","attaches","on","origFn","triggerHandler","isSimple","rparentsprev","rneedsContext","guaranteedUnique","children","contents","prev","targets","winnow","is","closest","pos","prevAll","addBack","sibling","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","contentDocument","contentWindow","reverse","n","r","qualifier","createSafeFragment","nodeNames","safeFrag","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","manipulation_rcheckableType","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","legend","area","param","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","append","createTextNode","domManip","manipulationTarget","prepend","insertBefore","before","after","keepData","getAll","setGlobalEval","dataAndEvents","deepDataAndEvents","html","replaceWith","allowIntersection","hasScripts","iNoClone","disableScript","restoreScript","_evalUrl","content","refElements","cloneCopyEvent","dest","oldData","curData","fixCloneNodeIssues","defaultChecked","defaultSelected","appendTo","prependTo","insertAfter","replaceAll","insert","found","fixDefaultChecked","destElements","srcElements","inPage","selection","wrap","safe","nodes","url","ajax","dataType","throws","wrapAll","wrapInner","unwrap","iframe","getStyles","curCSS","ralpha","ropacity","rposition","rdisplayswap","rmargin","rnumsplit","rnumnonpx","rrelNum","elemdisplay","BODY","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssExpand","cssPrefixes","vendorPropName","capName","origName","isHidden","el","css","showHide","show","hidden","css_defaultDisplay","styles","hide","toggle","cssHooks","computed","cssNumber","columnCount","fillOpacity","lineHeight","order","orphans","widows","zIndex","cssProps","float","extra","_computed","minWidth","maxWidth","getPropertyValue","currentStyle","left","rs","rsLeft","runtimeStyle","pixelLeft","setPositiveNumber","subtract","augmentWidthOrHeight","isBorderBox","getWidthOrHeight","valueIsBorderBox","actualDisplay","write","close","$1","visible","margin","padding","border","prefix","suffix","expand","expanded","parts","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","serialize","serializeArray","traditional","s","encodeURIComponent","ajaxSettings","buildParams","v","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","params","response","responseText","complete","status","active","lastModified","etag","isLocal","processData","contentType","accepts","*","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","code","abort","statusText","finalText","success","method","crossDomain","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","isSuccess","modified","ajaxHandleResponses","ajaxConvert","rejectWith","getJSON","getScript","firstDataType","ct","finalDataType","conv2","current","conv","dataFilter","script","text script","head","scriptCharset","charset","onload","onreadystatechange","isAbort","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhrCallbacks","xhrSupported","xhrId","xhrOnUnloadAbort","createStandardXHR","XMLHttpRequest","createActiveXHR","xhr","cors","username","open","xhrFields","firefoxAccessException","unload","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","tween","createTween","unit","scale","maxIterations","createFxNow","animation","collection","Animation","properties","stopped","tick","currentTime","startTime","duration","percent","tweens","run","opts","specialEasing","originalProperties","Tween","easing","gotoEnd","propFilter","timer","anim","tweener","prefilter","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","eased","step","cssFn","speed","animate","genFx","fadeTo","to","optall","doAnimation","finish","stopQueue","timers","includeWidth","height","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","p","swing","cos","PI","interval","setInterval","clearInterval","slow","fast","animated","offset","setOffset","win","box","getBoundingClientRect","getWindow","pageYOffset","pageXOffset","curElem","curOffset","curCSSTop","curCSSLeft","calculatePosition","curPosition","curTop","curLeft","using","offsetParent","parentO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AYkuB,EAASj6B,EAAW+L,EAAW,WAQvDtL,EAAOsB,GAAGooC,KAAO,WAChB,MAAOpmC,MAAKE,QAGbxD,EAAOsB,GAAGqoC,QAAU3pC,EAAOsB,GAAG6tB,QAGP,gBAAXya,SAAuBA,QAAoC,gBAAnBA,QAAOC,QAK1DD,OAAOC,QAAU7pC,GAGjBV,EAAOU,OAASV,EAAOY,EAAIF,EASJ,kBAAX8pC,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WAAc,MAAO9pC,QAIzCV"} diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/LICENSE b/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/LICENSE new file mode 100644 index 0000000..6d42c54 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2012-2013 Kit Cambridge. +http://kitcambridge.be/ + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.js b/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.js new file mode 100644 index 0000000..446a2bf --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.js @@ -0,0 +1,861 @@ +/*! JSON v3.2.6 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */ +;(function (window) { + // Convenience aliases. + var getClass = {}.toString, isProperty, forEach, undef; + + // Detect the `define` function exposed by asynchronous module loaders. The + // strict `define` check is necessary for compatibility with `r.js`. + var isLoader = typeof define === "function" && define.amd; + + // Detect native implementations. + var nativeJSON = typeof JSON == "object" && JSON; + + // Set up the JSON 3 namespace, preferring the CommonJS `exports` object if + // available. + var JSON3 = typeof exports == "object" && exports && !exports.nodeType && exports; + + if (JSON3 && nativeJSON) { + // Explicitly delegate to the native `stringify` and `parse` + // implementations in CommonJS environments. + JSON3.stringify = nativeJSON.stringify; + JSON3.parse = nativeJSON.parse; + } else { + // Export for web browsers, JavaScript engines, and asynchronous module + // loaders, using the global `JSON` object if available. + JSON3 = window.JSON = nativeJSON || {}; + } + + // Test the `Date#getUTC*` methods. Based on work by @Yaffle. + var isExtended = new Date(-3509827334573292); + try { + // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical + // results for certain dates in Opera >= 10.53. + isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 && + // Safari < 2.0.2 stores the internal millisecond time value correctly, + // but clips the values returned by the date methods to the range of + // signed 32-bit integers ([-2 ** 31, 2 ** 31 - 1]). + isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708; + } catch (exception) {var abcdef = 1} + + // Internal: Determines whether the native `JSON.stringify` and `parse` + // implementations are spec-compliant. Based on work by Ken Snyder. + function has(name) { + if (has[name] !== undef) { + // Return cached feature test result. + return has[name]; + } + + var isSupported; + if (name == "bug-string-char-index") { + // IE <= 7 doesn't support accessing string characters using square + // bracket notation. IE 8 only supports this for primitives. + isSupported = "a"[0] != "a"; + } else if (name == "json") { + // Indicates whether both `JSON.stringify` and `JSON.parse` are + // supported. + isSupported = has("json-stringify") && has("json-parse"); + } else { + var value, serialized = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'; + // Test `JSON.stringify`. + if (name == "json-stringify") { + var stringify = JSON3.stringify, stringifySupported = typeof stringify == "function" && isExtended; + if (stringifySupported) { + // A test function object with a custom `toJSON` method. + (value = function () { + return 1; + }).toJSON = value; + try { + stringifySupported = + // Firefox 3.1b1 and b2 serialize string, number, and boolean + // primitives as object literals. + stringify(0) === "0" && + // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object + // literals. + stringify(new Number()) === "0" && + stringify(new String()) == '""' && + // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or + // does not define a canonical JSON representation (this applies to + // objects with `toJSON` properties as well, *unless* they are nested + // within an object or array). + stringify(getClass) === undef && + // IE 8 serializes `undefined` as `"undefined"`. Safari <= 5.1.7 and + // FF 3.1b3 pass this test. + stringify(undef) === undef && + // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s, + // respectively, if the value is omitted entirely. + stringify() === undef && + // FF 3.1b1, 2 throw an error if the given value is not a number, + // string, array, object, Boolean, or `null` literal. This applies to + // objects with custom `toJSON` methods as well, unless they are nested + // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON` + // methods entirely. + stringify(value) === "1" && + stringify([value]) == "[1]" && + // Prototype <= 1.6.1 serializes `[undefined]` as `"[]"` instead of + // `"[null]"`. + stringify([undef]) == "[null]" && + // YUI 3.0.0b1 fails to serialize `null` literals. + stringify(null) == "null" && + // FF 3.1b1, 2 halts serialization if an array contains a function: + // `[1, true, getClass, 1]` serializes as "[1,true,],". FF 3.1b3 + // elides non-JSON values from objects and arrays, unless they + // define custom `toJSON` methods. + stringify([undef, getClass, null]) == "[null,null,null]" && + // Simple serialization test. FF 3.1b1 uses Unicode escape sequences + // where character escape codes are expected (e.g., `\b` => `\u0008`). + stringify({ "a": [value, true, false, null, "\x00\b\n\f\r\t"] }) == serialized && + // FF 3.1b1 and b2 ignore the `filter` and `width` arguments. + stringify(null, value) === "1" && + stringify([1, 2], null, 1) == "[\n 1,\n 2\n]" && + // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly + // serialize extended years. + stringify(new Date(-8.64e15)) == '"-271821-04-20T00:00:00.000Z"' && + // The milliseconds are optional in ES 5, but required in 5.1. + stringify(new Date(8.64e15)) == '"+275760-09-13T00:00:00.000Z"' && + // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative + // four-digit years instead of six-digit years. Credits: @Yaffle. + stringify(new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && + // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond + // values less than 1000. Credits: @Yaffle. + stringify(new Date(-1)) == '"1969-12-31T23:59:59.999Z"'; + } catch (exception) { + stringifySupported = false; + } + } + isSupported = stringifySupported; + } + // Test `JSON.parse`. + if (name == "json-parse") { + var parse = JSON3.parse; + if (typeof parse == "function") { + try { + // FF 3.1b1, b2 will throw an exception if a bare literal is provided. + // Conforming implementations should also coerce the initial argument to + // a string prior to parsing. + if (parse("0") === 0 && !parse(false)) { + // Simple parsing test. + value = parse(serialized); + var parseSupported = value["a"].length == 5 && value["a"][0] === 1; + if (parseSupported) { + try { + // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings. + parseSupported = !parse('"\t"'); + } catch (exception) {var abcdef = 1} + if (parseSupported) { + try { + // FF 4.0 and 4.0.1 allow leading `+` signs and leading + // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow + // certain octal literals. + parseSupported = parse("01") !== 1; + } catch (exception) {var abcdef = 1} + } + if (parseSupported) { + try { + // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal + // points. These environments, along with FF 3.1b1 and 2, + // also allow trailing commas in JSON objects and arrays. + parseSupported = parse("1.") !== 1; + } catch (exception) {var abcdef = 1} + } + } + } + } catch (exception) { + parseSupported = false; + } + } + isSupported = parseSupported; + } + } + return has[name] = !!isSupported; + } + + if (!has("json")) { + // Common `[[Class]]` name aliases. + var functionClass = "[object Function]"; + var dateClass = "[object Date]"; + var numberClass = "[object Number]"; + var stringClass = "[object String]"; + var arrayClass = "[object Array]"; + var booleanClass = "[object Boolean]"; + + // Detect incomplete support for accessing string characters by index. + var charIndexBuggy = has("bug-string-char-index"); + + // Define additional utility methods if the `Date` methods are buggy. + if (!isExtended) { + var floor = Math.floor; + // A mapping between the months of the year and the number of days between + // January 1st and the first of the respective month. + var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; + // Internal: Calculates the number of days between the Unix epoch and the + // first day of the given month. + var getDay = function (year, month) { + return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400); + }; + } + + // Internal: Determines if a property is a direct property of the given + // object. Delegates to the native `Object#hasOwnProperty` method. + if (!(isProperty = {}.hasOwnProperty)) { + isProperty = function (property) { + var members = {}, constructor; + if ((members.__proto__ = null, members.__proto__ = { + // The *proto* property cannot be set multiple times in recent + // versions of Firefox and SeaMonkey. + "toString": 1 + }, members).toString != getClass) { + // Safari <= 2.0.3 doesn't implement `Object#hasOwnProperty`, but + // supports the mutable *proto* property. + isProperty = function (property) { + // Capture and break the object's prototype chain (see section 8.6.2 + // of the ES 5.1 spec). The parenthesized expression prevents an + // unsafe transformation by the Closure Compiler. + var original = this.__proto__, result = property in (this.__proto__ = null, this); + // Restore the original prototype chain. + this.__proto__ = original; + return result; + }; + } else { + // Capture a reference to the top-level `Object` constructor. + constructor = members.constructor; + // Use the `constructor` property to simulate `Object#hasOwnProperty` in + // other environments. + isProperty = function (property) { + var parent = (this.constructor || constructor).prototype; + return property in this && !(property in parent && this[property] === parent[property]); + }; + } + members = null; + return isProperty.call(this, property); + }; + } + + // Internal: A set of primitive types used by `isHostType`. + var PrimitiveTypes = { + 'boolean': 1, + 'number': 1, + 'string': 1, + 'undefined': 1 + }; + + // Internal: Determines if the given object `property` value is a + // non-primitive. + var isHostType = function (object, property) { + var type = typeof object[property]; + return type == 'object' ? !!object[property] : !PrimitiveTypes[type]; + }; + + // Internal: Normalizes the `for...in` iteration algorithm across + // environments. Each enumerated key is yielded to a `callback` function. + forEach = function (object, callback) { + var size = 0, Properties, members, property; + + // Tests for bugs in the current environment's `for...in` algorithm. The + // `valueOf` property inherits the non-enumerable flag from + // `Object.prototype` in older versions of IE, Netscape, and Mozilla. + (Properties = function () { + this.valueOf = 0; + }).prototype.valueOf = 0; + + // Iterate over a new instance of the `Properties` class. + members = new Properties(); + for (property in members) { + // Ignore all properties inherited from `Object.prototype`. + if (isProperty.call(members, property)) { + size++; + } + } + Properties = members = null; + + // Normalize the iteration algorithm. + if (!size) { + // A list of non-enumerable properties inherited from `Object.prototype`. + members = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"]; + // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable + // properties. + forEach = function (object, callback) { + var isFunction = getClass.call(object) == functionClass, property, length; + var hasProperty = !isFunction && typeof object.constructor != 'function' && isHostType(object, 'hasOwnProperty') ? object.hasOwnProperty : isProperty; + for (property in object) { + // Gecko <= 1.0 enumerates the `prototype` property of functions under + // certain conditions; IE does not. + if (!(isFunction && property == "prototype") && hasProperty.call(object, property)) { + callback(property); + } + } + // Manually invoke the callback for each non-enumerable property. + for (length = members.length; property = members[--length]; hasProperty.call(object, property) && callback(property)); + }; + } else if (size == 2) { + // Safari <= 2.0.4 enumerates shadowed properties twice. + forEach = function (object, callback) { + // Create a set of iterated properties. + var members = {}, isFunction = getClass.call(object) == functionClass, property; + for (property in object) { + // Store each property name to prevent double enumeration. The + // `prototype` property of functions is not enumerated due to cross- + // environment inconsistencies. + if (!(isFunction && property == "prototype") && !isProperty.call(members, property) && (members[property] = 1) && isProperty.call(object, property)) { + callback(property); + } + } + }; + } else { + // No bugs detected; use the standard `for...in` algorithm. + forEach = function (object, callback) { + var isFunction = getClass.call(object) == functionClass, property, isConstructor; + for (property in object) { + if (!(isFunction && property == "prototype") && isProperty.call(object, property) && !(isConstructor = property === "constructor")) { + callback(property); + } + } + // Manually invoke the callback for the `constructor` property due to + // cross-environment inconsistencies. + if (isConstructor || isProperty.call(object, (property = "constructor"))) { + callback(property); + } + }; + } + return forEach(object, callback); + }; + + // Public: Serializes a JavaScript `value` as a JSON string. The optional + // `filter` argument may specify either a function that alters how object and + // array members are serialized, or an array of strings and numbers that + // indicates which properties should be serialized. The optional `width` + // argument may be either a string or number that specifies the indentation + // level of the output. + if (!has("json-stringify")) { + // Internal: A map of control characters and their escaped equivalents. + var Escapes = { + 92: "\\\\", + 34: '\\"', + 8: "\\b", + 12: "\\f", + 10: "\\n", + 13: "\\r", + 9: "\\t" + }; + + // Internal: Converts `value` into a zero-padded string such that its + // length is at least equal to `width`. The `width` must be <= 6. + var leadingZeroes = "000000"; + var toPaddedString = function (width, value) { + // The `|| 0` expression is necessary to work around a bug in + // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`. + return (leadingZeroes + (value || 0)).slice(-width); + }; + + // Internal: Double-quotes a string `value`, replacing all ASCII control + // characters (characters with code unit values between 0 and 31) with + // their escaped equivalents. This is an implementation of the + // `Quote(value)` operation defined in ES 5.1 section 15.12.3. + var unicodePrefix = "\\u00"; + var quote = function (value) { + var result = '"', index = 0, length = value.length, isLarge = length > 10 && charIndexBuggy, symbols; + if (isLarge) { + symbols = value.split(""); + } + for (; index < length; index++) { + var charCode = value.charCodeAt(index); + // If the character is a control character, append its Unicode or + // shorthand escape sequence; otherwise, append the character as-is. + switch (charCode) { + case 8: case 9: case 10: case 12: case 13: case 34: case 92: + result += Escapes[charCode]; + break; + default: + if (charCode < 32) { + result += unicodePrefix + toPaddedString(2, charCode.toString(16)); + break; + } + result += isLarge ? symbols[index] : charIndexBuggy ? value.charAt(index) : value[index]; + } + } + return result + '"'; + }; + + // Internal: Recursively serializes an object. Implements the + // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations. + var serialize = function (property, object, callback, properties, whitespace, indentation, stack) { + var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result; + try { + // Necessary for host object support. + value = object[property]; + } catch (exception) {var abcdef = 1} + if (typeof value == "object" && value) { + className = getClass.call(value); + if (className == dateClass && !isProperty.call(value, "toJSON")) { + if (value > -1 / 0 && value < 1 / 0) { + // Dates are serialized according to the `Date#toJSON` method + // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15 + // for the ISO 8601 date time string format. + if (getDay) { + // Manually compute the year, month, date, hours, minutes, + // seconds, and milliseconds if the `getUTC*` methods are + // buggy. Adapted from @Yaffle's `date-shim` project. + date = floor(value / 864e5); + for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++); + for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++); + date = 1 + date - getDay(year, month); + // The `time` value specifies the time within the day (see ES + // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used + // to compute `A modulo B`, as the `%` operator does not + // correspond to the `modulo` operation for negative numbers. + time = (value % 864e5 + 864e5) % 864e5; + // The hours, minutes, seconds, and milliseconds are obtained by + // decomposing the time within the day. See section 15.9.1.10. + hours = floor(time / 36e5) % 24; + minutes = floor(time / 6e4) % 60; + seconds = floor(time / 1e3) % 60; + milliseconds = time % 1e3; + } else { + year = value.getUTCFullYear(); + month = value.getUTCMonth(); + date = value.getUTCDate(); + hours = value.getUTCHours(); + minutes = value.getUTCMinutes(); + seconds = value.getUTCSeconds(); + milliseconds = value.getUTCMilliseconds(); + } + // Serialize extended years correctly. + value = (year <= 0 || year >= 1e4 ? (year < 0 ? "-" : "+") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) + + "-" + toPaddedString(2, month + 1) + "-" + toPaddedString(2, date) + + // Months, dates, hours, minutes, and seconds should have two + // digits; milliseconds should have three. + "T" + toPaddedString(2, hours) + ":" + toPaddedString(2, minutes) + ":" + toPaddedString(2, seconds) + + // Milliseconds are optional in ES 5.0, but required in 5.1. + "." + toPaddedString(3, milliseconds) + "Z"; + } else { + value = null; + } + } else if (typeof value.toJSON == "function" && ((className != numberClass && className != stringClass && className != arrayClass) || isProperty.call(value, "toJSON"))) { + // Prototype <= 1.6.1 adds non-standard `toJSON` methods to the + // `Number`, `String`, `Date`, and `Array` prototypes. JSON 3 + // ignores all `toJSON` methods on these objects unless they are + // defined directly on an instance. + value = value.toJSON(property); + } + } + if (callback) { + // If a replacement function was provided, call it to obtain the value + // for serialization. + value = callback.call(object, property, value); + } + if (value === null) { + return "null"; + } + className = getClass.call(value); + if (className == booleanClass) { + // Booleans are represented literally. + return "" + value; + } else if (className == numberClass) { + // JSON numbers must be finite. `Infinity` and `NaN` are serialized as + // `"null"`. + return value > -1 / 0 && value < 1 / 0 ? "" + value : "null"; + } else if (className == stringClass) { + // Strings are double-quoted and escaped. + return quote("" + value); + } + // Recursively serialize objects and arrays. + if (typeof value == "object") { + // Check for cyclic structures. This is a linear search; performance + // is inversely proportional to the number of unique nested objects. + for (length = stack.length; length--;) { + if (stack[length] === value) { + // Cyclic structures cannot be serialized by `JSON.stringify`. + throw TypeError(); + } + } + // Add the object to the stack of traversed objects. + stack.push(value); + results = []; + // Save the current indentation level and indent one additional level. + prefix = indentation; + indentation += whitespace; + if (className == arrayClass) { + // Recursively serialize array elements. + for (index = 0, length = value.length; index < length; index++) { + element = serialize(index, value, callback, properties, whitespace, indentation, stack); + results.push(element === undef ? "null" : element); + } + result = results.length ? (whitespace ? "[\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "]" : ("[" + results.join(",") + "]")) : "[]"; + } else { + // Recursively serialize object members. Members are selected from + // either a user-specified list of property names, or the object + // itself. + forEach(properties || value, function (property) { + var element = serialize(property, value, callback, properties, whitespace, indentation, stack); + if (element !== undef) { + // According to ES 5.1 section 15.12.3: "If `gap` {whitespace} + // is not the empty string, let `member` {quote(property) + ":"} + // be the concatenation of `member` and the `space` character." + // The "`space` character" refers to the literal space + // character, not the `space` {width} argument provided to + // `JSON.stringify`. + results.push(quote(property) + ":" + (whitespace ? " " : "") + element); + } + }); + result = results.length ? (whitespace ? "{\n" + indentation + results.join(",\n" + indentation) + "\n" + prefix + "}" : ("{" + results.join(",") + "}")) : "{}"; + } + // Remove the object from the traversed object stack. + stack.pop(); + return result; + } + }; + + // Public: `JSON.stringify`. See ES 5.1 section 15.12.3. + JSON3.stringify = function (source, filter, width) { + var whitespace, callback, properties, className; + if (typeof filter == "function" || typeof filter == "object" && filter) { + if ((className = getClass.call(filter)) == functionClass) { + callback = filter; + } else if (className == arrayClass) { + // Convert the property names array into a makeshift set. + properties = {}; + for (var index = 0, length = filter.length, value; index < length; value = filter[index++], ((className = getClass.call(value)), className == stringClass || className == numberClass) && (properties[value] = 1)); + } + } + if (width) { + if ((className = getClass.call(width)) == numberClass) { + // Convert the `width` to an integer and create a string containing + // `width` number of space characters. + if ((width -= width % 1) > 0) { + for (whitespace = "", width > 10 && (width = 10); whitespace.length < width; whitespace += " "); + } + } else if (className == stringClass) { + whitespace = width.length <= 10 ? width : width.slice(0, 10); + } + } + // Opera <= 7.54u2 discards the values associated with empty string keys + // (`""`) only if they are used directly within an object member list + // (e.g., `!("" in { "": 1})`). + return serialize("", (value = {}, value[""] = source, value), callback, properties, whitespace, "", []); + }; + } + + // Public: Parses a JSON source string. + if (!has("json-parse")) { + var fromCharCode = String.fromCharCode; + + // Internal: A map of escaped control characters and their unescaped + // equivalents. + var Unescapes = { + 92: "\\", + 34: '"', + 47: "/", + 98: "\b", + 116: "\t", + 110: "\n", + 102: "\f", + 114: "\r" + }; + + // Internal: Stores the parser state. + var Index, Source; + + // Internal: Resets the parser state and throws a `SyntaxError`. + var abort = function() { + Index = Source = null; + throw SyntaxError(); + }; + + // Internal: Returns the next token, or `"$"` if the parser has reached + // the end of the source string. A token may be a string, number, `null` + // literal, or Boolean literal. + var lex = function () { + var source = Source, length = source.length, value, begin, position, isSigned, charCode; + while (Index < length) { + charCode = source.charCodeAt(Index); + switch (charCode) { + case 9: case 10: case 13: case 32: + // Skip whitespace tokens, including tabs, carriage returns, line + // feeds, and space characters. + Index++; + break; + case 123: case 125: case 91: case 93: case 58: case 44: + // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at + // the current position. + value = charIndexBuggy ? source.charAt(Index) : source[Index]; + Index++; + return value; + case 34: + // `"` delimits a JSON string; advance to the next character and + // begin parsing the string. String tokens are prefixed with the + // sentinel `@` character to distinguish them from punctuators and + // end-of-string tokens. + for (value = "@", Index++; Index < length;) { + charCode = source.charCodeAt(Index); + if (charCode < 32) { + // Unescaped ASCII control characters (those with a code unit + // less than the space character) are not permitted. + abort(); + } else if (charCode == 92) { + // A reverse solidus (`\`) marks the beginning of an escaped + // control character (including `"`, `\`, and `/`) or Unicode + // escape sequence. + charCode = source.charCodeAt(++Index); + switch (charCode) { + case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114: + // Revive escaped control characters. + value += Unescapes[charCode]; + Index++; + break; + case 117: + // `\u` marks the beginning of a Unicode escape sequence. + // Advance to the first character and validate the + // four-digit code point. + begin = ++Index; + for (position = Index + 4; Index < position; Index++) { + charCode = source.charCodeAt(Index); + // A valid sequence comprises four hexdigits (case- + // insensitive) that form a single hexadecimal value. + if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) { + // Invalid Unicode escape sequence. + abort(); + } + } + // Revive the escaped character. + value += fromCharCode("0x" + source.slice(begin, Index)); + break; + default: + // Invalid escape sequence. + abort(); + } + } else { + if (charCode == 34) { + // An unescaped double-quote character marks the end of the + // string. + break; + } + charCode = source.charCodeAt(Index); + begin = Index; + // Optimize for the common case where a string is valid. + while (charCode >= 32 && charCode != 92 && charCode != 34) { + charCode = source.charCodeAt(++Index); + } + // Append the string as-is. + value += source.slice(begin, Index); + } + } + if (source.charCodeAt(Index) == 34) { + // Advance to the next character and return the revived string. + Index++; + return value; + } + // Unterminated string. + abort(); + default: + // Parse numbers and literals. + begin = Index; + // Advance past the negative sign, if one is specified. + if (charCode == 45) { + isSigned = true; + charCode = source.charCodeAt(++Index); + } + // Parse an integer or floating-point value. + if (charCode >= 48 && charCode <= 57) { + // Leading zeroes are interpreted as octal literals. + if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) { + // Illegal octal literal. + abort(); + } + isSigned = false; + // Parse the integer component. + for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++); + // Floats cannot contain a leading decimal point; however, this + // case is already accounted for by the parser. + if (source.charCodeAt(Index) == 46) { + position = ++Index; + // Parse the decimal component. + for (; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++); + if (position == Index) { + // Illegal trailing decimal. + abort(); + } + Index = position; + } + // Parse exponents. The `e` denoting the exponent is + // case-insensitive. + charCode = source.charCodeAt(Index); + if (charCode == 101 || charCode == 69) { + charCode = source.charCodeAt(++Index); + // Skip past the sign following the exponent, if one is + // specified. + if (charCode == 43 || charCode == 45) { + Index++; + } + // Parse the exponential component. + for (position = Index; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++); + if (position == Index) { + // Illegal empty exponent. + abort(); + } + Index = position; + } + // Coerce the parsed value to a JavaScript number. + return +source.slice(begin, Index); + } + // A negative sign may only precede numbers. + if (isSigned) { + abort(); + } + // `true`, `false`, and `null` literals. + if (source.slice(Index, Index + 4) == "true") { + Index += 4; + return true; + } else if (source.slice(Index, Index + 5) == "false") { + Index += 5; + return false; + } else if (source.slice(Index, Index + 4) == "null") { + Index += 4; + return null; + } + // Unrecognized token. + abort(); + } + } + // Return the sentinel `$` character if the parser has reached the end + // of the source string. + return "$"; + }; + + // Internal: Parses a JSON `value` token. + var get = function (value) { + var results, hasMembers; + if (value == "$") { + // Unexpected end of input. + abort(); + } + if (typeof value == "string") { + if ((charIndexBuggy ? value.charAt(0) : value[0]) == "@") { + // Remove the sentinel `@` character. + return value.slice(1); + } + // Parse object and array literals. + if (value == "[") { + // Parses a JSON array, returning a new JavaScript array. + results = []; + for (;; hasMembers || (hasMembers = true)) { + value = lex(); + // A closing square bracket marks the end of the array literal. + if (value == "]") { + break; + } + // If the array literal contains elements, the current token + // should be a comma separating the previous element from the + // next. + if (hasMembers) { + if (value == ",") { + value = lex(); + if (value == "]") { + // Unexpected trailing `,` in array literal. + abort(); + } + } else { + // A `,` must separate each array element. + abort(); + } + } + // Elisions and leading commas are not permitted. + if (value == ",") { + abort(); + } + results.push(get(value)); + } + return results; + } else if (value == "{") { + // Parses a JSON object, returning a new JavaScript object. + results = {}; + for (;; hasMembers || (hasMembers = true)) { + value = lex(); + // A closing curly brace marks the end of the object literal. + if (value == "}") { + break; + } + // If the object literal contains members, the current token + // should be a comma separator. + if (hasMembers) { + if (value == ",") { + value = lex(); + if (value == "}") { + // Unexpected trailing `,` in object literal. + abort(); + } + } else { + // A `,` must separate each object member. + abort(); + } + } + // Leading commas are not permitted, object property names must be + // double-quoted strings, and a `:` must separate each property + // name and value. + if (value == "," || typeof value != "string" || (charIndexBuggy ? value.charAt(0) : value[0]) != "@" || lex() != ":") { + abort(); + } + results[value.slice(1)] = get(lex()); + } + return results; + } + // Unexpected token encountered. + abort(); + } + return value; + }; + + // Internal: Updates a traversed object member. + var update = function(source, property, callback) { + var element = walk(source, property, callback); + if (element === undef) { + delete source[property]; + } else { + source[property] = element; + } + }; + + // Internal: Recursively traverses a parsed JSON object, invoking the + // `callback` function for each value. This is an implementation of the + // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2. + var walk = function (source, property, callback) { + var value = source[property], length; + if (typeof value == "object" && value) { + // `forEach` can't be used to traverse an array in Opera <= 8.54 + // because its `Object#hasOwnProperty` implementation returns `false` + // for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`). + if (getClass.call(value) == arrayClass) { + for (length = value.length; length--;) { + update(value, length, callback); + } + } else { + forEach(value, function (property) { + update(value, property, callback); + }); + } + } + return callback.call(source, property, value); + }; + + // Public: `JSON.parse`. See ES 5.1 section 15.12.2. + JSON3.parse = function (source, callback) { + var result, value; + Index = 0; + Source = "" + source; + result = get(lex()); + // If a JSON string contains multiple tokens, it is invalid. + if (lex() != "$") { + abort(); + } + // Reset the parser state. + Index = Source = null; + return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[""] = result, value), "", callback) : result; + }; + } + } + + // Export for asynchronous module loaders. + if (isLoader) { + define(function () { + return JSON3; + }); + } +}(this)); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.min.js new file mode 100644 index 0000000..caafc80 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/json3_3.2.6/lib/json3.min.js @@ -0,0 +1,400 @@ +/*! JSON v3.2.6 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */ +;(function () { + var n = null; + (function (G) { + function m(a) { + if (m[a] !== s) return m[a]; + var c; + if ("bug-string-char-index" == a) c = "a" != "a"[0]; else if ("json" == a) c = m("json-stringify") && m("json-parse"); else { + var e; + if ("json-stringify" == a) { + c = o.stringify; + var b = "function" == typeof c && l; + if (b) { + (e = function () { + return 1 + }).toJSON = e; + try { + b = "0" === c(0) && "0" === c(new Number) && '""' == c(new String) && c(p) === s && c(s) === s && c() === s && "1" === c(e) && "[1]" == c([e]) && "[null]" == c([s]) && "null" == c(n) && "[null,null,null]" == c([s, p, n]) && '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}' == c({ + a: [e, + !0, !1, n, "\x00\u0008\n\u000c\r\t"] + }) && "1" === c(n, e) && "[\n 1,\n 2\n]" == c([1, 2], n, 1) && '"-271821-04-20T00:00:00.000Z"' == c(new Date(-864E13)) && '"+275760-09-13T00:00:00.000Z"' == c(new Date(864E13)) && '"-000001-01-01T00:00:00.000Z"' == c(new Date(-621987552E5)) && '"1969-12-31T23:59:59.999Z"' == c(new Date(-1)) + } catch (f) { + b = !1 + } + } + c = b + } + if ("json-parse" == a) { + c = o.parse; + if ("function" == typeof c) try { + if (0 === c("0") && !c(!1)) { + e = c('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'); + var j = 5 == e.a.length && 1 === e.a[0]; + if (j) { + try { + j = !c('"\t"') + } catch (d) {var abcdef = 1 + } + if (j) try { + j = + 1 !== c("01") + } catch (h) {var abcdef = 1 + } + if (j) try { + j = 1 !== c("1.") + } catch (k) {var abcdef = 1 + } + } + } + } catch (N) { + j = !1 + } + c = j + } + } + return m[a] = !!c + } + + var p = {}.toString, q, x, s, H = typeof define === "function" && define.amd, + y = "object" == typeof JSON && JSON, + o = "object" == typeof exports && exports && !exports.nodeType && exports; + o && y ? (o.stringify = y.stringify, o.parse = y.parse) : o = G.JSON = y || {}; + var l = new Date(-3509827334573292); + try { + l = -109252 == l.getUTCFullYear() && 0 === l.getUTCMonth() && 1 === l.getUTCDate() && 10 == l.getUTCHours() && 37 == l.getUTCMinutes() && 6 == l.getUTCSeconds() && 708 == l.getUTCMilliseconds() + } catch (O) {var abcdef = 1 + } + if (!m("json")) { + var t = + m("bug-string-char-index"); + if (!l) var u = Math.floor, I = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], + z = function (a, c) { + return I[c] + 365 * (a - 1970) + u((a - 1969 + (c = +(c > 1))) / 4) - u((a - 1901 + c) / 100) + u((a - 1601 + c) / 400) + }; + if (!(q = {}.hasOwnProperty)) q = function (a) { + var c = {}, e; + if ((c.__proto__ = n, c.__proto__ = {toString: 1}, c).toString != p) q = function (a) { + var c = this.__proto__, a = a in (this.__proto__ = n, this); + this.__proto__ = c; + return a + }; else { + e = c.constructor; + q = function (a) { + var c = (this.constructor || e).prototype; + return a in this && !(a in c && + this[a] === c[a]) + } + } + c = n; + return q.call(this, a) + }; + var J = {"boolean": 1, number: 1, string: 1, undefined: 1}; + x = function (a, c) { + var e = 0, b, f, j; + (b = function () { + this.valueOf = 0 + }).prototype.valueOf = 0; + f = new b; + for (j in f) q.call(f, j) && e++; + b = f = n; + if (e) x = e == 2 ? function (a, c) { + var e = {}, b = p.call(a) == "[object Function]", f; + for (f in a) !(b && f == "prototype") && !q.call(e, f) && (e[f] = 1) && q.call(a, f) && c(f) + } : function (a, c) { + var e = p.call(a) == "[object Function]", b, f; + for (b in a) !(e && b == "prototype") && q.call(a, b) && !(f = b === "constructor") && c(b); + (f || q.call(a, + b = "constructor")) && c(b) + }; else { + f = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"]; + x = function (a, c) { + var e = p.call(a) == "[object Function]", b, g; + if (g = !e) if (g = typeof a.constructor != "function") { + g = typeof a.hasOwnProperty; + g = g == "object" ? !!a.hasOwnProperty : !J[g] + } + g = g ? a.hasOwnProperty : q; + for (b in a) !(e && b == "prototype") && g.call(a, b) && c(b); + for (e = f.length; b = f[--e]; g.call(a, b) && c(b)) ; + } + } + return x(a, c) + }; + if (!m("json-stringify")) { + var K = { + 92: "\\\\", 34: '\\"', 8: "\\b", + 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" + }, v = function (a, c) { + return ("000000" + (c || 0)).slice(-a) + }, D = function (a) { + var c = '"', b = 0, g = a.length, f = g > 10 && t, j; + for (f && (j = a.split("")); b < g; b++) { + var d = a.charCodeAt(b); + switch (d) { + case 8: + case 9: + case 10: + case 12: + case 13: + case 34: + case 92: + c = c + K[d]; + break; + default: + if (d < 32) { + c = c + ("\\u00" + v(2, d.toString(16))); + break + } + c = c + (f ? j[b] : t ? a.charAt(b) : a[b]) + } + } + return c + '"' + }, B = function (a, c, b, g, f, j, d) { + var h, k, i, l, m, o, r, t, w; + try { + h = c[a] + } catch (y) {var abcdef = 1 + } + if (typeof h == "object" && h) { + k = p.call(h); + if (k == "[object Date]" && + !q.call(h, "toJSON")) if (h > -1 / 0 && h < 1 / 0) { + if (z) { + l = u(h / 864E5); + for (k = u(l / 365.2425) + 1970 - 1; z(k + 1, 0) <= l; k++) ; + for (i = u((l - z(k, 0)) / 30.42); z(k, i + 1) <= l; i++) ; + l = 1 + l - z(k, i); + m = (h % 864E5 + 864E5) % 864E5; + o = u(m / 36E5) % 24; + r = u(m / 6E4) % 60; + t = u(m / 1E3) % 60; + m = m % 1E3 + } else { + k = h.getUTCFullYear(); + i = h.getUTCMonth(); + l = h.getUTCDate(); + o = h.getUTCHours(); + r = h.getUTCMinutes(); + t = h.getUTCSeconds(); + m = h.getUTCMilliseconds() + } + h = (k <= 0 || k >= 1E4 ? (k < 0 ? "-" : "+") + v(6, k < 0 ? -k : k) : v(4, k)) + "-" + v(2, i + 1) + "-" + v(2, l) + "T" + v(2, o) + ":" + v(2, r) + ":" + v(2, t) + "." + v(3, m) + "Z" + } else h = + n; else if (typeof h.toJSON == "function" && (k != "[object Number]" && k != "[object String]" && k != "[object Array]" || q.call(h, "toJSON"))) h = h.toJSON(a) + } + b && (h = b.call(c, a, h)); + if (h === n) return "null"; + k = p.call(h); + if (k == "[object Boolean]") return "" + h; + if (k == "[object Number]") return h > -1 / 0 && h < 1 / 0 ? "" + h : "null"; + if (k == "[object String]") return D("" + h); + if (typeof h == "object") { + for (a = d.length; a--;) if (d[a] === h) throw TypeError(); + d.push(h); + w = []; + c = j; + j = j + f; + if (k == "[object Array]") { + i = 0; + for (a = h.length; i < a; i++) { + k = B(i, h, b, g, f, j, d); + w.push(k === + s ? "null" : k) + } + a = w.length ? f ? "[\n" + j + w.join(",\n" + j) + "\n" + c + "]" : "[" + w.join(",") + "]" : "[]" + } else { + x(g || h, function (a) { + var c = B(a, h, b, g, f, j, d); + c !== s && w.push(D(a) + ":" + (f ? " " : "") + c) + }); + a = w.length ? f ? "{\n" + j + w.join(",\n" + j) + "\n" + c + "}" : "{" + w.join(",") + "}" : "{}" + } + d.pop(); + return a + } + }; + o.stringify = function (a, c, b) { + var g, f, j, d; + if (typeof c == "function" || typeof c == "object" && c) if ((d = p.call(c)) == "[object Function]") f = c; else if (d == "[object Array]") { + j = {}; + for (var h = 0, k = c.length, i; h < k; i = c[h++], (d = p.call(i), d == "[object String]" || d == + "[object Number]") && (j[i] = 1)) ; + } + if (b) if ((d = p.call(b)) == "[object Number]") { + if ((b = b - b % 1) > 0) { + g = ""; + for (b > 10 && (b = 10); g.length < b; g = g + " ") ; + } + } else d == "[object String]" && (g = b.length <= 10 ? b : b.slice(0, 10)); + return B("", (i = {}, i[""] = a, i), f, j, g, "", []) + } + } + if (!m("json-parse")) { + var L = String.fromCharCode, + M = {92: "\\", 34: '"', 47: "/", 98: "\u0008", 116: "\t", 110: "\n", 102: "\u000c", 114: "\r"}, b, + A, i = function () { + b = A = n; + throw SyntaxError(); + }, r = function () { + for (var a = A, c = a.length, e, g, f, j, d; b < c;) { + d = a.charCodeAt(b); + switch (d) { + case 9: + case 10: + case 13: + case 32: + b++; + break; + case 123: + case 125: + case 91: + case 93: + case 58: + case 44: + e = t ? a.charAt(b) : a[b]; + b++; + return e; + case 34: + e = "@"; + for (b++; b < c;) { + d = a.charCodeAt(b); + if (d < 32) i(); else if (d == 92) { + d = a.charCodeAt(++b); + switch (d) { + case 92: + case 34: + case 47: + case 98: + case 116: + case 110: + case 102: + case 114: + e = e + M[d]; + b++; + break; + case 117: + g = ++b; + for (f = b + 4; b < f; b++) { + d = a.charCodeAt(b); + d >= 48 && d <= 57 || d >= 97 && d <= 102 || d >= 65 && d <= 70 || i() + } + e = e + L("0x" + a.slice(g, b)); + break; + default: + i() + } + } else { + if (d == 34) break; + d = a.charCodeAt(b); + for (g = b; d >= 32 && d != 92 && d != 34;) d = a.charCodeAt(++b); + e = e + a.slice(g, b) + } + } + if (a.charCodeAt(b) == 34) { + b++; + return e + } + i(); + default: + g = b; + if (d == 45) { + j = true; + d = a.charCodeAt(++b) + } + if (d >= 48 && d <= 57) { + for (d == 48 && (d = a.charCodeAt(b + 1), d >= 48 && d <= 57) && i(); b < c && (d = a.charCodeAt(b), d >= 48 && d <= 57); b++) ; + if (a.charCodeAt(b) == 46) { + for (f = ++b; f < c && (d = a.charCodeAt(f), d >= 48 && d <= 57); f++) ; + f == b && i(); + b = f + } + d = a.charCodeAt(b); + if (d == 101 || d == 69) { + d = a.charCodeAt(++b); + (d == 43 || d == 45) && b++; + for (f = b; f < c && (d = a.charCodeAt(f), d >= 48 && d <= 57); f++) ; + f == b && i(); + b = f + } + return +a.slice(g, b) + } + j && i(); + if (a.slice(b, b + 4) == "true") { + b = + b + 4; + return true + } + if (a.slice(b, b + 5) == "false") { + b = b + 5; + return false + } + if (a.slice(b, b + 4) == "null") { + b = b + 4; + return n + } + i() + } + } + return "$" + }, C = function (a) { + var c, b; + a == "$" && i(); + if (typeof a == "string") { + if ((t ? a.charAt(0) : a[0]) == "@") return a.slice(1); + if (a == "[") { + for (c = []; ; b || (b = true)) { + a = r(); + if (a == "]") break; + if (b) if (a == ",") { + a = r(); + a == "]" && i() + } else i(); + a == "," && i(); + c.push(C(a)) + } + return c + } + if (a == "{") { + for (c = {}; ; b || (b = true)) { + a = r(); + if (a == "}") break; + if (b) if (a == ",") { + a = r(); + a == "}" && i() + } else i(); + (a == "," || typeof a != "string" || (t ? a.charAt(0) : + a[0]) != "@" || r() != ":") && i(); + c[a.slice(1)] = C(r()) + } + return c + } + i() + } + return a + }, F = function (a, b, e) { + e = E(a, b, e); + e === s ? delete a[b] : a[b] = e + }, E = function (a, b, e) { + var g = a[b], f; + if (typeof g == "object" && g) if (p.call(g) == "[object Array]") for (f = g.length; f--;) F(g, f, e); else x(g, function (a) { + F(g, a, e) + }); + return e.call(a, b, g) + }; + o.parse = function (a, c) { + var e, g; + b = 0; + A = "" + a; + e = C(r()); + r() != "$" && i(); + b = A = n; + return c && p.call(c) == "[object Function]" ? E((g = {}, g[""] = e, g), "", c) : e + } + } + } + H && define(function () { + return o + }) + })(this); +}()); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/momentjs_2.5.1/momentjs.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/momentjs_2.5.1/momentjs.min.js new file mode 100644 index 0000000..ddf03ad --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/momentjs_2.5.1/momentjs.min.js @@ -0,0 +1,963 @@ +//! moment.js +//! version : 2.5.1 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +(function (a) { + function b() { + return { + empty: !1, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: !1, + invalidMonth: null, + invalidFormat: !1, + userInvalidated: !1, + iso: !1 + } + } + + function c(a, b) { + return function (c) { + return k(a.call(this, c), b) + } + } + + function d(a, b) { + return function (c) { + return this.lang().ordinal(a.call(this, c), b) + } + } + + function e() { + } + + function f(a) { + w(a), h(this, a) + } + + function g(a) { + var b = q(a), c = b.year || 0, d = b.month || 0, e = b.week || 0, f = b.day || 0, g = b.hour || 0, + h = b.minute || 0, i = b.second || 0, j = b.millisecond || 0; + this._milliseconds = +j + 1e3 * i + 6e4 * h + 36e5 * g, this._days = +f + 7 * e, this._months = +d + 12 * c, this._data = {}, this._bubble() + } + + function h(a, b) { + for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]); + return b.hasOwnProperty("toString") && (a.toString = b.toString), b.hasOwnProperty("valueOf") && (a.valueOf = b.valueOf), a + } + + function i(a) { + var b, c = {}; + for (b in a) a.hasOwnProperty(b) && qb.hasOwnProperty(b) && (c[b] = a[b]); + return c + } + + function j(a) { + return 0 > a ? Math.ceil(a) : Math.floor(a) + } + + function k(a, b, c) { + for (var d = "" + Math.abs(a), e = a >= 0; d.length < b;) d = "0" + d; + return (e ? c ? "+" : "" : "-") + d + } + + function l(a, b, c, d) { + var e, f, g = b._milliseconds, h = b._days, i = b._months; + g && a._d.setTime(+a._d + g * c), (h || i) && (e = a.minute(), f = a.hour()), h && a.date(a.date() + h * c), i && a.month(a.month() + i * c), g && !d && db.updateOffset(a), (h || i) && (a.minute(e), a.hour(f)) + } + + function m(a) { + return "[object Array]" === Object.prototype.toString.call(a) + } + + function n(a) { + return "[object Date]" === Object.prototype.toString.call(a) || a instanceof Date + } + + function o(a, b, c) { + var d, e = Math.min(a.length, b.length), f = Math.abs(a.length - b.length), g = 0; + for (d = 0; e > d; d++) (c && a[d] !== b[d] || !c && s(a[d]) !== s(b[d])) && g++; + return g + f + } + + function p(a) { + if (a) { + var b = a.toLowerCase().replace(/(.)s$/, "$1"); + a = Tb[a] || Ub[b] || b + } + return a + } + + function q(a) { + var b, c, d = {}; + for (c in a) a.hasOwnProperty(c) && (b = p(c), b && (d[b] = a[c])); + return d + } + + function r(b) { + var c, d; + if (0 === b.indexOf("week")) c = 7, d = "day"; else { + if (0 !== b.indexOf("month")) return; + c = 12, d = "month" + } + db[b] = function (e, f) { + var g, h, i = db.fn._lang[b], j = []; + if ("number" == typeof e && (f = e, e = a), h = function (a) { + var b = db().utc().set(d, a); + return i.call(db.fn._lang, b, e || "") + }, null != f) return h(f); + for (g = 0; c > g; g++) j.push(h(g)); + return j + } + } + + function s(a) { + var b = +a, c = 0; + return 0 !== b && isFinite(b) && (c = b >= 0 ? Math.floor(b) : Math.ceil(b)), c + } + + function t(a, b) { + return new Date(Date.UTC(a, b + 1, 0)).getUTCDate() + } + + function u(a) { + return v(a) ? 366 : 365 + } + + function v(a) { + return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0 + } + + function w(a) { + var b; + a._a && -2 === a._pf.overflow && (b = a._a[jb] < 0 || a._a[jb] > 11 ? jb : a._a[kb] < 1 || a._a[kb] > t(a._a[ib], a._a[jb]) ? kb : a._a[lb] < 0 || a._a[lb] > 23 ? lb : a._a[mb] < 0 || a._a[mb] > 59 ? mb : a._a[nb] < 0 || a._a[nb] > 59 ? nb : a._a[ob] < 0 || a._a[ob] > 999 ? ob : -1, a._pf._overflowDayOfYear && (ib > b || b > kb) && (b = kb), a._pf.overflow = b) + } + + function x(a) { + return null == a._isValid && (a._isValid = !isNaN(a._d.getTime()) && a._pf.overflow < 0 && !a._pf.empty && !a._pf.invalidMonth && !a._pf.nullInput && !a._pf.invalidFormat && !a._pf.userInvalidated, a._strict && (a._isValid = a._isValid && 0 === a._pf.charsLeftOver && 0 === a._pf.unusedTokens.length)), a._isValid + } + + function y(a) { + return a ? a.toLowerCase().replace("_", "-") : a + } + + function z(a, b) { + return b._isUTC ? db(a).zone(b._offset || 0) : db(a).local() + } + + function A(a, b) { + return b.abbr = a, pb[a] || (pb[a] = new e), pb[a].set(b), pb[a] + } + + function B(a) { + delete pb[a] + } + + function C(a) { + var b, c, d, e, f = 0, g = function (a) { + if (!pb[a] && rb) try { + require("./lang/" + a) + } catch (b) { + var abcdef = 1 + } + return pb[a] + }; + if (!a) return db.fn._lang; + if (!m(a)) { + if (c = g(a)) return c; + a = [a] + } + for (; f < a.length;) { + for (e = y(a[f]).split("-"), b = e.length, d = y(a[f + 1]), d = d ? d.split("-") : null; b > 0;) { + if (c = g(e.slice(0, b).join("-"))) return c; + if (d && d.length >= b && o(e, d, !0) >= b - 1) break; + b-- + } + f++ + } + return db.fn._lang + } + + function D(a) { + return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "") + } + + function E(a) { + var b, c, d = a.match(vb); + for (b = 0, c = d.length; c > b; b++) d[b] = Yb[d[b]] ? Yb[d[b]] : D(d[b]); + return function (e) { + var f = ""; + for (b = 0; c > b; b++) f += d[b] instanceof Function ? d[b].call(e, a) : d[b]; + return f + } + } + + function F(a, b) { + return a.isValid() ? (b = G(b, a.lang()), Vb[b] || (Vb[b] = E(b)), Vb[b](a)) : a.lang().invalidDate() + } + + function G(a, b) { + function c(a) { + return b.longDateFormat(a) || a + } + + var d = 5; + for (wb.lastIndex = 0; d >= 0 && wb.test(a);) a = a.replace(wb, c), wb.lastIndex = 0, d -= 1; + return a + } + + function H(a, b) { + var c, d = b._strict; + switch (a) { + case"DDDD": + return Ib; + case"YYYY": + case"GGGG": + case"gggg": + return d ? Jb : zb; + case"Y": + case"G": + case"g": + return Lb; + case"YYYYYY": + case"YYYYY": + case"GGGGG": + case"ggggg": + return d ? Kb : Ab; + case"S": + if (d) return Gb; + case"SS": + if (d) return Hb; + case"SSS": + if (d) return Ib; + case"DDD": + return yb; + case"MMM": + case"MMMM": + case"dd": + case"ddd": + case"dddd": + return Cb; + case"a": + case"A": + return C(b._l)._meridiemParse; + case"X": + return Fb; + case"Z": + case"ZZ": + return Db; + case"T": + return Eb; + case"SSSS": + return Bb; + case"MM": + case"DD": + case"YY": + case"GG": + case"gg": + case"HH": + case"hh": + case"mm": + case"ss": + case"ww": + case"WW": + return d ? Hb : xb; + case"M": + case"D": + case"d": + case"H": + case"h": + case"m": + case"s": + case"w": + case"W": + case"e": + case"E": + return xb; + default: + return c = new RegExp(P(O(a.replace("\\", "")), "i")) + } + } + + function I(a) { + a = a || ""; + var b = a.match(Db) || [], c = b[b.length - 1] || [], d = (c + "").match(Qb) || ["-", 0, 0], + e = +(60 * d[1]) + s(d[2]); + return "+" === d[0] ? -e : e + } + + function J(a, b, c) { + var d, e = c._a; + switch (a) { + case"M": + case"MM": + null != b && (e[jb] = s(b) - 1); + break; + case"MMM": + case"MMMM": + d = C(c._l).monthsParse(b), null != d ? e[jb] = d : c._pf.invalidMonth = b; + break; + case"D": + case"DD": + null != b && (e[kb] = s(b)); + break; + case"DDD": + case"DDDD": + null != b && (c._dayOfYear = s(b)); + break; + case"YY": + e[ib] = s(b) + (s(b) > 68 ? 1900 : 2e3); + break; + case"YYYY": + case"YYYYY": + case"YYYYYY": + e[ib] = s(b); + break; + case"a": + case"A": + c._isPm = C(c._l).isPM(b); + break; + case"H": + case"HH": + case"h": + case"hh": + e[lb] = s(b); + break; + case"m": + case"mm": + e[mb] = s(b); + break; + case"s": + case"ss": + e[nb] = s(b); + break; + case"S": + case"SS": + case"SSS": + case"SSSS": + e[ob] = s(1e3 * ("0." + b)); + break; + case"X": + c._d = new Date(1e3 * parseFloat(b)); + break; + case"Z": + case"ZZ": + c._useUTC = !0, c._tzm = I(b); + break; + case"w": + case"ww": + case"W": + case"WW": + case"d": + case"dd": + case"ddd": + case"dddd": + case"e": + case"E": + a = a.substr(0, 1); + case"gg": + case"gggg": + case"GG": + case"GGGG": + case"GGGGG": + a = a.substr(0, 2), b && (c._w = c._w || {}, c._w[a] = b) + } + } + + function K(a) { + var b, c, d, e, f, g, h, i, j, k, l = []; + if (!a._d) { + for (d = M(a), a._w && null == a._a[kb] && null == a._a[jb] && (f = function (b) { + var c = parseInt(b, 10); + return b ? b.length < 3 ? c > 68 ? 1900 + c : 2e3 + c : c : null == a._a[ib] ? db().weekYear() : a._a[ib] + }, g = a._w, null != g.GG || null != g.W || null != g.E ? h = Z(f(g.GG), g.W || 1, g.E, 4, 1) : (i = C(a._l), j = null != g.d ? V(g.d, i) : null != g.e ? parseInt(g.e, 10) + i._week.dow : 0, k = parseInt(g.w, 10) || 1, null != g.d && j < i._week.dow && k++, h = Z(f(g.gg), k, j, i._week.doy, i._week.dow)), a._a[ib] = h.year, a._dayOfYear = h.dayOfYear), a._dayOfYear && (e = null == a._a[ib] ? d[ib] : a._a[ib], a._dayOfYear > u(e) && (a._pf._overflowDayOfYear = !0), c = U(e, 0, a._dayOfYear), a._a[jb] = c.getUTCMonth(), a._a[kb] = c.getUTCDate()), b = 0; 3 > b && null == a._a[b]; ++b) a._a[b] = l[b] = d[b]; + for (; 7 > b; b++) a._a[b] = l[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b]; + l[lb] += s((a._tzm || 0) / 60), l[mb] += s((a._tzm || 0) % 60), a._d = (a._useUTC ? U : T).apply(null, l) + } + } + + function L(a) { + var b; + a._d || (b = q(a._i), a._a = [b.year, b.month, b.day, b.hour, b.minute, b.second, b.millisecond], K(a)) + } + + function M(a) { + var b = new Date; + return a._useUTC ? [b.getUTCFullYear(), b.getUTCMonth(), b.getUTCDate()] : [b.getFullYear(), b.getMonth(), b.getDate()] + } + + function N(a) { + a._a = [], a._pf.empty = !0; + var b, c, d, e, f, g = C(a._l), h = "" + a._i, i = h.length, j = 0; + for (d = G(a._f, g).match(vb) || [], b = 0; b < d.length; b++) e = d[b], c = (h.match(H(e, a)) || [])[0], c && (f = h.substr(0, h.indexOf(c)), f.length > 0 && a._pf.unusedInput.push(f), h = h.slice(h.indexOf(c) + c.length), j += c.length), Yb[e] ? (c ? a._pf.empty = !1 : a._pf.unusedTokens.push(e), J(e, c, a)) : a._strict && !c && a._pf.unusedTokens.push(e); + a._pf.charsLeftOver = i - j, h.length > 0 && a._pf.unusedInput.push(h), a._isPm && a._a[lb] < 12 && (a._a[lb] += 12), a._isPm === !1 && 12 === a._a[lb] && (a._a[lb] = 0), K(a), w(a) + } + + function O(a) { + return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (a, b, c, d, e) { + return b || c || d || e + }) + } + + function P(a) { + return a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") + } + + function Q(a) { + var c, d, e, f, g; + if (0 === a._f.length) return a._pf.invalidFormat = !0, a._d = new Date(0 / 0), void 0; + for (f = 0; f < a._f.length; f++) g = 0, c = h({}, a), c._pf = b(), c._f = a._f[f], N(c), x(c) && (g += c._pf.charsLeftOver, g += 10 * c._pf.unusedTokens.length, c._pf.score = g, (null == e || e > g) && (e = g, d = c)); + h(a, d || c) + } + + function R(a) { + var b, c, d = a._i, e = Mb.exec(d); + if (e) { + for (a._pf.iso = !0, b = 0, c = Ob.length; c > b; b++) if (Ob[b][1].exec(d)) { + a._f = Ob[b][0] + (e[6] || " "); + break + } + for (b = 0, c = Pb.length; c > b; b++) if (Pb[b][1].exec(d)) { + a._f += Pb[b][0]; + break + } + d.match(Db) && (a._f += "Z"), N(a) + } else a._d = new Date(d) + } + + function S(b) { + var c = b._i, d = sb.exec(c); + c === a ? b._d = new Date : d ? b._d = new Date(+d[1]) : "string" == typeof c ? R(b) : m(c) ? (b._a = c.slice(0), K(b)) : n(c) ? b._d = new Date(+c) : "object" == typeof c ? L(b) : b._d = new Date(c) + } + + function T(a, b, c, d, e, f, g) { + var h = new Date(a, b, c, d, e, f, g); + return 1970 > a && h.setFullYear(a), h + } + + function U(a) { + var b = new Date(Date.UTC.apply(null, arguments)); + return 1970 > a && b.setUTCFullYear(a), b + } + + function V(a, b) { + if ("string" == typeof a) if (isNaN(a)) { + if (a = b.weekdaysParse(a), "number" != typeof a) return null + } else a = parseInt(a, 10); + return a + } + + function W(a, b, c, d, e) { + return e.relativeTime(b || 1, !!c, a, d) + } + + function X(a, b, c) { + var d = hb(Math.abs(a) / 1e3), e = hb(d / 60), f = hb(e / 60), g = hb(f / 24), h = hb(g / 365), + i = 45 > d && ["s", d] || 1 === e && ["m"] || 45 > e && ["mm", e] || 1 === f && ["h"] || 22 > f && ["hh", f] || 1 === g && ["d"] || 25 >= g && ["dd", g] || 45 >= g && ["M"] || 345 > g && ["MM", hb(g / 30)] || 1 === h && ["y"] || ["yy", h]; + return i[2] = b, i[3] = a > 0, i[4] = c, W.apply({}, i) + } + + function Y(a, b, c) { + var d, e = c - b, f = c - a.day(); + return f > e && (f -= 7), e - 7 > f && (f += 7), d = db(a).add("d", f), { + week: Math.ceil(d.dayOfYear() / 7), + year: d.year() + } + } + + function Z(a, b, c, d, e) { + var f, g, h = U(a, 0, 1).getUTCDay(); + return c = null != c ? c : e, f = e - h + (h > d ? 7 : 0) - (e > h ? 7 : 0), g = 7 * (b - 1) + (c - e) + f + 1, { + year: g > 0 ? a : a - 1, + dayOfYear: g > 0 ? g : u(a - 1) + g + } + } + + function $(a) { + var b = a._i, c = a._f; + return null === b ? db.invalid({nullInput: !0}) : ("string" == typeof b && (a._i = b = C().preparse(b)), db.isMoment(b) ? (a = i(b), a._d = new Date(+b._d)) : c ? m(c) ? Q(a) : N(a) : S(a), new f(a)) + } + + function _(a, b) { + db.fn[a] = db.fn[a + "s"] = function (a) { + var c = this._isUTC ? "UTC" : ""; + return null != a ? (this._d["set" + c + b](a), db.updateOffset(this), this) : this._d["get" + c + b]() + } + } + + function ab(a) { + db.duration.fn[a] = function () { + return this._data[a] + } + } + + function bb(a, b) { + db.duration.fn["as" + a] = function () { + return +this / b + } + } + + function cb(a) { + var b = !1, c = db; + "undefined" == typeof ender && (a ? (gb.moment = function () { + return !b && console && console.warn && (b = !0, console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")), c.apply(null, arguments) + }, h(gb.moment, c)) : gb.moment = db) + } + + for (var db, eb, fb = "2.5.1", gb = this, hb = Math.round, ib = 0, jb = 1, kb = 2, lb = 3, mb = 4, nb = 5, ob = 6, pb = {}, qb = { + _isAMomentObject: null, + _i: null, + _f: null, + _l: null, + _strict: null, + _isUTC: null, + _offset: null, + _pf: null, + _lang: null + }, rb = "undefined" != typeof module && module.exports && "undefined" != typeof require, sb = /^\/?Date\((\-?\d+)/i, tb = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/, ub = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/, vb = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g, wb = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, xb = /\d\d?/, yb = /\d{1,3}/, zb = /\d{1,4}/, Ab = /[+\-]?\d{1,6}/, Bb = /\d+/, Cb = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, Db = /Z|[\+\-]\d\d:?\d\d/gi, Eb = /T/i, Fb = /[\+\-]?\d+(\.\d{1,3})?/, Gb = /\d/, Hb = /\d\d/, Ib = /\d{3}/, Jb = /\d{4}/, Kb = /[+-]?\d{6}/, Lb = /[+-]?\d+/, Mb = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Nb = "YYYY-MM-DDTHH:mm:ssZ", Ob = [["YYYYYY-MM-DD", /[+-]\d{6}-\d{2}-\d{2}/], ["YYYY-MM-DD", /\d{4}-\d{2}-\d{2}/], ["GGGG-[W]WW-E", /\d{4}-W\d{2}-\d/], ["GGGG-[W]WW", /\d{4}-W\d{2}/], ["YYYY-DDD", /\d{4}-\d{3}/]], Pb = [["HH:mm:ss.SSSS", /(T| )\d\d:\d\d:\d\d\.\d{1,3}/], ["HH:mm:ss", /(T| )\d\d:\d\d:\d\d/], ["HH:mm", /(T| )\d\d:\d\d/], ["HH", /(T| )\d\d/]], Qb = /([\+\-]|\d\d)/gi, Rb = "Date|Hours|Minutes|Seconds|Milliseconds".split("|"), Sb = { + Milliseconds: 1, + Seconds: 1e3, + Minutes: 6e4, + Hours: 36e5, + Days: 864e5, + Months: 2592e6, + Years: 31536e6 + }, Tb = { + ms: "millisecond", + s: "second", + m: "minute", + h: "hour", + d: "day", + D: "date", + w: "week", + W: "isoWeek", + M: "month", + y: "year", + DDD: "dayOfYear", + e: "weekday", + E: "isoWeekday", + gg: "weekYear", + GG: "isoWeekYear" + }, Ub = { + dayofyear: "dayOfYear", + isoweekday: "isoWeekday", + isoweek: "isoWeek", + weekyear: "weekYear", + isoweekyear: "isoWeekYear" + }, Vb = {}, Wb = "DDD w W M D d".split(" "), Xb = "M D H h m s w W".split(" "), Yb = { + M: function () { + return this.month() + 1 + }, MMM: function (a) { + return this.lang().monthsShort(this, a) + }, MMMM: function (a) { + return this.lang().months(this, a) + }, D: function () { + return this.date() + }, DDD: function () { + return this.dayOfYear() + }, d: function () { + return this.day() + }, dd: function (a) { + return this.lang().weekdaysMin(this, a) + }, ddd: function (a) { + return this.lang().weekdaysShort(this, a) + }, dddd: function (a) { + return this.lang().weekdays(this, a) + }, w: function () { + return this.week() + }, W: function () { + return this.isoWeek() + }, YY: function () { + return k(this.year() % 100, 2) + }, YYYY: function () { + return k(this.year(), 4) + }, YYYYY: function () { + return k(this.year(), 5) + }, YYYYYY: function () { + var a = this.year(), b = a >= 0 ? "+" : "-"; + return b + k(Math.abs(a), 6) + }, gg: function () { + return k(this.weekYear() % 100, 2) + }, gggg: function () { + return k(this.weekYear(), 4) + }, ggggg: function () { + return k(this.weekYear(), 5) + }, GG: function () { + return k(this.isoWeekYear() % 100, 2) + }, GGGG: function () { + return k(this.isoWeekYear(), 4) + }, GGGGG: function () { + return k(this.isoWeekYear(), 5) + }, e: function () { + return this.weekday() + }, E: function () { + return this.isoWeekday() + }, a: function () { + return this.lang().meridiem(this.hours(), this.minutes(), !0) + }, A: function () { + return this.lang().meridiem(this.hours(), this.minutes(), !1) + }, H: function () { + return this.hours() + }, h: function () { + return this.hours() % 12 || 12 + }, m: function () { + return this.minutes() + }, s: function () { + return this.seconds() + }, S: function () { + return s(this.milliseconds() / 100) + }, SS: function () { + return k(s(this.milliseconds() / 10), 2) + }, SSS: function () { + return k(this.milliseconds(), 3) + }, SSSS: function () { + return k(this.milliseconds(), 3) + }, Z: function () { + var a = -this.zone(), b = "+"; + return 0 > a && (a = -a, b = "-"), b + k(s(a / 60), 2) + ":" + k(s(a) % 60, 2) + }, ZZ: function () { + var a = -this.zone(), b = "+"; + return 0 > a && (a = -a, b = "-"), b + k(s(a / 60), 2) + k(s(a) % 60, 2) + }, z: function () { + return this.zoneAbbr() + }, zz: function () { + return this.zoneName() + }, X: function () { + return this.unix() + }, Q: function () { + return this.quarter() + } + }, Zb = ["months", "monthsShort", "weekdays", "weekdaysShort", "weekdaysMin"]; Wb.length;) eb = Wb.pop(), Yb[eb + "o"] = d(Yb[eb], eb); + for (; Xb.length;) eb = Xb.pop(), Yb[eb + eb] = c(Yb[eb], 2); + for (Yb.DDDD = c(Yb.DDD, 3), h(e.prototype, { + set: function (a) { + var b, c; + for (c in a) b = a[c], "function" == typeof b ? this[c] = b : this["_" + c] = b + }, + _months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), + months: function (a) { + return this._months[a.month()] + }, + _monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), + monthsShort: function (a) { + return this._monthsShort[a.month()] + }, + monthsParse: function (a) { + var b, c, d; + for (this._monthsParse || (this._monthsParse = []), b = 0; 12 > b; b++) if (this._monthsParse[b] || (c = db.utc([2e3, b]), d = "^" + this.months(c, "") + "|^" + this.monthsShort(c, ""), this._monthsParse[b] = new RegExp(d.replace(".", ""), "i")), this._monthsParse[b].test(a)) return b + }, + _weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), + weekdays: function (a) { + return this._weekdays[a.day()] + }, + _weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), + weekdaysShort: function (a) { + return this._weekdaysShort[a.day()] + }, + _weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + weekdaysMin: function (a) { + return this._weekdaysMin[a.day()] + }, + weekdaysParse: function (a) { + var b, c, d; + for (this._weekdaysParse || (this._weekdaysParse = []), b = 0; 7 > b; b++) if (this._weekdaysParse[b] || (c = db([2e3, 1]).day(b), d = "^" + this.weekdays(c, "") + "|^" + this.weekdaysShort(c, "") + "|^" + this.weekdaysMin(c, ""), this._weekdaysParse[b] = new RegExp(d.replace(".", ""), "i")), this._weekdaysParse[b].test(a)) return b + }, + _longDateFormat: { + LT: "h:mm A", + L: "MM/DD/YYYY", + LL: "MMMM D YYYY", + LLL: "MMMM D YYYY LT", + LLLL: "dddd, MMMM D YYYY LT" + }, + longDateFormat: function (a) { + var b = this._longDateFormat[a]; + return !b && this._longDateFormat[a.toUpperCase()] && (b = this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (a) { + return a.slice(1) + }), this._longDateFormat[a] = b), b + }, + isPM: function (a) { + return "p" === (a + "").toLowerCase().charAt(0) + }, + _meridiemParse: /[ap]\.?m?\.?/i, + meridiem: function (a, b, c) { + return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM" + }, + _calendar: { + sameDay: "[Today at] LT", + nextDay: "[Tomorrow at] LT", + nextWeek: "dddd [at] LT", + lastDay: "[Yesterday at] LT", + lastWeek: "[Last] dddd [at] LT", + sameElse: "L" + }, + calendar: function (a, b) { + var c = this._calendar[a]; + return "function" == typeof c ? c.apply(b) : c + }, + _relativeTime: { + future: "in %s", + past: "%s ago", + s: "a few seconds", + m: "a minute", + mm: "%d minutes", + h: "an hour", + hh: "%d hours", + d: "a day", + dd: "%d days", + M: "a month", + MM: "%d months", + y: "a year", + yy: "%d years" + }, + relativeTime: function (a, b, c, d) { + var e = this._relativeTime[c]; + return "function" == typeof e ? e(a, b, c, d) : e.replace(/%d/i, a) + }, + pastFuture: function (a, b) { + var c = this._relativeTime[a > 0 ? "future" : "past"]; + return "function" == typeof c ? c(b) : c.replace(/%s/i, b) + }, + ordinal: function (a) { + return this._ordinal.replace("%d", a) + }, + _ordinal: "%d", + preparse: function (a) { + return a + }, + postformat: function (a) { + return a + }, + week: function (a) { + return Y(a, this._week.dow, this._week.doy).week + }, + _week: {dow: 0, doy: 6}, + _invalidDate: "Invalid date", + invalidDate: function () { + return this._invalidDate + } + }), db = function (c, d, e, f) { + var g; + return "boolean" == typeof e && (f = e, e = a), g = {}, g._isAMomentObject = !0, g._i = c, g._f = d, g._l = e, g._strict = f, g._isUTC = !1, g._pf = b(), $(g) + }, db.utc = function (c, d, e, f) { + var g; + return "boolean" == typeof e && (f = e, e = a), g = {}, g._isAMomentObject = !0, g._useUTC = !0, g._isUTC = !0, g._l = e, g._i = c, g._f = d, g._strict = f, g._pf = b(), $(g).utc() + }, db.unix = function (a) { + return db(1e3 * a) + }, db.duration = function (a, b) { + var c, d, e, f = a, h = null; + return db.isDuration(a) ? f = { + ms: a._milliseconds, + d: a._days, + M: a._months + } : "number" == typeof a ? (f = {}, b ? f[b] = a : f.milliseconds = a) : (h = tb.exec(a)) ? (c = "-" === h[1] ? -1 : 1, f = { + y: 0, + d: s(h[kb]) * c, + h: s(h[lb]) * c, + m: s(h[mb]) * c, + s: s(h[nb]) * c, + ms: s(h[ob]) * c + }) : (h = ub.exec(a)) && (c = "-" === h[1] ? -1 : 1, e = function (a) { + var b = a && parseFloat(a.replace(",", ".")); + return (isNaN(b) ? 0 : b) * c + }, f = { + y: e(h[2]), + M: e(h[3]), + d: e(h[4]), + h: e(h[5]), + m: e(h[6]), + s: e(h[7]), + w: e(h[8]) + }), d = new g(f), db.isDuration(a) && a.hasOwnProperty("_lang") && (d._lang = a._lang), d + }, db.version = fb, db.defaultFormat = Nb, db.updateOffset = function () { + }, db.lang = function (a, b) { + var c; + return a ? (b ? A(y(a), b) : null === b ? (B(a), a = "en") : pb[a] || C(a), c = db.duration.fn._lang = db.fn._lang = C(a), c._abbr) : db.fn._lang._abbr + }, db.langData = function (a) { + return a && a._lang && a._lang._abbr && (a = a._lang._abbr), C(a) + }, db.isMoment = function (a) { + return a instanceof f || null != a && a.hasOwnProperty("_isAMomentObject") + }, db.isDuration = function (a) { + return a instanceof g + }, eb = Zb.length - 1; eb >= 0; --eb) r(Zb[eb]); + for (db.normalizeUnits = function (a) { + return p(a) + }, db.invalid = function (a) { + var b = db.utc(0 / 0); + return null != a ? h(b._pf, a) : b._pf.userInvalidated = !0, b + }, db.parseZone = function (a) { + return db(a).parseZone() + }, h(db.fn = f.prototype, { + clone: function () { + return db(this) + }, valueOf: function () { + return +this._d + 6e4 * (this._offset || 0) + }, unix: function () { + return Math.floor(+this / 1e3) + }, toString: function () { + return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ") + }, toDate: function () { + return this._offset ? new Date(+this) : this._d + }, toISOString: function () { + var a = db(this).utc(); + return 0 < a.year() && a.year() <= 9999 ? F(a, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : F(a, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]") + }, toArray: function () { + var a = this; + return [a.year(), a.month(), a.date(), a.hours(), a.minutes(), a.seconds(), a.milliseconds()] + }, isValid: function () { + return x(this) + }, isDSTShifted: function () { + return this._a ? this.isValid() && o(this._a, (this._isUTC ? db.utc(this._a) : db(this._a)).toArray()) > 0 : !1 + }, parsingFlags: function () { + return h({}, this._pf) + }, invalidAt: function () { + return this._pf.overflow + }, utc: function () { + return this.zone(0) + }, local: function () { + return this.zone(0), this._isUTC = !1, this + }, format: function (a) { + var b = F(this, a || db.defaultFormat); + return this.lang().postformat(b) + }, add: function (a, b) { + var c; + return c = "string" == typeof a ? db.duration(+b, a) : db.duration(a, b), l(this, c, 1), this + }, subtract: function (a, b) { + var c; + return c = "string" == typeof a ? db.duration(+b, a) : db.duration(a, b), l(this, c, -1), this + }, diff: function (a, b, c) { + var d, e, f = z(a, this), g = 6e4 * (this.zone() - f.zone()); + return b = p(b), "year" === b || "month" === b ? (d = 432e5 * (this.daysInMonth() + f.daysInMonth()), e = 12 * (this.year() - f.year()) + (this.month() - f.month()), e += (this - db(this).startOf("month") - (f - db(f).startOf("month"))) / d, e -= 6e4 * (this.zone() - db(this).startOf("month").zone() - (f.zone() - db(f).startOf("month").zone())) / d, "year" === b && (e /= 12)) : (d = this - f, e = "second" === b ? d / 1e3 : "minute" === b ? d / 6e4 : "hour" === b ? d / 36e5 : "day" === b ? (d - g) / 864e5 : "week" === b ? (d - g) / 6048e5 : d), c ? e : j(e) + }, from: function (a, b) { + return db.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b) + }, fromNow: function (a) { + return this.from(db(), a) + }, calendar: function () { + var a = z(db(), this).startOf("day"), b = this.diff(a, "days", !0), + c = -6 > b ? "sameElse" : -1 > b ? "lastWeek" : 0 > b ? "lastDay" : 1 > b ? "sameDay" : 2 > b ? "nextDay" : 7 > b ? "nextWeek" : "sameElse"; + return this.format(this.lang().calendar(c, this)) + }, isLeapYear: function () { + return v(this.year()) + }, isDST: function () { + return this.zone() < this.clone().month(0).zone() || this.zone() < this.clone().month(5).zone() + }, day: function (a) { + var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return null != a ? (a = V(a, this.lang()), this.add({d: a - b})) : b + }, month: function (a) { + var b, c = this._isUTC ? "UTC" : ""; + return null != a ? "string" == typeof a && (a = this.lang().monthsParse(a), "number" != typeof a) ? this : (b = this.date(), this.date(1), this._d["set" + c + "Month"](a), this.date(Math.min(b, this.daysInMonth())), db.updateOffset(this), this) : this._d["get" + c + "Month"]() + }, startOf: function (a) { + switch (a = p(a)) { + case"year": + this.month(0); + case"month": + this.date(1); + case"week": + case"isoWeek": + case"day": + this.hours(0); + case"hour": + this.minutes(0); + case"minute": + this.seconds(0); + case"second": + this.milliseconds(0) + } + return "week" === a ? this.weekday(0) : "isoWeek" === a && this.isoWeekday(1), this + }, endOf: function (a) { + return a = p(a), this.startOf(a).add("isoWeek" === a ? "week" : a, 1).subtract("ms", 1) + }, isAfter: function (a, b) { + return b = "undefined" != typeof b ? b : "millisecond", +this.clone().startOf(b) > +db(a).startOf(b) + }, isBefore: function (a, b) { + return b = "undefined" != typeof b ? b : "millisecond", +this.clone().startOf(b) < +db(a).startOf(b) + }, isSame: function (a, b) { + return b = b || "ms", +this.clone().startOf(b) === +z(a, this).startOf(b) + }, min: function (a) { + return a = db.apply(null, arguments), this > a ? this : a + }, max: function (a) { + return a = db.apply(null, arguments), a > this ? this : a + }, zone: function (a) { + var b = this._offset || 0; + return null == a ? this._isUTC ? b : this._d.getTimezoneOffset() : ("string" == typeof a && (a = I(a)), Math.abs(a) < 16 && (a = 60 * a), this._offset = a, this._isUTC = !0, b !== a && l(this, db.duration(b - a, "m"), 1, !0), this) + }, zoneAbbr: function () { + return this._isUTC ? "UTC" : "" + }, zoneName: function () { + return this._isUTC ? "Coordinated Universal Time" : "" + }, parseZone: function () { + return this._tzm ? this.zone(this._tzm) : "string" == typeof this._i && this.zone(this._i), this + }, hasAlignedHourOffset: function (a) { + return a = a ? db(a).zone() : 0, (this.zone() - a) % 60 === 0 + }, daysInMonth: function () { + return t(this.year(), this.month()) + }, dayOfYear: function (a) { + var b = hb((db(this).startOf("day") - db(this).startOf("year")) / 864e5) + 1; + return null == a ? b : this.add("d", a - b) + }, quarter: function () { + return Math.ceil((this.month() + 1) / 3) + }, weekYear: function (a) { + var b = Y(this, this.lang()._week.dow, this.lang()._week.doy).year; + return null == a ? b : this.add("y", a - b) + }, isoWeekYear: function (a) { + var b = Y(this, 1, 4).year; + return null == a ? b : this.add("y", a - b) + }, week: function (a) { + var b = this.lang().week(this); + return null == a ? b : this.add("d", 7 * (a - b)) + }, isoWeek: function (a) { + var b = Y(this, 1, 4).week; + return null == a ? b : this.add("d", 7 * (a - b)) + }, weekday: function (a) { + var b = (this.day() + 7 - this.lang()._week.dow) % 7; + return null == a ? b : this.add("d", a - b) + }, isoWeekday: function (a) { + return null == a ? this.day() || 7 : this.day(this.day() % 7 ? a : a - 7) + }, get: function (a) { + return a = p(a), this[a]() + }, set: function (a, b) { + return a = p(a), "function" == typeof this[a] && this[a](b), this + }, lang: function (b) { + return b === a ? this._lang : (this._lang = C(b), this) + } + }), eb = 0; eb < Rb.length; eb++) _(Rb[eb].toLowerCase().replace(/s$/, ""), Rb[eb]); + _("year", "FullYear"), db.fn.days = db.fn.day, db.fn.months = db.fn.month, db.fn.weeks = db.fn.week, db.fn.isoWeeks = db.fn.isoWeek, db.fn.toJSON = db.fn.toISOString, h(db.duration.fn = g.prototype, { + _bubble: function () { + var a, b, c, d, e = this._milliseconds, f = this._days, g = this._months, h = this._data; + h.milliseconds = e % 1e3, a = j(e / 1e3), h.seconds = a % 60, b = j(a / 60), h.minutes = b % 60, c = j(b / 60), h.hours = c % 24, f += j(c / 24), h.days = f % 30, g += j(f / 30), h.months = g % 12, d = j(g / 12), h.years = d + }, weeks: function () { + return j(this.days() / 7) + }, valueOf: function () { + return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * s(this._months / 12) + }, humanize: function (a) { + var b = +this, c = X(b, !a, this.lang()); + return a && (c = this.lang().pastFuture(b, c)), this.lang().postformat(c) + }, add: function (a, b) { + var c = db.duration(a, b); + return this._milliseconds += c._milliseconds, this._days += c._days, this._months += c._months, this._bubble(), this + }, subtract: function (a, b) { + var c = db.duration(a, b); + return this._milliseconds -= c._milliseconds, this._days -= c._days, this._months -= c._months, this._bubble(), this + }, get: function (a) { + return a = p(a), this[a.toLowerCase() + "s"]() + }, as: function (a) { + return a = p(a), this["as" + a.charAt(0).toUpperCase() + a.slice(1) + "s"]() + }, lang: db.fn.lang, toIsoString: function () { + var a = Math.abs(this.years()), b = Math.abs(this.months()), c = Math.abs(this.days()), + d = Math.abs(this.hours()), e = Math.abs(this.minutes()), + f = Math.abs(this.seconds() + this.milliseconds() / 1e3); + return this.asSeconds() ? (this.asSeconds() < 0 ? "-" : "") + "P" + (a ? a + "Y" : "") + (b ? b + "M" : "") + (c ? c + "D" : "") + (d || e || f ? "T" : "") + (d ? d + "H" : "") + (e ? e + "M" : "") + (f ? f + "S" : "") : "P0D" + } + }); + for (eb in Sb) Sb.hasOwnProperty(eb) && (bb(eb, Sb[eb]), ab(eb.toLowerCase())); + bb("Weeks", 6048e5), db.duration.fn.asMonths = function () { + return (+this - 31536e6 * this.years()) / 2592e6 + 12 * this.years() + }, db.lang("en", { + ordinal: function (a) { + var b = a % 10, c = 1 === s(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th"; + return a + c + } + }), rb ? (module.exports = db, cb(!0)) : "function" == typeof define && define.amd ? define("moment", function (b, c, d) { + return d.config && d.config() && d.config().noGlobal !== !0 && cb(d.config().noGlobal === a), db + }) : cb() +}).call(this); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/mousetrap-1.4.5.min.js b/src/main/resources/static/activiti-editor/editor-app/libs/mousetrap-1.4.5.min.js new file mode 100644 index 0000000..b3262b7 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/mousetrap-1.4.5.min.js @@ -0,0 +1,9 @@ +/* mousetrap v1.4.5 craig.is/killing/mice */ +(function(J,r,f){function s(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return h[a.which]?h[a.which]:B[a.which]?B[a.which]:String.fromCharCode(a.which).toLowerCase()}function t(a){a=a||{};var b=!1,c;for(c in n)a[c]?b=!0:n[c]=0;b||(u=!1)}function C(a,b,c,d,e,v){var g,k,f=[],h=c.type;if(!l[a])return[];"keyup"==h&&w(a)&&(b=[a]);for(g=0;g<l[a].length;++g)if(k= +l[a][g],!(!d&&k.seq&&n[k.seq]!=k.level||h!=k.action||("keypress"!=h||c.metaKey||c.ctrlKey)&&b.sort().join(",")!==k.modifiers.sort().join(","))){var m=d&&k.seq==d&&k.level==v;(!d&&k.combo==e||m)&&l[a].splice(g,1);f.push(k)}return f}function K(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a,b,c){m.stopCallback(b,b.target||b.srcElement,c)||!1!==a(b,c)||(b.preventDefault&&b.preventDefault(),b.stopPropagation&&b.stopPropagation(), +b.returnValue=!1,b.cancelBubble=!0)}function y(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=A(a);b&&("keyup"==a.type&&z===b?z=!1:m.handleKey(b,K(a),a))}function w(a){return"shift"==a||"ctrl"==a||"alt"==a||"meta"==a}function L(a,b,c,d){function e(b){return function(){u=b;++n[a];clearTimeout(D);D=setTimeout(t,1E3)}}function v(b){x(c,b,a);"keyup"!==d&&(z=A(b));setTimeout(t,10)}for(var g=n[a]=0;g<b.length;++g){var f=g+1===b.length?v:e(d||E(b[g+1]).action);F(b[g],f,d,a,g)}}function E(a,b){var c, +d,e,f=[];c="+"===a?["+"]:a.split("+");for(e=0;e<c.length;++e)d=c[e],G[d]&&(d=G[d]),b&&"keypress"!=b&&H[d]&&(d=H[d],f.push("shift")),w(d)&&f.push(d);c=d;e=b;if(!e){if(!p){p={};for(var g in h)95<g&&112>g||h.hasOwnProperty(g)&&(p[h[g]]=g)}e=p[c]?"keydown":"keypress"}"keypress"==e&&f.length&&(e="keydown");return{key:d,modifiers:f,action:e}}function F(a,b,c,d,e){q[a+":"+c]=b;a=a.replace(/\s+/g," ");var f=a.split(" ");1<f.length?L(a,f,b,c):(c=E(a,c),l[c.key]=l[c.key]||[],C(c.key,c.modifiers,{type:c.action}, +d,a,e),l[c.key][d?"unshift":"push"]({callback:b,modifiers:c.modifiers,action:c.action,seq:d,level:e,combo:a}))}var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},B={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},H={"~":"`","!":"1", +"@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},G={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p,l={},q={},n={},D,z=!1,I=!1,u=!1;for(f=1;20>f;++f)h[111+f]="f"+f;for(f=0;9>=f;++f)h[f+96]=f;s(r,"keypress",y);s(r,"keydown",y);s(r,"keyup",y);var m={bind:function(a,b,c){a=a instanceof Array?a:[a];for(var d=0;d<a.length;++d)F(a[d],b,c);return this}, +unbind:function(a,b){return m.bind(a,function(){},b)},trigger:function(a,b){if(q[a+":"+b])q[a+":"+b]({},a);return this},reset:function(){l={};q={};return this},stopCallback:function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable},handleKey:function(a,b,c){var d=C(a,b,c),e;b={};var f=0,g=!1;for(e=0;e<d.length;++e)d[e].seq&&(f=Math.max(f,d[e].level));for(e=0;e<d.length;++e)d[e].seq?d[e].level==f&&(g=!0, +b[d[e].seq]=1,x(d[e].callback,c,d[e].combo)):g||x(d[e].callback,c,d[e].combo);d="keypress"==c.type&&I;c.type!=u||w(a)||d||t(b);I=g&&"keydown"==c.type}};J.Mousetrap=m;"function"===typeof define&&define.amd&&define(m)})(window,document); diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7-min.js b/src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7-min.js new file mode 100644 index 0000000..7a90c68 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7-min.js @@ -0,0 +1,2 @@ +(function(e,t){"use strict";var n=6,o=4,i="asc",r="desc",l="_ng_field_",a="_ng_depth_",s="_ng_hidden_",c="_ng_column_",g=/CUSTOM_FILTERS/g,d=/COL_FIELD/g,u=/DISPLAY_CELL_TEMPLATE/g,f=/EDITABLE_CELL_TEMPLATE/g,h=/<.+>/;e.ngGrid={},e.ngGrid.i18n={},angular.module("ngGrid.services",[]);var p=angular.module("ngGrid.directives",[]),m=angular.module("ngGrid.filters",[]);angular.module("ngGrid",["ngGrid.services","ngGrid.directives","ngGrid.filters"]);var v=function(e,t,o,i){if(void 0===e.selectionProvider.selectedItems)return!0;var r,l=o.which||o.keyCode,a=!1,s=!1,c=void 0===e.selectionProvider.lastClickedRow?1:e.selectionProvider.lastClickedRow.rowIndex,g=e.columns.filter(function(e){return e.visible}),d=e.columns.filter(function(e){return e.pinned});if(e.col&&(r=g.indexOf(e.col)),37!==l&&38!==l&&39!==l&&40!==l&&9!==l&&13!==l)return!0;if(e.enableCellSelection){9===l&&o.preventDefault();var u=e.showSelectionCheckbox?1===e.col.index:0===e.col.index,f=1===e.$index||0===e.$index,h=e.$index===e.renderedColumns.length-1||e.$index===e.renderedColumns.length-2,p=g.indexOf(e.col)===g.length-1,m=d.indexOf(e.col)===d.length-1;if(37===l||9===l&&o.shiftKey){var v=0;u||(r-=1),f?u&&9===l&&o.shiftKey?(v=i.$canvas.width(),r=g.length-1,s=!0):v=i.$viewport.scrollLeft()-e.col.width:d.length>0&&(v=i.$viewport.scrollLeft()-g[r].width),i.$viewport.scrollLeft(v)}else(39===l||9===l&&!o.shiftKey)&&(h?p&&9===l&&!o.shiftKey?(i.$viewport.scrollLeft(0),r=e.showSelectionCheckbox?1:0,a=!0):i.$viewport.scrollLeft(i.$viewport.scrollLeft()+e.col.width):m&&i.$viewport.scrollLeft(0),p||(r+=1))}var w;w=e.configGroups.length>0?i.rowFactory.parsedData.filter(function(e){return!e.isAggRow}):i.filteredRows;var C=0;if(0!==c&&(38===l||13===l&&o.shiftKey||9===l&&o.shiftKey&&s)?C=-1:c!==w.length-1&&(40===l||13===l&&!o.shiftKey||9===l&&a)&&(C=1),C){var b=w[c+C];b.beforeSelectionChange(b,o)&&(b.continueSelection(o),e.$emit("ngGridEventDigestGridParent"),e.selectionProvider.lastClickedRow.renderedRowIndex>=e.renderedRows.length-n-2?i.$viewport.scrollTop(i.$viewport.scrollTop()+e.rowHeight):n+2>=e.selectionProvider.lastClickedRow.renderedRowIndex&&i.$viewport.scrollTop(i.$viewport.scrollTop()-e.rowHeight))}return e.enableCellSelection&&setTimeout(function(){e.domAccessProvider.focusCellElement(e,e.renderedColumns.indexOf(g[r]))},3),!1};String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length>>>0,n=Number(arguments[1])||0;for(n=0>n?Math.ceil(n):Math.floor(n),0>n&&(n+=t);t>n;n++)if(n in this&&this[n]===e)return n;return-1}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var o=[],i=arguments[1],r=0;n>r;r++)if(r in t){var l=t[r];e.call(i,l,r,t)&&o.push(l)}return o}),m.filter("checkmark",function(){return function(e){return e?"✔":"✘"}}),m.filter("ngColumns",function(){return function(e){return e.filter(function(e){return!e.isAggCol})}}),angular.module("ngGrid.services").factory("$domUtilityService",["$utilityService",function(e){var n={},o={},i=function(){var e=t("<div></div>");e.appendTo("body"),e.height(100).width(100).css("position","absolute").css("overflow","scroll"),e.append('<div style="height: 400px; width: 400px;"></div>'),n.ScrollH=e.height()-e[0].clientHeight,n.ScrollW=e.width()-e[0].clientWidth,e.empty(),e.attr("style",""),e.append('<span style="font-family: Verdana, Helvetica, Sans-Serif; font-size: 14px;"><strong>M</strong></span>'),n.LetterW=e.children().first().width(),e.remove()};return n.eventStorage={},n.AssignGridContainers=function(e,o,i){i.$root=t(o),i.$topPanel=i.$root.find(".ngTopPanel"),i.$groupPanel=i.$root.find(".ngGroupPanel"),i.$headerContainer=i.$topPanel.find(".ngHeaderContainer"),e.$headerContainer=i.$headerContainer,i.$headerScroller=i.$topPanel.find(".ngHeaderScroller"),i.$headers=i.$headerScroller.children(),i.$viewport=i.$root.find(".ngViewport"),i.$canvas=i.$viewport.find(".ngCanvas"),i.$footerPanel=i.$root.find(".ngFooterPanel"),e.$watch(function(){return i.$viewport.scrollLeft()},function(e){return i.$headerContainer.scrollLeft(e)}),n.UpdateGridLayout(e,i)},n.getRealWidth=function(e){var n=0,o={visibility:"hidden",display:"block"},i=e.parents().andSelf().not(":visible");return t.swap(i[0],o,function(){n=e.outerWidth()}),n},n.UpdateGridLayout=function(e,t){var o=t.$viewport.scrollTop();t.elementDims.rootMaxW=t.$root.width(),t.$root.is(":hidden")&&(t.elementDims.rootMaxW=n.getRealWidth(t.$root)),t.elementDims.rootMaxH=t.$root.height(),t.refreshDomSizes(),e.adjustScrollTop(o,!0)},n.numberOfGrids=0,n.BuildStyles=function(o,i,r){var l,a=i.config.rowHeight,s=i.$styleSheet,c=i.gridId,g=o.columns,d=0;s||(s=t("#"+c),s[0]||(s=t("<style id='"+c+"' type='text/css' rel='stylesheet' />").appendTo(i.$root))),s.empty();var u=o.totalRowWidth();l="."+c+" .ngCanvas { width: "+u+"px; }"+"."+c+" .ngRow { width: "+u+"px; }"+"."+c+" .ngCanvas { width: "+u+"px; }"+"."+c+" .ngHeaderScroller { width: "+(u+n.ScrollH)+"px}";for(var f=0;g.length>f;f++){var h=g[f];h.visible!==!1&&(l+="."+c+" .col"+f+" { width: "+h.width+"px; left: "+d+"px; height: "+a+"px }"+"."+c+" .colt"+f+" { width: "+h.width+"px; }",d+=h.width)}e.isIe?s[0].styleSheet.cssText=l:s[0].appendChild(document.createTextNode(l)),i.$styleSheet=s,o.adjustScrollLeft(i.$viewport.scrollLeft()),r&&n.digest(o)},n.setColLeft=function(t,n,i){if(i.$styleSheet){var r=o[t.index];r||(r=o[t.index]=RegExp(".col"+t.index+" { width: [0-9]+px; left: [0-9]+px"));var l=i.$styleSheet.html(),a=l.replace(r,".col"+t.index+" { width: "+t.width+"px; left: "+n+"px");e.isIe?setTimeout(function(){i.$styleSheet.html(a)}):i.$styleSheet.html(a)}},n.setColLeft.immediate=1,n.RebuildGrid=function(e,t){n.UpdateGridLayout(e,t),(null==t.config.maintainColumnRatios||t.config.maintainColumnRatios)&&t.configureColumnWidths(),e.adjustScrollLeft(t.$viewport.scrollLeft()),n.BuildStyles(e,t,!0)},n.digest=function(e){e.$root.$$phase||e.$digest()},n.ScrollH=17,n.ScrollW=17,n.LetterW=10,i(),n}]),angular.module("ngGrid.services").factory("$sortService",["$parse",function(e){var t={};return t.colSortFnCache={},t.guessSortFn=function(e){var n=typeof e;switch(n){case"number":return t.sortNumber;case"boolean":return t.sortBool;case"string":return e.match(/^[-+]?[£$¤]?[\d,.]+%?$/)?t.sortNumberStr:t.sortAlpha;default:return"[object Date]"===Object.prototype.toString.call(e)?t.sortDate:t.basicSort}},t.basicSort=function(e,t){return e===t?0:t>e?-1:1},t.sortNumber=function(e,t){return e-t},t.sortNumberStr=function(e,t){var n,o,i=!1,r=!1;return n=parseFloat(e.replace(/[^0-9.-]/g,"")),isNaN(n)&&(i=!0),o=parseFloat(t.replace(/[^0-9.-]/g,"")),isNaN(o)&&(r=!0),i&&r?0:i?1:r?-1:n-o},t.sortAlpha=function(e,t){var n=e.toLowerCase(),o=t.toLowerCase();return n===o?0:o>n?-1:1},t.sortDate=function(e,t){var n=e.getTime(),o=t.getTime();return n===o?0:o>n?-1:1},t.sortBool=function(e,t){return e&&t?0:e||t?e?1:-1:0},t.sortData=function(n,o){if(o&&n){var r,l,a=n.fields.length,s=n.fields,c=o.slice(0);o.sort(function(o,g){for(var d,u=0,f=0;0===u&&a>f;){r=n.columns[f],l=n.directions[f],d=t.getSortFn(r,c);var h=e(s[f])(o),p=e(s[f])(g);!h&&0!==h||!p&&0!==p?p||h?h?p||(u=-1):u=1:u=0:u=d(h,p),f++}return l===i?u:0-u})}},t.Sort=function(e,n){t.isSorting||(t.isSorting=!0,t.sortData(e,n),t.isSorting=!1)},t.getSortFn=function(n,o){var i,r;if(t.colSortFnCache[n.field])i=t.colSortFnCache[n.field];else if(void 0!==n.sortingAlgorithm)i=n.sortingAlgorithm,t.colSortFnCache[n.field]=n.sortingAlgorithm;else{if(r=o[0],!r)return i;i=t.guessSortFn(e(n.field)(r)),i?t.colSortFnCache[n.field]=i:i=t.sortAlpha}return i},t}]),angular.module("ngGrid.services").factory("$utilityService",["$parse",function(n){var o=/function (.{1,})\(/,i={visualLength:function(e){var n=document.getElementById("testDataLength");return n||(n=document.createElement("SPAN"),n.id="testDataLength",n.style.visibility="hidden",document.body.appendChild(n)),t(n).css("font",t(e).css("font")),t(n).css("font-size",t(e).css("font-size")),t(n).css("font-family",t(e).css("font-family")),n.innerHTML=t(e).text(),n.offsetWidth},forIn:function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},evalProperty:function(e,t){return n(t)(e)},endsWith:function(e,t){return e&&t&&"string"==typeof e?-1!==e.indexOf(t,e.length-t.length):!1},isNullOrUndefined:function(e){return void 0===e||null===e?!0:!1},getElementsByClassName:function(e){for(var t=[],n=RegExp("\\b"+e+"\\b"),o=document.getElementsByTagName("*"),i=0;o.length>i;i++){var r=o[i].className;n.test(r)&&t.push(o[i])}return t},newId:function(){var e=(new Date).getTime();return function(){return e+=1}}(),seti18n:function(t,n){var o=e.ngGrid.i18n[n];for(var i in o)t.i18n[i]=o[i]},getInstanceType:function(e){var t=o.exec(""+e.constructor);if(t&&t.length>1){var n=t[1].replace(/^\s+|\s+$/g,"");return n}return""},ieVersion:function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->";while(n[0]);return e>4?e:void 0}()};return t.extend(i,{isIe:function(){return void 0!==i.ieVersion}()}),i}]);var w=function(e,t,n,o){this.rowIndex=0,this.offsetTop=this.rowIndex*n,this.entity=e,this.label=e.gLabel,this.field=e.gField,this.depth=e.gDepth,this.parent=e.parent,this.children=e.children,this.aggChildren=e.aggChildren,this.aggIndex=e.aggIndex,this.collapsed=o,this.groupInitState=o,this.rowFactory=t,this.rowHeight=n,this.isAggRow=!0,this.offsetLeft=25*e.gDepth,this.aggLabelFilter=e.aggLabelFilter};w.prototype.toggleExpand=function(){this.collapsed=this.collapsed?!1:!0,this.orig&&(this.orig.collapsed=this.collapsed),this.notifyChildren()},w.prototype.setExpand=function(e){this.collapsed=e,this.notifyChildren()},w.prototype.notifyChildren=function(){for(var e=Math.max(this.rowFactory.aggCache.length,this.children.length),t=0;e>t;t++)if(this.aggChildren[t]&&(this.aggChildren[t].entity[s]=this.collapsed,this.collapsed&&this.aggChildren[t].setExpand(this.collapsed)),this.children[t]&&(this.children[t][s]=this.collapsed),t>this.aggIndex&&this.rowFactory.aggCache[t]){var n=this.rowFactory.aggCache[t],o=30*this.children.length;n.offsetTop=this.collapsed?n.offsetTop-o:n.offsetTop+o}this.rowFactory.renderedChange()},w.prototype.aggClass=function(){return this.collapsed?"ngAggArrowCollapsed":"ngAggArrowExpanded"},w.prototype.totalChildren=function(){if(this.aggChildren.length>0){var e=0,t=function(n){n.aggChildren.length>0?angular.forEach(n.aggChildren,function(e){t(e)}):e+=n.children.length};return t(this),e}return this.children.length},w.prototype.copy=function(){var e=new w(this.entity,this.rowFactory,this.rowHeight,this.groupInitState);return e.orig=this,e};var C=function(e,n,o,l,a,s){var c=this,d=e.colDef,u=500,f=0,p=null;c.colDef=e.colDef,c.width=d.width,c.groupIndex=0,c.isGroupedBy=!1,c.minWidth=d.minWidth?d.minWidth:50,c.maxWidth=d.maxWidth?d.maxWidth:9e3,c.enableCellEdit=void 0!==d.enableCellEdit?d.enableCellEdit:e.enableCellEdit||e.enableCellEditOnFocus,c.headerRowHeight=e.headerRowHeight,c.displayName=void 0===d.displayName?d.field:d.displayName,c.index=e.index,c.isAggCol=e.isAggCol,c.cellClass=d.cellClass,c.sortPriority=void 0,c.cellFilter=d.cellFilter?d.cellFilter:"",c.field=d.field,c.aggLabelFilter=d.cellFilter||d.aggLabelFilter,c.visible=s.isNullOrUndefined(d.visible)||d.visible,c.sortable=!1,c.resizable=!1,c.pinnable=!1,c.pinned=e.enablePinning&&d.pinned,c.originalIndex=null==e.originalIndex?c.index:e.originalIndex,c.groupable=s.isNullOrUndefined(d.groupable)||d.groupable,e.enableSort&&(c.sortable=s.isNullOrUndefined(d.sortable)||d.sortable),e.enableResize&&(c.resizable=s.isNullOrUndefined(d.resizable)||d.resizable),e.enablePinning&&(c.pinnable=s.isNullOrUndefined(d.pinnable)||d.pinnable),c.sortDirection=void 0,c.sortingAlgorithm=d.sortFn,c.headerClass=d.headerClass,c.cursor=c.sortable?"pointer":"default",c.headerCellTemplate=d.headerCellTemplate||a.get("headerCellTemplate.html"),c.cellTemplate=d.cellTemplate||a.get("cellTemplate.html").replace(g,c.cellFilter?"|"+c.cellFilter:""),c.enableCellEdit&&(c.cellEditTemplate=a.get("cellEditTemplate.html"),c.editableCellTemplate=d.editableCellTemplate||a.get("editableCellTemplate.html")),d.cellTemplate&&!h.test(d.cellTemplate)&&(c.cellTemplate=t.ajax({type:"GET",url:d.cellTemplate,async:!1}).responseText),c.enableCellEdit&&d.editableCellTemplate&&!h.test(d.editableCellTemplate)&&(c.editableCellTemplate=t.ajax({type:"GET",url:d.editableCellTemplate,async:!1}).responseText),d.headerCellTemplate&&!h.test(d.headerCellTemplate)&&(c.headerCellTemplate=t.ajax({type:"GET",url:d.headerCellTemplate,async:!1}).responseText),c.colIndex=function(){var e=c.pinned?"pinned ":"";return e+="col"+c.index+" colt"+c.index,c.cellClass&&(e+=" "+c.cellClass),e},c.groupedByClass=function(){return c.isGroupedBy?"ngGroupedByIcon":"ngGroupIcon"},c.toggleVisible=function(){c.visible=!c.visible},c.showSortButtonUp=function(){return c.sortable?c.sortDirection===r:c.sortable},c.showSortButtonDown=function(){return c.sortable?c.sortDirection===i:c.sortable},c.noSortVisible=function(){return!c.sortDirection},c.sort=function(t){if(!c.sortable)return!0;var n=c.sortDirection===i?r:i;return c.sortDirection=n,e.sortCallback(c,t),!1},c.gripClick=function(){f++,1===f?p=setTimeout(function(){f=0},u):(clearTimeout(p),e.resizeOnDataCallback(c),f=0)},c.gripOnMouseDown=function(e){return n.isColumnResizing=!0,e.ctrlKey&&!c.pinned?(c.toggleVisible(),l.BuildStyles(n,o),!0):(e.target.parentElement.style.cursor="col-resize",c.startMousePosition=e.clientX,c.origWidth=c.width,t(document).mousemove(c.onMouseMove),t(document).mouseup(c.gripOnMouseUp),!1)},c.onMouseMove=function(e){var t=e.clientX-c.startMousePosition,i=t+c.origWidth;return c.width=c.minWidth>i?c.minWidth:i>c.maxWidth?c.maxWidth:i,n.hasUserChangedGridColumnWidths=!0,l.BuildStyles(n,o),!1},c.gripOnMouseUp=function(e){return t(document).off("mousemove",c.onMouseMove),t(document).off("mouseup",c.gripOnMouseUp),e.target.parentElement.style.cursor="default",l.digest(n),n.isColumnResizing=!1,!1},c.copy=function(){var t=new C(e,n,o,l,a);return t.isClone=!0,t.orig=c,t},c.setVars=function(e){c.orig=e,c.width=e.width,c.groupIndex=e.groupIndex,c.isGroupedBy=e.isGroupedBy,c.displayName=e.displayName,c.index=e.index,c.isAggCol=e.isAggCol,c.cellClass=e.cellClass,c.cellFilter=e.cellFilter,c.field=e.field,c.aggLabelFilter=e.aggLabelFilter,c.visible=e.visible,c.sortable=e.sortable,c.resizable=e.resizable,c.pinnable=e.pinnable,c.pinned=e.pinned,c.originalIndex=e.originalIndex,c.sortDirection=e.sortDirection,c.sortingAlgorithm=e.sortingAlgorithm,c.headerClass=e.headerClass,c.headerCellTemplate=e.headerCellTemplate,c.cellTemplate=e.cellTemplate,c.cellEditTemplate=e.cellEditTemplate}},b=function(e){this.outerHeight=null,this.outerWidth=null,t.extend(this,e)},S=function(e){this.previousColumn=null,this.grid=e};S.prototype.changeUserSelect=function(e,t){e.css({"-webkit-touch-callout":t,"-webkit-user-select":t,"-khtml-user-select":t,"-moz-user-select":"none"===t?"-moz-none":t,"-ms-user-select":t,"user-select":t})},S.prototype.focusCellElement=function(e,t){if(e.selectionProvider.lastClickedRow){var n=void 0!==t?t:this.previousColumn,o=e.selectionProvider.lastClickedRow.clone?e.selectionProvider.lastClickedRow.clone.elm:e.selectionProvider.lastClickedRow.elm;if(void 0!==n&&o){var i=angular.element(o[0].children).filter(function(){return 8!==this.nodeType}),r=Math.max(Math.min(e.renderedColumns.length-1,n),0);this.grid.config.showSelectionCheckbox&&angular.element(i[r]).scope()&&0===angular.element(i[r]).scope().col.index&&(r=1),i[r]&&i[r].children[1].children[0].focus(),this.previousColumn=n}}},S.prototype.selectionHandlers=function(e,t){var n=!1,o=this;t.bind("keydown",function(i){if(16===i.keyCode)return o.changeUserSelect(t,"none",i),!0;if(!n){n=!0;var r=v(e,t,i,o.grid);return n=!1,r}return!0}),t.bind("keyup",function(e){return 16===e.keyCode&&o.changeUserSelect(t,"text",e),!0})};var x=function(n,o,i,r){var l=this;l.colToMove=void 0,l.groupToMove=void 0,l.assignEvents=function(){n.config.jqueryUIDraggable&&!n.config.enablePinning?n.$groupPanel.droppable({addClasses:!1,drop:function(e){l.onGroupDrop(e)}}):(n.$groupPanel.on("mousedown",l.onGroupMouseDown).on("dragover",l.dragOver).on("drop",l.onGroupDrop),n.$headerScroller.on("mousedown",l.onHeaderMouseDown).on("dragover",l.dragOver),n.config.enableColumnReordering&&!n.config.enablePinning&&n.$headerScroller.on("drop",l.onHeaderDrop)),o.$watch("renderedColumns",function(){r(l.setDraggables)})},l.dragStart=function(e){e.dataTransfer.setData("text","")},l.dragOver=function(e){e.preventDefault()},l.setDraggables=function(){if(n.config.jqueryUIDraggable)n.$root.find(".ngHeaderSortColumn").draggable({helper:"clone",appendTo:"body",stack:"div",addClasses:!1,start:function(e){l.onHeaderMouseDown(e)}}).droppable({drop:function(e){l.onHeaderDrop(e)}});else{var e=n.$root.find(".ngHeaderSortColumn");angular.forEach(e,function(e){e.className&&-1!==e.className.indexOf("ngHeaderSortColumn")&&(e.setAttribute("draggable","true"),e.addEventListener&&e.addEventListener("dragstart",l.dragStart))}),-1!==navigator.userAgent.indexOf("MSIE")&&n.$root.find(".ngHeaderSortColumn").bind("selectstart",function(){return this.dragDrop(),!1})}},l.onGroupMouseDown=function(e){var o=t(e.target);if("ngRemoveGroup"!==o[0].className){var i=angular.element(o).scope();i&&(n.config.jqueryUIDraggable||(o.attr("draggable","true"),this.addEventListener&&this.addEventListener("dragstart",l.dragStart),-1!==navigator.userAgent.indexOf("MSIE")&&o.bind("selectstart",function(){return this.dragDrop(),!1})),l.groupToMove={header:o,groupName:i.group,index:i.$index})}else l.groupToMove=void 0},l.onGroupDrop=function(e){e.stopPropagation();var i,r;l.groupToMove?(i=t(e.target).closest(".ngGroupElement"),"ngGroupPanel"===i.context.className?(o.configGroups.splice(l.groupToMove.index,1),o.configGroups.push(l.groupToMove.groupName)):(r=angular.element(i).scope(),r&&l.groupToMove.index!==r.$index&&(o.configGroups.splice(l.groupToMove.index,1),o.configGroups.splice(r.$index,0,l.groupToMove.groupName))),l.groupToMove=void 0,n.fixGroupIndexes()):l.colToMove&&(-1===o.configGroups.indexOf(l.colToMove.col)&&(i=t(e.target).closest(".ngGroupElement"),"ngGroupPanel"===i.context.className||"ngGroupPanelDescription ng-binding"===i.context.className?o.groupBy(l.colToMove.col):(r=angular.element(i).scope(),r&&o.removeGroup(r.$index))),l.colToMove=void 0),o.$$phase||o.$apply()},l.onHeaderMouseDown=function(e){var n=t(e.target).closest(".ngHeaderSortColumn"),o=angular.element(n).scope();o&&(l.colToMove={header:n,col:o.col})},l.onHeaderDrop=function(e){if(l.colToMove&&!l.colToMove.col.pinned){var r=t(e.target).closest(".ngHeaderSortColumn"),a=angular.element(r).scope();if(a){if(l.colToMove.col===a.col)return;o.columns.splice(l.colToMove.col.index,1),o.columns.splice(a.col.index,0,l.colToMove.col),n.fixColumnIndexes(),l.colToMove=void 0,i.digest(o)}}},l.assignGridEventHandlers=function(){-1===n.config.tabIndex?(n.$viewport.attr("tabIndex",i.numberOfGrids),i.numberOfGrids++):n.$viewport.attr("tabIndex",n.config.tabIndex);var r;t(e).resize(function(){clearTimeout(r),r=setTimeout(function(){i.RebuildGrid(o,n)},100)});var l;t(n.$root.parent()).on("resize",function(){clearTimeout(l),l=setTimeout(function(){i.RebuildGrid(o,n)},100)})},l.assignGridEventHandlers(),l.assignEvents()},y=function(e,t){e.maxRows=function(){var n=Math.max(e.totalServerItems,t.data.length);return n},e.multiSelect=t.config.enableRowSelection&&t.config.multiSelect,e.selectedItemCount=t.selectedItemCount,e.maxPages=function(){return Math.ceil(e.maxRows()/e.pagingOptions.pageSize)},e.pageForward=function(){var t=e.pagingOptions.currentPage;e.totalServerItems>0?e.pagingOptions.currentPage=Math.min(t+1,e.maxPages()):e.pagingOptions.currentPage++},e.pageBackward=function(){var t=e.pagingOptions.currentPage;e.pagingOptions.currentPage=Math.max(t-1,1)},e.pageToFirst=function(){e.pagingOptions.currentPage=1},e.pageToLast=function(){var t=e.maxPages();e.pagingOptions.currentPage=t},e.cantPageForward=function(){var n=e.pagingOptions.currentPage,o=e.maxPages();return e.totalServerItems>0?n>=o:1>t.data.length},e.cantPageToLast=function(){return e.totalServerItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){var t=e.pagingOptions.currentPage;return 1>=t}},T=function(i,r,l,a,c,g,d,u,f,p,m){var v={aggregateTemplate:void 0,afterSelectionChange:function(){},beforeSelectionChange:function(){return!0},checkboxCellTemplate:void 0,checkboxHeaderTemplate:void 0,columnDefs:void 0,data:[],dataUpdated:function(){},enableCellEdit:!1,enableCellEditOnFocus:!1,enableCellSelection:!1,enableColumnResize:!1,enableColumnReordering:!1,enableColumnHeavyVirt:!1,enablePaging:!1,enablePinning:!1,enableRowSelection:!0,enableSorting:!0,enableHighlighting:!1,excludeProperties:[],filterOptions:{filterText:"",useExternalFilter:!1},footerRowHeight:55,footerTemplate:void 0,groups:[],groupsCollapsedByDefault:!0,headerRowHeight:30,headerRowTemplate:void 0,jqueryUIDraggable:!1,jqueryUITheme:!1,keepLastSelected:!0,maintainColumnRatios:void 0,menuTemplate:void 0,multiSelect:!0,pagingOptions:{pageSizes:[250,500,1e3],pageSize:250,currentPage:1},pinSelectionCheckbox:!1,plugins:[],primaryKey:void 0,rowHeight:30,rowTemplate:void 0,selectedItems:[],selectWithCheckboxOnly:!1,showColumnMenu:!1,showFilter:!1,showFooter:!1,showGroupPanel:!1,showSelectionCheckbox:!1,sortInfo:{fields:[],columns:[],directions:[]},tabIndex:-1,totalServerItems:0,useExternalSorting:!1,i18n:"en",virtualizationThreshold:50},w=this;w.maxCanvasHt=0,w.config=t.extend(v,e.ngGrid.config,r),w.config.showSelectionCheckbox=w.config.showSelectionCheckbox&&w.config.enableColumnHeavyVirt===!1,w.config.enablePinning=w.config.enablePinning&&w.config.enableColumnHeavyVirt===!1,w.config.selectWithCheckboxOnly=w.config.selectWithCheckboxOnly&&w.config.showSelectionCheckbox!==!1,w.config.pinSelectionCheckbox=w.config.enablePinning,"string"==typeof r.columnDefs&&(w.config.columnDefs=i.$eval(r.columnDefs)),w.rowCache=[],w.rowMap=[],w.gridId="ng"+d.newId(),w.$root=null,w.$groupPanel=null,w.$topPanel=null,w.$headerContainer=null,w.$headerScroller=null,w.$headers=null,w.$viewport=null,w.$canvas=null,w.rootDim=w.config.gridDim,w.data=[],w.lateBindColumns=!1,w.filteredRows=[],w.initTemplates=function(){var e=["rowTemplate","aggregateTemplate","headerRowTemplate","checkboxCellTemplate","checkboxHeaderTemplate","menuTemplate","footerTemplate"],t=[];return angular.forEach(e,function(e){t.push(w.getTemplate(e))}),m.all(t)},w.getTemplate=function(e){var t=w.config[e],n=w.gridId+e+".html",o=m.defer();if(t&&!h.test(t))p.get(t,{cache:g}).success(function(e){g.put(n,e),o.resolve()}).error(function(){o.reject("Could not load template: "+t)});else if(t)g.put(n,t),o.resolve();else{var i=e+".html";g.put(n,g.get(i)),o.resolve()}return o.promise},"object"==typeof w.config.data&&(w.data=w.config.data),w.calcMaxCanvasHeight=function(){var e;return e=w.config.groups.length>0?w.rowFactory.parsedData.filter(function(e){return!e[s]}).length*w.config.rowHeight:w.filteredRows.length*w.config.rowHeight},w.elementDims={scrollW:0,scrollH:0,rowIndexCellW:25,rowSelectedCellW:25,rootMaxW:0,rootMaxH:0},w.setRenderedRows=function(e){i.renderedRows.length=e.length;for(var t=0;e.length>t;t++)!i.renderedRows[t]||e[t].isAggRow||i.renderedRows[t].isAggRow?(i.renderedRows[t]=e[t].copy(),i.renderedRows[t].collapsed=e[t].collapsed,e[t].isAggRow||i.renderedRows[t].setVars(e[t])):i.renderedRows[t].setVars(e[t]),i.renderedRows[t].rowIndex=e[t].rowIndex,i.renderedRows[t].offsetTop=e[t].offsetTop,i.renderedRows[t].selected=e[t].selected,e[t].renderedRowIndex=t;w.refreshDomSizes(),i.$emit("ngGridEventRows",e)},w.minRowsToRender=function(){var e=i.viewportDimHeight()||1;return Math.floor(e/w.config.rowHeight)},w.refreshDomSizes=function(){var e=new b;e.outerWidth=w.elementDims.rootMaxW,e.outerHeight=w.elementDims.rootMaxH,w.rootDim=e,w.maxCanvasHt=w.calcMaxCanvasHeight()},w.buildColumnDefsFromData=function(){w.config.columnDefs=[];var e=w.data[0];return e?(d.forIn(e,function(e,t){-1===w.config.excludeProperties.indexOf(t)&&w.config.columnDefs.push({field:t})}),void 0):(w.lateBoundColumns=!0,void 0)},w.buildColumns=function(){var e=w.config.columnDefs,t=[];if(e||(w.buildColumnDefsFromData(),e=w.config.columnDefs),w.config.showSelectionCheckbox&&t.push(new C({colDef:{field:"✔",width:w.elementDims.rowSelectedCellW,sortable:!1,resizable:!1,groupable:!1,headerCellTemplate:g.get(i.gridId+"checkboxHeaderTemplate.html"),cellTemplate:g.get(i.gridId+"checkboxCellTemplate.html"),pinned:w.config.pinSelectionCheckbox},index:0,headerRowHeight:w.config.headerRowHeight,sortCallback:w.sortData,resizeOnDataCallback:w.resizeOnData,enableResize:w.config.enableColumnResize,enableSort:w.config.enableSorting,enablePinning:w.config.enablePinning},i,w,a,g,d)),e.length>0){var n=w.config.showSelectionCheckbox?1:0,o=i.configGroups.length;i.configGroups.length=0,angular.forEach(e,function(e,r){r+=n;var l=new C({colDef:e,index:r+o,originalIndex:r,headerRowHeight:w.config.headerRowHeight,sortCallback:w.sortData,resizeOnDataCallback:w.resizeOnData,enableResize:w.config.enableColumnResize,enableSort:w.config.enableSorting,enablePinning:w.config.enablePinning,enableCellEdit:w.config.enableCellEdit||w.config.enableCellEditOnFocus},i,w,a,g,d),s=w.config.groups.indexOf(e.field);-1!==s&&(l.isGroupedBy=!0,i.configGroups.splice(s,0,l),l.groupIndex=i.configGroups.length),t.push(l)}),i.columns=t,w.config.groups.length>0&&w.rowFactory.getGrouping(w.config.groups)}},w.configureColumnWidths=function(){var e=[],t=[],n=0,o=0,r={};if(angular.forEach(i.columns,function(e,t){if(!d.isNullOrUndefined(e.originalIndex)){var n=e.originalIndex;w.config.showSelectionCheckbox&&(0===e.originalIndex&&e.visible&&(o+=25),n--),r[n]=t}}),angular.forEach(w.config.columnDefs,function(l,a){var s=i.columns[r[a]];l.index=a;var c,g=!1;if(d.isNullOrUndefined(l.width)?l.width="*":(g=isNaN(l.width)?d.endsWith(l.width,"%"):!1,c=g?l.width:parseInt(l.width,10)),isNaN(c)&&!i.hasUserChangedGridColumnWidths){if(c=l.width,"auto"===c){s.width=s.minWidth,o+=s.width;var u=s;return i.$on("ngGridEventData",function(){w.resizeOnData(u)}),void 0}if(-1!==c.indexOf("*"))return s.visible!==!1&&(n+=c.length),e.push(l),void 0;if(g)return t.push(l),void 0;throw'unable to parse column width, use percentage ("10%","20%", etc...) or "*" to use remaining width of grid'}s.visible!==!1&&(o+=s.width=parseInt(s.width,10))}),t.length>0){w.config.maintainColumnRatios=w.config.maintainColumnRatios!==!1;var l=0,s=0;angular.forEach(t,function(e){var t=i.columns[r[e.index]],n=e.width,o=parseInt(n.slice(0,-1),10)/100;l+=o,t.visible||(s+=o)});var c=l-s;angular.forEach(t,function(e){var t=i.columns[r[e.index]],n=e.width,a=parseInt(n.slice(0,-1),10)/100;a/=s>0?c:l;var g=w.rootDim.outerWidth*l;t.width=Math.floor(g*a),o+=t.width})}if(e.length>0){w.config.maintainColumnRatios=w.config.maintainColumnRatios!==!1;var g=w.rootDim.outerWidth-o;w.maxCanvasHt>i.viewportDimHeight()&&(g-=a.ScrollW);var u=Math.floor(g/n);angular.forEach(e,function(t,n){var l=i.columns[r[t.index]];l.width=u*t.width.length,l.visible!==!1&&(o+=l.width);var s=n===e.length-1;if(s&&w.rootDim.outerWidth>o){var c=w.rootDim.outerWidth-o;w.maxCanvasHt>i.viewportDimHeight()&&(c-=a.ScrollW),l.width+=c}})}},w.init=function(){return w.initTemplates().then(function(){i.selectionProvider=new D(w,i,f),i.domAccessProvider=new S(w),w.rowFactory=new R(w,i,a,g,d),w.searchProvider=new $(i,w,c),w.styleProvider=new L(i,w),i.$watch("configGroups",function(e){var t=[];angular.forEach(e,function(e){t.push(e.field||e)}),w.config.groups=t,w.rowFactory.filteredRowsChanged(),i.$emit("ngGridEventGroups",e)},!0),i.$watch("columns",function(e){i.isColumnResizing||a.RebuildGrid(i,w),i.$emit("ngGridEventColumns",e)},!0),i.$watch(function(){return r.i18n},function(e){d.seti18n(i,e)}),w.maxCanvasHt=w.calcMaxCanvasHeight(),w.config.sortInfo.fields&&w.config.sortInfo.fields.length>0&&i.$watch(function(){return w.config.sortInfo},function(){l.isSorting||(w.sortColumnsInit(),i.$emit("ngGridEventSorted",w.config.sortInfo))},!0)})},w.resizeOnData=function(e){var n=e.minWidth,o=d.getElementsByClassName("col"+e.index);angular.forEach(o,function(e,o){var i;if(0===o){var r=t(e).find(".ngHeaderText");i=d.visualLength(r)+10}else{var l=t(e).find(".ngCellText");i=d.visualLength(l)+10}i>n&&(n=i)}),e.width=e.longest=Math.min(e.maxWidth,n+7),a.BuildStyles(i,w,!0)},w.lastSortedColumns=[],w.sortData=function(e,n){if(n&&n.shiftKey&&w.config.sortInfo){var o=w.config.sortInfo.columns.indexOf(e);-1===o?(1===w.config.sortInfo.columns.length&&(w.config.sortInfo.columns[0].sortPriority=1),w.config.sortInfo.columns.push(e),e.sortPriority=w.config.sortInfo.columns.length,w.config.sortInfo.fields.push(e.field),w.config.sortInfo.directions.push(e.sortDirection),w.lastSortedColumns.push(e)):w.config.sortInfo.directions[o]=e.sortDirection}else{var r=t.isArray(e);w.config.sortInfo.columns.length=0,w.config.sortInfo.fields.length=0,w.config.sortInfo.directions.length=0;var l=function(e){w.config.sortInfo.columns.push(e),w.config.sortInfo.fields.push(e.field),w.config.sortInfo.directions.push(e.sortDirection),w.lastSortedColumns.push(e)};r?(w.clearSortingData(),angular.forEach(e,function(e,t){e.sortPriority=t+1,l(e)})):(w.clearSortingData(e),e.sortPriority=void 0,l(e))}w.sortActual(),w.searchProvider.evalFilter(),i.$emit("ngGridEventSorted",w.config.sortInfo)},w.sortColumnsInit=function(){w.config.sortInfo.columns?w.config.sortInfo.columns.length=0:w.config.sortInfo.columns=[],angular.forEach(i.columns,function(e){var t=w.config.sortInfo.fields.indexOf(e.field);-1!==t&&(e.sortDirection=w.config.sortInfo.directions[t]||"asc",w.config.sortInfo.columns[t]=e)}),angular.forEach(w.config.sortInfo.columns,function(e){w.sortData(e)})},w.sortActual=function(){if(!w.config.useExternalSorting){var e=w.data.slice(0);angular.forEach(e,function(e,t){var n=w.rowMap[t];if(void 0!==n){var o=w.rowCache[n];void 0!==o&&(e.preSortSelected=o.selected,e.preSortIndex=t)}}),l.Sort(w.config.sortInfo,e),angular.forEach(e,function(e,t){w.rowCache[t].entity=e,w.rowCache[t].selected=e.preSortSelected,w.rowMap[e.preSortIndex]=t,delete e.preSortSelected,delete e.preSortIndex})}},w.clearSortingData=function(e){e?(angular.forEach(w.lastSortedColumns,function(t){e.index!==t.index&&(t.sortDirection="",t.sortPriority=null)}),w.lastSortedColumns[0]=e,w.lastSortedColumns.length=1):(angular.forEach(w.lastSortedColumns,function(e){e.sortDirection="",e.sortPriority=null}),w.lastSortedColumns=[])},w.fixColumnIndexes=function(){for(var e=0;i.columns.length>e;e++)i.columns[e].index=e},w.fixGroupIndexes=function(){angular.forEach(i.configGroups,function(e,t){e.groupIndex=t+1})},i.elementsNeedMeasuring=!0,i.columns=[],i.renderedRows=[],i.renderedColumns=[],i.headerRow=null,i.rowHeight=w.config.rowHeight,i.jqueryUITheme=w.config.jqueryUITheme,i.showSelectionCheckbox=w.config.showSelectionCheckbox,i.enableCellSelection=w.config.enableCellSelection,i.enableCellEditOnFocus=w.config.enableCellEditOnFocus,i.footer=null,i.selectedItems=w.config.selectedItems,i.multiSelect=w.config.multiSelect,i.showFooter=w.config.showFooter,i.footerRowHeight=i.showFooter?w.config.footerRowHeight:0,i.showColumnMenu=w.config.showColumnMenu,i.showMenu=!1,i.configGroups=[],i.gridId=w.gridId,i.enablePaging=w.config.enablePaging,i.pagingOptions=w.config.pagingOptions,i.i18n={},d.seti18n(i,w.config.i18n),i.adjustScrollLeft=function(e){for(var t=0,n=0,o=i.columns.length,r=[],l=!w.config.enableColumnHeavyVirt,s=0,c=function(e){l?r.push(e):i.renderedColumns[s]?i.renderedColumns[s].setVars(e):i.renderedColumns[s]=e.copy(),s++},g=0;o>g;g++){var d=i.columns[g];if(d.visible!==!1){var u=d.width+t;if(d.pinned){c(d);var f=g>0?e+n:e;a.setColLeft(d,f,w),n+=d.width}else u>=e&&e+w.rootDim.outerWidth>=t&&c(d);t+=d.width}}l&&(i.renderedColumns=r)},w.prevScrollTop=0,w.prevScrollIndex=0,i.adjustScrollTop=function(e,t){if(w.prevScrollTop!==e||t){e>0&&w.$viewport[0].scrollHeight-e<=w.$viewport.outerHeight()&&i.$emit("ngGridEventScroll"); + var r,l=Math.floor(e/w.config.rowHeight);if(w.filteredRows.length>w.config.virtualizationThreshold){if(e>w.prevScrollTop&&w.prevScrollIndex+o>l)return;if(w.prevScrollTop>e&&l>w.prevScrollIndex-o)return;r=new P(Math.max(0,l-n),l+w.minRowsToRender()+n)}else{var a=i.configGroups.length>0?w.rowFactory.parsedData.length:w.data.length;r=new P(0,Math.max(a,w.minRowsToRender()+n))}w.prevScrollTop=e,w.rowFactory.UpdateViewableRange(r),w.prevScrollIndex=l}},i.toggleShowMenu=function(){i.showMenu=!i.showMenu},i.toggleSelectAll=function(e,t){i.selectionProvider.toggleSelectAll(e,!1,t)},i.totalFilteredItemsLength=function(){return w.filteredRows.length},i.showGroupPanel=function(){return w.config.showGroupPanel},i.topPanelHeight=function(){return w.config.showGroupPanel===!0?w.config.headerRowHeight+32:w.config.headerRowHeight},i.viewportDimHeight=function(){return Math.max(0,w.rootDim.outerHeight-i.topPanelHeight()-i.footerRowHeight-2)},i.groupBy=function(e){if(!(1>w.data.length)&&e.groupable&&e.field){e.sortDirection||e.sort({shiftKey:i.configGroups.length>0?!0:!1});var t=i.configGroups.indexOf(e);-1===t?(e.isGroupedBy=!0,i.configGroups.push(e),e.groupIndex=i.configGroups.length):i.removeGroup(t),w.$viewport.scrollTop(0),a.digest(i)}},i.removeGroup=function(e){var t=i.columns.filter(function(t){return t.groupIndex===e+1})[0];t.isGroupedBy=!1,t.groupIndex=0,i.columns[e].isAggCol&&(i.columns.splice(e,1),i.configGroups.splice(e,1),w.fixGroupIndexes()),0===i.configGroups.length&&(w.fixColumnIndexes(),a.digest(i)),i.adjustScrollLeft(0)},i.togglePin=function(e){for(var t=e.index,n=0,o=0;i.columns.length>o&&i.columns[o].pinned;o++)n++;e.pinned&&(n=Math.max(e.originalIndex,n-1)),e.pinned=!e.pinned,i.columns.splice(t,1),i.columns.splice(n,0,e),w.fixColumnIndexes(),a.BuildStyles(i,w,!0),w.$viewport.scrollLeft(w.$viewport.scrollLeft()-e.width)},i.totalRowWidth=function(){for(var e=0,t=i.columns,n=0;t.length>n;n++)t[n].visible!==!1&&(e+=t[n].width);return e},i.headerScrollerDim=function(){var e=i.viewportDimHeight(),t=w.maxCanvasHt,n=t>e,o=new b;return o.autoFitHeight=!0,o.outerWidth=i.totalRowWidth(),n?o.outerWidth+=w.elementDims.scrollW:w.elementDims.scrollH>=t-e&&(o.outerWidth+=w.elementDims.scrollW),o}},P=function(e,t){this.topRow=e,this.bottomRow=t},I=function(e,t,n,o,i){this.entity=e,this.config=t,this.selectionProvider=n,this.rowIndex=o,this.utils=i,this.selected=n.getSelection(e),this.cursor=this.config.enableRowSelection?"pointer":"default",this.beforeSelectionChange=t.beforeSelectionChangeCallback,this.afterSelectionChange=t.afterSelectionChangeCallback,this.offsetTop=this.rowIndex*t.rowHeight,this.rowDisplayIndex=0};I.prototype.setSelection=function(e){this.selectionProvider.setSelection(this,e),this.selectionProvider.lastClickedRow=this},I.prototype.continueSelection=function(e){this.selectionProvider.ChangeSelection(this,e)},I.prototype.ensureEntity=function(e){this.entity!==e&&(this.entity=e,this.selected=this.selectionProvider.getSelection(this.entity))},I.prototype.toggleSelected=function(e){if(!this.config.enableRowSelection&&!this.config.enableCellSelection)return!0;var t=e.target||e;return"checkbox"===t.type&&"ngSelectionCell ng-scope"!==t.parentElement.className?!0:this.config.selectWithCheckboxOnly&&"checkbox"!==t.type?(this.selectionProvider.lastClickedRow=this,!0):(this.beforeSelectionChange(this,e)&&this.continueSelection(e),!1)},I.prototype.alternatingRowClass=function(){var e=0===this.rowIndex%2,t={ngRow:!0,selected:this.selected,even:e,odd:!e,"ui-state-default":this.config.jqueryUITheme&&e,"ui-state-active":this.config.jqueryUITheme&&!e};return t},I.prototype.getProperty=function(e){return this.utils.evalProperty(this.entity,e)},I.prototype.copy=function(){return this.clone=new I(this.entity,this.config,this.selectionProvider,this.rowIndex,this.utils),this.clone.isClone=!0,this.clone.elm=this.elm,this.clone.orig=this,this.clone},I.prototype.setVars=function(e){e.clone=this,this.entity=e.entity,this.selected=e.selected,this.orig=e};var R=function(e,t,o,i,r){var g=this;g.aggCache={},g.parentCache=[],g.dataChanged=!0,g.parsedData=[],g.rowConfig={},g.selectionProvider=t.selectionProvider,g.rowHeight=30,g.numberOfAggregates=0,g.groupedData=void 0,g.rowHeight=e.config.rowHeight,g.rowConfig={enableRowSelection:e.config.enableRowSelection,rowClasses:e.config.rowClasses,selectedItems:t.selectedItems,selectWithCheckboxOnly:e.config.selectWithCheckboxOnly,beforeSelectionChangeCallback:e.config.beforeSelectionChange,afterSelectionChangeCallback:e.config.afterSelectionChange,jqueryUITheme:e.config.jqueryUITheme,enableCellSelection:e.config.enableCellSelection,rowHeight:e.config.rowHeight},g.renderedRange=new P(0,e.minRowsToRender()+n),g.buildEntityRow=function(e,t){return new I(e,g.rowConfig,g.selectionProvider,t,r)},g.buildAggregateRow=function(t,n){var o=g.aggCache[t.aggIndex];return o||(o=new w(t,g,g.rowConfig.rowHeight,e.config.groupsCollapsedByDefault),g.aggCache[t.aggIndex]=o),o.rowIndex=n,o.offsetTop=n*g.rowConfig.rowHeight,o},g.UpdateViewableRange=function(e){g.renderedRange=e,g.renderedChange()},g.filteredRowsChanged=function(){e.lateBoundColumns&&e.filteredRows.length>0&&(e.config.columnDefs=void 0,e.buildColumns(),e.lateBoundColumns=!1,t.$evalAsync(function(){t.adjustScrollLeft(0)})),g.dataChanged=!0,e.config.groups.length>0&&g.getGrouping(e.config.groups),g.UpdateViewableRange(g.renderedRange)},g.renderedChange=function(){if(!g.groupedData||1>e.config.groups.length)return g.renderedChangeNoGroups(),e.refreshDomSizes(),void 0;g.wasGrouped=!0,g.parentCache=[];var t=0,n=g.parsedData.filter(function(e){return e.isAggRow?e.parent&&e.parent.collapsed?!1:!0:(e[s]||(e.rowIndex=t++),!e[s])});g.totalRows=n.length;for(var o=[],i=g.renderedRange.topRow;g.renderedRange.bottomRow>i;i++)n[i]&&(n[i].offsetTop=i*e.config.rowHeight,o.push(n[i]));e.setRenderedRows(o)},g.renderedChangeNoGroups=function(){for(var t=[],n=g.renderedRange.topRow;g.renderedRange.bottomRow>n;n++)e.filteredRows[n]&&(e.filteredRows[n].rowIndex=n,e.filteredRows[n].offsetTop=n*e.config.rowHeight,t.push(e.filteredRows[n]));e.setRenderedRows(t)},g.fixRowCache=function(){var t=e.data.length,n=t-e.rowCache.length;if(0>n)e.rowCache.length=e.rowMap.length=t;else for(var o=e.rowCache.length;t>o;o++)e.rowCache[o]=e.rowFactory.buildEntityRow(e.data[o],o)},g.parseGroupData=function(e){if(e.values)for(var t=0;e.values.length>t;t++)g.parentCache[g.parentCache.length-1].children.push(e.values[t]),g.parsedData.push(e.values[t]);else for(var n in e)if(n!==l&&n!==a&&n!==c&&e.hasOwnProperty(n)){var o=g.buildAggregateRow({gField:e[l],gLabel:n,gDepth:e[a],isAggRow:!0,_ng_hidden_:!1,children:[],aggChildren:[],aggIndex:g.numberOfAggregates,aggLabelFilter:e[c].aggLabelFilter},0);g.numberOfAggregates++,o.parent=g.parentCache[o.depth-1],o.parent&&(o.parent.collapsed=!1,o.parent.aggChildren.push(o)),g.parsedData.push(o),g.parentCache[o.depth]=o,g.parseGroupData(e[n])}},g.getGrouping=function(n){function d(e,t){return e.filter(function(e){return e.field===t})}g.aggCache=[],g.numberOfAggregates=0,g.groupedData={};for(var u=e.filteredRows,f=n.length,h=t.columns,p=0;u.length>p;p++){var m=u[p].entity;if(!m)return;u[p][s]=e.config.groupsCollapsedByDefault;for(var v=g.groupedData,w=0;n.length>w;w++){var b=n[w],S=d(h,b)[0],x=r.evalProperty(m,b);x=x?""+x:"null",v[x]||(v[x]={}),v[l]||(v[l]=b),v[a]||(v[a]=w),v[c]||(v[c]=S),v=v[x]}v.values||(v.values=[]),v.values.push(u[p])}if(h.length>0)for(var y=0;n.length>y;y++)!h[y].isAggCol&&f>=y&&h.splice(0,0,new C({colDef:{field:"",width:25,sortable:!1,resizable:!1,headerCellTemplate:'<div class="ngAggHeader"></div>',pinned:e.config.pinSelectionCheckbox},enablePinning:e.config.enablePinning,isAggCol:!0,headerRowHeight:e.config.headerRowHeight},t,e,o,i,r));e.fixColumnIndexes(),t.adjustScrollLeft(0),g.parsedData.length=0,g.parseGroupData(g.groupedData),g.fixRowCache()},e.config.groups.length>0&&e.filteredRows.length>0&&g.getGrouping(e.config.groups)},$=function(e,n,o){var i=this,r=[];i.extFilter=n.config.filterOptions.useExternalFilter,e.showFilter=n.config.showFilter,e.filterText="",i.fieldMap={};var l=function(e,t,n){var i;for(var r in t)if(t.hasOwnProperty(r)){var a=n[r.toLowerCase()];if(!a)continue;var s=t[r];if("object"==typeof s)return l(e,s,a);var c=null,g=null;if(a&&a.cellFilter&&(g=a.cellFilter.split(":"),c=o(g[0])),null!==s&&void 0!==s){if("function"==typeof c){var d=""+c(s,g[1]);i=e.regex.test(d)}else i=e.regex.test(""+s);if(i)return!0}}return!1},a=function(e,t){var n,r=i.fieldMap[e.columnDisplay];if(!r)return!1;var l=r.cellFilter.split(":"),a=r.cellFilter?o(l[0]):null,s=t[e.column]||t[r.field.split(".")[0]];if(null===s||void 0===s)return!1;if("function"==typeof a){var g=""+a("object"==typeof s?c(s,r.field):s,l[1]);n=e.regex.test(g)}else n=e.regex.test("object"==typeof s?""+c(s,r.field):""+s);return n?!0:!1},s=function(e){for(var t=0,n=r.length;n>t;t++){var o,s=r[t];if(o=s.column?a(s,e):l(s,e,i.fieldMap),!o)return!1}return!0};i.evalFilter=function(){n.filteredRows=0===r.length?n.rowCache:n.rowCache.filter(function(e){return s(e.entity)});for(var e=0;n.filteredRows.length>e;e++)n.filteredRows[e].rowIndex=e;n.rowFactory.filteredRowsChanged()};var c=function(e,t){if("object"!=typeof e||"string"!=typeof t)return e;var n=t.split("."),o=e;if(n.length>1){for(var i=1,r=n.length;r>i;i++)if(o=o[n[i]],!o)return e;return o}return e},g=function(e,t){try{return RegExp(e,t)}catch(n){return RegExp(e.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\\|\||\.|\*|\+|\?)/g,"\\$1"))}},d=function(e){r=[];var n;if(n=t.trim(e))for(var o=n.split(";"),i=0;o.length>i;i++){var l=o[i].split(":");if(l.length>1){var a=t.trim(l[0]),s=t.trim(l[1]);a&&s&&r.push({column:a,columnDisplay:a.replace(/\s+/g,"").toLowerCase(),regex:g(s,"i")})}else{var c=t.trim(l[0]);c&&r.push({column:"",regex:g(c,"i")})}}};i.extFilter||e.$watch("columns",function(e){for(var t=0;e.length>t;t++){var n=e[t];if(n.field)if(n.field.match(/\./g)){for(var o=n.field.split("."),r=i.fieldMap,l=0;o.length-1>l;l++)r[o[l]]=r[o[l]]||{},r=r[o[l]];r[o[o.length-1]]=n}else i.fieldMap[n.field.toLowerCase()]=n;n.displayName&&(i.fieldMap[n.displayName.toLowerCase().replace(/\s+/g,"")]=n)}}),e.$watch(function(){return n.config.filterOptions.filterText},function(t){e.filterText=t}),e.$watch("filterText",function(t){i.extFilter||(e.$emit("ngGridEventFilter",t),d(t),i.evalFilter())})},D=function(e,t,n){var o=this;o.multi=e.config.multiSelect,o.selectedItems=e.config.selectedItems,o.selectedIndex=e.config.selectedIndex,o.lastClickedRow=void 0,o.ignoreSelectedItemChanges=!1,o.pKeyParser=n(e.config.primaryKey),o.ChangeSelection=function(n,i){var r=i.which||i.keyCode,l=40===r||38===r;if(i&&i.shiftKey&&!i.keyCode&&o.multi&&e.config.enableRowSelection){if(o.lastClickedRow){var a;a=t.configGroups.length>0?e.rowFactory.parsedData.filter(function(e){return!e.isAggRow}):e.filteredRows;var s=n.rowIndex,c=o.lastClickedRowIndex;if(s===c)return!1;c>s?(s^=c,c=s^c,s^=c,s--):c++;for(var g=[];s>=c;c++)g.push(a[c]);if(g[g.length-1].beforeSelectionChange(g,i)){for(var d=0;g.length>d;d++){var u=g[d],f=u.selected;u.selected=!f,u.clone&&(u.clone.selected=u.selected);var h=o.selectedItems.indexOf(u.entity);-1===h?o.selectedItems.push(u.entity):o.selectedItems.splice(h,1)}g[g.length-1].afterSelectionChange(g,i)}return o.lastClickedRow=n,o.lastClickedRowIndex=n.rowIndex,!0}}else o.multi?(!i.keyCode||l&&!e.config.selectWithCheckboxOnly)&&o.setSelection(n,!n.selected):o.lastClickedRow===n?o.setSelection(o.lastClickedRow,e.config.keepLastSelected?!0:!n.selected):(o.lastClickedRow&&o.setSelection(o.lastClickedRow,!1),o.setSelection(n,!n.selected));return o.lastClickedRow=n,o.lastClickedRowIndex=n.rowIndex,!0},o.getSelection=function(t){var n=!1;if(e.config.primaryKey){var i=o.pKeyParser(t);angular.forEach(o.selectedItems,function(e){i===o.pKeyParser(e)&&(n=!0)})}else n=-1!==o.selectedItems.indexOf(t);return n},o.setSelection=function(t,n){if(e.config.enableRowSelection){if(n)-1===o.selectedItems.indexOf(t.entity)&&(!o.multi&&o.selectedItems.length>0&&o.toggleSelectAll(!1,!0),o.selectedItems.push(t.entity));else{var i=o.selectedItems.indexOf(t.entity);-1!==i&&o.selectedItems.splice(i,1)}t.selected=n,t.orig&&(t.orig.selected=n),t.clone&&(t.clone.selected=n),t.afterSelectionChange(t)}},o.toggleSelectAll=function(t,n,i){var r=i?e.filteredRows:e.rowCache;if(n||e.config.beforeSelectionChange(r,t)){var l=o.selectedItems.length;l>0&&(o.selectedItems.length=0);for(var a=0;r.length>a;a++)r[a].selected=t,r[a].clone&&(r[a].clone.selected=t),t&&o.selectedItems.push(r[a].entity);n||e.config.afterSelectionChange(r,t)}}},L=function(e,t){e.headerCellStyle=function(e){return{height:e.headerRowHeight+"px"}},e.rowStyle=function(t){var n={top:t.offsetTop+"px",height:e.rowHeight+"px"};return t.isAggRow&&(n.left=t.offsetLeft),n},e.canvasStyle=function(){return{height:t.maxCanvasHt+"px"}},e.headerScrollerStyle=function(){return{height:t.config.headerRowHeight+"px"}},e.topPanelStyle=function(){return{width:t.rootDim.outerWidth+"px",height:e.topPanelHeight()+"px"}},e.headerStyle=function(){return{width:t.rootDim.outerWidth+"px",height:t.config.headerRowHeight+"px"}},e.groupPanelStyle=function(){return{width:t.rootDim.outerWidth+"px",height:"32px"}},e.viewportStyle=function(){return{width:t.rootDim.outerWidth+"px",height:e.viewportDimHeight()+"px"}},e.footerStyle=function(){return{width:t.rootDim.outerWidth+"px",height:e.footerRowHeight+"px"}}};p.directive("ngCellHasFocus",["$domUtilityService",function(e){var t=function(t){t.isFocused=!0,e.digest(t),t.$broadcast("ngGridEventStartCellEdit"),t.$on("ngGridEventEndCellEdit",function(){t.isFocused=!1,e.digest(t)})};return function(e,n){var o=!1,i=!1;e.editCell=function(){e.enableCellEditOnFocus||setTimeout(function(){t(e,n)},0)},n.bind("mousedown",function(){return e.enableCellEditOnFocus?i=!0:n.focus(),!0}),n.bind("click",function(o){e.enableCellEditOnFocus&&(o.preventDefault(),i=!1,t(e,n))}),n.bind("focus",function(){return o=!0,e.enableCellEditOnFocus&&!i&&t(e,n),!0}),n.bind("blur",function(){return o=!1,!0}),n.bind("keydown",function(i){return e.enableCellEditOnFocus||(o&&37!==i.keyCode&&38!==i.keyCode&&39!==i.keyCode&&40!==i.keyCode&&9!==i.keyCode&&!i.shiftKey&&13!==i.keyCode&&t(e,n),o&&i.shiftKey&&i.keyCode>=65&&90>=i.keyCode&&t(e,n),27===i.keyCode&&n.focus()),!0})}}]),p.directive("ngCellText",function(){return function(e,t){t.bind("mouseover",function(e){e.preventDefault(),t.css({cursor:"text"})}),t.bind("mouseleave",function(e){e.preventDefault(),t.css({cursor:"default"})})}}),p.directive("ngCell",["$compile","$domUtilityService",function(e,t){var n={scope:!1,compile:function(){return{pre:function(t,n){var o,i=t.col.cellTemplate.replace(d,"row.entity."+t.col.field);t.col.enableCellEdit?(o=t.col.cellEditTemplate,o=o.replace(u,i),o=o.replace(f,t.col.editableCellTemplate.replace(d,"row.entity."+t.col.field))):o=i;var r=e(o)(t);t.enableCellSelection&&-1===r[0].className.indexOf("ngSelectionCell")&&(r[0].setAttribute("tabindex",0),r.addClass("ngCellElement")),n.append(r)},post:function(e,n){e.enableCellSelection&&e.domAccessProvider.selectionHandlers(e,n),e.$on("ngGridEventDigestCell",function(){t.digest(e)})}}}};return n}]),p.directive("ngEditCellIf",[function(){return{transclude:"element",priority:1e3,terminal:!0,restrict:"A",compile:function(e,t,n){return function(e,t,o){var i,r;e.$watch(o.ngEditCellIf,function(o){i&&(i.remove(),i=void 0),r&&(r.$destroy(),r=void 0),o&&(r=e.$new(),n(r,function(e){i=e,t.after(e)}))})}}}}]),p.directive("ngGridFooter",["$compile","$templateCache",function(e,t){var n={scope:!1,compile:function(){return{pre:function(n,o){0===o.children().length&&o.append(e(t.get(n.gridId+"footerTemplate.html"))(n))}}}};return n}]),p.directive("ngGridMenu",["$compile","$templateCache",function(e,t){var n={scope:!1,compile:function(){return{pre:function(n,o){0===o.children().length&&o.append(e(t.get(n.gridId+"menuTemplate.html"))(n))}}}};return n}]),p.directive("ngGrid",["$compile","$filter","$templateCache","$sortService","$domUtilityService","$utilityService","$timeout","$parse","$http","$q",function(e,n,o,i,r,l,a,s,c,g){var d={scope:!0,compile:function(){return{pre:function(d,u,f){var h=t(u),p=d.$eval(f.ngGrid);p.gridDim=new b({outerHeight:t(h).height(),outerWidth:t(h).width()});var m=new T(d,p,i,r,n,o,l,a,s,c,g);return m.init().then(function(){if("string"==typeof p.columnDefs?d.$parent.$watch(p.columnDefs,function(e){return e?(m.lateBoundColumns=!1,d.columns=[],m.config.columnDefs=e,m.buildColumns(),m.eventProvider.assignEvents(),r.RebuildGrid(d,m),void 0):(m.refreshDomSizes(),m.buildColumns(),void 0)},!0):m.buildColumns(),"string"==typeof p.totalServerItems?d.$parent.$watch(p.totalServerItems,function(e){d.totalServerItems=angular.isDefined(e)?e:0}):d.totalServerItems=0,"string"==typeof p.data){var n=function(e){m.data=t.extend([],e),m.rowFactory.fixRowCache(),angular.forEach(m.data,function(e,t){var n=m.rowMap[t]||t;m.rowCache[n]&&m.rowCache[n].ensureEntity(e),m.rowMap[n]=t}),m.searchProvider.evalFilter(),m.configureColumnWidths(),m.refreshDomSizes(),m.config.sortInfo.fields.length>0&&(m.sortColumnsInit(),d.$emit("ngGridEventSorted",m.config.sortInfo)),d.$emit("ngGridEventData",m.gridId)};d.$parent.$watch(p.data,n),d.$parent.$watch(p.data+".length",function(){n(d.$eval(p.data))})}return m.footerController=new y(d,m),u.addClass("ngGrid").addClass(""+m.gridId),p.enableHighlighting||u.addClass("unselectable"),p.jqueryUITheme&&u.addClass("ui-widget"),u.append(e(o.get("gridTemplate.html"))(d)),r.AssignGridContainers(d,u,m),m.eventProvider=new x(m,d,r,a),p.selectRow=function(e,t){m.rowCache[e]&&(m.rowCache[e].clone&&m.rowCache[e].clone.setSelection(t?!0:!1),m.rowCache[e].setSelection(t?!0:!1))},p.selectItem=function(e,t){p.selectRow(m.rowMap[e],t)},p.selectAll=function(e){d.toggleSelectAll(e)},p.selectVisible=function(e){d.toggleSelectAll(e,!0)},p.groupBy=function(e){if(e)d.groupBy(d.columns.filter(function(t){return t.field===e})[0]);else{var n=t.extend(!0,[],d.configGroups);angular.forEach(n,d.groupBy)}},p.sortBy=function(e){var t=d.columns.filter(function(t){return t.field===e})[0];t&&t.sort()},p.gridId=m.gridId,p.ngGrid=m,p.$gridScope=d,p.$gridServices={SortService:i,DomUtilityService:r,UtilityService:l},d.$on("ngGridEventDigestGrid",function(){r.digest(d.$parent)}),d.$on("ngGridEventDigestGridParent",function(){r.digest(d.$parent)}),d.$evalAsync(function(){d.adjustScrollLeft(0)}),angular.forEach(p.plugins,function(e){"function"==typeof e&&(e=new e),e.init(d.$new(),m,p.$gridServices),p.plugins[l.getInstanceType(e)]=e}),"function"==typeof p.init&&p.init(m,d),null})}}}};return d}]),p.directive("ngHeaderCell",["$compile",function(e){var t={scope:!1,compile:function(){return{pre:function(t,n){n.append(e(t.col.headerCellTemplate)(t))}}}};return t}]),p.directive("ngInput",[function(){return{require:"ngModel",link:function(e,t,n,o){var i,r=e.$watch("ngModel",function(){i=o.$modelValue,r()});t.bind("keydown",function(n){switch(n.keyCode){case 37:case 38:case 39:case 40:n.stopPropagation();break;case 27:e.$$phase||e.$apply(function(){o.$setViewValue(i),t.blur()});break;case 13:(e.enableCellEditOnFocus&&e.totalFilteredItemsLength()-1>e.row.rowIndex&&e.row.rowIndex>0||e.enableCellEdit)&&t.blur()}return!0}),t.bind("click",function(e){e.stopPropagation()}),t.bind("mousedown",function(e){e.stopPropagation()}),e.$on("ngGridEventStartCellEdit",function(){t.focus(),t.select()}),angular.element(t).bind("blur",function(){e.$emit("ngGridEventEndCellEdit")})}}}]),p.directive("ngRow",["$compile","$domUtilityService","$templateCache",function(e,t,n){var o={scope:!1,compile:function(){return{pre:function(o,i){if(o.row.elm=i,o.row.clone&&(o.row.clone.elm=i),o.row.isAggRow){var r=n.get(o.gridId+"aggregateTemplate.html");r=o.row.aggLabelFilter?r.replace(g,"| "+o.row.aggLabelFilter):r.replace(g,""),i.append(e(r)(o))}else i.append(e(n.get(o.gridId+"rowTemplate.html"))(o));o.$on("ngGridEventDigestRow",function(){t.digest(o)})}}}};return o}]),p.directive("ngViewport",[function(){return function(e,t){var n,o,i=0;t.bind("scroll",function(t){var r=t.target.scrollLeft,l=t.target.scrollTop;return e.$headerContainer&&e.$headerContainer.scrollLeft(r),e.adjustScrollLeft(r),e.adjustScrollTop(l),e.$root.$$phase||e.$digest(),o=r,i=l,n=!1,!0}),t.bind("mousewheel DOMMouseScroll",function(){return n=!0,t.focus&&t.focus(),!0}),e.enableCellSelection||e.domAccessProvider.selectionHandlers(e,t)}}]),e.ngGrid.i18n.da={ngAggregateLabel:"artikler",ngGroupPanelDescription:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil.",ngSearchPlaceHolder:"Søg...",ngMenuText:"Vælg kolonner:",ngShowingItemsLabel:"Viste rækker:",ngTotalItemsLabel:"Rækker totalt:",ngSelectedItemsLabel:"Valgte rækker:",ngPageSizeLabel:"Side størrelse:",ngPagerFirstTitle:"Første side",ngPagerNextTitle:"Næste side",ngPagerPrevTitle:"Forrige side",ngPagerLastTitle:"Sidste side"},e.ngGrid.i18n.de={ngAggregateLabel:"artikel",ngGroupPanelDescription:"Ziehen Sie eine Spaltenüberschrift hier und legen Sie es der Gruppe nach dieser Spalte.",ngSearchPlaceHolder:"Suche...",ngMenuText:"Spalten auswählen:",ngShowingItemsLabel:"Zeige Artikel:",ngTotalItemsLabel:"Meiste Artikel:",ngSelectedItemsLabel:"Ausgewählte Artikel:",ngPageSizeLabel:"Größe Seite:",ngPagerFirstTitle:"Erste Page",ngPagerNextTitle:"Nächste Page",ngPagerPrevTitle:"Vorherige Page",ngPagerLastTitle:"Letzte Page"},e.ngGrid.i18n.en={ngAggregateLabel:"items",ngGroupPanelDescription:"Drag a column header here and drop it to group by that column.",ngSearchPlaceHolder:"Search...",ngMenuText:"Choose Columns:",ngShowingItemsLabel:"Showing Items:",ngTotalItemsLabel:"Total Items:",ngSelectedItemsLabel:"Selected Items:",ngPageSizeLabel:"Page Size:",ngPagerFirstTitle:"First Page",ngPagerNextTitle:"Next Page",ngPagerPrevTitle:"Previous Page",ngPagerLastTitle:"Last Page"},e.ngGrid.i18n.es={ngAggregateLabel:"Artículos",ngGroupPanelDescription:"Arrastre un encabezado de columna aquí y soltarlo para agrupar por esa columna.",ngSearchPlaceHolder:"Buscar...",ngMenuText:"Elegir columnas:",ngShowingItemsLabel:"Artículos Mostrando:",ngTotalItemsLabel:"Artículos Totales:",ngSelectedItemsLabel:"Artículos Seleccionados:",ngPageSizeLabel:"Tamaño de Página:",ngPagerFirstTitle:"Primera Página",ngPagerNextTitle:"Página Siguiente",ngPagerPrevTitle:"Página Anterior",ngPagerLastTitle:"Última Página"},e.ngGrid.i18n.fr={ngAggregateLabel:"articles",ngGroupPanelDescription:"Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne.",ngSearchPlaceHolder:"Recherche...",ngMenuText:"Choisir des colonnes:",ngShowingItemsLabel:"Articles Affichage des:",ngTotalItemsLabel:"Nombre total d'articles:",ngSelectedItemsLabel:"Éléments Articles:",ngPageSizeLabel:"Taille de page:",ngPagerFirstTitle:"Première page",ngPagerNextTitle:"Page Suivante",ngPagerPrevTitle:"Page précédente",ngPagerLastTitle:"Dernière page"},e.ngGrid.i18n["pt-br"]={ngAggregateLabel:"items",ngGroupPanelDescription:"Arraste e solte uma coluna aqui para agrupar por essa coluna",ngSearchPlaceHolder:"Procurar...",ngMenuText:"Selecione as colunas:",ngShowingItemsLabel:"Mostrando os Items:",ngTotalItemsLabel:"Total de Items:",ngSelectedItemsLabel:"Items Selecionados:",ngPageSizeLabel:"Tamanho da Página:",ngPagerFirstTitle:"Primeira Página",ngPagerNextTitle:"Próxima Página",ngPagerPrevTitle:"Página Anterior",ngPagerLastTitle:"Última Página"},e.ngGrid.i18n["zh-cn"]={ngAggregateLabel:"条目",ngGroupPanelDescription:"拖曳表头到此处以进行分组",ngSearchPlaceHolder:"搜索...",ngMenuText:"数据分组与选择列:",ngShowingItemsLabel:"当前显示条目:",ngTotalItemsLabel:"条目总数:",ngSelectedItemsLabel:"选中条目:",ngPageSizeLabel:"每页显示数:",ngPagerFirstTitle:"回到首页",ngPagerNextTitle:"下一页",ngPagerPrevTitle:"上一页",ngPagerLastTitle:"前往尾页"},e.ngGrid.i18n["zh-tw"]={ngAggregateLabel:"筆",ngGroupPanelDescription:"拖拉表頭到此處以進行分組",ngSearchPlaceHolder:"搜尋...",ngMenuText:"選擇欄位:",ngShowingItemsLabel:"目前顯示筆數:",ngTotalItemsLabel:"總筆數:",ngSelectedItemsLabel:"選取筆數:",ngPageSizeLabel:"每頁顯示:",ngPagerFirstTitle:"第一頁",ngPagerNextTitle:"下一頁",ngPagerPrevTitle:"上一頁",ngPagerLastTitle:"最後頁"},angular.module("ngGrid").run(["$templateCache",function(e){e.put("aggregateTemplate.html",'<div ng-click="row.toggleExpand()" ng-style="rowStyle(row)" class="ngAggregate"> <span class="ngAggregateText">{{row.label CUSTOM_FILTERS}} ({{row.totalChildren()}} {{AggItemsLabel}})</span> <div class="{{row.aggClass()}}"></div></div>'),e.put("cellEditTemplate.html",'<div ng-cell-has-focus ng-dblclick="editCell()"> <div ng-edit-cell-if="!isFocused"> DISPLAY_CELL_TEMPLATE </div> <div ng-edit-cell-if="isFocused"> EDITABLE_CELL_TEMPLATE </div></div>'),e.put("cellTemplate.html",'<div class="ngCellText" ng-class="col.colIndex()"><span ng-cell-text>{{COL_FIELD CUSTOM_FILTERS}}</span></div>'),e.put("checkboxCellTemplate.html",'<div class="ngSelectionCell"><input tabindex="-1" class="ngSelectionCheckbox" type="checkbox" ng-checked="row.selected" /></div>'),e.put("checkboxHeaderTemplate.html",'<input class="ngSelectionHeader" type="checkbox" ng-show="multiSelect" ng-model="allSelected" ng-change="toggleSelectAll(allSelected, true)"/>'),e.put("editableCellTemplate.html",'<input ng-class="\'colt\' + col.index" ng-input="COL_FIELD" ng-model="COL_FIELD" />'),e.put("footerTemplate.html",'<div ng-show="showFooter" class="ngFooterPanel" ng-class="{\'ui-widget-content\': jqueryUITheme, \'ui-corner-bottom\': jqueryUITheme}" ng-style="footerStyle()"> <div class="ngTotalSelectContainer" > <div class="ngFooterTotalItems" ng-class="{\'ngNoMultiSelect\': !multiSelect}" > <span class="ngLabel">{{i18n.ngTotalItemsLabel}} {{maxRows()}}</span><span ng-show="filterText.length > 0" class="ngLabel">({{i18n.ngShowingItemsLabel}} {{totalFilteredItemsLength()}})</span> </div> <div class="ngFooterSelectedItems" ng-show="multiSelect"> <span class="ngLabel">{{i18n.ngSelectedItemsLabel}} {{selectedItems.length}}</span> </div> </div> <div class="ngPagerContainer" style="float: right; margin-top: 10px;" ng-show="enablePaging" ng-class="{\'ngNoMultiSelect\': !multiSelect}"> <div style="float:left; margin-right: 10px;" class="ngRowCountPicker"> <span style="float: left; margin-top: 3px;" class="ngLabel">{{i18n.ngPageSizeLabel}}</span> <select style="float: left;height: 27px; width: 100px" ng-model="pagingOptions.pageSize" > <option ng-repeat="size in pagingOptions.pageSizes">{{size}}</option> </select> </div> <div style="float:left; margin-right: 10px; line-height:25px;" class="ngPagerControl" style="float: left; min-width: 135px;"> <button class="ngPagerButton" ng-click="pageToFirst()" ng-disabled="cantPageBackward()" title="{{i18n.ngPagerFirstTitle}}"><div class="ngPagerFirstTriangle"><div class="ngPagerFirstBar"></div></div></button> <button class="ngPagerButton" ng-click="pageBackward()" ng-disabled="cantPageBackward()" title="{{i18n.ngPagerPrevTitle}}"><div class="ngPagerFirstTriangle ngPagerPrevTriangle"></div></button> <input class="ngPagerCurrent" min="1" max="{{maxPages()}}" type="number" style="width:50px; height: 24px; margin-top: 1px; padding: 0 4px;" ng-model="pagingOptions.currentPage"/> <button class="ngPagerButton" ng-click="pageForward()" ng-disabled="cantPageForward()" title="{{i18n.ngPagerNextTitle}}"><div class="ngPagerLastTriangle ngPagerNextTriangle"></div></button> <button class="ngPagerButton" ng-click="pageToLast()" ng-disabled="cantPageToLast()" title="{{i18n.ngPagerLastTitle}}"><div class="ngPagerLastTriangle"><div class="ngPagerLastBar"></div></div></button> </div> </div></div>'),e.put("gridTemplate.html",'<div class="ngTopPanel" ng-class="{\'ui-widget-header\':jqueryUITheme, \'ui-corner-top\': jqueryUITheme}" ng-style="topPanelStyle()"> <div class="ngGroupPanel" ng-show="showGroupPanel()" ng-style="groupPanelStyle()"> <div class="ngGroupPanelDescription" ng-show="configGroups.length == 0">{{i18n.ngGroupPanelDescription}}</div> <ul ng-show="configGroups.length > 0" class="ngGroupList"> <li class="ngGroupItem" ng-repeat="group in configGroups"> <span class="ngGroupElement"> <span class="ngGroupName">{{group.displayName}} <span ng-click="removeGroup($index)" class="ngRemoveGroup">x</span> </span> <span ng-hide="$last" class="ngGroupArrow"></span> </span> </li> </ul> </div> <div class="ngHeaderContainer" ng-style="headerStyle()"> <div class="ngHeaderScroller" ng-style="headerScrollerStyle()" ng-include="gridId + \'headerRowTemplate.html\'"></div> </div> <div ng-grid-menu></div></div><div class="ngViewport" unselectable="on" ng-viewport ng-class="{\'ui-widget-content\': jqueryUITheme}" ng-style="viewportStyle()"> <div class="ngCanvas" ng-style="canvasStyle()"> <div ng-style="rowStyle(row)" ng-repeat="row in renderedRows" ng-click="row.toggleSelected($event)" ng-class="row.alternatingRowClass()" ng-row></div> </div></div><div ng-grid-footer></div>'),e.put("headerCellTemplate.html",'<div class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{\'cursor\': col.cursor}" ng-class="{ \'ngSorted\': !noSortVisible }"> <div ng-click="col.sort($event)" ng-class="\'colt\' + col.index" class="ngHeaderText">{{col.displayName}}</div> <div class="ngSortButtonDown" ng-show="col.showSortButtonDown()"></div> <div class="ngSortButtonUp" ng-show="col.showSortButtonUp()"></div> <div class="ngSortPriority">{{col.sortPriority}}</div> <div ng-class="{ ngPinnedIcon: col.pinned, ngUnPinnedIcon: !col.pinned }" ng-click="togglePin(col)" ng-show="col.pinnable"></div></div><div ng-show="col.resizable" class="ngHeaderGrip" ng-click="col.gripClick($event)" ng-mousedown="col.gripOnMouseDown($event)"></div>'),e.put("headerRowTemplate.html",'<div ng-style="{ height: col.headerRowHeight }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngHeaderCell"> <div class="ngVerticalBar" ng-style="{height: col.headerRowHeight}" ng-class="{ ngVerticalBarVisible: !$last }"> </div> <div ng-header-cell></div></div>'),e.put("menuTemplate.html",'<div ng-show="showColumnMenu || showFilter" class="ngHeaderButton" ng-click="toggleShowMenu()"> <div class="ngHeaderButtonArrow"></div></div><div ng-show="showMenu" class="ngColMenu"> <div ng-show="showFilter"> <input placeholder="{{i18n.ngSearchPlaceHolder}}" type="text" ng-model="filterText"/> </div> <div ng-show="showColumnMenu"> <span class="ngMenuText">{{i18n.ngMenuText}}</span> <ul class="ngColList"> <li class="ngColListItem" ng-repeat="col in columns | ngColumns"> <label><input ng-disabled="col.pinned" type="checkbox" class="ngColListCheckbox" ng-model="col.visible"/>{{col.displayName}}</label> <a title="Group By" ng-class="col.groupedByClass()" ng-show="col.groupable && col.visible" ng-click="groupBy(col)"></a> <span class="ngGroupingNumber" ng-show="col.groupIndex > 0">{{col.groupIndex}}</span> </li> </ul> </div></div>'),e.put("rowTemplate.html",'<div ng-style="{ \'cursor\': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}"> <div class="ngVerticalBar" ng-style="{height: rowHeight}" ng-class="{ ngVerticalBarVisible: !$last }"> </div> <div ng-cell></div></div>')}])})(window,jQuery); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7.min.css b/src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7.min.css new file mode 100644 index 0000000..d967316 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/ng-grid-2.0.7.min.css @@ -0,0 +1 @@ +.ngGrid{background-color:#fdfdfd}.ngGrid input[type="checkbox"]{margin:0;padding:0}.ngGrid input{vertical-align:top}.ngGrid.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.ngViewport{overflow:auto;min-height:20px}.ngViewport:focus{outline:0}.ngCanvas{position:relative}.ngVerticalBar{position:absolute;right:0;width:0}.ngVerticalBarVisible{width:1px;background-color:#d4d4d4}.ngHeaderContainer{position:relative;overflow:hidden;font-weight:bold;background-color:inherit}.ngHeaderCell{position:absolute;top:0;bottom:0;background-color:inherit}.ngHeaderCell.pinned{z-index:1}.ngHeaderSortColumn{position:absolute;overflow:hidden}.ngTopPanel{position:relative;z-index:1;background-color:#eaeaea;border-bottom:1px solid #d4d4d4}.ngSortButtonDown{position:absolute;top:3px;left:0;right:0;margin-left:auto;margin-right:auto;border-color:gray transparent;border-style:solid;border-width:0 5px 5px 5px;height:0;width:0}.ngNoSort{cursor:default}.ngHeaderButton{position:absolute;right:2px;top:8px;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;width:14px;height:14px;z-index:1;background-color:#9fbbb4;cursor:pointer}.ngSortButtonUp{position:absolute;top:3px;left:0;right:0;margin-left:auto;margin-right:auto;border-color:gray transparent;border-style:solid;border-width:5px 5px 0 5px;height:0;width:0}.ngHeaderScroller{position:absolute;background-color:inherit}.ngSortPriority{position:absolute;top:-5px;left:1px;font-size:6pt;font-weight:bold}.ngHeaderGrip{cursor:col-resize;width:10px;right:-5px;top:0;height:100%;position:absolute;background-color:transparent}.ngHeaderText{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.ngHeaderButtonArrow{position:absolute;top:4px;left:3px;width:0;height:0;border-style:solid;border-width:6.5px 4.5px 0 4.5px;border-color:#4d4d4d transparent transparent transparent}.ngPinnedIcon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAmElEQVQoU33PQapBURjA8UtkwJuaWYGSgfQWYBMvczPmTCzAAGVuaA228BZhRCkDGSmE31FucuRfvzq3vr5zT/JSjSU7DsypEPXDkDVn2hSIytJhw4kWGaLCxgHh2gt/RBuLzNhz5caWPjnSqqw4EraFfwznf8qklWjwy4IRTerkiQoPGtPl40OehcEJvcfXl8LglLfBJLkDcMgbgHlHhK8AAAAASUVORK5CYII=);background-repeat:no-repeat;position:absolute;right:5px;top:5px;height:10px;width:10px}.ngUnPinnedIcon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAlElEQVQoU33PPQrCQBRF4fFnI2KfZVi5ARvdgo1l6mwmkCJVOgluwd5OwUoDtnoOxAei8cLXTN7cvEl/skCNDCMPfsUPO5zQwOHIDEvYtMURHe6wOVLgigvOePRyeDkyR4ln7wZ//7XfFBu8B23+aDJjrHGAwza7hjtHJvDmHg7b7Bru7AMjK7Rw2ObBVHDY5oGk9AKQNB2zy8MBTgAAAABJRU5ErkJggg==);background-repeat:no-repeat;position:absolute;height:10px;width:10px;right:5px;top:5px}.ngColMenu{right:2px;padding:5px;top:25px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#bdd0cb;position:absolute;border:2px solid #d4d4d4;z-index:1}.ngColListCheckbox{position:relative;right:3px;top:4px}.ngColList{list-style-type:none}.ngColListItem{position:relative;right:17px;top:2px;white-space:nowrap}.ngMenuText{position:relative;top:2px;left:2px}.ngGroupPanel{background-color:#eaeaea;overflow:hidden;border-bottom:1px solid #d4d4d4}.ngGroupPanelDescription{margin-top:5px;margin-left:5px}.ngGroupList{list-style-type:none;margin:0;padding:0}.ngAggHeader{position:absolute;border:0}.ngGroupElement{float:left;height:100%;width:100%}.ngGroupIcon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAEFJREFUKFNjoAhISkr+h2J5JDZODNXGwGBsbPwfhIGAA8bGh6HaGBiAGhxAGJmND4M1gQCSM0adCsVQbcPcqQwMALWDGyDvWPefAAAAAElFTkSuQmCC);background-repeat:no-repeat;height:15px;width:15px;position:absolute;right:-2px;top:2px}.ngGroupedByIcon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAElJREFUKFNjoAhISkr+R8LyaHwMDNXGwGBsbPwfhoGAA5mPDUO1oWpE52PDYE0gALTFAYbR+dgwWBMIoPlh1I9ADNU2NPzIwAAAFQYI9E4OLvEAAAAASUVORK5CYII=);background-repeat:no-repeat;height:15px;width:15px;position:absolute;right:-2px;top:2px}.ngGroupName{background-color:#fdfdfd;border:1px solid #d4d4d4;padding:3px 10px;float:left;margin-left:0;margin-top:2px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;font-weight:bold}.ngGroupArrow{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid black;margin-top:10px;margin-left:5px;margin-right:5px;float:right}.ngGroupingNumber{position:absolute;right:-10px;top:-2px}.ngAggArrowCollapsed{position:absolute;left:8px;bottom:10px;width:0;height:0;border-style:solid;border-width:5px 0 5px 8.7px;border-color:transparent transparent transparent #000}.ngGroupItem{float:left}.ngGroupItem:first-child{margin-left:2px}.ngRemoveGroup{width:5px;-moz-opacity:.4;opacity:.4;margin-top:-1px;margin-left:5px}.ngRemoveGroup:hover{color:black;text-decoration:none;cursor:pointer;-moz-opacity:.7;opacity:.7}.ngAggArrowExpanded{position:absolute;left:8px;bottom:10px;width:0;height:0;border-style:solid;border-width:0 0 9px 9px;border-color:transparent transparent #000 transparent}.ngAggregate{position:absolute;background-color:#c9dde1;border-bottom:1px solid beige;overflow:hidden;top:0;bottom:0;right:-1px;left:0}.ngAggregateText{position:absolute;left:27px;top:5px;line-height:20px;white-space:nowrap}.ngRow{position:absolute;border-bottom:1px solid #d4d4d4}.ngRow.odd{background-color:#fdfdfd}.ngRow.even{background-color:#f3f3f3}.ngRow.selected{background-color:#c9dde1}.ngCell{overflow:hidden;position:absolute;top:0;bottom:0;background-color:inherit}.ngCell.pinned{z-index:1}.ngCellText{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.ngSelectionCell{margin-top:9px;margin-left:6px}.ngSelectionHeader{position:absolute;top:11px;left:6px}.ngCellElement:focus{outline:0;background-color:#b3c4c7}.ngRow.canSelect{cursor:pointer}.ngSelectionCheckbox{margin-top:9px;margin-left:6px}.ngFooterPanel{background-color:#eaeaea;padding:0;border-top:1px solid #d4d4d4;position:relative}.nglabel{display:block;float:left;font-weight:bold;padding-right:5px}.ngTotalSelectContainer{float:left;margin:5px;margin-top:7px}.ngFooterSelectedItems{padding:2px}.ngFooterTotalItems.ngnoMultiSelect{padding:0!important}.ngPagerFirstBar{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-left:-3px}.ngPagerButton{height:25px;min-width:26px}.ngPagerFirstTriangle{width:0;height:0;border-style:solid;border-width:5px 8.7px 5px 0;border-color:transparent #4d4d4d transparent transparent;margin-left:2px}.ngPagerNextTriangle{margin-left:1px}.ngPagerPrevTriangle{margin-left:0}.ngPagerLastTriangle{width:0;height:0;border-style:solid;border-width:5px 0 5px 8.7px;border-color:transparent transparent transparent #4d4d4d;margin-left:-1px}.ngPagerLastBar{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-left:1px}.ngFooterTotalItems{padding:2px} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/path_parser.js b/src/main/resources/static/activiti-editor/editor-app/libs/path_parser.js new file mode 100644 index 0000000..0711437 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/path_parser.js @@ -0,0 +1,30 @@ +/***** +* +* The contents of this file were written by Kevin Lindsey +* copyright 2002-2003 Kevin Lindsey +* +* This file was compacted by jscompact +* A Perl utility written by Kevin Lindsey (kevin@kevlindev.com) +* +*****/ + +Svg.VERSION=1.0; +Svg.NAMESPACE="http://www.w3.org/2000/svg"; +function Svg(){} +PathParser.PARAMCOUNT={A:7,C:6,H:1,L:2,M:2,Q:4,S:4,T:2,V:1,Z:0}; +PathParser.METHODNAME={A:"arcAbs",a:"arcRel",C:"curvetoCubicAbs",c:"curvetoCubicRel",H:"linetoHorizontalAbs",h:"linetoHorizontalRel",L:"linetoAbs",l:"linetoRel",M:"movetoAbs",m:"movetoRel",Q:"curvetoQuadraticAbs",q:"curvetoQuadraticRel",S:"curvetoCubicSmoothAbs",s:"curvetoCubicSmoothRel",T:"curvetoQuadraticSmoothAbs",t:"curvetoQuadraticSmoothRel",V:"linetoVerticalAbs",v:"linetoVerticalRel",Z:"closePath",z:"closePath"} +function PathParser(){this._lexer=new PathLexer();this._handler=null;} +PathParser.prototype.parsePath=function(path){if(path==null||path.namespaceURI!=Svg.NAMESPACE||path.localName!="path")throw new Error("PathParser.parsePath: The first parameter must be an SVG path element");this.parseData(path.getAttributeNS(null,"d"));}; +PathParser.prototype.parseData=function(pathData){if(typeof(pathData)!="string")throw new Error("PathParser.parseData: The first parameter must be a string");if(this._handler!=null&&this._handler.beginParse!=null)this._handler.beginParse();var lexer=this._lexer;lexer.setPathData(pathData);var mode="BOP";var token=lexer.getNextToken();while(!token.typeis(PathToken.EOD)){var param_count;var params=new Array();switch(token.type){case PathToken.COMMAND:if(mode=="BOP"&&token.text!="M"&&token.text!="m")throw new Error("PathParser.parseData: a path must begin with a moveto command");mode=token.text;param_count=PathParser.PARAMCOUNT[token.text.toUpperCase()];token=lexer.getNextToken();break;case PathToken.NUMBER:break;default:throw new Error("PathParser.parseData: unrecognized token type: "+token.type);}for(var i=0;i<param_count;i++){switch(token.type){case PathToken.COMMAND:throw new Error("PathParser.parseData: parameter must be a number: "+token.text);case PathToken.NUMBER:params[i]=token.text-0;break;default:throw new Errot("PathParser.parseData: unrecognized token type: "+token.type);}token=lexer.getNextToken();}if(this._handler!=null){var handler=this._handler;var method=PathParser.METHODNAME[mode];if(handler[method]!=null)handler[method].apply(handler,params);}if(mode=="M")mode="L";if(mode=="m")mode="l";}}; +PathParser.prototype.setHandler=function(handler){this._handler=handler;}; +PathLexer.VERSION=1.0; +function PathLexer(pathData){if(pathData==null)pathData="";this.setPathData(pathData);} +PathLexer.prototype.setPathData=function(pathData){if(typeof(pathData)!="string")throw new Error("PathLexer.setPathData: The first parameter must be a string");this._pathData=pathData;}; +PathLexer.prototype.getNextToken=function(){var result=null;var d=this._pathData;while(result==null){if(d==null||d==""){result=new PathToken(PathToken.EOD,"");}else if(d.match(/^([ \t\r\n,]+)/)){d=d.substr(RegExp.$1.length);}else if(d.match(/^([AaCcHhLlMmQqSsTtVvZz])/)){result=new PathToken(PathToken.COMMAND,RegExp.$1);d=d.substr(RegExp.$1.length);}else if(d.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){result=new PathToken(PathToken.NUMBER,parseFloat(RegExp.$1));d=d.substr(RegExp.$1.length);}else{throw new Error("PathLexer.getNextToken: unrecognized path data "+d);}}this._pathData=d;return result;}; +PathToken.UNDEFINED=0; +PathToken.COMMAND=1; +PathToken.NUMBER=2; +PathToken.EOD=3; +function PathToken(type,text){if(arguments.length>0){this.init(type,text);}} +PathToken.prototype.init=function(type,text){this.type=type;this.text=text;}; +PathToken.prototype.typeis=function(type){return this.type==type;} \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/prototype-1.5.1.js b/src/main/resources/static/activiti-editor/editor-app/libs/prototype-1.5.1.js new file mode 100644 index 0000000..b3f19f4 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/prototype-1.5.1.js @@ -0,0 +1,3272 @@ +/* Prototype JavaScript framework, version 1.5.1 + * (c) 2005-2007 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://www.prototypejs.org/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.5.1', + + Browser: { + IE: !!(window.attachEvent && !window.opera), + Opera: !!window.opera, + WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1 + }, + + BrowserFeatures: { + XPath: !!document.evaluate, + ElementExtensions: !!window.HTMLElement, + SpecificElementExtensions: + (document.createElement('div').__proto__ !== + document.createElement('form').__proto__) + }, + + ScriptFragment: '<script[^>]*>([\u0001-\uFFFF]*?)</script>', + JSONFilter: /^\/\*-secure-\s*(.*)\s*\*\/\s*$/, + + emptyFunction: function() { }, + K: function(x) { return x } +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.extend(Object, { + inspect: function(object) { + try { + if (object === undefined) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + }, + + toJSON: function(object) { + var type = typeof object; + switch(type) { + case 'undefined': + case 'function': + case 'unknown': return; + case 'boolean': return object.toString(); + } + if (object === null) return 'null'; + if (object.toJSON) return object.toJSON(); + if (object.ownerDocument === document) return; + var results = []; + for (var property in object) { + var value = Object.toJSON(object[property]); + if (value !== undefined) + results.push(property.toJSON() + ': ' + value); + } + return '{' + results.join(', ') + '}'; + }, + + keys: function(object) { + var keys = []; + for (var property in object) + keys.push(property); + return keys; + }, + + values: function(object) { + var values = []; + for (var property in object) + values.push(object[property]); + return values; + }, + + clone: function(object) { + return Object.extend({}, object); + } +}); + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [event || window.event].concat(args)); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + return this.toPaddedString(2, 16); + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + }, + + toPaddedString: function(length, radix) { + var string = this.toString(radix || 10); + return '0'.times(length - string.length) + string; + }, + + toJSON: function() { + return isFinite(this) ? this.toString() : 'null'; + } +}); + +Date.prototype.toJSON = function() { + return '"' + this.getFullYear() + '-' + + (this.getMonth() + 1).toPaddedString(2) + '-' + + this.getDate().toPaddedString(2) + 'T' + + this.getHours().toPaddedString(2) + ':' + + this.getMinutes().toPaddedString(2) + ':' + + this.getSeconds().toPaddedString(2) + '"'; +}; + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(this); + } finally { + this.currentlyExecuting = false; + } + } + } +} +Object.extend(String, { + interpret: function(value) { + return value == null ? '' : String(value); + }, + specialChar: { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '\\': '\\\\' + } +}); + +Object.extend(String.prototype, { + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + + sub: function(pattern, replacement, count) { + replacement = this.gsub.prepareReplacement(replacement); + count = count === undefined ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + }, + + scan: function(pattern, iterator) { + this.gsub(pattern, iterator); + return this; + }, + + truncate: function(length, truncation) { + length = length || 30; + truncation = truncation === undefined ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : this; + }, + + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(function(script) { return eval(script) }); + }, + + escapeHTML: function() { + var self = arguments.callee; + self.text.data = this; + return self.div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? (div.childNodes.length > 1 ? + $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : + div.childNodes[0].nodeValue) : ''; + }, + + toQueryParams: function(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return {}; + + return match[1].split(separator || '&').inject({}, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var key = decodeURIComponent(pair.shift()); + var value = pair.length > 1 ? pair.join('=') : pair[0]; + if (value != undefined) value = decodeURIComponent(value); + + if (key in hash) { + if (hash[key].constructor != Array) hash[key] = [hash[key]]; + hash[key].push(value); + } + else hash[key] = value; + } + return hash; + }); + }, + + toArray: function() { + return this.split(''); + }, + + succ: function() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + }, + + times: function(count) { + var result = ''; + for (var i = 0; i < count; i++) result += this; + return result; + }, + + camelize: function() { + var parts = this.split('-'), len = parts.length; + if (len == 1) return parts[0]; + + var camelized = this.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + + return camelized; + }, + + capitalize: function() { + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + }, + + underscore: function() { + return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); + }, + + dasherize: function() { + return this.gsub(/_/,'-'); + }, + + inspect: function(useDoubleQuotes) { + var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { + var character = String.specialChar[match[0]]; + return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); + }); + if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + }, + + toJSON: function() { + return this.inspect(true); + }, + + unfilterJSON: function(filter) { + return this.sub(filter || Prototype.JSONFilter, '#{1}'); + }, + + evalJSON: function(sanitize) { + var json = this.unfilterJSON(); + try { + if (!sanitize || (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json))) + return eval('(' + json + ')'); + } catch (e) { } + throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); + }, + + include: function(pattern) { + return this.indexOf(pattern) > -1; + }, + + startsWith: function(pattern) { + return this.indexOf(pattern) === 0; + }, + + endsWith: function(pattern) { + var d = this.length - pattern.length; + return d >= 0 && this.lastIndexOf(pattern) === d; + }, + + empty: function() { + return this == ''; + }, + + blank: function() { + return /^\s*$/.test(this); + } +}); + +if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, { + escapeHTML: function() { + return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + }, + unescapeHTML: function() { + return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); + } +}); + +String.prototype.gsub.prepareReplacement = function(replacement) { + if (typeof replacement == 'function') return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; +} + +String.prototype.parseQuery = String.prototype.toQueryParams; + +Object.extend(String.prototype.escapeHTML, { + div: document.createElement('div'), + text: document.createTextNode('') +}); + +with (String.prototype.escapeHTML) div.appendChild(text); + +var Template = Class.create(); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; +Template.prototype = { + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + return this.template.gsub(this.pattern, function(match) { + var before = match[1]; + if (before == '\\') return match[2]; + return before + String.interpret(object[match[3]]); + }); + } +} + +var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead'); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + iterator(value, index++); + }); + } catch (e) { + if (e != $break) + throw e; + } + return this; + }, + + eachSlice: function(number, iterator) { + var index = -number, slices = [], array = this.toArray(); + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.map(iterator); + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = false; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push((iterator || Prototype.K)(value, index)); + }); + return results; + }, + + detect: function(iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inGroupsOf: function(number, fillWith) { + fillWith = fillWith === undefined ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value >= result) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value < result) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.map(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.map(); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + }, + + size: function() { + return this.toArray().length; + }, + + inspect: function() { + return '#<Enumerable:' + this.toArray().inspect() + '>'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0, length = iterable.length; i < length; i++) + results.push(iterable[i]); + return results; + } +} + +if (Prototype.Browser.WebKit) { + $A = Array.from = function(iterable) { + if (!iterable) return []; + if (!(typeof iterable == 'function' && iterable == '[object NodeList]') && + iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0, length = iterable.length; i < length; i++) + results.push(iterable[i]); + return results; + } + } +} + +Object.extend(Array.prototype, Enumerable); + +if (!Array.prototype._reverse) + Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value && value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0, length = this.length; i < length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + reduce: function() { + return this.length > 1 ? this : this[0]; + }, + + uniq: function(sorted) { + return this.inject([], function(array, value, index) { + if (0 == index || (sorted ? array.last() != value : !array.include(value))) + array.push(value); + return array; + }); + }, + + clone: function() { + return [].concat(this); + }, + + size: function() { + return this.length; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + }, + + toJSON: function() { + var results = []; + this.each(function(object) { + var value = Object.toJSON(object); + if (value !== undefined) results.push(value); + }); + return '[' + results.join(', ') + ']'; + } +}); + +Array.prototype.toArray = Array.prototype.clone; + +function $w(string) { + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +if (Prototype.Browser.Opera){ + Array.prototype.concat = function() { + var array = []; + for (var i = 0, length = this.length; i < length; i++) array.push(this[i]); + for (var i = 0, length = arguments.length; i < length; i++) { + if (arguments[i].constructor == Array) { + for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) + array.push(arguments[i][j]); + } else { + array.push(arguments[i]); + } + } + return array; + } +} +var Hash = function(object) { + if (object instanceof Hash) this.merge(object); + else Object.extend(this, object || {}); +}; + +Object.extend(Hash, { + toQueryString: function(obj) { + var parts = []; + parts.add = arguments.callee.addPair; + + this.prototype._each.call(obj, function(pair) { + if (!pair.key) return; + var value = pair.value; + + if (value && typeof value == 'object') { + if (value.constructor == Array) value.each(function(value) { + parts.add(pair.key, value); + }); + return; + } + parts.add(pair.key, value); + }); + + return parts.join('&'); + }, + + toJSON: function(object) { + var results = []; + this.prototype._each.call(object, function(pair) { + var value = Object.toJSON(pair.value); + if (value !== undefined) results.push(pair.key.toJSON() + ': ' + value); + }); + return '{' + results.join(', ') + '}'; + } +}); + +Hash.toQueryString.addPair = function(key, value, prefix) { + key = encodeURIComponent(key); + if (value === undefined) this.push(key); + else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value))); +} + +Object.extend(Hash.prototype, Enumerable); +Object.extend(Hash.prototype, { + _each: function(iterator) { + for (var key in this) { + var value = this[key]; + if (value && value == Hash.prototype[key]) continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject(this, function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + remove: function() { + var result; + for(var i = 0, length = arguments.length; i < length; i++) { + var value = this[arguments[i]]; + if (value !== undefined){ + if (result === undefined) result = value; + else { + if (result.constructor != Array) result = [result]; + result.push(value) + } + } + delete this[arguments[i]]; + } + return result; + }, + + toQueryString: function() { + return Hash.toQueryString(this); + }, + + inspect: function() { + return '#<Hash:{' + this.map(function(pair) { + return pair.map(Object.inspect).join(': '); + }).join(', ') + '}>'; + }, + + toJSON: function() { + return Hash.toJSON(this); + } +}); + +function $H(object) { + if (object instanceof Hash) return object; + return new Hash(object); +}; + +// Safari iterates over shadowed properties +if (function() { + var i = 0, Test = function(value) { this.key = value }; + Test.prototype.key = 'foo'; + for (var property in new Test('bar')) i++; + return i > 1; +}()) Hash.prototype._each = function(iterator) { + var cache = []; + for (var key in this) { + var value = this[key]; + if ((value && value == Hash.prototype[key]) || cache.include(key)) continue; + cache.push(key); + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } +}; +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest()}, + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '' + } + Object.extend(this.options, options || {}); + + this.options.method = this.options.method.toLowerCase(); + if (typeof this.options.parameters == 'string') + this.options.parameters = this.options.parameters.toQueryParams(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + _complete: false, + + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = Object.clone(this.options.parameters); + + if (!['get', 'post'].include(this.method)) { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + this.parameters = params; + + if (params = Hash.toQueryString(params)) { + // when GET, append parameters to URL + if (this.method == 'get' || this.options.postBody) + this.url += (this.url.include('?') ? '&' : '?') + params; + else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + params += '&_='; + } + + try { + if (this.options.onCreate) this.options.onCreate(this.transport); + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) + setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + this.body = this.method == 'post' ? (this.options.postBody || params) : null; + this.transport.send(this.body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (typeof extras.push == 'function') + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + return !this.transport.status + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + this.transport.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + var contentType = this.getHeader('Content-type'); + if (contentType && contentType.strip(). + match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + state, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { return null } + }, + + evalJSON: function() { + try { + var json = this.getHeader('X-JSON'); + return json ? json.evalJSON() : null; + } catch (e) { return null } + }, + + evalResponse: function() { + try { + return eval((this.transport.responseText || '').unfilterJSON()); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, param) { + this.updateContent(); + onComplete(transport, param); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.container[this.success() ? 'success' : 'failure']; + var response = this.transport.responseText; + + if (!this.options.evalScripts) response = response.stripScripts(); + + if (receiver = $(receiver)) { + if (this.options.insertion) + new this.options.insertion(receiver, response); + else + receiver.update(response); + } + + if (this.success()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (typeof element == 'string') + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(query.snapshotItem(i)); + return results; + }; + + document.getElementsByClassName = function(className, parentElement) { + var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; + return document._getElementsByXPath(q, parentElement); + } + +} else document.getElementsByClassName = function(className, parentElement) { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + var elements = [], child; + for (var i = 0, length = children.length; i < length; i++) { + child = children[i]; + if (Element.hasClassName(child, className)) + elements.push(Element.extend(child)); + } + return elements; +}; + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) var Element = {}; + +Element.extend = function(element) { + var F = Prototype.BrowserFeatures; + if (!element || !element.tagName || element.nodeType == 3 || + element._extended || F.SpecificElementExtensions || element == window) + return element; + + var methods = {}, tagName = element.tagName, cache = Element.extend.cache, + T = Element.Methods.ByTag; + + // extend methods for all tags (Safari doesn't need this) + if (!F.ElementExtensions) { + Object.extend(methods, Element.Methods), + Object.extend(methods, Element.Methods.Simulated); + } + + // extend methods for specific tags + if (T[tagName]) Object.extend(methods, T[tagName]); + + for (var property in methods) { + var value = methods[property]; + if (typeof value == 'function' && !(property in element)) + element[property] = cache.findOrStore(value); + } + + element._extended = Prototype.emptyFunction; + return element; +}; + +Element.extend.cache = { + findOrStore: function(value) { + return this[value] = this[value] || function() { + return value.apply(null, [this].concat($A(arguments))); + } + } +}; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + hide: function(element) { + $(element).style.display = 'none'; + return element; + }, + + show: function(element) { + $(element).style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: function(element, html) { + html = typeof html == 'undefined' ? '' : html.toString(); + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + replace: function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + if (element.outerHTML) { + element.outerHTML = html.stripScripts(); + } else { + var range = element.ownerDocument.createRange(); + range.selectNodeContents(element); + element.parentNode.replaceChild( + range.createContextualFragment(html.stripScripts()), element); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), attribute = pair.last(); + var value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property) { + element = $(element); + var elements = []; + while (element = element[property]) + if (element.nodeType == 1) + elements.push(Element.extend(element)); + return elements; + }, + + ancestors: function(element) { + return $(element).recursivelyCollect('parentNode'); + }, + + descendants: function(element) { + return $A($(element).getElementsByTagName('*')).each(Element.extend); + }, + + firstDescendant: function(element) { + element = $(element).firstChild; + while (element && element.nodeType != 1) element = element.nextSibling; + return $(element); + }, + + immediateDescendants: function(element) { + if (!(element = $(element).firstChild)) return []; + while (element && element.nodeType != 1) element = element.nextSibling; + if (element) return [element].concat($(element).nextSiblings()); + return []; + }, + + previousSiblings: function(element) { + return $(element).recursivelyCollect('previousSibling'); + }, + + nextSiblings: function(element) { + return $(element).recursivelyCollect('nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return element.previousSiblings().reverse().concat(element.nextSiblings()); + }, + + match: function(element, selector) { + if (typeof selector == 'string') + selector = new Selector(selector); + return selector.match($(element)); + }, + + up: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(element.parentNode); + var ancestors = element.ancestors(); + return expression ? Selector.findElement(ancestors, expression, index) : + ancestors[index || 0]; + }, + + down: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return element.firstDescendant(); + var descendants = element.descendants(); + return expression ? Selector.findElement(descendants, expression, index) : + descendants[index || 0]; + }, + + previous: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); + var previousSiblings = element.previousSiblings(); + return expression ? Selector.findElement(previousSiblings, expression, index) : + previousSiblings[index || 0]; + }, + + next: function(element, expression, index) { + element = $(element); + if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); + var nextSiblings = element.nextSiblings(); + return expression ? Selector.findElement(nextSiblings, expression, index) : + nextSiblings[index || 0]; + }, + + getElementsBySelector: function() { + var args = $A(arguments), element = $(args.shift()); + return Selector.findChildElements(element, args); + }, + + getElementsByClassName: function(element, className) { + return document.getElementsByClassName(className, element); + }, + + readAttribute: function(element, name) { + element = $(element); + if (Prototype.Browser.IE) { + if (!element.attributes) return null; + var t = Element._attributeTranslations; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + var attribute = element.attributes[name]; + return attribute ? attribute.nodeValue : null; + } + return element.getAttribute(name); + }, + + getHeight: function(element) { + return $(element).getDimensions().height; + }, + + getWidth: function(element) { + return $(element).getDimensions().width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + if (elementClassName.length == 0) return false; + if (elementClassName == className || + (typeof(elementClassName.match) === 'function' && elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))) + return true; + return false; + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).add(className); + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).remove(className); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className); + return element; + }, + + observe: function() { + Event.observe.apply(Event, arguments); + return $A(arguments).first(); + }, + + stopObserving: function() { + Event.stopObserving.apply(Event, arguments); + return $A(arguments).first(); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.blank(); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + while (element = element.parentNode) + if (element == ancestor) return true; + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = Position.cumulativeOffset(element); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + style = style == 'float' ? 'cssFloat' : style.camelize(); + var value = element.style[style]; + if (!value) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } + if (style == 'opacity') return value ? parseFloat(value) : 1.0; + return value == 'auto' ? null : value; + }, + + getOpacity: function(element) { + return $(element).getStyle('opacity'); + }, + + setStyle: function(element, styles, camelized) { + element = $(element); + var elementStyle = element.style; + + for (var property in styles) + if (property == 'opacity') element.setOpacity(styles[property]) + else + elementStyle[(property == 'float' || property == 'cssFloat') ? + (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : + (camelized ? property : property.camelize())] = styles[property]; + + return element; + }, + + setOpacity: function(element, value) { + element = $(element); + element.style.opacity = (value == 1 || value === '') ? '' : + (value < 0.00001) ? 0 : value; + return element; + }, + + getDimensions: function(element) { + element = $(element); + var display = $(element).getStyle('display'); + if (display != 'none' && display != null) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = element.style.overflow || 'auto'; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + } +}; + +Object.extend(Element.Methods, { + childOf: Element.Methods.descendantOf, + childElements: Element.Methods.immediateDescendants +}); + +if (Prototype.Browser.Opera) { + Element.Methods._getStyle = Element.Methods.getStyle; + Element.Methods.getStyle = function(element, style) { + switch(style) { + case 'left': + case 'top': + case 'right': + case 'bottom': + if (Element._getStyle(element, 'position') == 'static') return null; + default: return Element._getStyle(element, style); + } + }; +} +else if (Prototype.Browser.IE) { + Element.Methods.getStyle = function(element, style) { + element = $(element); + style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); + var value = element.style[style]; + if (!value && element.currentStyle) value = element.currentStyle[style]; + + if (style == 'opacity') { + if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if (value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + + if (value == 'auto') { + if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) + return element['offset'+style.capitalize()] + 'px'; + return null; + } + return value; + }; + + Element.Methods.setOpacity = function(element, value) { + element = $(element); + var filter = element.getStyle('filter'), style = element.style; + if (value == 1 || value === '') { + style.filter = filter.replace(/alpha\([^\)]*\)/gi,''); + return element; + } else if (value < 0.00001) value = 0; + style.filter = filter.replace(/alpha\([^\)]*\)/gi, '') + + 'alpha(opacity=' + (value * 100) + ')'; + return element; + }; + + // IE is missing .innerHTML support for TABLE-related elements + Element.Methods.update = function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + var tagName = element.tagName.toUpperCase(); + if (['THEAD','TBODY','TR','TD'].include(tagName)) { + var div = document.createElement('div'); + switch (tagName) { + case 'THEAD': + case 'TBODY': + div.innerHTML = '<table><tbody>' + html.stripScripts() + '</tbody></table>'; + depth = 2; + break; + case 'TR': + div.innerHTML = '<table><tbody><tr>' + html.stripScripts() + '</tr></tbody></table>'; + depth = 3; + break; + case 'TD': + div.innerHTML = '<table><tbody><tr><td>' + html.stripScripts() + '</td></tr></tbody></table>'; + depth = 4; + } + $A(element.childNodes).each(function(node) { element.removeChild(node) }); + depth.times(function() { div = div.firstChild }); + $A(div.childNodes).each(function(node) { element.appendChild(node) }); + } else { + element.innerHTML = html.stripScripts(); + } + setTimeout(function() { html.evalScripts() }, 10); + return element; + } +} +else if (Prototype.Browser.Gecko) { + Element.Methods.setOpacity = function(element, value) { + element = $(element); + element.style.opacity = (value == 1) ? 0.999999 : + (value === '') ? '' : (value < 0.00001) ? 0 : value; + return element; + }; +} + +Element._attributeTranslations = { + names: { + colspan: "colSpan", + rowspan: "rowSpan", + valign: "vAlign", + datetime: "dateTime", + accesskey: "accessKey", + tabindex: "tabIndex", + enctype: "encType", + maxlength: "maxLength", + readonly: "readOnly", + longdesc: "longDesc" + }, + values: { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + title: function(element) { + var node = element.getAttributeNode('title'); + return node.specified ? node.nodeValue : null; + } + } +}; + +(function() { + Object.extend(this, { + href: this._getAttr, + src: this._getAttr, + type: this._getAttr, + disabled: this._flag, + checked: this._flag, + readonly: this._flag, + multiple: this._flag + }); +}).call(Element._attributeTranslations.values); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + var t = Element._attributeTranslations, node; + attribute = t.names[attribute] || attribute; + node = $(element).getAttributeNode(attribute); + return node && node.specified; + } +}; + +Element.Methods.ByTag = {}; + +Object.extend(Element, Element.Methods); + +if (!Prototype.BrowserFeatures.ElementExtensions && + document.createElement('div').__proto__) { + window.HTMLElement = {}; + window.HTMLElement.prototype = document.createElement('div').__proto__; + Prototype.BrowserFeatures.ElementExtensions = true; +} + +Element.hasAttribute = function(element, attribute) { + if (element.hasAttribute) return element.hasAttribute(attribute); + return Element.Methods.Simulated.hasAttribute(element, attribute); +}; + +Element.addMethods = function(methods) { + var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; + + if (!methods) { + Object.extend(Form, Form.Methods); + Object.extend(Form.Element, Form.Element.Methods); + Object.extend(Element.Methods.ByTag, { + "FORM": Object.clone(Form.Methods), + "INPUT": Object.clone(Form.Element.Methods), + "SELECT": Object.clone(Form.Element.Methods), + "TEXTAREA": Object.clone(Form.Element.Methods) + }); + } + + if (arguments.length == 2) { + var tagName = methods; + methods = arguments[1]; + } + + if (!tagName) Object.extend(Element.Methods, methods || {}); + else { + if (tagName.constructor == Array) tagName.each(extend); + else extend(tagName); + } + + function extend(tagName) { + tagName = tagName.toUpperCase(); + if (!Element.Methods.ByTag[tagName]) + Element.Methods.ByTag[tagName] = {}; + Object.extend(Element.Methods.ByTag[tagName], methods); + } + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + var cache = Element.extend.cache; + for (var property in methods) { + var value = methods[property]; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = cache.findOrStore(value); + } + } + + function findDOMClass(tagName) { + var klass; + var trans = { + "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", + "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", + "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", + "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", + "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": + "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": + "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": + "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": + "FrameSet", "IFRAME": "IFrame" + }; + if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName + 'Element'; + if (window[klass]) return window[klass]; + klass = 'HTML' + tagName.capitalize() + 'Element'; + if (window[klass]) return window[klass]; + + window[klass] = {}; + window[klass].prototype = document.createElement(tagName).__proto__; + return window[klass]; + } + + if (F.ElementExtensions) { + copy(Element.Methods, HTMLElement.prototype); + copy(Element.Methods.Simulated, HTMLElement.prototype, true); + } + + if (F.SpecificElementExtensions) { + for (var tag in Element.Methods.ByTag) { + var klass = findDOMClass(tag); + if (typeof klass == "undefined") continue; + copy(T[tag], klass.prototype); + } + } + + Object.extend(Element, Element.Methods); + delete Element.ByTag; +}; + +var Toggle = { display: Element.toggle }; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + var tagName = this.element.tagName.toUpperCase(); + if (['TBODY', 'TR'].include(tagName)) { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>'; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set($A(this).concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set($A(this).without(classNameToRemove).join(' ')); + }, + + toString: function() { + return $A(this).join(' '); + } +}; + +Object.extend(Element.ClassNames.prototype, Enumerable); +/* Portions of the Selector class are derived from Jack Slocum�۪s DomQuery, + * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style + * license. Please see http://www.yui-ext.com/ for more information. */ + +var Selector = Class.create(); + +Selector.prototype = { + initialize: function(expression) { + this.expression = expression.strip(); + this.compileMatcher(); + }, + + compileMatcher: function() { + // Selectors with namespaced attributes can't use the XPath version + if (Prototype.BrowserFeatures.XPath && !(/\[[\w-]*?:/).test(this.expression)) + return this.compileXPathMatcher(); + + var e = this.expression, ps = Selector.patterns, h = Selector.handlers, + c = Selector.criteria, le, p, m; + + if (Selector._cache[e]) { + this.matcher = Selector._cache[e]; return; + } + this.matcher = ["this.matcher = function(root) {", + "var r = root, h = Selector.handlers, c = false, n;"]; + + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i in ps) { + p = ps[i]; + if (m = e.match(p)) { + this.matcher.push(typeof c[i] == 'function' ? c[i](m) : + new Template(c[i]).evaluate(m)); + e = e.replace(m[0], ''); + break; + } + } + } + + this.matcher.push("return h.unique(n);\n}"); + eval(this.matcher.join('\n')); + Selector._cache[this.expression] = this.matcher; + }, + + compileXPathMatcher: function() { + var e = this.expression, ps = Selector.patterns, + x = Selector.xpath, le, m; + + if (Selector._cache[e]) { + this.xpath = Selector._cache[e]; return; + } + + this.matcher = ['.//*']; + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i in ps) { + if (m = e.match(ps[i])) { + this.matcher.push(typeof x[i] == 'function' ? x[i](m) : + new Template(x[i]).evaluate(m)); + e = e.replace(m[0], ''); + break; + } + } + } + + this.xpath = this.matcher.join(''); + Selector._cache[this.expression] = this.xpath; + }, + + findElements: function(root) { + root = root || document; + if (this.xpath) return document._getElementsByXPath(this.xpath, root); + return this.matcher(root); + }, + + match: function(element) { + return this.findElements(document).include(element); + }, + + toString: function() { + return this.expression; + }, + + inspect: function() { + return "#<Selector:" + this.expression.inspect() + ">"; + } +}; + +Object.extend(Selector, { + _cache: {}, + + xpath: { + descendant: "//*", + child: "/*", + adjacent: "/following-sibling::*[1]", + laterSibling: '/following-sibling::*', + tagName: function(m) { + if (m[1] == '*') return ''; + return "[local-name()='" + m[1].toLowerCase() + + "' or local-name()='" + m[1].toUpperCase() + "']"; + }, + className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", + id: "[@id='#{1}']", + attrPresence: "[@#{1}]", + attr: function(m) { + m[3] = m[5] || m[6]; + return new Template(Selector.xpath.operators[m[2]]).evaluate(m); + }, + pseudo: function(m) { + var h = Selector.xpath.pseudos[m[1]]; + if (!h) return ''; + if (typeof h === 'function') return h(m); + return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); + }, + operators: { + '=': "[@#{1}='#{3}']", + '!=': "[@#{1}!='#{3}']", + '^=': "[starts-with(@#{1}, '#{3}')]", + '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", + '*=': "[contains(@#{1}, '#{3}')]", + '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", + '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" + }, + pseudos: { + 'first-child': '[not(preceding-sibling::*)]', + 'last-child': '[not(following-sibling::*)]', + 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', + 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]", + 'checked': "[@checked]", + 'disabled': "[@disabled]", + 'enabled': "[not(@disabled)]", + 'not': function(m) { + var e = m[6], p = Selector.patterns, + x = Selector.xpath, le, m, v; + + var exclusion = []; + while (e && le != e && (/\S/).test(e)) { + le = e; + for (var i in p) { + if (m = e.match(p[i])) { + v = typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m); + exclusion.push("(" + v.substring(1, v.length - 1) + ")"); + e = e.replace(m[0], ''); + break; + } + } + } + return "[not(" + exclusion.join(" and ") + ")]"; + }, + 'nth-child': function(m) { + return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); + }, + 'nth-last-child': function(m) { + return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); + }, + 'nth-of-type': function(m) { + return Selector.xpath.pseudos.nth("position() ", m); + }, + 'nth-last-of-type': function(m) { + return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); + }, + 'first-of-type': function(m) { + m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m); + }, + 'last-of-type': function(m) { + m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); + }, + 'only-of-type': function(m) { + var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m); + }, + nth: function(fragment, m) { + var mm, formula = m[6], predicate; + if (formula == 'even') formula = '2n+0'; + if (formula == 'odd') formula = '2n+1'; + if (mm = formula.match(/^(\d+)$/)) // digit only + return '[' + fragment + "= " + mm[1] + ']'; + if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b + if (mm[1] == "-") mm[1] = -1; + var a = mm[1] ? Number(mm[1]) : 1; + var b = mm[2] ? Number(mm[2]) : 0; + predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + + "((#{fragment} - #{b}) div #{a} >= 0)]"; + return new Template(predicate).evaluate({ + fragment: fragment, a: a, b: b }); + } + } + } + }, + + criteria: { + tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', + className: 'n = h.className(n, r, "#{1}", c); c = false;', + id: 'n = h.id(n, r, "#{1}", c); c = false;', + attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;', + attr: function(m) { + m[3] = (m[5] || m[6]); + return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m); + }, + pseudo: function(m) { + if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); + return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); + }, + descendant: 'c = "descendant";', + child: 'c = "child";', + adjacent: 'c = "adjacent";', + laterSibling: 'c = "laterSibling";' + }, + + patterns: { + // combinators must be listed first + // (and descendant needs to be last combinator) + laterSibling: /^\s*~\s*/, + child: /^\s*>\s*/, + adjacent: /^\s*\+\s*/, + descendant: /^\s/, + + // selectors follow + tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, + id: /^#([\w\-\*]+)(\b|$)/, + className: /^\.([\w\-\*]+)(\b|$)/, + pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/, + attrPresence: /^\[([\w]+)\]/, + attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/ + }, + + handlers: { + // UTILITY FUNCTIONS + // joins two collections + concat: function(a, b) { + for (var i = 0, node; node = b[i]; i++) + a.push(node); + return a; + }, + + // marks an array of nodes for counting + mark: function(nodes) { + for (var i = 0, node; node = nodes[i]; i++) + node._counted = true; + return nodes; + }, + + unmark: function(nodes) { + for (var i = 0, node; node = nodes[i]; i++) + node._counted = undefined; + return nodes; + }, + + // mark each child node with its position (for nth calls) + // "ofType" flag indicates whether we're indexing for nth-of-type + // rather than nth-child + index: function(parentNode, reverse, ofType) { + parentNode._counted = true; + if (reverse) { + for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { + node = nodes[i]; + if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; + } + } else { + for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) + if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; + } + }, + + // filters out duplicates and extends all nodes + unique: function(nodes) { + if (nodes.length == 0) return nodes; + var results = [], n; + for (var i = 0, l = nodes.length; i < l; i++) + if (!(n = nodes[i])._counted) { + n._counted = true; + results.push(Element.extend(n)); + } + return Selector.handlers.unmark(results); + }, + + // COMBINATOR FUNCTIONS + descendant: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + h.concat(results, node.getElementsByTagName('*')); + return results; + }, + + child: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) { + for (var j = 0, children = [], child; child = node.childNodes[j]; j++) + if (child.nodeType == 1 && child.tagName != '!') results.push(child); + } + return results; + }, + + adjacent: function(nodes) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + var next = this.nextElementSibling(node); + if (next) results.push(next); + } + return results; + }, + + laterSibling: function(nodes) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + h.concat(results, Element.nextSiblings(node)); + return results; + }, + + nextElementSibling: function(node) { + while (node = node.nextSibling) + if (node.nodeType == 1) return node; + return null; + }, + + previousElementSibling: function(node) { + while (node = node.previousSibling) + if (node.nodeType == 1) return node; + return null; + }, + + // TOKEN FUNCTIONS + tagName: function(nodes, root, tagName, combinator) { + tagName = tagName.toUpperCase(); + var results = [], h = Selector.handlers; + if (nodes) { + if (combinator) { + // fastlane for ordinary descendant combinators + if (combinator == "descendant") { + for (var i = 0, node; node = nodes[i]; i++) + h.concat(results, node.getElementsByTagName(tagName)); + return results; + } else nodes = this[combinator](nodes); + if (tagName == "*") return nodes; + } + for (var i = 0, node; node = nodes[i]; i++) + if (node.tagName.toUpperCase() == tagName) results.push(node); + return results; + } else return root.getElementsByTagName(tagName); + }, + + id: function(nodes, root, id, combinator) { + var targetNode = $(id), h = Selector.handlers; + if (!nodes && root == document) return targetNode ? [targetNode] : []; + if (nodes) { + if (combinator) { + if (combinator == 'child') { + for (var i = 0, node; node = nodes[i]; i++) + if (targetNode.parentNode == node) return [targetNode]; + } else if (combinator == 'descendant') { + for (var i = 0, node; node = nodes[i]; i++) + if (Element.descendantOf(targetNode, node)) return [targetNode]; + } else if (combinator == 'adjacent') { + for (var i = 0, node; node = nodes[i]; i++) + if (Selector.handlers.previousElementSibling(targetNode) == node) + return [targetNode]; + } else nodes = h[combinator](nodes); + } + for (var i = 0, node; node = nodes[i]; i++) + if (node == targetNode) return [targetNode]; + return []; + } + return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; + }, + + className: function(nodes, root, className, combinator) { + if (nodes && combinator) nodes = this[combinator](nodes); + return Selector.handlers.byClassName(nodes, root, className); + }, + + byClassName: function(nodes, root, className) { + if (!nodes) nodes = Selector.handlers.descendant([root]); + var needle = ' ' + className + ' '; + for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { + nodeClassName = node.className; + if (nodeClassName.length == 0) continue; + if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) + results.push(node); + } + return results; + }, + + attrPresence: function(nodes, root, attr) { + var results = []; + for (var i = 0, node; node = nodes[i]; i++) + if (Element.hasAttribute(node, attr)) results.push(node); + return results; + }, + + attr: function(nodes, root, attr, value, operator) { + if (!nodes) nodes = root.getElementsByTagName("*"); + var handler = Selector.operators[operator], results = []; + for (var i = 0, node; node = nodes[i]; i++) { + var nodeValue = Element.readAttribute(node, attr); + if (nodeValue === null) continue; + if (handler(nodeValue, value)) results.push(node); + } + return results; + }, + + pseudo: function(nodes, name, value, root, combinator) { + if (nodes && combinator) nodes = this[combinator](nodes); + if (!nodes) nodes = root.getElementsByTagName("*"); + return Selector.pseudos[name](nodes, value, root); + } + }, + + pseudos: { + 'first-child': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (Selector.handlers.previousElementSibling(node)) continue; + results.push(node); + } + return results; + }, + 'last-child': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + if (Selector.handlers.nextElementSibling(node)) continue; + results.push(node); + } + return results; + }, + 'only-child': function(nodes, value, root) { + var h = Selector.handlers; + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) + results.push(node); + return results; + }, + 'nth-child': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root); + }, + 'nth-last-child': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, true); + }, + 'nth-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, false, true); + }, + 'nth-last-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, formula, root, true, true); + }, + 'first-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, "1", root, false, true); + }, + 'last-of-type': function(nodes, formula, root) { + return Selector.pseudos.nth(nodes, "1", root, true, true); + }, + 'only-of-type': function(nodes, formula, root) { + var p = Selector.pseudos; + return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); + }, + + // handles the an+b logic + getIndices: function(a, b, total) { + if (a == 0) return b > 0 ? [b] : []; + return $R(1, total).inject([], function(memo, i) { + if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); + return memo; + }); + }, + + // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type + nth: function(nodes, formula, root, reverse, ofType) { + if (nodes.length == 0) return []; + if (formula == 'even') formula = '2n+0'; + if (formula == 'odd') formula = '2n+1'; + var h = Selector.handlers, results = [], indexed = [], m; + h.mark(nodes); + for (var i = 0, node; node = nodes[i]; i++) { + if (!node.parentNode._counted) { + h.index(node.parentNode, reverse, ofType); + indexed.push(node.parentNode); + } + } + if (formula.match(/^\d+$/)) { // just a number + formula = Number(formula); + for (var i = 0, node; node = nodes[i]; i++) + if (node.nodeIndex == formula) results.push(node); + } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b + if (m[1] == "-") m[1] = -1; + var a = m[1] ? Number(m[1]) : 1; + var b = m[2] ? Number(m[2]) : 0; + var indices = Selector.pseudos.getIndices(a, b, nodes.length); + for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { + for (var j = 0; j < l; j++) + if (node.nodeIndex == indices[j]) results.push(node); + } + } + h.unmark(nodes); + h.unmark(indexed); + return results; + }, + + 'empty': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) { + // IE treats comments as element nodes + if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue; + results.push(node); + } + return results; + }, + + 'not': function(nodes, selector, root) { + var h = Selector.handlers, selectorType, m; + var exclusions = new Selector(selector).findElements(root); + h.mark(exclusions); + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!node._counted) results.push(node); + h.unmark(exclusions); + return results; + }, + + 'enabled': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (!node.disabled) results.push(node); + return results; + }, + + 'disabled': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (node.disabled) results.push(node); + return results; + }, + + 'checked': function(nodes, value, root) { + for (var i = 0, results = [], node; node = nodes[i]; i++) + if (node.checked) results.push(node); + return results; + } + }, + + operators: { + '=': function(nv, v) { return nv == v; }, + '!=': function(nv, v) { return nv != v; }, + '^=': function(nv, v) { return nv.startsWith(v); }, + '$=': function(nv, v) { return nv.endsWith(v); }, + '*=': function(nv, v) { return nv.include(v); }, + '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, + '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); } + }, + + matchElements: function(elements, expression) { + var matches = new Selector(expression).findElements(), h = Selector.handlers; + h.mark(matches); + for (var i = 0, results = [], element; element = elements[i]; i++) + if (element._counted) results.push(element); + h.unmark(matches); + return results; + }, + + findElement: function(elements, expression, index) { + if (typeof expression == 'number') { + index = expression; expression = false; + } + return Selector.matchElements(elements, expression || '*')[index || 0]; + }, + + findChildElements: function(element, expressions) { + var exprs = expressions.join(','), expressions = []; + exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { + expressions.push(m[1].strip()); + }); + var results = [], h = Selector.handlers; + for (var i = 0, l = expressions.length, selector; i < l; i++) { + selector = new Selector(expressions[i].strip()); + h.concat(results, selector.findElements(element)); + } + return (l > 1) ? h.unique(results) : results; + } +}); + +function $$() { + return Selector.findChildElements(document, $A(arguments)); +} +var Form = { + reset: function(form) { + $(form).reset(); + return form; + }, + + serializeElements: function(elements, getHash) { + var data = elements.inject({}, function(result, element) { + if (!element.disabled && element.name) { + var key = element.name, value = $(element).getValue(); + if (value != null) { + if (key in result) { + if (result[key].constructor != Array) result[key] = [result[key]]; + result[key].push(value); + } + else result[key] = value; + } + } + return result; + }); + + return getHash ? data : Hash.toQueryString(data); + } +}; + +Form.Methods = { + serialize: function(form, getHash) { + return Form.serializeElements(Form.getElements(form), getHash); + }, + + getElements: function(form) { + return $A($(form).getElementsByTagName('*')).inject([], + function(elements, child) { + if (Form.Element.Serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + } + ); + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + Form.getElements(form).invoke('disable'); + return form; + }, + + enable: function(form) { + form = $(form); + Form.getElements(form).invoke('enable'); + return form; + }, + + findFirstElement: function(form) { + return $(form).getElements().find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + form.findFirstElement().activate(); + return form; + }, + + request: function(form, options) { + form = $(form), options = Object.clone(options || {}); + + var params = options.parameters; + options.parameters = form.serialize(true); + + if (params) { + if (typeof params == 'string') params = params.toQueryParams(); + Object.extend(options.parameters, params); + } + + if (form.hasAttribute('method') && !options.method) + options.method = form.method; + + return new Ajax.Request(form.readAttribute('action'), options); + } +} + +/*--------------------------------------------------------------------------*/ + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +} + +Form.Element.Methods = { + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = {}; + pair[element.name] = value; + return Hash.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + try { + element.focus(); + if (element.select && (element.tagName.toLowerCase() != 'input' || + !['button', 'reset', 'submit'].include(element.type))) + element.select(); + } catch (e) {} + return element; + }, + + disable: function(element) { + element = $(element); + element.blur(); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.disabled = false; + return element; + } +} + +/*--------------------------------------------------------------------------*/ + +var Field = Form.Element; +var $F = Form.Element.Methods.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + default: + return Form.Element.Serializers.textarea(element); + } + }, + + inputSelector: function(element) { + return element.checked ? element.value : null; + }, + + textarea: function(element) { + return element.value; + }, + + select: function(element) { + return this[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var index = element.selectedIndex; + return index >= 0 ? this.optionValue(element.options[index]) : null; + }, + + selectMany: function(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(this.optionValue(opt)); + } + return values; + }, + + optionValue: function(opt) { + // extend element because hasAttribute may not be native + return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; + } +} + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + var changed = ('string' == typeof this.lastValue && 'string' == typeof value + ? this.lastValue != value : String(this.lastValue) != String(value)); + if (changed) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback.bind(this)); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + + element: function(event) { + return $(event.target || event.srcElement); + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0, length = Event.observers.length; i < length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (Prototype.Browser.WebKit || element.attachEvent)) + name = 'keydown'; + + Event._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (Prototype.Browser.WebKit || element.attachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + try { + element.detachEvent('on' + name, observer); + } catch (e) {} + } + } +}); + +/* prevent memory leaks in IE */ +if (Prototype.Browser.IE) + Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if(element.tagName=='BODY') break; + var p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent == document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + if (!window.opera || element.tagName=='BODY') { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.width = width + 'px'; + element.style.height = height + 'px'; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (Prototype.Browser.WebKit) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} + +Element.addMethods(); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/libs/ui-utils.min-0.0.4.js b/src/main/resources/static/activiti-editor/editor-app/libs/ui-utils.min-0.0.4.js new file mode 100644 index 0000000..897ffee --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/libs/ui-utils.min-0.0.4.js @@ -0,0 +1,7 @@ +/** + * angular-ui-utils - Swiss-Army-Knife of AngularJS tools (with no external dependencies!) + * @version v0.0.4 - 2013-08-28 + * @link http://angular-ui.github.com + * @license MIT License, http://www.opensource.org/licenses/MIT + */ +angular.module("ui.event",[]).directive("uiEvent",["$parse",function(a){return function(b,c,d){var e=b.$eval(d.uiEvent);angular.forEach(e,function(d,e){var f=a(d);c.bind(e,function(a){var c=Array.prototype.slice.call(arguments);c=c.splice(1),f(b,{$event:a,$params:c}),b.$$phase||b.$apply()})})}}]),angular.module("ui.format",[]).filter("format",function(){return function(a,b){var c=a;if(angular.isString(c)&&void 0!==b)if(angular.isArray(b)||angular.isObject(b)||(b=[b]),angular.isArray(b)){var d=b.length,e=function(a,c){return c=parseInt(c,10),c>=0&&d>c?b[c]:a};c=c.replace(/\$([0-9]+)/g,e)}else angular.forEach(b,function(a,b){c=c.split(":"+b).join(a)});return c}}),angular.module("ui.highlight",[]).filter("highlight",function(){return function(a,b,c){return b||angular.isNumber(b)?(a=a.toString(),b=b.toString(),c?a.split(b).join('<span class="ui-match">'+b+"</span>"):a.replace(new RegExp(b,"gi"),'<span class="ui-match">$&</span>')):a}}),angular.module("ui.include",[]).directive("uiInclude",["$http","$templateCache","$anchorScroll","$compile",function(a,b,c,d){return{restrict:"ECA",terminal:!0,compile:function(e,f){var g=f.uiInclude||f.src,h=f.fragment||"",i=f.onload||"",j=f.autoscroll;return function(e,f){function k(){var k=++m,o=e.$eval(g),p=e.$eval(h);o?a.get(o,{cache:b}).success(function(a){if(k===m){l&&l.$destroy(),l=e.$new();var b;b=p?angular.element("<div/>").html(a).find(p):angular.element("<div/>").html(a).contents(),f.html(b),d(b)(l),!angular.isDefined(j)||j&&!e.$eval(j)||c(),l.$emit("$includeContentLoaded"),e.$eval(i)}}).error(function(){k===m&&n()}):n()}var l,m=0,n=function(){l&&(l.$destroy(),l=null),f.html("")};e.$watch(h,k),e.$watch(g,k)}}}}]),angular.module("ui.indeterminate",[]).directive("uiIndeterminate",[function(){return{compile:function(a,b){return b.type&&"checkbox"===b.type.toLowerCase()?function(a,b,c){a.$watch(c.uiIndeterminate,function(a){b[0].indeterminate=!!a})}:angular.noop}}}]),angular.module("ui.inflector",[]).filter("inflector",function(){function a(a){return a.replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function b(a,b){return a.replace(/[A-Z]/g,function(a){return b+a})}var c={humanize:function(c){return a(b(c," ").split("_").join(" "))},underscore:function(a){return a.substr(0,1).toLowerCase()+b(a.substr(1),"_").toLowerCase().split(" ").join("_")},variable:function(b){return b=b.substr(0,1).toLowerCase()+a(b.split("_").join(" ")).substr(1).split(" ").join("")}};return function(a,b){return b!==!1&&angular.isString(a)?(b=b||"humanize",c[b](a)):a}}),angular.module("ui.jq",[]).value("uiJqConfig",{}).directive("uiJq",["uiJqConfig","$timeout",function(a,b){return{restrict:"A",compile:function(c,d){if(!angular.isFunction(c[d.uiJq]))throw new Error('ui-jq: The "'+d.uiJq+'" function does not exist');var e=a&&a[d.uiJq];return function(a,c,d){function f(){b(function(){c[d.uiJq].apply(c,g)},0,!1)}var g=[];d.uiOptions?(g=a.$eval("["+d.uiOptions+"]"),angular.isObject(e)&&angular.isObject(g[0])&&(g[0]=angular.extend({},e,g[0]))):e&&(g=[e]),d.ngModel&&c.is("select,input,textarea")&&c.bind("change",function(){c.trigger("input")}),d.uiRefresh&&a.$watch(d.uiRefresh,function(){f()}),f()}}}}]),angular.module("ui.keypress",[]).factory("keypressHelper",["$parse",function(a){var b={8:"backspace",9:"tab",13:"enter",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete"},c=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};return function(d,e,f,g){var h,i=[];h=e.$eval(g["ui"+c(d)]),angular.forEach(h,function(b,c){var d,e;e=a(b),angular.forEach(c.split(" "),function(a){d={expression:e,keys:{}},angular.forEach(a.split("-"),function(a){d.keys[a]=!0}),i.push(d)})}),f.bind(d,function(a){var c=!(!a.metaKey||a.ctrlKey),f=!!a.altKey,g=!!a.ctrlKey,h=!!a.shiftKey,j=a.keyCode;"keypress"===d&&!h&&j>=97&&122>=j&&(j-=32),angular.forEach(i,function(d){var i=d.keys[b[j]]||d.keys[j.toString()],k=!!d.keys.meta,l=!!d.keys.alt,m=!!d.keys.ctrl,n=!!d.keys.shift;i&&k===c&&l===f&&m===g&&n===h&&e.$apply(function(){d.expression(e,{$event:a})})})})}}]),angular.module("ui.keypress").directive("uiKeydown",["keypressHelper",function(a){return{link:function(b,c,d){a("keydown",b,c,d)}}}]),angular.module("ui.keypress").directive("uiKeypress",["keypressHelper",function(a){return{link:function(b,c,d){a("keypress",b,c,d)}}}]),angular.module("ui.keypress").directive("uiKeyup",["keypressHelper",function(a){return{link:function(b,c,d){a("keyup",b,c,d)}}}]),angular.module("ui.mask",[]).value("uiMaskConfig",{maskDefinitions:{9:/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/}}).directive("uiMask",["uiMaskConfig",function(a){return{priority:100,require:"ngModel",restrict:"A",compile:function(){var b=a;return function(a,c,d,e){function f(a){return angular.isDefined(a)?(s(a),N?(k(),l(),!0):j()):j()}function g(a){angular.isDefined(a)&&(D=a,N&&w())}function h(a){return N?(G=o(a||""),I=n(G),e.$setValidity("mask",I),I&&G.length?p(G):void 0):a}function i(a){return N?(G=o(a||""),I=n(G),e.$viewValue=G.length?p(G):"",e.$setValidity("mask",I),""===G&&void 0!==e.$error.required&&e.$setValidity("required",!1),I?G:void 0):a}function j(){return N=!1,m(),angular.isDefined(P)?c.attr("placeholder",P):c.removeAttr("placeholder"),angular.isDefined(Q)?c.attr("maxlength",Q):c.removeAttr("maxlength"),c.val(e.$modelValue),e.$viewValue=e.$modelValue,!1}function k(){G=K=o(e.$modelValue||""),H=J=p(G),I=n(G);var a=I&&G.length?H:"";d.maxlength&&c.attr("maxlength",2*B[B.length-1]),c.attr("placeholder",D),c.val(a),e.$viewValue=a}function l(){O||(c.bind("blur",t),c.bind("mousedown mouseup",u),c.bind("input keyup click focus",w),O=!0)}function m(){O&&(c.unbind("blur",t),c.unbind("mousedown",u),c.unbind("mouseup",u),c.unbind("input",w),c.unbind("keyup",w),c.unbind("click",w),c.unbind("focus",w),O=!1)}function n(a){return a.length?a.length>=F:!0}function o(a){var b="",c=C.slice();return a=a.toString(),angular.forEach(E,function(b){a=a.replace(b,"")}),angular.forEach(a.split(""),function(a){c.length&&c[0].test(a)&&(b+=a,c.shift())}),b}function p(a){var b="",c=B.slice();return angular.forEach(D.split(""),function(d,e){a.length&&e===c[0]?(b+=a.charAt(0)||"_",a=a.substr(1),c.shift()):b+=d}),b}function q(a){var b=d.placeholder;return"undefined"!=typeof b&&b[a]?b[a]:"_"}function r(){return D.replace(/[_]+/g,"_").replace(/([^_]+)([a-zA-Z0-9])([^_])/g,"$1$2_$3").split("_")}function s(a){var b=0;if(B=[],C=[],D="","string"==typeof a){F=0;var c=!1,d=a.split("");angular.forEach(d,function(a,d){R.maskDefinitions[a]?(B.push(b),D+=q(d),C.push(R.maskDefinitions[a]),b++,c||F++):"?"===a?c=!0:(D+=a,b++)})}B.push(B.slice().pop()+1),E=r(),N=B.length>1?!0:!1}function t(){L=0,M=0,I&&0!==G.length||(H="",c.val(""),a.$apply(function(){e.$setViewValue("")}))}function u(a){"mousedown"===a.type?c.bind("mouseout",v):c.unbind("mouseout",v)}function v(){M=A(this),c.unbind("mouseout",v)}function w(b){b=b||{};var d=b.which,f=b.type;if(16!==d&&91!==d){var g,h=c.val(),i=J,j=o(h),k=K,l=!1,m=y(this)||0,n=L||0,q=m-n,r=B[0],s=B[j.length]||B.slice().shift(),t=M||0,u=A(this)>0,v=t>0,w=h.length>i.length||t&&h.length>i.length-t,C=h.length<i.length||t&&h.length===i.length-t,D=d>=37&&40>=d&&b.shiftKey,E=37===d,F=8===d||"keyup"!==f&&C&&-1===q,G=46===d||"keyup"!==f&&C&&0===q&&!v,H=(E||F||"click"===f)&&m>r;if(M=A(this),!D&&(!u||"click"!==f&&"keyup"!==f)){if("input"===f&&C&&!v&&j===k){for(;F&&m>r&&!x(m);)m--;for(;G&&s>m&&-1===B.indexOf(m);)m++;var I=B.indexOf(m);j=j.substring(0,I)+j.substring(I+1),l=!0}for(g=p(j),J=g,K=j,c.val(g),l&&a.$apply(function(){e.$setViewValue(j)}),w&&r>=m&&(m=r+1),H&&m--,m=m>s?s:r>m?r:m;!x(m)&&m>r&&s>m;)m+=H?-1:1;(H&&s>m||w&&!x(n))&&m++,L=m,z(this,m)}}}function x(a){return B.indexOf(a)>-1}function y(a){if(void 0!==a.selectionStart)return a.selectionStart;if(document.selection){a.focus();var b=document.selection.createRange();return b.moveStart("character",-a.value.length),b.text.length}return 0}function z(a,b){if(0!==a.offsetWidth&&0!==a.offsetHeight)if(a.setSelectionRange)a.focus(),a.setSelectionRange(b,b);else if(a.createTextRange){var c=a.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",b),c.select()}}function A(a){return void 0!==a.selectionStart?a.selectionEnd-a.selectionStart:document.selection?document.selection.createRange().text.length:0}var B,C,D,E,F,G,H,I,J,K,L,M,N=!1,O=!1,P=d.placeholder,Q=d.maxlength,R={};d.uiOptions?(R=a.$eval("["+d.uiOptions+"]"),angular.isObject(R[0])&&(R=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]?angular.extend(b[c],a[c]):b[c]=angular.copy(a[c]));return b}(b,R[0]))):R=b,d.$observe("uiMask",f),d.$observe("placeholder",g),e.$formatters.push(h),e.$parsers.push(i),c.bind("mousedown mouseup",u),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!==d?d=0:0!==d&&1/0!==d&&d!==-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1})}}}}]),angular.module("ui.reset",[]).value("uiResetConfig",null).directive("uiReset",["uiResetConfig",function(a){var b=null;return void 0!==a&&(b=a),{require:"ngModel",link:function(a,c,d,e){var f;f=angular.element('<a class="ui-reset" />'),c.wrap('<span class="ui-resetwrap" />').after(f),f.bind("click",function(c){c.preventDefault(),a.$apply(function(){d.uiReset?e.$setViewValue(a.$eval(d.uiReset)):e.$setViewValue(b),e.$render()})})}}}]),angular.module("ui.route",[]).directive("uiRoute",["$location","$parse",function(a,b){return{restrict:"AC",scope:!0,compile:function(c,d){var e;if(d.uiRoute)e="uiRoute";else if(d.ngHref)e="ngHref";else{if(!d.href)throw new Error("uiRoute missing a route or href property on "+c[0]);e="href"}return function(c,d,f){function g(b){(hash=b.indexOf("#"))>-1&&(b=b.substr(hash+1)),j=function(){i(c,a.path().indexOf(b)>-1)},j()}function h(b){(hash=b.indexOf("#"))>-1&&(b=b.substr(hash+1)),j=function(){var d=new RegExp("^"+b+"$",["i"]);i(c,d.test(a.path()))},j()}var i=b(f.ngModel||f.routeModel||"$uiRoute").assign,j=angular.noop;switch(e){case"uiRoute":f.uiRoute?h(f.uiRoute):f.$observe("uiRoute",h);break;case"ngHref":f.ngHref?g(f.ngHref):f.$observe("ngHref",g);break;case"href":g(f.href)}c.$on("$routeChangeSuccess",function(){j()}),c.$on("$stateChangeSuccess",function(){j()})}}}}]),angular.module("ui.scrollfix",[]).directive("uiScrollfix",["$window",function(a){"use strict";return{require:"^?uiScrollfixTarget",link:function(b,c,d,e){var f=c[0].offsetTop,g=e&&e.$element||angular.element(a);d.uiScrollfix?"string"==typeof d.uiScrollfix&&("-"===d.uiScrollfix.charAt(0)?d.uiScrollfix=f-parseFloat(d.uiScrollfix.substr(1)):"+"===d.uiScrollfix.charAt(0)&&(d.uiScrollfix=f+parseFloat(d.uiScrollfix.substr(1)))):d.uiScrollfix=f,g.bind("scroll",function(){var b;if(angular.isDefined(a.pageYOffset))b=a.pageYOffset;else{var e=document.compatMode&&"BackCompat"!==document.compatMode?document.documentElement:document.body;b=e.scrollTop}!c.hasClass("ui-scrollfix")&&b>d.uiScrollfix?c.addClass("ui-scrollfix"):c.hasClass("ui-scrollfix")&&b<d.uiScrollfix&&c.removeClass("ui-scrollfix")})}}}]).directive("uiScrollfixTarget",[function(){"use strict";return{controller:function(a){this.$element=a}}}]),angular.module("ui.showhide",[]).directive("uiShow",[function(){return function(a,b,c){a.$watch(c.uiShow,function(a){a?b.addClass("ui-show"):b.removeClass("ui-show")})}}]).directive("uiHide",[function(){return function(a,b,c){a.$watch(c.uiHide,function(a){a?b.addClass("ui-hide"):b.removeClass("ui-hide")})}}]).directive("uiToggle",[function(){return function(a,b,c){a.$watch(c.uiToggle,function(a){a?b.removeClass("ui-hide").addClass("ui-show"):b.removeClass("ui-show").addClass("ui-hide")})}}]),angular.module("ui.unique",[]).filter("unique",["$parse",function(a){return function(b,c){if(c===!1)return b;if((c||angular.isUndefined(c))&&angular.isArray(b)){var d=[],e=angular.isString(c)?a(c):function(a){return a},f=function(a){return angular.isObject(a)?e(a):a};angular.forEach(b,function(a){for(var b=!1,c=0;c<d.length;c++)if(angular.equals(f(d[c]),f(a))){b=!0;break}b||d.push(a)}),b=d}return b}}]),angular.module("ui.validate",[]).directive("uiValidate",function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){function e(b){return angular.isString(b)?(a.$watch(b,function(){angular.forEach(g,function(a){a(d.$modelValue)})}),void 0):angular.isArray(b)?(angular.forEach(b,function(b){a.$watch(b,function(){angular.forEach(g,function(a){a(d.$modelValue)})})}),void 0):(angular.isObject(b)&&angular.forEach(b,function(b,c){angular.isString(b)&&a.$watch(b,function(){g[c](d.$modelValue)}),angular.isArray(b)&&angular.forEach(b,function(b){a.$watch(b,function(){g[c](d.$modelValue)})})}),void 0)}var f,g={},h=a.$eval(c.uiValidate);h&&(angular.isString(h)&&(h={validator:h}),angular.forEach(h,function(b,c){f=function(e){var f=a.$eval(b,{$value:e});return angular.isObject(f)&&angular.isFunction(f.then)?(f.then(function(){d.$setValidity(c,!0)},function(){d.$setValidity(c,!1)}),e):f?(d.$setValidity(c,!0),e):(d.$setValidity(c,!1),void 0)},g[c]=f,d.$formatters.push(f),d.$parsers.push(f)}),c.uiValidateWatch&&e(a.$eval(c.uiValidateWatch)))}}}),angular.module("ui.utils",["ui.event","ui.format","ui.highlight","ui.include","ui.indeterminate","ui.inflector","ui.jq","ui.keypress","ui.mask","ui.reset","ui.route","ui.scrollfix","ui.showhide","ui.unique","ui.validate"]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/partials/root-stencil-item-template.html b/src/main/resources/static/activiti-editor/editor-app/partials/root-stencil-item-template.html new file mode 100644 index 0000000..1e4f7ad --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/partials/root-stencil-item-template.html @@ -0,0 +1,11 @@ +<span class="stencil-item root-stencil-item" + id="{{group.id}}" + title="{{group.description}}" + ng-model="draggedElement" + data-drag="true" + jqyoui-draggable="{onStart:'startDragCallback', onDrag:'dragCallback'}" + data-jqyoui-options="{revert: 'invalid', helper: 'clone', opacity : 0.5}"> + + <img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{group.icon}}" width="16px;" height="16px;"/> + {{group.name}} +</span> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/partials/stencil-item-template.html b/src/main/resources/static/activiti-editor/editor-app/partials/stencil-item-template.html new file mode 100644 index 0000000..f032060 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/partials/stencil-item-template.html @@ -0,0 +1,27 @@ +<span ng-click="group.expanded = !group.expanded"> + <i class="glyphicon" + ng-class="{'glyphicon-chevron-right': !group.expanded, 'glyphicon-chevron-down': group.expanded}"></i> + {{group.name}} + </span> + +<!-- Child groups --> +<ul ng-repeat="group in group.groups" + class="stencil-group stencil-group-non-root" + ng-class="{collapsed: !group.expanded, 'first': $first}" + ng-include="'editor-app/partials/stencil-item-template.html?version=4'"> +</ul> + +<!-- Group items --> +<ul> + <li ng-repeat="item in group.paletteItems" class="stencil-item" + id="{{item.id}}" + title="{{item.description}}" + ng-model="draggedElement" + data-drag="true" + jqyoui-draggable="{onStart:'startDragCallback', onDrag:'dragCallback'}" + data-jqyoui-options="{revert: 'invalid', helper: 'clone', opacity : 0.5}"> + + <img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{item.icon}}" width="16px;" height="16px;"/> + {{item.name}} + </li> +</ul> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/plugins.xml b/src/main/resources/static/activiti-editor/editor-app/plugins.xml new file mode 100644 index 0000000..2517d86 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/plugins.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<config> + + <plugins> + <plugin source="version.js" name="" /> + <plugin source="signavio.js" name="Signavio.Plugins.Loading" /> + + <plugin source="loading.js" name="ORYX.Plugins.Loading" /> + <plugin source="canvasResize.js" name="ORYX.Plugins.CanvasResize"> + <notUsesIn namespace="http://b3mn.org/stencilset/xforms#"/> + </plugin> + + <plugin source="renameShapes.js" name="ORYX.Plugins.RenameShapes" /> + <plugin source="processLink.js" name="ORYX.Plugins.ProcessLink"> + <requires namespace="http://b3mn.org/stencilset/bpmn1.1#"/> + </plugin> + + <!-- following plugins don't require Ext --> + <plugin source="arrangement.js" name="ORYX.Plugins.Arrangement"> + <notUsesIn namespace="http://b3mn.org/stencilset/xforms#"/> + </plugin> + <plugin source="file.js" name="ORYX.Plugins.Save"/> + <plugin source="view.js" name="ORYX.Plugins.View" /> + <plugin source="dragdropresize.js" name="ORYX.Plugins.DragDropResize" /> + <plugin source="shapeHighlighting.js" name="ORYX.Plugins.HighlightingSelectedShapes" /> + <plugin source="dragDocker.js" name="ORYX.Plugins.DragDocker"> + <notUsesIn namespace="http://b3mn.org/stencilset/xforms#" /> + </plugin> + <plugin source="addDocker.js" name="ORYX.Plugins.AddDocker"> + <notUsesIn namespace="http://b3mn.org/stencilset/xforms#" /> + </plugin> + <plugin source="selectionframe.js" name="ORYX.Plugins.SelectionFrame"> + <notUsesIn namespace="http://b3mn.org/stencilset/xforms#" /> + </plugin> + <plugin source="shapeHighlighting.js" name="ORYX.Plugins.ShapeHighlighting" /> + <plugin source="overlay.js" name="ORYX.Plugins.Overlay" /> + <plugin source="keysMove.js" name="ORYX.Plugins.KeysMove" /> + <plugin source="Layouter/edgeLayouter.js" name="ORYX.Plugins.Layouter.EdgeLayouter" /> + + <!-- Begin: BPMN2.0 specific plugins --> + <plugin source="bpmn2.0/bpmn2.0.js" name="ORYX.Plugins.BPMN2_0"> + <requires namespace="http://b3mn.org/stencilset/bpmn2.0#" /> + </plugin> + + <!-- End: BPMN2.0 specific plugins --> + </plugins> + + <properties> + <property group="File" index="1" /> + <property group="Edit" index="2" /> + <property group="Undo" index="3" /> + <property group="Alignment" index="4" /> + <property group="Group" index="5" /> + <property group="Z-Order" index="6" /> + <property group="Docker" index="7" /> + <property group="Zoom" index="8" /> + </properties> +</config> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/popups/icon-template.html b/src/main/resources/static/activiti-editor/editor-app/popups/icon-template.html new file mode 100644 index 0000000..22eb12a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/popups/icon-template.html @@ -0,0 +1,3 @@ +<div class="ui-grid-cell-contents"> + <img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{row.entity.icon}}" /> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/popups/save-model.html b/src/main/resources/static/activiti-editor/editor-app/popups/save-model.html new file mode 100644 index 0000000..b031f1c --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/popups/save-model.html @@ -0,0 +1,41 @@ + +<div class="modal" ng-controller="SaveModelCtrl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h2>{{'MODEL.SAVE.TITLE' | translate}}</h2> + </div> + <div class="modal-body"> + + <div class="form-group"> + <label for="nameField">{{'MODEL.NAME' | translate}}</label> + <input type="text" + ng-disabled="status.loading" + id="nameField" + class="form-control" + ng-model="saveDialog.name" + ui-keypress="{13:'save()'}" + auto-focus /> + </div> + <div class="form-group"> + <label for="docTextArea">{{'MODEL.DESCRIPTION' | translate}}</label> + <textarea id="docTextArea" ng-disabled="status.loading" class="form-control" ng-model="saveDialog.description"></textarea> + </div> + </div> + <div class="modal-footer"> + + <div class="pull-right"> + <button type="button" class="btn" ng-click="close()" ng-disabled="status.loading" translate>ACTION.CANCEL</button> + <button class="btn btn-primary" ng-click="saveAndClose()" ng-disabled="status.loading" ng-show="!error" translate>ACTION.SAVE-AND-CLOSE</button> + <button class="btn btn-primary" ng-click="save()" ng-disabled="status.loading" ng-show="!error" translate>ACTION.SAVE</button> + </div> + + <div class="pull-right popup-error" ng-if="error && !error.isConflict"> + <span>{{'MODEL.SAVE.ERROR' | translate}}</span> + </div> + + <loading></loading> + + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/popups/select-shape.html b/src/main/resources/static/activiti-editor/editor-app/popups/select-shape.html new file mode 100644 index 0000000..a004ae3 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/popups/select-shape.html @@ -0,0 +1,20 @@ + +<div class="modal" ng-controller="KisBpmShapeSelectionCtrl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">×</button> + <h2>Change shape to:</h2> + </div> + <div class="modal-body"> + + <div class="kis-listener-grid" ng-grid="gridOptions"></div> + + </div> + <div class="modal-footer"> + <button ng-click="cancel()" class="btn btn-primary" translate>ACTION.CANCEL</button> + <button ng-click="select()" class="btn btn-primary" translate>ACTION.SELECT</button> + </div> + </div> + </div> +</div> diff --git a/src/main/resources/static/activiti-editor/editor-app/popups/unsaved-changes.html b/src/main/resources/static/activiti-editor/editor-app/popups/unsaved-changes.html new file mode 100644 index 0000000..964ab69 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/popups/unsaved-changes.html @@ -0,0 +1,22 @@ + +<div class="modal" ng-controller="EditorUnsavedChangesPopupCrtl"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h2 translate="EDITOR.POPUP.UNSAVED-CHANGES.TITLE"></h2> + </div> + <div class="modal-body"> + <p translate="EDITOR.POPUP.UNSAVED-CHANGES.DESCRIPTION"></p> + </div> + <div class="modal-footer"> + <div class="pull-right"> + <button class="btn btn-danger" ng-click="ok()" translate="EDITOR.POPUP.UNSAVED-CHANGES.ACTION.DISCARD"></button> + <button class="btn btn-default" ng-click="cancel()" translate="EDITOR.POPUP.UNSAVED-CHANGES.ACTION.CONTINUE"></button> + </div> + <div class="loading pull-right" ng-show="loading"> + <div class="l1"></div><div class="l2"></div><div class="l2"></div> + </div> + </div> + </div> + </div> +</div> \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/select-shape-controller.js b/src/main/resources/static/activiti-editor/editor-app/select-shape-controller.js new file mode 100644 index 0000000..9e426e6 --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/select-shape-controller.js @@ -0,0 +1,314 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Controller for morph shape selection + */ + +var KisBpmShapeSelectionCtrl = [ '$rootScope', '$scope', '$timeout', '$translate', function($rootScope, $scope, $timeout, $translate) { + + $scope.selectedMorphShapes = []; + + $scope.availableMorphShapes = []; + + for (var i = 0; i < $scope.morphShapes.length; i++) + { + if ($scope.morphShapes[i].id != $scope.currentSelectedShape.getStencil().idWithoutNs()) + { + $scope.availableMorphShapes.push($scope.morphShapes[i]); + } + } + + // Config for grid + $scope.gridOptions = { + data: 'availableMorphShapes', + enableRowReordering: true, + headerRowHeight: 28, + multiSelect: false, + keepLastSelected : false, + selectedItems: $scope.selectedMorphShapes, + columnDefs: [{ field: 'objectId', displayName: 'Icon', width: 50, cellTemplate: 'editor-app/popups/icon-template.html?version=' + Date.now() }, + { field: 'name', displayName: 'Name'}] + }; + + // Click handler for save button + $scope.select = function() { + + if ($scope.selectedMorphShapes.length > 0) + { + var MorphTo = ORYX.Core.Command.extend({ + construct: function(shape, stencil, facade){ + this.shape = shape; + this.stencil = stencil; + this.facade = facade; + }, + execute: function(){ + + var shape = this.shape; + var stencil = this.stencil; + var resourceId = shape.resourceId; + + // Serialize all attributes + var serialized = shape.serialize(); + stencil.properties().each((function(prop) { + if(prop.readonly()) { + serialized = serialized.reject(function(serProp) { + return serProp.name==prop.id(); + }); + } + }).bind(this)); + + // Get shape if already created, otherwise create a new shape + if (this.newShape){ + newShape = this.newShape; + this.facade.getCanvas().add(newShape); + } else { + newShape = this.facade.createShape({ + type: stencil.id(), + namespace: stencil.namespace(), + resourceId: resourceId + }); + } + + // calculate new bounds using old shape's upperLeft and new shape's width/height + var boundsObj = serialized.find(function(serProp){ + return (serProp.prefix === "oryx" && serProp.name === "bounds"); + }); + + var changedBounds = null; + + if (!this.facade.getRules().preserveBounds(shape.getStencil())) { + + var bounds = boundsObj.value.split(","); + if (parseInt(bounds[0], 10) > parseInt(bounds[2], 10)) { // if lowerRight comes first, swap array items + var tmp = bounds[0]; + bounds[0] = bounds[2]; + bounds[2] = tmp; + tmp = bounds[1]; + bounds[1] = bounds[3]; + bounds[3] = tmp; + } + bounds[2] = parseInt(bounds[0], 10) + newShape.bounds.width(); + bounds[3] = parseInt(bounds[1], 10) + newShape.bounds.height(); + boundsObj.value = bounds.join(","); + + } else { + + var height = shape.bounds.height(); + var width = shape.bounds.width(); + + // consider the minimum and maximum size of + // the new shape + + if (newShape.minimumSize) { + if (shape.bounds.height() < newShape.minimumSize.height) { + height = newShape.minimumSize.height; + } + + + if (shape.bounds.width() < newShape.minimumSize.width) { + width = newShape.minimumSize.width; + } + } + + if(newShape.maximumSize) { + if(shape.bounds.height() > newShape.maximumSize.height) { + height = newShape.maximumSize.height; + } + + if(shape.bounds.width() > newShape.maximumSize.width) { + width = newShape.maximumSize.width; + } + } + + changedBounds = { + a : { + x: shape.bounds.a.x, + y: shape.bounds.a.y + }, + b : { + x: shape.bounds.a.x + width, + y: shape.bounds.a.y + height + } + }; + + } + + var oPos = shape.bounds.center(); + if(changedBounds !== null) { + newShape.bounds.set(changedBounds); + } + + // Set all related dockers + this.setRelatedDockers(shape, newShape); + + // store DOM position of old shape + var parentNode = shape.node.parentNode; + var nextSibling = shape.node.nextSibling; + + // Delete the old shape + this.facade.deleteShape(shape); + + // Deserialize the new shape - Set all attributes + newShape.deserialize(serialized); + /* + * Change color to default if unchanged + * 23.04.2010 + */ + if(shape.getStencil().property("oryx-bgcolor") + && shape.properties["oryx-bgcolor"] + && shape.getStencil().property("oryx-bgcolor").value().toUpperCase()== shape.properties["oryx-bgcolor"].toUpperCase()){ + if(newShape.getStencil().property("oryx-bgcolor")){ + newShape.setProperty("oryx-bgcolor", newShape.getStencil().property("oryx-bgcolor").value()); + } + } + if(changedBounds !== null) { + newShape.bounds.set(changedBounds); + } + + if(newShape.getStencil().type()==="edge" || (newShape.dockers.length==0 || !newShape.dockers[0].getDockedShape())) { + newShape.bounds.centerMoveTo(oPos); + } + + if(newShape.getStencil().type()==="node" && (newShape.dockers.length==0 || !newShape.dockers[0].getDockedShape())) { + this.setRelatedDockers(newShape, newShape); + + } + + // place at the DOM position of the old shape + if(nextSibling) parentNode.insertBefore(newShape.node, nextSibling); + else parentNode.appendChild(newShape.node); + + // Set selection + this.facade.setSelection([newShape]); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + this.newShape = newShape; + + }, + rollback: function(){ + + if (!this.shape || !this.newShape || !this.newShape.parent) {return;} + + // Append shape to the parent + this.newShape.parent.add(this.shape); + // Set dockers + this.setRelatedDockers(this.newShape, this.shape); + // Delete new shape + this.facade.deleteShape(this.newShape); + // Set selection + this.facade.setSelection([this.shape]); + // Update + this.facade.getCanvas().update(); + this.facade.updateSelection(); + }, + + /** + * Set all incoming and outgoing edges from the shape to the new shape + * @param {Shape} shape + * @param {Shape} newShape + */ + setRelatedDockers: function(shape, newShape){ + + if(shape.getStencil().type()==="node") { + + (shape.incoming||[]).concat(shape.outgoing||[]) + .each(function(i) { + i.dockers.each(function(docker) { + if (docker.getDockedShape() == shape) { + var rPoint = Object.clone(docker.referencePoint); + // Move reference point per percent + + var rPointNew = { + x: rPoint.x*newShape.bounds.width()/shape.bounds.width(), + y: rPoint.y*newShape.bounds.height()/shape.bounds.height() + }; + + docker.setDockedShape(newShape); + // Set reference point and center to new position + docker.setReferencePoint(rPointNew); + if(i instanceof ORYX.Core.Edge) { + docker.bounds.centerMoveTo(rPointNew); + } else { + var absXY = shape.absoluteXY(); + docker.bounds.centerMoveTo({x:rPointNew.x+absXY.x, y:rPointNew.y+absXY.y}); + //docker.bounds.moveBy({x:rPointNew.x-rPoint.x, y:rPointNew.y-rPoint.y}); + } + } + }); + }); + + // for attached events + if(shape.dockers.length>0&&shape.dockers.first().getDockedShape()) { + newShape.dockers.first().setDockedShape(shape.dockers.first().getDockedShape()); + newShape.dockers.first().setReferencePoint(Object.clone(shape.dockers.first().referencePoint)); + } + + } else { // is edge + newShape.dockers.first().setDockedShape(shape.dockers.first().getDockedShape()); + newShape.dockers.first().setReferencePoint(shape.dockers.first().referencePoint); + newShape.dockers.last().setDockedShape(shape.dockers.last().getDockedShape()); + newShape.dockers.last().setReferencePoint(shape.dockers.last().referencePoint); + } + } + }); + + var stencil = undefined; + var stencilSets = $scope.editor.getStencilSets().values(); + + var stencilId = $scope.selectedMorphShapes[0].id; + if ($scope.selectedMorphShapes[0].genericTaskId) + { + stencilId = $scope.selectedMorphShapes[0].genericTaskId; + } + + for (var i = 0; i < stencilSets.length; i++) + { + var stencilSet = stencilSets[i]; + var nodes = stencilSet.nodes(); + for (var j = 0; j < nodes.length; j++) + { + if (nodes[j].idWithoutNs() === stencilId) + { + stencil = nodes[j]; + break; + } + } + } + + if (!stencil) return; + + // Create and execute command (for undo/redo) + var command = new MorphTo($scope.currentSelectedShape, stencil, $scope.editor); + $scope.editor.executeCommands([command]); + } + + $scope.close(); + }; + + $scope.cancel = function() { + $scope.$hide(); + }; + + // Close button handler + $scope.close = function() { + $scope.$hide(); + }; + +}]; \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/editor-app/stencil-controller.js b/src/main/resources/static/activiti-editor/editor-app/stencil-controller.js new file mode 100644 index 0000000..a37abee --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/stencil-controller.js @@ -0,0 +1,1435 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +angular.module('activitiModeler') + .controller('StencilController', ['$rootScope', '$scope', '$http', '$modal', '$timeout', function ($rootScope, $scope, $http, $modal, $timeout) { + + // Property window toggle state + $scope.propertyWindowState = {'collapsed': false}; + + // Add reference to global header-config + $scope.headerConfig = KISBPM.HEADER_CONFIG; + + $scope.propertyWindowState.toggle = function () { + $scope.propertyWindowState.collapsed = !$scope.propertyWindowState.collapsed; + $timeout(function () { + jQuery(window).trigger('resize'); + }); + }; + + // Code that is dependent on an initialised Editor is wrapped in a promise for the editor + $scope.editorFactory.promise.then(function () { + + /* Build stencil item list */ + + // Build simple json representation of stencil set + var stencilItemGroups = []; + + // Helper method: find a group in an array + var findGroup = function (name, groupArray) { + for (var index = 0; index < groupArray.length; index++) { + if (groupArray[index].name === name) { + return groupArray[index]; + } + } + return null; + }; + + // Helper method: add a new group to an array of groups + var addGroup = function (groupName, groupArray) { + var group = { name: groupName, items: [], paletteItems: [], groups: [], visible: true }; + groupArray.push(group); + return group; + }; + + /* + StencilSet items + */ + $http({method: 'GET', url: KISBPM.URL.getStencilSet()}).success(function (data, status, headers, config) { + + var quickMenuDefinition = ['UserTask', 'EndNoneEvent', 'ExclusiveGateway', + 'CatchTimerEvent', 'ThrowNoneEvent', 'TextAnnotation', + 'SequenceFlow', 'Association']; + var ignoreForPaletteDefinition = ['SequenceFlow', 'MessageFlow', 'Association', 'DataAssociation', 'DataStore', 'SendTask']; + var quickMenuItems = []; + + var morphRoles = []; + for (var i = 0; i < data.rules.morphingRules.length; i++) + { + var role = data.rules.morphingRules[i].role; + var roleItem = {'role': role, 'morphOptions': []}; + morphRoles.push(roleItem); + } + + // Check all received items + for (var stencilIndex = 0; stencilIndex < data.stencils.length; stencilIndex++) + { + // Check if the root group is the 'diagram' group. If so, this item should not be shown. + var currentGroupName = data.stencils[stencilIndex].groups[0]; + if (currentGroupName === 'Diagram' || currentGroupName === 'Form') { + continue; // go to next item + } + + var removed = false; + if (data.stencils[stencilIndex].removed) { + removed = true; + } + + var currentGroup = undefined; + if (!removed) { + // Check if this group already exists. If not, we create a new one + + if (currentGroupName !== null && currentGroupName !== undefined && currentGroupName.length > 0) { + + currentGroup = findGroup(currentGroupName, stencilItemGroups); // Find group in root groups array + if (currentGroup === null) { + currentGroup = addGroup(currentGroupName, stencilItemGroups); + } + + // Add all child groups (if any) + for (var groupIndex = 1; groupIndex < data.stencils[stencilIndex].groups.length; groupIndex++) { + var childGroupName = data.stencils[stencilIndex].groups[groupIndex]; + var childGroup = findGroup(childGroupName, currentGroup.groups); + if (childGroup === null) { + childGroup = addGroup(childGroupName, currentGroup.groups); + } + + // The current group variable holds the parent of the next group (if any), + // and is basically the last element in the array of groups defined in the stencil item + currentGroup = childGroup; + + } + + } + } + + // Construct the stencil item + var stencilItem = {'id': data.stencils[stencilIndex].id, + 'name': data.stencils[stencilIndex].title, + 'description': data.stencils[stencilIndex].description, + 'icon': data.stencils[stencilIndex].icon, + 'type': data.stencils[stencilIndex].type, + 'roles': data.stencils[stencilIndex].roles, + 'removed': removed, + 'customIcon': false, + 'canConnect': false, + 'canConnectTo': false, + 'canConnectAssociation': false}; + + if (data.stencils[stencilIndex].customIconId && data.stencils[stencilIndex].customIconId > 0) { + stencilItem.customIcon = true; + stencilItem.icon = data.stencils[stencilIndex].customIconId; + } + + if (!removed) { + if (quickMenuDefinition.indexOf(stencilItem.id) >= 0) { + quickMenuItems[quickMenuDefinition.indexOf(stencilItem.id)] = stencilItem; + } + } + + if (stencilItem.id === 'TextAnnotation' || stencilItem.id === 'BoundaryCompensationEvent') { + stencilItem.canConnectAssociation = true; + } + + for (var i = 0; i < data.stencils[stencilIndex].roles.length; i++) { + var stencilRole = data.stencils[stencilIndex].roles[i]; + if (stencilRole === 'sequence_start') { + stencilItem.canConnect = true; + } else if (stencilRole === 'sequence_end') { + stencilItem.canConnectTo = true; + } + + for (var j = 0; j < morphRoles.length; j++) { + if (stencilRole === morphRoles[j].role) { + if (!removed) { + morphRoles[j].morphOptions.push(stencilItem); + } + stencilItem.morphRole = morphRoles[j].role; + break; + } + } + } + + if (currentGroup) { + // Add the stencil item to the correct group + currentGroup.items.push(stencilItem); + if (ignoreForPaletteDefinition.indexOf(stencilItem.id) < 0) { + currentGroup.paletteItems.push(stencilItem); + } + + } else { + // It's a root stencil element + if (!removed) { + stencilItemGroups.push(stencilItem); + } + } + } + + for (var i = 0; i < stencilItemGroups.length; i++) + { + if (stencilItemGroups[i].paletteItems && stencilItemGroups[i].paletteItems.length == 0) + { + stencilItemGroups[i].visible = false; + } + } + + $scope.stencilItemGroups = stencilItemGroups; + + var containmentRules = []; + for (var i = 0; i < data.rules.containmentRules.length; i++) + { + var rule = data.rules.containmentRules[i]; + containmentRules.push(rule); + } + $scope.containmentRules = containmentRules; + + // remove quick menu items which are not available anymore due to custom pallette + var availableQuickMenuItems = []; + for (var i = 0; i < quickMenuItems.length; i++) + { + if (quickMenuItems[i]) { + availableQuickMenuItems[availableQuickMenuItems.length] = quickMenuItems[i]; + } + } + + $scope.quickMenuItems = availableQuickMenuItems; + $scope.morphRoles = morphRoles; + }). + + error(function (data, status, headers, config) { + console.log('Something went wrong when fetching stencil items:' + JSON.stringify(data)); + }); + + /* + * Listen to selection change events: show properties + */ + $scope.editor.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, function (event) { + var shapes = event.elements; + var canvasSelected = false; + if (shapes && shapes.length == 0) { + shapes = [$scope.editor.getCanvas()]; + canvasSelected = true; + } + if (shapes && shapes.length > 0) { + + var selectedShape = shapes.first(); + var stencil = selectedShape.getStencil(); + + if ($rootScope.selectedElementBeforeScrolling && stencil.id().indexOf('BPMNDiagram') !== -1) + { + // ignore canvas event because of empty selection when scrolling stops + return; + } + + if ($rootScope.selectedElementBeforeScrolling && $rootScope.selectedElementBeforeScrolling.getId() === selectedShape.getId()) + { + $rootScope.selectedElementBeforeScrolling = null; + return; + } + + // Store previous selection + $scope.previousSelectedShape = $scope.selectedShape; + + // Only do something if another element is selected (Oryx fires this event multiple times) + if ($scope.selectedShape !== undefined && $scope.selectedShape.getId() === selectedShape.getId()) { + if ($rootScope.forceSelectionRefresh) { + // Switch the flag again, this run will force refresh + $rootScope.forceSelectionRefresh = false; + } else { + // Selected the same element again, no need to update anything + return; + } + } + + var selectedItem = {'title': '', 'properties': []}; + + if (canvasSelected) { + selectedItem.auditData = { + 'author': $scope.modelData.createdByUser, + 'createDate': $scope.modelData.createDate + }; + } + + // Gather properties of selected item + var properties = stencil.properties(); + for (var i = 0; i < properties.length; i++) { + var property = properties[i]; + if (property.popular() == false) continue; + var key = property.prefix() + "-" + property.id(); + + if (key === 'oryx-name') { + selectedItem.title = selectedShape.properties[key]; + } + + // First we check if there is a config for 'key-type' and then for 'type' alone + var propertyConfig = KISBPM.PROPERTY_CONFIG[key + '-' + property.type()]; + if (propertyConfig === undefined || propertyConfig === null) { + propertyConfig = KISBPM.PROPERTY_CONFIG[property.type()]; + } + + if (propertyConfig === undefined || propertyConfig === null) { + console.log('WARNING: no property configuration defined for ' + key + ' of type ' + property.type()); + } else { + + if (selectedShape.properties[key] === 'true') { + selectedShape.properties[key] = true; + } + + if (KISBPM.CONFIG.showRemovedProperties == false && property.isHidden()) + { + continue; + } + + var currentProperty = { + 'key': key, + 'title': property.title(), + 'type': property.type(), + 'mode': 'read', + 'hidden': property.isHidden(), + 'value': selectedShape.properties[key] + }; + + if ((currentProperty.type === 'complex' || currentProperty.type === 'multiplecomplex') && currentProperty.value && currentProperty.value.length > 0) { + try { + currentProperty.value = JSON.parse(currentProperty.value); + } catch (err) { + // ignore + } + } + + if (propertyConfig.readModeTemplateUrl !== undefined && propertyConfig.readModeTemplateUrl !== null) { + currentProperty.readModeTemplateUrl = propertyConfig.readModeTemplateUrl + '?version=' + $rootScope.staticIncludeVersion; + } + if (propertyConfig.writeModeTemplateUrl !== null && propertyConfig.writeModeTemplateUrl !== null) { + currentProperty.writeModeTemplateUrl = propertyConfig.writeModeTemplateUrl + '?version=' + $rootScope.staticIncludeVersion; + } + + if (propertyConfig.templateUrl !== undefined && propertyConfig.templateUrl !== null) { + currentProperty.templateUrl = propertyConfig.templateUrl + '?version=' + $rootScope.staticIncludeVersion; + currentProperty.hasReadWriteMode = false; + } + else { + currentProperty.hasReadWriteMode = true; + } + + if (currentProperty.value === undefined + || currentProperty.value === null + || currentProperty.value.length == 0) { + currentProperty.noValue = true; + } + + selectedItem.properties.push(currentProperty); + } + } + + // Need to wrap this in an $apply block, see http://jimhoskins.com/2012/12/17/angularjs-and-apply.html + $scope.safeApply(function () { + $scope.selectedItem = selectedItem; + $scope.selectedShape = selectedShape; + }); + + } else { + $scope.safeApply(function () { + $scope.selectedItem = {}; + $scope.selectedShape = null; + }); + } + }); + + $scope.editor.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, function (event) { + + KISBPM.eventBus.dispatch(KISBPM.eventBus.EVENT_TYPE_HIDE_SHAPE_BUTTONS); + var shapes = event.elements; + + if (shapes && shapes.length == 1) { + + var selectedShape = shapes.first(); + + var a = $scope.editor.getCanvas().node.getScreenCTM(); + + var absoluteXY = selectedShape.absoluteXY(); + + absoluteXY.x *= a.a; + absoluteXY.y *= a.d; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom === 1) { + absoluteXY.y = absoluteXY.y - jQuery("#canvasSection").offset().top + 5; + absoluteXY.x = absoluteXY.x - jQuery("#canvasSection").offset().left; + + } else { + var canvasOffsetLeft = jQuery("#canvasSection").offset().left; + var canvasScrollLeft = jQuery("#canvasSection").scrollLeft(); + var canvasScrollTop = jQuery("#canvasSection").scrollTop(); + + var offset = a.e - (canvasOffsetLeft * additionalIEZoom); + var additionaloffset = 0; + if (offset > 10) { + additionaloffset = (offset / additionalIEZoom) - offset; + } + absoluteXY.y = absoluteXY.y - (jQuery("#canvasSection").offset().top * additionalIEZoom) + 5 + ((canvasScrollTop * additionalIEZoom) - canvasScrollTop); + absoluteXY.x = absoluteXY.x - (canvasOffsetLeft * additionalIEZoom) + additionaloffset + ((canvasScrollLeft * additionalIEZoom) - canvasScrollLeft); + } + + var bounds = new ORYX.Core.Bounds(a.e + absoluteXY.x, a.f + absoluteXY.y, a.e + absoluteXY.x + a.a*selectedShape.bounds.width(), a.f + absoluteXY.y + a.d*selectedShape.bounds.height()); + var shapeXY = bounds.upperLeft(); + + var stencilItem = $scope.getStencilItemById(selectedShape.getStencil().idWithoutNs()); + var morphShapes = []; + if (stencilItem && stencilItem.morphRole) + { + for (var i = 0; i < $scope.morphRoles.length; i++) + { + if ($scope.morphRoles[i].role === stencilItem.morphRole) + { + morphShapes = $scope.morphRoles[i].morphOptions; + } + } + } + + var x = shapeXY.x; + if (bounds.width() < 48) { + x -= 24; + } + + if (morphShapes && morphShapes.length > 0) { + // In case the element is not wide enough, start the 2 bottom-buttons more to the left + // to prevent overflow in the right-menu + var morphButton = document.getElementById('morph-button'); + morphButton.style.display = "block"; + morphButton.style.left = x + 24 +'px'; + morphButton.style.top = (shapeXY.y+bounds.height() + 2) + 'px'; + } + + var deleteButton = document.getElementById('delete-button'); + deleteButton.style.display = "block"; + deleteButton.style.left = x + 'px'; + deleteButton.style.top = (shapeXY.y+bounds.height() + 2) + 'px'; + + if (stencilItem && (stencilItem.canConnect || stencilItem.canConnectAssociation)) { + var quickButtonCounter = 0; + var quickButtonX = shapeXY.x+bounds.width() + 5; + var quickButtonY = shapeXY.y; + jQuery('.Oryx_button').each(function(i, obj) { + if (obj.id !== 'morph-button' && obj.id != 'delete-button') { + quickButtonCounter++; + if (quickButtonCounter > 3) { + quickButtonX = shapeXY.x+bounds.width() + 5; + quickButtonY += 24; + quickButtonCounter = 1; + + } else if (quickButtonCounter > 1) { + quickButtonX += 24; + } + obj.style.display = "block"; + obj.style.left = quickButtonX + 'px'; + obj.style.top = quickButtonY + 'px'; + } + }); + } + } + }); + + if (!$rootScope.stencilInitialized) { + KISBPM.eventBus.addListener(KISBPM.eventBus.EVENT_TYPE_HIDE_SHAPE_BUTTONS, function (event) { + jQuery('.Oryx_button').each(function(i, obj) { + obj.style.display = "none"; + }); + }); + + /* + * Listen to property updates and act upon them + */ + KISBPM.eventBus.addListener(KISBPM.eventBus.EVENT_TYPE_PROPERTY_VALUE_CHANGED, function (event) { + if (event.property && event.property.key) { + // If the name property is been updated, we also need to change the title of the currently selected item + if (event.property.key === 'oryx-name' && $scope.selectedItem !== undefined && $scope.selectedItem !== null) { + $scope.selectedItem.title = event.newValue; + } + + // Update "no value" flag + event.property.noValue = (event.property.value === undefined + || event.property.value === null + || event.property.value.length == 0); + } + }); + + $rootScope.stencilInitialized = true; + } + + $scope.morphShape = function() { + $scope.safeApply(function () { + + var shapes = $rootScope.editor.getSelection(); + if (shapes && shapes.length == 1) + { + $rootScope.currentSelectedShape = shapes.first(); + var stencilItem = $scope.getStencilItemById($rootScope.currentSelectedShape.getStencil().idWithoutNs()); + var morphShapes = []; + for (var i = 0; i < $scope.morphRoles.length; i++) + { + if ($scope.morphRoles[i].role === stencilItem.morphRole) + { + morphShapes = $scope.morphRoles[i].morphOptions.slice(); + } + } + + // Method to open shape select dialog (used later on) + var showSelectShapeDialog = function() + { + $rootScope.morphShapes = morphShapes; + $modal({ + backdrop: false, + keyboard: true, + template: 'editor-app/popups/select-shape.html?version=' + Date.now() + }); + }; + + showSelectShapeDialog(); + } + }); + }; + + $scope.deleteShape = function() { + KISBPM.TOOLBAR.ACTIONS.deleteItem({'$scope': $scope}); + }; + + $scope.quickAddItem = function(newItemId) { + $scope.safeApply(function () { + + var shapes = $rootScope.editor.getSelection(); + if (shapes && shapes.length == 1) + { + $rootScope.currentSelectedShape = shapes.first(); + + var containedStencil = undefined; + var stencilSets = $scope.editor.getStencilSets().values(); + for (var i = 0; i < stencilSets.length; i++) + { + var stencilSet = stencilSets[i]; + var nodes = stencilSet.nodes(); + for (var j = 0; j < nodes.length; j++) + { + if (nodes[j].idWithoutNs() === newItemId) + { + containedStencil = nodes[j]; + break; + } + } + } + + if (!containedStencil) return; + + var option = {type: $scope.currentSelectedShape.getStencil().namespace() + newItemId, namespace: $scope.currentSelectedShape.getStencil().namespace()}; + option['connectedShape'] = $rootScope.currentSelectedShape; + option['parent'] = $rootScope.currentSelectedShape.parent; + option['containedStencil'] = containedStencil; + + var args = { sourceShape: $rootScope.currentSelectedShape, targetStencil: containedStencil }; + var targetStencil = $scope.editor.getRules().connectMorph(args); + if (!targetStencil){ return; }// Check if there can be a target shape + option['connectingType'] = targetStencil.id(); + + var command = new KISBPM.CreateCommand(option, undefined, undefined, $scope.editor); + + $scope.editor.executeCommands([command]); + } + }); + }; + + }); // end of $scope.editorFactory.promise block + + /* Click handler for clicking a property */ + $scope.propertyClicked = function (index) { + if (!$scope.selectedItem.properties[index].hidden) { + $scope.selectedItem.properties[index].mode = "write"; + } + }; + + /* Helper method to retrieve the template url for a property */ + $scope.getPropertyTemplateUrl = function (index) { + return $scope.selectedItem.properties[index].templateUrl; + }; + $scope.getPropertyReadModeTemplateUrl = function (index) { + return $scope.selectedItem.properties[index].readModeTemplateUrl; + }; + $scope.getPropertyWriteModeTemplateUrl = function (index) { + return $scope.selectedItem.properties[index].writeModeTemplateUrl; + }; + + /* Method available to all sub controllers (for property controllers) to update the internal Oryx model */ + $scope.updatePropertyInModel = function (property, shapeId) { + + var shape = $scope.selectedShape; + // Some updates may happen when selected shape is already changed, so when an additional + // shapeId is supplied, we need to make sure the correct shape is updated (current or previous) + if (shapeId) { + if (shape.id != shapeId && $scope.previousSelectedShape && $scope.previousSelectedShape.id == shapeId) { + shape = $scope.previousSelectedShape; + } else { + shape = null; + } + } + + if (!shape) { + // When no shape is selected, or no shape is found for the alternative + // shape ID, do nothing + return; + } + var key = property.key; + var newValue = property.value; + var oldValue = shape.properties[key]; + + if (newValue != oldValue) { + var commandClass = ORYX.Core.Command.extend({ + construct: function () { + this.key = key; + this.oldValue = oldValue; + this.newValue = newValue; + this.shape = shape; + this.facade = $scope.editor; + }, + execute: function () { + this.shape.setProperty(this.key, this.newValue); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + }, + rollback: function () { + this.shape.setProperty(this.key, this.oldValue); + this.facade.getCanvas().update(); + this.facade.updateSelection(); + } + }); + // Instantiate the class + var command = new commandClass(); + + // Execute the command + $scope.editor.executeCommands([command]); + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_PROPWINDOW_PROP_CHANGED, + elements: [shape], + key: key + }); + + // Switch the property back to read mode, now the update is done + property.mode = 'read'; + + // Fire event to all who is interested + // Fire event to all who want to know about this + var event = { + type: KISBPM.eventBus.EVENT_TYPE_PROPERTY_VALUE_CHANGED, + property: property, + oldValue: oldValue, + newValue: newValue + }; + KISBPM.eventBus.dispatch(event.type, event); + } else { + // Switch the property back to read mode, no update was needed + property.mode = 'read'; + } + + }; + + /** + * Helper method that searches a group for an item with the given id. + * If not found, will return undefined. + */ + $scope.findStencilItemInGroup = function (stencilItemId, group) { + + var item; + + // Check all items directly in this group + for (var j = 0; j < group.items.length; j++) { + item = group.items[j]; + if (item.id === stencilItemId) { + return item; + } + } + + // Check the child groups + if (group.groups && group.groups.length > 0) { + for (var k = 0; k < group.groups.length; k++) { + item = $scope.findStencilItemInGroup(stencilItemId, group.groups[k]); + if (item) { + return item; + } + } + } + + return undefined; + }; + + /** + * Helper method to find a stencil item. + */ + $scope.getStencilItemById = function (stencilItemId) { + for (var i = 0; i < $scope.stencilItemGroups.length; i++) { + var element = $scope.stencilItemGroups[i]; + + // Real group + if (element.items !== null && element.items !== undefined) { + var item = $scope.findStencilItemInGroup(stencilItemId, element); + if (item) { + return item; + } + } else { // Root stencil item + if (element.id === stencilItemId) { + return element; + } + } + } + return undefined; + }; + + /* + * DRAG AND DROP FUNCTIONALITY + */ + + $scope.dropCallback = function (event, ui) { + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.attached" + }); + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.added" + }); + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeMenu" + }); + + KISBPM.eventBus.dispatch(KISBPM.eventBus.EVENT_TYPE_HIDE_SHAPE_BUTTONS); + + if ($scope.dragCanContain) { + + var item = $scope.getStencilItemById(ui.draggable[0].id); + + var pos = {x: event.pageX, y: event.pageY}; + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100; + } + } + } + + var screenCTM = $scope.editor.getCanvas().node.getScreenCTM(); + + // Correcting the UpperLeft-Offset + pos.x -= (screenCTM.e / additionalIEZoom); + pos.y -= (screenCTM.f / additionalIEZoom); + // Correcting the Zoom-Factor + pos.x /= screenCTM.a; + pos.y /= screenCTM.d; + + // Correcting the ScrollOffset + pos.x -= document.documentElement.scrollLeft; + pos.y -= document.documentElement.scrollTop; + + var parentAbs = $scope.dragCurrentParent.absoluteXY(); + pos.x -= parentAbs.x; + pos.y -= parentAbs.y; + + var containedStencil = undefined; + var stencilSets = $scope.editor.getStencilSets().values(); + for (var i = 0; i < stencilSets.length; i++) + { + var stencilSet = stencilSets[i]; + var nodes = stencilSet.nodes(); + for (var j = 0; j < nodes.length; j++) + { + if (nodes[j].idWithoutNs() === ui.draggable[0].id) + { + containedStencil = nodes[j]; + break; + } + } + + if (!containedStencil) + { + var edges = stencilSet.edges(); + for (var j = 0; j < edges.length; j++) + { + if (edges[j].idWithoutNs() === ui.draggable[0].id) + { + containedStencil = edges[j]; + break; + } + } + } + } + + if (!containedStencil) return; + + if ($scope.quickMenu) + { + var shapes = $scope.editor.getSelection(); + if (shapes && shapes.length == 1) + { + var currentSelectedShape = shapes.first(); + + var option = {}; + option.type = currentSelectedShape.getStencil().namespace() + ui.draggable[0].id; + option.namespace = currentSelectedShape.getStencil().namespace(); + option.connectedShape = currentSelectedShape; + option.parent = $scope.dragCurrentParent; + option.containedStencil = containedStencil; + + // If the ctrl key is not pressed, + // snapp the new shape to the center + // if it is near to the center of the other shape + if (!event.ctrlKey){ + // Get the center of the shape + var cShape = currentSelectedShape.bounds.center(); + // Snapp +-20 Pixel horizontal to the center + if (20 > Math.abs(cShape.x - pos.x)){ + pos.x = cShape.x; + } + // Snapp +-20 Pixel vertical to the center + if (20 > Math.abs(cShape.y - pos.y)){ + pos.y = cShape.y; + } + } + + option.position = pos; + + if (containedStencil.idWithoutNs() !== 'SequenceFlow' && containedStencil.idWithoutNs() !== 'Association' && + containedStencil.idWithoutNs() !== 'MessageFlow' && containedStencil.idWithoutNs() !== 'DataAssociation') + { + var args = { sourceShape: currentSelectedShape, targetStencil: containedStencil }; + var targetStencil = $scope.editor.getRules().connectMorph(args); + if (!targetStencil){ return; }// Check if there can be a target shape + option.connectingType = targetStencil.id(); + } + + var command = new KISBPM.CreateCommand(option, $scope.dropTargetElement, pos, $scope.editor); + + $scope.editor.executeCommands([command]); + } + } + else + { + var canAttach = false; + if (containedStencil.idWithoutNs() === 'BoundaryErrorEvent' || containedStencil.idWithoutNs() === 'BoundaryTimerEvent' || + containedStencil.idWithoutNs() === 'BoundarySignalEvent' || containedStencil.idWithoutNs() === 'BoundaryMessageEvent' || + containedStencil.idWithoutNs() === 'BoundaryCancelEvent' || containedStencil.idWithoutNs() === 'BoundaryCompensationEvent') { + // Modify position, otherwise boundary event will get position related to left corner of the canvas instead of the container + pos = $scope.editor.eventCoordinates( event ); + canAttach = true; + } + + var option = {}; + option['type'] = $scope.modelData.model.stencilset.namespace + item.id; + option['namespace'] = $scope.modelData.model.stencilset.namespace; + option['position'] = pos; + option['parent'] = $scope.dragCurrentParent; + + var commandClass = ORYX.Core.Command.extend({ + construct: function(option, dockedShape, canAttach, position, facade){ + this.option = option; + this.docker = null; + this.dockedShape = dockedShape; + this.dockedShapeParent = dockedShape.parent || facade.getCanvas(); + this.position = position; + this.facade = facade; + this.selection = this.facade.getSelection(); + this.shape = null; + this.parent = null; + this.canAttach = canAttach; + }, + execute: function(){ + if (!this.shape) { + this.shape = this.facade.createShape(option); + this.parent = this.shape.parent; + } else if (this.parent) { + this.parent.add(this.shape); + } + + if (this.canAttach && this.shape.dockers && this.shape.dockers.length) { + this.docker = this.shape.dockers[0]; + + this.dockedShapeParent.add(this.docker.parent); + + // Set the Docker to the new Shape + this.docker.setDockedShape(undefined); + this.docker.bounds.centerMoveTo(this.position); + if (this.dockedShape !== this.facade.getCanvas()) { + this.docker.setDockedShape(this.dockedShape); + } + this.facade.setSelection( [this.docker.parent] ); + } + + this.facade.getCanvas().update(); + this.facade.updateSelection(); + + }, + rollback: function(){ + if (this.shape) { + this.facade.setSelection(this.selection.without(this.shape)); + this.facade.deleteShape(this.shape); + } + if (this.canAttach && this.docker) { + this.docker.setDockedShape(undefined); + } + this.facade.getCanvas().update(); + this.facade.updateSelection(); + + } + }); + + // Update canvas + var command = new commandClass(option, $scope.dragCurrentParent, canAttach, pos, $scope.editor); + $scope.editor.executeCommands([command]); + + // Fire event to all who want to know about this + var dropEvent = { + type: KISBPM.eventBus.EVENT_TYPE_ITEM_DROPPED, + droppedItem: item, + position: pos + }; + KISBPM.eventBus.dispatch(dropEvent.type, dropEvent); + } + } + + $scope.dragCurrentParent = undefined; + $scope.dragCurrentParentId = undefined; + $scope.dragCurrentParentStencil = undefined; + $scope.dragCanContain = undefined; + $scope.quickMenu = undefined; + $scope.dropTargetElement = undefined; + }; + + + $scope.overCallback = function (event, ui) { + $scope.dragModeOver = true; + }; + + $scope.outCallback = function (event, ui) { + $scope.dragModeOver = false; + }; + + $scope.startDragCallback = function (event, ui) { + $scope.dragModeOver = false; + $scope.quickMenu = false; + if (!ui.helper.hasClass('stencil-item-dragged')) { + ui.helper.addClass('stencil-item-dragged'); + } + }; + + $scope.startDragCallbackQuickMenu = function (event, ui) { + $scope.dragModeOver = false; + $scope.quickMenu = true; + }; + + $scope.dragCallback = function (event, ui) { + + if ($scope.dragModeOver != false) { + + var coord = $scope.editor.eventCoordinatesXY(event.pageX, event.pageY); + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + coord.x = coord.x / additionalIEZoom; + coord.y = coord.y / additionalIEZoom; + } + + var aShapes = $scope.editor.getCanvas().getAbstractShapesAtPosition(coord); + + if (aShapes.length <= 0) { + if (event.helper) { + $scope.dragCanContain = false; + return false; + } + } + + if (aShapes[0] instanceof ORYX.Core.Canvas) { + $scope.editor.getCanvas().setHightlightStateBasedOnX(coord.x); + } + + if (aShapes.length == 1 && aShapes[0] instanceof ORYX.Core.Canvas) + { + var parentCandidate = aShapes[0]; + + $scope.dragCanContain = true; + $scope.dragCurrentParent = parentCandidate; + $scope.dragCurrentParentId = parentCandidate.id; + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.attached" + }); + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.added" + }); + return false; + } + else + { + var item = $scope.getStencilItemById(event.target.id); + + var parentCandidate = aShapes.reverse().find(function (candidate) { + return (candidate instanceof ORYX.Core.Canvas + || candidate instanceof ORYX.Core.Node + || candidate instanceof ORYX.Core.Edge); + }); + + if (!parentCandidate) { + $scope.dragCanContain = false; + return false; + } + + if (item.type === "node") { + + // check if the draggable is a boundary event and the parent an Activity + var _canContain = false; + var parentStencilId = parentCandidate.getStencil().id(); + + if ($scope.dragCurrentParentId && $scope.dragCurrentParentId === parentCandidate.id) { + return false; + } + + var parentItem = $scope.getStencilItemById(parentCandidate.getStencil().idWithoutNs()); + if (parentItem.roles.indexOf("Activity") > -1) { + if (item.roles.indexOf("IntermediateEventOnActivityBoundary") > -1) { + _canContain = true; + } + } + else if (parentCandidate.getStencil().idWithoutNs() === 'Pool') + { + if (item.id === 'Lane') + { + _canContain = true; + } + } + + if (_canContain) + { + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: "shapeRepo.attached", + elements: [parentCandidate], + style: ORYX.CONFIG.SELECTION_HIGHLIGHT_STYLE_RECTANGLE, + color: ORYX.CONFIG.SELECTION_VALID_COLOR + }); + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.added" + }); + } + else + { + for (var i = 0; i < $scope.containmentRules.length; i++) { + var rule = $scope.containmentRules[i]; + if (rule.role === parentItem.id) { + for (var j = 0; j < rule.contains.length; j++) { + if (item.roles.indexOf(rule.contains[j]) > -1) { + _canContain = true; + break; + } + } + + if (_canContain) { + break; + } + } + } + + // Show Highlight + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: 'shapeRepo.added', + elements: [parentCandidate], + color: _canContain ? ORYX.CONFIG.SELECTION_VALID_COLOR : ORYX.CONFIG.SELECTION_INVALID_COLOR + }); + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.attached" + }); + } + + $scope.dragCurrentParent = parentCandidate; + $scope.dragCurrentParentId = parentCandidate.id; + $scope.dragCurrentParentStencil = parentStencilId; + $scope.dragCanContain = _canContain; + + } else { + var canvasCandidate = $scope.editor.getCanvas(); + var canConnect = false; + + var targetStencil = $scope.getStencilItemById(parentCandidate.getStencil().idWithoutNs()); + if (targetStencil) { + var associationConnect = false; + if (stencil.idWithoutNs() === 'Association' && (curCan.getStencil().idWithoutNs() === 'TextAnnotation' || curCan.getStencil().idWithoutNs() === 'BoundaryCompensationEvent')) { + associationConnect = true; + } else if (stencil.idWithoutNs() === 'DataAssociation' && curCan.getStencil().idWithoutNs() === 'DataStore') { + associationConnect = true; + } + + if (targetStencil.canConnectTo || associationConnect) { + canConnect = true; + } + } + + //Edge + $scope.dragCurrentParent = canvasCandidate; + $scope.dragCurrentParentId = canvasCandidate.id; + $scope.dragCurrentParentStencil = canvasCandidate.getStencil().id(); + $scope.dragCanContain = canConnect; + + // Show Highlight + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId: 'shapeRepo.added', + elements: [canvasCandidate], + color: ORYX.CONFIG.SELECTION_VALID_COLOR + }); + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_HIDE, + highlightId: "shapeRepo.attached" + }); + } + } + } + }; + + $scope.dragCallbackQuickMenu = function (event, ui) { + + if ($scope.dragModeOver != false) { + var coord = $scope.editor.eventCoordinatesXY(event.pageX, event.pageY); + + var additionalIEZoom = 1; + if (!isNaN(screen.logicalXDPI) && !isNaN(screen.systemXDPI)) { + var ua = navigator.userAgent; + if (ua.indexOf('MSIE') >= 0) { + //IE 10 and below + var zoom = Math.round((screen.deviceXDPI / screen.logicalXDPI) * 100); + if (zoom !== 100) { + additionalIEZoom = zoom / 100 + } + } + } + + if (additionalIEZoom !== 1) { + coord.x = coord.x / additionalIEZoom; + coord.y = coord.y / additionalIEZoom; + } + + var aShapes = $scope.editor.getCanvas().getAbstractShapesAtPosition(coord); + + if (aShapes.length <= 0) { + if (event.helper) { + $scope.dragCanContain = false; + return false; + } + } + + if (aShapes[0] instanceof ORYX.Core.Canvas) { + $scope.editor.getCanvas().setHightlightStateBasedOnX(coord.x); + } + + var stencil = undefined; + var stencilSets = $scope.editor.getStencilSets().values(); + for (var i = 0; i < stencilSets.length; i++) + { + var stencilSet = stencilSets[i]; + var nodes = stencilSet.nodes(); + for (var j = 0; j < nodes.length; j++) + { + if (nodes[j].idWithoutNs() === event.target.id) + { + stencil = nodes[j]; + break; + } + } + + if (!stencil) + { + var edges = stencilSet.edges(); + for (var j = 0; j < edges.length; j++) + { + if (edges[j].idWithoutNs() === event.target.id) + { + stencil = edges[j]; + break; + } + } + } + } + + var candidate = aShapes.last(); + + var isValid = false; + if (stencil.type() === "node") + { + //check containment rules + var canContain = $scope.editor.getRules().canContain({containingShape:candidate, containedStencil:stencil}); + + var parentCandidate = aShapes.reverse().find(function (candidate) { + return (candidate instanceof ORYX.Core.Canvas + || candidate instanceof ORYX.Core.Node + || candidate instanceof ORYX.Core.Edge); + }); + + if (!parentCandidate) { + $scope.dragCanContain = false; + return false; + } + + $scope.dragCurrentParent = parentCandidate; + $scope.dragCurrentParentId = parentCandidate.id; + $scope.dragCurrentParentStencil = parentCandidate.getStencil().id(); + $scope.dragCanContain = canContain; + $scope.dropTargetElement = parentCandidate; + isValid = canContain; + + } else { //Edge + + var shapes = $scope.editor.getSelection(); + if (shapes && shapes.length == 1) + { + var currentSelectedShape = shapes.first(); + var curCan = candidate; + var canConnect = false; + + var targetStencil = $scope.getStencilItemById(curCan.getStencil().idWithoutNs()); + if (targetStencil) + { + var associationConnect = false; + if (stencil.idWithoutNs() === 'Association' && (curCan.getStencil().idWithoutNs() === 'TextAnnotation' || curCan.getStencil().idWithoutNs() === 'BoundaryCompensationEvent')) + { + associationConnect = true; + } + else if (stencil.idWithoutNs() === 'DataAssociation' && curCan.getStencil().idWithoutNs() === 'DataStore') + { + associationConnect = true; + } + + if (targetStencil.canConnectTo || associationConnect) + { + while (!canConnect && curCan && !(curCan instanceof ORYX.Core.Canvas)) + { + candidate = curCan; + //check connection rules + canConnect = $scope.editor.getRules().canConnect({ + sourceShape: currentSelectedShape, + edgeStencil: stencil, + targetShape: curCan + }); + curCan = curCan.parent; + } + } + } + var parentCandidate = $scope.editor.getCanvas(); + + isValid = canConnect; + $scope.dragCurrentParent = parentCandidate; + $scope.dragCurrentParentId = parentCandidate.id; + $scope.dragCurrentParentStencil = parentCandidate.getStencil().id(); + $scope.dragCanContain = canConnect; + $scope.dropTargetElement = candidate; + } + + } + + $scope.editor.handleEvents({ + type: ORYX.CONFIG.EVENT_HIGHLIGHT_SHOW, + highlightId:'shapeMenu', + elements: [candidate], + color: isValid ? ORYX.CONFIG.SELECTION_VALID_COLOR : ORYX.CONFIG.SELECTION_INVALID_COLOR + }); + } + }; + + }]); + +var KISBPM = KISBPM || {}; +//create command for undo/redo +KISBPM.CreateCommand = ORYX.Core.Command.extend({ + construct: function(option, currentReference, position, facade){ + this.option = option; + this.currentReference = currentReference; + this.position = position; + this.facade = facade; + this.shape; + this.edge; + this.targetRefPos; + this.sourceRefPos; + /* + * clone options parameters + */ + this.connectedShape = option.connectedShape; + this.connectingType = option.connectingType; + this.namespace = option.namespace; + this.type = option.type; + this.containedStencil = option.containedStencil; + this.parent = option.parent; + this.currentReference = currentReference; + this.shapeOptions = option.shapeOptions; + }, + execute: function(){ + + if (this.shape) { + if (this.shape instanceof ORYX.Core.Node) { + this.parent.add(this.shape); + if (this.edge) { + this.facade.getCanvas().add(this.edge); + this.edge.dockers.first().setDockedShape(this.connectedShape); + this.edge.dockers.first().setReferencePoint(this.sourceRefPos); + this.edge.dockers.last().setDockedShape(this.shape); + this.edge.dockers.last().setReferencePoint(this.targetRefPos); + } + + this.facade.setSelection([this.shape]); + + } else if (this.shape instanceof ORYX.Core.Edge) { + this.facade.getCanvas().add(this.shape); + this.shape.dockers.first().setDockedShape(this.connectedShape); + this.shape.dockers.first().setReferencePoint(this.sourceRefPos); + } + } + else { + this.shape = this.facade.createShape(this.option); + this.edge = (!(this.shape instanceof ORYX.Core.Edge)) ? this.shape.getIncomingShapes().first() : undefined; + } + + if (this.currentReference && this.position) { + + if (this.shape instanceof ORYX.Core.Edge) { + + if (!(this.currentReference instanceof ORYX.Core.Canvas)) { + this.shape.dockers.last().setDockedShape(this.currentReference); + + if (this.currentReference.getStencil().idWithoutNs() === 'TextAnnotation') + { + var midpoint = {}; + midpoint.x = 0; + midpoint.y = this.currentReference.bounds.height() / 2; + this.shape.dockers.last().setReferencePoint(midpoint); + } + else + { + this.shape.dockers.last().setReferencePoint(this.currentReference.bounds.midPoint()); + } + } + else { + this.shape.dockers.last().bounds.centerMoveTo(this.position); + } + this.sourceRefPos = this.shape.dockers.first().referencePoint; + this.targetRefPos = this.shape.dockers.last().referencePoint; + + } else if (this.edge){ + this.sourceRefPos = this.edge.dockers.first().referencePoint; + this.targetRefPos = this.edge.dockers.last().referencePoint; + } + } else { + var containedStencil = this.containedStencil; + var connectedShape = this.connectedShape; + var bc = connectedShape.bounds; + var bs = this.shape.bounds; + + var pos = bc.center(); + if(containedStencil.defaultAlign()==="north") { + pos.y -= (bc.height() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET + (bs.height()/2); + } else if(containedStencil.defaultAlign()==="northeast") { + pos.x += (bc.width() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.width()/2); + pos.y -= (bc.height() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.height()/2); + } else if(containedStencil.defaultAlign()==="southeast") { + pos.x += (bc.width() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.width()/2); + pos.y += (bc.height() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.height()/2); + } else if(containedStencil.defaultAlign()==="south") { + pos.y += (bc.height() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET + (bs.height()/2); + } else if(containedStencil.defaultAlign()==="southwest") { + pos.x -= (bc.width() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.width()/2); + pos.y += (bc.height() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.height()/2); + } else if(containedStencil.defaultAlign()==="west") { + pos.x -= (bc.width() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET + (bs.width()/2); + } else if(containedStencil.defaultAlign()==="northwest") { + pos.x -= (bc.width() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.width()/2); + pos.y -= (bc.height() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET_CORNER + (bs.height()/2); + } else { + pos.x += (bc.width() / 2) + ORYX.CONFIG.SHAPEMENU_CREATE_OFFSET + (bs.width()/2); + } + + // Move shape to the new position + this.shape.bounds.centerMoveTo(pos); + + // Move all dockers of a node to the position + if (this.shape instanceof ORYX.Core.Node){ + (this.shape.dockers||[]).each(function(docker){ + docker.bounds.centerMoveTo(pos); + }); + } + + //this.shape.update(); + this.position = pos; + + if (this.edge){ + this.sourceRefPos = this.edge.dockers.first().referencePoint; + this.targetRefPos = this.edge.dockers.last().referencePoint; + } + } + + this.facade.getCanvas().update(); + this.facade.updateSelection(); + + }, + rollback: function(){ + this.facade.deleteShape(this.shape); + if(this.edge) { + this.facade.deleteShape(this.edge); + } + //this.currentParent.update(); + this.facade.setSelection(this.facade.getSelection().without(this.shape, this.edge)); + } +}); diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.collapsed.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.collapsed.png new file mode 100644 index 0000000000000000000000000000000000000000..a58a58bd1f3ca7c7ff627bcaee4718a2d04e9f19 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQmMGx;Tbd z^e&xzkhj@@$92D;@z*PiMon)`johy{h*~jB-*Dx<s+*`%!=dRl9*=CS?{`f&BHYXH z;9dSCd4~0s^NyY|%Sw)QQSraLr9mZR>x@XHPV2-p&roj9JG%-*R-NJ%=$<E0b(TAR z7vn<3Id54#N~bdZl)oA0-g<0zXLW&y?biouW(Qnu-ciFU8Rf~CD=G8)W6RaM!P=Sn x<^E}54Oxpip8T4*FFg19=1>=-fa5=0?3XOLWx0{HU^me944$rjF6*2UngCcma%=zq literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.png new file mode 100644 index 0000000000000000000000000000000000000000..db72fee2e91e47f3dcd60727031d9aae6eaf8e36 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQtG(T^vI! zdf!go$a~m8fZ0>oc<CtysfRzaEBe+XuAjho=Y+Rm?^7*C7RywQ4GAA>9xz-oTla#E zVdl>be_0CRuTPzH?wbD2Npq&B-b|1d3{(}p{bJ)1A;GI=yZG!Zm1@Mc7(B`piF<4m zbHT)P(_!9vw*AQ)($ikn&YI~O#M);#aZbPCUaPhg2J4fO3>Bs4^6QSt{F>2lAR6d2 N22WQ%mvv4FO#l&tVW0p2 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/expanded.subprocess.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/expanded.subprocess.png new file mode 100644 index 0000000000000000000000000000000000000000..085343c84e98d902680df5575d5e4ed1ca3604ec GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQtG&T^vI! zdXG-t$jfZV!+i39v8pfI4?&%^4-K2*4`=N=&$M!n$YqPU%oYU=>I>W+Y*bM3I@G1- zZPLKP@UCw97Ums(MZGC2x9$^SDET2Mc%0|$yXf@12`zIrt2~_k)8Mr19Qg@u-p0~$ z?k)vd2`PV;eYXA)?NIzZSM1e2wl6}SVxGHa+Nv8%on&H&seNu9ay*L5=+A;ZK$kIi My85}Sb4q9e0D3oGY5)KL literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.business.rule.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.business.rule.png new file mode 100644 index 0000000000000000000000000000000000000000..7b3f3b671b0a8ff132b56b458550df699484efe4 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQtM)T^vI! zdf!eq<YI8-U_PEKzf%9p%$=vwZYEiB&lYCl(&}`a?4myJn#l$RrANZOXSSF%|77(z xbXT?WP~7|g+s{H_s=KFNzxL1kz_I-wS$jKj<T<oCOMoUbc)I$ztaD0e0sybaLYDvl literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.camel.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.camel.png new file mode 100644 index 0000000000000000000000000000000000000000..1682eb7e4f3a7f1a3fedea53b7f51901ddd79494 GIT binary patch literal 608 zcmV-m0-ybfP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10o_SNK~y-6m5@JZQ&AMgf9GD)1S^$N!9Y=PkOT)OsZhv}Ns8d2 zJaUupHp%8#9OITn9l8j`q454VxH+ikVh0rkwV*>w?GgtC@!$G<@3_2IlN7AIaJlz8 z_xpZ_dqh?7Ja67wdjWV7$MKK@EaRNJXRRFqcY$r^T%&mGbUL%1=bb5Zv)Mef2OuI3 zf$zDV0xW><`_oyLZCGpHIOoo{+wIHMYW1gc?&26AilQ}OyC{grdw?WKR)G^hSwz-U z^)_%ASn+*-dKb{^^-91(u0PajwQsFfYZY*XNmXk(4B%9fB!k_Cs)}>&2XGWffY-p{ zKC@F}%u*PJj|;#$(AXz5xxSQ2rL!jg_wNIS0VGM1>jpqoU;Srj2Pm3t0Y?l#rBWFH z&j6hWyvWZxBGRbW>!*R0yf!N$4@C8E#yPhLq`*z!oiXNCmSrDBWGRZGM*!V!cP35K zE#SDSE}PMIaU4HS)ATKH&RRPN!*B=K0A>nL5Cp$ebs0cJu8aWy%H{GLuo(owr+hw7 zfnyW4m%vwGeh(l`(@Vg5p+)4gs#Zrm#+Vu~1g6FSp68teu8GL~JS?i}1Jx0aRn;3J uvZ<<9QPqEL=UlJdZZC}1`u)Bs?tcI@I?dC<cm34>0000<MNUMnLSTaa>Iakn literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.manual.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.manual.png new file mode 100644 index 0000000000000000000000000000000000000000..8dc32983d825edfaf5ab40d3721db2f3ba3e3b02 GIT binary patch literal 405 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$m7#J9ZJY5_^ zEP9Vl-spAILBRFBEbC`3=CG*Wtp5%MZ`icO(@Ezq``R};Yg`1f9X$?}g+<-?VP$_X zXv5}!%2p1~b-kR~3V|LE515tD+-zK)uECjn$SsvQ;>~W4%O$Rt<}ImZm|i(={y#2- zlPaFu_DwEh)M0E`@^oMOjS7L|g+8Ao4(wu|<83v)BsFbqWNM_H<#W3z2NBoXX=TP& zf|g&3oR)fd8>{hY_DR~F<@*xS*2<sN|MHC^q4CMG`d7R5`AvGVXzc@jL-v5uE#~qD z7QU0_dDc~3@(vAEw|l^NU<<!P(PHJjOcBf<?o||+g)p9!Y^a{Z?kM1M$RMWloGp|6 v^9K{22sWH#c)d-dOSY2xNPYaWiw*j@B`I5lVlR9F1|fr|tDnm{r-UW|k4&8t literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.mule.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.mule.png new file mode 100644 index 0000000000000000000000000000000000000000..6b35fbeff81ac5b85d606a8c05512c9ee83a8657 GIT binary patch literal 705 zcmV;y0zUnTP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10zOGZK~y-6b(2p>R8bhkf9F1oky=NAP!X7rn`mQ-Qd@D;qIvJB z8{0?{Oh(&qV<j?>n`o!Bn0aqz*B@F|Ye8u<ISeF-P@8cfB!YV9Ytb8<#6Gx-``vTS z_lI+3W^_grMZJ>7ft%R@SO?b4>`j`c-#hVY3rJEN#|1Nc4s>&R>`Qujbab>-tyVpN zYm>t;{9tA;fgG@R3V9F6nOV^}_fC?I1>!g^NE!t;Bn_F_%t^MH%}5%`Fr#rCKL$`3 zhP{%$0xjp<^-`&{m5F`^ZfE>2Ns`<Fn3$Nj)M~YAK$rLahRYV#4J?#OrLBBEAG9k1 z2f#tQqv`4CuB^ZUaK<@z*L7_A6F?9I&n71)d(t%B0E$2{P1B8hK7VC*cXzQ9D{16d zAeYO1%N{4Z_sf#xy`T5q&r4De1S^v6bz&vmQWQl$fQ!z#-owMgtsn??fOEjZBuQQY zL{U_bv;^$*_4S=^G#Xc1tyTm0>43Ft=D}*UdLZd-*2!WRh9hAZj!1fu<=)TD&9%&I zFuSh>{r&ydvTa|e)oLrvW^)x70xnCMk~9T$0jt1+TCMi0*=)WBdVsPsvof#`4AkrO zLXsrg-uq!-v%?0P-uvMsNw(|tdI1;!_RTDjnK3>-{wQ;y2a0C4EU6CYuaB%x(tY3w z5J;LWm&;2svtuh~ZiGL!J<GpwoHMhJl}csI%*?grE0xNaq}gnolVq~ozNFbU89IJr nJO1;X*MK!ME2nAN=*0g9+`|#WTEwHU00000NkvXXu0mjf<-a=} literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.receive.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.receive.png new file mode 100644 index 0000000000000000000000000000000000000000..fffe93fb97ea2f1447df8dfcdcd9debb9afd3518 GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQpuRx;Tbd z^d6mjQ1Gw<56kqP-vzP1b_y4$|692(#7S<NB;%|KwK^C73u{Z&=VYz5S$SRAbOS@j z3IF63Sy649%?s|lFiUu=R`BTR3Dux3kB#%Ly*9RJkUeotqI2`tEt<Op-kugd(tZ5p zF`j^{N=gz>toV*9CakC_wr6HrFYDv7tik$#`TEASoEr+)seO61`C-gsmL1=`x44DB m<@FJJ^T^C1{^k4n$Lveu+-&7fWxfHrn8DN4&t;ucLK6TfN^xBP literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.script.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.script.png new file mode 100644 index 0000000000000000000000000000000000000000..674e4b89f0a97f1dff8637ffceec66f19ef68624 GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQnXnx;Tbd z^uC?Ek@t`TkL&%&OaWWx3l}zUd7KmT=$IxL(WrKk;f%vfC0QX;*4kUvmlp<ioN!%u z<mvW*oA;|)8z+0E#wwowymsc?#+%~t%1W~rX}l9!z3SGi$h5TMjR#i?9O87a>a{Eo zn0Wfbr!@=JnKtO0{=~L}g+tG7(JHmrEvr_U?~zU{`O9d}kixL)7mHZuJoo!-Upp3F p=WqC4$8N&;OzOt*rrE#F>6e=rtPQ{1&j@rhgQu&X%Q~loCIAlOZjJx| literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.send.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.send.png new file mode 100644 index 0000000000000000000000000000000000000000..8ebe452eef430ca1a28af78cf7d8616e7a7a4451 GIT binary patch literal 440 zcmV;p0Z0CcP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10X0cPK~y-6rIRsgLO~FQ|8c#8!OB8J@D{#1EN=#jkOP=jtGs8U zg-tGyatHPfO5!OjQltvx5X+><dyf~;pmC~Ym+xc#S%%CEw^ZjQ8bB8Sn7IJ(bR}D= zYS94zRV@IN*TO&*K}053NJ>>LL}bzk%xotj;|nA;JT|jkBLL7dvz_;T_=lua)xvu} ztl(Z-004dG+@6^SCnTk+7R)?w&g}v8>xZ-7*pf5@J5}A*`7@<7jWK?R$P&Oy4T?w) zz=Nu;z4ue++*{p6E%+j$EXMfG%+CPk0PbhASqA(J8Ni5{?_!LPB9fWeYZHNpvJk>C z&+}~s1HdSybVw;30F0`;d7kIn5W<m&G60}@7er)jW{Y!K+eJj15W=$QfSFg9!d0XN iGp~Mi@ZY+58@~bGJ(cSd6)EEY0000<MNUMnLSTYc9kG%C literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.service.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.service.png new file mode 100644 index 0000000000000000000000000000000000000000..8035fb984d9755f8befddfba0ca29928d16161bd GIT binary patch literal 530 zcmV+t0`2{YP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10gp*UK~y-6rIWpG6G0S(zq`h0Xb`SZ1maK1TOg6(M6uGv_Ili` zfT!R+QqXL*-jP!RQhpREZvh2GQn*eR##pmM;Tf|wIEuuPR@!^_+@Eu1N4)p^5ALn| zkY$;&)?NcBrCNEO+kf$rdeH0jw$e1+0I=3}00pS&bh-newSJ<tZr5uhO3+%jtE&16 z`~uE_HqZ>b8E^u;0q!SBvR4$v$*P3!q4)vNS=qE%%l!=8WeG)5T!qOI6X0WbCbj%| z;Qo;i4C?@+Fm2+Tdp#bHe*kp5-4~5U;{tdb<P4NjU-CS+NigghII3wrjKu)q{jetI zD4tN1Aa%js`=xkYZqdLw*Q%;&o4JXI$cHS;9!1h{ID9A~??X5P4wO=@g$EJ+e*aiR z;yGW6$fq#*9q=sVkIS;$T{00MP1C2qH|9UjZLq**S(cXz31RJ*%niEn-hU3OM$AI) z255TkUoCk6FdB`{k|f!4&TSfF_JKjI!N3@^@0@!sB5#c`r+-OU#a%Dc+6H&UZ`RAN UZ45v<>Hq)$07*qoM6N<$f}+0Zod5s; literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.shell.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.shell.png new file mode 100644 index 0000000000000000000000000000000000000000..53226b1e91833e777b6dd811db8da22efae83b6e GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQk-zx;Tbd z^sb$JkoS-QkL!NUVgt@On#@bOY!jlEGK;*6iCDmF;J)NM;|c~&)6ndbL41|=|N3-Q zHmaC)XD~!Fa461kePY3`Qki*s+bxCzF+V0p9zW#$aZ0gVkk@z36KAw0{S9Zee16cf z+<5cfDGog!|Je02X)fK}Q88)mDmgFRHP@SWtt&sb)6b=*=i{nXk6TQAmFq=4lv*4n zeYp4DW0A`JGt*lq$^Ym*YAeBdW{p;>-TS=8=P}GLLbv{SD$X3a>m0w5SU$IxRU<FZ OHw>PxelF{r5}E+Iym)v3 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.user.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.user.png new file mode 100644 index 0000000000000000000000000000000000000000..60562a0ae228c519d3f4571f48a892d42b546165 GIT binary patch literal 405 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$m7#J9ZJY5_^ zEP9ttHuO5;AklhXUM*om<UzI8gzXP_w?%p^pQqrnO7j|bL`2ty-d6Dqo>T86MDA{A z7f5m3=B<1q>csyXp~y1zzD?_EKL5YJr_tO===X^qXBKJng?x>3S;pY-$+BzF>{YAm zwxuu5b#`$H6=z6OIj(Y?A#K$z0YOftHCx3Q)aE5jwmGlg%rHrPUwWw(FH^|Zgp6nx zzGeo7*NO}$w<{cw*lfIoF@lw`P-Z<_(3;6AmAp)+HvM5S_|EX`?#=fM&+n|zzp%_D z<<%VNw?As9Zq_l*oE0~54|BmAPX>nfN=3J~y-mJs5^v9t{noO9eNsAe_wCF$hM4Q6 we^VG5o_x~p-n*-N8pDz6&Gnw&{+_%4+dsu>tF_WLU=T8Ry85}Sb4q9e0E_6JHvj+t literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/subprocess.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/subprocess.png new file mode 100644 index 0000000000000000000000000000000000000000..329b24ca9a8b24864dc214684eeda04b490a5741 GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQqJjx;Tbd z^xmC(koT|w5A(@G##`s}O%Tjkdy&z~@!Ev&7YwzPn%{((T?LM3{?TTv<@u<?B&3?? z!pLyujb0{Of$a-z75R7n_!ty2)qa+Izb?3artj%?a}TGUz)2sxL(e}A`Jn%oQDKdI zkk{FxCoDH}XP9m~uv_rkvX@M&cCu$OW%aDJh;B$q3+CQ*?NT&D!=$#p&c)CFFkbG- V<#F%55DIi6gQu&X%Q~loCIIbFWBULA literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/task.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/activity/task.png new file mode 100644 index 0000000000000000000000000000000000000000..dd4e53bdba2eeb5b598afff0ac944a6e19a207ec GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQo87T^vI! zdf!go$a~m;hvhx<`6(un2b4WxoS9RY)*lp|#2A#h(tk07-qammncq~nZ>YHW%tNf9 zW5?}#4X;(Mt8P70qtCF-+_V2o&Djfr8~d8gbAr7#=GM*BFaG)ZW31mn%^TcRE^9Vl uxbfEDl*-DR_p;WW_jI3rg`s52Ir)%tAp*012^Ij|!QkoY=d#Wzp$PzP>0M<2 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/artifact/text.annotation.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/artifact/text.annotation.png new file mode 100644 index 0000000000000000000000000000000000000000..ab870a29537b0b696880f5f3c0129c50c1aabfa9 GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQsIDx;Tbd z^ezpw&O2<tqbk|E*J1h{h2%Dd+@R-t(|qL?2IpPkvvg?WYrDEMd-@A8xgzHGlBt`W zA1cTzPY7bl7dY|#$C36`T>mvE8=X0metXrbLn@7pCBK%1G@kAf6PS4PE|Y7ZPUzR) zdW|}#d6evwmHNMa4C_(a^y>G&y}7q{ez#LuzF^gQmn|RfwKp1=m9VD8O-=o2dTsZS ztGsKr3WwG@A9<@=?mV~F(Pdso#@*7pcPy_T<&cq$$d(WJI=Q24<CDeAX?2FjY}y3U z&h2#8kz`1?WO8;&M;*h1#p_<za!E4$3p(++MymLu;UA`#OIE35EBNgM`kTSi)z4*} HQ$iB}Q^t}I literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/cancel.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..e0316621b8832828fb5b7b1740269d4102fe8aa8 GIT binary patch literal 3241 zcmV;a3|8}rP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Erb!p!tcr5w+a34~(Y=8s4G zw+sLL9n&JjNn*KJDiq^U5^;`1nvC-@r6P$!k}1U{(*I=Q-z@tBKHoI}uxdU5dyy@u zU1J0GOD7Ombim^G008p4Z^6_k2m^p<gW=D2|L;HjN1!DDfM!XOaR2~bL?kX$%CkSm z2mk;?pn)o|K^yeJ7%adB9Ki+L!3+FgHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_v zKpix|QD}yfa1JiQRk#j4a1Z)n2%f<xynzV>LC6RbVIkUx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Y08ZM)4<1)4UV@o^I9u(6;ecB8Z b5q=E-{<7}BCrlWg00000NkvXXu0mjf8L<hf literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/compensation.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/compensation.png new file mode 100644 index 0000000000000000000000000000000000000000..8b32f23847b5d49c528f2a613620a7e2b82d2908 GIT binary patch literal 3256 zcmV;p3`g^cP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Erb!p!tcr5w+a34~(Y=8s4G zw+sLL9n&JjNn*KJDiq^U5^;`1nvC-@r6P$!k}1U{(*I=Q-z@tBKHoI}uxdU5dyy@u zU1J0GOD7Ombim^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uT-J3cu6%imRnk>3Vl}_hNf{`-e)UQc0y!3FdLTR4R2XlWV|CO~!_p{-1DO z9`CS#8>qyYV>lmDuEmv_3JcNg9PZ&XK8GK+p%Bjij^JY;pQ|@g2B&ZaT_Ifyny?Yi zQN{j{{Uv^7mRR|H!0idsWa4lmPT(>o@BnkDF5QJRR$)Eb&>G+K7z(ph@h$daF15@y qreoXIgcBR%Urm)cd=H9?e+K|H-pU1~pP&f<0000<MNUMnLSTaM9u#%} literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/error.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/error.png new file mode 100644 index 0000000000000000000000000000000000000000..27603c4c86986f6f5b1a4a5b813ed68ddb8eec67 GIT binary patch literal 698 zcmV;r0!96aP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10yjxSK~y-6b(2qsj!_iGf9HxxnjIm#iD}AizG0!r%0#oIdGGfQ zF%~RjDA|mVQdnTvkiXIQo|%oBn#@8e!^{+BrKX7}rI@l1DgSyOi|>x!jk~$GbD!tA z=iKuglSFl8S=Mf54WI>Bp29Q0jHF_Cc=&Y{9~KT~X7zggh?z|TUBFsk2hb(yrlh52 zHkmN?k0%K;v)<m`F*9ogMuFYHJn+HY_b-6+JZ~$@@~)&7Nqr+DBX0sgjB&usT01&A zwgNR^95@Q}#TYvm1R9OTyAZ-2GpmIV&H#ig%i1Lkh7k77&CLO910K5jEN~6DRIRxz z%d5a5pgYU5_F!gpNw*t~#yenRx|~k<)4=)|<Ia@nE}#dPmvqC-Vn``ZCBk;#5wJSO zcnJ6koCGe!7*_#T(%(EyoUQ=W%<M%)U>vvwTm|+3*MaZAbKpJj2AD{k+P^l&7*_zD zz?!t508XWn27sTy;nd=Z1zw<OkPSdL@EJIkfaif<zyWuE?C$G;#lR2XRpQJ9nl9Uv z(q9QYareUA|D^f{V~oqvgPVa#cP|s?Wsp>uS$`7v0vxP#Z3Os~G6L8FOyqgqW@i18 z+$2%2*Dp#sYG(aKQQWBr5M%5C?$fmPTQl1s>71E8D2n2804U4y8SqikzC6#{ssipl z2FwEYfF+X7OZw*SLy%?xn!^-h9FR09={7J`Y42X(Eb!aRj=TGi64CxM&UKmwtEKP^ g&<>2c`|&FNFLL7VV$&j+9{>OV07*qoM6N<$f>UQZpa1{> literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/message.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/message.png new file mode 100644 index 0000000000000000000000000000000000000000..ba997f7d1eb651bae04598bc520494c611dff43b GIT binary patch literal 549 zcmV+=0^0qFP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10isDnK~y-6t&_2C6G0G$|NrDB1szY2A}?UOaVq+xfFRx8xv?mK zj?h>_1Svv7N(G^VD2mefyp}*Ia8G3;6#N1yc!G2^6yT4->*yq6Ap|3>cJ|--XJ%(+ z4X7?5gbmxJq-I)@G?O#~su<%%-9B3?wq2IxuI&l11{_OjNooPdz?$tzvhfuUkZtFA zKDK=$%d*~JF!-u#q}%PT&*$?~;M-_4+5#}3vMhIjSJ#nNiS5T#RUJCd^9|b*NjK9) z1m3P7Jpe*FUILp9+a+*fyD#Yo=-K{URn=jgoU*(l=}6N3#3?c@Dm_gR&VU`@pe)ON zjob$gfF0Xs37$%7Ws;h<&zHtA#<A^fV81Aey`m`gfPLHBF~)K2Ip>m^jX%`tS=xWD zGH7TqAnj#qLkL^8-${CI`=cZQw}1~Jgu7Xm{YY5b_N<}Blywq#+jb9l5@UQ>3-l?3 z@ZI)%;51<!Nnd_zqok3fH!CuJC@D|+C9wJLgY;iUIeBzZ6pw(Xz=@>kvb{iCQpff^ n+b@R0;cF7{%E40p_B;OqTC)QV^had)00000NkvXXu0mjfF=Fmq literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/signal.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/signal.png new file mode 100644 index 0000000000000000000000000000000000000000..19ea91858e1f1c91156e76a78b0a7755d1396875 GIT binary patch literal 627 zcmV-(0*w8MP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10q{vgK~y-6rIWjA8&MF3|Nm^|fJ(nW3}%~DQXG&{s0|1eDfXH| z<OO6527?P(g~6mSNpD1o?CMgakOOJcNDv$~sYD9Bfvd3YcK;MUYZj5X$-sd*GxH6@ zTqp@u34&msWCWmY9{{WXtR$tA$>dix-joVSMp1M~av^C)(iMOPfQF<iNjoGLHii$J zB#@-<`(H@bj4{0=NjA2cQvjGuCg%VU$MMsmC_YO1J)KTFl4JlN48uOjn(Mml3cN@1 zh~!Za1bYCGB+15g-8RWu7>0cSpzr(pBp1e*7bOe;Q54N2{j}d_<MG%peYTSCl3Ipj zBxzKI<2XK$)XK8#GRv|{059V>J}CW3l58Z6NQTCCdRgskQ55e0oXzL+yZL;62jI-w zs<H&oFaYW#Zz^N#klfAld{o-<JRgzV4T7Lknc5A2x~Zo0JkKF{0pMgdo8_h5>L(;G zJkN8gjKTeaJO=>Bae5?g(=@%_Di>**UX#3a9H$2WmRT9xZ&|b3?LGl8Bze3ISIRyH zFto8v06!kaNb-%OuK@V31Xe`ym84IST9kw+iVh{cc3rnU7z~QX=;3f^*6Z~*lAqHw zegEhxZ_D3SndLQ-WEh5hNvD!V0G8!=ZNr)*-;z8ZkH;TmLH_SK{{ew55NEsU{AB<D N002ovPDHLkV1j7R3U~kj literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/timer.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/catching/timer.png new file mode 100644 index 0000000000000000000000000000000000000000..adb275f4e91a42d1202157b5da038036310928ca GIT binary patch literal 573 zcmV-D0>b@?P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10lG;<K~y-6rBgAB6G0UIzS)Qb3@NOxwK%pEQXJ$gQim(f!fa+E zM8rOVrPUVcm1{#t0-K$rQt&63lM`brqzG8qh#+=C=Cin6StNHL_rbt>^WOJnc<+0Z zgfhC_?jgw-KqEf@um-S}G<VKz%K4@+NHUJ&=OkB>s**+k4gefT8cC{>T;)0Z%aa6> zjH2ir$(k|dNt&ix>_M;ByXU>1Ncy!{EKVfJ0D!f2K(ZEwVe2X~0HkTU4a2ZSvSzIv z005&XIwZL=#vENo27ow@9|QPKa^t<fkaS!j8A}>pNA7ew)gTDY0JJ1^oO9c5w>u_j zD|x3!dtQ40;FY9XK@i*l@Oih}HI~ce&phQEz_SW~2FViuEEkY;2H<|~e$BG%Q8`ZX z4S;V3SL1iduD09l+xwCXE(LP>Z-C?r03S)N0eq>~>mU04{@v0KPXVkexKvpaz}s?x z`F#E!z)|5_Yah;Lvmevxw76;l`1D_6ERYN8LejBu&TU8zz4wzONv`V&03b;c<Gr7d z96IMVH<mJsZ6rx+?Lg8?Nn-%#`KXG9HAy}tIn1)`wQ?eFy3T(9qcH3e6Wth>00000 LNkvXXu0mjfshaW4 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/association.undirected.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/association.undirected.png new file mode 100644 index 0000000000000000000000000000000000000000..f7954dce42305c445aef3fc5a0b2c7c3de6b004f GIT binary patch literal 413 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$m7#J9(JY5_^ zEPCfoHuO8}AmIAnCnln)Nvz9cN{5k$N5_LZ2eYeHxwePgVd1J$Uiwi_eZj#XEx!j$ zoy<EHFZl8<z*32&XYRzh&DQ_VPfin8YKj#({xQVGL8)ouRF#ve#?jC3+<ehs;@iLX zyNiqau^FQMhS_VyUA~+;lhhN*c;G>U&3S%?H-dpd)1FqB%kj+BQ95nF<KMOD$B(-2 z`i>&5jo<&x=~!1ki}6doW47)0d-u(KjaRQ)^>^*^=?*S=Gk$*4FTTEIsm|$VnX~M8 zD+8igyjFI0+!4I!EFT*#9ep7x-r(~gOY_awb}2GuGcCQcuR~|%&(sx_z7tY!h6=E> z=iZ(dm2KZXi!mYS`qwEl=QG+!CEq(XgE8T8_Pa&;CPi;W*YZwN0R|<5r>mdKI;Vst E0Dya?kN^Mx literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/association.unidirectional.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/association.unidirectional.png new file mode 100644 index 0000000000000000000000000000000000000000..7a9be868d08efc8876b7039161b6db935f62d259 GIT binary patch literal 3032 zcmV;}3n%o6P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<i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dT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h z1DNytV>2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00034Nkl<Zc-oZGy-EXN5QX7q6BY3fe>y=y1VIsPt;9R<CcGD~!B(&l3(H_-FM_>| zC<;LX5{-+=CfZCSpmBExzTzv+%z0-{qFk+G51%+eXQY5=9LLy26;n9G0vgo<4KmE* z60capDe7oe3R*wIGH&pNdvuT$X|RnNjxdQUydgz5$q{d0CNSzTbs9Z9=ON6-rrUTx z3r##mvlND1VGBFh59UtT&f@=5e>q5Sfa{pviuX%AEGV_O@gn9h`k!Dh2P<)^i{MKK zCJ(JX!V=EWz#Tq9+|IL|U=ypj#rwdv3o%zB<4<@gyRg24F-$}_(lX+H4zghGp<6}_ a-va=UOi%*TwY}y50000<MNUMnLSTYWKA8gm literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/messageflow.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/messageflow.png new file mode 100644 index 0000000000000000000000000000000000000000..cd6bbafc0eab1a0dd1f7f52bb2be76ea99056f78 GIT binary patch literal 3121 zcmV-149@e3P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%L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gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h z1DNytV>2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00048Nkl<Zc-oZHy^0i36a?UJ*6DVpou5VpH4s5m)(H$ZF>#RrjZBQ3)Wpne5>fC0 ze1c95M0^nwF%mWq#9c7(AA7a$%z903BJ0k!6;)DI=hV5k<Nt6O*U;c87Tp%2Sy`5| z5W>|g%kt%Nnbmdu7$@+lP3mTz=b@^q7-Nj%@wmZVTtcsnL57Ee!C+BURV<2P7q@U8 zZ8mTmJ9v`k`C>F0y}}KgLFX`s>lmft@({vS2;m&Q;1}X5g9~_ud-#cOc!56llEHyH zY~llMrnEhL#S%x*N!;2$#2a{yb!?~P?@90*3xve?O|X$fckmW587vathb~THmd1LJ z`0JFgo08*!O_gQ&ayp%ce!t(~5w74A@?^RaYfaOv&*$@OGMPjSQZLP_vHwC*6!&|* zUOgNR-{3Yb;%M97)xj~G#cBM&JA6*3I~3jYNZ#XPDy(iRhCc%U&HZRG)o6B&00000 LNkvXXu0mjfl>OB5 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/sequenceflow.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/connector/sequenceflow.png new file mode 100644 index 0000000000000000000000000000000000000000..d757a24405b663ff6c7432b8fd66455169f2b293 GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQqhrx;Tbd z^e&xbn0MHK$5mcef2YebnZ?dw<>rjid%bTNf8i5*AgAEn&J$TRpDB{(zh2?QZC=V- zSy(uh++%h<sq%6D3U9vMzgMkVrF&t<O|@ec^}!F`&EB<6+S8XKk$Vk;ifwwSfK$bU zE#6bUF<jMk?D;5I@oSph+0Qj6gcxSr)c#O6(W>Wh#VMgLwe{*RkDi&eRM_~o{@3{Q z0><r!4P+XVub28<{-U`d`@aICx^iV}jD@B~V?Br0L;a@x2MXjC?OyN9k-yY{VbTPb l+uL5J#&23@mz-C_pg(t}i}jDxFrXJ1JYD@<);T3K0RTA>fjR&H literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/dataobject/data.store.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/dataobject/data.store.png new file mode 100644 index 0000000000000000000000000000000000000000..922f66f708b86ba3e38a90de2040ece9d05f5228 GIT binary patch literal 3184 zcmV-$43G1PP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Er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?YcV|Fs140R_O}dh*fo{ZUU900kKK{ncUL z{|Z!r<OXqIA3E$UC_pWVD-TA>)1K#zd#Y1Few8}SvXv~$77vfUeTjl_|11H((U0$I z_V{YAavkmS1@yvZ*V-R$iNingA0$v<^U=d#RYaEUz{IsAjxPpAL0AEbcF<k}o7nbb zVr=}4s{7IrXIeyZ;F%5XQMZDoF=p#HP1pAh4>rycSndILZ7*;|OXv2Bd%g{HP6hzY WT7M%~IriZI0000<MNUMnLSTY%jq7~? literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/diagram.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..45c5818ddef709803bdde1cd11b6c56f1e9c5e1d GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQr05T^vI! zdf!go$a}zm=kN<9_fz7(d`i8ZnVpkhWZTnm;m`(Ob!G+Q`ruVs3>$h?Za;hN`RR?# u+P?*i;stC5&o)0k9JS%d4Udx2I>yQg)|@LcyOscrW$<+Mb6Mw<&;$Ubh(s0u literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/cancel.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..a7bcba9f9db0b5ca3eeef3ccbf635fc3b4791784 GIT binary patch literal 3280 zcmV;>3@`JEP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV000U>X+uL$Nkc;* zP;zf(X>4Tx07wm;mUmQB*%pV-y*Itk5+Wca^cs2zAksTX6$DX<Nq|rShJ+?|L<L3^ z5h+$=RKNj8hazJ|6bplbV%G`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/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/error.png new file mode 100644 index 0000000000000000000000000000000000000000..3e310a73b4a7d23e61f2a80e29e57bad1e8718f9 GIT binary patch literal 757 zcmV<R0t)?!P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10&+=2K~y-6Ws^^6RaX$kf8V+H5lDpS<~0hs3Vp=bx{1`fdy889 z({>?woGV0Z5rl$*E+Zrqq;wZT-9&IvNN(W9g`i~9U0SMOB1FX`L~xY`x-g^<D$;w; zxbVF8m7dj{`DVVE`IwQJ(fwMj)?k{ZgTQBImI0XAGO!#%$cv(Q*&XjXh9qTKb~Q<o zRp3wv;W_XDuwT*_lD<olWHrmOtCI8|0!i}T-v_3Fzk!32u1UHK+>!JGFrXKh_TJBT zNF0Fo{t9p=lHND7&w-E3%;x9kFXeeYY-S$=o02wqdV0pa_um3&baZquw%rSCrfGV% zEX#F3z#mmreOMI5Zq%p0R;x9us;Wzxs;cU!bIzTQ$tLN`s;WMX$pG~<O(#0@E-Wnk z8A7-&X&=z*oICG;k%({PdA@FDr@K`)vn#Dus}V=N4D11hBRt|HbqIcIHk+xLodo`p zbTRsCNs>&Bjg9RGevq^z>2(x;#Qj@~H}!h`grvP@HlFACPr!qSohr-nXP`fXuw-UE z9dZXeiEM`@odJFw8XEc$AW4#OAjIHdfDpnjz|rVicam1(=XXg>=iE1wlam2pc6Rm| zkau;t=A1hK9E(LCy0R>9OKO|hV>7$gZnw9(MXai7g7?dXnJr100aD;?S(ekTD2gp$ zB80FisnOThx8l9;v`A4DuYj3YaSiw++EYbQY^4C(+uOGW1_sUn7b5s1%d$1#k(srf zb1P={MiTM(?lu~Y8vyFQM(_RCl5X*SvAW+Da1%HJ?CkFD-dtQ<eEUBF_~)FzGPC2r nai9jQO8Q>X)4931o$mN|Yj^t$$N)2W00000NkvXXu0mjfju>Dl literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/none.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/none.png new file mode 100644 index 0000000000000000000000000000000000000000..c46d16020b9370076ebb6adaa69af35e0480aa00 GIT binary patch literal 467 zcmV;^0WAKBP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10Z>UqK~y-6t&_1%0znXlzgcn(1y4aop@D0B24e|<Z78==Yo5Sb zt*)dwF4r2Lf#xJy*!dJ!&=7VkoJ%eSf*SvBcK&~McIIDERoa+LCVl6e2T~D90aUdD zsu*KlmgPsAFHHdvk?C}L4cq};4r2=}ilTT_6N;)f;wRwJh&y1Ts;^f392f$L<)4e9 zxKdRWRb@7t-2nHNd=Zg(p6BoFtG)LFRb2ujJGx!1Ru3{BkNcfY=gr!F>GgUSS(fb% z^&dh=>bhQAk?nrJKXW#)F0d1k`7tp-mSsB;ncEY)&N=UZ)bg9}Z6AVhHWsF?wW`-s z;s&kZrtYVrV{m4YW>r5z!&TMF0hOH(z4wDtV&e=gtXzyS=gVP<sxCta$uV&VAu%r` zz&6I1JM;F!IHS6**M~as-Va(H09ce|`SCwiHqzfeQyahi&Yyf;#@}6GlmGw#002ov JPDHLkV1jA-zYzcc literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/terminate.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/endevent/terminate.png new file mode 100644 index 0000000000000000000000000000000000000000..0d6f780d46a0b0aa61e30164b4b73ac57e7ec407 GIT binary patch literal 3166 zcmV-k459OhP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7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3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BK<z=<L*0kfKU@CX*zeqbYQT4(^U>T#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h z1DNytV>2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004rNkl<Zc-nl^y-Su+7zXg4&nxu$L1j|X5IGctkz_*96fKb$5e3y2L}ULzO-<3z z6fXS%HMrGKLxXJ*fe;Eo4iXhf?@(mr3u$l5^~fpI1BY`z*LBYQaozXBzpEd&@d~Ti zuW=Vc=(fc=g++8W*&lHcJ*fVFe4)7b3)8rTo3U34{sy*}PIlo($hlmY#Bm(TJ|C_V zXD85CJGc|#JFcdb!?=Re(PaQfa;Jkw*jH=vrT`}}hId8EPcfK?_ku0r82YQE2(xJ6 z5)KynOhmkGcpPjGcA#0I9q<p9v2%kC4F_M#cNK??3LgTF=X{9Y#p5p#u)>*OpKG## z15tH9p5QHBpc(r?YF>`riy6GcQk~w<h%<|mY3(qMVl)As7jts07O{~TXyGjO;&NK| zHPOytst|iBf!^a=T}mIWC#B6sc_}k9iIIAc8ga0O1w0GUn=%BS!F|jp@~4#2=_=H& zBHRFW=j;i$l9F0E+iAP54SL=kN6q5*UCpC*?Dh3`0HzdhSxSJjp8x;=07*qoM6N<$ Ef`UNfpa1{> literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/eventbased.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/eventbased.png new file mode 100644 index 0000000000000000000000000000000000000000..7aa78b7186eefed78043a9c42d5b0a761888b372 GIT binary patch literal 492 zcmV<I0Tcd-P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10clA@K~y-6jg!4f13?r<zdN(V1_JiJKnh!*AXbV-ZB~Llf)-+B zAxYs+?<)kd7!gE41xdPqFW@uS3QAazdp`?zWwV=&PPfdS!`w5BkVMsLx7%F+h~v0h z^^f}lZUSg#qJIlgU`18eRCNu&N|mG}$lxSNw!HUeK@gm(>SmS1&4N|+Fbu;X08cXT z-anH(m?e=cVg`%IHOV6p+3)xJ_vu~>z$M8G5!nMU%)$!EU)ao!opV<~5G?n4y|=>Y z76H77$S%qAOyaWIs=7KD48{Py%q%I+I+;v90BEDp7^~_k(%YG8z@K>@%xt|VsMTsM z08gDx$EG5tvy8m=k5LrWN!|k3E(!qbnAuGfMRo7}BY;sH$K6sy=UmIoUP<0f)fU-E zl4L0i!~0UiT&V0OIwTiF#E}#cac1@|A}4vcB*;tBsGk6kJNB^nE=q!;1OTewN<m(d ie$IsF3UZRU&-ojr)ZkzaP5i$A0000<MNUMnLSTXify~<g literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/exclusive.databased.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/exclusive.databased.png new file mode 100644 index 0000000000000000000000000000000000000000..3aaf8fa44b2de7cc38d4699894fab3433cbb12bf GIT binary patch literal 462 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$m7#JA6JzX3_ zEP8t<+h#Ev3bfw$XqEiHSi><t$(PA&MoITvCD&InN&FM7ToocOnDKENs@xF2b?sPI zn!4+j1#7~~ShT);-Z!&SYT_y-(`&Cw85vR|#a3EB>#|^;P`aR=xhX+SiCZv|Va8I0 z^ac-`@^i9tirEEcE>}=f&6{<s{I~DrA0jPQ!pVjW>PovT=lXdwBs_}>-Op$foxPo* zZ0^Qo`s-G`@^A@ekTkx2CWiS$M@CfW)s6Ex*M_ZTasV3r{0<|-C!6iZW`u|CWoJ;T z%D?^Xpr!i5nw+(NSvJVmu)hE65vqPSDpdX6?~4~=g|lt~&8?i*-`O#vviZJT1-EhX zGhV^Kj(w~f^iOY+Fu5pEynNO6Rlg*>Dijy3-<E6tOD*WmslRd^!M#fFA6@(R*wNxf z>C+hD`Kbm|I2o24@pRzfJni_=)q!Q_kGb^>5&5^y#UI>s9~kxwp00i_>zopr08P=d AmH+?% literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/inclusive.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/inclusive.png new file mode 100644 index 0000000000000000000000000000000000000000..13e84f633bc517f7dc483cf37ed8c3980c7b086a GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$m7#J9JJzX3_ zEP8t<Z_GMuAmX}y{)L1S_LdgGPA4@MZw+Aj+upSBe*j18IyEV0#mUZp{2BS5dCF?B zhi<!+ae4B)hx>jnIb+#=<x<pjh6^UXb9Xua@9<`L%26fpfK@x~p226f16r&z8JIra zk|;Jk7BjPQZc|Dk+u{m|wz&e2cpV=0Tcy=a4|>PAB~fjPKs>`2mo2J`bQ|J03MJbT z#jQ`yDXz~+kNn2Dz+Q&${KBiNR_$YWa&D)%;*rb}r{r77=NY(^e$8n48m-;r<F&SQ zuFT`b-8Bm7ibp&(w=!Ia%#MHDz3-alQn7ul#g|RK=5iS;*7dKg_$X|w|Jd_R)Q8qE zubt`7R2%L@Rd2Z_$M~c;Nui2;;besnmTk9x#QQK9vM>ZaQc-C6@pjD*J%xrlf6v() Y%)hjA!=>mCz|dvzboFyt=akR{0Be`5RR910 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/parallel.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/gateway/parallel.png new file mode 100644 index 0000000000000000000000000000000000000000..ef82f48737b83912c5a042e90549ec8773410e55 GIT binary patch literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQpWJx;Tbd z^!8466lzxBVG!T(Ewt(qd&9qD_YFQYe7mx5)pee|D-K6AKVzGGS4G%hsmPWY&np=_ z4E3V=_BL2Axb3o?Rr^Bs2@NIX3)z$G9a;G;pXZ<Zsjbwkwo%ujCBTVesp>|lnl(#2 z-^lJzHN0%1>!7am_}Vr#1`kci_kRyterK_JCH1~dbLk4@oV!b=oGIHLR?qle;&D=9 zeP;giJEyDvUsxrZxMEv@s%7(c!B-a2?#=$J?wk#5tDB-W$@xEAwqTOU{?GhBm39RL TohoPq`iQ~P)z4*}Q$iB}c07G} literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/error.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/error.png new file mode 100644 index 0000000000000000000000000000000000000000..27603c4c86986f6f5b1a4a5b813ed68ddb8eec67 GIT binary patch literal 698 zcmV;r0!96aP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10yjxSK~y-6b(2qsj!_iGf9HxxnjIm#iD}AizG0!r%0#oIdGGfQ zF%~RjDA|mVQdnTvkiXIQo|%oBn#@8e!^{+BrKX7}rI@l1DgSyOi|>x!jk~$GbD!tA z=iKuglSFl8S=Mf54WI>Bp29Q0jHF_Cc=&Y{9~KT~X7zggh?z|TUBFsk2hb(yrlh52 zHkmN?k0%K;v)<m`F*9ogMuFYHJn+HY_b-6+JZ~$@@~)&7Nqr+DBX0sgjB&usT01&A zwgNR^95@Q}#TYvm1R9OTyAZ-2GpmIV&H#ig%i1Lkh7k77&CLO910K5jEN~6DRIRxz z%d5a5pgYU5_F!gpNw*t~#yenRx|~k<)4=)|<Ia@nE}#dPmvqC-Vn``ZCBk;#5wJSO zcnJ6koCGe!7*_#T(%(EyoUQ=W%<M%)U>vvwTm|+3*MaZAbKpJj2AD{k+P^l&7*_zD zz?!t508XWn27sTy;nd=Z1zw<OkPSdL@EJIkfaif<zyWuE?C$G;#lR2XRpQJ9nl9Uv z(q9QYareUA|D^f{V~oqvgPVa#cP|s?Wsp>uS$`7v0vxP#Z3Os~G6L8FOyqgqW@i18 z+$2%2*Dp#sYG(aKQQWBr5M%5C?$fmPTQl1s>71E8D2n2804U4y8SqikzC6#{ssipl z2FwEYfF+X7OZw*SLy%?xn!^-h9FR09={7J`Y42X(Eb!aRj=TGi64CxM&UKmwtEKP^ g&<>2c`|&FNFLL7VV$&j+9{>OV07*qoM6N<$f>UQZpa1{> literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/message.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/message.png new file mode 100644 index 0000000000000000000000000000000000000000..ba997f7d1eb651bae04598bc520494c611dff43b GIT binary patch literal 549 zcmV+=0^0qFP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10isDnK~y-6t&_2C6G0G$|NrDB1szY2A}?UOaVq+xfFRx8xv?mK zj?h>_1Svv7N(G^VD2mefyp}*Ia8G3;6#N1yc!G2^6yT4->*yq6Ap|3>cJ|--XJ%(+ z4X7?5gbmxJq-I)@G?O#~su<%%-9B3?wq2IxuI&l11{_OjNooPdz?$tzvhfuUkZtFA zKDK=$%d*~JF!-u#q}%PT&*$?~;M-_4+5#}3vMhIjSJ#nNiS5T#RUJCd^9|b*NjK9) z1m3P7Jpe*FUILp9+a+*fyD#Yo=-K{URn=jgoU*(l=}6N3#3?c@Dm_gR&VU`@pe)ON zjob$gfF0Xs37$%7Ws;h<&zHtA#<A^fV81Aey`m`gfPLHBF~)K2Ip>m^jX%`tS=xWD zGH7TqAnj#qLkL^8-${CI`=cZQw}1~Jgu7Xm{YY5b_N<}Blywq#+jb9l5@UQ>3-l?3 z@ZI)%;51<!Nnd_zqok3fH!CuJC@D|+C9wJLgY;iUIeBzZ6pw(Xz=@>kvb{iCQpff^ n+b@R0;cF7{%E40p_B;OqTC)QV^had)00000NkvXXu0mjfF=Fmq literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/none.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/none.png new file mode 100644 index 0000000000000000000000000000000000000000..8b51f188c67b12bb1584925443c30540838dc16e GIT binary patch literal 450 zcmV;z0X_bSP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10Y6DZK~y-6rIRsk8bKI^-#48LE<s^!4^|}7_yFmb*=Zs!fcsQi zaDem{qFFQaxdKR0!UZUN3HS3{utXG2!10qtn&N$$UvJ)zZJld6o!$bCq)~q)X)kGS z`zhyqIQNIs1)yn~2ViUa#`dG6v81u>N82~Rw)gOdvn_zSu73c75W?54>z?(7QcA;8 z%F6c3X0!QX+d-0IjB{X6Rn`69U`gt_?zyU}dteY_oJ$gQUEc!R5W=T_!Ea3R)Ar{8 zG`5%5!ly}WFM$|zOnP@Me5ReGaga0ue!Z9OnNhgtyr7_CLGIoQ_RK!$*s{rgJU)^1 zJJ@~#W+|oNwPZ?Z2+VA+L(cgCEJ`V>wrwwF(zb0VrL2HO&iU}+Ds$RKfEeT4_BY#0 sNxRec_JK`+8L(Kd*WcZPd~}^(0hW8fflBbtcK`qY07*qoM6N<$g6RXvH~;_u literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/signal.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/signal.png new file mode 100644 index 0000000000000000000000000000000000000000..828a260b602fcc09fed6ada9c77d8f8c77421f28 GIT binary patch literal 3201 zcmV-{41V*8P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i z0%4j!F2Z@488U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2b=K%FEJk%a03IFf>I06nsnnTp5R=*H!zVM%h-rR7{YDT+fQ>5 z2hpD~4^<q<dj|R<>p7O7s|8+-`vERWaTz->f}N<K1JiICXHZL>lQ@DE*`<iir`U$a zSePA4SdQ0NjNSt4qJ08CqJ0?GlfVP)%_#~z%X~Jv3(Ul~5R791_ThYDI~IaDF?$l9 zg6k~sIl3Eh^+a?|Vk}ZFVGzCXq7NTXl#}}aZeb0U2DBSrbE=QngUk4t|8+D<asMW^ zU=!BH?Pgma6mfhMD{&83@V10b9F8eR1FEz&Q|swS<b&9cFL>AL#tP1cd3!WgF+HOn zr*Ib=une<8`kTFqU3i#OMskVX;609GRmf`Tl|PpvBt0RjrML%=;&>C^liFC!{fnTr no*EOo;!i1&j)$P0HTX3E4Y_D2DSn&Q00000NkvXXu0mjf!#ngq literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/timer.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/startevent/timer.png new file mode 100644 index 0000000000000000000000000000000000000000..adb275f4e91a42d1202157b5da038036310928ca GIT binary patch literal 573 zcmV-D0>b@?P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10lG;<K~y-6rBgAB6G0UIzS)Qb3@NOxwK%pEQXJ$gQim(f!fa+E zM8rOVrPUVcm1{#t0-K$rQt&63lM`brqzG8qh#+=C=Cin6StNHL_rbt>^WOJnc<+0Z zgfhC_?jgw-KqEf@um-S}G<VKz%K4@+NHUJ&=OkB>s**+k4gefT8cC{>T;)0Z%aa6> zjH2ir$(k|dNt&ix>_M;ByXU>1Ncy!{EKVfJ0D!f2K(ZEwVe2X~0HkTU4a2ZSvSzIv z005&XIwZL=#vENo27ow@9|QPKa^t<fkaS!j8A}>pNA7ew)gTDY0JJ1^oO9c5w>u_j zD|x3!dtQ40;FY9XK@i*l@Oih}HI~ce&phQEz_SW~2FViuEEkY;2H<|~e$BG%Q8`ZX z4S;V3SL1iduD09l+xwCXE(LP>Z-C?r03S)N0eq>~>mU04{@v0KPXVkexKvpaz}s?x z`F#E!z)|5_Yah;Lvmevxw76;l`1D_6ERYN8LejBu&TU8zz4wzONv`V&03b;c<Gr7d z96IMVH<mJsZ6rx+?Lg8?Nn-%#`KXG9HAy}tIn1)`wQ?eFy3T(9qcH3e6Wth>00000 LNkvXXu0mjfshaW4 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/swimlane/lane.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/swimlane/lane.png new file mode 100644 index 0000000000000000000000000000000000000000..f0e7a823bfc279536b4fd273c5569293895ae4d6 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQl?UT^vI! zdXxYB|8LK%+R&+V_liM-p^{RQlKln)Akc~5H)o>E*@+V;{%5!2apRTX;p{AYk*>z@ YZwjCKM~f}Xfo3pxy85}Sb4q9e04&ru8vp<R literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/swimlane/pool.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/swimlane/pool.png new file mode 100644 index 0000000000000000000000000000000000000000..82c2213c1133cdef49bbc5ba7c9eb37da9418c38 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf<Z~8yL>2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4<ivthz5Jr|+3#$mfQqa<T^vI! zdXxYB|8LK%+R&+V_liM-p^{RQk-dwH3s4j&%(M9O$A=vq9sil-*%q_$w6z?u_+l)~ Z&^gUqaQe=3M}Vd<c)I$ztaD0e0suGkJDC6g literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/throwing/none.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/throwing/none.png new file mode 100644 index 0000000000000000000000000000000000000000..7be082ead0f3d993abc3a029306e2405c1327346 GIT binary patch literal 582 zcmV-M0=fN(P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10mDf|K~y-6rBktL8$lGD+2sl&^bM+H4pJFO4k(SAbg9zZ?HNJP z56Iv$bxK3h8xb&;PED$GY0^j#ltWcOSe3pZq&oH{g;(M*G9u)`!WJ{byf^Pr66%$v z=_$z!Kqou^C;$|aCV8Ge)bVEbA;~Puu1L-$ok+R`&;`(ybSvqE<UC-w=Sc!dCQ0&@ zWYZY)t}M%~wf0O>FNiO__p2z1T2)njmh^izo4t`F0|3ss5y@s8#}_0U*4jeSnB+Oh zb4g=sZ9%dTFiq#&2mqKQ$tlUXG3F)7hWGxPr0YD-@1M-(lH`rG_O+xxRaO0v^vaOT zB#q0m+<Nct4v_&M&+~gp*WUZPvMjg3p)+C9i_o(<M1CS-thHwV767^iK!@Z~QjcWu z9J!WO5wJ@D9dnFutPCC(q!(Otju9m79Rnx~9=ELTy<d^6(lot%jvSJxy!R^reE>g= zqzTDk6h$p-?SSOXA(2{)gD8qxB!`lwl!PqHt|YyU<M?8;*}MpGn%z)??aEp^Xt&$H z*6a0ml3ym1$;ba*W$vz#B%O03N$(|%0W3mP2ts|5Ly{k+)9EJ#;$EQE>pz|IU%CG- UaOb0x?*IS*07*qoM6N<$g3Gi16951J literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/throwing/signal.png b/src/main/resources/static/activiti-editor/editor-app/stencilsets/bpmn2.0/icons/throwing/signal.png new file mode 100644 index 0000000000000000000000000000000000000000..c5979fbfa5fa0bbe98f38dba4b6e038e39cbce4d GIT binary patch literal 747 zcmV<H0u=p;P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm000fw000fw0YWI7cmMzZ8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10%%D@K~y-6l~YYfR8bf`=NljBVx%H)TJ*Dej$n~EF=UIJy^9j^ zIkQS=7lJ_{)S?#sK&zl=A)?`8e1qU3MA`&x6wCw{X*P>cBAHq$VKDRVY4b)#t3?Ms zxLm$-?&Uk@qa-w9aB$EkSpd)-7XYjPSdml=!?4`gZ}kI777B$Ck_(brB#i^e0LVxh zm()UXA@1P;0g?=YU`|rMnPtN;9Bpc9`ckP>ewf)FfXy%rN6joNsXqvUxw;4?p-?D{ zNa|0g)4gkJYiTnJNv@jNR1`(uNR9zGD(PBBN5|)ljg5CCXN$$+GX_E6lUy*fY!pRD z0K6snvQnwsPo+}tC2j5O><qTHwmu?xL(=6$BC+e7Tat9iNEReb_`bhMa*X7y>FMcv zsZ=Ttpo`>{WHOlv!|*nMJ0!<^-`|upK{9Xgq!-uM*DnHSZ*Fc5hlYll0X*Cvl-W}N z@I0>wptD>qX8<e$$QXcblFKB|0hphhocy)7w>J#nRD)YR`F#HB)YQ~Z0P~W%NG=2D zwuV=#lC}p1295!^i$fs!B$vxI0jNl-)$bFXot?dszLQ)7ATtX{<_-%0IG#)<w*h!j z6ulvNmgEVGQ`Xbo-u|&#tu6q#`4=((K+*%x^Ipu%%zOgS1K`5}8=Z5GWcptM08p#d zRy@y3)@}SFNab?*OcX`W0h|P|6!WqGz9tfhVc+*R4+Kflew0Zj&Fp%$THP|U3nb6S zUte|3Eqk7K+Bx@1(r&3#>XRgk8&oQl`bf??=a$UuF@QDzuj6Vnv&YW4C6cpsG7#@V dBmQ@te*@$jHU6@4@HhYf002ovPDHLkV1l7MKcWBt literal 0 HcmV?d00001 diff --git a/src/main/resources/static/activiti-editor/editor-app/toolbar-controller.js b/src/main/resources/static/activiti-editor/editor-app/toolbar-controller.js new file mode 100644 index 0000000..a83985a --- /dev/null +++ b/src/main/resources/static/activiti-editor/editor-app/toolbar-controller.js @@ -0,0 +1,162 @@ +/* + * Activiti Modeler component part of the Activiti project + * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved. + * //FHqq- 3 1 3-5-9-6-7 9-0 + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +'use strict'; + +angular.module('activitiModeler') + .controller('ToolbarController', ['$scope', '$http', '$modal', '$q', '$rootScope', '$translate', '$location', function ($scope, $http, $modal, $q, $rootScope, $translate, $location) { + + $scope.editorFactory.promise.then(function () { + $scope.items = KISBPM.TOOLBAR_CONFIG.items; + }); + + $scope.secondaryItems = KISBPM.TOOLBAR_CONFIG.secondaryItems; + + // Call configurable click handler (From http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string) + var executeFunctionByName = function(functionName, context /*, args */) { + var args = Array.prototype.slice.call(arguments).splice(2); + var namespaces = functionName.split("."); + var func = namespaces.pop(); + for(var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } + return context[func].apply(this, args); + }; + + // Click handler for toolbar buttons + $scope.toolbarButtonClicked = function(buttonIndex) { + + // Default behaviour + var buttonClicked = $scope.items[buttonIndex]; + var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate}; + executeFunctionByName(buttonClicked.action, window, services); + + // Other events + var event = { + type : KISBPM.eventBus.EVENT_TYPE_TOOLBAR_BUTTON_CLICKED, + toolbarItem : buttonClicked + }; + KISBPM.eventBus.dispatch(event.type, event); + }; + + // Click handler for secondary toolbar buttons + $scope.toolbarSecondaryButtonClicked = function(buttonIndex) { + var buttonClicked = $scope.secondaryItems[buttonIndex]; + var services = { '$scope' : $scope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate, '$location': $location}; + executeFunctionByName(buttonClicked.action, window, services); + }; + + /* Key bindings */ + Mousetrap.bind(['command+z', 'ctrl+z'], function(e) { + var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate}; + KISBPM.TOOLBAR.ACTIONS.undo(services); + return false; + }); + + Mousetrap.bind(['command+y', 'ctrl+y'], function(e) { + var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate}; + KISBPM.TOOLBAR.ACTIONS.redo(services); + return false; + }); + + Mousetrap.bind(['command+c', 'ctrl+c'], function(e) { + var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate}; + KISBPM.TOOLBAR.ACTIONS.copy(services); + return false; + }); + + Mousetrap.bind(['command+v', 'ctrl+v'], function(e) { + var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate}; + KISBPM.TOOLBAR.ACTIONS.paste(services); + return false; + }); + + Mousetrap.bind(['del'], function(e) { + var services = { '$scope' : $scope, '$rootScope' : $rootScope, '$http' : $http, '$modal' : $modal, '$q' : $q, '$translate' : $translate}; + KISBPM.TOOLBAR.ACTIONS.deleteItem(services); + return false; + }); + + /* Undo logic */ + + $scope.undoStack = []; + $scope.redoStack = []; + + $scope.editorFactory.promise.then(function() { + + // Catch all command that are executed and store them on the respective stacks + $scope.editor.registerOnEvent(ORYX.CONFIG.EVENT_EXECUTE_COMMANDS, function( evt ){ + + // If the event has commands + if( !evt.commands ){ return; } + + $scope.undoStack.push( evt.commands ); + $scope.redoStack = []; + + for(var i = 0; i < $scope.items.length; i++) + { + var item = $scope.items[i]; + if (item.action === 'KISBPM.TOOLBAR.ACTIONS.undo') + { + item.enabled = true; + } + else if (item.action === 'KISBPM.TOOLBAR.ACTIONS.redo') + { + item.enabled = false; + } + } + + // Update + $scope.editor.getCanvas().update(); + $scope.editor.updateSelection(); + + }); + + }); + + // Handle enable/disable toolbar buttons + $scope.editorFactory.promise.then(function() { + $scope.editor.registerOnEvent(ORYX.CONFIG.EVENT_SELECTION_CHANGED, function( evt ){ + var elements = evt.elements; + + for(var i = 0; i < $scope.items.length; i++) + { + var item = $scope.items[i]; + if (item.enabledAction && item.enabledAction === 'element') + { + var minLength = 1; + if(item.minSelectionCount) { + minLength = item.minSelectionCount; + } + if (elements.length >= minLength && !item.enabled) { + $scope.safeApply(function () { + item.enabled = true; + }); + } + else if (elements.length == 0 && item.enabled) { + $scope.safeApply(function () { + item.enabled = false; + }); + } + } + } + }); + + }); + + }]); \ No newline at end of file diff --git a/src/main/resources/static/activiti-editor/modeler.html b/src/main/resources/static/activiti-editor/modeler.html new file mode 100644 index 0000000..9321ed4 --- /dev/null +++ b/src/main/resources/static/activiti-editor/modeler.html @@ -0,0 +1,142 @@ +<!doctype html> +<!--[if lt IE 7]> +<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> +<!--[if IE 7]> +<html class="no-js lt-ie9 lt-ie8"> <![endif]--> +<!--[if IE 8]> +<html class="no-js lt-ie9"> <![endif]--> +<!--[if gt IE 8]><!--> +<html class="no-js" xmlns:th="http://www.omg.org/spec/BPMN/20100524/MODEL"> <!--<![endif]--> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>Activiti Editor</title> + <meta name="description" content=""> + <meta name="viewport" + content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, width=device-width"> + <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> + + <link rel="Stylesheet" media="screen" href="editor-app/libs/ng-grid-2.0.7.min.css" type="text/css"/> + <link rel="stylesheet" href="editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css"/> + + <link rel="Stylesheet" media="screen" href="editor-app/editor/css/editor.css" type="text/css"/> + <link rel="stylesheet" href="editor-app/css/style.css" type="text/css"/> + + <link rel="stylesheet" href="editor-app/css/style-common.css"> + <link rel="stylesheet" href="editor-app/css/style-editor.css"> + <script th:inine="javascript"> + var userModelerId=[[${modelId}]]; + </script> +</head> +<body> + + <div class="navbar navbar-fixed-top navbar-inverse" role="navigation" id="main-header" style="display: none;"> + <div class="navbar-header"> + <a href="" ng-click="backToLanding()" class="navbar-brand" + title="{{'GENERAL.MAIN-TITLE' | translate}}"><span + class="sr-only">{{'GENERAL.MAIN-TITLE' | translate}}</span></a> + </div> + </div> + + <!--[if lt IE 9]> + <div class="unsupported-browser"> + <p class="alert error">You are using an unsupported browser. Please upgrade your browser in order to use the + editor.</p> + </div> + <![endif]--> + + <div class="alert-wrapper" ng-cloak> + <div class="alert fadein {{alerts.current.type}}" ng-show="alerts.current" ng-click="dismissAlert()"> + <i class="glyphicon" + ng-class="{'glyphicon-ok': alerts.current.type == 'info', 'glyphicon-remove': alerts.current.type == 'error'}"></i> + <span>{{alerts.current.message}}</span> + + <div class="pull-right" ng-show="alerts.queue.length > 0"> + <span class="badge">{{alerts.queue.length + 1}}</span> + </div> + </div> + </div> + + <div id="main" class="wrapper full clearfix" ng-style="{height: window.height + 'px'}" ng-app="activitiModeler" ng-include="'editor-app/editor.html'"> + </div> + + <!--[if lt IE 9]> + <script src="editor-app/libs/es5-shim-15.3.4.5/es5-shim.js"></script> + <script src="editor-app/libs/json3_3.2.6/lib/json3.min.js"></script> + <![endif]--> + + <script src="editor-app/libs/jquery_1.11.0/jquery.min.js"></script> + <script src="editor-app/libs/jquery-ui-1.10.3.custom.min.js"></script> + + <script src="editor-app/libs/angular_1.2.13/angular.min.js"></script> + <script src="editor-app/libs/angular_1.2.13/angular-animate.min.js"></script> + <script src="editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js"></script> + <script src="editor-app/libs/angular-resource_1.2.13/angular-resource.min.js"></script> + <script src="editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js"></script> + <script src="editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js"></script> + <script src="editor-app/libs/angular-route_1.2.13/angular-route.min.js"></script> + <script src="editor-app/libs/angular-translate_2.4.2/angular-translate.min.js"></script> + <script src="editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js"></script> + <script src="editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script> + <script src="editor-app/libs/angular-strap_2.0.5/angular-strap.min.js"></script> + <script src="editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js"></script> + <script src="editor-app/libs/momentjs_2.5.1/momentjs.min.js"></script> + + <script src="editor-app/libs/ui-utils.min-0.0.4.js" type="text/javascript"></script> + <script src="editor-app/libs/ng-grid-2.0.7-min.js" type="text/javascript"></script> + <script src="editor-app/libs/angular-dragdrop.min-1.0.3.js" type="text/javascript"></script> + <script src="editor-app/libs/mousetrap-1.4.5.min.js" type="text/javascript"></script> + <script src="editor-app/libs/jquery.autogrow-textarea.js" type="text/javascript"></script> + + <script src="editor-app/libs/prototype-1.5.1.js" type="text/javascript"></script> + <script src="editor-app/libs/path_parser.js" type="text/javascript"></script> + + <script src="editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js" type="text/javascript"></script> + + <!-- Configuration --> + <script src="editor-app/app-cfg.js?v=1"></script> + <script src="editor-app/editor-config.js" type="text/javascript"></script> + <script src="editor-app/configuration/url-config.js" type="text/javascript"></script> + + <script src="editor-app/editor/i18n/translation_en_us.js" type="text/javascript"></script> + <script src="editor-app/editor/i18n/translation_signavio_en_us.js" type="text/javascript"></script> + <script src="editor-app/editor/oryx.debug.js" type="text/javascript"></script> + + <script src="editor-app/app.js"></script> + + <script src="editor-app/eventbus.js" type="text/javascript"></script> + + <script src="editor-app/editor-controller.js" type="text/javascript"></script> + <script src="editor-app/stencil-controller.js" type="text/javascript"></script> + <script src="editor-app/toolbar-controller.js" type="text/javascript"></script> + <script src="editor-app/header-controller.js" type="text/javascript"></script> + <script src="editor-app/select-shape-controller.js" type="text/javascript"></script> + + <script src="editor-app/editor-utils.js" type="text/javascript"></script> + <script src="editor-app/configuration/toolbar-default-actions.js" type="text/javascript"></script> + + <script src="editor-app/configuration/properties-default-controllers.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-execution-listeners-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-event-listeners-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-assignment-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-fields-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-form-properties-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-in-parameters-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-multiinstance-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-out-parameters-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-task-listeners-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-sequenceflow-order-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-condition-expression-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-signal-definitions-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-signal-scope-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-message-definitions-controller.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-message-scope-controller.js" type="text/javascript"></script> + + <script src="editor-app/configuration/toolbar.js" type="text/javascript"></script> + <script src="editor-app/configuration/toolbar-custom-actions.js" type="text/javascript"></script> + + <script src="editor-app/configuration/properties.js" type="text/javascript"></script> + <script src="editor-app/configuration/properties-custom-controllers.js" type="text/javascript"></script> + +</body> +</html>