process_engine 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/app/assets/bower_components/process_engine/Snap.svg/CONTRIBUTING +3 -0
- data/app/assets/bower_components/process_engine/Snap.svg/Gruntfile.js +59 -0
- data/app/assets/bower_components/process_engine/Snap.svg/LICENSE +202 -0
- data/app/assets/bower_components/process_engine/Snap.svg/NOTICE +190 -0
- data/app/assets/bower_components/process_engine/Snap.svg/README.md +62 -0
- data/app/assets/bower_components/process_engine/Snap.svg/bower.json +25 -0
- data/app/assets/bower_components/process_engine/Snap.svg/component.json +13 -0
- data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg-min.js +20 -0
- data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg.js +7653 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/dr.css +144 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/main.css +508 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/prism.css +168 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/topcoat-desktop-light.css +3700 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.svg +242 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.svg +243 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.svg +243 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.svg +243 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/stylesheet.css +57 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search.svg +11 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search_dark.svg +16 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/js/prism.js +9 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/reference.html +13633 -0
- data/app/assets/bower_components/process_engine/Snap.svg/dr.json +33 -0
- data/app/assets/bower_components/process_engine/Snap.svg/history.md +31 -0
- data/app/assets/bower_components/process_engine/Snap.svg/package.json +22 -0
- data/app/assets/bower_components/process_engine/Snap.svg/template.dot +157 -0
- data/app/assets/bower_components/process_engine/Snap.svg/test.html +75 -0
- data/app/assets/bower_components/process_engine/bpmn-js/LICENSE +22 -0
- data/app/assets/bower_components/process_engine/bpmn-js/README.md +46 -0
- data/app/assets/bower_components/process_engine/bpmn-js/bower.json +28 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css +40 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot +0 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg +21 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.woff +0 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/diagram-js.css +355 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js +21552 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js.map +1 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.min.js +8 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js +13542 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js.map +1 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.min.js +5 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js +13294 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js.map +1 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.min.js +5 -0
- data/app/assets/bower_components/process_engine/hammerjs/CHANGELOG.md +30 -0
- data/app/assets/bower_components/process_engine/hammerjs/CONTRIBUTING.md +41 -0
- data/app/assets/bower_components/process_engine/hammerjs/Gruntfile.coffee +123 -0
- data/app/assets/bower_components/process_engine/hammerjs/LICENSE.md +21 -0
- data/app/assets/bower_components/process_engine/hammerjs/README.md +6 -0
- data/app/assets/bower_components/process_engine/hammerjs/bower.json +9 -0
- data/app/assets/bower_components/process_engine/hammerjs/component.json +8 -0
- data/app/assets/bower_components/process_engine/hammerjs/hammer.js +2463 -0
- data/app/assets/bower_components/process_engine/hammerjs/hammer.min.js +7 -0
- data/app/assets/bower_components/process_engine/hammerjs/hammer.min.map +1 -0
- data/app/assets/bower_components/process_engine/hammerjs/package.json +50 -0
- data/app/assets/bower_components/process_engine/jquery/MIT-LICENSE.txt +21 -0
- data/app/assets/bower_components/process_engine/jquery/bower.json +27 -0
- data/app/assets/bower_components/process_engine/jquery/dist/jquery.js +9205 -0
- data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.map +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/jsonp.js +89 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/load.js +75 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/parseJSON.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/parseXML.js +28 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/script.js +64 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/var/nonce.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/var/rquery.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/xhr.js +136 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax.js +786 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/attr.js +141 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/classes.js +158 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/prop.js +94 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/support.js +35 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/val.js +161 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes.js +11 -0
- data/app/assets/bower_components/process_engine/jquery/src/callbacks.js +205 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/access.js +60 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/init.js +123 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/parseHTML.js +39 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/ready.js +97 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/var/rsingleTag.js +4 -0
- data/app/assets/bower_components/process_engine/jquery/src/core.js +497 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/addGetHookIf.js +22 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/curCSS.js +57 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/defaultDisplay.js +70 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/support.js +96 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/swap.js +28 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/cssExpand.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/getStyles.js +12 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/isHidden.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/rmargin.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/rnumnonpx.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/css.js +450 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/Data.js +181 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/accepts.js +20 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/var/data_priv.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/var/data_user.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/data.js +178 -0
- data/app/assets/bower_components/process_engine/jquery/src/deferred.js +149 -0
- data/app/assets/bower_components/process_engine/jquery/src/deprecated.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/dimensions.js +50 -0
- data/app/assets/bower_components/process_engine/jquery/src/effects/Tween.js +114 -0
- data/app/assets/bower_components/process_engine/jquery/src/effects/animatedSelector.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/effects.js +648 -0
- data/app/assets/bower_components/process_engine/jquery/src/event/ajax.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/event/alias.js +39 -0
- data/app/assets/bower_components/process_engine/jquery/src/event/support.js +9 -0
- data/app/assets/bower_components/process_engine/jquery/src/event.js +868 -0
- data/app/assets/bower_components/process_engine/jquery/src/exports/amd.js +24 -0
- data/app/assets/bower_components/process_engine/jquery/src/exports/global.js +32 -0
- data/app/assets/bower_components/process_engine/jquery/src/intro.js +44 -0
- data/app/assets/bower_components/process_engine/jquery/src/jquery.js +37 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation/_evalUrl.js +18 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation/support.js +32 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation.js +580 -0
- data/app/assets/bower_components/process_engine/jquery/src/offset.js +207 -0
- data/app/assets/bower_components/process_engine/jquery/src/outro.js +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/queue/delay.js +22 -0
- data/app/assets/bower_components/process_engine/jquery/src/queue.js +142 -0
- data/app/assets/bower_components/process_engine/jquery/src/selector-native.js +172 -0
- data/app/assets/bower_components/process_engine/jquery/src/selector-sizzle.js +14 -0
- data/app/assets/bower_components/process_engine/jquery/src/selector.js +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/serialize.js +111 -0
- data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/traversing/findFilter.js +100 -0
- data/app/assets/bower_components/process_engine/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/app/assets/bower_components/process_engine/jquery/src/traversing.js +199 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/arr.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/class2type.js +4 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/concat.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/hasOwn.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/indexOf.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/pnum.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/push.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/rnotwhite.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/slice.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/strundefined.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/support.js +4 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/toString.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/wrap.js +79 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/ChangeLog.md +141 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/LICENSE.txt +20 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/README.md +85 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/bower.json +17 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.js +221 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.min.js +8 -0
- data/app/assets/bower_components/process_engine/lodash/LICENSE.txt +22 -0
- data/app/assets/bower_components/process_engine/lodash/bower.json +23 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.js +7157 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.min.js +61 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.js +6785 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.min.js +56 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.js +4979 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.min.js +39 -0
- data/app/assets/bower_components/process_engine/sax/AUTHORS +10 -0
- data/app/assets/bower_components/process_engine/sax/LICENSE +32 -0
- data/app/assets/bower_components/process_engine/sax/LICENSE-W3C.html +188 -0
- data/app/assets/bower_components/process_engine/sax/README.md +216 -0
- data/app/assets/bower_components/process_engine/sax/component.json +12 -0
- data/app/assets/bower_components/process_engine/sax/examples/big-not-pretty.xml +8002 -0
- data/app/assets/bower_components/process_engine/sax/examples/example.js +29 -0
- data/app/assets/bower_components/process_engine/sax/examples/get-products.js +58 -0
- data/app/assets/bower_components/process_engine/sax/examples/hello-world.js +4 -0
- data/app/assets/bower_components/process_engine/sax/examples/not-pretty.xml +8 -0
- data/app/assets/bower_components/process_engine/sax/examples/pretty-print.js +74 -0
- data/app/assets/bower_components/process_engine/sax/examples/shopping.xml +2 -0
- data/app/assets/bower_components/process_engine/sax/examples/strict.dtd +870 -0
- data/app/assets/bower_components/process_engine/sax/examples/test.html +15 -0
- data/app/assets/bower_components/process_engine/sax/examples/test.xml +1254 -0
- data/app/assets/bower_components/process_engine/sax/lib/sax.js +1410 -0
- data/app/assets/bower_components/process_engine/sax/package.json +12 -0
- data/app/assets/bower_components/process_engine/sax/test/attribute-name.js +33 -0
- data/app/assets/bower_components/process_engine/sax/test/attribute-no-space.js +75 -0
- data/app/assets/bower_components/process_engine/sax/test/buffer-overrun.js +26 -0
- data/app/assets/bower_components/process_engine/sax/test/case.js +50 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-chunked.js +11 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-end-split.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-fake-end.js +28 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-multiple.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata.js +10 -0
- data/app/assets/bower_components/process_engine/sax/test/cyrillic.js +8 -0
- data/app/assets/bower_components/process_engine/sax/test/duplicate-attribute.js +13 -0
- data/app/assets/bower_components/process_engine/sax/test/emoji.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/end_empty_stream.js +5 -0
- data/app/assets/bower_components/process_engine/sax/test/entities.js +10 -0
- data/app/assets/bower_components/process_engine/sax/test/entity-mega.js +16 -0
- data/app/assets/bower_components/process_engine/sax/test/flush.js +13 -0
- data/app/assets/bower_components/process_engine/sax/test/index.js +86 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-23.js +43 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-30.js +24 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-35.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-47.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-49.js +31 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-84.js +13 -0
- data/app/assets/bower_components/process_engine/sax/test/parser-position.js +28 -0
- data/app/assets/bower_components/process_engine/sax/test/script-close-better.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/script.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/self-closing-child-strict.js +44 -0
- data/app/assets/bower_components/process_engine/sax/test/self-closing-child.js +44 -0
- data/app/assets/bower_components/process_engine/sax/test/self-closing-tag.js +25 -0
- data/app/assets/bower_components/process_engine/sax/test/stray-ending.js +17 -0
- data/app/assets/bower_components/process_engine/sax/test/trailing-attribute-no-value.js +10 -0
- data/app/assets/bower_components/process_engine/sax/test/trailing-non-whitespace.js +18 -0
- data/app/assets/bower_components/process_engine/sax/test/unclosed-root.js +11 -0
- data/app/assets/bower_components/process_engine/sax/test/unquoted.js +18 -0
- data/app/assets/bower_components/process_engine/sax/test/utf8-split.js +32 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-as-tag-name.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-issue-41.js +68 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-rebinding.js +63 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-strict.js +74 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound-element.js +33 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-ns.js +31 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix-attribute.js +36 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix.js +21 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-redefine.js +41 -0
- data/app/assets/javascripts/process_engine/application.js +65 -0
- data/app/assets/stylesheets/process_engine/application.css +39 -0
- data/app/controllers/process_engine/application_controller.rb +28 -0
- data/app/controllers/process_engine/process_definitions_controller.rb +63 -0
- data/app/controllers/process_engine/process_instances_controller.rb +42 -0
- data/app/controllers/process_engine/process_tasks_controller.rb +23 -0
- data/app/helpers/process_engine/application_helper.rb +4 -0
- data/app/models/process_engine/consumer/consumer_task.rb +15 -0
- data/app/models/process_engine/error/false_task_state.rb +2 -0
- data/app/models/process_engine/listener/base.rb +49 -0
- data/app/models/process_engine/node_data_injection.rb +22 -0
- data/app/models/process_engine/parser/complex_gateway.rb +21 -0
- data/app/models/process_engine/parser/end_event.rb +23 -0
- data/app/models/process_engine/parser/exclusive_gateway.rb +25 -0
- data/app/models/process_engine/parser/extension/condition_expression.rb +39 -0
- data/app/models/process_engine/parser/extension/execution_listener.rb +15 -0
- data/app/models/process_engine/parser/extension/form_field.rb +50 -0
- data/app/models/process_engine/parser/extension/input_output.rb +28 -0
- data/app/models/process_engine/parser/extension/listener.rb +43 -0
- data/app/models/process_engine/parser/extension/property.rb +20 -0
- data/app/models/process_engine/parser/extension/task_listener.rb +15 -0
- data/app/models/process_engine/parser/extension/transitional_parameter.rb +53 -0
- data/app/models/process_engine/parser/inclusive_gateway.rb +25 -0
- data/app/models/process_engine/parser/parallel_gateway.rb +19 -0
- data/app/models/process_engine/parser/script_task.rb +37 -0
- data/app/models/process_engine/parser/sequence_flow.rb +36 -0
- data/app/models/process_engine/parser/start_event.rb +27 -0
- data/app/models/process_engine/parser/user_task.rb +36 -0
- data/app/models/process_engine/parser/xml_node.rb +125 -0
- data/app/models/process_engine/process_definition.rb +50 -0
- data/app/models/process_engine/process_instance.rb +72 -0
- data/app/models/process_engine/process_query.rb +52 -0
- data/app/models/process_engine/process_schema.rb +30 -0
- data/app/models/process_engine/process_task.rb +70 -0
- data/app/models/process_engine/schema/interceptor/exclusive_gateway.rb +39 -0
- data/app/models/process_engine/schema/node.rb +48 -0
- data/app/models/process_engine/schema/node_extension.rb +79 -0
- data/app/models/process_engine/schema/transition.rb +22 -0
- data/app/views/layouts/process_engine/application.html.erb +14 -0
- data/app/views/process_engine/layouts/_menu.html.haml +6 -0
- data/app/views/process_engine/layouts/application.html.haml +11 -0
- data/app/views/process_engine/process_definitions/_form.html.haml +6 -0
- data/app/views/process_engine/process_definitions/edit.html.haml +3 -0
- data/app/views/process_engine/process_definitions/index.html.haml +26 -0
- data/app/views/process_engine/process_definitions/new.html.haml +3 -0
- data/app/views/process_engine/process_definitions/show.html.haml +51 -0
- data/app/views/process_engine/process_instances/_form.html.haml +5 -0
- data/app/views/process_engine/process_instances/edit.html.haml +3 -0
- data/app/views/process_engine/process_instances/index.html.haml +29 -0
- data/app/views/process_engine/process_instances/show.html.haml +38 -0
- data/app/views/process_engine/process_tasks/index.html.haml +44 -0
- data/app/views/process_engine/share/_bpmn_canvas.html.haml +7 -0
- data/config/initializers/bower_rails.rb +16 -0
- data/config/initializers/simple_form.rb +166 -0
- data/config/initializers/simple_form_bootstrap.rb +135 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/config/routes.rb +18 -0
- data/db/migrate/20150313063311_create_process_engine_process_definitions.rb +14 -0
- data/db/migrate/20150313063508_create_process_engine_process_instances.rb +15 -0
- data/db/migrate/20150313063633_create_process_engine_process_tasks.rb +30 -0
- data/lib/process_engine/engine.rb +12 -0
- data/lib/process_engine/version.rb +3 -0
- data/lib/process_engine.rb +8 -0
- data/lib/tasks/process_engine_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +85 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/schema.rb +66 -0
- data/test/dummy/log/development.log +9722 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/8afee1847b645742b0d2535a7c32f4f22e7926ec/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b5911aa594334efca1023d6f01abce0758e9648a/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/014d8413350c7d85a5429f5e2c9ac911 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0cbd667d0fbf9e0e6f60b5ebf2f95fa3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0f7ba040a442530a6d4a5bc8307769c1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0fca2cc9aa38138660d8c7d492cf81e4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0ff24903c54f534941fbc96ff862e475 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/11100f87277a2892323fe5581af75a7b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/18a34084783e8b7f9bc871bc64b13eed +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1a3821ce28e0196075ed0830fcb45f38 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1cf94b9a49ee68cb0f4065d48e9cbaf3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/21a6373d6c40614fd05be57194c68248 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/26276ae8df51c046f3adc0b50a1521ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2eea4a8f4854d438cd03cb23a89b6d8c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3993bcd8bae4771e550d8fc91d1debbc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3ccc4edae36a9c4bd70fc330c9c83dc9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3e391b0f37505fffc40ba9ffa13330a2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/42e258b77f5dd532dfb9344a2d766de6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/43a5910cb7a330ece5856c0e9099efa2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4e65ec1149f01e749e1e372861210d4d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/501160bcee63ae68449a5a5eb78b6d41 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/517beb0bf366ec3c8649da9ac8a8a01e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/525a556b1eaacfa041722e1250d9859a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/56edbae38e4e0ff9f4b4fc576ae3d746 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5b04f4a7058d92f88f89f2248bcc16b0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5c3c69f7c2520b57620931c150032d7e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5d1f8f2111e14084ebf711412c9230d2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5f9833d6835900c56d0e76a1b2924cc2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/67c653cc36eb639f7a7af5159e9f9de3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/704b33432a5ba417bcd5962ad999c671 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7301f83e8e67f30be13546a794a553ef +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7482c8f712712a79937caf41413bca15 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/761cb171e67ddca71e8b9c74f0220457 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e23bd4385e166267961b6d936363042 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e5100f290c9ba0d4c026e43b58d0d79 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/80743880e8d46958e9839ff9408c3113 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8b8941aae968854bafb4638a86cad77b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9c292f3b6b577a92970303c351e1d4a1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a3435b13cfa60fb7469a19703350bda7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a6ce1b2837383f1e8b62b7f1ddcc6820 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a7e90acc68ba69b7cd5c0a7005467c4b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/be4d00fb7bf467b370f0fda7e453ec68 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c4fbf44e63e40cbbf825fe750374728f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c593bacb8d3f003125f91763a7b36b10 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c5ae3bc69f7b1e1fdb51a667c9f3cdd6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cc843b336460771bf75c97cf0935301b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ce3b6127737ed36f7b62a54acec06b3e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d58931b13c55c146d21475e532b126ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc6bbdc1e385c7bb2743011e9c2a7407 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dd7270e11b484ae10f601e1dd014445a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/de86beefc60e0cd84dd1525af863e64d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e0953e6e4a6c208e350f7f25d85bdce8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ec3b479833be43bf164a3deb119c3aee +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef2cb0afc9a61a3d5819b4dfc84720ad +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f0511bbd6f6cd5530acddebb6d7e7044 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7009bba030498129042e0c542d4f264 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/fixtures/process_engine/process_definitions.yml +17 -0
- data/test/fixtures/process_engine/process_instances.yml +11 -0
- data/test/fixtures/process_engine/process_tasks.yml +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/models/process_engine/process_definition_test.rb +9 -0
- data/test/models/process_engine/process_instance_test.rb +9 -0
- data/test/models/process_engine/process_task_test.rb +9 -0
- data/test/process_engine_test.rb +7 -0
- data/test/test_helper.rb +19 -0
- metadata +740 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","lib/NavigatedViewer.js","lib/Viewer.js","lib/core/index.js","lib/draw/BpmnRenderer.js","lib/draw/PathMap.js","lib/draw/index.js","lib/import/BpmnImporter.js","lib/import/BpmnTreeWalker.js","lib/import/Importer.js","lib/import/Util.js","lib/import/index.js","lib/util/Di.js","lib/util/Label.js","node_modules/bpmn-moddle/index.js","node_modules/bpmn-moddle/lib/bpmn-moddle.js","node_modules/bpmn-moddle/lib/simple.js","node_modules/bpmn-moddle/node_modules/moddle-xml/index.js","node_modules/bpmn-moddle/node_modules/moddle-xml/lib/common.js","node_modules/bpmn-moddle/node_modules/moddle-xml/lib/reader.js","node_modules/bpmn-moddle/node_modules/moddle-xml/lib/writer.js","node_modules/bpmn-moddle/node_modules/moddle-xml/node_modules/tiny-stack/lib/tiny-stack.js","node_modules/bpmn-moddle/node_modules/moddle/index.js","node_modules/bpmn-moddle/node_modules/moddle/lib/base.js","node_modules/bpmn-moddle/node_modules/moddle/lib/descriptor-builder.js","node_modules/bpmn-moddle/node_modules/moddle/lib/factory.js","node_modules/bpmn-moddle/node_modules/moddle/lib/moddle.js","node_modules/bpmn-moddle/node_modules/moddle/lib/ns.js","node_modules/bpmn-moddle/node_modules/moddle/lib/properties.js","node_modules/bpmn-moddle/node_modules/moddle/lib/registry.js","node_modules/bpmn-moddle/node_modules/moddle/lib/types.js","node_modules/bpmn-moddle/resources/bpmn/json/bpmn.json","node_modules/bpmn-moddle/resources/bpmn/json/bpmndi.json","node_modules/bpmn-moddle/resources/bpmn/json/dc.json","node_modules/bpmn-moddle/resources/bpmn/json/di.json","node_modules/diagram-js/index.js","node_modules/diagram-js/lib/Diagram.js","node_modules/diagram-js/lib/core/Canvas.js","node_modules/diagram-js/lib/core/ElementFactory.js","node_modules/diagram-js/lib/core/ElementRegistry.js","node_modules/diagram-js/lib/core/EventBus.js","node_modules/diagram-js/lib/core/GraphicsFactory.js","node_modules/diagram-js/lib/core/index.js","node_modules/diagram-js/lib/draw/Renderer.js","node_modules/diagram-js/lib/draw/Snap.js","node_modules/diagram-js/lib/draw/Styles.js","node_modules/diagram-js/lib/draw/index.js","node_modules/diagram-js/lib/draw/snapsvg-extensions.js","node_modules/diagram-js/lib/features/interaction-events/InteractionEvents.js","node_modules/diagram-js/lib/features/interaction-events/index.js","node_modules/diagram-js/lib/features/outline/Outline.js","node_modules/diagram-js/lib/features/outline/index.js","node_modules/diagram-js/lib/features/overlays/Overlays.js","node_modules/diagram-js/lib/features/overlays/index.js","node_modules/diagram-js/lib/features/selection/Selection.js","node_modules/diagram-js/lib/features/selection/SelectionBehavior.js","node_modules/diagram-js/lib/features/selection/SelectionVisuals.js","node_modules/diagram-js/lib/features/selection/index.js","node_modules/diagram-js/lib/model/index.js","node_modules/diagram-js/lib/navigation/movecanvas/MoveCanvas.js","node_modules/diagram-js/lib/navigation/movecanvas/index.js","node_modules/diagram-js/lib/navigation/zoomscroll/ZoomScroll.js","node_modules/diagram-js/lib/navigation/zoomscroll/index.js","node_modules/diagram-js/lib/util/Collections.js","node_modules/diagram-js/lib/util/Cursor.js","node_modules/diagram-js/lib/util/Dom.js","node_modules/diagram-js/lib/util/Elements.js","node_modules/diagram-js/lib/util/Event.js","node_modules/diagram-js/lib/util/GraphicsUtil.js","node_modules/diagram-js/lib/util/IdGenerator.js","node_modules/diagram-js/lib/util/Text.js","node_modules/didi/lib/annotation.js","node_modules/didi/lib/index.js","node_modules/didi/lib/injector.js","node_modules/didi/lib/module.js","node_modules/object-refs/index.js","node_modules/object-refs/lib/collection.js","node_modules/object-refs/lib/refs.js"],"names":[],"mappings":";;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChSA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACr+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtcA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClGA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACt0FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvNA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9NA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtdA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})","var Viewer = require(2);\n\n/**\n * A viewer that includes mouse navigation facilities\n *\n * @param {Object} options\n */\nfunction NavigatedViewer(options) {\n Viewer.call(this, options);\n}\n\nNavigatedViewer.prototype = Object.create(Viewer.prototype);\n\nmodule.exports = NavigatedViewer;\n\nNavigatedViewer.prototype._navigationModules = [\n require(62),\n require(60)\n];\n\nNavigatedViewer.prototype._modules = [].concat(\n NavigatedViewer.prototype._modules,\n NavigatedViewer.prototype._navigationModules);","'use strict';\n\nvar Diagram = require(35),\n BpmnModdle = require(14),\n $ = (window.$),\n _ = (window._);\n\nvar Importer = require(9);\n\n\nfunction initListeners(diagram, listeners) {\n var events = diagram.get('eventBus');\n\n listeners.forEach(function(l) {\n events.on(l.event, l.handler);\n });\n}\n\nfunction checkValidationError(err) {\n\n // check if we can help the user by indicating wrong BPMN 2.0 xml\n // (in case he or the exporting tool did not get that right)\n\n var pattern = /unparsable content <([^>]+)> detected([/s/S]*)$/;\n var match = pattern.exec(err.message);\n\n if (match) {\n err.message =\n 'unparsable content <' + match[1] + '> detected; ' +\n 'this may indicate an invalid BPMN 2.0 diagram file' + match[2];\n }\n\n return err;\n}\n\nvar DEFAULT_OPTIONS = {\n width: '100%',\n height: '100%',\n position: 'relative'\n};\n\n/**\n * A viewer for BPMN 2.0 diagrams.\n *\n * Includes the basic viewing functionality.\n *\n * Have a look at {@link NavigatedViewer} or {@link Modeler} for bundles that include\n * additional features.\n *\n * @param {Object} [options] configuration options to pass to the viewer\n * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.\n * @param {String|Number} [options.width] the width of the viewer\n * @param {String|Number} [options.height] the height of the viewer\n * @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules\n * @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules\n */\nfunction Viewer(options) {\n\n this.options = options = _.extend({}, DEFAULT_OPTIONS, options || {});\n\n var parent = options.container || $('body');\n\n var container = $('<div class=\"bjs-container\"></div>').appendTo(parent);\n\n container.css({\n width: options.width,\n height: options.height,\n position: options.position\n });\n\n // unwrap jquery\n this.container = container.get(0);\n\n\n /**\n * The code in the <project-logo></project-logo> area\n * must not be changed, see http://bpmn.io/license for more information\n *\n * <project-logo>\n */\n\n /* jshint -W101 */\n\n // inlined ../resources/bpmnjs.png\n var logoData = 'iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC';\n\n /* jshint +W101 */\n\n var a = $('<a href=\"http://bpmn.io\" target=\"_blank\" class=\"bjs-powered-by\" title=\"Powered by bpmn.io\" />').css({\n position: 'absolute',\n bottom: 15,\n right: 15,\n zIndex: 100\n });\n\n var logo = $('<img/>').attr('src', 'data:image/png;base64,' + logoData).appendTo(a);\n\n a.appendTo(container);\n\n /* </project-logo> */\n}\n\nViewer.prototype.importXML = function(xml, done) {\n\n var self = this;\n\n this.moddle = this.createModdle();\n\n this.moddle.fromXML(xml, 'bpmn:Definitions', function(err, definitions) {\n\n if (err) {\n err = checkValidationError(err);\n return done(err);\n }\n\n self.importDefinitions(definitions, done);\n });\n};\n\nViewer.prototype.saveXML = function(options, done) {\n\n if (!done) {\n done = options;\n options = {};\n }\n\n var definitions = this.definitions;\n\n if (!definitions) {\n return done(new Error('no definitions loaded'));\n }\n\n this.moddle.toXML(definitions, options, done);\n};\n\nViewer.prototype.createModdle = function() {\n return new BpmnModdle();\n};\n\nViewer.prototype.saveSVG = function(options, done) {\n\n if (!done) {\n done = options;\n options = {};\n }\n\n var canvas = this.get('canvas');\n\n var contentNode = canvas.getDefaultLayer(),\n defsNode = canvas._svg.select('defs');\n\n var contents = contentNode.innerSVG(),\n defs = (defsNode && defsNode.outerSVG()) || '';\n\n var bbox = contentNode.getBBox();\n\n var svg =\n '<?xml version=\"1.0\" encoding=\"utf-8\"?>/n' +\n '<!-- created with bpmn-js / http://bpmn.io -->/n' +\n '<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">/n' +\n '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ' +\n 'width=\"' + bbox.width + '\" height=\"' + bbox.height + '\" ' +\n 'viewBox=\"' + bbox.x + ' ' + bbox.y + ' ' + bbox.width + ' ' + bbox.height + '\" version=\"1.1\">' +\n defs + contents +\n '</svg>';\n\n done(null, svg);\n};\n\nViewer.prototype.get = function(name) {\n\n if (!this.diagram) {\n throw new Error('no diagram loaded');\n }\n\n return this.diagram.get(name);\n};\n\nViewer.prototype.invoke = function(fn) {\n\n if (!this.diagram) {\n throw new Error('no diagram loaded');\n }\n\n return this.diagram.invoke(fn);\n};\n\nViewer.prototype.importDefinitions = function(definitions, done) {\n\n // use try/catch to not swallow synchronous exceptions\n // that may be raised during model parsing\n try {\n if (this.diagram) {\n this.clear();\n }\n\n this.definitions = definitions;\n\n var diagram = this.diagram = this._createDiagram(this.options);\n\n this._init(diagram);\n\n Importer.importBpmnDiagram(diagram, definitions, done);\n } catch (e) {\n done(e);\n }\n};\n\nViewer.prototype._init = function(diagram) {\n initListeners(diagram, this.__listeners || []);\n};\n\nViewer.prototype._createDiagram = function(options) {\n\n var modules = [].concat(options.modules || this.getModules(), options.additionalModules || []);\n\n // add self as an available service\n modules.unshift({\n bpmnjs: [ 'value', this ],\n moddle: [ 'value', this.moddle ]\n });\n\n options = _.omit(options, 'additionalModules');\n\n options = _.extend(options, {\n canvas: { container: this.container },\n modules: modules\n });\n\n return new Diagram(options);\n};\n\n\nViewer.prototype.getModules = function() {\n return this._modules;\n};\n\n/**\n * Remove all drawn elements from the viewer.\n *\n * After calling this method the viewer can still\n * be reused for opening another diagram.\n */\nViewer.prototype.clear = function() {\n var diagram = this.diagram;\n\n if (diagram) {\n diagram.destroy();\n }\n};\n\n/**\n * Destroy the viewer instance and remove all its remainders\n * from the document tree.\n */\nViewer.prototype.destroy = function() {\n // clear underlying diagram\n this.clear();\n\n // remove container\n $(this.container).remove();\n};\n\n/**\n * Register an event listener on the viewer\n *\n * @param {String} event\n * @param {Function} handler\n */\nViewer.prototype.on = function(event, handler) {\n var diagram = this.diagram,\n listeners = this.__listeners = this.__listeners || [];\n\n listeners.push({ event: event, handler: handler });\n\n if (diagram) {\n diagram.get('eventBus').on(event, handler);\n }\n};\n\n// modules the viewer is composed of\nViewer.prototype._modules = [\n require(3),\n require(57),\n require(53)\n];\n\nmodule.exports = Viewer;\n","module.exports = {\n __depends__: [\n require(6),\n require(11)\n ]\n};","'use strict';\n\nvar _ = (window._);\n\nvar DefaultRenderer = require(43);\nvar TextUtil = require(70);\n\nvar DiUtil = require(12);\n\nvar createLine = DefaultRenderer.createLine;\n\n\nfunction BpmnRenderer(events, styles, pathMap) {\n\n DefaultRenderer.call(this, styles);\n\n var TASK_BORDER_RADIUS = 10;\n var INNER_OUTER_DIST = 3;\n\n var LABEL_STYLE = {\n fontFamily: 'Arial, sans-serif',\n fontSize: '12px'\n };\n\n var textUtil = new TextUtil({\n style: LABEL_STYLE,\n size: { width: 100 }\n });\n\n var markers = {};\n\n function addMarker(id, element) {\n markers[id] = element;\n }\n\n function marker(id) {\n return markers[id];\n }\n\n function initMarkers(svg) {\n\n function createMarker(id, options) {\n var attrs = _.extend({\n fill: 'black',\n strokeWidth: 1,\n strokeLinecap: 'round',\n strokeDasharray: 'none'\n }, options.attrs);\n\n var ref = options.ref || { x: 0, y: 0 };\n\n var scale = options.scale || 1;\n\n // fix for safari / chrome / firefox bug not correctly\n // resetting stroke dash array\n if (attrs.strokeDasharray === 'none') {\n attrs.strokeDasharray = [10000, 1];\n }\n\n var marker = options.element\n .attr(attrs)\n .marker(0, 0, 20, 20, ref.x, ref.y)\n .attr({\n markerWidth: 20 * scale,\n markerHeight: 20 * scale\n });\n\n return addMarker(id, marker);\n }\n\n\n createMarker('sequenceflow-end', {\n element: svg.path('M 1 5 L 11 10 L 1 15 Z'),\n ref: { x: 11, y: 10 },\n scale: 0.5\n });\n\n createMarker('messageflow-start', {\n element: svg.circle(6, 6, 5),\n attrs: {\n fill: 'white',\n stroke: 'black'\n },\n ref: { x: 6, y: 6 }\n });\n\n createMarker('messageflow-end', {\n element: svg.path('M 1 5 L 11 10 L 1 15 Z'),\n attrs: {\n fill: 'white',\n stroke: 'black'\n },\n ref: { x: 11, y: 10 }\n });\n\n createMarker('data-association-end', {\n element: svg.path('M 1 5 L 11 10 L 1 15'),\n attrs: {\n fill: 'white',\n stroke: 'black'\n },\n ref: { x: 11, y: 10 },\n scale: 0.5\n });\n\n createMarker('conditional-flow-marker', {\n element: svg.path('M 0 10 L 8 6 L 16 10 L 8 14 Z'),\n attrs: {\n fill: 'white',\n stroke: 'black'\n },\n ref: { x: -1, y: 10 },\n scale: 0.5\n });\n\n createMarker('conditional-default-flow-marker', {\n element: svg.path('M 1 4 L 5 16'),\n attrs: {\n stroke: 'black'\n },\n ref: { x: -5, y: 10 },\n scale: 0.5\n });\n }\n\n function computeStyle(custom, traits, defaultStyles) {\n if (!_.isArray(traits)) {\n defaultStyles = traits;\n traits = [];\n }\n\n return styles.style(traits || [], _.extend(defaultStyles, custom || {}));\n }\n\n function drawCircle(p, width, height, offset, attrs) {\n\n if (_.isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n\n attrs = computeStyle(attrs, {\n stroke: 'black',\n strokeWidth: 2,\n fill: 'white'\n });\n\n var cx = width / 2,\n cy = height / 2;\n\n return p.circle(cx, cy, Math.round((width + height) / 4 - offset)).attr(attrs);\n }\n\n function drawRect(p, width, height, r, offset, attrs) {\n\n if (_.isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n\n attrs = computeStyle(attrs, {\n stroke: 'black',\n strokeWidth: 2,\n fill: 'white'\n });\n\n return p.rect(offset, offset, width - offset * 2, height - offset * 2, r).attr(attrs);\n }\n\n function drawDiamond(p, width, height, attrs) {\n\n var x_2 = width / 2;\n var y_2 = height / 2;\n\n var points = [x_2, 0, width, y_2, x_2, height, 0, y_2 ];\n\n attrs = computeStyle(attrs, {\n stroke: 'black',\n strokeWidth: 2,\n fill: 'white'\n });\n\n return p.polygon(points).attr(attrs);\n }\n\n function drawLine(p, waypoints, attrs) {\n attrs = computeStyle(attrs, [ 'no-fill' ], {\n stroke: 'black',\n strokeWidth: 2,\n fill: 'none'\n });\n\n return createLine(waypoints, attrs).appendTo(p);\n }\n\n function drawPath(p, d, attrs) {\n\n attrs = computeStyle(attrs, [ 'no-fill' ], {\n strokeWidth: 2,\n stroke: 'black'\n });\n\n return p.path(d).attr(attrs);\n }\n\n function as(type) {\n return function(p, element) {\n return handlers[type](p, element);\n };\n }\n\n function renderer(type) {\n return handlers[type];\n }\n\n function renderEventContent(element, p) {\n\n var event = getSemantic(element);\n var isThrowing = isThrowEvent(event);\n\n if (isTypedEvent(event, 'bpmn:MessageEventDefinition')) {\n return renderer('bpmn:MessageEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:TimerEventDefinition')) {\n return renderer('bpmn:TimerEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:ConditionalEventDefinition')) {\n return renderer('bpmn:ConditionalEventDefinition')(p, element);\n }\n\n if (isTypedEvent(event, 'bpmn:SignalEventDefinition')) {\n return renderer('bpmn:SignalEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:CancelEventDefinition') &&\n isTypedEvent(event, 'bpmn:TerminateEventDefinition', { parallelMultiple: false })) {\n return renderer('bpmn:MultipleEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:CancelEventDefinition') &&\n isTypedEvent(event, 'bpmn:TerminateEventDefinition', { parallelMultiple: true })) {\n return renderer('bpmn:ParallelMultipleEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:EscalationEventDefinition')) {\n return renderer('bpmn:EscalationEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:LinkEventDefinition')) {\n return renderer('bpmn:LinkEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:ErrorEventDefinition')) {\n return renderer('bpmn:ErrorEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:CancelEventDefinition')) {\n return renderer('bpmn:CancelEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:CompensateEventDefinition')) {\n return renderer('bpmn:CompensateEventDefinition')(p, element, isThrowing);\n }\n\n if (isTypedEvent(event, 'bpmn:TerminateEventDefinition')) {\n return renderer('bpmn:TerminateEventDefinition')(p, element, isThrowing);\n }\n\n return null;\n }\n\n function renderLabel(p, label, options) {\n return textUtil.createText(p, label || '', options).addClass('djs-label');\n }\n\n function renderEmbeddedLabel(p, element, align) {\n var semantic = getSemantic(element);\n return renderLabel(p, semantic.name, { box: element, align: align, padding: 5 });\n }\n\n function renderExternalLabel(p, element, align) {\n var semantic = getSemantic(element);\n\n if (!semantic.name) {\n element.hidden = true;\n }\n\n return renderLabel(p, semantic.name, { box: element, align: align, style: { fontSize: '11px' } });\n }\n\n function renderLaneLabel(p, text, element) {\n var textBox = renderLabel(p, text, {\n box: { height: 30, width: element.height },\n align: 'center-middle'\n });\n\n var top = -1 * element.height;\n textBox.transform(\n 'rotate(270) ' +\n 'translate(' + top + ',' + 0 + ')'\n );\n }\n\n function createPathFromConnection(connection) {\n var waypoints = connection.waypoints;\n\n var pathData = 'm ' + waypoints[0].x + ',' + waypoints[0].y;\n for (var i = 1; i < waypoints.length; i++) {\n pathData += 'L' + waypoints[i].x + ',' + waypoints[i].y + ' ';\n }\n return pathData;\n }\n\n var handlers = {\n 'bpmn:Event': function(p, element, attrs) {\n return drawCircle(p, element.width, element.height, attrs);\n },\n 'bpmn:StartEvent': function(p, element) {\n var attrs = {};\n var semantic = getSemantic(element);\n\n if (!semantic.isInterrupting) {\n attrs = {\n strokeDasharray: '6',\n strokeLinecap: 'round'\n };\n }\n\n var circle = renderer('bpmn:Event')(p, element, attrs);\n\n renderEventContent(element, p);\n\n return circle;\n },\n 'bpmn:MessageEventDefinition': function(p, element, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_MESSAGE', {\n xScaleFactor: 0.9,\n yScaleFactor: 0.9,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.235,\n my: 0.315\n }\n });\n\n var fill = isThrowing ? 'black' : 'white';\n var stroke = isThrowing ? 'white' : 'black';\n\n var messagePath = drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill,\n stroke: stroke\n });\n\n return messagePath;\n },\n 'bpmn:TimerEventDefinition': function(p, element) {\n\n var circle = drawCircle(p, element.width, element.height, 0.2 * element.height, {\n strokeWidth: 2\n });\n\n var pathData = pathMap.getScaledPath('EVENT_TIMER_WH', {\n xScaleFactor: 0.75,\n yScaleFactor: 0.75,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.5,\n my: 0.5\n }\n });\n\n var path = drawPath(p, pathData, {\n strokeWidth: 2,\n strokeLinecap: 'square'\n });\n\n for(var i = 0;i < 12;i++) {\n\n var linePathData = pathMap.getScaledPath('EVENT_TIMER_LINE', {\n xScaleFactor: 0.75,\n yScaleFactor: 0.75,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.5,\n my: 0.5\n }\n });\n\n var width = element.width / 2;\n var height = element.height / 2;\n\n var linePath = drawPath(p, linePathData, {\n strokeWidth: 1,\n strokeLinecap: 'square',\n transform: 'rotate(' + (i * 30) + ',' + height + ',' + width + ')'\n });\n }\n\n return circle;\n },\n 'bpmn:EscalationEventDefinition': function(p, event, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_ESCALATION', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.5,\n my: 0.555\n }\n });\n\n var fill = isThrowing ? 'black' : 'none';\n\n return drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill\n });\n },\n 'bpmn:ConditionalEventDefinition': function(p, event) {\n var pathData = pathMap.getScaledPath('EVENT_CONDITIONAL', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.5,\n my: 0.222\n }\n });\n\n return drawPath(p, pathData, {\n strokeWidth: 1\n });\n },\n 'bpmn:LinkEventDefinition': function(p, event) {\n var pathData = pathMap.getScaledPath('EVENT_LINK', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.57,\n my: 0.263\n }\n });\n\n return drawPath(p, pathData, {\n strokeWidth: 1\n });\n },\n 'bpmn:ErrorEventDefinition': function(p, event, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_ERROR', {\n xScaleFactor: 1.1,\n yScaleFactor: 1.1,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.2,\n my: 0.722\n }\n });\n\n var fill = isThrowing ? 'black' : 'none';\n\n return drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill\n });\n },\n 'bpmn:CancelEventDefinition': function(p, event, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_CANCEL_45', {\n xScaleFactor: 1.0,\n yScaleFactor: 1.0,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.638,\n my: -0.055\n }\n });\n\n var fill = isThrowing ? 'black' : 'none';\n\n return drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill\n }).transform('rotate(45)');\n },\n 'bpmn:CompensateEventDefinition': function(p, event, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_COMPENSATION', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.201,\n my: 0.472\n }\n });\n\n var fill = isThrowing ? 'black' : 'none';\n\n return drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill\n });\n },\n 'bpmn:SignalEventDefinition': function(p, event, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_SIGNAL', {\n xScaleFactor: 0.9,\n yScaleFactor: 0.9,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.5,\n my: 0.2\n }\n });\n\n var fill = isThrowing ? 'black' : 'none';\n\n return drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill\n });\n },\n 'bpmn:MultipleEventDefinition': function(p, event, isThrowing) {\n var pathData = pathMap.getScaledPath('EVENT_MULTIPLE', {\n xScaleFactor: 1.1,\n yScaleFactor: 1.1,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.222,\n my: 0.36\n }\n });\n\n var fill = isThrowing ? 'black' : 'none';\n\n return drawPath(p, pathData, {\n strokeWidth: 1,\n fill: fill\n });\n },\n 'bpmn:ParallelMultipleEventDefinition': function(p, event) {\n var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', {\n xScaleFactor: 1.2,\n yScaleFactor: 1.2,\n containerWidth: event.width,\n containerHeight: event.height,\n position: {\n mx: 0.458,\n my: 0.194\n }\n });\n\n return drawPath(p, pathData, {\n strokeWidth: 1\n });\n },\n 'bpmn:EndEvent': function(p, element) {\n var circle = renderer('bpmn:Event')(p, element, {\n strokeWidth: 4\n });\n\n renderEventContent(element, p, true);\n\n return circle;\n },\n 'bpmn:TerminateEventDefinition': function(p, element) {\n var circle = drawCircle(p, element.width, element.height, 8, {\n strokeWidth: 4,\n fill: 'black'\n });\n\n return circle;\n },\n 'bpmn:IntermediateEvent': function(p, element) {\n var outer = renderer('bpmn:Event')(p, element, { strokeWidth: 1 });\n var inner = drawCircle(p, element.width, element.height, INNER_OUTER_DIST, { strokeWidth: 1, fill: 'none' });\n\n renderEventContent(element, p);\n\n return outer;\n },\n 'bpmn:IntermediateCatchEvent': as('bpmn:IntermediateEvent'),\n 'bpmn:IntermediateThrowEvent': as('bpmn:IntermediateEvent'),\n\n 'bpmn:Activity': function(p, element, attrs) {\n return drawRect(p, element.width, element.height, TASK_BORDER_RADIUS, attrs);\n },\n\n 'bpmn:Task': function(p, element) {\n var rect = renderer('bpmn:Activity')(p, element);\n renderEmbeddedLabel(p, element, 'center-middle');\n attachTaskMarkers(p, element);\n return rect;\n },\n 'bpmn:ServiceTask': function(p, element) {\n var task = renderer('bpmn:Task')(p, element);\n\n var pathDataBG = pathMap.getScaledPath('TASK_TYPE_SERVICE', {\n abspos: {\n x: 12,\n y: 18\n }\n });\n\n var servicePathBG = drawPath(p, pathDataBG, {\n strokeWidth: 1,\n fill: 'none'\n });\n\n var fillPathData = pathMap.getScaledPath('TASK_TYPE_SERVICE_FILL', {\n abspos: {\n x: 17.2,\n y: 18\n }\n });\n\n var serviceFillPath = drawPath(p, fillPathData, {\n strokeWidth: 0,\n stroke: 'none',\n fill: 'white'\n });\n\n var pathData = pathMap.getScaledPath('TASK_TYPE_SERVICE', {\n abspos: {\n x: 17,\n y: 22\n }\n });\n\n var servicePath = drawPath(p, pathData, {\n strokeWidth: 1,\n fill: 'white'\n });\n\n return task;\n },\n 'bpmn:UserTask': function(p, element) {\n var task = renderer('bpmn:Task')(p, element);\n\n var x = 15;\n var y = 12;\n\n var pathData = pathMap.getScaledPath('TASK_TYPE_USER_1', {\n abspos: {\n x: x,\n y: y\n }\n });\n\n var userPath = drawPath(p, pathData, {\n strokeWidth: 0.5,\n fill: 'none'\n });\n\n var pathData2 = pathMap.getScaledPath('TASK_TYPE_USER_2', {\n abspos: {\n x: x,\n y: y\n }\n });\n\n var userPath2 = drawPath(p, pathData2, {\n strokeWidth: 0.5,\n fill: 'none'\n });\n\n var pathData3 = pathMap.getScaledPath('TASK_TYPE_USER_3', {\n abspos: {\n x: x,\n y: y\n }\n });\n\n var userPath3 = drawPath(p, pathData3, {\n strokeWidth: 0.5,\n fill: 'black'\n });\n\n return task;\n },\n 'bpmn:ManualTask': function(p, element) {\n var task = renderer('bpmn:Task')(p, element);\n\n var pathData = pathMap.getScaledPath('TASK_TYPE_MANUAL', {\n abspos: {\n x: 17,\n y: 15\n }\n });\n\n var userPath = drawPath(p, pathData, {\n strokeWidth: 0.25,\n fill: 'white',\n stroke: 'black'\n });\n\n return task;\n },\n 'bpmn:SendTask': function(p, element) {\n var task = renderer('bpmn:Task')(p, element);\n\n var pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: 21,\n containerHeight: 14,\n position: {\n mx: 0.285,\n my: 0.357\n }\n });\n\n var sendPath = drawPath(p, pathData, {\n strokeWidth: 1,\n fill: 'black',\n stroke: 'white'\n });\n\n return task;\n },\n 'bpmn:ReceiveTask' : function(p, element) {\n var semantic = getSemantic(element);\n\n var task = renderer('bpmn:Task')(p, element);\n var pathData;\n\n if (semantic.instantiate) {\n drawCircle(p, 28, 28, 20 * 0.22, { strokeWidth: 1 });\n\n pathData = pathMap.getScaledPath('TASK_TYPE_INSTANTIATING_SEND', {\n abspos: {\n x: 7.77,\n y: 9.52\n }\n });\n } else {\n\n pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {\n xScaleFactor: 0.9,\n yScaleFactor: 0.9,\n containerWidth: 21,\n containerHeight: 14,\n position: {\n mx: 0.3,\n my: 0.4\n }\n });\n }\n\n var sendPath = drawPath(p, pathData, {\n strokeWidth: 1\n });\n\n return task;\n },\n 'bpmn:ScriptTask': function(p, element) {\n var task = renderer('bpmn:Task')(p, element);\n\n var pathData = pathMap.getScaledPath('TASK_TYPE_SCRIPT', {\n abspos: {\n x: 15,\n y: 20\n }\n });\n\n var scriptPath = drawPath(p, pathData, {\n strokeWidth: 1\n });\n\n return task;\n },\n 'bpmn:BusinessRuleTask': function(p, element) {\n var task = renderer('bpmn:Task')(p, element);\n\n var headerPathData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_HEADER', {\n abspos: {\n x: 8,\n y: 8\n }\n });\n\n var businessHeaderPath = drawPath(p, headerPathData);\n businessHeaderPath.attr({\n strokeWidth: 1,\n fill: 'AAA'\n });\n\n var headerData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_MAIN', {\n abspos: {\n x: 8,\n y: 8\n }\n });\n\n var businessPath = drawPath(p, headerData);\n businessPath.attr({\n strokeWidth: 1\n });\n\n return task;\n },\n 'bpmn:SubProcess': function(p, element, attrs) {\n var rect = renderer('bpmn:Activity')(p, element, attrs);\n\n var semantic = getSemantic(element),\n di = getDi(element);\n\n var expanded = DiUtil.isExpanded(semantic);\n\n var isEventSubProcess = !!semantic.triggeredByEvent;\n if (isEventSubProcess) {\n rect.attr({\n strokeDasharray: '1,2'\n });\n }\n\n renderEmbeddedLabel(p, element, expanded ? 'center-top' : 'center-middle');\n\n if (expanded) {\n attachTaskMarkers(p, element);\n } else {\n attachTaskMarkers(p, element, ['SubProcessMarker']);\n }\n\n return rect;\n },\n 'bpmn:AdHocSubProcess': function(p, element) {\n return renderer('bpmn:SubProcess')(p, element);\n },\n 'bpmn:Transaction': function(p, element) {\n var outer = renderer('bpmn:SubProcess')(p, element);\n\n var innerAttrs = styles.style([ 'no-fill', 'no-events' ]);\n var inner = drawRect(p, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_OUTER_DIST, innerAttrs);\n\n return outer;\n },\n 'bpmn:CallActivity': function(p, element) {\n return renderer('bpmn:SubProcess')(p, element, {\n strokeWidth: 5\n });\n },\n 'bpmn:Participant': function(p, element) {\n\n var lane = renderer('bpmn:Lane')(p, element);\n\n var expandedPool = DiUtil.isExpandedPool(getSemantic(element));\n\n if (expandedPool) {\n drawLine(p, [\n { x: 30, y: 0 },\n { x: 30, y: element.height }\n ]);\n var text = getSemantic(element).name;\n renderLaneLabel(p, text, element);\n } else {\n // Collapsed pool draw text inline\n var text2 = getSemantic(element).name;\n renderLabel(p, text2, { box: element, align: 'center-middle' });\n }\n\n var participantMultiplicity = !!(getSemantic(element).participantMultiplicity);\n\n if(participantMultiplicity) {\n renderer('ParticipantMultiplicityMarker')(p, element);\n }\n\n return lane;\n },\n 'bpmn:Lane': function(p, element) {\n var rect = drawRect(p, element.width, element.height, 0, {\n fill: 'none'\n });\n\n var semantic = getSemantic(element);\n\n if (semantic.$type === 'bpmn:Lane') {\n var text = semantic.name;\n renderLaneLabel(p, text, element);\n }\n\n return rect;\n },\n 'bpmn:InclusiveGateway': function(p, element) {\n var diamond = drawDiamond(p, element.width, element.height);\n\n var circle = drawCircle(p, element.width, element.height, element.height * 0.24, {\n strokeWidth: 2.5,\n fill: 'none'\n });\n\n return diamond;\n },\n 'bpmn:ExclusiveGateway': function(p, element) {\n var diamond = drawDiamond(p, element.width, element.height);\n\n var pathData = pathMap.getScaledPath('GATEWAY_EXCLUSIVE', {\n xScaleFactor: 0.4,\n yScaleFactor: 0.4,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.32,\n my: 0.3\n }\n });\n\n if (!!(getDi(element).isMarkerVisible)) {\n drawPath(p, pathData, {\n strokeWidth: 1,\n fill: 'black'\n });\n }\n\n return diamond;\n },\n 'bpmn:ComplexGateway': function(p, element) {\n var diamond = drawDiamond(p, element.width, element.height);\n\n var pathData = pathMap.getScaledPath('GATEWAY_COMPLEX', {\n xScaleFactor: 0.5,\n yScaleFactor:0.5,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.46,\n my: 0.26\n }\n });\n\n var complexPath = drawPath(p, pathData, {\n strokeWidth: 1,\n fill: 'black'\n });\n\n return diamond;\n },\n 'bpmn:ParallelGateway': function(p, element) {\n var diamond = drawDiamond(p, element.width, element.height);\n\n var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {\n xScaleFactor: 0.6,\n yScaleFactor:0.6,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.46,\n my: 0.2\n }\n });\n\n var parallelPath = drawPath(p, pathData, {\n strokeWidth: 1,\n fill: 'black'\n });\n\n return diamond;\n },\n 'bpmn:EventBasedGateway': function(p, element) {\n\n var semantic = getSemantic(element);\n\n var diamond = drawDiamond(p, element.width, element.height);\n\n var outerCircle = drawCircle(p, element.width, element.height, element.height * 0.20, {\n strokeWidth: 1,\n fill: 'none'\n });\n\n var type = semantic.eventGatewayType;\n var instantiate = !!semantic.instantiate;\n\n function drawEvent() {\n\n var pathData = pathMap.getScaledPath('GATEWAY_EVENT_BASED', {\n xScaleFactor: 0.18,\n yScaleFactor: 0.18,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.36,\n my: 0.44\n }\n });\n\n var eventPath = drawPath(p, pathData, {\n strokeWidth: 2,\n fill: 'none'\n });\n }\n\n if (type === 'Parallel') {\n\n var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {\n xScaleFactor: 0.4,\n yScaleFactor:0.4,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.474,\n my: 0.296\n }\n });\n\n var parallelPath = drawPath(p, pathData);\n parallelPath.attr({\n strokeWidth: 1,\n fill: 'none'\n });\n } else if (type === 'Exclusive') {\n\n if (!instantiate) {\n var innerCircle = drawCircle(p, element.width, element.height, element.height * 0.26);\n innerCircle.attr({\n strokeWidth: 1,\n fill: 'none'\n });\n }\n\n drawEvent();\n }\n\n\n return diamond;\n },\n 'bpmn:Gateway': function(p, element) {\n return drawDiamond(p, element.width, element.height);\n },\n 'bpmn:SequenceFlow': function(p, element) {\n var pathData = createPathFromConnection(element);\n var path = drawPath(p, pathData, {\n markerEnd: marker('sequenceflow-end')\n });\n\n var sequenceFlow = getSemantic(element);\n var source = element.source.businessObject;\n\n // conditional flow marker\n if (sequenceFlow.conditionExpression && source.$instanceOf('bpmn:Task')) {\n path.attr({\n markerStart: marker('conditional-flow-marker')\n });\n }\n\n // default marker\n if (source.default && source.$instanceOf('bpmn:Gateway') && source.default === sequenceFlow) {\n path.attr({\n markerStart: marker('conditional-default-flow-marker')\n });\n }\n\n return path;\n },\n 'bpmn:Association': function(p, element, attrs) {\n\n attrs = _.extend({\n strokeDasharray: '1,6',\n strokeLinecap: 'round'\n }, attrs || {});\n\n // TODO(nre): style according to directed state\n return drawLine(p, element.waypoints, attrs);\n },\n 'bpmn:DataInputAssociation': function(p, element) {\n return renderer('bpmn:Association')(p, element, {\n markerEnd: marker('data-association-end')\n });\n },\n 'bpmn:DataOutputAssociation': function(p, element) {\n return renderer('bpmn:Association')(p, element, {\n markerEnd: marker('data-association-end')\n });\n },\n 'bpmn:MessageFlow': function(p, element) {\n\n var di = getDi(element);\n\n var pathData = createPathFromConnection(element);\n var path = drawPath(p, pathData, {\n markerEnd: marker('messageflow-end'),\n markerStart: marker('messageflow-start'),\n strokeDasharray: '10',\n strokeLinecap: 'round',\n strokeWidth: 1\n });\n\n if (!!di.messageVisibleKind) {\n var midPoint = path.getPointAtLength(path.getTotalLength() / 2);\n\n var markerPathData = pathMap.getScaledPath('MESSAGE_FLOW_MARKER', {\n abspos: {\n x: midPoint.x,\n y: midPoint.y\n }\n });\n\n var messageAttrs = { strokeWidth: 1 };\n\n if (di.messageVisibleKind === 'initiating') {\n messageAttrs.fill = 'white';\n messageAttrs.stroke = 'black';\n } else {\n messageAttrs.fill = '#888';\n messageAttrs.stroke = 'white';\n }\n\n drawPath(p, markerPathData, messageAttrs);\n }\n\n return path;\n },\n 'bpmn:DataObject': function(p, element) {\n var pathData = pathMap.getScaledPath('DATA_OBJECT_PATH', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.474,\n my: 0.296\n }\n });\n\n var elementObject = drawPath(p, pathData, { fill: 'white' });\n\n var semantic = getSemantic(element);\n\n if (isCollection(semantic)) {\n renderDataItemCollection(p, element);\n }\n\n return elementObject;\n },\n 'bpmn:DataObjectReference': as('bpmn:DataObject'),\n 'bpmn:DataInput': function(p, element) {\n\n var arrowPathData = pathMap.getRawPath('DATA_ARROW');\n\n // page\n var elementObject = renderer('bpmn:DataObject')(p, element);\n\n // arrow\n var elementInput = drawPath(p, arrowPathData, { strokeWidth: 1 });\n\n return elementObject;\n },\n 'bpmn:DataOutput': function(p, element) {\n var arrowPathData = pathMap.getRawPath('DATA_ARROW');\n\n // page\n var elementObject = renderer('bpmn:DataObject')(p, element);\n\n // arrow\n var elementInput = drawPath(p, arrowPathData, {\n strokeWidth: 1,\n fill: 'black'\n });\n\n return elementObject;\n },\n 'bpmn:DataStoreReference': function(p, element) {\n var DATA_STORE_PATH = pathMap.getScaledPath('DATA_STORE', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0,\n my: 0.133\n }\n });\n\n var elementStore = drawPath(p, DATA_STORE_PATH, {\n strokeWidth: 2,\n fill: 'white'\n });\n\n return elementStore;\n },\n 'bpmn:BoundaryEvent': function(p, element) {\n\n var semantic = getSemantic(element),\n cancel = semantic.cancelActivity;\n\n var attrs = {\n strokeLinecap: 'round',\n strokeWidth: 1\n };\n\n if (!cancel) {\n attrs.strokeDasharray = '6';\n }\n\n var outer = renderer('bpmn:Event')(p, element, attrs);\n var inner = drawCircle(p, element.width, element.height, INNER_OUTER_DIST, attrs);\n\n renderEventContent(element, p);\n\n return outer;\n },\n 'bpmn:Group': function(p, element) {\n return drawRect(p, element.width, element.height, TASK_BORDER_RADIUS, {\n strokeWidth: 1,\n strokeDasharray: '8,3,1,3',\n fill: 'none',\n pointerEvents: 'none'\n });\n },\n 'label': function(p, element) {\n return renderExternalLabel(p, element, '');\n },\n 'bpmn:TextAnnotation': function(p, element) {\n var style = {\n 'fill': 'none',\n 'stroke': 'none'\n };\n var textElement = drawRect(p, element.width, element.height, 0, 0, style);\n var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0\n }\n });\n drawPath(p, textPathData);\n\n var text = getSemantic(element).text || '';\n renderLabel(p, text, { box: element, align: 'left-middle', padding: 5 });\n\n return textElement;\n },\n 'ParticipantMultiplicityMarker': function(p, element) {\n var subProcessPath = pathMap.getScaledPath('MARKER_PARALLEL', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: ((element.width / 2) / element.width),\n my: (element.height - 15) / element.height\n }\n });\n\n drawPath(p, subProcessPath);\n },\n 'SubProcessMarker': function(p, element) {\n var markerRect = drawRect(p, 14, 14, 0, {\n strokeWidth: 1\n });\n\n // Process marker is placed in the middle of the box\n // therefore fixed values can be used here\n markerRect.transform('translate(' + (element.width / 2 - 7.5) + ',' + (element.height - 20) + ')');\n\n var subProcessPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', {\n xScaleFactor: 1.5,\n yScaleFactor: 1.5,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: (element.width / 2 - 7.5) / element.width,\n my: (element.height - 20) / element.height\n }\n });\n\n drawPath(p, subProcessPath);\n },\n 'ParallelMarker': function(p, element, position) {\n var subProcessPath = pathMap.getScaledPath('MARKER_PARALLEL', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: ((element.width / 2 + position.parallel) / element.width),\n my: (element.height - 20) / element.height\n }\n });\n drawPath(p, subProcessPath);\n },\n 'SequentialMarker': function(p, element, position) {\n var sequentialPath = pathMap.getScaledPath('MARKER_SEQUENTIAL', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: ((element.width / 2 + position.seq) / element.width),\n my: (element.height - 19) / element.height\n }\n });\n drawPath(p, sequentialPath);\n },\n 'CompensationMarker': function(p, element, position) {\n var compensationPath = pathMap.getScaledPath('MARKER_COMPENSATION', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: ((element.width / 2 + position.compensation) / element.width),\n my: (element.height - 13) / element.height\n }\n });\n drawPath(p, compensationPath, { strokeWidth: 1 });\n },\n 'LoopMarker': function(p, element, position) {\n var loopPath = pathMap.getScaledPath('MARKER_LOOP', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: ((element.width / 2 + position.loop) / element.width),\n my: (element.height - 7) / element.height\n }\n });\n\n drawPath(p, loopPath, {\n strokeWidth: 1,\n fill: 'none',\n strokeLinecap: 'round',\n strokeMiterlimit: 0.5\n });\n },\n 'AdhocMarker': function(p, element, position) {\n var loopPath = pathMap.getScaledPath('MARKER_ADHOC', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: ((element.width / 2 + position.adhoc) / element.width),\n my: (element.height - 15) / element.height\n }\n });\n\n drawPath(p, loopPath, {\n strokeWidth: 1,\n fill: 'black'\n });\n }\n };\n\n function attachTaskMarkers(p, element, taskMarkers) {\n var obj = getSemantic(element);\n\n var subprocess = _.contains(taskMarkers, 'SubProcessMarker');\n var position;\n\n if (subprocess) {\n position = {\n seq: -21,\n parallel: -22,\n compensation: -42,\n loop: -18,\n adhoc: 10\n };\n } else {\n position = {\n seq: -3,\n parallel: -6,\n compensation: -27,\n loop: 0,\n adhoc: 10\n };\n }\n\n _.forEach(taskMarkers, function(marker) {\n renderer(marker)(p, element, position);\n });\n\n if (obj.$type === 'bpmn:AdHocSubProcess') {\n renderer('AdhocMarker')(p, element, position);\n }\n if (obj.loopCharacteristics && obj.loopCharacteristics.isSequential === undefined) {\n renderer('LoopMarker')(p, element, position);\n return;\n }\n if (obj.loopCharacteristics &&\n obj.loopCharacteristics.isSequential !== undefined &&\n !obj.loopCharacteristics.isSequential) {\n renderer('ParallelMarker')(p, element, position);\n }\n if (obj.loopCharacteristics && !!obj.loopCharacteristics.isSequential) {\n renderer('SequentialMarker')(p, element, position);\n }\n if (!!obj.isForCompensation) {\n renderer('CompensationMarker')(p, element, position);\n }\n }\n\n function drawShape(parent, element) {\n var type = element.type;\n var h = handlers[type];\n\n /* jshint -W040 */\n if (!h) {\n return DefaultRenderer.prototype.drawShape.apply(this, [ parent, element ]);\n } else {\n return h(parent, element);\n }\n }\n\n function drawConnection(parent, element) {\n var type = element.type;\n var h = handlers[type];\n\n /* jshint -W040 */\n if (!h) {\n return DefaultRenderer.prototype.drawConnection.apply(this, [ parent, element ]);\n } else {\n return h(parent, element);\n }\n }\n\n function renderDataItemCollection(p, element) {\n\n var yPosition = (element.height - 16) / element.height;\n\n var pathData = pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH', {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.451,\n my: yPosition\n }\n });\n\n var collectionPath = drawPath(p, pathData, {\n strokeWidth: 2\n });\n }\n\n function isCollection(element, filter) {\n return element.isCollection ||\n (element.elementObjectRef && element.elementObjectRef.isCollection);\n }\n\n function getDi(element) {\n return element.businessObject.di;\n }\n\n function getSemantic(element) {\n return element.businessObject;\n }\n\n /**\n * Checks if eventDefinition of the given element matches with semantic type.\n *\n * @return {boolean} true if element is of the given semantic type\n */\n function isTypedEvent(event, eventDefinitionType, filter) {\n\n function matches(definition, filter) {\n return _.all(filter, function(val, key) {\n\n // we want a == conversion here, to be able to catch\n // undefined == false and friends\n /* jshint -W116 */\n return definition[key] == val;\n });\n }\n\n return _.any(event.eventDefinitions, function(definition) {\n return definition.$type === eventDefinitionType && matches(event, filter);\n });\n }\n\n function isThrowEvent(event) {\n return (event.$type === 'bpmn:IntermediateThrowEvent') || (event.$type === 'bpmn:EndEvent');\n }\n\n // hook onto canvas init event to initialize\n // connection start/end markers on svg\n events.on('canvas.init', function(event) {\n initMarkers(event.svg);\n });\n\n this.drawShape = drawShape;\n this.drawConnection = drawConnection;\n}\n\nBpmnRenderer.prototype = Object.create(DefaultRenderer.prototype);\n\n\nBpmnRenderer.$inject = [ 'eventBus', 'styles', 'pathMap' ];\n\nmodule.exports = BpmnRenderer;","'use strict';\n\n/**\n * Map containing SVG paths needed by BpmnRenderer.\n */\n\nfunction PathMap(Snap) {\n\n /**\n * Contains a map of path elements\n *\n * <h1>Path definition</h1>\n * A parameterized path is defined like this:\n * <pre>\n * 'GATEWAY_PARALLEL': {\n * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +\n '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',\n * height: 17.5,\n * width: 17.5,\n * heightElements: [2.5, 7.5],\n * widthElements: [2.5, 7.5]\n * }\n * </pre>\n * <p>It's important to specify a correct <b>height and width</b> for the path as the scaling\n * is based on the ratio between the specified height and width in this object and the\n * height and width that is set as scale target (Note x,y coordinates will be scaled with\n * individual ratios).</p>\n * <p>The '<b>heightElements</b>' and '<b>widthElements</b>' array must contain the values that will be scaled.\n * The scaling is based on the computed ratios.\n * Coordinates on the y axis should be in the <b>heightElement</b>'s array, they will be scaled using\n * the computed ratio coefficient.\n * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.\n * <ul>\n * <li>The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....</li>\n * <li>The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....</li>\n * </ul>\n * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.\n * </p>\n */\n this.pathMap = {\n 'EVENT_MESSAGE': {\n d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',\n height: 36,\n width: 36,\n heightElements: [6, 14],\n widthElements: [10.5, 21]\n },\n 'EVENT_SIGNAL': {\n d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z',\n height: 36,\n width: 36,\n heightElements: [18],\n widthElements: [10, 20]\n },\n 'EVENT_ESCALATION': {\n d: 'm {mx},{my} c -{e.x1},{e.y0} -{e.x3},{e.y1} -{e.x5},{e.y4} {e.x1},-{e.y3} {e.x3},-{e.y5} {e.x5},-{e.y6} ' +\n '{e.x0},{e.y3} {e.x2},{e.y5} {e.x4},{e.y6} -{e.x0},-{e.y0} -{e.x2},-{e.y1} -{e.x4},-{e.y4} z',\n height: 36,\n width: 36,\n heightElements: [2.382, 4.764, 4.926, 6.589333, 7.146, 13.178667, 19.768],\n widthElements: [2.463, 2.808, 4.926, 5.616, 7.389, 8.424]\n },\n 'EVENT_CONDITIONAL': {\n d: 'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z ' +\n 'M {e.x2},{e.y3} l {e.x0},0 ' +\n 'M {e.x2},{e.y4} l {e.x0},0 ' +\n 'M {e.x2},{e.y5} l {e.x0},0 ' +\n 'M {e.x2},{e.y6} l {e.x0},0 ' +\n 'M {e.x2},{e.y7} l {e.x0},0 ' +\n 'M {e.x2},{e.y8} l {e.x0},0 ',\n height: 36,\n width: 36,\n heightElements: [8.5, 14.5, 18, 11.5, 14.5, 17.5, 20.5, 23.5, 26.5],\n widthElements: [10.5, 14.5, 12.5]\n },\n 'EVENT_LINK': {\n d: 'm {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z',\n height: 36,\n width: 36,\n heightElements: [4.4375, 6.75, 7.8125],\n widthElements: [9.84375, 13.5]\n },\n 'EVENT_ERROR': {\n d: 'm {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z',\n height: 36,\n width: 36,\n heightElements: [0.023, 8.737, 8.151, 16.564, 10.591, 8.714],\n widthElements: [0.085, 6.672, 6.97, 4.273, 5.337, 6.636]\n },\n 'EVENT_CANCEL_45': {\n d: 'm {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 ' +\n '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',\n height: 36,\n width: 36,\n heightElements: [4.75, 8.5],\n widthElements: [4.75, 8.5]\n },\n 'EVENT_COMPENSATION': {\n d: 'm {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x0},0 {e.x0},-{e.y0} 0,{e.y1} z',\n height: 36,\n width: 36,\n heightElements: [5, 10],\n widthElements: [10]\n },\n 'EVENT_TIMER_WH': {\n d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',\n height: 36,\n width: 36,\n heightElements: [10, 2],\n widthElements: [3, 7]\n },\n 'EVENT_TIMER_LINE': {\n d: 'M {mx},{my} ' +\n 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ',\n height: 36,\n width: 36,\n heightElements: [10, 3],\n widthElements: [0, 0]\n },\n 'EVENT_MULTIPLE': {\n d:'m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z',\n height: 36,\n width: 36,\n heightElements: [6.28099, 12.56199],\n widthElements: [3.1405, 9.42149, 12.56198]\n },\n 'EVENT_PARALLEL_MULTIPLE': {\n d:'m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +\n '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',\n height: 36,\n width: 36,\n heightElements: [2.56228, 7.68683],\n widthElements: [2.56228, 7.68683]\n },\n 'GATEWAY_EXCLUSIVE': {\n d:'m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} ' +\n '{e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} ' +\n '{e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z',\n height: 17.5,\n width: 17.5,\n heightElements: [8.5, 6.5312, -6.5312, -8.5],\n widthElements: [6.5, -6.5, 3, -3, 5, -5]\n },\n 'GATEWAY_PARALLEL': {\n d:'m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 ' +\n '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',\n height: 30,\n width: 30,\n heightElements: [5, 12.5],\n widthElements: [5, 12.5]\n },\n 'GATEWAY_EVENT_BASED': {\n d:'m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z',\n height: 11,\n width: 11,\n heightElements: [-6, 6, 12, -12],\n widthElements: [9, -3, -12]\n },\n 'GATEWAY_COMPLEX': {\n d:'m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} ' +\n '{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} ' +\n '{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} ' +\n '-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z',\n height: 17.125,\n width: 17.125,\n heightElements: [4.875, 3.4375, 2.125, 3],\n widthElements: [3.4375, 2.125, 4.875, 3]\n },\n 'DATA_OBJECT_PATH': {\n d:'m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',\n height: 61,\n width: 51,\n heightElements: [10, 50, 60],\n widthElements: [10, 40, 50, 60]\n },\n 'DATA_OBJECT_COLLECTION_PATH': {\n d:'m {mx}, {my} ' +\n 'm 0 15 l 0 -15 ' +\n 'm 4 15 l 0 -15 ' +\n 'm 4 15 l 0 -15 ',\n height: 61,\n width: 51,\n heightElements: [12],\n widthElements: [1, 6, 12, 15]\n },\n 'DATA_ARROW': {\n d:'m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z',\n height: 61,\n width: 51,\n heightElements: [],\n widthElements: []\n },\n 'DATA_STORE': {\n d:'m {mx},{my} ' +\n 'l 0,{e.y2} ' +\n 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' +\n 'l 0,-{e.y2} ' +\n 'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0' +\n 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' +\n 'm -{e.x2},{e.y0}' +\n 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0' +\n 'm -{e.x2},{e.y0}' +\n 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0',\n height: 61,\n width: 61,\n heightElements: [7, 10, 45],\n widthElements: [2, 58, 60]\n },\n 'TEXT_ANNOTATION': {\n d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',\n height: 30,\n width: 10,\n heightElements: [30],\n widthElements: [10]\n },\n 'MARKER_SUB_PROCESS': {\n d: 'm{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_PARALLEL': {\n d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_SEQUENTIAL': {\n d: 'm{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_COMPENSATION': {\n d: 'm {mx},{my} 8,-5 0,10 z m 9,0 8,-5 0,10 z',\n height: 10,\n width: 21,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_LOOP': {\n d: 'm {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 ' +\n '-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 ' +\n '0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 ' +\n 'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902',\n height: 13.9,\n width: 13.7,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_ADHOC': {\n d: 'm {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 ' +\n '3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 ' +\n '1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 ' +\n '-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 ' +\n '-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z',\n height: 4,\n width: 15,\n heightElements: [],\n widthElements: []\n },\n 'TASK_TYPE_SEND': {\n d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',\n height: 14,\n width: 21,\n heightElements: [6, 14],\n widthElements: [10.5, 21]\n },\n 'TASK_TYPE_SCRIPT': {\n d: 'm {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 ' +\n 'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z ' +\n 'm -7,-12 l 5,0 ' +\n 'm -4.5,3 l 4.5,0 ' +\n 'm -3,3 l 5,0' +\n 'm -4,3 l 5,0',\n height: 15,\n width: 12.6,\n heightElements: [6, 14],\n widthElements: [10.5, 21]\n },\n 'TASK_TYPE_USER_1': {\n d: 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' +\n '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' +\n '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' +\n 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' +\n 'm -8,6 l 0,5.5 m 11,0 l 0,-5'\n },\n 'TASK_TYPE_USER_2': {\n d: 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' +\n '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 '\n },\n 'TASK_TYPE_USER_3': {\n d: 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' +\n '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' +\n '-4.20799998,3.36699999 -4.20699998,4.34799999 z'\n },\n 'TASK_TYPE_MANUAL': {\n d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 ' +\n '-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 ' +\n '0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 ' +\n '-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 ' +\n '0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' +\n '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' +\n '2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 ' +\n '-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' +\n '-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 ' +\n '-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 ' +\n '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' +\n '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'\n },\n 'TASK_TYPE_INSTANTIATING_SEND': {\n d: 'm {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6'\n },\n 'TASK_TYPE_SERVICE': {\n d: 'm {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 ' +\n '0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 ' +\n '-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 ' +\n 'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 ' +\n '-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 ' +\n '-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 ' +\n 'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 ' +\n '-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 ' +\n 'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 ' +\n 'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 ' +\n '0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 ' +\n 'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z ' +\n 'm 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' +\n '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' +\n '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'\n },\n 'TASK_TYPE_SERVICE_FILL': {\n d: 'm {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' +\n '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' +\n '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'\n },\n 'TASK_TYPE_BUSINESS_RULE_HEADER': {\n d: 'm {mx},{my} 0,4 20,0 0,-4 z'\n },\n 'TASK_TYPE_BUSINESS_RULE_MAIN': {\n d: 'm {mx},{my} 0,12 20,0 0,-12 z' +\n 'm 0,8 l 20,0 ' +\n 'm -13,-4 l 0,8'\n },\n 'MESSAGE_FLOW_MARKER': {\n d: 'm {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6'\n }\n };\n\n this.getRawPath = function getRawPath(pathId) {\n return this.pathMap[pathId].d;\n };\n\n /**\n * Scales the path to the given height and width.\n * <h1>Use case</h1>\n * <p>Use case is to scale the content of elements (event, gateways) based\n * on the element bounding box's size.\n * </p>\n * <h1>Why not transform</h1>\n * <p>Scaling a path with transform() will also scale the stroke and IE does not support\n * the option 'non-scaling-stroke' to prevent this.\n * Also there are use cases where only some parts of a path should be\n * scaled.</p>\n *\n * @param {String} pathId The ID of the path.\n * @param {Object} param <p>\n * Example param object scales the path to 60% size of the container (data.width, data.height).\n * <pre>\n * {\n * xScaleFactor: 0.6,\n * yScaleFactor:0.6,\n * containerWidth: data.width,\n * containerHeight: data.height,\n * position: {\n * mx: 0.46,\n * my: 0.2,\n * }\n * }\n * </pre>\n * <ul>\n * <li>targetpathwidth = xScaleFactor * containerWidth</li>\n * <li>targetpathheight = yScaleFactor * containerHeight</li>\n * <li>Position is used to set the starting coordinate of the path. M is computed:\n * <ul>\n * <li>position.x * containerWidth</li>\n * <li>position.y * containerHeight</li>\n * </ul>\n * Center of the container <pre> position: {\n * mx: 0.5,\n * my: 0.5,\n * }</pre>\n * Upper left corner of the container\n * <pre> position: {\n * mx: 0.0,\n * my: 0.0,\n * }</pre>\n * </li>\n * </ul>\n * </p>\n *\n */\n this.getScaledPath = function getScaledPath(pathId, param) {\n var rawPath = this.pathMap[pathId];\n\n // positioning\n // compute the start point of the path\n var mx, my;\n\n if(!!param.abspos) {\n mx = param.abspos.x;\n my = param.abspos.y;\n } else {\n mx = param.containerWidth * param.position.mx;\n my = param.containerHeight * param.position.my;\n }\n\n var coordinates = {}; //map for the scaled coordinates\n if(param.position) {\n\n // path\n var heightRatio = (param.containerHeight / rawPath.height) * param.yScaleFactor;\n var widthRatio = (param.containerWidth / rawPath.width) * param.xScaleFactor;\n\n\n //Apply height ratio\n for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {\n coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;\n }\n\n //Apply width ratio\n for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {\n coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;\n }\n }\n\n //Apply value to raw path\n var path = Snap.format(\n rawPath.d, {\n mx: mx,\n my: my,\n e: coordinates\n }\n );\n return path;\n };\n}\n\n\nPathMap.$inject = [ 'snap' ];\n\nmodule.exports = PathMap;\n","module.exports = {\n renderer: [ 'type', require(4) ],\n pathMap: [ 'type', require(5) ]\n};","'use strict';\n\nvar _ = (window._);\n\nvar LabelUtil = require(13);\n\nvar hasExternalLabel = LabelUtil.hasExternalLabel,\n getExternalLabelBounds = LabelUtil.getExternalLabelBounds,\n isExpanded = require(12).isExpanded,\n elementToString = require(10).elementToString;\n\n\nfunction elementData(semantic, attrs) {\n return _.extend({\n id: semantic.id,\n type: semantic.$type,\n businessObject: semantic\n }, attrs);\n}\n\nfunction collectWaypoints(waypoints) {\n return _.collect(waypoints, function(p) {\n return { x: p.x, y: p.y };\n });\n}\n\n\n/**\n * An importer that adds bpmn elements to the canvas\n *\n * @param {EventBus} eventBus\n * @param {Canvas} canvas\n * @param {ElementFactory} elementFactory\n * @param {ElementRegistry} elementRegistry\n */\nfunction BpmnImporter(eventBus, canvas, elementFactory, elementRegistry) {\n this._eventBus = eventBus;\n this._canvas = canvas;\n\n this._elementFactory = elementFactory;\n this._elementRegistry = elementRegistry;\n}\n\nBpmnImporter.$inject = [ 'eventBus', 'canvas', 'elementFactory', 'elementRegistry' ];\n\nmodule.exports = BpmnImporter;\n\n\n/**\n * Add bpmn element (semantic) to the canvas onto the\n * specified parent shape.\n */\nBpmnImporter.prototype.add = function(semantic, parentElement) {\n\n var di = semantic.di,\n element;\n\n // ROOT ELEMENT\n // handle the special case that we deal with a\n // invisible root element (process or collaboration)\n if (di.$instanceOf('bpmndi:BPMNPlane')) {\n\n // add a virtual element (not being drawn)\n element = this._elementFactory.createRoot(elementData(semantic));\n\n this._canvas.setRootElement(element);\n }\n\n // SHAPE\n else if (di.$instanceOf('bpmndi:BPMNShape')) {\n\n var collapsed = !isExpanded(semantic);\n var hidden = parentElement && (parentElement.hidden || parentElement.collapsed);\n\n var bounds = semantic.di.bounds;\n\n element = this._elementFactory.createShape(elementData(semantic, {\n collapsed: collapsed,\n hidden: hidden,\n x: Math.round(bounds.x),\n y: Math.round(bounds.y),\n width: Math.round(bounds.width),\n height: Math.round(bounds.height)\n }));\n\n this._canvas.addShape(element, parentElement);\n }\n\n // CONNECTION\n else if (di.$instanceOf('bpmndi:BPMNEdge')) {\n\n var source = this._getSource(semantic),\n target = this._getTarget(semantic);\n\n element = this._elementFactory.createConnection(elementData(semantic, {\n source: source,\n target: target,\n waypoints: collectWaypoints(semantic.di.waypoint)\n }));\n\n this._canvas.addConnection(element, parentElement);\n } else {\n throw new Error('unknown di ' + elementToString(di) + ' for element ' + elementToString(semantic));\n }\n\n // (optional) LABEL\n if (hasExternalLabel(semantic)) {\n this.addLabel(semantic, element);\n }\n\n\n this._eventBus.fire('bpmnElement.added', { element: element });\n\n return element;\n};\n\n\n/**\n * add label for an element\n */\nBpmnImporter.prototype.addLabel = function(semantic, element) {\n var bounds = getExternalLabelBounds(semantic, element);\n\n var label = this._elementFactory.createLabel(elementData(semantic, {\n id: semantic.id + '_label',\n labelTarget: element,\n type: 'label',\n hidden: element.hidden,\n x: Math.round(bounds.x),\n y: Math.round(bounds.y),\n width: Math.round(bounds.width),\n height: Math.round(bounds.height)\n }));\n\n return this._canvas.addShape(label, element.parent);\n};\n\n/**\n * Return the drawn connection end based on the given side.\n *\n * @throws {Error} if the end is not yet drawn\n */\nBpmnImporter.prototype._getEnd = function(semantic, side) {\n\n var element,\n refSemantic,\n refIsParent,\n type = semantic.$type;\n\n refSemantic = semantic[side + 'Ref'];\n\n // handle mysterious isMany DataAssociation#sourceRef\n if (side === 'source' && type === 'bpmn:DataInputAssociation') {\n refSemantic = refSemantic && refSemantic[0];\n }\n\n // fix source / target for DataInputAssociation / DataOutputAssociation\n if (side === 'source' && type === 'bpmn:DataOutputAssociation' ||\n side === 'target' && type === 'bpmn:DataInputAssociation') {\n\n refSemantic = semantic.$parent;\n }\n\n element = refSemantic && this._getElement(refSemantic);\n\n if (element) {\n return element;\n }\n\n if (refSemantic) {\n throw new Error(\n 'element ' + elementToString(refSemantic) + ' referenced by ' +\n elementToString(semantic) + '#' + side + 'Ref not yet drawn');\n } else {\n throw new Error(elementToString(semantic) + '#' + side + 'Ref not specified');\n }\n};\n\nBpmnImporter.prototype._getSource = function(semantic) {\n return this._getEnd(semantic, 'source');\n};\n\nBpmnImporter.prototype._getTarget = function(semantic) {\n return this._getEnd(semantic, 'target');\n};\n\n\nBpmnImporter.prototype._getElement = function(semantic) {\n return this._elementRegistry.get(semantic.id);\n};\n","'use strict';\n\nvar _ = (window._);\n\nvar Refs = require(75);\n\nvar elementToString = require(10).elementToString;\n\nvar diRefs = new Refs({ name: 'bpmnElement', enumerable: true }, { name: 'di' });\n\n\n/**\n * Find a suitable display candidate for definitions where the DI does not\n * correctly specify one.\n */\nfunction findDisplayCandidate(definitions) {\n return _.find(definitions.rootElements, function(e) {\n return e.$instanceOf('bpmn:Process') || e.$instanceOf('bpmn:Collaboration');\n });\n}\n\n\nfunction BpmnTreeWalker(handler) {\n\n // list of containers already walked\n var handledProcesses = [];\n\n // list of elements to handle deferred to ensure\n // prerequisites are drawn\n var deferred = [];\n\n ///// Helpers /////////////////////////////////\n\n function contextual(fn, ctx) {\n return function(e) {\n fn(e, ctx);\n };\n }\n\n function is(element, type) {\n return element.$instanceOf(type);\n }\n\n function visit(element, ctx) {\n\n var gfx = element.gfx;\n\n // avoid multiple rendering of elements\n if (gfx) {\n throw new Error('already rendered ' + elementToString(element));\n }\n\n // call handler\n return handler.element(element, ctx);\n }\n\n function visitRoot(element, diagram) {\n return handler.root(element, diagram);\n }\n\n function visitIfDi(element, ctx) {\n try {\n return element.di && visit(element, ctx);\n } catch (e) {\n logError(e.message, { element: element, error: e });\n\n console.error('failed to import ' + elementToString(element));\n console.error(e);\n }\n }\n\n function logError(message, context) {\n handler.error(message, context);\n }\n\n ////// DI handling ////////////////////////////\n\n function registerDi(di) {\n var bpmnElement = di.bpmnElement;\n\n if (bpmnElement) {\n if (bpmnElement.di) {\n logError('multiple DI elements defined for ' + elementToString(bpmnElement), { element: bpmnElement });\n } else {\n diRefs.bind(bpmnElement, 'di');\n bpmnElement.di = di;\n }\n } else {\n logError('no bpmnElement referenced in ' + elementToString(di), { element: di });\n }\n }\n\n function handleDiagram(diagram) {\n handlePlane(diagram.plane);\n }\n\n function handlePlane(plane) {\n registerDi(plane);\n\n _.forEach(plane.planeElement, handlePlaneElement);\n }\n\n function handlePlaneElement(planeElement) {\n registerDi(planeElement);\n }\n\n\n ////// Semantic handling //////////////////////\n\n function handleDefinitions(definitions, diagram) {\n // make sure we walk the correct bpmnElement\n\n var diagrams = definitions.diagrams;\n\n if (diagram && diagrams.indexOf(diagram) === -1) {\n throw new Error('diagram not part of bpmn:Definitions');\n }\n\n if (!diagram && diagrams && diagrams.length) {\n diagram = diagrams[0];\n }\n\n // no diagram -> nothing to import\n if (!diagram) {\n return;\n }\n\n // load DI from selected diagram only\n handleDiagram(diagram);\n\n\n var plane = diagram.plane;\n\n if (!plane) {\n throw new Error('no plane for ' + elementToString(diagram));\n }\n\n\n var rootElement = plane.bpmnElement;\n\n // ensure we default to a suitable display candidate (process or collaboration),\n // even if non is specified in DI\n if (!rootElement) {\n rootElement = findDisplayCandidate(definitions);\n\n if (!rootElement) {\n throw new Error('do not know what to display');\n } else {\n\n logError('correcting missing bpmnElement on ' + elementToString(plane) + ' to ' + elementToString(rootElement));\n\n // correct DI on the fly\n plane.bpmnElement = rootElement;\n registerDi(plane);\n }\n }\n\n\n var ctx = visitRoot(rootElement, plane);\n\n if (is(rootElement, 'bpmn:Process')) {\n handleProcess(rootElement, ctx);\n } else if (is(rootElement, 'bpmn:Collaboration')) {\n handleCollaboration(rootElement, ctx);\n\n // force drawing of everything not yet drawn that is part of the target DI\n handleUnhandledProcesses(definitions.rootElements, ctx);\n } else {\n throw new Error('unsupported bpmnElement for ' + elementToString(plane) + ' : ' + elementToString(rootElement));\n }\n\n // handle all deferred elements\n handleDeferred(deferred);\n }\n\n function handleDeferred(deferred) {\n _.forEach(deferred, function(d) { d(); });\n }\n\n function handleProcess(process, context) {\n handleFlowElementsContainer(process, context);\n handleIoSpecification(process.ioSpecification, context);\n\n handleArtifacts(process.artifacts, context);\n\n // log process handled\n handledProcesses.push(process);\n }\n\n function handleUnhandledProcesses(rootElements) {\n\n // walk through all processes that have not yet been drawn and draw them\n // if they contain lanes with DI information.\n // we do this to pass the free-floating lane test cases in the MIWG test suite\n var processes = _.filter(rootElements, function(e) {\n return is(e, 'bpmn:Process') && e.laneSets && handledProcesses.indexOf(e) === -1;\n });\n\n processes.forEach(contextual(handleProcess));\n }\n\n function handleMessageFlow(messageFlow, context) {\n visitIfDi(messageFlow, context);\n }\n\n function handleMessageFlows(messageFlows, context) {\n _.forEach(messageFlows, contextual(handleMessageFlow, context));\n }\n\n function handleDataAssociation(association, context) {\n visitIfDi(association, context);\n }\n\n function handleDataInput(dataInput, context) {\n visitIfDi(dataInput, context);\n }\n\n function handleDataOutput(dataOutput, context) {\n visitIfDi(dataOutput, context);\n }\n\n function handleArtifact(artifact, context) {\n\n // bpmn:TextAnnotation\n // bpmn:Group\n // bpmn:Association\n\n visitIfDi(artifact, context);\n }\n\n function handleArtifacts(artifacts, context) {\n\n _.forEach(artifacts, function(e) {\n if (is(e, 'bpmn:Association')) {\n deferred.push(function() {\n handleArtifact(e, context);\n });\n } else {\n handleArtifact(e, context);\n }\n });\n }\n\n function handleIoSpecification(ioSpecification, context) {\n\n if (!ioSpecification) {\n return;\n }\n\n _.forEach(ioSpecification.dataInputs, contextual(handleDataInput, context));\n _.forEach(ioSpecification.dataOutputs, contextual(handleDataOutput, context));\n }\n\n function handleSubProcess(subProcess, context) {\n handleFlowElementsContainer(subProcess, context);\n handleArtifacts(subProcess.artifacts, context);\n }\n\n function handleFlowNode(flowNode, context) {\n var childCtx = visitIfDi(flowNode, context);\n\n if (is(flowNode, 'bpmn:SubProcess')) {\n handleSubProcess(flowNode, childCtx || context);\n }\n }\n\n function handleSequenceFlow(sequenceFlow, context) {\n visitIfDi(sequenceFlow, context);\n }\n\n function handleDataElement(dataObject, context) {\n visitIfDi(dataObject, context);\n }\n\n function handleBoundaryEvent(dataObject, context) {\n visitIfDi(dataObject, context);\n }\n\n function handleLane(lane, context) {\n var newContext = visitIfDi(lane, context);\n\n if (lane.childLaneSet) {\n handleLaneSet(lane.childLaneSet, newContext || context);\n } else {\n var filterList = _.filter(lane.flowNodeRef, function(e) {\n return e.$type !== 'bpmn:BoundaryEvent';\n });\n handleFlowElements(filterList, newContext || context);\n }\n }\n\n function handleLaneSet(laneSet, context) {\n _.forEach(laneSet.lanes, contextual(handleLane, context));\n }\n\n function handleLaneSets(laneSets, context) {\n _.forEach(laneSets, contextual(handleLaneSet, context));\n }\n\n function handleFlowElementsContainer(container, context) {\n\n if (container.laneSets) {\n handleLaneSets(container.laneSets, context);\n handleNonFlowNodes(container.flowElements);\n } else {\n handleFlowElements(container.flowElements, context);\n }\n }\n\n function handleNonFlowNodes(flowElements, context) {\n _.forEach(flowElements, function(e) {\n if (is(e, 'bpmn:SequenceFlow')) {\n deferred.push(function() {\n handleSequenceFlow(e, context);\n });\n } else if (is(e, 'bpmn:BoundaryEvent')) {\n deferred.unshift(function() {\n handleBoundaryEvent(e, context);\n });\n } else if (is(e, 'bpmn:DataObject')) {\n // SKIP (assume correct referencing via DataObjectReference)\n } else if (is(e, 'bpmn:DataStoreReference')) {\n handleDataElement(e, context);\n } else if (is(e, 'bpmn:DataObjectReference')) {\n handleDataElement(e, context);\n }\n });\n }\n\n function handleFlowElements(flowElements, context) {\n _.forEach(flowElements, function(e) {\n if (is(e, 'bpmn:SequenceFlow')) {\n deferred.push(function() {\n handleSequenceFlow(e, context);\n });\n } else if (is(e, 'bpmn:BoundaryEvent')) {\n deferred.unshift(function() {\n handleBoundaryEvent(e, context);\n });\n } else if (is(e, 'bpmn:FlowNode')) {\n handleFlowNode(e, context);\n\n if (is(e, 'bpmn:Activity')) {\n\n handleIoSpecification(e.ioSpecification, context);\n\n // defer handling of associations\n deferred.push(function() {\n _.forEach(e.dataInputAssociations, contextual(handleDataAssociation, context));\n _.forEach(e.dataOutputAssociations, contextual(handleDataAssociation, context));\n });\n }\n } else if (is(e, 'bpmn:DataObject')) {\n // SKIP (assume correct referencing via DataObjectReference)\n } else if (is(e, 'bpmn:DataStoreReference')) {\n handleDataElement(e, context);\n } else if (is(e, 'bpmn:DataObjectReference')) {\n handleDataElement(e, context);\n } else {\n logError(\n 'unrecognized flowElement ' + elementToString(e) + ' in context ' +\n (context ? elementToString(context.businessObject) : null),\n { element: e, context: context });\n }\n });\n }\n\n function handleParticipant(participant, context) {\n var newCtx = visitIfDi(participant, context);\n\n var process = participant.processRef;\n if (process) {\n handleProcess(process, newCtx || context);\n }\n }\n\n function handleCollaboration(collaboration) {\n\n _.forEach(collaboration.participants, contextual(handleParticipant));\n\n handleArtifacts(collaboration.artifacts);\n\n // handle message flows latest in the process\n deferred.push(function() {\n handleMessageFlows(collaboration.messageFlows);\n });\n }\n\n\n ///// API ////////////////////////////////\n\n return {\n handleDefinitions: handleDefinitions\n };\n}\n\nmodule.exports = BpmnTreeWalker;","'use strict';\n\nvar BpmnTreeWalker = require(8);\n\n\n/**\n * Import the definitions into a diagram.\n *\n * Errors and warnings are reported through the specified callback.\n *\n * @param {Diagram} diagram\n * @param {ModdleElement} definitions\n * @param {Function} done the callback, invoked with (err, [ warning ]) once the import is done\n */\nfunction importBpmnDiagram(diagram, definitions, done) {\n\n var importer = diagram.get('bpmnImporter'),\n eventBus = diagram.get('eventBus');\n\n var error,\n warnings = [];\n\n function parse(definitions) {\n\n var visitor = {\n\n root: function(element) {\n return importer.add(element);\n },\n\n element: function(element, parentShape) {\n return importer.add(element, parentShape);\n },\n\n error: function(message, context) {\n warnings.push({ message: message, context: context });\n }\n };\n\n var walker = new BpmnTreeWalker(visitor);\n\n // import\n walker.handleDefinitions(definitions);\n }\n\n eventBus.fire('import.start');\n\n try {\n parse(definitions);\n } catch (e) {\n error = e;\n }\n\n eventBus.fire(error ? 'import.error' : 'import.success', { error: error, warnings: warnings });\n done(error, warnings);\n}\n\nmodule.exports.importBpmnDiagram = importBpmnDiagram;","module.exports.elementToString = function(e) {\n if (!e) {\n return '<null>';\n }\n\n return '<' + e.$type + (e.id ? ' id=\"' + e.id : '') + '\" />';\n};","module.exports = {\n bpmnImporter: [ 'type', require(7) ]\n};","'use strict';\n\nmodule.exports.isExpandedPool = function(semantic) {\n return !!semantic.processRef;\n};\n\nmodule.exports.isExpanded = function(semantic) {\n\n // Is type expanded by default?\n var isDefaultExpanded = !(semantic.$instanceOf('bpmn:SubProcess') || semantic.$instanceOf('bpmn:CallActivity'));\n\n // For non default expanded types -> evaluate the expanded flag\n var isExpanded = isDefaultExpanded || semantic.di.isExpanded;\n\n return isExpanded;\n};\n","'use strict';\n\nvar _ = (window._);\n\n\nvar DEFAULT_LABEL_SIZE = module.exports.DEFAULT_LABEL_SIZE = {\n width: 90,\n height: 20\n};\n\n\n/**\n * Returns true if the given semantic has an external label\n *\n * @param {BpmnElement} semantic\n * @return {Boolean} true if has label\n */\nmodule.exports.hasExternalLabel = function(semantic) {\n\n return semantic.$instanceOf('bpmn:Event') ||\n semantic.$instanceOf('bpmn:Gateway') ||\n semantic.$instanceOf('bpmn:DataStoreReference') ||\n semantic.$instanceOf('bpmn:DataObjectReference') ||\n semantic.$instanceOf('bpmn:SequenceFlow') ||\n semantic.$instanceOf('bpmn:MessageFlow');\n};\n\n\n/**\n * Get the middle of a number of waypoints\n *\n * @param {Array<Point>} waypoints\n * @return {Point} the mid point\n */\nvar getWaypointsMid = module.exports.getWaypointsMid = function(waypoints) {\n\n var mid = waypoints.length / 2 - 1;\n\n var first = waypoints[Math.floor(mid)];\n var second = waypoints[Math.ceil(mid + 0.01)];\n\n return {\n x: first.x + (second.x - first.x) / 2,\n y: first.y + (second.y - first.y) / 2\n };\n};\n\n\nvar getExternalLabelMid = module.exports.getExternalLabelMid = function(element) {\n\n if (element.waypoints) {\n return getWaypointsMid(element.waypoints);\n } else {\n return {\n x: element.x + element.width / 2,\n y: element.y + element.height + DEFAULT_LABEL_SIZE.height / 2\n };\n }\n};\n\n/**\n * Returns the bounds of an elements label, parsed from the elements DI or\n * generated from its bounds.\n *\n * @param {BpmnElement} semantic\n * @param {djs.model.Base} element\n */\nmodule.exports.getExternalLabelBounds = function(semantic, element) {\n\n var mid,\n size,\n bounds,\n di = semantic.di,\n label = di.label;\n\n if (label && label.bounds) {\n bounds = label.bounds;\n\n size = {\n width: Math.max(DEFAULT_LABEL_SIZE.width, bounds.width),\n height: bounds.height\n };\n\n mid = {\n x: bounds.x + bounds.width / 2,\n y: bounds.y + bounds.height / 2\n };\n } else {\n\n mid = getExternalLabelMid(element);\n\n size = DEFAULT_LABEL_SIZE;\n }\n\n return _.extend({\n x: mid.x - size.width / 2,\n y: mid.y - size.height / 2\n }, size);\n};","module.exports = require(16);","'use strict';\n\nvar _ = (window._);\n\nvar Moddle = require(22),\n ModdleXml = require(17);\n\n/**\n * A sub class of {@link Moddle} with support for import and export of BPMN 2.0 xml files.\n *\n * @class BpmnModdle\n * @extends Moddle\n *\n * @param {Object|Array} packages to use for instantiating the model\n * @param {Object} [options] additional options to pass over\n */\nfunction BpmnModdle(packages, options) {\n Moddle.call(this, packages, options);\n}\n\nBpmnModdle.prototype = Object.create(Moddle.prototype);\n\nmodule.exports = BpmnModdle;\n\n\n/**\n * Instantiates a BPMN model tree from a given xml string.\n *\n * @param {String} xmlStr\n * @param {String} [typeName] name of the root element, defaults to 'bpmn:Definitions'\n * @param {Object} [options] options to pass to the underlying reader\n * @param {Function} done callback that is invoked with (err, result, parseContext) once the import completes\n */\nBpmnModdle.prototype.fromXML = function(xmlStr, typeName, options, done) {\n\n if (!_.isString(typeName)) {\n done = options;\n options = typeName;\n typeName = 'bpmn:Definitions';\n }\n\n if (_.isFunction(options)) {\n done = options;\n options = {};\n }\n\n var reader = new ModdleXml.Reader(this, options);\n var rootHandler = reader.handler(typeName);\n\n reader.fromXML(xmlStr, rootHandler, done);\n};\n\n\n/**\n * Serializes a BPMN 2.0 object tree to XML.\n *\n * @param {String} element the root element, typically an instance of `bpmn:Definitions`\n * @param {Object} [options] to pass to the underlying writer\n * @param {Function} done callback invoked with (err, xmlStr) once the import completes\n */\nBpmnModdle.prototype.toXML = function(element, options, done) {\n\n if (_.isFunction(options)) {\n done = options;\n options = {};\n }\n\n var writer = new ModdleXml.Writer(options);\n try {\n var result = writer.toXML(element);\n done(null, result);\n } catch (e) {\n done(e);\n }\n};\n","var BpmnModdle = require(15);\n\nvar packages = {\n bpmn: require(31),\n bpmndi: require(32),\n dc: require(33),\n di: require(34)\n};\n\nmodule.exports = function() {\n return new BpmnModdle(packages);\n};","'use strict';\n\nmodule.exports.Reader = require(19);\nmodule.exports.Writer = require(20);","'use strict';\n\n\nfunction capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nfunction lower(string) {\n return string.charAt(0).toLowerCase() + string.slice(1);\n}\n\nfunction hasLowerCaseAlias(pkg) {\n return pkg.xml && pkg.xml.tagAlias === 'lowerCase';\n}\n\n\nmodule.exports.aliasToName = function(alias, pkg) {\n if (hasLowerCaseAlias(pkg)) {\n return capitalize(alias);\n } else {\n return alias;\n }\n};\n\nmodule.exports.nameToAlias = function(name, pkg) {\n if (hasLowerCaseAlias(pkg)) {\n return lower(name);\n } else {\n return name;\n }\n};\n\nmodule.exports.DEFAULT_NS_MAP = {\n 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'\n};\n\nmodule.exports.XSI_TYPE = 'xsi:type';","'use strict';\n\nvar sax = (window.sax),\n _ = (window._);\n\nvar common = require(18),\n XSI_TYPE = common.XSI_TYPE,\n XSI_URI = common.DEFAULT_NS_MAP.xsi,\n Types = require(22).types,\n Stack = require(21),\n parseNameNs = require(22).ns.parseName,\n aliasToName = common.aliasToName;\n\n\nfunction parseNodeAttributes(node) {\n var nodeAttrs = node.attributes;\n\n return _.reduce(nodeAttrs, function(result, v, k) {\n var name, ns;\n\n if (!v.local) {\n name = v.prefix;\n } else {\n ns = parseNameNs(v.name, v.prefix);\n name = ns.name;\n }\n\n result[name] = v.value;\n return result;\n }, {});\n}\n\nfunction normalizeType(node, attr, model) {\n var nameNs = parseNameNs(attr.value);\n\n var uri = node.ns[nameNs.prefix || ''],\n localName = nameNs.localName,\n pkg = uri && model.getPackage(uri),\n typePrefix;\n\n if (pkg) {\n typePrefix = pkg.xml && pkg.xml.typePrefix;\n\n if (typePrefix && localName.indexOf(typePrefix) === 0) {\n localName = localName.slice(typePrefix.length);\n }\n\n attr.value = pkg.prefix + ':' + localName;\n }\n}\n\n/**\n * Normalizes namespaces for a node given an optional default namespace and a\n * number of mappings from uris to default prefixes.\n *\n * @param {XmlNode} node\n * @param {Model} model the model containing all registered namespaces\n * @param {Uri} defaultNsUri\n */\nfunction normalizeNamespaces(node, model, defaultNsUri) {\n var uri, prefix;\n\n uri = node.uri || defaultNsUri;\n\n if (uri) {\n var pkg = model.getPackage(uri);\n\n if (pkg) {\n prefix = pkg.prefix;\n } else {\n prefix = node.prefix;\n }\n\n node.prefix = prefix;\n node.uri = uri;\n }\n\n _.forEach(node.attributes, function(attr) {\n\n // normalize xsi:type attributes because the\n // assigned type may or may not be namespace prefixed\n if (attr.uri === XSI_URI && attr.local === 'type') {\n normalizeType(node, attr, model);\n }\n\n normalizeNamespaces(attr, model, null);\n });\n}\n\n/**\n * A parse context.\n *\n * @class\n *\n * @param {ElementHandler} parseRoot the root handler for parsing a document\n */\nfunction Context(parseRoot) {\n\n var elementsById = {};\n var references = [];\n\n var warnings = [];\n\n this.addReference = function(reference) {\n references.push(reference);\n };\n\n this.addElement = function(id, element) {\n\n if (!id || !element) {\n throw new Error('[xml-reader] id or ctx must not be null');\n }\n\n elementsById[id] = element;\n };\n\n this.addWarning = function (w) {\n warnings.push(w);\n };\n\n this.warnings = warnings;\n this.references = references;\n\n this.elementsById = elementsById;\n\n this.parseRoot = parseRoot;\n}\n\n\nfunction BaseHandler() {}\n\nBaseHandler.prototype.handleEnd = function() {};\nBaseHandler.prototype.handleText = function() {};\nBaseHandler.prototype.handleNode = function() {};\n\nfunction BodyHandler() {}\n\nBodyHandler.prototype = new BaseHandler();\n\nBodyHandler.prototype.handleText = function(text) {\n this.body = (this.body || '') + text;\n};\n\nfunction ReferenceHandler(property, context) {\n this.property = property;\n this.context = context;\n}\n\nReferenceHandler.prototype = new BodyHandler();\n\nReferenceHandler.prototype.handleNode = function(node) {\n\n if (this.element) {\n throw new Error('expected no sub nodes');\n } else {\n this.element = this.createReference(node);\n }\n\n return this;\n};\n\nReferenceHandler.prototype.handleEnd = function() {\n this.element.id = this.body;\n};\n\nReferenceHandler.prototype.createReference = function() {\n return {\n property: this.property.ns.name,\n id: ''\n };\n};\n\nfunction ValueHandler(propertyDesc, element) {\n this.element = element;\n this.propertyDesc = propertyDesc;\n}\n\nValueHandler.prototype = new BodyHandler();\n\nValueHandler.prototype.handleEnd = function() {\n\n var value = this.body,\n element = this.element,\n propertyDesc = this.propertyDesc;\n\n value = Types.coerceType(propertyDesc.type, value);\n\n if (propertyDesc.isMany) {\n element.get(propertyDesc.name).push(value);\n } else {\n element.set(propertyDesc.name, value);\n }\n};\n\n\nfunction BaseElementHandler() {}\n\nBaseElementHandler.prototype = Object.create(BodyHandler.prototype);\n\nBaseElementHandler.prototype.handleNode = function(node) {\n var parser = this,\n element = this.element,\n id;\n\n if (!element) {\n element = this.element = this.createElement(node);\n id = element.id;\n\n if (id) {\n this.context.addElement(id, element);\n }\n } else {\n parser = this.handleChild(node);\n }\n\n return parser;\n};\n\n/**\n * @class XMLReader.ElementHandler\n *\n */\nfunction ElementHandler(model, type, context) {\n this.model = model;\n this.type = model.getType(type);\n this.context = context;\n}\n\nElementHandler.prototype = new BaseElementHandler();\n\nElementHandler.prototype.addReference = function(reference) {\n this.context.addReference(reference);\n};\n\nElementHandler.prototype.handleEnd = function() {\n\n var value = this.body,\n element = this.element,\n descriptor = element.$descriptor,\n bodyProperty = descriptor.bodyProperty;\n\n if (bodyProperty && value !== undefined) {\n value = Types.coerceType(bodyProperty.type, value);\n element.set(bodyProperty.name, value);\n }\n};\n\n/**\n * Create an instance of the model from the given node.\n *\n * @param {Element} node the xml node\n */\nElementHandler.prototype.createElement = function(node) {\n var attributes = parseNodeAttributes(node),\n Type = this.type,\n descriptor = Type.$descriptor,\n context = this.context,\n instance = new Type({});\n\n _.forEach(attributes, function(value, name) {\n\n var prop = descriptor.propertiesByName[name];\n\n if (prop && prop.isReference) {\n context.addReference({\n element: instance,\n property: prop.ns.name,\n id: value\n });\n } else {\n if (prop) {\n value = Types.coerceType(prop.type, value);\n }\n\n instance.set(name, value);\n }\n });\n\n return instance;\n};\n\nElementHandler.prototype.getPropertyForNode = function(node) {\n\n var nameNs = parseNameNs(node.local, node.prefix);\n\n var type = this.type,\n model = this.model,\n descriptor = type.$descriptor;\n\n var propertyName = nameNs.name,\n property = descriptor.propertiesByName[propertyName],\n elementTypeName,\n elementType,\n typeAnnotation;\n\n // search for properties by name first\n\n if (property) {\n\n if (property.serialize === XSI_TYPE) {\n typeAnnotation = node.attributes[XSI_TYPE];\n\n // xsi type is optional, if it does not exists the\n // default type is assumed\n if (typeAnnotation) {\n\n elementTypeName = typeAnnotation.value;\n\n // TODO: extract real name from attribute\n elementType = model.getType(elementTypeName);\n\n return _.extend({}, property, { effectiveType: elementType.$descriptor.name });\n }\n }\n\n // search for properties by name first\n return property;\n }\n\n\n var pkg = model.getPackage(nameNs.prefix);\n\n if (pkg) {\n elementTypeName = nameNs.prefix + ':' + aliasToName(nameNs.localName, descriptor.$pkg);\n elementType = model.getType(elementTypeName);\n\n // search for collection members later\n property = _.find(descriptor.properties, function(p) {\n return !p.isVirtual && !p.isReference && !p.isAttribute && elementType.hasType(p.type);\n });\n\n if (property) {\n return _.extend({}, property, { effectiveType: elementType.$descriptor.name });\n }\n } else {\n // parse unknown element (maybe extension)\n property = _.find(descriptor.properties, function(p) {\n return !p.isReference && !p.isAttribute && p.type === 'Element';\n });\n\n if (property) {\n return property;\n }\n }\n\n throw new Error('unrecognized element <' + nameNs.name + '>');\n};\n\nElementHandler.prototype.toString = function() {\n return 'ElementDescriptor[' + this.type.$descriptor.name + ']';\n};\n\nElementHandler.prototype.valueHandler = function(propertyDesc, element) {\n return new ValueHandler(propertyDesc, element);\n};\n\nElementHandler.prototype.referenceHandler = function(propertyDesc) {\n return new ReferenceHandler(propertyDesc, this.context);\n};\n\nElementHandler.prototype.handler = function(type) {\n if (type === 'Element') {\n return new GenericElementHandler(this.model, type, this.context);\n } else {\n return new ElementHandler(this.model, type, this.context);\n }\n};\n\n/**\n * Handle the child element parsing\n *\n * @param {Element} node the xml node\n */\nElementHandler.prototype.handleChild = function(node) {\n var propertyDesc, type, element, childHandler;\n\n propertyDesc = this.getPropertyForNode(node);\n element = this.element;\n\n type = propertyDesc.effectiveType || propertyDesc.type;\n\n if (Types.isSimple(type)) {\n return this.valueHandler(propertyDesc, element);\n }\n\n if (propertyDesc.isReference) {\n childHandler = this.referenceHandler(propertyDesc).handleNode(node);\n } else {\n childHandler = this.handler(type).handleNode(node);\n }\n\n var newElement = childHandler.element;\n\n // child handles may decide to skip elements\n // by not returning anything\n if (newElement !== undefined) {\n\n if (propertyDesc.isMany) {\n element.get(propertyDesc.name).push(newElement);\n } else {\n element.set(propertyDesc.name, newElement);\n }\n\n if (propertyDesc.isReference) {\n _.extend(newElement, {\n element: element\n });\n\n this.context.addReference(newElement);\n } else {\n // establish child -> parent relationship\n newElement.$parent = element;\n }\n }\n\n return childHandler;\n};\n\n\nfunction GenericElementHandler(model, type, context) {\n this.model = model;\n this.context = context;\n}\n\nGenericElementHandler.prototype = Object.create(BaseElementHandler.prototype);\n\nGenericElementHandler.prototype.createElement = function(node) {\n\n var name = node.name,\n prefix = node.prefix,\n uri = node.ns[prefix],\n attributes = node.attributes;\n\n return this.model.createAny(name, uri, attributes);\n};\n\nGenericElementHandler.prototype.handleChild = function(node) {\n\n var handler = new GenericElementHandler(this.model, 'Element', this.context).handleNode(node),\n element = this.element;\n\n var newElement = handler.element,\n children;\n\n if (newElement !== undefined) {\n children = element.$children = element.$children || [];\n children.push(newElement);\n\n // establish child -> parent relationship\n newElement.$parent = element;\n }\n\n return handler;\n};\n\nGenericElementHandler.prototype.handleText = function(text) {\n this.body = this.body || '' + text;\n};\n\nGenericElementHandler.prototype.handleEnd = function() {\n if (this.body) {\n this.element.$body = this.body;\n }\n};\n\n/**\n * A reader for a meta-model\n *\n * @class XMLReader\n *\n * @param {Model} model used to read xml files\n */\nfunction XMLReader(model) {\n this.model = model;\n}\n\n\nXMLReader.prototype.fromXML = function(xml, rootHandler, done) {\n\n var context = new Context(rootHandler);\n\n var parser = sax.parser(true, { xmlns: true, trim: true }),\n stack = new Stack();\n\n var model = this.model;\n\n rootHandler.context = context;\n\n // push root handler\n stack.push(rootHandler);\n\n\n function resolveReferences() {\n\n var elementsById = context.elementsById;\n var references = context.references;\n\n var i, r;\n\n for (i = 0; !!(r = references[i]); i++) {\n var element = r.element;\n var reference = elementsById[r.id];\n var property = element.$descriptor.propertiesByName[r.property];\n\n if (!reference) {\n context.addWarning({\n message: 'unresolved reference <' + r.id + '>',\n element: r.element,\n property: r.property,\n value: r.id\n });\n }\n\n if (property.isMany) {\n var collection = element.get(property.name),\n idx = collection.indexOf(r);\n\n if (!reference) {\n // remove unresolvable reference\n collection.splice(idx, 1);\n } else {\n // update reference\n collection[idx] = reference;\n }\n } else {\n element.set(property.name, reference);\n }\n }\n }\n\n function handleClose(tagName) {\n stack.pop().handleEnd();\n }\n\n function handleOpen(node) {\n var handler = stack.peek();\n\n normalizeNamespaces(node, model);\n\n try {\n stack.push(handler.handleNode(node));\n } catch (e) {\n\n var line = this.line,\n column = this.column;\n\n console.error('failed to parse document');\n console.error(e);\n\n throw new Error(\n 'unparsable content <' + node.name + '> detected/n/t' +\n 'line: ' + line + '/n/t' +\n 'column: ' + column + '/n/t' +\n 'nested error: ' + e.message);\n }\n }\n\n function handleText(text) {\n stack.peek().handleText(text);\n }\n\n parser.onopentag = handleOpen;\n parser.oncdata = parser.ontext = handleText;\n parser.onclosetag = handleClose;\n parser.onend = resolveReferences;\n\n // deferred parse XML to make loading really ascnchronous\n // this ensures the execution environment (node or browser)\n // is kept responsive and that certain optimization strategies\n // can kick in\n _.defer(function() {\n var error;\n\n try {\n parser.write(xml).close();\n } catch (e) {\n error = e;\n }\n\n done(error, error ? undefined : rootHandler.element, context);\n });\n};\n\nXMLReader.prototype.handler = function(name) {\n return new ElementHandler(this.model, name);\n};\n\nmodule.exports = XMLReader;\nmodule.exports.ElementHandler = ElementHandler;","'use strict';\n\nvar _ = (window._);\n\nvar Types = require(22).types,\n common = require(18),\n parseNameNs = require(22).ns.parseName,\n nameToAlias = common.nameToAlias;\n\nvar XML_PREAMBLE = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>/n';\n\nvar CDATA_ESCAPE = /[<>\"&]+/;\n\nvar DEFAULT_NS_MAP = common.DEFAULT_NS_MAP,\n XSI_TYPE = common.XSI_TYPE;\n\n\nfunction nsName(ns) {\n if (_.isString(ns)) {\n return ns;\n } else {\n return (ns.prefix ? ns.prefix + ':' : '') + ns.localName;\n }\n}\n\nfunction getElementNs(ns, descriptor) {\n if (descriptor.isGeneric) {\n return descriptor.name;\n } else {\n return _.extend({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);\n }\n}\n\nfunction getPropertyNs(ns, descriptor) {\n return _.extend({ localName: descriptor.ns.localName }, ns);\n}\n\nfunction getSerializableProperties(element) {\n var descriptor = element.$descriptor;\n\n return _.filter(descriptor.properties, function(p) {\n var name = p.name;\n\n // do not serialize defaults\n if (!element.hasOwnProperty(name)) {\n return false;\n }\n\n var value = element[name];\n\n // do not serialize default equals\n if (value === p.default) {\n return false;\n }\n\n return p.isMany ? value.length : true;\n });\n}\n\n/**\n * Escape a string attribute to not contain any bad values (line breaks, '\"', ...)\n *\n * @param {String} str the string to escape\n * @return {String} the escaped string\n */\nfunction escapeAttr(str) {\n var escapeMap = {\n '/n': ' ',\n '/n/r': ' ',\n '\"': '"'\n };\n\n // ensure we are handling strings here\n str = _.isString(str) ? str : '' + str;\n\n return str.replace(/(/n|/n/r|\")/g, function(str) {\n return escapeMap[str];\n });\n}\n\nfunction filterAttributes(props) {\n return _.filter(props, function(p) { return p.isAttr; });\n}\n\nfunction filterContained(props) {\n return _.filter(props, function(p) { return !p.isAttr; });\n}\n\n\nfunction ReferenceSerializer(parent, ns) {\n this.ns = ns;\n}\n\nReferenceSerializer.prototype.build = function(element) {\n this.element = element;\n return this;\n};\n\nReferenceSerializer.prototype.serializeTo = function(writer) {\n writer\n .appendIndent()\n .append('<' + nsName(this.ns) + '>' + this.element.id + '</' + nsName(this.ns) + '>')\n .appendNewLine();\n};\n\nfunction BodySerializer() {}\n\nBodySerializer.prototype.serializeValue = BodySerializer.prototype.serializeTo = function(writer) {\n var escape = this.escape;\n\n if (escape) {\n writer.append('<![CDATA[');\n }\n\n writer.append(this.value);\n\n if (escape) {\n writer.append(']]>');\n }\n};\n\nBodySerializer.prototype.build = function(prop, value) {\n this.value = value;\n\n if (prop.type === 'String' && CDATA_ESCAPE.test(value)) {\n this.escape = true;\n }\n\n return this;\n};\n\nfunction ValueSerializer(ns) {\n this.ns = ns;\n}\n\nValueSerializer.prototype = new BodySerializer();\n\nValueSerializer.prototype.serializeTo = function(writer) {\n\n writer\n .appendIndent()\n .append('<' + nsName(this.ns) + '>');\n\n this.serializeValue(writer);\n\n writer\n .append( '</' + nsName(this.ns) + '>')\n .appendNewLine();\n};\n\nfunction ElementSerializer(parent, ns) {\n this.body = [];\n this.attrs = [];\n\n this.parent = parent;\n this.ns = ns;\n}\n\nElementSerializer.prototype.build = function(element) {\n this.element = element;\n\n var otherAttrs = this.parseNsAttributes(element);\n\n if (!this.ns) {\n this.ns = this.nsTagName(element.$descriptor);\n }\n\n if (element.$descriptor.isGeneric) {\n this.parseGeneric(element);\n } else {\n var properties = getSerializableProperties(element);\n\n this.parseAttributes(filterAttributes(properties));\n this.parseContainments(filterContained(properties));\n\n this.parseGenericAttributes(element, otherAttrs);\n }\n\n return this;\n};\n\nElementSerializer.prototype.nsTagName = function(descriptor) {\n var effectiveNs = this.logNamespaceUsed(descriptor.ns);\n return getElementNs(effectiveNs, descriptor);\n};\n\nElementSerializer.prototype.nsPropertyTagName = function(descriptor) {\n var effectiveNs = this.logNamespaceUsed(descriptor.ns);\n return getPropertyNs(effectiveNs, descriptor);\n};\n\nElementSerializer.prototype.isLocalNs = function(ns) {\n return ns.uri === this.ns.uri;\n};\n\nElementSerializer.prototype.nsAttributeName = function(element) {\n\n var ns;\n\n if (_.isString(element)) {\n ns = parseNameNs(element);\n } else\n if (element.ns) {\n ns = element.ns;\n }\n\n var effectiveNs = this.logNamespaceUsed(ns);\n\n // strip prefix if same namespace like parent\n if (this.isLocalNs(effectiveNs)) {\n return { localName: ns.localName };\n } else {\n return _.extend({ localName: ns.localName }, effectiveNs);\n }\n};\n\nElementSerializer.prototype.parseGeneric = function(element) {\n\n var self = this,\n body = this.body,\n attrs = this.attrs;\n\n _.forEach(element, function(val, key) {\n\n if (key === '$body') {\n body.push(new BodySerializer().build({ type: 'String' }, val));\n } else\n if (key === '$children') {\n _.forEach(val, function(child) {\n body.push(new ElementSerializer(self).build(child));\n });\n } else\n if (key.indexOf('$') !== 0) {\n attrs.push({ name: key, value: escapeAttr(val) });\n }\n });\n};\n\n/**\n * Parse namespaces and return a list of left over generic attributes\n *\n * @param {Object} element\n * @return {Array<Object>}\n */\nElementSerializer.prototype.parseNsAttributes = function(element) {\n var self = this;\n\n var genericAttrs = element.$attrs;\n\n var attributes = [];\n\n // parse namespace attributes first\n // and log them. push non namespace attributes to a list\n // and process them later\n _.forEach(genericAttrs, function(value, name) {\n var nameNs = parseNameNs(name);\n\n if (nameNs.prefix === 'xmlns') {\n self.logNamespace({ prefix: nameNs.localName, uri: value });\n } else\n if (!nameNs.prefix && nameNs.localName === 'xmlns') {\n self.logNamespace({ uri: value });\n } else {\n attributes.push({ name: name, value: value });\n }\n });\n\n return attributes;\n};\n\nElementSerializer.prototype.parseGenericAttributes = function(element, attributes) {\n\n var self = this;\n\n _.forEach(attributes, function(attr) {\n\n // do not serialize xsi:type attribute\n // it is set manually based on the actual implementation type\n if (attr.name === XSI_TYPE) {\n return;\n }\n\n try {\n self.addAttribute(self.nsAttributeName(attr.name), attr.value);\n } catch (e) {\n console.warn('[writer] missing namespace information for ', attr.name, '=', attr.value, 'on', element, e);\n }\n });\n};\n\nElementSerializer.prototype.parseContainments = function(properties) {\n\n var self = this,\n body = this.body,\n element = this.element;\n\n _.forEach(properties, function(p) {\n var value = element.get(p.name),\n isReference = p.isReference,\n isMany = p.isMany;\n\n var ns = self.nsPropertyTagName(p);\n\n if (!isMany) {\n value = [ value ];\n }\n\n if (p.isBody) {\n body.push(new BodySerializer().build(p, value[0]));\n } else\n if (Types.isSimple(p.type)) {\n _.forEach(value, function(v) {\n body.push(new ValueSerializer(ns).build(p, v));\n });\n } else\n if (isReference) {\n _.forEach(value, function(v) {\n body.push(new ReferenceSerializer(self, ns).build(v));\n });\n } else {\n // allow serialization via type\n // rather than element name\n var asType = p.serialize === XSI_TYPE;\n\n _.forEach(value, function(v) {\n var serializer;\n\n if (asType) {\n serializer = new TypeSerializer(self, ns);\n } else {\n serializer = new ElementSerializer(self);\n }\n\n body.push(serializer.build(v));\n });\n }\n });\n};\n\nElementSerializer.prototype.getNamespaces = function() {\n if (!this.parent) {\n if (!this.namespaces) {\n this.namespaces = {\n prefixMap: {},\n uriMap: {},\n used: {}\n };\n }\n } else {\n this.namespaces = this.parent.getNamespaces();\n }\n\n return this.namespaces;\n};\n\nElementSerializer.prototype.logNamespace = function(ns) {\n var namespaces = this.getNamespaces();\n\n var existing = namespaces.uriMap[ns.uri];\n\n if (!existing) {\n namespaces.uriMap[ns.uri] = ns;\n }\n\n namespaces.prefixMap[ns.prefix] = ns.uri;\n\n return ns;\n};\n\nElementSerializer.prototype.logNamespaceUsed = function(ns) {\n var element = this.element,\n model = element.$model,\n namespaces = this.getNamespaces();\n\n // ns may be\n //\n // * prefix only\n // * prefix:uri\n\n var prefix = ns.prefix;\n var uri = ns.uri || DEFAULT_NS_MAP[prefix] ||\n namespaces.prefixMap[prefix] || (model ? (model.getPackage(prefix) || {}).uri : null);\n\n if (!uri) {\n throw new Error('no namespace uri given for prefix <' + ns.prefix + '>');\n }\n\n ns = namespaces.uriMap[uri];\n\n if (!ns) {\n ns = this.logNamespace({ prefix: prefix, uri: uri });\n }\n\n if (!namespaces.used[ns.uri]) {\n namespaces.used[ns.uri] = ns;\n }\n\n return ns;\n};\n\nElementSerializer.prototype.parseAttributes = function(properties) {\n var self = this,\n element = this.element;\n\n _.forEach(properties, function(p) {\n self.logNamespaceUsed(p.ns);\n\n var value = element.get(p.name);\n\n if (p.isReference) {\n value = value.id;\n }\n\n self.addAttribute(self.nsAttributeName(p), value);\n });\n};\n\nElementSerializer.prototype.addAttribute = function(name, value) {\n var attrs = this.attrs;\n\n if (_.isString(value)) {\n value = escapeAttr(value);\n }\n\n attrs.push({ name: name, value: value });\n};\n\nElementSerializer.prototype.serializeAttributes = function(writer) {\n var attrs = this.attrs,\n root = !this.parent,\n namespaces = this.namespaces;\n\n function collectNsAttrs() {\n return _.collect(namespaces.used, function(ns) {\n var name = 'xmlns' + (ns.prefix ? ':' + ns.prefix : '');\n return { name: name, value: ns.uri };\n });\n }\n\n if (root) {\n attrs = collectNsAttrs().concat(attrs);\n }\n\n _.forEach(attrs, function(a) {\n writer\n .append(' ')\n .append(nsName(a.name)).append('=\"').append(a.value).append('\"');\n });\n};\n\nElementSerializer.prototype.serializeTo = function(writer) {\n var hasBody = this.body.length,\n indent = !(this.body.length === 1 && this.body[0] instanceof BodySerializer);\n\n writer\n .appendIndent()\n .append('<' + nsName(this.ns));\n\n this.serializeAttributes(writer);\n\n writer.append(hasBody ? '>' : ' />');\n\n if (hasBody) {\n\n if (indent) {\n writer\n .appendNewLine()\n .indent();\n }\n\n _.forEach(this.body, function(b) {\n b.serializeTo(writer);\n });\n\n if (indent) {\n writer\n .unindent()\n .appendIndent();\n }\n\n writer.append('</' + nsName(this.ns) + '>');\n }\n\n writer.appendNewLine();\n};\n\n/**\n * A serializer for types that handles serialization of data types\n */\nfunction TypeSerializer(parent, ns) {\n ElementSerializer.call(this, parent, ns);\n}\n\nTypeSerializer.prototype = new ElementSerializer();\n\nTypeSerializer.prototype.build = function(element) {\n var descriptor = element.$descriptor;\n\n this.element = element;\n\n this.typeNs = this.nsTagName(descriptor);\n\n // add xsi:type attribute to represent the elements\n // actual type\n\n var typeNs = this.typeNs,\n pkg = element.$model.getPackage(typeNs.uri),\n typePrefix = (pkg.xml && pkg.xml.typePrefix) || '';\n\n this.addAttribute(this.nsAttributeName(XSI_TYPE),\n (typeNs.prefix ? typeNs.prefix + ':' : '') +\n typePrefix + descriptor.ns.localName);\n\n // do the usual stuff\n return ElementSerializer.prototype.build.call(this, element);\n};\n\nTypeSerializer.prototype.isLocalNs = function(ns) {\n return ns.uri === this.typeNs.uri;\n};\n\nfunction SavingWriter() {\n this.value = '';\n\n this.write = function(str) {\n this.value += str;\n };\n}\n\nfunction FormatingWriter(out, format) {\n\n var indent = [''];\n\n this.append = function(str) {\n out.write(str);\n\n return this;\n };\n\n this.appendNewLine = function() {\n if (format) {\n out.write('/n');\n }\n\n return this;\n };\n\n this.appendIndent = function() {\n if (format) {\n out.write(indent.join(' '));\n }\n\n return this;\n };\n\n this.indent = function() {\n indent.push('');\n return this;\n };\n\n this.unindent = function() {\n indent.pop();\n return this;\n };\n}\n\n/**\n * A writer for meta-model backed document trees\n *\n * @class XMLWriter\n */\nfunction XMLWriter(options) {\n\n options = _.extend({ format: false, preamble: true }, options || {});\n\n function toXML(tree, writer) {\n var internalWriter = writer || new SavingWriter();\n var formatingWriter = new FormatingWriter(internalWriter, options.format);\n\n if (options.preamble) {\n formatingWriter.append(XML_PREAMBLE);\n }\n\n new ElementSerializer().build(tree).serializeTo(formatingWriter);\n\n if (!writer) {\n return internalWriter.value;\n }\n }\n\n return {\n toXML: toXML\n };\n}\n\nmodule.exports = XMLWriter;","/**\n * Tiny stack for browser or server\n *\n * @author Jason Mulligan <jason.mulligan@avoidwork.com>\n * @copyright 2014 Jason Mulligan\n * @license BSD-3 <https://raw.github.com/avoidwork/tiny-stack/master/LICENSE>\n * @link http://avoidwork.github.io/tiny-stack\n * @module tiny-stack\n * @version 0.1.0\n */\n\n( function ( global ) {\n\n\"use strict\";\n\n/**\n * TinyStack\n *\n * @constructor\n */\nfunction TinyStack () {\n\tthis.data = [null];\n\tthis.top = 0;\n}\n\n/**\n * Clears the stack\n *\n * @method clear\n * @memberOf TinyStack\n * @return {Object} {@link TinyStack}\n */\nTinyStack.prototype.clear = function clear () {\n\tthis.data = [null];\n\tthis.top = 0;\n\n\treturn this;\n};\n\n/**\n * Gets the size of the stack\n *\n * @method length\n * @memberOf TinyStack\n * @return {Number} Size of stack\n */\nTinyStack.prototype.length = function length () {\n\treturn this.top;\n};\n\n/**\n * Gets the item at the top of the stack\n *\n * @method peek\n * @memberOf TinyStack\n * @return {Mixed} Item at the top of the stack\n */\nTinyStack.prototype.peek = function peek () {\n\treturn this.data[this.top];\n};\n\n/**\n * Gets & removes the item at the top of the stack\n *\n * @method pop\n * @memberOf TinyStack\n * @return {Mixed} Item at the top of the stack\n */\nTinyStack.prototype.pop = function pop () {\n\tif ( this.top > 0 ) {\n\t\tthis.top--;\n\n\t\treturn this.data.pop();\n\t}\n\telse {\n\t\treturn undefined;\n\t}\n};\n\n/**\n * Pushes an item onto the stack\n *\n * @method push\n * @memberOf TinyStack\n * @return {Object} {@link TinyStack}\n */\nTinyStack.prototype.push = function push ( arg ) {\n\tthis.data[++this.top] = arg;\n\n\treturn this;\n};\n\n/**\n * TinyStack factory\n *\n * @method factory\n * @return {Object} {@link TinyStack}\n */\nfunction factory () {\n\treturn new TinyStack();\n}\n\n// Node, AMD & window supported\nif ( typeof exports != \"undefined\" ) {\n\tmodule.exports = factory;\n}\nelse if ( typeof define == \"function\" ) {\n\tdefine( function () {\n\t\treturn factory;\n\t} );\n}\nelse {\n\tglobal.stack = factory;\n}\n} )( this );\n","'use strict';\n\nmodule.exports = require(26);\n\nmodule.exports.types = require(30);\n\nmodule.exports.ns = require(27);","'use strict';\n\nfunction Base() { }\n\nBase.prototype.get = function(name) {\n return this.$model.properties.get(this, name);\n};\n\nBase.prototype.set = function(name, value) {\n this.$model.properties.set(this, name, value);\n};\n\n\nmodule.exports = Base;","'use strict';\n\nvar _ = (window._);\n\nvar parseNameNs = require(27).parseName;\n\n\nfunction DescriptorBuilder(nameNs) {\n this.ns = nameNs;\n this.name = nameNs.name;\n this.allTypes = [];\n this.properties = [];\n this.propertiesByName = {};\n}\n\nmodule.exports = DescriptorBuilder;\n\n\nDescriptorBuilder.prototype.build = function() {\n return _.pick(this, [ 'ns', 'name', 'allTypes', 'properties', 'propertiesByName', 'bodyProperty' ]);\n};\n\nDescriptorBuilder.prototype.addProperty = function(p, idx) {\n this.addNamedProperty(p, true);\n\n var properties = this.properties;\n\n if (idx !== undefined) {\n properties.splice(idx, 0, p);\n } else {\n properties.push(p);\n }\n};\n\n\nDescriptorBuilder.prototype.replaceProperty = function(oldProperty, newProperty) {\n var oldNameNs = oldProperty.ns;\n\n var props = this.properties,\n propertiesByName = this.propertiesByName;\n\n if (oldProperty.isBody) {\n\n if (!newProperty.isBody) {\n throw new Error(\n 'property <' + newProperty.ns.name + '> must be body property ' +\n 'to refine <' + oldProperty.ns.name + '>');\n }\n\n // TODO: Check compatibility\n this.setBodyProperty(newProperty, false);\n }\n\n this.addNamedProperty(newProperty, true);\n\n // replace old property at index with new one\n var idx = props.indexOf(oldProperty);\n if (idx === -1) {\n throw new Error('property <' + oldNameNs.name + '> not found in property list');\n }\n\n props[idx] = newProperty;\n\n // replace propertiesByName entry with new property\n propertiesByName[oldNameNs.name] = propertiesByName[oldNameNs.localName] = newProperty;\n};\n\n\nDescriptorBuilder.prototype.redefineProperty = function(p) {\n\n var nsPrefix = p.ns.prefix;\n var parts = p.redefines.split('#');\n\n var name = parseNameNs(parts[0], nsPrefix);\n var attrName = parseNameNs(parts[1], name.prefix).name;\n\n var redefinedProperty = this.propertiesByName[attrName];\n if (!redefinedProperty) {\n throw new Error('refined property <' + attrName + '> not found');\n } else {\n this.replaceProperty(redefinedProperty, p);\n }\n\n delete p.redefines;\n};\n\nDescriptorBuilder.prototype.addNamedProperty = function(p, validate) {\n var ns = p.ns,\n propsByName = this.propertiesByName;\n\n if (validate) {\n this.assertNotDefined(p, ns.name);\n this.assertNotDefined(p, ns.localName);\n }\n\n propsByName[ns.name] = propsByName[ns.localName] = p;\n};\n\nDescriptorBuilder.prototype.removeNamedProperty = function(p) {\n var ns = p.ns,\n propsByName = this.propertiesByName;\n\n delete propsByName[ns.name];\n delete propsByName[ns.localName];\n};\n\nDescriptorBuilder.prototype.setBodyProperty = function(p, validate) {\n\n if (validate && this.bodyProperty) {\n throw new Error(\n 'body property defined multiple times ' +\n '(<' + this.bodyProperty.ns.name + '>, <' + p.ns.name + '>)');\n }\n\n this.bodyProperty = p;\n};\n\nDescriptorBuilder.prototype.addIdProperty = function(name) {\n var nameNs = parseNameNs(name, this.ns.prefix);\n\n var p = {\n name: nameNs.localName,\n type: 'String',\n isAttr: true,\n ns: nameNs\n };\n\n // ensure that id is always the first attribute (if present)\n this.addProperty(p, 0);\n};\n\nDescriptorBuilder.prototype.assertNotDefined = function(p, name) {\n var propertyName = p.name,\n definedProperty = this.propertiesByName[propertyName];\n\n if (definedProperty) {\n throw new Error(\n 'property <' + propertyName + '> already defined; ' +\n 'override of <' + definedProperty.definedBy.ns.name + '#' + definedProperty.ns.name + '> by ' +\n '<' + p.definedBy.ns.name + '#' + p.ns.name + '> not allowed without redefines');\n }\n};\n\nDescriptorBuilder.prototype.hasProperty = function(name) {\n return this.propertiesByName[name];\n};\n\nDescriptorBuilder.prototype.addTrait = function(t) {\n\n var allTypes = this.allTypes;\n\n if (allTypes.indexOf(t) !== -1) {\n return;\n }\n\n _.forEach(t.properties, function(p) {\n\n // clone property to allow extensions\n p = _.extend({}, p, {\n name: p.ns.localName\n });\n\n Object.defineProperty(p, 'definedBy', {\n value: t\n });\n\n // add redefine support\n if (p.redefines) {\n this.redefineProperty(p);\n } else {\n if (p.isBody) {\n this.setBodyProperty(p);\n }\n this.addProperty(p);\n }\n }, this);\n\n allTypes.push(t);\n};\n","'use strict';\n\nvar _ = (window._);\n\nvar Base = require(23);\n\n\nfunction Factory(model, properties) {\n this.model = model;\n this.properties = properties;\n}\n\nmodule.exports = Factory;\n\n\nFactory.prototype.createType = function(descriptor) {\n\n var model = this.model;\n\n var props = this.properties,\n prototype = Object.create(Base.prototype);\n\n // initialize default values\n _.forEach(descriptor.properties, function(p) {\n if (!p.isMany && p.default !== undefined) {\n prototype[p.name] = p.default;\n }\n });\n\n props.defineModel(prototype, model);\n props.defineDescriptor(prototype, descriptor);\n\n var name = descriptor.ns.name;\n\n /**\n * The new type constructor\n */\n function ModdleElement(attrs) {\n props.define(this, '$type', { value: name, enumerable: true });\n props.define(this, '$attrs', { value: {} });\n props.define(this, '$parent', { writable: true });\n\n _.forEach(attrs, function(val, key) {\n this.set(key, val);\n }, this);\n }\n\n ModdleElement.prototype = prototype;\n\n ModdleElement.hasType = prototype.$instanceOf = this.model.hasType;\n\n // static links\n props.defineModel(ModdleElement, model);\n props.defineDescriptor(ModdleElement, descriptor);\n\n return ModdleElement;\n};","'use strict';\n\nvar _ = (window._);\n\nvar Factory = require(25),\n Registry = require(29),\n Properties = require(28);\n\nvar parseNameNs = require(27).parseName;\n\n\n//// Moddle implementation /////////////////////////////////////////////////\n\n/**\n * @class Moddle\n *\n * A model that can be used to create elements of a specific type.\n *\n * @example\n *\n * var Moddle = require('moddle');\n *\n * var pkg = {\n * name: 'mypackage',\n * prefix: 'my',\n * types: [\n * { name: 'Root' }\n * ]\n * };\n *\n * var moddle = new Moddle([pkg]);\n *\n * @param {Array<Package>} packages the packages to contain\n * @param {Object} options additional options to pass to the model\n */\nfunction Moddle(packages, options) {\n\n options = options || {};\n\n this.properties = new Properties(this);\n\n this.factory = new Factory(this, this.properties);\n this.registry = new Registry(packages, this.properties, options);\n\n this.typeCache = {};\n}\n\nmodule.exports = Moddle;\n\n\n/**\n * Create an instance of the specified type.\n *\n * @method Moddle#create\n *\n * @example\n *\n * var foo = moddle.create('my:Foo');\n * var bar = moddle.create('my:Bar', { id: 'BAR_1' });\n *\n * @param {String|Object} descriptor the type descriptor or name know to the model\n * @param {Object} attrs a number of attributes to initialize the model instance with\n * @return {Object} model instance\n */\nModdle.prototype.create = function(descriptor, attrs) {\n var Type = this.getType(descriptor);\n\n if (!Type) {\n throw new Error('unknown type <' + descriptor + '>');\n }\n\n return new Type(attrs);\n};\n\n\n/**\n * Returns the type representing a given descriptor\n *\n * @method Moddle#getType\n *\n * @example\n *\n * var Foo = moddle.getType('my:Foo');\n * var foo = new Foo({ 'id' : 'FOO_1' });\n *\n * @param {String|Object} descriptor the type descriptor or name know to the model\n * @return {Object} the type representing the descriptor\n */\nModdle.prototype.getType = function(descriptor) {\n\n var cache = this.typeCache;\n\n var name = _.isString(descriptor) ? descriptor : descriptor.ns.name;\n\n var type = cache[name];\n\n if (!type) {\n descriptor = this.registry.getEffectiveDescriptor(name);\n type = cache[descriptor.name] = this.factory.createType(descriptor);\n }\n\n return type;\n};\n\n\n/**\n * Creates an any-element type to be used within model instances.\n *\n * This can be used to create custom elements that lie outside the meta-model.\n * The created element contains all the meta-data required to serialize it\n * as part of meta-model elements.\n *\n * @method Moddle#createAny\n *\n * @example\n *\n * var foo = moddle.createAny('vendor:Foo', 'http://vendor', {\n * value: 'bar'\n * });\n *\n * var container = moddle.create('my:Container', 'http://my', {\n * any: [ foo ]\n * });\n *\n * // go ahead and serialize the stuff\n *\n *\n * @param {String} name the name of the element\n * @param {String} nsUri the namespace uri of the element\n * @param {Object} [properties] a map of properties to initialize the instance with\n * @return {Object} the any type instance\n */\nModdle.prototype.createAny = function(name, nsUri, properties) {\n\n var nameNs = parseNameNs(name);\n\n var element = {\n $type: name\n };\n\n var descriptor = {\n name: name,\n isGeneric: true,\n ns: {\n prefix: nameNs.prefix,\n localName: nameNs.localName,\n uri: nsUri\n }\n };\n\n this.properties.defineDescriptor(element, descriptor);\n this.properties.defineModel(element, this);\n this.properties.define(element, '$parent', { enumerable: false, writable: true });\n\n _.forEach(properties, function(a, key) {\n if (_.isObject(a) && a.value !== undefined) {\n element[a.name] = a.value;\n } else {\n element[key] = a;\n }\n });\n\n return element;\n};\n\n/**\n * Returns a registered package by uri or prefix\n *\n * @return {Object} the package\n */\nModdle.prototype.getPackage = function(uriOrPrefix) {\n return this.registry.getPackage(uriOrPrefix);\n};\n\n/**\n * Returns a snapshot of all known packages\n *\n * @return {Object} the package\n */\nModdle.prototype.getPackages = function() {\n return this.registry.getPackages();\n};\n\n/**\n * Returns the descriptor for an element\n */\nModdle.prototype.getElementDescriptor = function(element) {\n return element.$descriptor;\n};\n\n/**\n * Returns true if the given descriptor or instance\n * represents the given type.\n *\n * May be applied to this, if element is omitted.\n */\nModdle.prototype.hasType = function(element, type) {\n if (type === undefined) {\n type = element;\n element = this;\n }\n\n var descriptor = element.$model.getElementDescriptor(element);\n\n return !!_.find(descriptor.allTypes, function(t) {\n return t.name === type;\n });\n};\n\n\n/**\n * Returns the descriptor of an elements named property\n */\nModdle.prototype.getPropertyDescriptor = function(element, property) {\n return this.getElementDescriptor(element).propertiesByName[property];\n};\n","'use strict';\n\n/**\n * Parses a namespaced attribute name of the form (ns:)localName to an object,\n * given a default prefix to assume in case no explicit namespace is given.\n *\n * @param {String} name\n * @param {String} [defaultPrefix] the default prefix to take, if none is present.\n *\n * @return {Object} the parsed name\n */\nmodule.exports.parseName = function(name, defaultPrefix) {\n var parts = name.split(/:/),\n localName, prefix;\n\n // no prefix (i.e. only local name)\n if (parts.length === 1) {\n localName = name;\n prefix = defaultPrefix;\n } else\n // prefix + local name\n if (parts.length === 2) {\n localName = parts[1];\n prefix = parts[0];\n } else {\n throw new Error('expected <prefix:localName> or <localName>, got ' + name);\n }\n\n name = (prefix ? prefix + ':' : '') + localName;\n\n return {\n name: name,\n prefix: prefix,\n localName: localName\n };\n};","'use strict';\n\n\n/**\n * A utility that gets and sets properties of model elements.\n *\n * @param {Model} model\n */\nfunction Properties(model) {\n this.model = model;\n}\n\nmodule.exports = Properties;\n\n\n/**\n * Sets a named property on the target element\n *\n * @param {Object} target\n * @param {String} name\n * @param {Object} value\n */\nProperties.prototype.set = function(target, name, value) {\n\n var property = this.model.getPropertyDescriptor(target, name);\n\n if (!property) {\n target.$attrs[name] = value;\n } else {\n Object.defineProperty(target, property.name, {\n enumerable: !property.isReference,\n writable: true,\n value: value\n });\n }\n};\n\n/**\n * Returns the named property of the given element\n *\n * @param {Object} target\n * @param {String} name\n *\n * @return {Object}\n */\nProperties.prototype.get = function(target, name) {\n\n var property = this.model.getPropertyDescriptor(target, name);\n\n if (!property) {\n return target.$attrs[name];\n }\n\n var propertyName = property.name;\n\n // check if access to collection property and lazily initialize it\n if (!target[propertyName] && property.isMany) {\n Object.defineProperty(target, propertyName, {\n enumerable: !property.isReference,\n writable: true,\n value: []\n });\n }\n\n return target[propertyName];\n};\n\n\n/**\n * Define a property on the target element\n *\n * @param {Object} target\n * @param {String} name\n * @param {Object} options\n */\nProperties.prototype.define = function(target, name, options) {\n Object.defineProperty(target, name, options);\n};\n\n\n/**\n * Define the descriptor for an element\n */\nProperties.prototype.defineDescriptor = function(target, descriptor) {\n this.define(target, '$descriptor', { value: descriptor });\n};\n\n/**\n * Define the model for an element\n */\nProperties.prototype.defineModel = function(target, model) {\n this.define(target, '$model', { value: model });\n};","'use strict';\n\nvar _ = (window._);\n\nvar Types = require(30),\n DescriptorBuilder = require(24);\n\nvar parseNameNs = require(27).parseName;\n\n\nfunction Registry(packages, properties, options) {\n this.options = _.extend({ generateId: 'id' }, options || {});\n\n this.packageMap = {};\n this.typeMap = {};\n\n this.packages = [];\n\n this.properties = properties;\n\n _.forEach(packages, this.registerPackage, this);\n}\n\nmodule.exports = Registry;\n\n\nRegistry.prototype.getPackage = function(uriOrPrefix) {\n return this.packageMap[uriOrPrefix];\n};\n\nRegistry.prototype.getPackages = function() {\n return this.packages;\n};\n\n\nRegistry.prototype.registerPackage = function(pkg) {\n\n // register types\n _.forEach(pkg.types, function(descriptor) {\n this.registerType(descriptor, pkg);\n }, this);\n\n this.packageMap[pkg.uri] = this.packageMap[pkg.prefix] = pkg;\n this.packages.push(pkg);\n};\n\n\n/**\n * Register a type from a specific package with us\n */\nRegistry.prototype.registerType = function(type, pkg) {\n\n var ns = parseNameNs(type.name, pkg.prefix),\n name = ns.name,\n propertiesByName = {};\n\n // parse properties\n _.forEach(type.properties, function(p) {\n\n // namespace property names\n var propertyNs = parseNameNs(p.name, ns.prefix),\n propertyName = propertyNs.name;\n\n // namespace property types\n if (!Types.isBuiltIn(p.type)) {\n p.type = parseNameNs(p.type, propertyNs.prefix).name;\n }\n\n _.extend(p, {\n ns: propertyNs,\n name: propertyName\n });\n\n propertiesByName[propertyName] = p;\n });\n\n // update ns + name\n _.extend(type, {\n ns: ns,\n name: name,\n propertiesByName: propertiesByName\n });\n\n // link to package\n this.definePackage(type, pkg);\n\n // register\n this.typeMap[name] = type;\n};\n\n\n/**\n * Traverse the type hierarchy from bottom to top.\n */\nRegistry.prototype.mapTypes = function(nsName, iterator) {\n\n var type = this.typeMap[nsName.name];\n\n if (!type) {\n throw new Error('unknown type <' + nsName.name + '>');\n }\n\n _.forEach(type.superClass, function(cls) {\n var parentNs = parseNameNs(cls, nsName.prefix);\n this.mapTypes(parentNs, iterator);\n }, this);\n\n iterator(type);\n};\n\n\n/**\n * Returns the effective descriptor for a type.\n *\n * @param {String} type the namespaced name (ns:localName) of the type\n *\n * @return {Descriptor} the resulting effective descriptor\n */\nRegistry.prototype.getEffectiveDescriptor = function(name) {\n\n var nsName = parseNameNs(name);\n\n var builder = new DescriptorBuilder(nsName);\n\n this.mapTypes(nsName, function(type) {\n builder.addTrait(type);\n });\n\n // check we have an id assigned\n var id = this.options.generateId;\n if (id && !builder.hasProperty(id)) {\n builder.addIdProperty(id);\n }\n\n var descriptor = builder.build();\n\n // define package link\n this.definePackage(descriptor, descriptor.allTypes[descriptor.allTypes.length - 1].$pkg);\n\n return descriptor;\n};\n\n\nRegistry.prototype.definePackage = function(target, pkg) {\n this.properties.define(target, '$pkg', { value: pkg });\n};","'use strict';\n\n/**\n * Built-in moddle types\n */\nvar BUILTINS = {\n String: true,\n Boolean: true,\n Integer: true,\n Real: true,\n Element: true,\n};\n\n/**\n * Converters for built in types from string representations\n */\nvar TYPE_CONVERTERS = {\n String: function(s) { return s; },\n Boolean: function(s) { return s === 'true'; },\n Integer: function(s) { return parseInt(s, 10); },\n Real: function(s) { return parseFloat(s, 10); }\n};\n\n/**\n * Convert a type to its real representation\n */\nmodule.exports.coerceType = function(type, value) {\n\n var converter = TYPE_CONVERTERS[type];\n\n if (converter) {\n return converter(value);\n } else {\n return value;\n }\n};\n\n/**\n * Return whether the given type is built-in\n */\nmodule.exports.isBuiltIn = function(type) {\n return !!BUILTINS[type];\n};\n\n/**\n * Return whether the given type is simple\n */\nmodule.exports.isSimple = function(type) {\n return !!TYPE_CONVERTERS[type];\n};","module.exports={\n \"name\": \"BPMN20\",\n \"uri\": \"http://www.omg.org/spec/BPMN/20100524/MODEL\",\n \"associations\": [],\n \"types\": [\n {\n \"name\": \"Interface\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"operations\",\n \"type\": \"Operation\",\n \"isMany\": true\n },\n {\n \"name\": \"implementationRef\",\n \"type\": \"String\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"Operation\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"inMessageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outMessageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"errorRefs\",\n \"type\": \"Error\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"implementationRef\",\n \"type\": \"String\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"EndPoint\",\n \"superClass\": [\n \"RootElement\"\n ]\n },\n {\n \"name\": \"Auditing\",\n \"superClass\": [\n \"BaseElement\"\n ]\n },\n {\n \"name\": \"GlobalTask\",\n \"superClass\": [\n \"CallableElement\"\n ],\n \"properties\": [\n {\n \"name\": \"resources\",\n \"type\": \"ResourceRole\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Monitoring\",\n \"superClass\": [\n \"BaseElement\"\n ]\n },\n {\n \"name\": \"Performer\",\n \"superClass\": [\n \"ResourceRole\"\n ]\n },\n {\n \"name\": \"Process\",\n \"superClass\": [\n \"FlowElementsContainer\",\n \"CallableElement\"\n ],\n \"properties\": [\n {\n \"name\": \"processType\",\n \"type\": \"ProcessType\",\n \"isAttr\": true\n },\n {\n \"name\": \"isClosed\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"auditing\",\n \"type\": \"Auditing\"\n },\n {\n \"name\": \"monitoring\",\n \"type\": \"Monitoring\"\n },\n {\n \"name\": \"properties\",\n \"type\": \"Property\",\n \"isMany\": true\n },\n {\n \"name\": \"supports\",\n \"type\": \"Process\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"definitionalCollaborationRef\",\n \"type\": \"Collaboration\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"isExecutable\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"resources\",\n \"type\": \"ResourceRole\",\n \"isMany\": true\n },\n {\n \"name\": \"artifacts\",\n \"type\": \"Artifact\",\n \"isMany\": true\n },\n {\n \"name\": \"correlationSubscriptions\",\n \"type\": \"CorrelationSubscription\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"LaneSet\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"lanes\",\n \"type\": \"Lane\",\n \"isMany\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Lane\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"childLaneSet\",\n \"type\": \"LaneSet\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"partitionElementRef\",\n \"type\": \"BaseElement\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"flowNodeRef\",\n \"type\": \"FlowNode\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"partitionElement\",\n \"type\": \"BaseElement\"\n }\n ]\n },\n {\n \"name\": \"GlobalManualTask\",\n \"superClass\": [\n \"GlobalTask\"\n ]\n },\n {\n \"name\": \"ManualTask\",\n \"superClass\": [\n \"Task\"\n ]\n },\n {\n \"name\": \"UserTask\",\n \"superClass\": [\n \"Task\"\n ],\n \"properties\": [\n {\n \"name\": \"renderings\",\n \"type\": \"Rendering\",\n \"isMany\": true\n },\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Rendering\",\n \"superClass\": [\n \"BaseElement\"\n ]\n },\n {\n \"name\": \"HumanPerformer\",\n \"superClass\": [\n \"Performer\"\n ]\n },\n {\n \"name\": \"PotentialOwner\",\n \"superClass\": [\n \"HumanPerformer\"\n ]\n },\n {\n \"name\": \"GlobalUserTask\",\n \"superClass\": [\n \"GlobalTask\"\n ],\n \"properties\": [\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"renderings\",\n \"type\": \"Rendering\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Gateway\",\n \"isAbstract\": true,\n \"superClass\": [\n \"FlowNode\"\n ],\n \"properties\": [\n {\n \"name\": \"gatewayDirection\",\n \"type\": \"GatewayDirection\",\n \"default\": \"Unspecified\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"EventBasedGateway\",\n \"superClass\": [\n \"Gateway\"\n ],\n \"properties\": [\n {\n \"name\": \"instantiate\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"eventGatewayType\",\n \"type\": \"EventBasedGatewayType\",\n \"isAttr\": true,\n \"default\": \"Exclusive\"\n }\n ]\n },\n {\n \"name\": \"ComplexGateway\",\n \"superClass\": [\n \"Gateway\"\n ],\n \"properties\": [\n {\n \"name\": \"activationCondition\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"default\",\n \"type\": \"SequenceFlow\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ExclusiveGateway\",\n \"superClass\": [\n \"Gateway\"\n ],\n \"properties\": [\n {\n \"name\": \"default\",\n \"type\": \"SequenceFlow\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"InclusiveGateway\",\n \"superClass\": [\n \"Gateway\"\n ],\n \"properties\": [\n {\n \"name\": \"default\",\n \"type\": \"SequenceFlow\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ParallelGateway\",\n \"superClass\": [\n \"Gateway\"\n ]\n },\n {\n \"name\": \"RootElement\",\n \"isAbstract\": true,\n \"superClass\": [\n \"BaseElement\"\n ]\n },\n {\n \"name\": \"Relationship\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"type\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"direction\",\n \"type\": \"RelationshipDirection\",\n \"isAttr\": true\n },\n {\n \"name\": \"sources\",\n \"isMany\": true,\n \"isReference\": true,\n \"type\": \"Element\"\n },\n {\n \"name\": \"targets\",\n \"isMany\": true,\n \"isReference\": true,\n \"type\": \"Element\"\n }\n ]\n },\n {\n \"name\": \"BaseElement\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"name\": \"id\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"extensionDefinitions\",\n \"type\": \"ExtensionDefinition\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"extensionElements\",\n \"type\": \"ExtensionElements\"\n },\n {\n \"name\": \"documentation\",\n \"type\": \"Documentation\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Extension\",\n \"properties\": [\n {\n \"name\": \"mustUnderstand\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"definition\",\n \"type\": \"ExtensionDefinition\"\n }\n ]\n },\n {\n \"name\": \"ExtensionDefinition\",\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"extensionAttributeDefinitions\",\n \"type\": \"ExtensionAttributeDefinition\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"ExtensionAttributeDefinition\",\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"type\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"isReference\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"extensionDefinition\",\n \"type\": \"ExtensionDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ExtensionElements\",\n \"properties\": [\n {\n \"name\": \"valueRef\",\n \"isAttr\": true,\n \"isReference\": true,\n \"type\": \"Element\"\n },\n {\n \"name\": \"values\",\n \"type\": \"Element\",\n \"isMany\": true\n },\n {\n \"name\": \"extensionAttributeDefinition\",\n \"type\": \"ExtensionAttributeDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Documentation\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"text\",\n \"type\": \"String\",\n \"isBody\": true\n },\n {\n \"name\": \"textFormat\",\n \"default\": \"text/plain\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Event\",\n \"isAbstract\": true,\n \"superClass\": [\n \"FlowNode\",\n \"InteractionNode\"\n ],\n \"properties\": [\n {\n \"name\": \"properties\",\n \"type\": \"Property\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"IntermediateCatchEvent\",\n \"superClass\": [\n \"CatchEvent\"\n ]\n },\n {\n \"name\": \"IntermediateThrowEvent\",\n \"superClass\": [\n \"ThrowEvent\"\n ]\n },\n {\n \"name\": \"EndEvent\",\n \"superClass\": [\n \"ThrowEvent\"\n ]\n },\n {\n \"name\": \"StartEvent\",\n \"superClass\": [\n \"CatchEvent\"\n ],\n \"properties\": [\n {\n \"name\": \"isInterrupting\",\n \"default\": true,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n }\n ]\n },\n {\n \"name\": \"ThrowEvent\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Event\"\n ],\n \"properties\": [\n {\n \"name\": \"inputSet\",\n \"type\": \"InputSet\"\n },\n {\n \"name\": \"eventDefinitionRefs\",\n \"type\": \"EventDefinition\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"dataInputAssociation\",\n \"type\": \"DataInputAssociation\",\n \"isMany\": true\n },\n {\n \"name\": \"dataInputs\",\n \"type\": \"DataInput\",\n \"isMany\": true\n },\n {\n \"name\": \"eventDefinitions\",\n \"type\": \"EventDefinition\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"CatchEvent\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Event\"\n ],\n \"properties\": [\n {\n \"name\": \"parallelMultiple\",\n \"isAttr\": true,\n \"type\": \"Boolean\",\n \"default\": false\n },\n {\n \"name\": \"outputSet\",\n \"type\": \"OutputSet\"\n },\n {\n \"name\": \"eventDefinitionRefs\",\n \"type\": \"EventDefinition\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"dataOutputAssociation\",\n \"type\": \"DataOutputAssociation\",\n \"isMany\": true\n },\n {\n \"name\": \"dataOutputs\",\n \"type\": \"DataOutput\",\n \"isMany\": true\n },\n {\n \"name\": \"eventDefinitions\",\n \"type\": \"EventDefinition\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"BoundaryEvent\",\n \"superClass\": [\n \"CatchEvent\"\n ],\n \"properties\": [\n {\n \"name\": \"cancelActivity\",\n \"default\": true,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"attachedToRef\",\n \"type\": \"Activity\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"EventDefinition\",\n \"isAbstract\": true,\n \"superClass\": [\n \"RootElement\"\n ]\n },\n {\n \"name\": \"CancelEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ]\n },\n {\n \"name\": \"ErrorEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"errorRef\",\n \"type\": \"Error\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"TerminateEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ]\n },\n {\n \"name\": \"EscalationEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"escalationRef\",\n \"type\": \"Escalation\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Escalation\",\n \"properties\": [\n {\n \"name\": \"structureRef\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"escalationCode\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ],\n \"superClass\": [\n \"RootElement\"\n ]\n },\n {\n \"name\": \"CompensateEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"waitForCompletion\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"activityRef\",\n \"type\": \"Activity\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"TimerEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"timeDate\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"timeCycle\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"timeDuration\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n }\n ]\n },\n {\n \"name\": \"LinkEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"target\",\n \"type\": \"LinkEventDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"source\",\n \"type\": \"LinkEventDefinition\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"MessageEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"messageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"operationRef\",\n \"type\": \"Operation\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ConditionalEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"condition\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n }\n ]\n },\n {\n \"name\": \"SignalEventDefinition\",\n \"superClass\": [\n \"EventDefinition\"\n ],\n \"properties\": [\n {\n \"name\": \"signalRef\",\n \"type\": \"Signal\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Signal\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"structureRef\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"ImplicitThrowEvent\",\n \"superClass\": [\n \"ThrowEvent\"\n ]\n },\n {\n \"name\": \"DataState\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"ItemAwareElement\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"itemSubjectRef\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"dataState\",\n \"type\": \"DataState\"\n }\n ]\n },\n {\n \"name\": \"DataAssociation\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"transformation\",\n \"type\": \"FormalExpression\"\n },\n {\n \"name\": \"assignment\",\n \"type\": \"Assignment\",\n \"isMany\": true\n },\n {\n \"name\": \"sourceRef\",\n \"type\": \"ItemAwareElement\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"targetRef\",\n \"type\": \"ItemAwareElement\",\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"DataInput\",\n \"superClass\": [\n \"ItemAwareElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"isCollection\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"inputSetRefs\",\n \"type\": \"InputSet\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"inputSetWithOptional\",\n \"type\": \"InputSet\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"inputSetWithWhileExecuting\",\n \"type\": \"InputSet\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"DataOutput\",\n \"superClass\": [\n \"ItemAwareElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"isCollection\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"outputSetRefs\",\n \"type\": \"OutputSet\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outputSetWithOptional\",\n \"type\": \"OutputSet\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outputSetWithWhileExecuting\",\n \"type\": \"OutputSet\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"InputSet\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"dataInputRefs\",\n \"type\": \"DataInput\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"optionalInputRefs\",\n \"type\": \"DataInput\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"whileExecutingInputRefs\",\n \"type\": \"DataInput\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outputSetRefs\",\n \"type\": \"OutputSet\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"OutputSet\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"dataOutputRefs\",\n \"type\": \"DataOutput\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"inputSetRefs\",\n \"type\": \"InputSet\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"optionalOutputRefs\",\n \"type\": \"DataOutput\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"whileExecutingOutputRefs\",\n \"type\": \"DataOutput\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Property\",\n \"superClass\": [\n \"ItemAwareElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"DataInputAssociation\",\n \"superClass\": [\n \"DataAssociation\"\n ]\n },\n {\n \"name\": \"DataOutputAssociation\",\n \"superClass\": [\n \"DataAssociation\"\n ]\n },\n {\n \"name\": \"InputOutputSpecification\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"inputSets\",\n \"type\": \"InputSet\",\n \"isMany\": true\n },\n {\n \"name\": \"outputSets\",\n \"type\": \"OutputSet\",\n \"isMany\": true\n },\n {\n \"name\": \"dataInputs\",\n \"type\": \"DataInput\",\n \"isMany\": true\n },\n {\n \"name\": \"dataOutputs\",\n \"type\": \"DataOutput\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"DataObject\",\n \"superClass\": [\n \"FlowElement\",\n \"ItemAwareElement\"\n ],\n \"properties\": [\n {\n \"name\": \"isCollection\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n }\n ]\n },\n {\n \"name\": \"InputOutputBinding\",\n \"properties\": [\n {\n \"name\": \"inputDataRef\",\n \"type\": \"InputSet\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outputDataRef\",\n \"type\": \"OutputSet\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"operationRef\",\n \"type\": \"Operation\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Assignment\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"from\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"to\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n }\n ]\n },\n {\n \"name\": \"DataStore\",\n \"superClass\": [\n \"RootElement\",\n \"ItemAwareElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"capacity\",\n \"isAttr\": true,\n \"type\": \"Integer\"\n },\n {\n \"name\": \"isUnlimited\",\n \"default\": true,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n }\n ]\n },\n {\n \"name\": \"DataStoreReference\",\n \"superClass\": [\n \"ItemAwareElement\",\n \"FlowElement\"\n ],\n \"properties\": [\n {\n \"name\": \"dataStoreRef\",\n \"type\": \"DataStore\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"DataObjectReference\",\n \"superClass\": [\n \"ItemAwareElement\",\n \"FlowElement\"\n ],\n \"properties\": [\n {\n \"name\": \"dataObjectRef\",\n \"type\": \"DataObject\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ConversationLink\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"sourceRef\",\n \"type\": \"InteractionNode\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"targetRef\",\n \"type\": \"InteractionNode\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"ConversationAssociation\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"innerConversationNodeRef\",\n \"type\": \"ConversationNode\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outerConversationNodeRef\",\n \"type\": \"ConversationNode\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"CallConversation\",\n \"superClass\": [\n \"ConversationNode\"\n ],\n \"properties\": [\n {\n \"name\": \"calledCollaborationRef\",\n \"type\": \"Collaboration\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"participantAssociations\",\n \"type\": \"ParticipantAssociation\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Conversation\",\n \"superClass\": [\n \"ConversationNode\"\n ]\n },\n {\n \"name\": \"SubConversation\",\n \"superClass\": [\n \"ConversationNode\"\n ],\n \"properties\": [\n {\n \"name\": \"conversationNodes\",\n \"type\": \"ConversationNode\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"ConversationNode\",\n \"isAbstract\": true,\n \"superClass\": [\n \"InteractionNode\",\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"participantRefs\",\n \"type\": \"Participant\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"messageFlowRefs\",\n \"type\": \"MessageFlow\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"correlationKeys\",\n \"type\": \"CorrelationKey\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"GlobalConversation\",\n \"superClass\": [\n \"Collaboration\"\n ]\n },\n {\n \"name\": \"PartnerEntity\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"participantRef\",\n \"type\": \"Participant\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"PartnerRole\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"participantRef\",\n \"type\": \"Participant\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"CorrelationProperty\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"correlationPropertyRetrievalExpression\",\n \"type\": \"CorrelationPropertyRetrievalExpression\",\n \"isMany\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"type\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Error\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"structureRef\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"errorCode\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"CorrelationKey\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"correlationPropertyRef\",\n \"type\": \"CorrelationProperty\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Expression\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"isAbstract\": true\n },\n {\n \"name\": \"FormalExpression\",\n \"superClass\": [\n \"Expression\"\n ],\n \"properties\": [\n {\n \"name\": \"language\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"body\",\n \"type\": \"String\",\n \"isBody\": true\n },\n {\n \"name\": \"evaluatesToTypeRef\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Message\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"itemRef\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ItemDefinition\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"itemKind\",\n \"type\": \"ItemKind\",\n \"isAttr\": true\n },\n {\n \"name\": \"structureRef\",\n \"type\": \"String\",\n \"isAttr\": true\n },\n {\n \"name\": \"isCollection\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"import\",\n \"type\": \"Import\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"FlowElement\",\n \"isAbstract\": true,\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"auditing\",\n \"type\": \"Auditing\"\n },\n {\n \"name\": \"monitoring\",\n \"type\": \"Monitoring\"\n },\n {\n \"name\": \"categoryValueRef\",\n \"type\": \"CategoryValue\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"SequenceFlow\",\n \"superClass\": [\n \"FlowElement\"\n ],\n \"properties\": [\n {\n \"name\": \"isImmediate\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"conditionExpression\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"sourceRef\",\n \"type\": \"FlowNode\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"targetRef\",\n \"type\": \"FlowNode\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"FlowElementsContainer\",\n \"isAbstract\": true,\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"laneSets\",\n \"type\": \"LaneSet\",\n \"isMany\": true\n },\n {\n \"name\": \"flowElements\",\n \"type\": \"FlowElement\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"CallableElement\",\n \"isAbstract\": true,\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"ioSpecification\",\n \"type\": \"InputOutputSpecification\"\n },\n {\n \"name\": \"supportedInterfaceRefs\",\n \"type\": \"Interface\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"ioBinding\",\n \"type\": \"InputOutputBinding\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"FlowNode\",\n \"isAbstract\": true,\n \"superClass\": [\n \"FlowElement\"\n ],\n \"properties\": [\n {\n \"name\": \"incoming\",\n \"type\": \"SequenceFlow\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outgoing\",\n \"type\": \"SequenceFlow\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"lanes\",\n \"type\": \"Lane\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"CorrelationPropertyRetrievalExpression\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"messagePath\",\n \"type\": \"FormalExpression\"\n },\n {\n \"name\": \"messageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"CorrelationPropertyBinding\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"dataPath\",\n \"type\": \"FormalExpression\"\n },\n {\n \"name\": \"correlationPropertyRef\",\n \"type\": \"CorrelationProperty\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Resource\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"resourceParameters\",\n \"type\": \"ResourceParameter\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"ResourceParameter\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"isRequired\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"type\",\n \"type\": \"ItemDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"CorrelationSubscription\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"correlationKeyRef\",\n \"type\": \"CorrelationKey\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"correlationPropertyBinding\",\n \"type\": \"CorrelationPropertyBinding\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"MessageFlow\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"sourceRef\",\n \"type\": \"InteractionNode\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"targetRef\",\n \"type\": \"InteractionNode\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"messageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"MessageFlowAssociation\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"innerMessageFlowRef\",\n \"type\": \"MessageFlow\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outerMessageFlowRef\",\n \"type\": \"MessageFlow\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"InteractionNode\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"name\": \"incomingConversationLinks\",\n \"type\": \"ConversationLink\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outgoingConversationLinks\",\n \"type\": \"ConversationLink\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Participant\",\n \"superClass\": [\n \"InteractionNode\",\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"interfaceRefs\",\n \"type\": \"Interface\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"participantMultiplicity\",\n \"type\": \"ParticipantMultiplicity\"\n },\n {\n \"name\": \"endPointRefs\",\n \"type\": \"EndPoint\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"processRef\",\n \"type\": \"Process\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ParticipantAssociation\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"innerParticipantRef\",\n \"type\": \"Participant\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"outerParticipantRef\",\n \"type\": \"Participant\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ParticipantMultiplicity\",\n \"properties\": [\n {\n \"name\": \"minimum\",\n \"default\": 0,\n \"isAttr\": true,\n \"type\": \"Integer\"\n },\n {\n \"name\": \"maximum\",\n \"default\": 1,\n \"isAttr\": true,\n \"type\": \"Integer\"\n }\n ]\n },\n {\n \"name\": \"Collaboration\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"isClosed\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"choreographyRef\",\n \"type\": \"Choreography\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"artifacts\",\n \"type\": \"Artifact\",\n \"isMany\": true\n },\n {\n \"name\": \"participantAssociations\",\n \"type\": \"ParticipantAssociation\",\n \"isMany\": true\n },\n {\n \"name\": \"messageFlowAssociations\",\n \"type\": \"MessageFlowAssociation\",\n \"isMany\": true\n },\n {\n \"name\": \"conversationAssociations\",\n \"type\": \"ConversationAssociation\"\n },\n {\n \"name\": \"participants\",\n \"type\": \"Participant\",\n \"isMany\": true\n },\n {\n \"name\": \"messageFlows\",\n \"type\": \"MessageFlow\",\n \"isMany\": true\n },\n {\n \"name\": \"correlationKeys\",\n \"type\": \"CorrelationKey\",\n \"isMany\": true\n },\n {\n \"name\": \"conversations\",\n \"type\": \"ConversationNode\",\n \"isMany\": true\n },\n {\n \"name\": \"conversationLinks\",\n \"type\": \"ConversationLink\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"ChoreographyActivity\",\n \"isAbstract\": true,\n \"superClass\": [\n \"FlowNode\"\n ],\n \"properties\": [\n {\n \"name\": \"participantRefs\",\n \"type\": \"Participant\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"initiatingParticipantRef\",\n \"type\": \"Participant\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"correlationKeys\",\n \"type\": \"CorrelationKey\",\n \"isMany\": true\n },\n {\n \"name\": \"loopType\",\n \"type\": \"ChoreographyLoopType\",\n \"default\": \"None\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"CallChoreography\",\n \"superClass\": [\n \"ChoreographyActivity\"\n ],\n \"properties\": [\n {\n \"name\": \"calledChoreographyRef\",\n \"type\": \"Choreography\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"participantAssociations\",\n \"type\": \"ParticipantAssociation\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"SubChoreography\",\n \"superClass\": [\n \"ChoreographyActivity\",\n \"FlowElementsContainer\"\n ],\n \"properties\": [\n {\n \"name\": \"artifacts\",\n \"type\": \"Artifact\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"ChoreographyTask\",\n \"superClass\": [\n \"ChoreographyActivity\"\n ],\n \"properties\": [\n {\n \"name\": \"messageFlowRef\",\n \"type\": \"MessageFlow\",\n \"isMany\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Choreography\",\n \"superClass\": [\n \"FlowElementsContainer\",\n \"Collaboration\"\n ]\n },\n {\n \"name\": \"GlobalChoreographyTask\",\n \"superClass\": [\n \"Choreography\"\n ],\n \"properties\": [\n {\n \"name\": \"initiatingParticipantRef\",\n \"type\": \"Participant\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"TextAnnotation\",\n \"superClass\": [\n \"Artifact\"\n ],\n \"properties\": [\n {\n \"name\": \"text\",\n \"type\": \"String\"\n },\n {\n \"name\": \"textFormat\",\n \"default\": \"text/plain\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Group\",\n \"superClass\": [\n \"Artifact\"\n ],\n \"properties\": [\n {\n \"name\": \"categoryValueRef\",\n \"type\": \"CategoryValue\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Association\",\n \"superClass\": [\n \"Artifact\"\n ],\n \"properties\": [\n {\n \"name\": \"associationDirection\",\n \"type\": \"AssociationDirection\",\n \"isAttr\": true\n },\n {\n \"name\": \"sourceRef\",\n \"type\": \"BaseElement\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"targetRef\",\n \"type\": \"BaseElement\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"Category\",\n \"superClass\": [\n \"RootElement\"\n ],\n \"properties\": [\n {\n \"name\": \"categoryValue\",\n \"type\": \"CategoryValue\",\n \"isMany\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Artifact\",\n \"isAbstract\": true,\n \"superClass\": [\n \"BaseElement\"\n ]\n },\n {\n \"name\": \"CategoryValue\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"categorizedFlowElements\",\n \"type\": \"FlowElement\",\n \"isVirtual\": true,\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"value\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Activity\",\n \"isAbstract\": true,\n \"superClass\": [\n \"FlowNode\"\n ],\n \"properties\": [\n {\n \"name\": \"isForCompensation\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"loopCharacteristics\",\n \"type\": \"LoopCharacteristics\"\n },\n {\n \"name\": \"resources\",\n \"type\": \"ResourceRole\",\n \"isMany\": true\n },\n {\n \"name\": \"default\",\n \"type\": \"SequenceFlow\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"properties\",\n \"type\": \"Property\",\n \"isMany\": true\n },\n {\n \"name\": \"ioSpecification\",\n \"type\": \"InputOutputSpecification\"\n },\n {\n \"name\": \"boundaryEventRefs\",\n \"type\": \"BoundaryEvent\",\n \"isMany\": true,\n \"isReference\": true\n },\n {\n \"name\": \"dataInputAssociations\",\n \"type\": \"DataInputAssociation\",\n \"isMany\": true\n },\n {\n \"name\": \"dataOutputAssociations\",\n \"type\": \"DataOutputAssociation\",\n \"isMany\": true\n },\n {\n \"name\": \"startQuantity\",\n \"default\": 1,\n \"isAttr\": true,\n \"type\": \"Integer\"\n },\n {\n \"name\": \"completionQuantity\",\n \"default\": 1,\n \"isAttr\": true,\n \"type\": \"Integer\"\n }\n ]\n },\n {\n \"name\": \"ServiceTask\",\n \"superClass\": [\n \"Task\"\n ],\n \"properties\": [\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"operationRef\",\n \"type\": \"Operation\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"SubProcess\",\n \"superClass\": [\n \"Activity\",\n \"FlowElementsContainer\"\n ],\n \"properties\": [\n {\n \"name\": \"triggeredByEvent\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"artifacts\",\n \"type\": \"Artifact\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"LoopCharacteristics\",\n \"isAbstract\": true,\n \"superClass\": [\n \"BaseElement\"\n ]\n },\n {\n \"name\": \"MultiInstanceLoopCharacteristics\",\n \"superClass\": [\n \"LoopCharacteristics\"\n ],\n \"properties\": [\n {\n \"name\": \"isSequential\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"behavior\",\n \"type\": \"MultiInstanceBehavior\",\n \"default\": \"All\",\n \"isAttr\": true\n },\n {\n \"name\": \"loopCardinality\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"loopDataInputRef\",\n \"type\": \"ItemAwareElement\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"loopDataOutputRef\",\n \"type\": \"ItemAwareElement\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"inputDataItem\",\n \"type\": \"DataInput\"\n },\n {\n \"name\": \"outputDataItem\",\n \"type\": \"DataOutput\"\n },\n {\n \"name\": \"completionCondition\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"complexBehaviorDefinition\",\n \"type\": \"ComplexBehaviorDefinition\",\n \"isMany\": true\n },\n {\n \"name\": \"oneBehaviorEventRef\",\n \"type\": \"EventDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"noneBehaviorEventRef\",\n \"type\": \"EventDefinition\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"StandardLoopCharacteristics\",\n \"superClass\": [\n \"LoopCharacteristics\"\n ],\n \"properties\": [\n {\n \"name\": \"testBefore\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"loopCondition\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"loopMaximum\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n }\n ]\n },\n {\n \"name\": \"CallActivity\",\n \"superClass\": [\n \"Activity\"\n ],\n \"properties\": [\n {\n \"name\": \"calledElement\",\n \"type\": \"String\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"Task\",\n \"superClass\": [\n \"Activity\",\n \"InteractionNode\"\n ]\n },\n {\n \"name\": \"SendTask\",\n \"superClass\": [\n \"Task\"\n ],\n \"properties\": [\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"operationRef\",\n \"type\": \"Operation\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"messageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ReceiveTask\",\n \"superClass\": [\n \"Task\"\n ],\n \"properties\": [\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"instantiate\",\n \"default\": false,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"operationRef\",\n \"type\": \"Operation\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"messageRef\",\n \"type\": \"Message\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ScriptTask\",\n \"superClass\": [\n \"Task\"\n ],\n \"properties\": [\n {\n \"name\": \"scriptFormat\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"script\",\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"BusinessRuleTask\",\n \"superClass\": [\n \"Task\"\n ],\n \"properties\": [\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"AdHocSubProcess\",\n \"superClass\": [\n \"SubProcess\"\n ],\n \"properties\": [\n {\n \"name\": \"completionCondition\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"ordering\",\n \"type\": \"AdHocOrdering\",\n \"isAttr\": true\n },\n {\n \"name\": \"cancelRemainingInstances\",\n \"default\": true,\n \"isAttr\": true,\n \"type\": \"Boolean\"\n }\n ]\n },\n {\n \"name\": \"Transaction\",\n \"superClass\": [\n \"SubProcess\"\n ],\n \"properties\": [\n {\n \"name\": \"protocol\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"method\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"GlobalScriptTask\",\n \"superClass\": [\n \"GlobalTask\"\n ],\n \"properties\": [\n {\n \"name\": \"scriptLanguage\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"script\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"GlobalBusinessRuleTask\",\n \"superClass\": [\n \"GlobalTask\"\n ],\n \"properties\": [\n {\n \"name\": \"implementation\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"ComplexBehaviorDefinition\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"condition\",\n \"type\": \"FormalExpression\"\n },\n {\n \"name\": \"event\",\n \"type\": \"ImplicitThrowEvent\"\n }\n ]\n },\n {\n \"name\": \"ResourceRole\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"resourceRef\",\n \"type\": \"Resource\",\n \"isAttr\": true,\n \"isReference\": true\n },\n {\n \"name\": \"resourceParameterBindings\",\n \"type\": \"ResourceParameterBinding\",\n \"isMany\": true\n },\n {\n \"name\": \"resourceAssignmentExpression\",\n \"type\": \"ResourceAssignmentExpression\"\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"ResourceParameterBinding\",\n \"properties\": [\n {\n \"name\": \"expression\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n },\n {\n \"name\": \"parameterRef\",\n \"type\": \"ResourceParameter\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ]\n },\n {\n \"name\": \"ResourceAssignmentExpression\",\n \"properties\": [\n {\n \"name\": \"expression\",\n \"type\": \"Expression\",\n \"serialize\": \"xsi:type\"\n }\n ]\n },\n {\n \"name\": \"Import\",\n \"properties\": [\n {\n \"name\": \"importType\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"location\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"namespace\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n },\n {\n \"name\": \"Definitions\",\n \"superClass\": [\n \"BaseElement\"\n ],\n \"properties\": [\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"targetNamespace\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"expressionLanguage\",\n \"default\": \"http://www.w3.org/1999/XPath\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"typeLanguage\",\n \"default\": \"http://www.w3.org/2001/XMLSchema\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"imports\",\n \"type\": \"Import\",\n \"isMany\": true\n },\n {\n \"name\": \"extensions\",\n \"type\": \"Extension\",\n \"isMany\": true\n },\n {\n \"name\": \"relationships\",\n \"type\": \"Relationship\",\n \"isMany\": true\n },\n {\n \"name\": \"rootElements\",\n \"type\": \"RootElement\",\n \"isMany\": true\n },\n {\n \"name\": \"diagrams\",\n \"isMany\": true,\n \"type\": \"bpmndi:BPMNDiagram\"\n },\n {\n \"name\": \"exporter\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"exporterVersion\",\n \"isAttr\": true,\n \"type\": \"String\"\n }\n ]\n }\n ],\n \"emumerations\": [\n {\n \"name\": \"ProcessType\",\n \"literalValues\": [\n {\n \"name\": \"None\"\n },\n {\n \"name\": \"Public\"\n },\n {\n \"name\": \"Private\"\n }\n ]\n },\n {\n \"name\": \"GatewayDirection\",\n \"literalValues\": [\n {\n \"name\": \"Unspecified\"\n },\n {\n \"name\": \"Converging\"\n },\n {\n \"name\": \"Diverging\"\n },\n {\n \"name\": \"Mixed\"\n }\n ]\n },\n {\n \"name\": \"EventBasedGatewayType\",\n \"literalValues\": [\n {\n \"name\": \"Parallel\"\n },\n {\n \"name\": \"Exclusive\"\n }\n ]\n },\n {\n \"name\": \"RelationshipDirection\",\n \"literalValues\": [\n {\n \"name\": \"None\"\n },\n {\n \"name\": \"Forward\"\n },\n {\n \"name\": \"Backward\"\n },\n {\n \"name\": \"Both\"\n }\n ]\n },\n {\n \"name\": \"ItemKind\",\n \"literalValues\": [\n {\n \"name\": \"Physical\"\n },\n {\n \"name\": \"Information\"\n }\n ]\n },\n {\n \"name\": \"ChoreographyLoopType\",\n \"literalValues\": [\n {\n \"name\": \"None\"\n },\n {\n \"name\": \"Standard\"\n },\n {\n \"name\": \"MultiInstanceSequential\"\n },\n {\n \"name\": \"MultiInstanceParallel\"\n }\n ]\n },\n {\n \"name\": \"AssociationDirection\",\n \"literalValues\": [\n {\n \"name\": \"None\"\n },\n {\n \"name\": \"One\"\n },\n {\n \"name\": \"Both\"\n }\n ]\n },\n {\n \"name\": \"MultiInstanceBehavior\",\n \"literalValues\": [\n {\n \"name\": \"None\"\n },\n {\n \"name\": \"One\"\n },\n {\n \"name\": \"All\"\n },\n {\n \"name\": \"Complex\"\n }\n ]\n },\n {\n \"name\": \"AdHocOrdering\",\n \"literalValues\": [\n {\n \"name\": \"Parallel\"\n },\n {\n \"name\": \"Sequential\"\n }\n ]\n }\n ],\n \"prefix\": \"bpmn\",\n \"xml\": {\n \"tagAlias\": \"lowerCase\",\n \"typePrefix\": \"t\"\n }\n}","module.exports={\n \"name\": \"BPMNDI\",\n \"uri\": \"http://www.omg.org/spec/BPMN/20100524/DI\",\n \"types\": [\n {\n \"name\": \"BPMNDiagram\",\n \"properties\": [\n {\n \"name\": \"plane\",\n \"type\": \"BPMNPlane\",\n \"redefines\": \"di:Diagram#rootElement\"\n },\n {\n \"name\": \"labelStyle\",\n \"type\": \"BPMNLabelStyle\",\n \"isMany\": true\n }\n ],\n \"superClass\": [\n \"di:Diagram\"\n ]\n },\n {\n \"name\": \"BPMNPlane\",\n \"properties\": [\n {\n \"name\": \"bpmnElement\",\n \"isAttr\": true,\n \"isReference\": true,\n \"type\": \"bpmn:BaseElement\",\n \"redefines\": \"di:DiagramElement#modelElement\"\n }\n ],\n \"superClass\": [\n \"di:Plane\"\n ]\n },\n {\n \"name\": \"BPMNShape\",\n \"properties\": [\n {\n \"name\": \"bpmnElement\",\n \"isAttr\": true,\n \"isReference\": true,\n \"type\": \"bpmn:BaseElement\",\n \"redefines\": \"di:DiagramElement#modelElement\"\n },\n {\n \"name\": \"isHorizontal\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"isExpanded\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"isMarkerVisible\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"label\",\n \"type\": \"BPMNLabel\"\n },\n {\n \"name\": \"isMessageVisible\",\n \"isAttr\": true,\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"participantBandKind\",\n \"type\": \"ParticipantBandKind\",\n \"isAttr\": true\n },\n {\n \"name\": \"choreographyActivityShape\",\n \"type\": \"BPMNShape\",\n \"isAttr\": true,\n \"isReference\": true\n }\n ],\n \"superClass\": [\n \"di:LabeledShape\"\n ]\n },\n {\n \"name\": \"BPMNEdge\",\n \"properties\": [\n {\n \"name\": \"label\",\n \"type\": \"BPMNLabel\"\n },\n {\n \"name\": \"bpmnElement\",\n \"isAttr\": true,\n \"isReference\": true,\n \"type\": \"bpmn:BaseElement\",\n \"redefines\": \"di:DiagramElement#modelElement\"\n },\n {\n \"name\": \"sourceElement\",\n \"isAttr\": true,\n \"isReference\": true,\n \"type\": \"di:DiagramElement\",\n \"redefines\": \"di:Edge#source\"\n },\n {\n \"name\": \"targetElement\",\n \"isAttr\": true,\n \"isReference\": true,\n \"type\": \"di:DiagramElement\",\n \"redefines\": \"di:Edge#target\"\n },\n {\n \"name\": \"messageVisibleKind\",\n \"type\": \"MessageVisibleKind\",\n \"isAttr\": true,\n \"default\": \"initiating\"\n }\n ],\n \"superClass\": [\n \"di:LabeledEdge\"\n ]\n },\n {\n \"name\": \"BPMNLabel\",\n \"properties\": [\n {\n \"name\": \"labelStyle\",\n \"type\": \"BPMNLabelStyle\",\n \"isAttr\": true,\n \"isReference\": true,\n \"redefines\": \"di:DiagramElement#style\"\n }\n ],\n \"superClass\": [\n \"di:Label\"\n ]\n },\n {\n \"name\": \"BPMNLabelStyle\",\n \"properties\": [\n {\n \"name\": \"font\",\n \"type\": \"dc:Font\"\n }\n ],\n \"superClass\": [\n \"di:Style\"\n ]\n }\n ],\n \"emumerations\": [\n {\n \"name\": \"ParticipantBandKind\",\n \"literalValues\": [\n {\n \"name\": \"top_initiating\"\n },\n {\n \"name\": \"middle_initiating\"\n },\n {\n \"name\": \"bottom_initiating\"\n },\n {\n \"name\": \"top_non_initiating\"\n },\n {\n \"name\": \"middle_non_initiating\"\n },\n {\n \"name\": \"bottom_non_initiating\"\n }\n ]\n },\n {\n \"name\": \"MessageVisibleKind\",\n \"literalValues\": [\n {\n \"name\": \"initiating\"\n },\n {\n \"name\": \"non_initiating\"\n }\n ]\n }\n ],\n \"associations\": [],\n \"prefix\": \"bpmndi\"\n}","module.exports={\n \"name\": \"DC\",\n \"uri\": \"http://www.omg.org/spec/DD/20100524/DC\",\n \"types\": [\n {\n \"name\": \"Boolean\"\n },\n {\n \"name\": \"Integer\"\n },\n {\n \"name\": \"Real\"\n },\n {\n \"name\": \"String\"\n },\n {\n \"name\": \"Font\",\n \"properties\": [\n {\n \"name\": \"name\",\n \"type\": \"String\",\n \"isAttr\": true\n },\n {\n \"name\": \"size\",\n \"type\": \"Real\",\n \"isAttr\": true\n },\n {\n \"name\": \"isBold\",\n \"type\": \"Boolean\",\n \"isAttr\": true\n },\n {\n \"name\": \"isItalic\",\n \"type\": \"Boolean\",\n \"isAttr\": true\n },\n {\n \"name\": \"isUnderline\",\n \"type\": \"Boolean\",\n \"isAttr\": true\n },\n {\n \"name\": \"isStrikeThrough\",\n \"type\": \"Boolean\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"Point\",\n \"properties\": [\n {\n \"name\": \"x\",\n \"type\": \"Real\",\n \"default\": \"0\",\n \"isAttr\": true\n },\n {\n \"name\": \"y\",\n \"type\": \"Real\",\n \"default\": \"0\",\n \"isAttr\": true\n }\n ]\n },\n {\n \"name\": \"Bounds\",\n \"properties\": [\n {\n \"name\": \"x\",\n \"type\": \"Real\",\n \"default\": \"0\",\n \"isAttr\": true\n },\n {\n \"name\": \"y\",\n \"type\": \"Real\",\n \"default\": \"0\",\n \"isAttr\": true\n },\n {\n \"name\": \"width\",\n \"type\": \"Real\",\n \"isAttr\": true\n },\n {\n \"name\": \"height\",\n \"type\": \"Real\",\n \"isAttr\": true\n }\n ]\n }\n ],\n \"prefix\": \"dc\",\n \"associations\": []\n}","module.exports={\n \"name\": \"DI\",\n \"uri\": \"http://www.omg.org/spec/DD/20100524/DI\",\n \"types\": [\n {\n \"name\": \"DiagramElement\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"name\": \"extension\",\n \"type\": \"Extension\"\n },\n {\n \"name\": \"owningDiagram\",\n \"type\": \"Diagram\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isReference\": true\n },\n {\n \"name\": \"owningElement\",\n \"type\": \"DiagramElement\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isReference\": true\n },\n {\n \"name\": \"modelElement\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isReference\": true,\n \"type\": \"Element\"\n },\n {\n \"name\": \"style\",\n \"type\": \"Style\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isReference\": true\n },\n {\n \"name\": \"ownedElement\",\n \"type\": \"DiagramElement\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Node\",\n \"isAbstract\": true,\n \"superClass\": [\n \"DiagramElement\"\n ]\n },\n {\n \"name\": \"Edge\",\n \"isAbstract\": true,\n \"superClass\": [\n \"DiagramElement\"\n ],\n \"properties\": [\n {\n \"name\": \"source\",\n \"type\": \"DiagramElement\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isReference\": true\n },\n {\n \"name\": \"target\",\n \"type\": \"DiagramElement\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isReference\": true\n },\n {\n \"name\": \"waypoint\",\n \"isUnique\": false,\n \"isMany\": true,\n \"type\": \"dc:Point\",\n \"serialize\": \"xsi:type\"\n }\n ]\n },\n {\n \"name\": \"Diagram\",\n \"isAbstract\": true,\n \"properties\": [\n {\n \"name\": \"rootElement\",\n \"type\": \"DiagramElement\",\n \"isReadOnly\": true,\n \"isVirtual\": true\n },\n {\n \"name\": \"name\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"documentation\",\n \"isAttr\": true,\n \"type\": \"String\"\n },\n {\n \"name\": \"resolution\",\n \"isAttr\": true,\n \"type\": \"Real\"\n },\n {\n \"name\": \"ownedStyle\",\n \"type\": \"Style\",\n \"isReadOnly\": true,\n \"isVirtual\": true,\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Shape\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Node\"\n ],\n \"properties\": [\n {\n \"name\": \"bounds\",\n \"type\": \"dc:Bounds\"\n }\n ]\n },\n {\n \"name\": \"Plane\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Node\"\n ],\n \"properties\": [\n {\n \"name\": \"planeElement\",\n \"type\": \"DiagramElement\",\n \"subsettedProperty\": \"DiagramElement-ownedElement\",\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"LabeledEdge\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Edge\"\n ],\n \"properties\": [\n {\n \"name\": \"ownedLabel\",\n \"type\": \"Label\",\n \"isReadOnly\": true,\n \"subsettedProperty\": \"DiagramElement-ownedElement\",\n \"isVirtual\": true,\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"LabeledShape\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Shape\"\n ],\n \"properties\": [\n {\n \"name\": \"ownedLabel\",\n \"type\": \"Label\",\n \"isReadOnly\": true,\n \"subsettedProperty\": \"DiagramElement-ownedElement\",\n \"isVirtual\": true,\n \"isMany\": true\n }\n ]\n },\n {\n \"name\": \"Label\",\n \"isAbstract\": true,\n \"superClass\": [\n \"Node\"\n ],\n \"properties\": [\n {\n \"name\": \"bounds\",\n \"type\": \"dc:Bounds\"\n }\n ]\n },\n {\n \"name\": \"Style\",\n \"isAbstract\": true\n },\n {\n \"name\": \"Extension\",\n \"properties\": [\n {\n \"name\": \"values\",\n \"type\": \"Element\",\n \"isMany\": true\n }\n ]\n }\n ],\n \"associations\": [],\n \"prefix\": \"di\",\n \"xml\": {\n \"tagAlias\": \"lowerCase\"\n }\n}","module.exports = require(36);","'use strict';\n\nvar di = require(72);\n\n/**\n * @namespace djs\n */\n\n/**\n * Bootstrap an injector from a list of modules, instantiating a number of default components\n *\n * @ignore\n * @param {Array<didi.Module>} bootstrapModules\n *\n * @return {didi.Injector} a injector to use to access the components\n */\nfunction bootstrap(bootstrapModules) {\n\n var modules = [],\n components = [];\n\n function hasModule(m) {\n return modules.indexOf(m) >= 0;\n }\n\n function addModule(m) {\n modules.push(m);\n }\n\n function visit(m) {\n if (hasModule(m)) {\n return;\n }\n\n (m.__depends__ || []).forEach(visit);\n\n if (hasModule(m)) {\n return;\n }\n\n addModule(m);\n\n (m.__init__ || []).forEach(function(c) {\n components.push(c);\n });\n }\n\n bootstrapModules.forEach(visit);\n\n var injector = new di.Injector(modules);\n\n components.forEach(function(c) {\n\n try {\n // eagerly resolve component (fn or string)\n injector[typeof c === 'string' ? 'get' : 'invoke'](c);\n } catch (e) {\n console.error('Failed to instantiate component');\n console.error(e.stack);\n\n throw e;\n }\n });\n\n return injector;\n}\n\n/**\n * Creates an injector from passed options.\n *\n * @ignore\n * @param {Object} options\n * @return {didi.Injector}\n */\nfunction createInjector(options) {\n\n options = options || {};\n\n var configModule = {\n 'config': ['value', options]\n };\n\n var coreModule = require(42);\n\n var modules = [ configModule, coreModule ].concat(options.modules || []);\n\n return bootstrap(modules);\n}\n\n\n/**\n * The main diagram-js entry point that bootstraps the diagram with the given\n * configuration.\n *\n * To register extensions with the diagram, pass them as Array<didi.Module> to the constructor.\n *\n * @class djs.Diagram\n * @memberOf djs\n * @constructor\n *\n * @example\n *\n * <caption>Creating a plug-in that logs whenever a shape is added to the canvas.</caption>\n *\n * // plug-in implemenentation\n * function MyLoggingPlugin(eventBus) {\n * eventBus.on('shape.added', function(event) {\n * console.log('shape ', event.shape, ' was added to the diagram');\n * });\n * }\n *\n * // export as module\n * module.exports = {\n * __init__: [ 'myLoggingPlugin' ],\n * myLoggingPlugin: [ 'type', MyLoggingPlugin ]\n * };\n *\n *\n * // instantiate the diagram with the new plug-in\n *\n * var diagram = new Diagram({ modules: [ require('path-to-my-logging-plugin') ] });\n *\n * diagram.invoke([ 'canvas', function(canvas) {\n * // add shape to drawing canvas\n * canvas.addShape({ x: 10, y: 10 });\n * });\n *\n * // 'shape ... was added to the diagram' logged to console\n *\n * @param {Object} options\n * @param {Array<didi.Module>} [options.modules] external modules to instantiate with the diagram\n * @param {didi.Injector} [injector] an (optional) injector to bootstrap the diagram with\n */\nfunction Diagram(options, injector) {\n\n // create injector unless explicitly specified\n this.injector = injector = injector || createInjector(options);\n\n // API\n\n /**\n * Resolves a diagram service\n *\n * @method Diagram#get\n *\n * @param {String} name the name of the diagram service to be retrieved\n * @param {Object} [locals] a number of locals to use to resolve certain dependencies\n */\n this.get = injector.get;\n\n /**\n * Executes a function into which diagram services are injected\n *\n * @method Diagram#invoke\n *\n * @param {Function|Object[]} fn the function to resolve\n * @param {Object} locals a number of locals to use to resolve certain dependencies\n */\n this.invoke = injector.invoke;\n\n // init\n\n // indicate via event\n\n\n /**\n * An event indicating that all plug-ins are loaded.\n *\n * Use this event to fire other events to interested plug-ins\n *\n * @memberOf Diagram\n *\n * @event diagram.init\n *\n * @example\n *\n * eventBus.on('diagram.init', function() {\n * eventBus.fire('my-custom-event', { foo: 'BAR' });\n * });\n *\n * @type {Object}\n */\n this.get('eventBus').fire('diagram.init');\n}\n\nmodule.exports = Diagram;\n\n\n/**\n * Destroys the diagram\n *\n * @method Diagram#destroy\n */\nDiagram.prototype.destroy = function() {\n this.get('eventBus').fire('diagram.destroy');\n};","'use strict';\n\n\nvar _ = (window._);\n\nvar Collections = require(63);\n\n\nfunction round(number, resolution) {\n return Math.round(number * resolution) / resolution;\n}\n\nfunction ensurePx(number) {\n return _.isNumber(number) ? number + 'px' : number;\n}\n\n/**\n * Creates a HTML container element for a SVG element with\n * the given configuration\n *\n * @param {Object} options\n * @return {HTMLElement} the container element\n */\nfunction createContainer(options) {\n\n options = _.extend({}, { width: '100%', height: '100%' }, options);\n\n var container = options.container || document.body;\n\n // create a <div> around the svg element with the respective size\n // this way we can always get the correct container size\n // (this is impossible for <svg> elements at the moment)\n var parent = document.createElement('div');\n parent.setAttribute('class', 'djs-container');\n\n _.extend(parent.style, {\n position: 'relative',\n width: ensurePx(options.width),\n height: ensurePx(options.height)\n });\n\n container.appendChild(parent);\n\n return parent;\n}\n\nfunction createGroup(parent, cls) {\n return parent.group().attr({ 'class' : cls });\n}\n\nvar BASE_LAYER = 'base';\n\n\n/**\n * The main drawing canvas.\n *\n * @class\n * @constructor\n *\n * @emits Canvas#canvas.init\n *\n * @param {Object} config\n * @param {EventBus} eventBus\n * @param {GraphicsFactory} graphicsFactory\n * @param {ElementRegistry} elementRegistry\n * @param {Snap} snap\n */\nfunction Canvas(config, eventBus, graphicsFactory, elementRegistry, snap) {\n\n this._snap = snap;\n this._eventBus = eventBus;\n this._elementRegistry = elementRegistry;\n this._graphicsFactory = graphicsFactory;\n\n this._init(config || {});\n}\n\nCanvas.$inject = [ 'config.canvas', 'eventBus', 'graphicsFactory', 'elementRegistry', 'snap' ];\n\nmodule.exports = Canvas;\n\n\nCanvas.prototype._init = function(config) {\n\n // Creates a <svg> element that is wrapped into a <div>.\n // This way we are always able to correctly figure out the size of the svg element\n // by querying the parent node.\n //\n // (It is not possible to get the size of a svg element cross browser @ 2014-04-01)\n //\n // <div class=\"djs-container\" style=\"width: {desired-width}, height: {desired-height}\">\n // <svg width=\"100%\" height=\"100%\">\n // ...\n // </svg>\n // </div>\n\n // html container\n var eventBus = this._eventBus,\n snap = this._snap,\n\n container = createContainer(config),\n svg = snap.createSnapAt('100%', '100%', container),\n viewport = createGroup(svg, 'viewport'),\n\n self = this;\n\n this._container = container;\n this._svg = svg;\n this._viewport = viewport;\n this._layers = {};\n\n eventBus.on('diagram.init', function(event) {\n\n /**\n * An event indicating that the canvas is ready to be drawn on.\n *\n * @memberOf Canvas\n *\n * @event canvas.init\n *\n * @type {Object}\n * @property {Snap<SVGSVGElement>} svg the created svg element\n * @property {Snap<SVGGroup>} viewport the direct parent of diagram elements and shapes\n */\n eventBus.fire('canvas.init', { svg: svg, viewport: viewport });\n });\n\n eventBus.on('diagram.destroy', function() {\n\n var parent = self._container.parentNode;\n\n if (parent) {\n parent.removeChild(container);\n }\n\n eventBus.fire('canvas.destroy', { svg: self._svg, viewport: self._viewport });\n\n self._svg.remove();\n\n self._svg = self._container = self._layers = self._viewport = null;\n });\n\n};\n\n/**\n * Returns the default layer on which\n * all elements are drawn.\n *\n * @returns {Snap<SVGGroup>}\n */\nCanvas.prototype.getDefaultLayer = function() {\n return this.getLayer(BASE_LAYER);\n};\n\n/**\n * Returns a layer that is used to draw elements\n * or annotations on it.\n *\n * @param {String} name\n *\n * @returns {Snap<SVGGroup>}\n */\nCanvas.prototype.getLayer = function(name) {\n\n if (!name) {\n throw new Error('must specify a name');\n }\n\n var layer = this._layers[name];\n if (!layer) {\n layer = this._layers[name] = createGroup(this._viewport, 'layer-' + name);\n }\n\n return layer;\n};\n\n\n/**\n * Returns the html element that encloses the\n * drawing canvas.\n *\n * @return {DOMNode}\n */\nCanvas.prototype.getContainer = function() {\n return this._container;\n};\n\n\n/////////////// markers ///////////////////////////////////\n\nCanvas.prototype._updateMarker = function(element, marker, add) {\n var gfx;\n\n if (!element.id) {\n element = this._elementRegistry.get(element);\n }\n\n gfx = this.getGraphics(element);\n\n if (!gfx) {\n return;\n }\n\n // invoke either addClass or removeClass based on mode\n gfx[add ? 'addClass' : 'removeClass'](marker);\n\n /**\n * An event indicating that a marker has been updated for an element\n *\n * @event element.marker.update\n * @type {Object}\n * @property {djs.model.Element} element the shape\n * @property {Object} gfx the graphical representation of the shape\n * @property {String} marker\n * @property {Boolean} add true if the marker was added, false if it got removed\n */\n this._eventBus.fire('element.marker.update', { element: element, gfx: gfx, marker: marker, add: !!add });\n};\n\n\n/**\n * Adds a marker to an element (basically a css class).\n *\n * Fires the element.marker.update event, making it possible to\n * integrate extension into the marker life-cycle, too.\n *\n * @example\n * canvas.addMarker('foo', 'some-marker');\n *\n * var fooGfx = canvas.getGraphics('foo');\n *\n * fooGfx; // <g class=\"... some-marker\"> ... </g>\n *\n * @param {String|djs.model.Base} element\n * @param {String} marker\n */\nCanvas.prototype.addMarker = function(element, marker) {\n this._updateMarker(element, marker, true);\n};\n\n\n/**\n * Remove a marker from an element.\n *\n * Fires the element.marker.update event, making it possible to\n * integrate extension into the marker life-cycle, too.\n *\n * @param {String|djs.model.Base} element\n * @param {String} marker\n */\nCanvas.prototype.removeMarker = function(element, marker) {\n this._updateMarker(element, marker, false);\n};\n\nCanvas.prototype.getRootElement = function() {\n if (!this._rootElement) {\n this.setRootElement({ id: '__implicitroot' });\n }\n\n return this._rootElement;\n};\n\n\n\n//////////////// root element handling ///////////////////////////\n\n/**\n * Sets a given element as the new root element for the canvas\n * and returns it.\n *\n * @param {Object|djs.model.Root} element\n * @param {Boolean} [override] whether to override the current root element, if any\n */\nCanvas.prototype.setRootElement = function(element, override) {\n\n var rootElement = this._rootElement,\n elementRegistry = this._elementRegistry;\n\n if (rootElement) {\n if (!override) {\n throw new Error('rootElement already defined');\n }\n\n elementRegistry.remove(rootElement);\n }\n\n elementRegistry.add(element, this.getDefaultLayer(), this._svg);\n\n this._rootElement = element;\n\n return element;\n};\n\n\n\n///////////// add functionality ///////////////////////////////\n\nCanvas.prototype._ensureValidId = function(element) {\n if (!element.id) {\n throw new Error('element must have an id');\n }\n\n if (this._elementRegistry.get(element.id)) {\n throw new Error('element with id ' + element.id + ' already exists');\n }\n};\n\nCanvas.prototype._setParent = function(element, parent) {\n Collections.add(parent.children, element);\n element.parent = parent;\n};\n\n/**\n * Adds an element to the canvas.\n *\n * This wires the parent <-> child relationship between the element and\n * a explicitly specified parent or an implicit root element.\n *\n * During add it emits the events\n *\n * * <{type}.add> (element, parent)\n * * <{type}.added> (element, gfx)\n *\n * Extensions may hook into these events to perform their magic.\n *\n * @param {String} type\n * @param {Object|djs.model.Base} element\n * @param {Object|djs.model.Base} [parent]\n *\n * @return {Object|djs.model.Base} the added element\n */\nCanvas.prototype._addElement = function(type, element, parent) {\n\n parent = parent || this.getRootElement();\n\n var eventBus = this._eventBus,\n graphicsFactory = this._graphicsFactory;\n\n this._ensureValidId(element);\n\n eventBus.fire(type + '.add', { element: element, parent: parent });\n\n this._setParent(element, parent);\n\n // create graphics\n var gfx = graphicsFactory.create(type, element);\n\n this._elementRegistry.add(element, gfx);\n\n // update its visual\n graphicsFactory.update(type, element, gfx);\n\n eventBus.fire(type + '.added', { element: element, gfx: gfx });\n\n return element;\n};\n\n/**\n * Adds a shape to the canvas\n *\n * @param {Object|djs.model.Shape} shape to add to the diagram\n * @param {djs.model.Base} [parent]\n *\n * @return {djs.model.Shape} the added shape\n */\nCanvas.prototype.addShape = function(shape, parent) {\n return this._addElement('shape', shape, parent);\n};\n\n/**\n * Adds a connection to the canvas\n *\n * @param {Object|djs.model.Connection} connection to add to the diagram\n * @param {djs.model.Base} [parent]\n *\n * @return {djs.model.Connection} the added connection\n */\nCanvas.prototype.addConnection = function(connection, parent) {\n return this._addElement('connection', connection, parent);\n};\n\n\n/**\n * Internal remove element\n */\nCanvas.prototype._removeElement = function(element, type) {\n\n var elementRegistry = this._elementRegistry,\n graphicsFactory = this._graphicsFactory,\n eventBus = this._eventBus;\n\n element = elementRegistry.get(element.id || element);\n\n if (!element) {\n // element was removed already\n return;\n }\n\n eventBus.fire(type + '.remove', { element: element });\n\n graphicsFactory.remove(element);\n\n // unset parent <-> child relationship\n Collections.remove(element.parent && element.parent.children, element);\n element.parent = null;\n\n eventBus.fire(type + '.removed', { element: element });\n\n elementRegistry.remove(element);\n\n return element;\n};\n\n\n/**\n * Removes a shape from the canvas\n *\n * @param {String|djs.model.Shape} shape or shape id to be removed\n *\n * @return {djs.model.Shape} the removed shape\n */\nCanvas.prototype.removeShape = function(shape) {\n\n /**\n * An event indicating that a shape is about to be removed from the canvas.\n *\n * @memberOf Canvas\n *\n * @event shape.remove\n * @type {Object}\n * @property {djs.model.Shape} element the shape descriptor\n * @property {Object} gfx the graphical representation of the shape\n */\n\n /**\n * An event indicating that a shape has been removed from the canvas.\n *\n * @memberOf Canvas\n *\n * @event shape.removed\n * @type {Object}\n * @property {djs.model.Shape} element the shape descriptor\n * @property {Object} gfx the graphical representation of the shape\n */\n return this._removeElement(shape, 'shape');\n};\n\n\n/**\n * Removes a connection from the canvas\n *\n * @param {String|djs.model.Connection} connection or connection id to be removed\n *\n * @return {djs.model.Connection} the removed connection\n */\nCanvas.prototype.removeConnection = function(connection) {\n\n /**\n * An event indicating that a connection is about to be removed from the canvas.\n *\n * @memberOf Canvas\n *\n * @event connection.remove\n * @type {Object}\n * @property {djs.model.Connection} element the connection descriptor\n * @property {Object} gfx the graphical representation of the connection\n */\n\n /**\n * An event indicating that a connection has been removed from the canvas.\n *\n * @memberOf Canvas\n *\n * @event connection.removed\n * @type {Object}\n * @property {djs.model.Connection} element the connection descriptor\n * @property {Object} gfx the graphical representation of the connection\n */\n return this._removeElement(connection, 'connection');\n};\n\n\n/**\n * Sends a shape to the front.\n *\n * This method takes parent / child relationships between shapes into account\n * and makes sure that children are properly handled, too.\n *\n * @param {djs.model.Shape} shape descriptor of the shape to be sent to front\n * @param {boolean} [bubble=true] whether to send parent shapes to front, too\n */\nCanvas.prototype.sendToFront = function(shape, bubble) {\n\n if (bubble !== false) {\n bubble = true;\n }\n\n if (bubble && shape.parent) {\n this.sendToFront(shape.parent);\n }\n\n _.forEach(shape.children, function(child) {\n this.sendToFront(child, false);\n }, this);\n\n var gfx = this.getGraphics(shape),\n gfxParent = gfx.parent();\n\n gfx.remove().appendTo(gfxParent);\n};\n\n\n/**\n * Return the graphical object underlaying a certain diagram element\n *\n * @param {String|djs.model.Base} element descriptor of the element\n */\nCanvas.prototype.getGraphics = function(element) {\n return this._elementRegistry.getGraphics(element);\n};\n\n\nCanvas.prototype._fireViewboxChange = function() {\n this._eventBus.fire('canvas.viewbox.changed', { viewbox: this.viewbox(false) });\n};\n\n\n/**\n * Gets or sets the view box of the canvas, i.e. the area that is currently displayed\n *\n * @param {Object} [box] the new view box to set\n * @param {Number} box.x the top left X coordinate of the canvas visible in view box\n * @param {Number} box.y the top left Y coordinate of the canvas visible in view box\n * @param {Number} box.width the visible width\n * @param {Number} box.height\n *\n * @example\n *\n * canvas.viewbox({ x: 100, y: 100, width: 500, height: 500 })\n *\n * // sets the visible area of the diagram to (100|100) -> (600|100)\n * // and and scales it according to the diagram width\n *\n * @return {Object} the current view box\n */\nCanvas.prototype.viewbox = function(box) {\n\n if (box === undefined && this._cachedViewbox) {\n return this._cachedViewbox;\n }\n\n var viewport = this._viewport,\n innerBox,\n outerBox = this.getSize(),\n matrix,\n scale,\n x, y;\n\n if (!box) {\n innerBox = viewport.getBBox(true);\n\n matrix = viewport.transform().localMatrix;\n scale = round(matrix.a, 1000);\n\n x = round(-matrix.e || 0, 1000);\n y = round(-matrix.f || 0, 1000);\n\n box = this._cachedViewbox = {\n x: x ? x / scale : 0,\n y: y ? y / scale : 0,\n width: outerBox.width / scale,\n height: outerBox.height / scale,\n scale: scale,\n inner: {\n width: innerBox.width,\n height: innerBox.height,\n x: innerBox.x,\n y: innerBox.y\n },\n outer: outerBox\n };\n\n return box;\n } else {\n scale = Math.max(outerBox.width / box.width, outerBox.height / box.height);\n\n matrix = new this._snap.Matrix().scale(scale).translate(-box.x, -box.y);\n viewport.transform(matrix);\n\n this._fireViewboxChange();\n }\n\n return box;\n};\n\n\n/**\n * Gets or sets the scroll of the canvas.\n *\n * @param {Object} [delta] the new scroll to apply.\n *\n * @param {Number} [delta.dx]\n * @param {Number} [delta.dy]\n */\nCanvas.prototype.scroll = function(delta) {\n\n var node = this._viewport.node;\n var matrix = node.getCTM();\n\n if (delta) {\n delta = _.extend({ dx: 0, dy: 0 }, delta || {});\n\n matrix = this._svg.node.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);\n\n setCTM(node, matrix);\n\n this._fireViewboxChange();\n }\n\n return { x: matrix.e, y: matrix.f };\n};\n\n\n/**\n * Gets or sets the current zoom of the canvas, optionally zooming to the specified position.\n *\n * @param {String|Number} [newScale] the new zoom level, either a number, i.e. 0.9,\n * or `fit-viewport` to adjust the size to fit the current viewport\n * @param {String|Point} [center] the reference point { x: .., y: ..} to zoom to, 'auto' to zoom into mid or null\n *\n * @return {Number} the current scale\n */\nCanvas.prototype.zoom = function(newScale, center) {\n\n var vbox = this.viewbox();\n\n if (newScale === undefined) {\n return vbox.scale;\n }\n\n var outer = vbox.outer;\n\n if (newScale === 'fit-viewport') {\n newScale = Math.min(1,\n outer.width / (vbox.inner.width + vbox.inner.x),\n outer.height / (vbox.inner.height + vbox.inner.y));\n }\n\n if (center === 'auto') {\n center = {\n x: outer.width / 2,\n y: outer.height / 2\n };\n }\n\n var matrix = this._setZoom(newScale, center);\n\n this._fireViewboxChange();\n\n return round(matrix.a, 1000);\n};\n\nfunction setCTM(node, m) {\n var mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')';\n node.setAttribute('transform', mstr);\n}\n\nCanvas.prototype._setZoom = function(scale, center) {\n\n var svg = this._svg.node,\n viewport = this._viewport.node;\n\n var matrix = svg.createSVGMatrix();\n var point = svg.createSVGPoint();\n\n var centerPoint,\n originalPoint,\n currentMatrix,\n scaleMatrix,\n newMatrix;\n\n currentMatrix = viewport.getCTM();\n\n\n var currentScale = currentMatrix.a;\n\n if (center) {\n centerPoint = _.extend(point, center);\n\n // revert applied viewport transformations\n originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());\n\n // create scale matrix\n scaleMatrix = matrix\n .translate(originalPoint.x, originalPoint.y)\n .scale(1 / currentScale * scale)\n .translate(-originalPoint.x, -originalPoint.y);\n\n newMatrix = currentMatrix.multiply(scaleMatrix);\n } else {\n newMatrix = matrix.scale(scale);\n }\n\n setCTM(this._viewport.node, newMatrix);\n\n return newMatrix;\n};\n\n\n/**\n * Returns the size of the canvas\n *\n * @return {Dimensions}\n */\nCanvas.prototype.getSize = function () {\n return {\n width: this._container.clientWidth,\n height: this._container.clientHeight\n };\n};\n\n\n/**\n * Return the absolute bounding box for the given element\n *\n * The absolute bounding box may be used to display overlays in the\n * callers (browser) coordinate system rather than the zoomed in/out\n * canvas coordinates.\n *\n * @param {ElementDescriptor} element\n * @return {Bounds} the absolute bounding box\n */\nCanvas.prototype.getAbsoluteBBox = function(element) {\n var vbox = this.viewbox();\n var bbox;\n\n // connection\n // use svg bbox\n if (element.waypoints) {\n var gfx = this.getGraphics(element);\n\n var transformBBox = gfx.getBBox(true);\n bbox = gfx.getBBox();\n\n bbox.x -= transformBBox.x;\n bbox.y -= transformBBox.y;\n\n bbox.width += 2 * transformBBox.x;\n bbox.height += 2 * transformBBox.y;\n }\n // shapes\n // use data\n else {\n bbox = element;\n }\n\n var x = bbox.x * vbox.scale - vbox.x * vbox.scale;\n var y = bbox.y * vbox.scale - vbox.y * vbox.scale;\n\n var width = bbox.width * vbox.scale;\n var height = bbox.height * vbox.scale;\n\n return {\n x: x,\n y: y,\n width: width,\n height: height\n };\n};","'use strict';\n\nvar Model = require(58);\n\n\n/**\n * A factory for diagram-js shapes\n */\nfunction ElementFactory() {\n this._uid = 12;\n}\n\nmodule.exports = ElementFactory;\n\n\nElementFactory.prototype.createRoot = function(attrs) {\n return this.create('root', attrs);\n};\n\nElementFactory.prototype.createLabel = function(attrs) {\n return this.create('label', attrs);\n};\n\nElementFactory.prototype.createShape = function(attrs) {\n return this.create('shape', attrs);\n};\n\nElementFactory.prototype.createConnection = function(attrs) {\n return this.create('connection', attrs);\n};\n\n/**\n * Create a model element with the given type and\n * a number of pre-set attributes.\n *\n * @param {String} type\n * @param {Object} attrs\n * @return {djs.model.Base} the newly created model instance\n */\nElementFactory.prototype.create = function(type, attrs) {\n\n attrs = attrs || {};\n\n if (!attrs.id) {\n attrs.id = type + '_' + (this._uid++);\n }\n\n return Model.create(type, attrs);\n};","'use strict';\n\nvar ELEMENT_ID = 'data-element-id';\n\n/**\n * @class\n *\n * A registry that keeps track of all shapes in the diagram.\n */\nfunction ElementRegistry() {\n this._elements = {};\n}\n\nmodule.exports = ElementRegistry;\n\n/**\n * Register a pair of (element, gfx, (secondaryGfx)).\n *\n * @param {djs.model.Base} element\n * @param {Snap<SVGElement>} gfx\n * @param {Snap<SVGElement>} [secondaryGfx] optional other element to register, too\n */\nElementRegistry.prototype.add = function(element, gfx, secondaryGfx) {\n\n var id = element.id;\n\n if (!id) {\n throw new Error('element must have an id');\n }\n\n if (this._elements[id]) {\n throw new Error('element with id ' + id + ' already added');\n }\n\n // associate dom node with element\n gfx.attr(ELEMENT_ID, id);\n\n if (secondaryGfx) {\n secondaryGfx.attr(ELEMENT_ID, id);\n }\n\n this._elements[id] = { element: element, gfx: gfx, secondaryGfx: secondaryGfx };\n};\n\n\n/**\n * Removes an element from the registry.\n *\n * @param {djs.model.Base} element\n */\nElementRegistry.prototype.remove = function(element) {\n var elements = this._elements,\n id = element.id || element,\n container = id && elements[id];\n\n if (container) {\n\n // unset element id on gfx\n container.gfx.attr(ELEMENT_ID, null);\n\n if (container.secondaryGfx) {\n container.secondaryGfx.attr(ELEMENT_ID, null);\n }\n\n delete elements[id];\n }\n};\n\n\n/**\n * Return the model element for a given id or graphics.\n *\n * @example\n *\n * elementRegistry.get('SomeElementId_1');\n * elementRegistry.get(gfx);\n *\n *\n * @param {String|SVGElement} filter for selecting the element\n *\n * @return {djs.model.Base}\n */\nElementRegistry.prototype.get = function(filter) {\n var id;\n\n if (typeof filter === 'string') {\n id = filter;\n } else {\n id = filter && filter.attr(ELEMENT_ID);\n }\n\n var container = this._elements[id];\n return container && container.element;\n};\n\n/**\n * Return all elements that match a given filter function.\n *\n * @param {Function} fn\n *\n * @return {Array<djs.model.Base>}\n */\nElementRegistry.prototype.filter = function(fn) {\n\n var map = this._elements,\n filtered = [];\n\n Object.keys(map).forEach(function(id) {\n var container = map[id],\n element = container.element,\n gfx = container.gfx;\n\n if (fn(element, gfx)) {\n filtered.push(element);\n }\n });\n\n return filtered;\n};\n\n/**\n * Return the graphics for a given id or element.\n *\n * @example\n *\n * elementRegistry.getGraphics('SomeElementId_1');\n * elementRegistry.getGraphics(rootElement);\n *\n *\n * @param {String|djs.model.Base} filter\n *\n * @return {SVGElement}\n */\nElementRegistry.prototype.getGraphics = function(filter) {\n var id = filter.id || filter;\n\n var container = this._elements[id];\n return container && container.gfx;\n};\n","'use strict';\n\nvar _ = (window._);\n\nvar DEFAULT_PRIORITY = 1000;\n\nfunction Event() { }\n\nEvent.prototype = {\n stopPropagation: function() {\n this.propagationStopped = true;\n },\n preventDefault: function() {\n this.defaultPrevented = true;\n },\n init: function(data) {\n _.extend(this, data || {});\n }\n};\n\n\n/**\n * A general purpose event bus\n *\n * @class\n */\nfunction EventBus() {\n this._listeners = {};\n\n // cleanup on destroy\n\n var self = this;\n\n // destroy on lowest priority to allow\n // message passing until the bitter end\n this.on('diagram.destroy', 1, function() {\n self._listeners = null;\n });\n}\n\nmodule.exports = EventBus;\n\nmodule.exports.Event = Event;\n\n\n/**\n * Register an event listener for events with the given name.\n *\n * The callback will be invoked with `event, ...additionalArguments`\n * that have been passed to {@link EventBus#fire}.\n *\n * Returning false from a listener will prevent the events default action\n * (if any is specified). To stop an event from being processed further in\n * other listeners execute {@link Event#stopPropagation}.\n *\n * @param {String|Array<String>} events\n * @param {Number} [priority=1000] the priority in which this listener is called, larger is higher\n * @param {Function} callback\n */\nEventBus.prototype.on = function(events, priority, callback) {\n\n events = _.isArray(events) ? events : [ events ];\n\n if (_.isFunction(priority)) {\n callback = priority;\n priority = DEFAULT_PRIORITY;\n }\n\n if (!_.isNumber(priority)) {\n throw new Error('priority must be a number');\n }\n\n var self = this,\n listener = { priority: priority, callback: callback };\n\n events.forEach(function(e) {\n self._addListener(e, listener);\n });\n};\n\n\n/**\n * Register an event listener that is executed only once.\n *\n * @param {String} event the event name to register for\n * @param {Function} callback the callback to execute\n */\nEventBus.prototype.once = function(event, callback) {\n\n var self = this;\n\n function wrappedCallback() {\n callback.apply(self, arguments);\n self.off(event, wrappedCallback);\n }\n\n this.on(event, wrappedCallback);\n};\n\n\n/**\n * Removes event listeners by event and callback.\n *\n * If no callback is given, all listeners for a given event name are being removed.\n *\n * @param {String} event\n * @param {Function} [callback]\n */\nEventBus.prototype.off = function(event, callback) {\n var listeners = this._getListeners(event),\n l, i;\n\n if (callback) {\n\n // move through listeners from back to front\n // and remove matching listeners\n for (i = listeners.length - 1; !!(l = listeners[i]); i--) {\n if (l.callback === callback) {\n listeners.splice(i, 1);\n }\n }\n } else {\n // clear listeners\n listeners.length = 0;\n }\n};\n\n\n/**\n * Fires a named event.\n *\n * @example\n *\n * // fire event by name\n * events.fire('foo');\n *\n * // fire event object with nested type\n * var event = { type: 'foo' };\n * events.fire(event);\n *\n * // fire event with explicit type\n * var event = { x: 10, y: 20 };\n * events.fire('element.moved', event);\n *\n * // pass additional arguments to the event\n * events.on('foo', function(event, bar) {\n * alert(bar);\n * });\n *\n * events.fire({ type: 'foo' }, 'I am bar!');\n *\n * @param {String} [name] the optional event name\n * @param {Object} [event] the event object\n * @param {...Object} additional arguments to be passed to the callback functions\n *\n * @return {Boolean} false if default was prevented, null if the propagation got stopped and true otherwise\n */\nEventBus.prototype.fire = function(type, data) {\n\n var event,\n originalType,\n listeners, i, l,\n args;\n\n args = Array.prototype.slice.call(arguments);\n\n if (typeof type === 'string') {\n // remove name parameter\n args.shift();\n } else {\n event = type;\n type = event.type;\n }\n\n if (!type) {\n throw new Error('no event type specified');\n }\n\n listeners = this._listeners[type];\n\n if (!listeners) {\n return true;\n }\n\n // we make sure we fire instances of our home made\n // events here. We wrap them only once, though\n if (data instanceof Event) {\n // we are fine, we alread have an event\n event = data;\n } else {\n event = Object.create(Event.prototype);\n event.init(data);\n }\n\n // ensure we pass the event as the first parameter\n args[0] = event;\n\n // original event type (in case we delegate)\n originalType = event.type;\n\n try {\n\n // update event type before delegation\n if (type !== originalType) {\n event.type = type;\n }\n\n for (i = 0, l; !!(l = listeners[i]); i++) {\n\n // handle stopped propagation\n if (event.propagationStopped) {\n break;\n }\n\n try {\n // handle listener returning false\n if (l.callback.apply(null, args) === false) {\n event.preventDefault();\n }\n } catch (e) {\n if (!this.handleError(e)) {\n console.error('unhandled error in event listener');\n console.error(e.stack);\n\n throw e;\n }\n }\n }\n } finally {\n // reset event type after delegation\n if (type !== originalType) {\n event.type = originalType;\n }\n }\n\n // distinguish between default prevented (false)\n // and propagation stopped (null) as a return value\n return event.defaultPrevented ? false : (event.propagationStopped ? null : true);\n};\n\n\nEventBus.prototype.handleError = function(error) {\n return !this.fire('error', { error: error });\n};\n\n\nEventBus.prototype._addListener = function(event, listener) {\n\n var listeners = this._getListeners(event),\n i, l;\n\n // ensure we order listeners by priority from\n // 0 (high) to n > 0 (low)\n for (i = 0; !!(l = listeners[i]); i++) {\n if (l.priority < listener.priority) {\n listeners.splice(i, 0, listener);\n return;\n }\n }\n\n listeners.push(listener);\n};\n\n\nEventBus.prototype._getListeners = function(name) {\n var listeners = this._listeners[name];\n\n if (!listeners) {\n this._listeners[name] = listeners = [];\n }\n\n return listeners;\n};\n","var _ = (window._);\n\nvar GraphicsUtil = require(68),\n Dom = require(65);\n\n\n/**\n * A factory that creates graphical elements\n *\n * @param {Renderer} renderer\n * @param {Snap} snap\n */\nfunction GraphicsFactory(renderer, elementRegistry, snap) {\n this._renderer = renderer;\n this._elementRegistry = elementRegistry;\n this._snap = snap;\n}\n\nGraphicsFactory.$inject = [ 'renderer', 'elementRegistry', 'snap' ];\n\nmodule.exports = GraphicsFactory;\n\n\nGraphicsFactory.prototype._getChildren = function(element) {\n\n var gfx = this._elementRegistry.getGraphics(element);\n\n var childrenGfx;\n\n // root element\n if (!element.parent) {\n childrenGfx = gfx;\n } else {\n childrenGfx = GraphicsUtil.getChildren(gfx);\n if (!childrenGfx) {\n childrenGfx = gfx.parent().group().attr('class', 'djs-children');\n }\n }\n\n return childrenGfx;\n};\n\n/**\n * Clears the graphical representation of the element and returns the\n * cleared visual (the <g class=\"djs-visual\" /> element).\n */\nGraphicsFactory.prototype._clear = function(gfx) {\n var visual = GraphicsUtil.getVisual(gfx);\n\n Dom.clear(visual.node);\n\n return visual;\n};\n\n/**\n * Creates a gfx container for shapes and connections\n *\n * The layout is as follows:\n *\n * <g class=\"djs-group\">\n *\n * <!-- the gfx -->\n * <g class=\"djs-element djs-(shape|connection)\">\n * <g class=\"djs-visual\">\n * <!-- the renderer draws in here -->\n * </g>\n *\n * <!-- extensions (overlays, click box, ...) goes here\n * </g>\n *\n * <!-- the gfx child nodes -->\n * <g class=\"djs-children\"></g>\n * </g>\n *\n * @param {Object} parent\n * @param {String} type the type of the element, i.e. shape | connection\n */\nGraphicsFactory.prototype._createContainer = function(type, parentGfx) {\n var outerGfx = parentGfx.group().attr('class', 'djs-group'),\n gfx = outerGfx.group().attr('class', 'djs-element djs-' + type);\n\n // create visual\n gfx.group().attr('class', 'djs-visual');\n\n return gfx;\n};\n\nGraphicsFactory.prototype.create = function(type, element) {\n var childrenGfx = this._getChildren(element.parent);\n return this._createContainer(type, childrenGfx);\n};\n\n\nGraphicsFactory.prototype.updateContainments = function(elements) {\n\n var self = this,\n elementRegistry = this._elementRegistry,\n parents;\n\n\n parents = _.reduce(elements, function(map, e) {\n\n if (e.parent) {\n map[e.parent.id] = e.parent;\n }\n\n return map;\n }, {});\n\n // update all parents of changed and reorganized their children\n // in the correct order (as indicated in our model)\n _.forEach(parents, function(parent) {\n\n var childGfx = self._getChildren(parent),\n children = parent.children;\n\n if (!children) {\n return;\n }\n\n _.forEach(children.slice().reverse(), function(c) {\n var gfx = elementRegistry.getGraphics(c);\n gfx.parent().prependTo(childGfx);\n });\n });\n\n};\n\nGraphicsFactory.prototype.update = function(type, element, gfx) {\n\n var visual = this._clear(gfx);\n\n // redraw\n if (type === 'shape') {\n this._renderer.drawShape(visual, element);\n\n // update positioning\n gfx.translate(element.x, element.y);\n } else\n if (type === 'connection') {\n this._renderer.drawConnection(visual, element);\n } else {\n throw new Error('unknown type: ' + type);\n }\n\n gfx.attr('display', element.hidden ? 'none' : 'block');\n};\n\n\nGraphicsFactory.prototype.remove = function(element) {\n var gfx = this._elementRegistry.getGraphics(element);\n\n // remove\n gfx.parent().remove();\n};","module.exports = {\n __depends__: [ require(46) ],\n __init__: [ 'canvas' ],\n canvas: [ 'type', require(37) ],\n elementRegistry: [ 'type', require(39) ],\n elementFactory: [ 'type', require(38) ],\n eventBus: [ 'type', require(40) ],\n graphicsFactory: [ 'type', require(41) ]\n};","'use strict';\n\nvar Snap = require(44);\n\n\n/**\n * The default renderer used for shapes and connections.\n *\n * @param {Styles} styles\n */\nfunction Renderer(styles) {\n this.CONNECTION_STYLE = styles.style([ 'no-fill' ], { strokeWidth: 5, stroke: 'fuchsia' });\n this.SHAPE_STYLE = styles.style({ fill: 'white', stroke: 'fuchsia', strokeWidth: 2 });\n}\n\nmodule.exports = Renderer;\n\nRenderer.$inject = ['styles'];\n\n\nRenderer.prototype.drawShape = function drawShape(gfxGroup, data) {\n return gfxGroup.rect(0, 0, data.width || 0, data.height || 0, 10, 10).attr(this.SHAPE_STYLE);\n};\n\nRenderer.prototype.drawConnection = function drawConnection(gfxGroup, data) {\n return createLine(data.waypoints, this.CONNECTION_STYLE).appendTo(gfxGroup);\n};\n\n\nfunction toSVGPoints(points) {\n var result = '';\n\n for (var i = 0, p; !!(p = points[i]); i++) {\n result += p.x + ',' + p.y + ' ';\n }\n\n return result;\n}\n\nfunction createLine(points, attrs) {\n return Snap.create('polyline', { points: toSVGPoints(points) }).attr(attrs || {});\n}\n\nfunction updateLine(gfx, points) {\n return gfx.attr({ points: toSVGPoints(points) });\n}\n\nmodule.exports.createLine = createLine;\nmodule.exports.updateLine = updateLine;","var snapsvg = (window.Snap);\n\n// require snapsvg extensions\nrequire(47);\n\nmodule.exports = snapsvg;","'use strict';\n\nvar _ = (window._);\n\n\n/**\n * A component that manages shape styles\n */\nfunction Styles() {\n\n var defaultTraits = {\n\n 'no-fill': {\n fill: 'none'\n },\n 'no-border': {\n strokeOpacity: 0.0\n },\n 'no-events': {\n pointerEvents: 'none'\n }\n };\n\n /**\n * Builds a style definition from a className, a list of traits and an object of additional attributes.\n *\n * @param {String} className\n * @param {Array<String>} traits\n * @param {Object} additionalAttrs\n *\n * @return {Object} the style defintion\n */\n this.cls = function(className, traits, additionalAttrs) {\n var attrs = this.style(traits, additionalAttrs);\n\n return _.extend(attrs, { 'class': className });\n };\n\n /**\n * Builds a style definition from a list of traits and an object of additional attributes.\n *\n * @param {Array<String>} traits\n * @param {Object} additionalAttrs\n *\n * @return {Object} the style defintion\n */\n this.style = function(traits, additionalAttrs) {\n\n if (!_.isArray(traits) && !additionalAttrs) {\n additionalAttrs = traits;\n traits = [];\n }\n\n var attrs = _.inject(traits, function(attrs, t) {\n return _.extend(attrs, defaultTraits[t] || {});\n }, {});\n\n return additionalAttrs ? _.extend(attrs, additionalAttrs) : attrs;\n };\n}\n\nmodule.exports = Styles;","'use strict';\n\nmodule.exports = {\n renderer: [ 'type', require(43) ],\n snap: [ 'value', require(44) ],\n styles: [ 'type', require(45) ]\n};","'use strict';\n\nvar Snap = (window.Snap);\n\nSnap.plugin(function(Snap, Element) {\n\n /*/\n * Element.children\n [ method ]\n **\n * Returns array of all the children of the element.\n = (array) array of Elements\n /*/\n Element.prototype.children = function () {\n var out = [],\n ch = this.node.childNodes;\n for (var i = 0, ii = ch.length; i < ii; i++) {\n out[i] = new Snap(ch[i]);\n }\n return out;\n };\n});\n\n\n/**\n * @class ClassPlugin\n *\n * Extends snapsvg with methods to add and remove classes\n */\nSnap.plugin(function (Snap, Element, Paper, global) {\n\n function split(str) {\n return str.split(//s+/);\n }\n\n function join(array) {\n return array.join(' ');\n }\n\n function getClasses(e) {\n return split(e.attr('class') || '');\n }\n\n function setClasses(e, classes) {\n e.attr('class', join(classes));\n }\n\n /**\n * @method snapsvg.Element#addClass\n *\n * @example\n *\n * e.attr('class', 'selector');\n *\n * e.addClass('foo bar'); // adds classes foo and bar\n * e.attr('class'); // -> 'selector foo bar'\n *\n * e.addClass('fooBar');\n * e.attr('class'); // -> 'selector foo bar fooBar'\n *\n * @param {String} cls classes to be added to the element\n *\n * @return {snapsvg.Element} the element (this)\n */\n Element.prototype.addClass = function(cls) {\n var current = getClasses(this),\n add = split(cls),\n i, e;\n\n for (i = 0, e; !!(e = add[i]); i++) {\n if (current.indexOf(e) === -1) {\n current.push(e);\n }\n }\n\n setClasses(this, current);\n\n return this;\n };\n\n /**\n * @method snapsvg.Element#hasClass\n *\n * @param {String} cls the class to query for\n * @return {Boolean} returns true if the element has the given class\n */\n Element.prototype.hasClass = function(cls) {\n if (!cls) {\n throw new Error('[snapsvg] syntax: hasClass(clsStr)');\n }\n\n return getClasses(this).indexOf(cls) !== -1;\n };\n\n /**\n * @method snapsvg.Element#removeClass\n *\n * @example\n *\n * e.attr('class', 'foo bar');\n *\n * e.removeClass('foo');\n * e.attr('class'); // -> 'bar'\n *\n * e.removeClass('foo bar'); // removes classes foo and bar\n * e.attr('class'); // -> ''\n *\n * @param {String} cls classes to be removed from element\n *\n * @return {snapsvg.Element} the element (this)\n */\n Element.prototype.removeClass = function(cls) {\n var current = getClasses(this),\n remove = split(cls),\n i, e, idx;\n\n for (i = 0, e; !!(e = remove[i]); i++) {\n idx = current.indexOf(e);\n\n if (idx !== -1) {\n // remove element from array\n current.splice(idx, 1);\n }\n }\n\n setClasses(this, current);\n\n return this;\n };\n\n});\n\n/**\n * @class TranslatePlugin\n *\n * Extends snapsvg with methods to translate elements\n */\nSnap.plugin(function (Snap, Element, Paper, global) {\n\n /*\n * @method snapsvg.Element#translate\n *\n * @example\n *\n * e.translate(10, 20);\n *\n * // sets transform matrix to translate(10, 20)\n *\n * @param {Number} x translation\n * @param {Number} y translation\n *\n * @return {snapsvg.Element} the element (this)\n */\n Element.prototype.translate = function(x, y) {\n var matrix = new Snap.Matrix();\n matrix.translate(x, y);\n return this.transform(matrix);\n };\n});\n\n\n/**\n * @class CreatePlugin\n *\n * Create an svg element without attaching it to the dom\n */\nSnap.plugin(function(Snap) {\n\n Snap.create = function(name, attrs) {\n return Snap._.wrap(Snap._.$(name, attrs));\n };\n});\n\n\n/**\n * @class CreatSnapAtPlugin\n *\n * Extends snap.svg with a method to create a SVG element\n * at a specific position in the DOM.\n */\nSnap.plugin(function(Snap, Element, Paper, global) {\n\n /*\n * @method snapsvg.createSnapAt\n *\n * @example\n *\n * snapsvg.createSnapAt(parentNode, 200, 200);\n *\n * @param {Number} width of svg\n * @param {Number} height of svg\n * @param {Object} parentNode svg Element will be child of this\n *\n * @return {snapsvg.Element} the newly created wrapped SVG element instance\n */\n Snap.createSnapAt = function(width, height, parentNode) {\n\n var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('width', width);\n svg.setAttribute('height', height);\n if (!parentNode) {\n parentNode = document.body;\n }\n parentNode.appendChild(svg);\n\n return new Snap(svg);\n };\n});","'use strict';\n\nvar Snap = (window.Snap);\n\nvar Renderer = require(43),\n Dom = require(65),\n createLine = Renderer.createLine,\n updateLine = Renderer.updateLine;\n\n\n/**\n * A plugin that provides interaction events for diagram elements.\n *\n * It emits the following events:\n *\n * * element.hover\n * * element.out\n * * element.click\n * * element.dblclick\n * * element.mousedown\n *\n * Each event is a tuple { element, gfx, originalEvent }.\n *\n * Canceling the event via Event#preventDefault() prevents the original DOM operation.\n *\n * @param {EventBus} eventBus\n */\nfunction InteractionEvents(eventBus, elementRegistry, styles, snap) {\n\n var HIT_STYLE = styles.cls('djs-hit', [ 'no-fill', 'no-border' ], {\n stroke: 'white',\n strokeWidth: 15\n });\n\n function fire(type, event) {\n var target = Dom.closest(event.target, 'svg, .djs-element'),\n gfx = target && snap(target),\n element = elementRegistry.get(gfx),\n defaultPrevented;\n\n if (!gfx || !element) {\n return;\n }\n\n defaultPrevented = eventBus.fire(type, { element: element, gfx: gfx, originalEvent: event });\n\n if (defaultPrevented) {\n event.preventDefault();\n }\n }\n\n var handlers = {};\n\n function mouseHandler(type) {\n\n var fn = handlers[type];\n\n if (!fn) {\n fn = handlers[type] = function(event) {\n // only indicate left mouse button=0 interactions\n if (!event.button) {\n fire(type, event);\n }\n };\n }\n\n return fn;\n }\n\n\n ///// event registration\n\n function registerEvents(svg) {\n\n var node = svg.node;\n\n /**\n * An event indicating that the mouse hovered over an element\n *\n * @event element.hover\n *\n * @type {Object}\n * @property {djs.model.Base} element\n * @property {Snap<Element>} gfx\n * @property {Event} originalEvent\n */\n Dom.on(node, 'mouseover', mouseHandler('element.hover'));\n\n /**\n * An event indicating that the mouse has left an element\n *\n * @event element.out\n *\n * @type {Object}\n * @property {djs.model.Base} element\n * @property {Snap<Element>} gfx\n * @property {Event} originalEvent\n */\n Dom.on(node, 'mouseout', mouseHandler('element.out'));\n\n /**\n * An event indicating that the mouse has clicked an element\n *\n * @event element.click\n *\n * @type {Object}\n * @property {djs.model.Base} element\n * @property {Snap<Element>} gfx\n * @property {Event} originalEvent\n */\n Dom.on(node, 'click', mouseHandler('element.click'));\n\n /**\n * An event indicating that the mouse has double clicked an element\n *\n * @event element.dblclick\n *\n * @type {Object}\n * @property {djs.model.Base} element\n * @property {Snap<Element>} gfx\n * @property {Event} originalEvent\n */\n Dom.on(node, 'dblclick', mouseHandler('element.dblclick'));\n\n /**\n * An event indicating that the mouse has gone down on an element.\n *\n * @event element.mousedown\n *\n * @type {Object}\n * @property {djs.model.Base} element\n * @property {Snap<Element>} gfx\n * @property {Event} originalEvent\n */\n Dom.on(node, 'mousedown', mouseHandler('element.mousedown'));\n\n /**\n * An event indicating that the mouse has gone up on an element.\n *\n * @event element.mouseup\n *\n * @type {Object}\n * @property {djs.model.Base} element\n * @property {Snap<Element>} gfx\n * @property {Event} originalEvent\n */\n Dom.on(node, 'mouseup', mouseHandler('element.mouseup'));\n }\n\n function unregisterEvents(svg) {\n\n var node = svg.node;\n\n Dom.off(node, 'mouseover', mouseHandler('element.hover'));\n Dom.off(node, 'mouseout', mouseHandler('element.out'));\n Dom.off(node, 'click', mouseHandler('element.click'));\n Dom.off(node, 'dblclick', mouseHandler('element.dblclick'));\n Dom.off(node, 'mousedown', mouseHandler('element.mousedown'));\n Dom.off(node, 'mouseup', mouseHandler('element.mouseup'));\n }\n\n eventBus.on('canvas.destroy', function(event) {\n unregisterEvents(event.svg);\n });\n\n eventBus.on('canvas.init', function(event) {\n registerEvents(event.svg);\n });\n\n\n eventBus.on([ 'shape.added', 'connection.added' ], function(event) {\n var element = event.element,\n gfx = event.gfx,\n hit,\n type;\n\n if (element.waypoints) {\n hit = createLine(element.waypoints);\n type = 'connection';\n } else {\n hit = Snap.create('rect', { x: 0, y: 0, width: element.width, height: element.height });\n type = 'shape';\n }\n\n hit.attr(HIT_STYLE).appendTo(gfx.node);\n });\n\n // update djs-hit on change\n\n eventBus.on('shape.changed', function(event) {\n\n var element = event.element,\n gfx = event.gfx,\n hit = gfx.select('.djs-hit');\n\n hit.attr({\n width: element.width,\n height: element.height\n });\n });\n\n eventBus.on('connection.changed', function(event) {\n\n var element = event.element,\n gfx = event.gfx,\n hit = gfx.select('.djs-hit');\n\n updateLine(hit, element.waypoints);\n });\n\n\n // API\n\n this.fire = fire;\n\n this.mouseHandler = mouseHandler;\n}\n\n\nInteractionEvents.$inject = [ 'eventBus', 'elementRegistry', 'styles', 'snap' ];\n\nmodule.exports = InteractionEvents;\n","module.exports = {\n __init__: [ 'interactionEvents' ],\n interactionEvents: [ 'type', require(48) ]\n};","'use strict';\n\nvar Snap = (window.Snap);\nvar getBBox = require(66).getBBox;\n\n\n/**\n * @class\n *\n * A plugin that adds an outline to shapes and connections that may be activated and styled\n * via CSS classes.\n *\n * @param {EventBus} events the event bus\n */\nfunction Outline(eventBus, styles, elementRegistry) {\n\n var OUTLINE_OFFSET = 6;\n\n var OUTLINE_STYLE = styles.cls('djs-outline', [ 'no-fill' ]);\n\n function createOutline(gfx, bounds) {\n return Snap.create('rect', OUTLINE_STYLE).prependTo(gfx);\n }\n\n function updateShapeOutline(outline, bounds) {\n\n outline.attr({\n x: -OUTLINE_OFFSET,\n y: -OUTLINE_OFFSET,\n width: bounds.width + OUTLINE_OFFSET * 2,\n height: bounds.height + OUTLINE_OFFSET * 2\n });\n }\n\n function updateConnectionOutline(outline, connection) {\n\n var bbox = getBBox(connection);\n\n outline.attr({\n x: bbox.x - OUTLINE_OFFSET,\n y: bbox.y - OUTLINE_OFFSET,\n width: bbox.width + OUTLINE_OFFSET * 2,\n height: bbox.height + OUTLINE_OFFSET * 2\n });\n }\n\n eventBus.on([ 'shape.added', 'shape.changed' ], function(event) {\n var element = event.element,\n gfx = event.gfx;\n\n var outline = gfx.select('.djs-outline');\n\n if (!outline) {\n outline = createOutline(gfx, element);\n }\n\n updateShapeOutline(outline, element);\n });\n\n eventBus.on([ 'connection.added', 'connection.changed' ], function(event) {\n var element = event.element,\n gfx = event.gfx;\n\n var outline = gfx.select('.djs-outline');\n\n if (!outline) {\n outline = createOutline(gfx, element);\n }\n\n updateConnectionOutline(outline, element);\n });\n\n\n}\n\n\nOutline.$inject = ['eventBus', 'styles', 'elementRegistry'];\n\nmodule.exports = Outline;\n","'use strict';\n\nmodule.exports = {\n __init__: [ 'outline' ],\n outline: [ 'type', require(50) ]\n};","'use strict';\n\nvar _ = (window._),\n $ = (window.$),\n getBBox = require(66).getBBox;\n\n// document wide unique overlay ids\nvar ids = new (require(69))('ov');\n\n\n/**\n * A plugin that allows users to attach overlays to diagram elements.\n *\n * The overlay service will take care of overlay positioning during updates.\n *\n * @class\n *\n * @example\n *\n * // add a pink badge on the top left of the shape\n * overlays.add(someShape, {\n * position: {\n * top: -5,\n * left: -5\n * }\n * html: '<div style=\"width: 10px; background: fuchsia; color: white;\">0</div>'\n * });\n *\n * // or add via shape id\n *\n * overlays.add('some-element-id', {\n * position: {\n * top: -5,\n * left: -5\n * }\n * html: '<div style=\"width: 10px; background: fuchsia; color: white;\">0</div>'\n * });\n *\n * // or add with optional type\n *\n * overlays.add(someShape, 'badge', {\n * position: {\n * top: -5,\n * left: -5\n * }\n * html: '<div style=\"width: 10px; background: fuchsia; color: white;\">0</div>'\n * });\n *\n *\n * // remove an overlay\n *\n * var id = overlays.add(...);\n * overlays.remove(id);\n *\n * @param {EventBus} eventBus\n * @param {Canvas} canvas\n * @param {ElementRegistry} elementRegistry\n */\nfunction Overlays(config, eventBus, canvas, elementRegistry) {\n\n this._eventBus = eventBus;\n this._canvas = canvas;\n this._elementRegistry = elementRegistry;\n\n this._ids = ids;\n\n this._overlayDefaults = {\n show: {\n trigger: 'automatic',\n minZoom: 0.7,\n maxZoom: 5.0\n }\n };\n\n /**\n * Mapping overlay-id > overlay\n */\n this._overlays = {};\n\n /**\n * Mapping element-id > overlay container\n */\n this._overlayContainers = {};\n\n // root html element for all overlays\n this._overlayRoot = $('<div class=\"djs-overlay-container\" />')\n .css({ position: 'absolute', width: 0, height: 0 })\n .prependTo(canvas.getContainer());\n\n this._init(config);\n}\n\n\nOverlays.$inject = [ 'config.overlays', 'eventBus', 'canvas', 'elementRegistry' ];\n\nmodule.exports = Overlays;\n\n\n/**\n * Returns the overlay with the specified id or a list of overlays\n * for an element with a given type.\n *\n * @example\n *\n * // return the single overlay with the given id\n * overlays.get('some-id');\n *\n * // return all overlays for the shape\n * overlays.get({ element: someShape });\n *\n * // return all overlays on shape with type 'badge'\n * overlays.get({ element: someShape, type: 'badge' });\n *\n * // shape can also be specified as id\n * overlays.get({ element: 'element-id', type: 'badge' });\n *\n *\n * @param {Object} filter\n * @param {String} [filter.id]\n * @param {String|djs.model.Base} [filter.element]\n * @param {String} [filter.type]\n *\n * @return {Object|Array<Object>} the overlay(s)\n */\nOverlays.prototype.get = function(filter) {\n\n if (_.isString(filter)) {\n filter = { id: filter };\n }\n\n if (filter.element) {\n var container = this._getOverlayContainer(filter.element, true);\n\n // return a list of overlays when filtering by element (+type)\n if (container) {\n return filter.type ? _.filter(container.overlays, { type: filter.type }) : _.clone(container.overlays);\n } else {\n return [];\n }\n } else\n if (filter.type) {\n return _.filter(this._overlays, { type: filter.type });\n } else {\n // return single element when filtering by id\n return filter.id ? this._overlays[filter.id] : null;\n }\n};\n\n/**\n * Adds a HTML overlay to an element.\n *\n * @param {String|djs.model.Base} element attach overlay to this shape\n * @param {String} [type] optional type to assign to the overlay\n * @param {Object} overlay the overlay configuration\n *\n * @param {String|DOMElement} overlay.html html element to use as an overlay\n * @param {Object} [overlay.show] show configuration\n * @param {Number} overlay.show.minZoom minimal zoom level to show the overlay\n * @param {Number} overlay.show.maxZoom maximum zoom level to show the overlay\n * @param {String} [overlay.show.trigger=automatic] automatic or manual (user triggers show)\n * @param {Object} overlay.show.position where to attach the overlay\n * @param {Number} [overlay.show.position.left] relative to element bbox left attachment\n * @param {Number} [overlay.show.position.top] relative to element bbox top attachment\n * @param {Number} [overlay.show.position.bottom] relative to element bbox bottom attachment\n * @param {Number} [overlay.show.position.right] relative to element bbox right attachment\n *\n * @return {String} id that may be used to reference the overlay for update or removal\n */\nOverlays.prototype.add = function(element, type, overlay) {\n\n if (_.isObject(type)) {\n overlay = type;\n type = null;\n }\n\n if (!element.id) {\n element = this._elementRegistry.get(element);\n }\n\n if (!overlay.position) {\n throw new Error('must specifiy overlay position');\n }\n\n if (!overlay.html) {\n throw new Error('must specifiy overlay html');\n }\n\n if (!element) {\n throw new Error('invalid element specified');\n }\n\n var id = this._ids.next();\n\n overlay = _.extend({}, this._overlayDefaults, overlay, {\n id: id,\n type: type,\n element: element,\n html: $(overlay.html)\n });\n\n this._addOverlay(overlay);\n\n return id;\n};\n\n\n/**\n * Remove an overlay with the given id or all overlays matching the given filter.\n *\n * @see Overlays#get for filter options.\n *\n * @param {String} [id]\n * @param {Object} [filter]\n */\nOverlays.prototype.remove = function(filter) {\n\n var overlays = this.get(filter) || [];\n\n if (!_.isArray(overlays)) {\n overlays = [ overlays ];\n }\n\n var self = this;\n\n _.forEach(overlays, function(overlay) {\n\n var container = self._getOverlayContainer(overlay.element, true);\n\n if (overlay) {\n overlay.html.remove();\n overlay.htmlContainer.remove();\n\n delete overlay.htmlContainer;\n delete overlay.element;\n\n delete self._overlays[overlay.id];\n }\n\n if (container) {\n var idx = container.overlays.indexOf(overlay);\n if (idx !== -1) {\n container.overlays.splice(idx, 1);\n }\n }\n });\n\n};\n\n\nOverlays.prototype.show = function() {\n this._overlayRoot.show();\n};\n\n\nOverlays.prototype.hide = function() {\n this._overlayRoot.hide();\n};\n\n\nOverlays.prototype._updateOverlayContainer = function(container) {\n var element = container.element,\n html = container.html;\n\n // update container left,top according to the elements x,y coordinates\n // this ensures we can attach child elements relative to this container\n\n var x = element.x,\n y = element.y;\n\n if (element.waypoints) {\n var bbox = getBBox(element);\n x = bbox.x;\n y = bbox.y;\n }\n\n html.css({ left: x, top: y });\n};\n\n\nOverlays.prototype._updateOverlay = function(overlay) {\n\n var position = overlay.position,\n htmlContainer = overlay.htmlContainer,\n element = overlay.element;\n\n // update overlay html relative to shape because\n // it is already positioned on the element\n\n // update relative\n var left = position.left,\n top = position.top;\n\n if (position.right !== undefined) {\n\n var width;\n\n if (element.waypoints) {\n width = getBBox(element).width;\n } else {\n width = element.width;\n }\n\n left = position.right * -1 + width;\n }\n\n if (position.bottom !== undefined) {\n\n var height;\n\n if (element.waypoints) {\n height = getBBox(element).height;\n } else {\n height = element.height;\n }\n\n top = position.bottom * -1 + height;\n }\n\n htmlContainer.css({ left: left || 0, top: top || 0 });\n};\n\n\nOverlays.prototype._createOverlayContainer = function(element) {\n var html = $('<div />')\n .addClass('djs-overlays')\n .addClass('djs-overlays-' + element.id)\n .css({ position: 'absolute' });\n\n html.appendTo(this._overlayRoot);\n\n var container = {\n html: html,\n element: element,\n overlays: []\n };\n\n this._updateOverlayContainer(container);\n\n return container;\n};\n\n\nOverlays.prototype._updateRoot = function(viewbox) {\n var a = viewbox.scale || 1;\n var d = viewbox.scale || 1;\n\n var matrix = 'matrix(' + a + ',0,0,' + d + ',' + (-1 * viewbox.x * a) + ',' + (-1 * viewbox.y * d) + ')';\n\n this._overlayRoot.css('transform', matrix);\n};\n\n\nOverlays.prototype._getOverlayContainer = function(element, raw) {\n var id = (element && element.id) || element;\n\n var container = this._overlayContainers[id];\n if (!container && !raw) {\n container = this._overlayContainers[id] = this._createOverlayContainer(element);\n }\n\n return container;\n};\n\n\nOverlays.prototype._addOverlay = function(overlay) {\n\n var id = overlay.id,\n element = overlay.element;\n\n var container = this._getOverlayContainer(element);\n\n var htmlContainer = $('<div>', {\n id: id,\n 'class': 'djs-overlay'\n }).css({ position: 'absolute' }).append(overlay.html);\n\n if (overlay.type) {\n htmlContainer.addClass('djs-overlay-' + overlay.type);\n }\n\n overlay.htmlContainer = htmlContainer;\n\n container.overlays.push(overlay);\n container.html.append(htmlContainer);\n\n this._overlays[id] = overlay;\n\n this._updateOverlay(overlay);\n};\n\nOverlays.prototype._updateOverlayVisibilty = function(viewbox) {\n\n _.forEach(this._overlays, function(overlay) {\n if (overlay.show) {\n if (overlay.show.minZoom > viewbox.scale ||\n overlay.show.maxZoom < viewbox.scale) {\n overlay.htmlContainer.hide();\n } else {\n overlay.htmlContainer.show();\n }\n }\n });\n};\n\nOverlays.prototype._init = function(config) {\n\n var eventBus = this._eventBus;\n\n var self = this;\n\n\n // scroll/zoom integration\n\n var updateViewbox = function(viewbox) {\n self._updateRoot(viewbox);\n self._updateOverlayVisibilty(viewbox);\n\n self.show();\n };\n\n if (!config || config.deferUpdate !== false) {\n updateViewbox = _.debounce(updateViewbox, 300);\n }\n\n eventBus.on('canvas.viewbox.changed', function(event) {\n self.hide();\n updateViewbox(event.viewbox);\n });\n\n\n // remove integration\n\n eventBus.on([ 'shape.remove', 'connection.remove' ], function(e) {\n var overlays = self.get({ element: e.element });\n\n _.forEach(overlays, function(o) {\n self.remove(o.id);\n });\n });\n\n\n // move integration\n\n eventBus.on([\n 'element.changed'\n ], function(e) {\n var element = e.element;\n\n var container = self._getOverlayContainer(element, true);\n\n if (container) {\n _.forEach(container.overlays, function(overlay) {\n self._updateOverlay(overlay);\n });\n\n self._updateOverlayContainer(container);\n }\n\n });\n\n\n // marker integration, simply add them on the overlays as classes, too.\n\n eventBus.on('element.marker.update', function(e) {\n var container = self._getOverlayContainer(e.element, true);\n if (container) {\n container.html[e.add ? 'addClass' : 'removeClass'](e.marker);\n }\n });\n};\n","'use strict';\n\nmodule.exports = {\n __init__: [ 'overlays' ],\n overlays: [ 'type', require(52) ]\n};","'use strict';\n\nvar _ = (window._);\n\n\n/**\n * A service that offers the current selection in a diagram.\n * Offers the api to control the selection, too.\n *\n * @class\n *\n * @param {EventBus} eventBus the event bus\n */\nfunction Selection(eventBus) {\n\n this._eventBus = eventBus;\n\n this._selectedElements = [];\n\n var self = this;\n\n eventBus.on([ 'shape.remove', 'connection.remove' ], function(e) {\n var element = e.element;\n self.deselect(element);\n });\n}\n\nSelection.$inject = [ 'eventBus' ];\n\nmodule.exports = Selection;\n\n\nSelection.prototype.deselect = function(element) {\n var selectedElements = this._selectedElements;\n\n var idx = selectedElements.indexOf(element);\n\n if (idx !== -1) {\n var oldSelection = selectedElements.slice();\n\n selectedElements.splice(idx, 1);\n\n this._eventBus.fire('selection.changed', { oldSelection: oldSelection, newSelection: selectedElements });\n }\n};\n\n\nSelection.prototype.get = function() {\n return this._selectedElements;\n};\n\nSelection.prototype.isSelected = function(element) {\n return this._selectedElements.indexOf(element) !== -1;\n};\n\n\n/**\n * This method selects one or more elements on the diagram.\n *\n * By passing an additional add parameter you can decide whether or not the element(s)\n * should be added to the already existing selection or not.\n *\n * @method Selection#select\n *\n * @param {Object|Object[]} elements element or array of elements to be selected\n * @param {boolean} [add] whether the element(s) should be appended to the current selection, defaults to false\n */\nSelection.prototype.select = function(elements, add) {\n var selectedElements = this._selectedElements,\n oldSelection = selectedElements.slice();\n\n if (!_.isArray(elements)) {\n elements = elements ? [ elements ] : [];\n }\n\n // selection may be cleared by passing an empty array or null\n // to the method\n if (add) {\n _.forEach(elements, function(element) {\n if (selectedElements.indexOf(element) !== -1) {\n // already selected\n return;\n } else {\n selectedElements.push(element);\n }\n });\n } else {\n this._selectedElements = selectedElements = elements.slice();\n }\n this._eventBus.fire('selection.changed', { oldSelection: oldSelection, newSelection: selectedElements });\n};\n","'use strict';\n\n\nvar getOriginalEvent = require(67).getOriginal;\n\nfunction SelectionBehavior(eventBus, selection, canvas) {\n\n eventBus.on('create.end', 500, function(e) {\n if (e.context.canExecute) {\n selection.select(e.shape);\n }\n });\n\n eventBus.on('connect.end', 500, function(e) {\n if (e.context.canExecute && e.context.target) {\n selection.select(e.context.target);\n }\n });\n\n eventBus.on('shape.move.end', 500, function(e) {\n selection.select(e.context.shapes);\n });\n\n\n // Shift + click selection\n eventBus.on('element.click', function(event) {\n\n var element = event.element;\n\n // do not select the root element\n // or connections\n if (element === canvas.getRootElement()) {\n element = null;\n }\n\n if (!selection.isSelected(element)) {\n var ev = (getOriginalEvent(event) || event);\n var add = ev.shiftKey;\n\n if (!ev.altKey) {\n selection.select(element, add);\n }\n } else {\n selection.deselect(element);\n }\n });\n}\n\nSelectionBehavior.$inject = [ 'eventBus', 'selection', 'canvas' ];\n\nmodule.exports = SelectionBehavior;\n","'use strict';\n\nvar _ = (window._);\n\nvar MARKER_HOVER = 'hover',\n MARKER_SELECTED = 'selected';\n\n/**\n * A plugin that adds a visible selection UI to shapes and connections\n * by appending the <code>hover</code> and <code>selected</code> classes to them.\n *\n * @class\n *\n * Makes elements selectable, too.\n *\n * @param {EventBus} events\n * @param {SelectionService} selection\n * @param {Canvas} canvas\n */\nfunction SelectionVisuals(events, canvas, selection, graphicsFactory, styles) {\n\n this._multiSelectionBox = null;\n\n function addMarker(e, cls) {\n canvas.addMarker(e, cls);\n }\n\n function removeMarker(e, cls) {\n canvas.removeMarker(e, cls);\n }\n\n events.on('element.hover', function(event) {\n addMarker(event.element, MARKER_HOVER);\n });\n\n events.on('element.out', function(event) {\n removeMarker(event.element, MARKER_HOVER);\n });\n\n events.on('selection.changed', function(event) {\n\n function deselect(s) {\n removeMarker(s, MARKER_SELECTED);\n }\n\n function select(s) {\n addMarker(s, MARKER_SELECTED);\n }\n\n var oldSelection = event.oldSelection,\n newSelection = event.newSelection;\n\n _.forEach(oldSelection, function(e) {\n if (newSelection.indexOf(e) === -1) {\n deselect(e);\n }\n });\n\n _.forEach(newSelection, function(e) {\n if (oldSelection.indexOf(e) === -1) {\n select(e);\n }\n });\n });\n}\n\nSelectionVisuals.$inject = [\n 'eventBus',\n 'canvas',\n 'selection',\n 'graphicsFactory',\n 'styles'\n];\n\nmodule.exports = SelectionVisuals;\n","'use strict';\n\nmodule.exports = {\n __init__: [ 'selectionVisuals', 'selectionBehavior' ],\n __depends__: [\n require(49),\n require(51)\n ],\n selection: [ 'type', require(54) ],\n selectionVisuals: [ 'type', require(56) ],\n selectionBehavior: [ 'type', require(55) ]\n};\n","'use strict';\n\nvar _ = (window._);\n\nvar Refs = require(75);\n\nvar parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),\n labelRefs = new Refs({ name: 'label', enumerable: true }, { name: 'labelTarget' }),\n outgoingRefs = new Refs({ name: 'outgoing', collection: true }, { name: 'source' }),\n incomingRefs = new Refs({ name: 'incoming', collection: true }, { name: 'target' });\n\n/**\n * @namespace djs.model\n */\n\n/**\n * @memberOf djs.model\n */\n\n/**\n * The basic graphical representation\n *\n * @class\n *\n * @abstract\n */\nfunction Base() {\n\n /**\n * The object that backs up the shape\n *\n * @name Base#businessObject\n * @type Object\n */\n Object.defineProperty(this, 'businessObject', {\n writable: true\n });\n\n /**\n * The parent shape\n *\n * @name Base#parent\n * @type Shape\n */\n parentRefs.bind(this, 'parent');\n\n /**\n * @name Base#label\n * @type Label\n */\n labelRefs.bind(this, 'label');\n\n /**\n * The list of outgoing connections\n *\n * @name Base#outgoing\n * @type Array<Connection>\n */\n outgoingRefs.bind(this, 'outgoing');\n\n /**\n * The list of outgoing connections\n *\n * @name Base#incoming\n * @type Array<Connection>\n */\n incomingRefs.bind(this, 'incoming');\n}\n\n\n/**\n * A graphical object\n *\n * @class\n * @constructor\n *\n * @extends Base\n */\nfunction Shape() {\n Base.call(this);\n\n /**\n * The list of children\n *\n * @name Shape#children\n * @type Array<Base>\n */\n parentRefs.bind(this, 'children');\n}\n\nShape.prototype = Object.create(Base.prototype);\n\n\n/**\n * A root graphical object\n *\n * @class\n * @constructor\n *\n * @extends Shape\n */\nfunction Root() {\n Shape.call(this);\n}\n\nRoot.prototype = Object.create(Shape.prototype);\n\n\n/**\n * A label for an element\n *\n * @class\n * @constructor\n *\n * @extends Shape\n */\nfunction Label() {\n Shape.call(this);\n\n /**\n * The labeled element\n *\n * @name Label#labelTarget\n * @type Base\n */\n labelRefs.bind(this, 'labelTarget');\n}\n\nLabel.prototype = Object.create(Shape.prototype);\n\n\n/**\n * A connection between two elements\n *\n * @class\n * @constructor\n *\n * @extends Base\n */\nfunction Connection() {\n Base.call(this);\n\n /**\n * The element this connection originates from\n *\n * @name Connection#source\n * @type Base\n */\n outgoingRefs.bind(this, 'source');\n\n /**\n * The element this connection points to\n *\n * @name Connection#target\n * @type Base\n */\n incomingRefs.bind(this, 'target');\n}\n\nConnection.prototype = Object.create(Base.prototype);\n\n\nvar types = {\n connection: Connection,\n shape: Shape,\n label: Label,\n root: Root\n};\n\n/**\n * Creates a new model element of the specified type\n *\n * @method create\n *\n * @example\n *\n * var shape1 = Model.create('shape', { x: 10, y: 10, width: 100, height: 100 });\n * var shape2 = Model.create('shape', { x: 210, y: 210, width: 100, height: 100 });\n *\n * var connection = Model.create('connection', { waypoints: [ { x: 110, y: 55 }, {x: 210, y: 55 } ] });\n *\n * @param {String} type lower-cased model name\n * @param {Object} attrs attributes to initialize the new model instance with\n *\n * @return {Base} the new model instance\n */\nmodule.exports.create = function(type, attrs) {\n var Type = types[type];\n if (!Type) {\n throw new Error('unknown type: <' + type + '>');\n }\n return _.extend(new Type(), attrs);\n};\n\n\nmodule.exports.Base = Base;\nmodule.exports.Root = Root;\nmodule.exports.Shape = Shape;\nmodule.exports.Connection = Connection;\nmodule.exports.Label = Label;","var Cursor = require(64),\n Dom = require(65),\n Event = require(67);\n\nfunction substract(p1, p2) {\n return {\n x: p1.x - p2.x,\n y: p1.y - p2.y\n };\n}\n\nfunction length(point) {\n return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2));\n}\n\n\nvar THRESHOLD = 15;\n\n\nfunction MoveCanvas(eventBus, canvas) {\n\n var container = canvas._container,\n context;\n\n\n function handleMove(event) {\n\n var start = context.start,\n position = Event.toPoint(event),\n delta = substract(position, start);\n\n if (!context.dragging && length(delta) > THRESHOLD) {\n context.dragging = true;\n\n Cursor.set('move');\n }\n\n if (context.dragging) {\n\n var lastPosition = context.last || context.start;\n\n delta = substract(position, lastPosition);\n\n canvas.scroll({\n dx: delta.x,\n dy: delta.y\n });\n\n context.last = position;\n }\n\n // prevent select\n event.preventDefault();\n }\n\n\n function handleEnd(event) {\n Dom.off(document, 'mousemove', handleMove);\n Dom.off(document, 'mouseup', handleEnd);\n\n context = null;\n\n Cursor.unset();\n\n // prevent select\n Event.stopEvent(event);\n }\n\n function handleStart(event) {\n\n // reject non-left mouse button drags\n // left = 0\n // left click + alt pressed is reserved for other use\n if (event.button || event.altKey) {\n return;\n }\n\n context = {\n start: Event.toPoint(event)\n };\n\n Dom.on(document, 'mousemove', handleMove);\n Dom.on(document, 'mouseup', handleEnd);\n\n // prevent select\n Event.stopEvent(event);\n }\n\n Dom.on(container, 'mousedown', handleStart);\n}\n\n\nMoveCanvas.$inject = [ 'eventBus', 'canvas' ];\n\nmodule.exports = MoveCanvas;\n","module.exports = {\n __init__: [ 'moveCanvas' ],\n moveCanvas: [ 'type', require(59) ]\n};","'use strict';\n\nvar $ = (window.$);\n\nvar mousewheel = (window.$);\nif (mousewheel !== $ && !$.mousewheel) { mousewheel($); }\n\n\nfunction ZoomScroll(events, canvas) {\n\n var RANGE = { min: 0.2, max: 4 };\n\n var ZOOM_OFFSET = 5;\n var SCROLL_OFFSET = 50;\n\n function cap(scale) {\n return Math.max(RANGE.min, Math.min(RANGE.max, scale));\n }\n\n function reset() {\n canvas.zoom('fit-viewport');\n }\n\n function zoom(direction, position) {\n\n var currentZoom = canvas.zoom();\n var factor = 1 + (direction / ZOOM_OFFSET);\n\n canvas.zoom(cap(currentZoom * factor), position);\n }\n\n\n function init(element) {\n\n $(element).on('mousewheel', function(event) {\n\n var shift = event.shiftKey,\n ctrl = event.ctrlKey;\n\n var x = event.deltaX,\n y = event.deltaY;\n\n if (shift || ctrl) {\n var delta = {};\n\n if (ctrl) {\n delta.dx = SCROLL_OFFSET * x;\n } else {\n delta.dy = SCROLL_OFFSET * x;\n }\n\n canvas.scroll(delta);\n } else {\n var offset = {};\n\n // Gecko Browser should use _offsetX\n if(!event.originalEvent.offsetX) {\n offset = {\n x: event.originalEvent.layerX,\n y: event.originalEvent.layerY\n };\n } else {\n offset = {\n x: event.offsetX,\n y: event.offsetY\n };\n }\n\n // zoom in relative to diagram {x,y} coordinates\n zoom(y, offset);\n }\n\n event.preventDefault();\n });\n }\n\n events.on('canvas.init', function(e) {\n init(e.svg.node);\n });\n\n // API\n this.zoom = zoom;\n this.reset = reset;\n}\n\n\nZoomScroll.$inject = [ 'eventBus', 'canvas' ];\n\nmodule.exports = ZoomScroll;\n\n","module.exports = {\n __init__: [ 'zoomScroll' ],\n zoomScroll: [ 'type', require(61) ]\n};","'use strict';\n\n/**\n * Failsafe remove an element from a collection\n *\n * @param {Array<Object>} [collection]\n * @param {Object} [element]\n *\n * @return {Object} the element that got removed or undefined\n */\nmodule.exports.remove = function(collection, element) {\n\n if (!collection || !element) {\n return;\n }\n\n var idx = collection.indexOf(element);\n if (idx === -1) {\n return;\n }\n\n collection.splice(idx, 1);\n\n return element;\n};\n\n/**\n * Fail save add an element to the given connection, ensuring\n * it does not yet exist.\n *\n * @param {Array<Object>} collection\n * @param {Object} element\n * @param {Number} idx\n */\nmodule.exports.add = function(collection, element, idx) {\n\n if (!collection || !element) {\n return;\n }\n\n if (isNaN(idx)) {\n idx = -1;\n }\n\n var currentIdx = collection.indexOf(element);\n\n if (currentIdx !== -1) {\n\n if (currentIdx === idx) {\n // nothing to do, position has not changed\n return;\n } else {\n\n if (idx !== -1) {\n // remove from current position\n collection.splice(currentIdx, 1);\n } else {\n // already exists in collection\n return;\n }\n }\n }\n\n if (idx !== -1) {\n // insert at specified position\n collection.splice(idx, 0, element);\n } else {\n // push to end\n collection.push(element);\n }\n};\n\n\n/**\n * Fail get the index of an element in a collection.\n *\n * @param {Array<Object>} collection\n * @param {Object} element\n *\n * @return {Number} the index or -1 if collection or element do\n * not exist or the element is not contained.\n */\nmodule.exports.indexOf = function(collection, element) {\n\n if (!collection || !element) {\n return -1;\n }\n\n return collection.indexOf(element);\n};\n","'use strict';\n\nvar _ = (window._);\n\nvar CURSOR_CLS_PATTERN = /^djs-cursor-.*$/;\n\n\nmodule.exports.set = function(mode) {\n var classList = document.body.classList;\n\n _.forEach(_.clone(classList), function(cls) {\n if (CURSOR_CLS_PATTERN.test(cls)) {\n classList.remove(cls);\n }\n });\n\n if (mode) {\n classList.add('djs-cursor-' + mode);\n }\n};\n\nmodule.exports.unset = function() {\n this.set(null);\n};","\nvar elementProto = Element.prototype;\n\n// TODO(nre): remove if we drop support for PhantomJS 1.9\n\nvar matchPolyfill = function(selector) {\n\n var element = this;\n var matches = (element.document || element.ownerDocument).querySelectorAll(selector);\n var i = 0;\n\n while (matches[i] && matches[i] !== element) {\n i++;\n }\n\n return matches[i] ? true : false;\n};\n\n\nvar matchFn = elementProto.matches ||\n elementProto.mozMatchesSelector ||\n elementProto.webkitMatchesSelecor ||\n elementProto.msMatchesSelector || matchPolyfill;\n\n\n/**\n * Returns true if an element matches the given selector\n *\n * @param {Element} element\n * @param {String} selector\n *\n * @return {Boolean}\n */\nfunction matches(element, selector) {\n return matchFn.call(element, selector);\n}\n\nmodule.exports.matches = matches;\n\n\n/**\n * Gets the closest parent node of the element matching the given selector\n *\n * @param {Element} element\n * @param {String} selector\n *\n * @return {Element} the matching parent\n */\nfunction closest(element, selector) {\n while (element) {\n if (element instanceof Element) {\n if (matches(element, selector)) {\n return element;\n } else {\n element = element.parentNode;\n }\n } else {\n break;\n }\n }\n\n return null;\n}\n\nmodule.exports.closest = closest;\n\n\nfunction clear(element) {\n while (element.childNodes.length) {\n element.removeChild(element.childNodes[0]);\n }\n}\n\nmodule.exports.clear = clear;\n\n\nfunction on(element, type, fn, useCapture) {\n element.addEventListener(type, fn, useCapture || false);\n}\n\nmodule.exports.on = on;\n\n\nfunction off(element, type, fn, useCapture) {\n element.removeEventListener(type, fn, useCapture || false);\n}\n\nmodule.exports.off = off;\n\nfunction once(element, type, fn, useCapture) {\n\n var wrappedFn = function(e) {\n fn(e);\n\n off(element, type, wrappedFn, useCapture);\n };\n\n on(element, type, wrappedFn, useCapture);\n}\n\nmodule.exports.once = once;","var _ = (window._);\n\n/**\n * Adds an element to a collection and returns true if the\n * element was added.\n *\n * @param {Array<Object>} elements\n * @param {Object} e\n * @param {Boolean} unique\n */\nfunction add(elements, e, unique) {\n var canAdd = !unique || elements.indexOf(e) === -1;\n\n if (canAdd) {\n elements.push(e);\n }\n\n return canAdd;\n}\n\nfunction eachElement(elements, fn, depth) {\n\n depth = depth || 0;\n\n _.forEach(elements, function(s, i) {\n var filter = fn(s, i, depth);\n\n if (_.isArray(filter) && filter.length) {\n eachElement(filter, fn, depth + 1);\n }\n });\n}\n\n/**\n * Collects self + child elements up to a given depth from a list of elements.\n *\n * @param {Array<djs.model.Base>} elements the elements to select the children from\n * @param {Boolean} unique whether to return a unique result set (no duplicates)\n * @param {Number} maxDepth the depth to search through or -1 for infinite\n *\n * @return {Array<djs.model.Base>} found elements\n */\nfunction selfAndChildren(elements, unique, maxDepth) {\n var result = [],\n processedChildren = [];\n\n eachElement(elements, function(element, i, depth) {\n add(result, element, unique);\n\n var children = element.children;\n\n // max traversal depth not reached yet\n if (maxDepth === -1 || depth < maxDepth) {\n\n // children exist && children not yet processed\n if (children && add(processedChildren, children, unique)) {\n return children;\n }\n }\n });\n\n return result;\n}\n\n/**\n * Return self + direct children for a number of elements\n *\n * @param {Array<djs.model.Base>} elements to query\n * @param {Boolean} allowDuplicates to allow duplicates in the result set\n *\n * @return {Array<djs.model.Base>} the collected elements\n */\nfunction selfAndDirectChildren(elements, allowDuplicates) {\n return selfAndChildren(elements, !allowDuplicates, 1);\n}\n\n/**\n * Return self + ALL children for a number of elements\n *\n * @param {Array<djs.model.Base>} elements to query\n * @param {Boolean} allowDuplicates to allow duplicates in the result set\n *\n * @return {Array<djs.model.Base>} the collected elements\n */\nfunction selfAndAllChildren(elements, allowDuplicates) {\n return selfAndChildren(elements, !allowDuplicates, -1);\n}\n\n/**\n * Gets the the closure fo all selected elements,\n * their connections and\n *\n * @param {Array<djs.model.Base>} elements\n * @return {Object} enclosure\n */\nfunction getClosure(elements) {\n\n // original elements passed to this function\n var topLevel = _.groupBy(elements, function(e) { return e.id; });\n\n var allShapes = {},\n allConnections = {},\n enclosedElements = {},\n enclosedConnections = {};\n\n function handleConnection(c) {\n if (topLevel[c.source.id] && topLevel[c.target.id]) {\n topLevel[c.id] = c;\n }\n\n // not enclosed as a child, but maybe logically\n // (connecting two moved elements?)\n if (allShapes[c.source.id] && allShapes[c.target.id]) {\n enclosedConnections[c.id] = enclosedElements[c.id] = c;\n }\n\n allConnections[c.id] = c;\n }\n\n function handleElement(element) {\n\n enclosedElements[element.id] = element;\n\n if (element.waypoints) {\n // remember connection\n enclosedConnections[element.id] = allConnections[element.id] = element;\n } else {\n // remember shape\n allShapes[element.id] = element;\n\n // remember all connections\n _.forEach(element.incoming, handleConnection);\n\n _.forEach(element.outgoing, handleConnection);\n\n // recurse into children\n return element.children;\n }\n }\n\n eachElement(elements, handleElement);\n\n return {\n allShapes: allShapes,\n allConnections: allConnections,\n topLevel: topLevel,\n enclosedConnections: enclosedConnections,\n enclosedElements: enclosedElements\n };\n}\n\n/**\n * Returns the surrounding bbox for all elements in the array or the element primitive.\n */\nfunction getBBox(elements, stopRecursion) {\n\n stopRecursion = !!stopRecursion;\n if (!_.isArray(elements)) {\n elements = [elements];\n }\n\n var minX,\n minY,\n maxX,\n maxY;\n\n _.forEach(elements, function(element) {\n\n // If element is a connection the bbox must be computed first\n var bbox = element;\n if (element.waypoints && !stopRecursion) {\n bbox = getBBox(element.waypoints, true);\n }\n\n var x = bbox.x,\n y = bbox.y,\n height = bbox.height || 0,\n width = bbox.width || 0;\n\n if (x < minX || minX === undefined) {\n minX = x;\n }\n if (y < minY || minY === undefined) {\n minY = y;\n }\n\n if ((x + width) > maxX || maxX === undefined) {\n maxX = x + width;\n }\n if ((y + height) > maxY || maxY === undefined) {\n maxY = y + height;\n }\n });\n\n return {\n x: minX,\n y: minY,\n height: maxY - minY,\n width: maxX - minX\n };\n}\n\n\n/**\n * Returns all elements that are enclosed from the bounding box.\n *\n * @param {Array<Object>} elements List of Elements to search through\n * @param {Object} bbox the enclosing bbox.\n * <ul>\n * <li>If bbox.(width|height) is not specified\n * the method returns all elements with element.x/y > bbox.x/y\n * </li>\n * <li>If only bbox.x or bbox.y is specified, method return all elements with\n * e.x > bbox.x or e.y > bbox.y.</li>\n * </ul>\n *\n */\nfunction getEnclosedElements(elements, bbox) {\n\n var filteredElements = {};\n\n _.forEach(elements, function(element) {\n\n var e = element;\n\n if (e.waypoints) {\n e = getBBox(e);\n }\n\n if (!_.isNumber(bbox.y) && (e.x > bbox.x)) {\n filteredElements[element.id] = element;\n }\n if (!_.isNumber(bbox.x) && (e.y > bbox.y)) {\n filteredElements[element.id] = element;\n }\n if (e.x > bbox.x && e.y > bbox.y) {\n if (_.isNumber(bbox.width) && _.isNumber(bbox.height) &&\n e.width + e.x < bbox.width + bbox.x &&\n e.height + e.y < bbox.height + bbox.y) {\n\n filteredElements[element.id] = element;\n } else if (!_.isNumber(bbox.width) || !_.isNumber(bbox.height)) {\n filteredElements[element.id] = element;\n }\n }\n });\n\n return filteredElements;\n}\n\n\n\nmodule.exports.eachElement = eachElement;\nmodule.exports.selfAndDirectChildren = selfAndDirectChildren;\nmodule.exports.selfAndAllChildren = selfAndAllChildren;\nmodule.exports.getBBox = getBBox;\nmodule.exports.getEnclosedElements = getEnclosedElements;\n\nmodule.exports.getClosure = getClosure;\n","function __preventDefault(event) {\n return event && event.preventDefault();\n}\n\nfunction __stopPropagation(event, immediate) {\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (immediate && event.stopImmediatePropagation) {\n event.stopImmediatePropagation();\n }\n}\n\n\nfunction getOriginal(event) {\n return event.originalEvent || event.srcEvent;\n}\n\nmodule.exports.getOriginal = getOriginal;\n\n\nfunction stopEvent(event, immediate) {\n stopPropagation(event, immediate);\n preventDefault(event);\n}\n\nmodule.exports.stopEvent = stopEvent;\n\n\nfunction preventDefault(event) {\n __preventDefault(event);\n __preventDefault(getOriginal(event));\n}\n\nmodule.exports.preventDefault = preventDefault;\n\n\nfunction stopPropagation(event, immediate) {\n __stopPropagation(event, immediate);\n __stopPropagation(getOriginal(event), immediate);\n}\n\nmodule.exports.stopPropagation = stopPropagation;\n\n\nfunction toPoint(event) {\n\n if (event.pointers && event.pointers.length) {\n event = event.pointers[0];\n }\n\n if (event.touches && event.touches.length) {\n event = event.touches[0];\n }\n\n return event ? {\n x: event.clientX,\n y: event.clientY\n } : null;\n}\n\nmodule.exports.toPoint = toPoint;\n","/**\n * SVGs for elements are generated by the {@link GraphicsFactory}.\n *\n * This utility gives quick access to the important semantic\n * parts of an element.\n */\n\n/**\n * Returns the visual part of a diagram element\n *\n * @param {Snap<SVGElement>} gfx\n *\n * @return {Snap<SVGElement>}\n */\nfunction getVisual(gfx) {\n return gfx.select('.djs-visual');\n}\n\n/**\n * Returns the children for a given diagram element.\n *\n * @param {Snap<SVGElement>} gfx\n * @return {Snap<SVGElement>}\n */\nfunction getChildren(gfx) {\n return gfx.parent().children()[1];\n}\n\n/**\n * Returns the visual bbox of an element\n *\n * @param {Snap<SVGElement>} gfx\n *\n * @return {Bounds}\n */\nfunction getBBox(gfx) {\n return getVisual(gfx).select('*').getBBox();\n}\n\n\nmodule.exports.getVisual = getVisual;\nmodule.exports.getChildren = getChildren;\nmodule.exports.getBBox = getBBox;","'use strict';\n\n/**\n * Util that provides unique IDs.\n *\n * @class djs.util.IdGenerator\n * @memberOf djs.util\n *\n * @constructor\n *\n * The ids can be customized via a given prefix and contain a random value to avoid collisions.\n *\n * @param {String} prefix a prefix to prepend to generated ids (for better readability)\n */\nfunction IdGenerator(prefix) {\n\n this._counter = 0;\n this._prefix = (prefix ? prefix + '-' : '') + Math.floor(Math.random() * 1000000000) + '-';\n}\n\nmodule.exports = IdGenerator;\n\n/**\n * Returns a next unique ID.\n *\n * @method djs.util.IdGenerator#next\n *\n * @returns {String} the id\n */\nIdGenerator.prototype.next = function() {\n return this._prefix + (++this._counter);\n};\n","'use strict';\n\nvar Snap = (window.Snap);\nvar _ = (window._);\n\nvar DEFAULT_BOX_PADDING = 0;\n\nvar DEFAULT_LABEL_SIZE = {\n width: 150,\n height: 50\n};\n\n\nfunction parseAlign(align) {\n\n var parts = align.split('-');\n\n return {\n horizontal: parts[0] || 'center',\n vertical: parts[1] || 'top'\n };\n}\n\nfunction parsePadding(padding) {\n\n if (_.isObject(padding)) {\n return _.extend({ top: 0, left: 0, right: 0, bottom: 0 }, padding);\n } else {\n return {\n top: padding,\n left: padding,\n right: padding,\n bottom: padding\n };\n }\n}\n\n\n/**\n * Creates a new label utility\n *\n * @param {Object} config\n * @param {Dimensions} config.size\n * @param {Number} config.padding\n * @param {Object} config.style\n * @param {String} config.align\n */\nfunction Text(config) {\n\n this._config = _.extend({}, {\n size: DEFAULT_LABEL_SIZE,\n padding: DEFAULT_BOX_PADDING,\n style: {},\n align: 'center-top'\n }, config || {});\n}\n\n/**\n * Create a label in the parent node.\n *\n * @method Text#createText\n *\n * @param {SVGElement} parent the parent to draw the label on\n * @param {String} text the text to render on the label\n * @param {Object} options\n * @param {String} options.align how to align in the bounding box.\n * Any of { 'center-middle', 'center-top' }, defaults to 'center-top'.\n * @param {String} options.style style to be applied to the text\n *\n * @return {SVGText} the text element created\n */\nText.prototype.createText = function(parent, text, options) {\n\n var box = _.merge({}, this._config.size, options.box || {}),\n style = _.merge({}, this._config.style, options.style || {}),\n align = parseAlign(options.align || this._config.align),\n padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding);\n\n var lines = text.split(//r?/n/g),\n layouted = [];\n\n var maxWidth = box.width - padding.left - padding.right;\n\n var fakeText = parent.text(0, 0, '').attr(style).node;\n // FF regression: ensure text is shown during rendering\n // by attaching it directly to the body\n fakeText.ownerSVGElement.appendChild(fakeText);\n\n /**\n * Layout the next line and return the layouted element.\n *\n * Alters the lines passed.\n *\n * @param {Array<String>} lines\n * @return {Object} the line descriptor, an object { width, height, text }\n */\n function layoutNext(lines) {\n\n var originalLine = lines.shift(),\n fitLine = originalLine;\n\n var textBBox;\n\n function fit() {\n if (fitLine.length < originalLine.length) {\n var nextLine = lines[0] || '',\n remainder = originalLine.slice(fitLine.length);\n\n if (/-/s*$/.test(remainder)) {\n nextLine = remainder.replace(/-/s*$/, '') + nextLine.replace(/^/s+/, '');\n } else {\n nextLine = remainder + ' ' + nextLine;\n }\n\n lines[0] = nextLine;\n }\n return { width: textBBox.width, height: textBBox.height, text: fitLine };\n }\n\n function getTextBBox(text) {\n fakeText.textContent = text;\n return fakeText.getBBox();\n }\n\n /**\n * Shortens a line based on spacing and hyphens.\n * Returns the shortened result on success.\n *\n * @param {String} line\n * @param {Number} maxLength the maximum characters of the string\n * @return {String} the shortened string\n */\n function semanticShorten(line, maxLength) {\n var parts = line.split(/(/s|-)/g),\n part,\n shortenedParts = [],\n length = 0;\n\n // try to shorten via spaces + hyphens\n if (parts.length > 1) {\n while ((part = parts.shift())) {\n\n if (part.length + length < maxLength) {\n shortenedParts.push(part);\n length += part.length;\n } else {\n // remove previous part, too if hyphen does not fit anymore\n if (part === '-') {\n shortenedParts.pop();\n }\n\n break;\n }\n }\n }\n\n return shortenedParts.join('');\n }\n\n function shortenLine(line, width, maxWidth) {\n var length = line.length * (maxWidth / width);\n\n // try to shorten semantically (i.e. based on spaces and hyphens)\n var shortenedLine = semanticShorten(line, length);\n\n if (!shortenedLine) {\n\n // force shorten by cutting the long word\n shortenedLine = line.slice(0, Math.floor(length - 1));\n }\n\n return shortenedLine;\n }\n\n\n while (true) {\n\n textBBox = getTextBBox(fitLine);\n\n // try to fit\n if (textBBox.width < maxWidth) {\n return fit();\n }\n\n fitLine = shortenLine(fitLine, textBBox.width, maxWidth);\n }\n }\n\n while (lines.length) {\n layouted.push(layoutNext(lines));\n }\n\n var totalHeight = _.reduce(layouted, function(sum, line, idx) {\n return sum + line.height;\n }, 0);\n\n // the y position of the next line\n var y, x;\n\n switch (align.vertical) {\n case 'middle':\n y = (box.height - totalHeight) / 2 - layouted[0].height / 4;\n break;\n\n default:\n y = padding.top;\n }\n\n var textElement = parent.text().attr(style);\n\n _.forEach(layouted, function(line) {\n y += line.height;\n\n switch (align.horizontal) {\n case 'left':\n x = padding.left;\n break;\n\n case 'right':\n x = (maxWidth - padding.right - line.width);\n break;\n\n default:\n // aka center\n x = (maxWidth - line.width) / 2 + padding.left;\n }\n\n\n var tspan = Snap.create('tspan', { x: x, y: y }).node;\n tspan.textContent = line.text;\n\n textElement.append(tspan);\n });\n\n // remove fake text\n fakeText.parentNode.removeChild(fakeText);\n\n return textElement;\n};\n\n\nmodule.exports = Text;","\r\nvar isArray = function(obj) {\r\n return Object.prototype.toString.call(obj) === '[object Array]';\r\n};\r\n\r\nvar annotate = function() {\r\n var args = Array.prototype.slice.call(arguments);\r\n \r\n if (args.length === 1 && isArray(args[0])) {\r\n args = args[0];\r\n }\r\n\r\n var fn = args.pop();\r\n\r\n fn.$inject = args;\r\n\r\n return fn;\r\n};\r\n\r\n\r\n// Current limitations:\r\n// - can't put into \"function arg\" comments\r\n// function /* (no parenthesis like this) */ (){}\r\n// function abc( /* xx (no parenthesis like this) */ a, b) {}\r\n//\r\n// Just put the comment before function or inside:\r\n// /* (((this is fine))) */ function(a, b) {}\r\n// function abc(a) { /* (((this is fine))) */}\r\n\r\nvar FN_ARGS = /^function/s*[^/(]*/(/s*([^/)]*)/)/m;\r\nvar FN_ARG = ////*([^/*]*)/*///m;\r\n\r\nvar parse = function(fn) {\r\n if (typeof fn !== 'function') {\r\n throw new Error('Cannot annotate \"' + fn + '\". Expected a function!');\r\n }\r\n\r\n var match = fn.toString().match(FN_ARGS);\r\n return match[1] && match[1].split(',').map(function(arg) {\r\n match = arg.match(FN_ARG);\r\n return match ? match[1].trim() : arg.trim();\r\n }) || [];\r\n};\r\n\r\n\r\nexports.annotate = annotate;\r\nexports.parse = parse;\r\nexports.isArray = isArray;\r\n","module.exports = {\r\n annotate: require(71).annotate,\r\n Module: require(74),\r\n Injector: require(73)\r\n};\r\n","var Module = require(74);\r\nvar autoAnnotate = require(71).parse;\r\nvar annotate = require(71).annotate;\r\nvar isArray = require(71).isArray;\r\n\r\n\r\nvar Injector = function(modules, parent) {\r\n parent = parent || {\r\n get: function(name) {\r\n currentlyResolving.push(name);\r\n throw error('No provider for \"' + name + '\"!');\r\n }\r\n };\r\n\r\n var currentlyResolving = [];\r\n var providers = this._providers = Object.create(parent._providers || null);\r\n var instances = this._instances = Object.create(null);\r\n\r\n var self = instances.injector = this;\r\n\r\n var error = function(msg) {\r\n var stack = currentlyResolving.join(' -> ');\r\n currentlyResolving.length = 0;\r\n return new Error(stack ? msg + ' (Resolving: ' + stack + ')' : msg);\r\n };\r\n\r\n var get = function(name) {\r\n if (!providers[name] && name.indexOf('.') !== -1) {\r\n var parts = name.split('.');\r\n var pivot = get(parts.shift());\r\n\r\n while(parts.length) {\r\n pivot = pivot[parts.shift()];\r\n }\r\n\r\n return pivot;\r\n }\r\n\r\n if (Object.hasOwnProperty.call(instances, name)) {\r\n return instances[name];\r\n }\r\n\r\n if (Object.hasOwnProperty.call(providers, name)) {\r\n if (currentlyResolving.indexOf(name) !== -1) {\r\n currentlyResolving.push(name);\r\n throw error('Cannot resolve circular dependency!');\r\n }\r\n\r\n currentlyResolving.push(name);\r\n instances[name] = providers[name][0](providers[name][1]);\r\n currentlyResolving.pop();\r\n\r\n return instances[name];\r\n }\r\n\r\n return parent.get(name);\r\n };\r\n\r\n var instantiate = function(Type) {\r\n var instance = Object.create(Type.prototype);\r\n var returned = invoke(Type, instance);\r\n\r\n return typeof returned === 'object' ? returned : instance;\r\n };\r\n\r\n var invoke = function(fn, context) {\r\n if (typeof fn !== 'function') {\r\n if (isArray(fn)) {\r\n fn = annotate(fn.slice());\r\n } else {\r\n throw new Error('Cannot invoke \"' + fn + '\". Expected a function!');\r\n }\r\n }\r\n\r\n var inject = fn.$inject && fn.$inject || autoAnnotate(fn);\r\n var dependencies = inject.map(function(dep) {\r\n return get(dep);\r\n });\r\n\r\n // TODO(vojta): optimize without apply\r\n return fn.apply(context, dependencies);\r\n };\r\n\r\n\r\n var createPrivateInjectorFactory = function(privateChildInjector) {\r\n return annotate(function(key) {\r\n return privateChildInjector.get(key);\r\n });\r\n };\r\n\r\n var createChild = function(modules, forceNewInstances) {\r\n if (forceNewInstances && forceNewInstances.length) {\r\n var fromParentModule = Object.create(null);\r\n var matchedScopes = Object.create(null);\r\n\r\n var privateInjectorsCache = [];\r\n var privateChildInjectors = [];\r\n var privateChildFactories = [];\r\n\r\n var provider;\r\n var cacheIdx;\r\n var privateChildInjector;\r\n var privateChildInjectorFactory;\r\n for (var name in providers) {\r\n provider = providers[name];\r\n\r\n if (forceNewInstances.indexOf(name) !== -1) {\r\n if (provider[2] === 'private') {\r\n cacheIdx = privateInjectorsCache.indexOf(provider[3]);\r\n if (cacheIdx === -1) {\r\n privateChildInjector = provider[3].createChild([], forceNewInstances);\r\n privateChildInjectorFactory = createPrivateInjectorFactory(privateChildInjector);\r\n privateInjectorsCache.push(provider[3]);\r\n privateChildInjectors.push(privateChildInjector);\r\n privateChildFactories.push(privateChildInjectorFactory);\r\n fromParentModule[name] = [privateChildInjectorFactory, name, 'private', privateChildInjector];\r\n } else {\r\n fromParentModule[name] = [privateChildFactories[cacheIdx], name, 'private', privateChildInjectors[cacheIdx]];\r\n }\r\n } else {\r\n fromParentModule[name] = [provider[2], provider[1]];\r\n }\r\n matchedScopes[name] = true;\r\n }\r\n\r\n if ((provider[2] === 'factory' || provider[2] === 'type') && provider[1].$scope) {\r\n forceNewInstances.forEach(function(scope) {\r\n if (provider[1].$scope.indexOf(scope) !== -1) {\r\n fromParentModule[name] = [provider[2], provider[1]];\r\n matchedScopes[scope] = true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n forceNewInstances.forEach(function(scope) {\r\n if (!matchedScopes[scope]) {\r\n throw new Error('No provider for \"' + scope + '\". Cannot use provider from the parent!');\r\n }\r\n });\r\n\r\n modules.unshift(fromParentModule);\r\n }\r\n\r\n return new Injector(modules, self);\r\n };\r\n\r\n var factoryMap = {\r\n factory: invoke,\r\n type: instantiate,\r\n value: function(value) {\r\n return value;\r\n }\r\n };\r\n\r\n modules.forEach(function(module) {\r\n\r\n function arrayUnwrap(type, value) {\r\n if (type !== 'value' && isArray(value)) {\r\n value = annotate(value.slice());\r\n }\r\n\r\n return value;\r\n }\r\n\r\n // TODO(vojta): handle wrong inputs (modules)\r\n if (module instanceof Module) {\r\n module.forEach(function(provider) {\r\n var name = provider[0];\r\n var type = provider[1];\r\n var value = provider[2];\r\n\r\n providers[name] = [factoryMap[type], arrayUnwrap(type, value), type];\r\n });\r\n } else if (typeof module === 'object') {\r\n if (module.__exports__) {\r\n var clonedModule = Object.keys(module).reduce(function(m, key) {\r\n if (key.substring(0, 2) !== '__') {\r\n m[key] = module[key];\r\n }\r\n return m;\r\n }, Object.create(null));\r\n\r\n var privateInjector = new Injector((module.__modules__ || []).concat([clonedModule]), self);\r\n var getFromPrivateInjector = annotate(function(key) {\r\n return privateInjector.get(key);\r\n });\r\n module.__exports__.forEach(function(key) {\r\n providers[key] = [getFromPrivateInjector, key, 'private', privateInjector];\r\n });\r\n } else {\r\n Object.keys(module).forEach(function(name) {\r\n if (module[name][2] === 'private') {\r\n providers[name] = module[name];\r\n return;\r\n }\r\n\r\n var type = module[name][0];\r\n var value = module[name][1];\r\n\r\n providers[name] = [factoryMap[type], arrayUnwrap(type, value), type];\r\n });\r\n }\r\n }\r\n });\r\n\r\n // public API\r\n this.get = get;\r\n this.invoke = invoke;\r\n this.instantiate = instantiate;\r\n this.createChild = createChild;\r\n};\r\n\r\nmodule.exports = Injector;\r\n","var Module = function() {\r\n var providers = [];\r\n\r\n this.factory = function(name, factory) {\r\n providers.push([name, 'factory', factory]);\r\n return this;\r\n };\r\n\r\n this.value = function(name, value) {\r\n providers.push([name, 'value', value]);\r\n return this;\r\n };\r\n\r\n this.type = function(name, type) {\r\n providers.push([name, 'type', type]);\r\n return this;\r\n };\r\n\r\n this.forEach = function(iterator) {\r\n providers.forEach(iterator);\r\n };\r\n};\r\n\r\nmodule.exports = Module;\r\n","module.exports = require(77);\r\n\r\nmodule.exports.Collection = require(76);","'use strict';\r\n\r\n/**\r\n * An empty collection stub. Use {@link RefsCollection.extend} to extend a\r\n * collection with ref semantics.\r\n *\r\n * @classdesc A change and inverse-reference aware collection with set semantics.\r\n *\r\n * @class RefsCollection\r\n */\r\nfunction RefsCollection() { }\r\n\r\n/**\r\n * Extends a collection with {@link Refs} aware methods\r\n *\r\n * @memberof RefsCollection\r\n * @static\r\n *\r\n * @param {Array<Object>} collection\r\n * @param {Refs} refs instance\r\n * @param {Object} property represented by the collection\r\n * @param {Object} target object the collection is attached to\r\n *\r\n * @return {RefsCollection<Object>} the extended array\r\n */\r\nfunction extend(collection, refs, property, target) {\r\n\r\n var inverseProperty = property.inverse;\r\n\r\n /**\r\n * Removes the given element from the array and returns it.\r\n *\r\n * @method RefsCollection#remove\r\n *\r\n * @param {Object} element the element to remove\r\n */\r\n collection.remove = function(element) {\r\n var idx = this.indexOf(element);\r\n if (idx !== -1) {\r\n this.splice(idx, 1);\r\n\r\n // unset inverse\r\n refs.unset(element, inverseProperty, target);\r\n }\r\n\r\n return element;\r\n };\r\n\r\n /**\r\n * Returns true if the collection contains the given element\r\n *\r\n * @method RefsCollection#contains\r\n *\r\n * @param {Object} element the element to check for\r\n */\r\n collection.contains = function(element) {\r\n return this.indexOf(element) !== -1;\r\n };\r\n\r\n /**\r\n * Adds an element to the array, unless it exists already (set semantics).\r\n *\r\n * @method RefsCollection#add\r\n *\r\n * @param {Object} element the element to add\r\n */\r\n collection.add = function(element) {\r\n\r\n if (!this.contains(element)) {\r\n this.push(element);\r\n\r\n // set inverse\r\n refs.set(element, inverseProperty, target);\r\n }\r\n };\r\n\r\n return collection;\r\n}\r\n\r\n\r\nmodule.exports.extend = extend;","'use strict';\r\n\r\nvar Collection = require(76);\r\n\r\nfunction hasOwnProperty(e, property) {\r\n return Object.prototype.hasOwnProperty.call(e, property.name || property);\r\n}\r\n\r\n\r\nfunction defineCollectionProperty(ref, property, target) {\r\n Object.defineProperty(target, property.name, {\r\n enumerable: property.enumerable,\r\n value: Collection.extend(target[property.name] || [], ref, property, target)\r\n });\r\n}\r\n\r\n\r\nfunction defineProperty(ref, property, target) {\r\n\r\n var inverseProperty = property.inverse;\r\n\r\n var _value = target[property.name];\r\n\r\n Object.defineProperty(target, property.name, {\r\n enumerable: property.enumerable,\r\n\r\n get: function() {\r\n return _value;\r\n },\r\n\r\n set: function(value) {\r\n\r\n // return if we already performed all changes\r\n if (value === _value) {\r\n return;\r\n }\r\n\r\n var old = _value;\r\n\r\n // temporary set null\r\n _value = null;\r\n\r\n if (old) {\r\n ref.unset(old, inverseProperty, target);\r\n }\r\n\r\n // set new value\r\n _value = value;\r\n\r\n // set inverse value\r\n ref.set(_value, inverseProperty, target);\r\n }\r\n });\r\n\r\n}\r\n\r\n/**\r\n * Creates a new references object defining two inversly related\r\n * attribute descriptors a and b.\r\n *\r\n * <p>\r\n * When bound to an object using {@link Refs#bind} the references\r\n * get activated and ensure that add and remove operations are applied\r\n * reversely, too.\r\n * </p>\r\n *\r\n * <p>\r\n * For attributes represented as collections {@link Refs} provides the\r\n * {@link RefsCollection#add}, {@link RefsCollection#remove} and {@link RefsCollection#contains} extensions\r\n * that must be used to properly hook into the inverse change mechanism.\r\n * </p>\r\n *\r\n * @class Refs\r\n *\r\n * @classdesc A bi-directional reference between two attributes.\r\n *\r\n * @param {Refs.AttributeDescriptor} a property descriptor\r\n * @param {Refs.AttributeDescriptor} b property descriptor\r\n *\r\n * @example\r\n *\r\n * var refs = Refs({ name: 'wheels', collection: true, enumerable: true }, { name: 'car' });\r\n *\r\n * var car = { name: 'toyota' };\r\n * var wheels = [{ pos: 'front-left' }, { pos: 'front-right' }];\r\n *\r\n * refs.bind(car, 'wheels');\r\n *\r\n * car.wheels // []\r\n * car.wheels.add(wheels[0]);\r\n * car.wheels.add(wheels[1]);\r\n *\r\n * car.wheels // [{ pos: 'front-left' }, { pos: 'front-right' }]\r\n *\r\n * wheels[0].car // { name: 'toyota' };\r\n * car.wheels.remove(wheels[0]);\r\n *\r\n * wheels[0].car // undefined\r\n */\r\nfunction Refs(a, b) {\r\n\r\n if (!(this instanceof Refs)) {\r\n return new Refs(a, b);\r\n }\r\n\r\n // link\r\n a.inverse = b;\r\n b.inverse = a;\r\n\r\n this.props = {};\r\n this.props[a.name] = a;\r\n this.props[b.name] = b;\r\n}\r\n\r\n/**\r\n * Binds one side of a bi-directional reference to a\r\n * target object.\r\n *\r\n * @memberOf Refs\r\n *\r\n * @param {Object} target\r\n * @param {String} property\r\n */\r\nRefs.prototype.bind = function(target, property) {\r\n if (typeof property === 'string') {\r\n if (!this.props[property]) {\r\n throw new Error('no property <' + property + '> in ref');\r\n }\r\n property = this.props[property];\r\n }\r\n\r\n if (property.collection) {\r\n defineCollectionProperty(this, property, target);\r\n } else {\r\n defineProperty(this, property, target);\r\n }\r\n};\r\n\r\nRefs.prototype.ensureBound = function(target, property) {\r\n if (!hasOwnProperty(target, property)) {\r\n this.bind(target, property);\r\n }\r\n};\r\n\r\nRefs.prototype.unset = function(target, property, value) {\r\n\r\n if (target) {\r\n this.ensureBound(target, property);\r\n\r\n if (property.collection) {\r\n target[property.name].remove(value);\r\n } else {\r\n target[property.name] = undefined;\r\n }\r\n }\r\n};\r\n\r\nRefs.prototype.set = function(target, property, value) {\r\n\r\n if (target) {\r\n this.ensureBound(target, property);\r\n\r\n if (property.collection) {\r\n target[property.name].add(value);\r\n } else {\r\n target[property.name] = value;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = Refs;\r\n\r\n\r\n/**\r\n * An attribute descriptor to be used specify an attribute in a {@link Refs} instance\r\n *\r\n * @typedef {Object} Refs.AttributeDescriptor\r\n * @property {String} name\r\n * @property {boolean} [collection=false]\r\n * @property {boolean} [enumerable=false]\r\n */"]}
|