process_engine 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +37 -0
  4. data/app/assets/bower_components/process_engine/Snap.svg/CONTRIBUTING +3 -0
  5. data/app/assets/bower_components/process_engine/Snap.svg/Gruntfile.js +59 -0
  6. data/app/assets/bower_components/process_engine/Snap.svg/LICENSE +202 -0
  7. data/app/assets/bower_components/process_engine/Snap.svg/NOTICE +190 -0
  8. data/app/assets/bower_components/process_engine/Snap.svg/README.md +62 -0
  9. data/app/assets/bower_components/process_engine/Snap.svg/bower.json +25 -0
  10. data/app/assets/bower_components/process_engine/Snap.svg/component.json +13 -0
  11. data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg-min.js +20 -0
  12. data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg.js +7653 -0
  13. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/dr.css +144 -0
  14. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/main.css +508 -0
  15. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/prism.css +168 -0
  16. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/topcoat-desktop-light.css +3700 -0
  17. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.eot +0 -0
  18. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.svg +242 -0
  19. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.ttf +0 -0
  20. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.woff +0 -0
  21. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.eot +0 -0
  22. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.svg +243 -0
  23. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.ttf +0 -0
  24. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.woff +0 -0
  25. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.eot +0 -0
  26. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.svg +243 -0
  27. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  28. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.woff +0 -0
  29. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.eot +0 -0
  30. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.svg +243 -0
  31. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.ttf +0 -0
  32. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.woff +0 -0
  33. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/stylesheet.css +57 -0
  34. data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search.svg +11 -0
  35. data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search_dark.svg +16 -0
  36. data/app/assets/bower_components/process_engine/Snap.svg/doc/js/prism.js +9 -0
  37. data/app/assets/bower_components/process_engine/Snap.svg/doc/reference.html +13633 -0
  38. data/app/assets/bower_components/process_engine/Snap.svg/dr.json +33 -0
  39. data/app/assets/bower_components/process_engine/Snap.svg/history.md +31 -0
  40. data/app/assets/bower_components/process_engine/Snap.svg/package.json +22 -0
  41. data/app/assets/bower_components/process_engine/Snap.svg/template.dot +157 -0
  42. data/app/assets/bower_components/process_engine/Snap.svg/test.html +75 -0
  43. data/app/assets/bower_components/process_engine/bpmn-js/LICENSE +22 -0
  44. data/app/assets/bower_components/process_engine/bpmn-js/README.md +46 -0
  45. data/app/assets/bower_components/process_engine/bpmn-js/bower.json +28 -0
  46. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css +40 -0
  47. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  48. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg +21 -0
  49. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  50. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  51. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/diagram-js.css +355 -0
  52. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js +21552 -0
  53. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js.map +1 -0
  54. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.min.js +8 -0
  55. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js +13542 -0
  56. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js.map +1 -0
  57. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.min.js +5 -0
  58. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js +13294 -0
  59. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js.map +1 -0
  60. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.min.js +5 -0
  61. data/app/assets/bower_components/process_engine/hammerjs/CHANGELOG.md +30 -0
  62. data/app/assets/bower_components/process_engine/hammerjs/CONTRIBUTING.md +41 -0
  63. data/app/assets/bower_components/process_engine/hammerjs/Gruntfile.coffee +123 -0
  64. data/app/assets/bower_components/process_engine/hammerjs/LICENSE.md +21 -0
  65. data/app/assets/bower_components/process_engine/hammerjs/README.md +6 -0
  66. data/app/assets/bower_components/process_engine/hammerjs/bower.json +9 -0
  67. data/app/assets/bower_components/process_engine/hammerjs/component.json +8 -0
  68. data/app/assets/bower_components/process_engine/hammerjs/hammer.js +2463 -0
  69. data/app/assets/bower_components/process_engine/hammerjs/hammer.min.js +7 -0
  70. data/app/assets/bower_components/process_engine/hammerjs/hammer.min.map +1 -0
  71. data/app/assets/bower_components/process_engine/hammerjs/package.json +50 -0
  72. data/app/assets/bower_components/process_engine/jquery/MIT-LICENSE.txt +21 -0
  73. data/app/assets/bower_components/process_engine/jquery/bower.json +27 -0
  74. data/app/assets/bower_components/process_engine/jquery/dist/jquery.js +9205 -0
  75. data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.js +5 -0
  76. data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.map +1 -0
  77. data/app/assets/bower_components/process_engine/jquery/src/ajax/jsonp.js +89 -0
  78. data/app/assets/bower_components/process_engine/jquery/src/ajax/load.js +75 -0
  79. data/app/assets/bower_components/process_engine/jquery/src/ajax/parseJSON.js +13 -0
  80. data/app/assets/bower_components/process_engine/jquery/src/ajax/parseXML.js +28 -0
  81. data/app/assets/bower_components/process_engine/jquery/src/ajax/script.js +64 -0
  82. data/app/assets/bower_components/process_engine/jquery/src/ajax/var/nonce.js +5 -0
  83. data/app/assets/bower_components/process_engine/jquery/src/ajax/var/rquery.js +3 -0
  84. data/app/assets/bower_components/process_engine/jquery/src/ajax/xhr.js +136 -0
  85. data/app/assets/bower_components/process_engine/jquery/src/ajax.js +786 -0
  86. data/app/assets/bower_components/process_engine/jquery/src/attributes/attr.js +141 -0
  87. data/app/assets/bower_components/process_engine/jquery/src/attributes/classes.js +158 -0
  88. data/app/assets/bower_components/process_engine/jquery/src/attributes/prop.js +94 -0
  89. data/app/assets/bower_components/process_engine/jquery/src/attributes/support.js +35 -0
  90. data/app/assets/bower_components/process_engine/jquery/src/attributes/val.js +161 -0
  91. data/app/assets/bower_components/process_engine/jquery/src/attributes.js +11 -0
  92. data/app/assets/bower_components/process_engine/jquery/src/callbacks.js +205 -0
  93. data/app/assets/bower_components/process_engine/jquery/src/core/access.js +60 -0
  94. data/app/assets/bower_components/process_engine/jquery/src/core/init.js +123 -0
  95. data/app/assets/bower_components/process_engine/jquery/src/core/parseHTML.js +39 -0
  96. data/app/assets/bower_components/process_engine/jquery/src/core/ready.js +97 -0
  97. data/app/assets/bower_components/process_engine/jquery/src/core/var/rsingleTag.js +4 -0
  98. data/app/assets/bower_components/process_engine/jquery/src/core.js +497 -0
  99. data/app/assets/bower_components/process_engine/jquery/src/css/addGetHookIf.js +22 -0
  100. data/app/assets/bower_components/process_engine/jquery/src/css/curCSS.js +57 -0
  101. data/app/assets/bower_components/process_engine/jquery/src/css/defaultDisplay.js +70 -0
  102. data/app/assets/bower_components/process_engine/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  103. data/app/assets/bower_components/process_engine/jquery/src/css/support.js +96 -0
  104. data/app/assets/bower_components/process_engine/jquery/src/css/swap.js +28 -0
  105. data/app/assets/bower_components/process_engine/jquery/src/css/var/cssExpand.js +3 -0
  106. data/app/assets/bower_components/process_engine/jquery/src/css/var/getStyles.js +12 -0
  107. data/app/assets/bower_components/process_engine/jquery/src/css/var/isHidden.js +13 -0
  108. data/app/assets/bower_components/process_engine/jquery/src/css/var/rmargin.js +3 -0
  109. data/app/assets/bower_components/process_engine/jquery/src/css/var/rnumnonpx.js +5 -0
  110. data/app/assets/bower_components/process_engine/jquery/src/css.js +450 -0
  111. data/app/assets/bower_components/process_engine/jquery/src/data/Data.js +181 -0
  112. data/app/assets/bower_components/process_engine/jquery/src/data/accepts.js +20 -0
  113. data/app/assets/bower_components/process_engine/jquery/src/data/var/data_priv.js +5 -0
  114. data/app/assets/bower_components/process_engine/jquery/src/data/var/data_user.js +5 -0
  115. data/app/assets/bower_components/process_engine/jquery/src/data.js +178 -0
  116. data/app/assets/bower_components/process_engine/jquery/src/deferred.js +149 -0
  117. data/app/assets/bower_components/process_engine/jquery/src/deprecated.js +13 -0
  118. data/app/assets/bower_components/process_engine/jquery/src/dimensions.js +50 -0
  119. data/app/assets/bower_components/process_engine/jquery/src/effects/Tween.js +114 -0
  120. data/app/assets/bower_components/process_engine/jquery/src/effects/animatedSelector.js +13 -0
  121. data/app/assets/bower_components/process_engine/jquery/src/effects.js +648 -0
  122. data/app/assets/bower_components/process_engine/jquery/src/event/ajax.js +13 -0
  123. data/app/assets/bower_components/process_engine/jquery/src/event/alias.js +39 -0
  124. data/app/assets/bower_components/process_engine/jquery/src/event/support.js +9 -0
  125. data/app/assets/bower_components/process_engine/jquery/src/event.js +868 -0
  126. data/app/assets/bower_components/process_engine/jquery/src/exports/amd.js +24 -0
  127. data/app/assets/bower_components/process_engine/jquery/src/exports/global.js +32 -0
  128. data/app/assets/bower_components/process_engine/jquery/src/intro.js +44 -0
  129. data/app/assets/bower_components/process_engine/jquery/src/jquery.js +37 -0
  130. data/app/assets/bower_components/process_engine/jquery/src/manipulation/_evalUrl.js +18 -0
  131. data/app/assets/bower_components/process_engine/jquery/src/manipulation/support.js +32 -0
  132. data/app/assets/bower_components/process_engine/jquery/src/manipulation/var/rcheckableType.js +3 -0
  133. data/app/assets/bower_components/process_engine/jquery/src/manipulation.js +580 -0
  134. data/app/assets/bower_components/process_engine/jquery/src/offset.js +207 -0
  135. data/app/assets/bower_components/process_engine/jquery/src/outro.js +1 -0
  136. data/app/assets/bower_components/process_engine/jquery/src/queue/delay.js +22 -0
  137. data/app/assets/bower_components/process_engine/jquery/src/queue.js +142 -0
  138. data/app/assets/bower_components/process_engine/jquery/src/selector-native.js +172 -0
  139. data/app/assets/bower_components/process_engine/jquery/src/selector-sizzle.js +14 -0
  140. data/app/assets/bower_components/process_engine/jquery/src/selector.js +1 -0
  141. data/app/assets/bower_components/process_engine/jquery/src/serialize.js +111 -0
  142. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.js +2067 -0
  143. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  144. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  145. data/app/assets/bower_components/process_engine/jquery/src/traversing/findFilter.js +100 -0
  146. data/app/assets/bower_components/process_engine/jquery/src/traversing/var/rneedsContext.js +6 -0
  147. data/app/assets/bower_components/process_engine/jquery/src/traversing.js +199 -0
  148. data/app/assets/bower_components/process_engine/jquery/src/var/arr.js +3 -0
  149. data/app/assets/bower_components/process_engine/jquery/src/var/class2type.js +4 -0
  150. data/app/assets/bower_components/process_engine/jquery/src/var/concat.js +5 -0
  151. data/app/assets/bower_components/process_engine/jquery/src/var/hasOwn.js +5 -0
  152. data/app/assets/bower_components/process_engine/jquery/src/var/indexOf.js +5 -0
  153. data/app/assets/bower_components/process_engine/jquery/src/var/pnum.js +3 -0
  154. data/app/assets/bower_components/process_engine/jquery/src/var/push.js +5 -0
  155. data/app/assets/bower_components/process_engine/jquery/src/var/rnotwhite.js +3 -0
  156. data/app/assets/bower_components/process_engine/jquery/src/var/slice.js +5 -0
  157. data/app/assets/bower_components/process_engine/jquery/src/var/strundefined.js +3 -0
  158. data/app/assets/bower_components/process_engine/jquery/src/var/support.js +4 -0
  159. data/app/assets/bower_components/process_engine/jquery/src/var/toString.js +5 -0
  160. data/app/assets/bower_components/process_engine/jquery/src/wrap.js +79 -0
  161. data/app/assets/bower_components/process_engine/jquery-mousewheel/ChangeLog.md +141 -0
  162. data/app/assets/bower_components/process_engine/jquery-mousewheel/LICENSE.txt +20 -0
  163. data/app/assets/bower_components/process_engine/jquery-mousewheel/README.md +85 -0
  164. data/app/assets/bower_components/process_engine/jquery-mousewheel/bower.json +17 -0
  165. data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.js +221 -0
  166. data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.min.js +8 -0
  167. data/app/assets/bower_components/process_engine/lodash/LICENSE.txt +22 -0
  168. data/app/assets/bower_components/process_engine/lodash/bower.json +23 -0
  169. data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.js +7157 -0
  170. data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.min.js +61 -0
  171. data/app/assets/bower_components/process_engine/lodash/dist/lodash.js +6785 -0
  172. data/app/assets/bower_components/process_engine/lodash/dist/lodash.min.js +56 -0
  173. data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.js +4979 -0
  174. data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.min.js +39 -0
  175. data/app/assets/bower_components/process_engine/sax/AUTHORS +10 -0
  176. data/app/assets/bower_components/process_engine/sax/LICENSE +32 -0
  177. data/app/assets/bower_components/process_engine/sax/LICENSE-W3C.html +188 -0
  178. data/app/assets/bower_components/process_engine/sax/README.md +216 -0
  179. data/app/assets/bower_components/process_engine/sax/component.json +12 -0
  180. data/app/assets/bower_components/process_engine/sax/examples/big-not-pretty.xml +8002 -0
  181. data/app/assets/bower_components/process_engine/sax/examples/example.js +29 -0
  182. data/app/assets/bower_components/process_engine/sax/examples/get-products.js +58 -0
  183. data/app/assets/bower_components/process_engine/sax/examples/hello-world.js +4 -0
  184. data/app/assets/bower_components/process_engine/sax/examples/not-pretty.xml +8 -0
  185. data/app/assets/bower_components/process_engine/sax/examples/pretty-print.js +74 -0
  186. data/app/assets/bower_components/process_engine/sax/examples/shopping.xml +2 -0
  187. data/app/assets/bower_components/process_engine/sax/examples/strict.dtd +870 -0
  188. data/app/assets/bower_components/process_engine/sax/examples/test.html +15 -0
  189. data/app/assets/bower_components/process_engine/sax/examples/test.xml +1254 -0
  190. data/app/assets/bower_components/process_engine/sax/lib/sax.js +1410 -0
  191. data/app/assets/bower_components/process_engine/sax/package.json +12 -0
  192. data/app/assets/bower_components/process_engine/sax/test/attribute-name.js +33 -0
  193. data/app/assets/bower_components/process_engine/sax/test/attribute-no-space.js +75 -0
  194. data/app/assets/bower_components/process_engine/sax/test/buffer-overrun.js +26 -0
  195. data/app/assets/bower_components/process_engine/sax/test/case.js +50 -0
  196. data/app/assets/bower_components/process_engine/sax/test/cdata-chunked.js +11 -0
  197. data/app/assets/bower_components/process_engine/sax/test/cdata-end-split.js +15 -0
  198. data/app/assets/bower_components/process_engine/sax/test/cdata-fake-end.js +28 -0
  199. data/app/assets/bower_components/process_engine/sax/test/cdata-multiple.js +15 -0
  200. data/app/assets/bower_components/process_engine/sax/test/cdata.js +10 -0
  201. data/app/assets/bower_components/process_engine/sax/test/cyrillic.js +8 -0
  202. data/app/assets/bower_components/process_engine/sax/test/duplicate-attribute.js +13 -0
  203. data/app/assets/bower_components/process_engine/sax/test/emoji.js +12 -0
  204. data/app/assets/bower_components/process_engine/sax/test/end_empty_stream.js +5 -0
  205. data/app/assets/bower_components/process_engine/sax/test/entities.js +10 -0
  206. data/app/assets/bower_components/process_engine/sax/test/entity-mega.js +16 -0
  207. data/app/assets/bower_components/process_engine/sax/test/flush.js +13 -0
  208. data/app/assets/bower_components/process_engine/sax/test/index.js +86 -0
  209. data/app/assets/bower_components/process_engine/sax/test/issue-23.js +43 -0
  210. data/app/assets/bower_components/process_engine/sax/test/issue-30.js +24 -0
  211. data/app/assets/bower_components/process_engine/sax/test/issue-35.js +15 -0
  212. data/app/assets/bower_components/process_engine/sax/test/issue-47.js +12 -0
  213. data/app/assets/bower_components/process_engine/sax/test/issue-49.js +31 -0
  214. data/app/assets/bower_components/process_engine/sax/test/issue-84.js +13 -0
  215. data/app/assets/bower_components/process_engine/sax/test/parser-position.js +28 -0
  216. data/app/assets/bower_components/process_engine/sax/test/script-close-better.js +12 -0
  217. data/app/assets/bower_components/process_engine/sax/test/script.js +12 -0
  218. data/app/assets/bower_components/process_engine/sax/test/self-closing-child-strict.js +44 -0
  219. data/app/assets/bower_components/process_engine/sax/test/self-closing-child.js +44 -0
  220. data/app/assets/bower_components/process_engine/sax/test/self-closing-tag.js +25 -0
  221. data/app/assets/bower_components/process_engine/sax/test/stray-ending.js +17 -0
  222. data/app/assets/bower_components/process_engine/sax/test/trailing-attribute-no-value.js +10 -0
  223. data/app/assets/bower_components/process_engine/sax/test/trailing-non-whitespace.js +18 -0
  224. data/app/assets/bower_components/process_engine/sax/test/unclosed-root.js +11 -0
  225. data/app/assets/bower_components/process_engine/sax/test/unquoted.js +18 -0
  226. data/app/assets/bower_components/process_engine/sax/test/utf8-split.js +32 -0
  227. data/app/assets/bower_components/process_engine/sax/test/xmlns-as-tag-name.js +15 -0
  228. data/app/assets/bower_components/process_engine/sax/test/xmlns-issue-41.js +68 -0
  229. data/app/assets/bower_components/process_engine/sax/test/xmlns-rebinding.js +63 -0
  230. data/app/assets/bower_components/process_engine/sax/test/xmlns-strict.js +74 -0
  231. data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound-element.js +33 -0
  232. data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound.js +15 -0
  233. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-ns.js +31 -0
  234. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix-attribute.js +36 -0
  235. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix.js +21 -0
  236. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-redefine.js +41 -0
  237. data/app/assets/javascripts/process_engine/application.js +65 -0
  238. data/app/assets/stylesheets/process_engine/application.css +39 -0
  239. data/app/controllers/process_engine/application_controller.rb +28 -0
  240. data/app/controllers/process_engine/process_definitions_controller.rb +63 -0
  241. data/app/controllers/process_engine/process_instances_controller.rb +42 -0
  242. data/app/controllers/process_engine/process_tasks_controller.rb +23 -0
  243. data/app/helpers/process_engine/application_helper.rb +4 -0
  244. data/app/models/process_engine/consumer/consumer_task.rb +15 -0
  245. data/app/models/process_engine/error/false_task_state.rb +2 -0
  246. data/app/models/process_engine/listener/base.rb +49 -0
  247. data/app/models/process_engine/node_data_injection.rb +22 -0
  248. data/app/models/process_engine/parser/complex_gateway.rb +21 -0
  249. data/app/models/process_engine/parser/end_event.rb +23 -0
  250. data/app/models/process_engine/parser/exclusive_gateway.rb +25 -0
  251. data/app/models/process_engine/parser/extension/condition_expression.rb +39 -0
  252. data/app/models/process_engine/parser/extension/execution_listener.rb +15 -0
  253. data/app/models/process_engine/parser/extension/form_field.rb +50 -0
  254. data/app/models/process_engine/parser/extension/input_output.rb +28 -0
  255. data/app/models/process_engine/parser/extension/listener.rb +43 -0
  256. data/app/models/process_engine/parser/extension/property.rb +20 -0
  257. data/app/models/process_engine/parser/extension/task_listener.rb +15 -0
  258. data/app/models/process_engine/parser/extension/transitional_parameter.rb +53 -0
  259. data/app/models/process_engine/parser/inclusive_gateway.rb +25 -0
  260. data/app/models/process_engine/parser/parallel_gateway.rb +19 -0
  261. data/app/models/process_engine/parser/script_task.rb +37 -0
  262. data/app/models/process_engine/parser/sequence_flow.rb +36 -0
  263. data/app/models/process_engine/parser/start_event.rb +27 -0
  264. data/app/models/process_engine/parser/user_task.rb +36 -0
  265. data/app/models/process_engine/parser/xml_node.rb +125 -0
  266. data/app/models/process_engine/process_definition.rb +50 -0
  267. data/app/models/process_engine/process_instance.rb +72 -0
  268. data/app/models/process_engine/process_query.rb +52 -0
  269. data/app/models/process_engine/process_schema.rb +30 -0
  270. data/app/models/process_engine/process_task.rb +70 -0
  271. data/app/models/process_engine/schema/interceptor/exclusive_gateway.rb +39 -0
  272. data/app/models/process_engine/schema/node.rb +48 -0
  273. data/app/models/process_engine/schema/node_extension.rb +79 -0
  274. data/app/models/process_engine/schema/transition.rb +22 -0
  275. data/app/views/layouts/process_engine/application.html.erb +14 -0
  276. data/app/views/process_engine/layouts/_menu.html.haml +6 -0
  277. data/app/views/process_engine/layouts/application.html.haml +11 -0
  278. data/app/views/process_engine/process_definitions/_form.html.haml +6 -0
  279. data/app/views/process_engine/process_definitions/edit.html.haml +3 -0
  280. data/app/views/process_engine/process_definitions/index.html.haml +26 -0
  281. data/app/views/process_engine/process_definitions/new.html.haml +3 -0
  282. data/app/views/process_engine/process_definitions/show.html.haml +51 -0
  283. data/app/views/process_engine/process_instances/_form.html.haml +5 -0
  284. data/app/views/process_engine/process_instances/edit.html.haml +3 -0
  285. data/app/views/process_engine/process_instances/index.html.haml +29 -0
  286. data/app/views/process_engine/process_instances/show.html.haml +38 -0
  287. data/app/views/process_engine/process_tasks/index.html.haml +44 -0
  288. data/app/views/process_engine/share/_bpmn_canvas.html.haml +7 -0
  289. data/config/initializers/bower_rails.rb +16 -0
  290. data/config/initializers/simple_form.rb +166 -0
  291. data/config/initializers/simple_form_bootstrap.rb +135 -0
  292. data/config/locales/simple_form.en.yml +31 -0
  293. data/config/routes.rb +18 -0
  294. data/db/migrate/20150313063311_create_process_engine_process_definitions.rb +14 -0
  295. data/db/migrate/20150313063508_create_process_engine_process_instances.rb +15 -0
  296. data/db/migrate/20150313063633_create_process_engine_process_tasks.rb +30 -0
  297. data/lib/process_engine/engine.rb +12 -0
  298. data/lib/process_engine/version.rb +3 -0
  299. data/lib/process_engine.rb +8 -0
  300. data/lib/tasks/process_engine_tasks.rake +4 -0
  301. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  302. data/test/dummy/README.rdoc +28 -0
  303. data/test/dummy/Rakefile +6 -0
  304. data/test/dummy/app/assets/javascripts/application.js +13 -0
  305. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  306. data/test/dummy/app/controllers/application_controller.rb +5 -0
  307. data/test/dummy/app/helpers/application_helper.rb +2 -0
  308. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  309. data/test/dummy/bin/bundle +3 -0
  310. data/test/dummy/bin/rails +4 -0
  311. data/test/dummy/bin/rake +4 -0
  312. data/test/dummy/bin/setup +29 -0
  313. data/test/dummy/config/application.rb +26 -0
  314. data/test/dummy/config/boot.rb +5 -0
  315. data/test/dummy/config/database.yml +85 -0
  316. data/test/dummy/config/environment.rb +5 -0
  317. data/test/dummy/config/environments/development.rb +41 -0
  318. data/test/dummy/config/environments/production.rb +79 -0
  319. data/test/dummy/config/environments/test.rb +42 -0
  320. data/test/dummy/config/initializers/assets.rb +11 -0
  321. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  322. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  323. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  324. data/test/dummy/config/initializers/inflections.rb +16 -0
  325. data/test/dummy/config/initializers/mime_types.rb +4 -0
  326. data/test/dummy/config/initializers/session_store.rb +3 -0
  327. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  328. data/test/dummy/config/locales/en.yml +23 -0
  329. data/test/dummy/config/routes.rb +4 -0
  330. data/test/dummy/config/secrets.yml +22 -0
  331. data/test/dummy/config.ru +4 -0
  332. data/test/dummy/db/schema.rb +66 -0
  333. data/test/dummy/log/development.log +9722 -0
  334. data/test/dummy/public/404.html +67 -0
  335. data/test/dummy/public/422.html +67 -0
  336. data/test/dummy/public/500.html +66 -0
  337. data/test/dummy/public/favicon.ico +0 -0
  338. data/test/dummy/tmp/cache/assets/development/sass/8afee1847b645742b0d2535a7c32f4f22e7926ec/bootstrap.scssc +0 -0
  339. data/test/dummy/tmp/cache/assets/development/sass/b5911aa594334efca1023d6f01abce0758e9648a/bootstrap.scssc +0 -0
  340. data/test/dummy/tmp/cache/assets/development/sprockets/014d8413350c7d85a5429f5e2c9ac911 +0 -0
  341. data/test/dummy/tmp/cache/assets/development/sprockets/0cbd667d0fbf9e0e6f60b5ebf2f95fa3 +0 -0
  342. data/test/dummy/tmp/cache/assets/development/sprockets/0f7ba040a442530a6d4a5bc8307769c1 +0 -0
  343. data/test/dummy/tmp/cache/assets/development/sprockets/0fca2cc9aa38138660d8c7d492cf81e4 +0 -0
  344. data/test/dummy/tmp/cache/assets/development/sprockets/0ff24903c54f534941fbc96ff862e475 +0 -0
  345. data/test/dummy/tmp/cache/assets/development/sprockets/11100f87277a2892323fe5581af75a7b +0 -0
  346. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  347. data/test/dummy/tmp/cache/assets/development/sprockets/18a34084783e8b7f9bc871bc64b13eed +0 -0
  348. data/test/dummy/tmp/cache/assets/development/sprockets/1a3821ce28e0196075ed0830fcb45f38 +0 -0
  349. data/test/dummy/tmp/cache/assets/development/sprockets/1cf94b9a49ee68cb0f4065d48e9cbaf3 +0 -0
  350. data/test/dummy/tmp/cache/assets/development/sprockets/21a6373d6c40614fd05be57194c68248 +0 -0
  351. data/test/dummy/tmp/cache/assets/development/sprockets/26276ae8df51c046f3adc0b50a1521ba +0 -0
  352. data/test/dummy/tmp/cache/assets/development/sprockets/2eea4a8f4854d438cd03cb23a89b6d8c +0 -0
  353. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  354. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  355. data/test/dummy/tmp/cache/assets/development/sprockets/3993bcd8bae4771e550d8fc91d1debbc +0 -0
  356. data/test/dummy/tmp/cache/assets/development/sprockets/3ccc4edae36a9c4bd70fc330c9c83dc9 +0 -0
  357. data/test/dummy/tmp/cache/assets/development/sprockets/3e391b0f37505fffc40ba9ffa13330a2 +0 -0
  358. data/test/dummy/tmp/cache/assets/development/sprockets/42e258b77f5dd532dfb9344a2d766de6 +0 -0
  359. data/test/dummy/tmp/cache/assets/development/sprockets/43a5910cb7a330ece5856c0e9099efa2 +0 -0
  360. data/test/dummy/tmp/cache/assets/development/sprockets/4e65ec1149f01e749e1e372861210d4d +0 -0
  361. data/test/dummy/tmp/cache/assets/development/sprockets/501160bcee63ae68449a5a5eb78b6d41 +0 -0
  362. data/test/dummy/tmp/cache/assets/development/sprockets/517beb0bf366ec3c8649da9ac8a8a01e +0 -0
  363. data/test/dummy/tmp/cache/assets/development/sprockets/525a556b1eaacfa041722e1250d9859a +0 -0
  364. data/test/dummy/tmp/cache/assets/development/sprockets/56edbae38e4e0ff9f4b4fc576ae3d746 +0 -0
  365. data/test/dummy/tmp/cache/assets/development/sprockets/5b04f4a7058d92f88f89f2248bcc16b0 +0 -0
  366. data/test/dummy/tmp/cache/assets/development/sprockets/5c3c69f7c2520b57620931c150032d7e +0 -0
  367. data/test/dummy/tmp/cache/assets/development/sprockets/5d1f8f2111e14084ebf711412c9230d2 +0 -0
  368. data/test/dummy/tmp/cache/assets/development/sprockets/5f9833d6835900c56d0e76a1b2924cc2 +0 -0
  369. data/test/dummy/tmp/cache/assets/development/sprockets/67c653cc36eb639f7a7af5159e9f9de3 +0 -0
  370. data/test/dummy/tmp/cache/assets/development/sprockets/704b33432a5ba417bcd5962ad999c671 +0 -0
  371. data/test/dummy/tmp/cache/assets/development/sprockets/7301f83e8e67f30be13546a794a553ef +0 -0
  372. data/test/dummy/tmp/cache/assets/development/sprockets/7482c8f712712a79937caf41413bca15 +0 -0
  373. data/test/dummy/tmp/cache/assets/development/sprockets/761cb171e67ddca71e8b9c74f0220457 +0 -0
  374. data/test/dummy/tmp/cache/assets/development/sprockets/7e23bd4385e166267961b6d936363042 +0 -0
  375. data/test/dummy/tmp/cache/assets/development/sprockets/7e5100f290c9ba0d4c026e43b58d0d79 +0 -0
  376. data/test/dummy/tmp/cache/assets/development/sprockets/80743880e8d46958e9839ff9408c3113 +0 -0
  377. data/test/dummy/tmp/cache/assets/development/sprockets/8b8941aae968854bafb4638a86cad77b +0 -0
  378. data/test/dummy/tmp/cache/assets/development/sprockets/9c292f3b6b577a92970303c351e1d4a1 +0 -0
  379. data/test/dummy/tmp/cache/assets/development/sprockets/a3435b13cfa60fb7469a19703350bda7 +0 -0
  380. data/test/dummy/tmp/cache/assets/development/sprockets/a6ce1b2837383f1e8b62b7f1ddcc6820 +0 -0
  381. data/test/dummy/tmp/cache/assets/development/sprockets/a7e90acc68ba69b7cd5c0a7005467c4b +0 -0
  382. data/test/dummy/tmp/cache/assets/development/sprockets/be4d00fb7bf467b370f0fda7e453ec68 +0 -0
  383. data/test/dummy/tmp/cache/assets/development/sprockets/c4fbf44e63e40cbbf825fe750374728f +0 -0
  384. data/test/dummy/tmp/cache/assets/development/sprockets/c593bacb8d3f003125f91763a7b36b10 +0 -0
  385. data/test/dummy/tmp/cache/assets/development/sprockets/c5ae3bc69f7b1e1fdb51a667c9f3cdd6 +0 -0
  386. data/test/dummy/tmp/cache/assets/development/sprockets/cc843b336460771bf75c97cf0935301b +0 -0
  387. data/test/dummy/tmp/cache/assets/development/sprockets/ce3b6127737ed36f7b62a54acec06b3e +0 -0
  388. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  389. data/test/dummy/tmp/cache/assets/development/sprockets/d58931b13c55c146d21475e532b126ba +0 -0
  390. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  391. data/test/dummy/tmp/cache/assets/development/sprockets/dc6bbdc1e385c7bb2743011e9c2a7407 +0 -0
  392. data/test/dummy/tmp/cache/assets/development/sprockets/dd7270e11b484ae10f601e1dd014445a +0 -0
  393. data/test/dummy/tmp/cache/assets/development/sprockets/de86beefc60e0cd84dd1525af863e64d +0 -0
  394. data/test/dummy/tmp/cache/assets/development/sprockets/e0953e6e4a6c208e350f7f25d85bdce8 +0 -0
  395. data/test/dummy/tmp/cache/assets/development/sprockets/ec3b479833be43bf164a3deb119c3aee +0 -0
  396. data/test/dummy/tmp/cache/assets/development/sprockets/ef2cb0afc9a61a3d5819b4dfc84720ad +0 -0
  397. data/test/dummy/tmp/cache/assets/development/sprockets/f0511bbd6f6cd5530acddebb6d7e7044 +0 -0
  398. data/test/dummy/tmp/cache/assets/development/sprockets/f7009bba030498129042e0c542d4f264 +0 -0
  399. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  400. data/test/fixtures/process_engine/process_definitions.yml +17 -0
  401. data/test/fixtures/process_engine/process_instances.yml +11 -0
  402. data/test/fixtures/process_engine/process_tasks.yml +11 -0
  403. data/test/integration/navigation_test.rb +10 -0
  404. data/test/models/process_engine/process_definition_test.rb +9 -0
  405. data/test/models/process_engine/process_instance_test.rb +9 -0
  406. data/test/models/process_engine/process_task_test.rb +9 -0
  407. data/test/process_engine_test.rb +7 -0
  408. data/test/test_helper.rb +19 -0
  409. metadata +740 -0
@@ -0,0 +1,8 @@
1
+ /*! bpmn-js - bpmn-modeler v0.8.0 | (c) 2014, 2015 camunda Services GmbH | bpmn.io/license */
2
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.BpmnJS=e()}}(function(){var e;return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var p=new Error("Cannot find module '"+a+"'");throw p.code="MODULE_NOT_FOUND",p}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return r(n?n:t)},u,u.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t){"use strict";function n(e){a.call(this,e)}var i=e(35),r=e(37),o=e(161),a=e(2),s='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>';n.prototype=Object.create(a.prototype),n.prototype.createDiagram=function(e){return this.importXML(s,e)},n.prototype.createModdle=function(){var e=new i;return r.extend(e,new o([32,36,1])),e},n.prototype._interactionModules=[e(12),e(147),e(144),e(145)],n.prototype._modelingModules=[e(93),e(135),e(117),e(79),e(126),e(95),e(23),e(8),e(27)],n.prototype._modules=[].concat(n.prototype._modules,n.prototype._interactionModules,n.prototype._modelingModules),t.exports=n},{}],2:[function(e,t){"use strict";function n(e,t){var n=e.get("eventBus");t.forEach(function(e){n.on(e.event,e.handler)})}function i(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/,n=t.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}function r(e){this.options=e=c.extend({},u,e||{});var t=e.container||s("body"),n=s('<div class="bjs-container"></div>').appendTo(t);n.css({width:e.width,height:e.height,position:e.position}),this.container=n.get(0);{var i="iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC",r=s('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" />').css({position:"absolute",bottom:15,right:15,zIndex:100});s("<img/>").attr("src","data:image/png;base64,"+i).appendTo(r)}r.appendTo(n)}var o=e(60),a=e(35),s=window.$,c=window._,p=e(30),u={width:"100%",height:"100%",position:"relative"};r.prototype.importXML=function(e,t){var n=this;this.moddle=this.createModdle(),this.moddle.fromXML(e,"bpmn:Definitions",function(e,r){return e?(e=i(e),t(e)):void n.importDefinitions(r,t)})},r.prototype.saveXML=function(e,t){t||(t=e,e={});var n=this.definitions;return n?void this.moddle.toXML(n,e,t):t(new Error("no definitions loaded"))},r.prototype.createModdle=function(){return new a},r.prototype.saveSVG=function(e,t){t||(t=e,e={});var n=this.get("canvas"),i=n.getDefaultLayer(),r=n._svg.select("defs"),o=i.innerSVG(),a=r&&r.outerSVG()||"",s=i.getBBox(),c='<?xml version="1.0" encoding="utf-8"?>\n<!-- created with bpmn-js / http://bpmn.io -->\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+s.width+'" height="'+s.height+'" viewBox="'+s.x+" "+s.y+" "+s.width+" "+s.height+'" version="1.1">'+a+o+"</svg>";t(null,c)},r.prototype.get=function(e){if(!this.diagram)throw new Error("no diagram loaded");return this.diagram.get(e)},r.prototype.invoke=function(e){if(!this.diagram)throw new Error("no diagram loaded");return this.diagram.invoke(e)},r.prototype.importDefinitions=function(e,t){try{this.diagram&&this.clear(),this.definitions=e;var n=this.diagram=this._createDiagram(this.options);this._init(n),p.importBpmnDiagram(n,e,t)}catch(i){t(i)}},r.prototype._init=function(e){n(e,this.__listeners||[])},r.prototype._createDiagram=function(e){var t=[].concat(e.modules||this.getModules(),e.additionalModules||[]);return t.unshift({bpmnjs:["value",this],moddle:["value",this.moddle]}),e=c.omit(e,"additionalModules"),e=c.extend(e,{canvas:{container:this.container},modules:t}),new o(e)},r.prototype.getModules=function(){return this._modules},r.prototype.clear=function(){var e=this.diagram;e&&e.destroy()},r.prototype.destroy=function(){this.clear(),s(this.container).remove()},r.prototype.on=function(e,t){var n=this.diagram,i=this.__listeners=this.__listeners||[];i.push({event:e,handler:t}),n&&n.get("eventBus").on(e,t)},r.prototype._modules=[e(3),e(133),e(121)],t.exports=r},{}],3:[function(e,t){t.exports={__depends__:[e(6),e(32)]}},{}],4:[function(e,t){"use strict";function n(e,t,n){function c(e,t){j[e]=t}function p(e){return j[e]}function u(e){function t(e,t){var n=i.extend({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),r=t.ref||{x:0,y:0},o=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var a=t.element.attr(n).marker(0,0,20,20,r.x,r.y).attr({markerWidth:20*o,markerHeight:20*o});return c(e,a)}t("sequenceflow-end",{element:e.path("M 1 5 L 11 10 L 1 15 Z"),ref:{x:11,y:10},scale:.5}),t("messageflow-start",{element:e.circle(6,6,5),attrs:{fill:"white",stroke:"black"},ref:{x:6,y:6}}),t("messageflow-end",{element:e.path("M 1 5 L 11 10 L 1 15 Z"),attrs:{fill:"white",stroke:"black"},ref:{x:11,y:10}}),t("data-association-end",{element:e.path("M 1 5 L 11 10 L 1 15"),attrs:{fill:"white",stroke:"black"},ref:{x:11,y:10},scale:.5}),t("conditional-flow-marker",{element:e.path("M 0 10 L 8 6 L 16 10 L 8 14 Z"),attrs:{fill:"white",stroke:"black"},ref:{x:-1,y:10},scale:.5}),t("conditional-default-flow-marker",{element:e.path("M 1 4 L 5 16"),attrs:{stroke:"black"},ref:{x:-5,y:10},scale:.5})}function l(e,n,r){return i.isArray(n)||(r=n,n=[]),t.style(n||[],i.extend(r,e||{}))}function d(e,t,n,r,o){i.isObject(r)&&(o=r,r=0),r=r||0,o=l(o,{stroke:"black",strokeWidth:2,fill:"white"});var a=t/2,s=n/2;return e.circle(a,s,Math.round((t+n)/4-r)).attr(o)}function h(e,t,n,r,o,a){return i.isObject(o)&&(a=o,o=0),o=o||0,a=l(a,{stroke:"black",strokeWidth:2,fill:"white"}),e.rect(o,o,t-2*o,n-2*o,r).attr(a)}function f(e,t,n,i){var r=t/2,o=n/2,a=[r,0,t,o,r,n,0,o];return i=l(i,{stroke:"black",strokeWidth:2,fill:"white"}),e.polygon(a).attr(i)}function m(e,t,n){return n=l(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}),s(t,n).appendTo(e)}function y(e,t,n){return n=l(n,["no-fill"],{strokeWidth:2,stroke:"black"}),e.path(t).attr(n)}function v(e){return function(t,n){return F[e](t,n)}}function g(e){return F[e]}function x(e,t){var n=T(e),i=O(n);return B(n,"bpmn:MessageEventDefinition")?g("bpmn:MessageEventDefinition")(t,e,i):B(n,"bpmn:TimerEventDefinition")?g("bpmn:TimerEventDefinition")(t,e,i):B(n,"bpmn:ConditionalEventDefinition")?g("bpmn:ConditionalEventDefinition")(t,e):B(n,"bpmn:SignalEventDefinition")?g("bpmn:SignalEventDefinition")(t,e,i):B(n,"bpmn:CancelEventDefinition")&&B(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!1})?g("bpmn:MultipleEventDefinition")(t,e,i):B(n,"bpmn:CancelEventDefinition")&&B(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!0})?g("bpmn:ParallelMultipleEventDefinition")(t,e,i):B(n,"bpmn:EscalationEventDefinition")?g("bpmn:EscalationEventDefinition")(t,e,i):B(n,"bpmn:LinkEventDefinition")?g("bpmn:LinkEventDefinition")(t,e,i):B(n,"bpmn:ErrorEventDefinition")?g("bpmn:ErrorEventDefinition")(t,e,i):B(n,"bpmn:CancelEventDefinition")?g("bpmn:CancelEventDefinition")(t,e,i):B(n,"bpmn:CompensateEventDefinition")?g("bpmn:CompensateEventDefinition")(t,e,i):B(n,"bpmn:TerminateEventDefinition")?g("bpmn:TerminateEventDefinition")(t,e,i):null}function w(e,t,n){return I.createText(e,t||"",n).addClass("djs-label")}function E(e,t,n){var i=T(t);return w(e,i.name,{box:t,align:n,padding:5})}function _(e,t,n){var i=T(t);return i.name||(t.hidden=!0),w(e,i.name,{box:t,align:n,style:{fontSize:"11px"}})}function b(e,t,n){var i=w(e,t,{box:{height:30,width:n.height},align:"center-middle"}),r=-1*n.height;i.transform("rotate(270) translate("+r+",0)")}function S(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;i<t.length;i++)n+="L"+t[i].x+","+t[i].y+" ";return n}function A(e,t,n){var r,o=T(t),a=i.contains(n,"SubProcessMarker");return r=a?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},i.forEach(n,function(n){g(n)(e,t,r)}),"bpmn:AdHocSubProcess"===o.$type&&g("AdhocMarker")(e,t,r),o.loopCharacteristics&&void 0===o.loopCharacteristics.isSequential?void g("LoopMarker")(e,t,r):(o.loopCharacteristics&&void 0!==o.loopCharacteristics.isSequential&&!o.loopCharacteristics.isSequential&&g("ParallelMarker")(e,t,r),o.loopCharacteristics&&o.loopCharacteristics.isSequential&&g("SequentialMarker")(e,t,r),void(o.isForCompensation&&g("CompensationMarker")(e,t,r)))}function C(e,t){var n=t.type,i=F[n];return i?i(e,t):r.prototype.drawShape.apply(this,[e,t])}function R(e,t){var n=t.type,i=F[n];return i?i(e,t):r.prototype.drawConnection.apply(this,[e,t])}function P(e,t){{var i=(t.height-16)/t.height,r=n.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.451,my:i}});y(e,r,{strokeWidth:2})}}function M(e){return e.isCollection||e.elementObjectRef&&e.elementObjectRef.isCollection}function k(e){return e.businessObject.di}function T(e){return e.businessObject}function B(e,t,n){function r(e,t){return i.all(t,function(t,n){return e[n]==t})}return i.any(e.eventDefinitions,function(i){return i.$type===t&&r(e,n)})}function O(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}r.call(this,t);var D=10,N=3,L={fontFamily:"Arial, sans-serif",fontSize:"12px"},I=new o({style:L,size:{width:100}}),j={},F={"bpmn:Event":function(e,t,n){return d(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={},i=T(t);i.isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round"});var r=g("bpmn:Event")(e,t,n);return x(t,e),r},"bpmn:MessageEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),o=i?"black":"white",a=i?"white":"black",s=y(e,r,{strokeWidth:1,fill:o,stroke:a});return s},"bpmn:TimerEventDefinition":function(e,t){for(var i=d(e,t.width,t.height,.2*t.height,{strokeWidth:2}),r=n.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),o=(y(e,r,{strokeWidth:2,strokeLinecap:"square"}),0);12>o;o++){var a=n.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,c=t.height/2;y(e,a,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*o+","+c+","+s+")"})}return i},"bpmn:EscalationEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.555}}),o=i?"black":"none";return y(e,r,{strokeWidth:1,fill:o})},"bpmn:ConditionalEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}});return y(e,i,{strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}});return y(e,i,{strokeWidth:1})},"bpmn:ErrorEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),o=i?"black":"none";return y(e,r,{strokeWidth:1,fill:o})},"bpmn:CancelEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),o=i?"black":"none";return y(e,r,{strokeWidth:1,fill:o}).transform("rotate(45)")},"bpmn:CompensateEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.201,my:.472}}),o=i?"black":"none";return y(e,r,{strokeWidth:1,fill:o})},"bpmn:SignalEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),o=i?"black":"none";return y(e,r,{strokeWidth:1,fill:o})},"bpmn:MultipleEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),o=i?"black":"none";return y(e,r,{strokeWidth:1,fill:o})},"bpmn:ParallelMultipleEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}});return y(e,i,{strokeWidth:1})},"bpmn:EndEvent":function(e,t){var n=g("bpmn:Event")(e,t,{strokeWidth:4});return x(t,e,!0),n},"bpmn:TerminateEventDefinition":function(e,t){var n=d(e,t.width,t.height,8,{strokeWidth:4,fill:"black"});return n},"bpmn:IntermediateEvent":function(e,t){{var n=g("bpmn:Event")(e,t,{strokeWidth:1});d(e,t.width,t.height,N,{strokeWidth:1,fill:"none"})}return x(t,e),n},"bpmn:IntermediateCatchEvent":v("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":v("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return h(e,t.width,t.height,D,n)},"bpmn:Task":function(e,t){var n=g("bpmn:Activity")(e,t);return E(e,t,"center-middle"),A(e,t),n},"bpmn:ServiceTask":function(e,t){{var i=g("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),o=(y(e,r,{strokeWidth:1,fill:"none"}),n.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}})),a=(y(e,o,{strokeWidth:0,stroke:"none",fill:"white"}),n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}));y(e,a,{strokeWidth:1,fill:"white"})}return i},"bpmn:UserTask":function(e,t){{var i=g("bpmn:Task")(e,t),r=15,o=12,a=n.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:r,y:o}}),s=(y(e,a,{strokeWidth:.5,fill:"none"}),n.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:r,y:o}})),c=(y(e,s,{strokeWidth:.5,fill:"none"}),n.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:r,y:o}}));y(e,c,{strokeWidth:.5,fill:"black"})}return i},"bpmn:ManualTask":function(e,t){{var i=g("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});y(e,r,{strokeWidth:.25,fill:"white",stroke:"black"})}return i},"bpmn:SendTask":function(e,t){{var i=g("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});y(e,r,{strokeWidth:1,fill:"black",stroke:"white"})}return i},"bpmn:ReceiveTask":function(e,t){var i,r=T(t),o=g("bpmn:Task")(e,t);r.instantiate?(d(e,28,28,4.4,{strokeWidth:1}),i=n.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}});y(e,i,{strokeWidth:1});return o},"bpmn:ScriptTask":function(e,t){{var i=g("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});y(e,r,{strokeWidth:1})}return i},"bpmn:BusinessRuleTask":function(e,t){var i=g("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),o=y(e,r);o.attr({strokeWidth:1,fill:"AAA"});var a=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),s=y(e,a);return s.attr({strokeWidth:1}),i},"bpmn:SubProcess":function(e,t,n){var i=g("bpmn:Activity")(e,t,n),r=T(t),o=(k(t),a.isExpanded(r)),s=!!r.triggeredByEvent;return s&&i.attr({strokeDasharray:"1,2"}),E(e,t,o?"center-top":"center-middle"),o?A(e,t):A(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return g("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,n){{var i=g("bpmn:SubProcess")(e,n),r=t.style(["no-fill","no-events"]);h(e,n.width,n.height,D-2,N,r)}return i},"bpmn:CallActivity":function(e,t){return g("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n=g("bpmn:Lane")(e,t),i=a.isExpandedPool(T(t));if(i){m(e,[{x:30,y:0},{x:30,y:t.height}]);var r=T(t).name;b(e,r,t)}else{var o=T(t).name;w(e,o,{box:t,align:"center-middle"})}var s=!!T(t).participantMultiplicity;return s&&g("ParticipantMultiplicityMarker")(e,t),n},"bpmn:Lane":function(e,t){var n=h(e,t.width,t.height,0,{fill:"none"}),i=T(t);if("bpmn:Lane"===i.$type){var r=i.name;b(e,r,t)}return n},"bpmn:InclusiveGateway":function(e,t){{var n=f(e,t.width,t.height);d(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:"none"})}return n},"bpmn:ExclusiveGateway":function(e,t){var i=f(e,t.width,t.height),r=n.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return k(t).isMarkerVisible&&y(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:ComplexGateway":function(e,t){{var i=f(e,t.width,t.height),r=n.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}});y(e,r,{strokeWidth:1,fill:"black"})}return i},"bpmn:ParallelGateway":function(e,t){{var i=f(e,t.width,t.height),r=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}});y(e,r,{strokeWidth:1,fill:"black"})}return i},"bpmn:EventBasedGateway":function(e,t){function i(){{var i=n.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});y(e,i,{strokeWidth:2,fill:"none"})}}var r=T(t),o=f(e,t.width,t.height),a=(d(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none"}),r.eventGatewayType),s=!!r.instantiate;if("Parallel"===a){var c=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),p=y(e,c);p.attr({strokeWidth:1,fill:"none"})}else if("Exclusive"===a){if(!s){var u=d(e,t.width,t.height,.26*t.height);u.attr({strokeWidth:1,fill:"none"})}i()}return o},"bpmn:Gateway":function(e,t){return f(e,t.width,t.height)},"bpmn:SequenceFlow":function(e,t){var n=S(t),i=y(e,n,{markerEnd:p("sequenceflow-end")}),r=T(t),o=t.source.businessObject;return r.conditionExpression&&o.$instanceOf("bpmn:Task")&&i.attr({markerStart:p("conditional-flow-marker")}),o["default"]&&o.$instanceOf("bpmn:Gateway")&&o["default"]===r&&i.attr({markerStart:p("conditional-default-flow-marker")}),i},"bpmn:Association":function(e,t,n){return n=i.extend({strokeDasharray:"1,6",strokeLinecap:"round"},n||{}),m(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){return g("bpmn:Association")(e,t,{markerEnd:p("data-association-end")})},"bpmn:DataOutputAssociation":function(e,t){return g("bpmn:Association")(e,t,{markerEnd:p("data-association-end")})},"bpmn:MessageFlow":function(e,t){var i=k(t),r=S(t),o=y(e,r,{markerEnd:p("messageflow-end"),markerStart:p("messageflow-start"),strokeDasharray:"10",strokeLinecap:"round",strokeWidth:1});if(i.messageVisibleKind){var a=o.getPointAtLength(o.getTotalLength()/2),s=n.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:a.x,y:a.y}}),c={strokeWidth:1};"initiating"===i.messageVisibleKind?(c.fill="white",c.stroke="black"):(c.fill="#888",c.stroke="white"),y(e,s,c)}return o},"bpmn:DataObject":function(e,t){var i=n.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),r=y(e,i,{fill:"white"}),o=T(t);return M(o)&&P(e,t),r},"bpmn:DataObjectReference":v("bpmn:DataObject"),"bpmn:DataInput":function(e,t){{var i=n.getRawPath("DATA_ARROW"),r=g("bpmn:DataObject")(e,t);y(e,i,{strokeWidth:1})}return r},"bpmn:DataOutput":function(e,t){{var i=n.getRawPath("DATA_ARROW"),r=g("bpmn:DataObject")(e,t);y(e,i,{strokeWidth:1,fill:"black"})}return r},"bpmn:DataStoreReference":function(e,t){var i=n.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),r=y(e,i,{strokeWidth:2,fill:"white"});return r},"bpmn:BoundaryEvent":function(e,t){var n=T(t),i=n.cancelActivity,r={strokeLinecap:"round",strokeWidth:1};i||(r.strokeDasharray="6");{var o=g("bpmn:Event")(e,t,r);d(e,t.width,t.height,N,r)}return x(t,e),o},"bpmn:Group":function(e,t){return h(e,t.width,t.height,D,{strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return _(e,t,"")},"bpmn:TextAnnotation":function(e,t){var i={fill:"none",stroke:"none"},r=h(e,t.width,t.height,0,0,i),o=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}});y(e,o);var a=T(t).text||"";return w(e,a,{box:t,align:"left-middle",padding:5}),r},ParticipantMultiplicityMarker:function(e,t){var i=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:t.width/2/t.width,my:(t.height-15)/t.height}});y(e,i)},SubProcessMarker:function(e,t){var i=h(e,14,14,0,{strokeWidth:1});i.transform("translate("+(t.width/2-7.5)+","+(t.height-20)+")");var r=n.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}});y(e,r)},ParallelMarker:function(e,t,i){var r=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.parallel)/t.width,my:(t.height-20)/t.height}});y(e,r)},SequentialMarker:function(e,t,i){var r=n.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.seq)/t.width,my:(t.height-19)/t.height}});y(e,r)},CompensationMarker:function(e,t,i){var r=n.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.compensation)/t.width,my:(t.height-13)/t.height}});y(e,r,{strokeWidth:1})},LoopMarker:function(e,t,i){var r=n.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.loop)/t.width,my:(t.height-7)/t.height}});y(e,r,{strokeWidth:1,fill:"none",strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,i){var r=n.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.adhoc)/t.width,my:(t.height-15)/t.height}});y(e,r,{strokeWidth:1,fill:"black"})}};e.on("canvas.init",function(e){u(e.svg)}),this.drawShape=C,this.drawConnection=R}var i=window._,r=e(70),o=e(156),a=e(33),s=r.createLine;n.prototype=Object.create(r.prototype),n.$inject=["eventBus","styles","pathMap"],t.exports=n},{}],5:[function(e,t){"use strict";function n(e){this.pathMap={EVENT_MESSAGE:{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}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{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} {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",height:36,width:36,heightElements:[2.382,4.764,4.926,6.589333,7.146,13.178667,19.768],widthElements:[2.463,2.808,4.926,5.616,7.389,8.424]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{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",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{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",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x0},0 {e.x0},-{e.y0} 0,{e.y1} z",height:36,width:36,heightElements:[5,10],widthElements:[10]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{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} {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} {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} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{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",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m {mx}, {my} m 0 15 l 0 -15 m 4 15 l 0 -15 m 4 15 l 0 -15 ",height:61,width:51,heightElements:[12],widthElements:[1,6,12,15]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 8,-5 0,10 z m 9,0 8,-5 0,10 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{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 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 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 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{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}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{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 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{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 -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 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 -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 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 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -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 -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 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 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{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"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 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 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{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"}},this.getRawPath=function(e){return this.pathMap[e].d
3
+ },this.getScaledPath=function(t,n){var i,r,o=this.pathMap[t];n.abspos?(i=n.abspos.x,r=n.abspos.y):(i=n.containerWidth*n.position.mx,r=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/o.height*n.yScaleFactor,c=n.containerWidth/o.width*n.xScaleFactor,p=0;p<o.heightElements.length;p++)a["y"+p]=o.heightElements[p]*s;for(var u=0;u<o.widthElements.length;u++)a["x"+u]=o.widthElements[u]*c}var l=e.format(o.d,{mx:i,my:r,e:a});return l}}n.$inject=["snap"],t.exports=n},{}],6:[function(e,t){t.exports={renderer:["type",e(4)],pathMap:["type",e(5)]}},{}],7:[function(e,t){"use strict";function n(e,t,n,i,r,o,a){e.registerProvider(this),this._directEditing=t,this._modeling=n,this._selection=i,this._elementFactory=r,this._connect=o,this._create=a}var i=window._;n.$inject=["contextPad","directEditing","modeling","selection","elementFactory","connect","create"],n.prototype.getContextPadEntries=function(e){function t(e,t,n){s.start(e,t,n)}function n(e,t){function n(t,n){var i=a.createShape({type:e});c.start(t,i,n)}return{group:"model",className:t,action:{dragstart:n,click:n}}}function r(){e.waypoints?o.removeConnection(e):o.removeShape(e)}var o=(this._directEditing,this._modeling),a=(this._selection,this._elementFactory),s=this._connect,c=this._create,p={};if("label"===e.type)return p;var u=e.businessObject;return u.$instanceOf("bpmn:FlowNode")&&(u.$instanceOf("bpmn:EndEvent")||i.extend(p,{"append.end-event":n("bpmn:EndEvent","icon-end-event"),"append.gateway":n("bpmn:ExclusiveGateway","icon-gateway"),"append.append-task":n("bpmn:Task","icon-task"),"append.intermediate-event":n("bpmn:IntermediateThrowEvent","icon-intermediate-event"),connect:{group:"connect",className:"icon-connection",action:{click:t,dragstart:t}}}),i.extend(p,{"append.text-annotation":n("bpmn:TextAnnotation","icon-text-annotation")})),i.extend(p,{"delete":{group:"edit",className:"icon-trash",action:{click:r,dragstart:r}}}),p},t.exports=n},{}],8:[function(e,t){t.exports={__depends__:[e(57),e(85),e(133),e(83),e(87),e(23)],__init__:["contextPadProvider"],contextPadProvider:["type",e(7)]}},{}],9:[function(e,t){"use strict";function n(e,t,n,r){n.registerProvider(this),r.registerHandler("element.updateLabel",i),e.on("element.dblclick",function(e){n.activate(e.element)}),e.on(["element.mousedown","drag.activate","canvas.viewbox.changed"],function(){n.complete()}),e.on(["commandStack.changed"],function(){n.cancel()}),"ontouchstart"in document.documentElement||e.on("create.end",500,function(e){var t=e.shape,i=t.businessObject;(i.$instanceOf("bpmn:Task")||i.$instanceOf("bpmn:TextAnnotation")||i.$instanceOf("bpmn:SubProcess")&&!i.di.isExpanded)&&n.activate(t)}),this._canvas=t,this._commandStack=r}var i=(window._,e(11)),r=e(10),o=e(33),a={width:150,height:50};n.$inject=["eventBus","canvas","directEditing","commandStack","injector"],t.exports=n,n.prototype.activate=function(e){var t=e.businessObject,n=t.di,i=r.getLabel(e);if(void 0!==i){var s=this.getEditingBBox(e);return(t.$instanceOf("bpmn:Participant")&&o.isExpandedPool(t)||t.$instanceOf("bpmn:Lane"))&&(s.width=a.width,s.height=a.height,s.x=s.x+10-s.width/2,s.y=s.mid.y-s.height/2),t.$instanceOf("bpmn:SubProcess")&&o.isExpanded(t,n)&&(s.height=a.height,s.x=s.mid.x-s.width/2,s.y=s.y+10-s.height/2),{bounds:s,text:i}}},n.prototype.getEditingBBox=function(e){var t=e.label||e,n=this._canvas.getAbsoluteBBox(t),i={x:n.x+n.width/2,y:n.y+n.height/2};return t.labelTarget&&(n.width=Math.max(n.width,a.width),n.height=Math.max(n.height,a.height),n.x=i.x-n.width/2),n.mid=i,n},n.prototype.update=function(e,t){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t})}},{}],10:[function(e,t){function n(e){return e.$instanceOf("bpmn:FlowElement")||e.$instanceOf("bpmn:Participant")||e.$instanceOf("bpmn:Lane")||e.$instanceOf("bpmn:SequenceFlow")||e.$instanceOf("bpmn:MessageFlow")?"name":e.$instanceOf("bpmn:TextAnnotation")?"text":void 0}t.exports.getLabel=function(e){var t=e.businessObject,i=n(t);return i?t[i]||"":void 0},t.exports.setLabel=function(e,t){var i=e.businessObject,r=n(i);r&&(i[r]=t);var o=e.label||e;return o.hidden=!1,o}},{}],11:[function(e,t){"use strict";function n(e){function t(t,n){var r=i.setLabel(t,n);e.fire("element.changed",{element:r})}function n(e){return e.oldLabel=i.getLabel(e.element),t(e.element,e.newLabel)}function r(e){return t(e.element,e.oldLabel)}function o(){return!0}this.execute=n,this.revert=r,this.canExecute=o}var i=e(10);n.$inject=["eventBus"],t.exports=n},{}],12:[function(e,t){t.exports={__depends__:[e(63),e(81),e(57)],__init__:["labelEditingProvider"],labelEditingProvider:["type",e(9)]}},{}],13:[function(e,t){"use strict";function n(e){this._model=e}var i=window._;n.$inject=["moddle"],n.prototype._needsId=function(e){return e.$instanceOf("bpmn:RootElement")||e.$instanceOf("bpmn:FlowElement")||e.$instanceOf("bpmn:Artifact")||e.$instanceOf("bpmndi:BPMNShape")||e.$instanceOf("bpmndi:BPMNEdge")||e.$instanceOf("bpmndi:BPMNDiagram")||e.$instanceOf("bpmndi:BPMNPlane")},n.prototype._ensureId=function(e){var t=(e.$type||"").replace(/^[^:]*:/g,"")+"_";!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))},n.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},n.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},n.prototype.createDiShape=function(e,t,n){return this.create("bpmndi:BPMNShape",i.extend({bpmnElement:e,bounds:this.createDiBounds(t)},n))},n.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},n.prototype.createDiWaypoints=function(e){return i.map(e,function(e){return this.createDiWaypoint(e)},this)},n.prototype.createDiWaypoint=function(e){return this.create("dc:Point",i.pick(e,["x","y"]))},n.prototype.createDiEdge=function(e,t,n){return this.create("bpmndi:BPMNEdge",i.extend({bpmnElement:e},n))},t.exports=n},{}],14:[function(e,t){"use strict";function n(e,t,n){function i(e){var t,i=e.context;i.cropped||(t=i.connection,t.waypoints=n.getCroppedWaypoints(t),i.cropped=!0)}function r(e){c.updateParent(e.context.shape||e.context.connection)}function o(e){c.updateBounds(e.context.shape)}function a(e){c.updateConnection(e.context.connection)}function s(e){c.updateConnectionWaypoints(e.context.connection)}this._eventBus=e,this._bpmnFactory=t;var c=this;this.executed(["connection.layout","connection.create","connection.reconnectEnd","connection.reconnectStart"],i),this.reverted(["connection.layout"],function(e){delete e.context.cropped}),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],r),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],r),this.executed(["shape.move","shape.create","shape.resize"],o),this.reverted(["shape.move","shape.create","shape.resize"],o),this.executed(["connection.create","connection.move","connection.delete","connection.reconnectEnd","connection.reconnectStart"],a),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnectEnd","connection.reconnectStart"],a),this.executed(["connection.layout","connection.move","connection.updateWaypoints","connection.reconnectEnd","connection.reconnectStart"],s),this.reverted(["connection.layout","connection.move","connection.updateWaypoints","connection.reconnectEnd","connection.reconnectStart"],s)}var i=window._,r=e(148),o=e(142);t.exports=n,n.$inject=["eventBus","bpmnFactory","connectionDocking"],n.prototype.updateParent=function(e){if(!(e instanceof o.Label)){var t=e.parent,n=e.businessObject,i=t&&t.businessObject,r=i&&i.di;this.updateSemanticParent(n,i),this.updateDiParent(n.di,r)}},n.prototype.updateBounds=function(e){var t=e.businessObject.di,n=e instanceof o.Label?this._getLabel(t).bounds:t.bounds;i.extend(n,{x:e.x,y:e.y,width:e.width,height:e.height})},n.prototype.updateDiParent=function(e,t){if(t&&!t.$instanceOf("bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(r.remove(n,e),e.$parent=null)}},n.prototype.updateSemanticParent=function(e,t){var n;if(e.$parent!==t){if(e.$instanceOf("bpmn:FlowElement")){if(e.$parent===t)return;t&&t.$instanceOf("bpmn:Participant")&&(t=t.processRef),n="flowElements"}else if(e.$instanceOf("bpmn:Artifact")){for(;t&&!t.$instanceOf("bpmn:Process")&&!t.$instanceOf("bpmn:SubProcess")&&!t.$instanceOf("bpmn:Collaboration");){if(t.$instanceOf("bpmn:Participant")){t=t.processRef;break}t=t.$parent}n="artifacts"}if(!n)throw new Error("no parent for ",e,t);var i;e.$parent&&(i=e.$parent.get(n),r.remove(i,e)),t?(i=t.get(n),i.push(e),e.$parent=t):e.$parent=null}},n.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},n.prototype.updateConnection=function(e){var t=e.businessObject,n=e.source&&e.source.businessObject,i=e.target&&e.target.businessObject,o=t.$instanceOf("bpmn:SequenceFlow");t.sourceRef!==n&&(o&&(r.remove(t.sourceRef&&t.sourceRef.get("outgoing"),t),n&&n.get("outgoing").push(t)),t.sourceRef=n),t.targetRef!==i&&(o&&(r.remove(t.targetRef&&t.targetRef.get("incoming"),t),i&&i.get("incoming").push(t)),t.targetRef=i),t.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},n.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},n.prototype.pre=function(e,t){this.on(e,"preExecute",t)},n.prototype.executed=function(e,t){this.on(e,"executed",t)},n.prototype.reverted=function(e,t){this.on(e,"reverted",t)},n.prototype.on=function(e,t,n){e=i.isArray(e)?e:[e],i.forEach(e,function(e){this._eventBus.on("commandStack."+e+"."+t,n)},this)}},{}],15:[function(e,t){"use strict";function n(e){r.call(this),this._bpmnFactory=e}var i=window._,r=e(65),o=e(34);n.prototype=Object.create(r.prototype),n.$inject=["bpmnFactory"],t.exports=n,n.prototype.baseCreate=r.prototype.create,n.prototype.create=function(e,t){if("label"===e)return this.baseCreate(e,i.extend({type:"label"},o.DEFAULT_LABEL_SIZE,t));t=t||{};var n,r=t.businessObject;if(!r){if(!t.type)throw new Error("no shape type specified");r=this._bpmnFactory.create(t.type)}return r.di||(r.di="connection"===e?this._bpmnFactory.createDiEdge(r,[],{id:r.id+"_di"}):this._bpmnFactory.createDiShape(r,{},{id:r.id+"_di"})),t.isExpanded&&(r.di.isExpanded=t.isExpanded),n=this._getDefaultSize(r),t=i.extend({businessObject:r,id:r.id},n,t),this.baseCreate(e,t)},n.prototype._getDefaultSize=function(e){if(e.$instanceOf("bpmn:SubProcess")){var t=e.di.isExpanded===!0;return t?{width:350,height:200}:{width:100,height:80}}return e.$instanceOf("bpmn:Task")?{width:100,height:80}:e.$instanceOf("bpmn:Gateway")?{width:50,height:50}:e.$instanceOf("bpmn:Event")?{width:36,height:36}:{width:100,height:80}}},{}],16:[function(e,t){"use strict";function n(e,t,n){e.on(["commandStack.shape.create.postExecute","commandStack.connection.create.postExecute"],function(e){var n,i=e.context,r=i.shape||i.connection,s=r.businessObject;o(s)&&(n=a(r),t.createLabel(r,n,{id:s.id+"_label",businessObject:s}))}),e.on("shape.move.start",function(e){var t=e.context,n=t.shapes,r=[];i.forEach(n,function(e){var n=e.label;n&&!n.hidden&&-1===t.shapes.indexOf(n)&&r.push(n)}),i.forEach(r,function(e){n.push(e)})}),e.on(["commandStack.shapes.move.postExecute"],function(e){var n=e.context,r=n.closure,o=r.enclosedElements;i.forEach(o,function(e){e.label&&!o[e.label.id]&&t.moveShape(e.label,n.delta,e.parent)})}),e.on(["commandStack.label.create.executed","commandStack.shape.moved.executed"],function(e){var t=e.context.shape,r=t.businessObject,o=r.di;t.labelTarget&&(o.label||(o.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")})),i.extend(o.label.bounds,{x:t.x,y:t.y,width:t.width,height:t.height}))})}var i=window._,r=e(34),o=r.hasExternalLabel,a=r.getExternalLabelMid;n.$inject=["eventBus","modeling","bpmnFactory"],t.exports=n},{}],17:[function(e,t){"use strict";function n(){}var i=e(96),r=e(141),o=e(140);n.prototype=Object.create(i.prototype),t.exports=n,n.prototype.getConnectionWaypoints=function(e){var t=e.source,n=r.getMidPoint(t),i=e.target,a=r.getMidPoint(i),s=e.businessObject;if(s.$instanceOf("bpmn:SequenceFlow")||s.$instanceOf("bpmn:MessageFlow")){var c=o.repairConnection(t,i,n,a,e.waypoints);if(c)return c}return[n,a]}},{}],18:[function(e,t){"use strict";function n(e,t,n){i.call(this,e,t,n)}var i=(window._,e(97)),r=e(22);n.prototype=Object.create(i.prototype),n.$inject=["eventBus","elementFactory","commandStack"],t.exports=n,n.prototype.getHandlers=function(){var e=i.prototype.getHandlers.call(this);return e["element.updateProperties"]=r,e},n.prototype.updateLabel=function(e,t){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t})},n.prototype.connect=function(e,t,n){var i=e.businessObject,r=t.businessObject;return n||(n=i.$instanceOf("bpmn:FlowNode")&&r.$instanceOf("bpmn:FlowNode")&&!i.$instanceOf("bpmn:EndEvent")&&!r.$instanceOf("bpmn:StartEvent")?{type:"bpmn:SequenceFlow"}:{type:"bpmn:Association"}),this.createConnection(e,t,n,e.parent)},n.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})}},{}],19:[function(e,t){function n(e,t){e.on("commandStack.shape.append.preExecute",function(e){var n=e.context,i=n.source,r=n.shape,o=n.parent||i.parent;if(n.position||(n.position=r.businessObject.$instanceOf("bpmn:TextAnnotation")?{x:i.x+i.width/2+75,y:i.y-50-r.height/2}:{x:i.x+i.width+80+r.width/2,y:i.y+i.height/2}),!n.connection){var a;a=r.businessObject.$instanceOf("bpmn:FlowNode")&&-1!==o.children.indexOf(i)?{type:"bpmn:SequenceFlow"}:{type:"bpmn:Association"},n.connection=t.create("connection",a)}})}n.$inject=["eventBus","elementFactory"],t.exports=n},{}],20:[function(e,t){function n(e,t){e.on(["commandStack.shapes.move.postExecute"],function(e){{var n=e.context,r=n.closure,o=r.allConnections;r.allShapes}i.forEach(o,function(e){e.businessObject.$instanceOf("bpmn:SequenceFlow")&&e.source.parent!==e.target.parent&&t.removeConnection(e)})})}var i=window._;n.$inject=["eventBus","modeling"],t.exports=n},{}],21:[function(e,t){t.exports={__init__:["dropBehavior","appendBehavior"],dropBehavior:["type",e(20)],appendBehavior:["type",e(19)]}},{}],22:[function(e,t){"use strict";function n(e){this._elementRegistry=e}var i=window._,r="default",o="name";n.$inject=["elementRegistry"],t.exports=n,n.prototype.execute=function(e){var t=e.element,n=[t];if(!t)throw new Error("element required");var a=this._elementRegistry,s=t.businessObject,c=e.properties,p=e.oldProperties||i.pick(s,i.keys(c));return r in c&&(c[r]&&n.push(a.get(c[r].id)),s[r]&&n.push(a.get(s[r].id))),o in c&&t.label&&n.push(t.label),i.assign(s,c),e.oldProperties=p,e.changed=n,n},n.prototype.revert=function(e){var t=e.element,n=t.businessObject;return i.assign(n,e.oldProperties),e.changed}},{}],23:[function(e,t){t.exports={__init__:["modeling","bpmnUpdater","labelSupport"],__depends__:[e(12),e(25),e(21),e(63),e(81)],bpmnFactory:["type",e(13)],bpmnUpdater:["type",e(14)],elementFactory:["type",e(15)],modeling:["type",e(18)],labelSupport:["type",e(16)],layouter:["type",e(17)],connectionDocking:["type",e(139)]}},{}],24:[function(e,t){"use strict";function n(e){r.call(this,e)}var i=window._,r=e(127);n.$inject=["eventBus"],t.exports=n,n.prototype=Object.create(r.prototype),n.prototype.init=function(){function e(e,t,n){if(!e||e.labelTarget||!t||t.labelTarget)return null;var i=e.businessObject,r=t.businessObject,o=n&&n.businessObject;return i.$parent!==r.$parent?!1:o&&o.$instanceOf("bpmn:SequenceFlow")&&(!i.$instanceOf("bpmn:FlowNode")||!r.$instanceOf("bpmn:FlowNode")||i.$instanceOf("bpmn:EndEvent")||r.$instanceOf("bpmn:StartEvent"))?!1:(i.$instanceOf("bpmn:FlowNode")||i.$instanceOf("bpmn:TextAnnotation"))&&(r.$instanceOf("bpmn:FlowNode")||r.$instanceOf("bpmn:TextAnnotation"))}function t(e,t,n){return e.$instanceOf("bpmn:FlowElement")&&t.$instanceOf("bpmn:FlowElementsContainer")?n.isExpanded===!1?!1:!0:e.$instanceOf("bpmn:TextAnnotation")&&t.$instanceOf("bpmn:FlowElementsContainer")?!0:!1}this.addRule("connection.create",function(t){var n=t.source,i=t.target;return e(n,i)}),this.addRule("connection.reconnectStart",function(t){var n=t.connection,i=t.hover,r=n.target;return e(i,r,n)}),this.addRule("connection.reconnectEnd",function(t){var n=t.connection,i=n.source,r=t.hover;return e(i,r,n)}),this.addRule("connection.updateWaypoints",function(){return null}),this.addRule("shape.resize",function(e){var t=e.shape,n=e.newBounds,i=t.businessObject;return i.$instanceOf("bpmn:SubProcess")&&i.di.isExpanded?n&&(n.width<100||n.height<80)?!1:void 0:!1}),this.addRule("shapes.move",function(e){var n=e.newParent,r=e.shapes,o=1===i.size(i.groupBy(r,function(e){return e.parent&&e.parent.id}));if(!o)return!1;if(!n)return!0;var a=n.businessObject,s=a.di;return r.every(function(e){return t(e.businessObject,a,s)})}),this.addRule(["shape.create","shape.append"],function(e){for(var n=e.parent,i=e.shape,r=e.source,o=n;o;){if(o===r)return!1;o=o.parent}return n?n.labelTarget?null:t(i.businessObject,n.businessObject,n.businessObject.di):!1})}},{}],25:[function(e,t){t.exports={__init__:["modelingRules"],modelingRules:["type",e(24)]}},{}],26:[function(e,t){function n(e,t,n){this._create=t,this._elementFactory=n,e.registerProvider(this)}var i=window._;t.exports=n,n.$inject=["palette","create","elementFactory"],n.prototype.getPaletteEntries=function(){function e(e,t,o,a,s){function c(t){var o=r.createShape(i.extend({type:e},s));s&&(o.businessObject.di.isExpanded=s.isExpanded),n.start(t,o)}return{group:t,className:o,title:a||"Create "+e,action:{dragstart:c,click:c}}}var t={},n=this._create,r=this._elementFactory;return i.extend(t,{"create.start-event":e("bpmn:StartEvent","event","icon-start-event"),"create.intermediate-event":e("bpmn:IntermediateThrowEvent","event","icon-intermediate-event"),"create.end-event":e("bpmn:EndEvent","event","icon-end-event"),"create.exclusive-gateway":e("bpmn:ExclusiveGateway","gateway","icon-gateway"),"create.task":e("bpmn:Task","activity","icon-task"),"create.subprocess-collapsed":e("bpmn:SubProcess","activity","icon-subprocess-collapsed","Sub Process (collapsed)",{isExpanded:!1}),"create.subprocess-expanded":e("bpmn:SubProcess","activity","icon-subprocess-expanded","Sub Process (expanded)",{isExpanded:!0})}),t}},{}],27:[function(e,t){t.exports={__depends__:[e(123)],__init__:["paletteProvider"],paletteProvider:["type",e(26)]}},{}],28:[function(e,t){"use strict";function n(e,t){return o.extend({id:e.id,type:e.$type,businessObject:e},t)}function i(e){return o.collect(e,function(e){return{x:e.x,y:e.y}})}function r(e,t,n,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i}var o=window._,a=e(34),s=a.hasExternalLabel,c=a.getExternalLabelBounds,p=e(33).isExpanded,u=e(31).elementToString;r.$inject=["eventBus","canvas","elementFactory","elementRegistry"],t.exports=r,r.prototype.add=function(e,t){var r,o=e.di;if(o.$instanceOf("bpmndi:BPMNPlane"))r=this._elementFactory.createRoot(n(e)),this._canvas.setRootElement(r);else if(o.$instanceOf("bpmndi:BPMNShape")){var a=!p(e),c=t&&(t.hidden||t.collapsed),l=e.di.bounds;r=this._elementFactory.createShape(n(e,{collapsed:a,hidden:c,x:Math.round(l.x),y:Math.round(l.y),width:Math.round(l.width),height:Math.round(l.height)})),this._canvas.addShape(r,t)}else{if(!o.$instanceOf("bpmndi:BPMNEdge"))throw new Error("unknown di "+u(o)+" for element "+u(e));var d=this._getSource(e),h=this._getTarget(e);r=this._elementFactory.createConnection(n(e,{source:d,target:h,waypoints:i(e.di.waypoint)})),this._canvas.addConnection(r,t)}return s(e)&&this.addLabel(e,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},r.prototype.addLabel=function(e,t){var i=c(e,t),r=this._elementFactory.createLabel(n(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden,x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)}));return this._canvas.addShape(r,t.parent)},r.prototype._getEnd=function(e,t){var n,i,r=e.$type;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw new Error(i?"element "+u(i)+" referenced by "+u(e)+"#"+t+"Ref not yet drawn":u(e)+"#"+t+"Ref not specified")},r.prototype._getSource=function(e){return this._getEnd(e,"source")},r.prototype._getTarget=function(e){return this._getEnd(e,"target")},r.prototype._getElement=function(e){return this._elementRegistry.get(e.id)}},{}],29:[function(e,t){"use strict";function n(e){return r.find(e.rootElements,function(e){return e.$instanceOf("bpmn:Process")||e.$instanceOf("bpmn:Collaboration")})}function i(e){function t(e,t){return function(n){e(n,t)}}function i(e,t){return e.$instanceOf(t)}function o(t,n){var i=t.gfx;if(i)throw new Error("already rendered "+a(t));return e.element(t,n)}function c(t,n){return e.root(t,n)}function p(e,t){try{return e.di&&o(e,t)}catch(n){u(n.message,{element:e,error:n}),console.error("failed to import "+a(e)),console.error(n)}}function u(t,n){e.error(t,n)}function l(e){var t=e.bpmnElement;t?t.di?u("multiple DI elements defined for "+a(t),{element:t}):(s.bind(t,"di"),t.di=e):u("no bpmnElement referenced in "+a(e),{element:e})}function d(e){h(e.plane)}function h(e){l(e),r.forEach(e.planeElement,f)}function f(e){l(e)}function m(e,t){var r=e.diagrams;if(t&&-1===r.indexOf(t))throw new Error("diagram not part of bpmn:Definitions");if(!t&&r&&r.length&&(t=r[0]),t){d(t);var o=t.plane;if(!o)throw new Error("no plane for "+a(t));var s=o.bpmnElement;if(!s){if(s=n(e),!s)throw new Error("do not know what to display");u("correcting missing bpmnElement on "+a(o)+" to "+a(s)),o.bpmnElement=s,l(o)}var p=c(s,o);if(i(s,"bpmn:Process"))v(s,p);else{if(!i(s,"bpmn:Collaboration"))throw new Error("unsupported bpmnElement for "+a(o)+" : "+a(s));F(s,p),g(e.rootElements,p)}y(W)}}function y(e){r.forEach(e,function(e){e()})}function v(e,t){N(e,t),C(e.ioSpecification,t),A(e.artifacts,t),$.push(e)}function g(e){var n=r.filter(e,function(e){return i(e,"bpmn:Process")&&e.laneSets&&-1===$.indexOf(e)});n.forEach(t(v))}function x(e,t){p(e,t)}function w(e,n){r.forEach(e,t(x,n))}function E(e,t){p(e,t)}function _(e,t){p(e,t)}function b(e,t){p(e,t)}function S(e,t){p(e,t)}function A(e,t){r.forEach(e,function(e){i(e,"bpmn:Association")?W.push(function(){S(e,t)}):S(e,t)})}function C(e,n){e&&(r.forEach(e.dataInputs,t(_,n)),r.forEach(e.dataOutputs,t(b,n)))}function R(e,t){N(e,t),A(e.artifacts,t)}function P(e,t){var n=p(e,t);i(e,"bpmn:SubProcess")&&R(e,n||t)}function M(e,t){p(e,t)}function k(e,t){p(e,t)}function T(e,t){p(e,t)}function B(e,t){var n=p(e,t);if(e.childLaneSet)O(e.childLaneSet,n||t);else{var i=r.filter(e.flowNodeRef,function(e){return"bpmn:BoundaryEvent"!==e.$type});I(i,n||t)}}function O(e,n){r.forEach(e.lanes,t(B,n))}function D(e,n){r.forEach(e,t(O,n))}function N(e,t){e.laneSets?(D(e.laneSets,t),L(e.flowElements)):I(e.flowElements,t)}function L(e,t){r.forEach(e,function(e){i(e,"bpmn:SequenceFlow")?W.push(function(){M(e,t)}):i(e,"bpmn:BoundaryEvent")?W.unshift(function(){T(e,t)}):i(e,"bpmn:DataObject")||(i(e,"bpmn:DataStoreReference")?k(e,t):i(e,"bpmn:DataObjectReference")&&k(e,t))})}function I(e,n){r.forEach(e,function(e){i(e,"bpmn:SequenceFlow")?W.push(function(){M(e,n)}):i(e,"bpmn:BoundaryEvent")?W.unshift(function(){T(e,n)}):i(e,"bpmn:FlowNode")?(P(e,n),i(e,"bpmn:Activity")&&(C(e.ioSpecification,n),W.push(function(){r.forEach(e.dataInputAssociations,t(E,n)),r.forEach(e.dataOutputAssociations,t(E,n))}))):i(e,"bpmn:DataObject")||(i(e,"bpmn:DataStoreReference")?k(e,n):i(e,"bpmn:DataObjectReference")?k(e,n):u("unrecognized flowElement "+a(e)+" in context "+(n?a(n.businessObject):null),{element:e,context:n}))})}function j(e,t){var n=p(e,t),i=e.processRef;i&&v(i,n||t)}function F(e){r.forEach(e.participants,t(j)),A(e.artifacts),W.push(function(){w(e.messageFlows)})}var $=[],W=[];return{handleDefinitions:m}}var r=window._,o=e(163),a=e(31).elementToString,s=new o({name:"bpmnElement",enumerable:!0},{name:"di"});t.exports=i},{}],30:[function(e,t){"use strict";function n(e,t,n){function r(e){var t={root:function(e){return a.add(e)},element:function(e,t){return a.add(e,t)},error:function(e,t){c.push({message:e,context:t})}},n=new i(t);n.handleDefinitions(e)}var o,a=e.get("bpmnImporter"),s=e.get("eventBus"),c=[];s.fire("import.start");try{r(t)}catch(p){o=p}s.fire(o?"import.error":"import.success",{error:o,warnings:c}),n(o,c)}var i=e(29);t.exports.importBpmnDiagram=n},{}],31:[function(e,t){t.exports.elementToString=function(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}},{}],32:[function(e,t){t.exports={bpmnImporter:["type",e(28)]}},{}],33:[function(e,t){"use strict";t.exports.isExpandedPool=function(e){return!!e.processRef},t.exports.isExpanded=function(e){var t=!(e.$instanceOf("bpmn:SubProcess")||e.$instanceOf("bpmn:CallActivity")),n=t||e.di.isExpanded;return n}},{}],34:[function(e,t){"use strict";var n=window._,i=t.exports.DEFAULT_LABEL_SIZE={width:90,height:20};t.exports.hasExternalLabel=function(e){return e.$instanceOf("bpmn:Event")||e.$instanceOf("bpmn:Gateway")||e.$instanceOf("bpmn:DataStoreReference")||e.$instanceOf("bpmn:DataObjectReference")||e.$instanceOf("bpmn:SequenceFlow")||e.$instanceOf("bpmn:MessageFlow")};var r=t.exports.getWaypointsMid=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}},o=t.exports.getExternalLabelMid=function(e){return e.waypoints?r(e.waypoints):{x:e.x+e.width/2,y:e.y+e.height+i.height/2}};t.exports.getExternalLabelBounds=function(e,t){var r,a,s,c=e.di,p=c.label;return p&&p.bounds?(s=p.bounds,a={width:Math.max(i.width,s.width),height:s.height},r={x:s.x+s.width/2,y:s.y+s.height/2}):(r=o(t),a=i),n.extend({x:r.x-a.width/2,y:r.y-a.height/2},a)}},{}],35:[function(e,t){t.exports=e(38)},{}],36:[function(e,t){"use strict";function n(e,t){r.call(this,e,t)}var i=window._,r=e(44),o=e(39);n.prototype=Object.create(r.prototype),t.exports=n,n.prototype.fromXML=function(e,t,n,r){i.isString(t)||(r=n,n=t,t="bpmn:Definitions"),i.isFunction(n)&&(r=n,n={});var a=new o.Reader(this,n),s=a.handler(t);a.fromXML(e,s,r)},n.prototype.toXML=function(e,t,n){i.isFunction(t)&&(n=t,t={});var r=new o.Writer(t);try{var a=r.toXML(e);n(null,a)}catch(s){n(s)}}},{}],37:[function(e,t){"use strict";t.exports.extend=function(e,t){e.ids=t;var n=e.properties.set,i=/^(.*:)?id$/;return e.properties.set=function(e,r,o){if(i.test(r)){var a=t.assigned(o);if(a&&a!==e)throw new Error("id <"+o+"> already used");t.claim(o,e)}n.call(this,e,r,o)},e}},{}],38:[function(e,t){var n=e(36),i={bpmn:e(53),bpmndi:e(54),dc:e(55),di:e(56)};t.exports=function(){return new n(i)}},{}],39:[function(e,t){"use strict";t.exports.Reader=e(41),t.exports.Writer=e(42)},{}],40:[function(e,t){"use strict";function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}function i(e){return e.charAt(0).toLowerCase()+e.slice(1)}function r(e){return e.xml&&"lowerCase"===e.xml.tagAlias}t.exports.aliasToName=function(e,t){return r(t)?n(e):e},t.exports.nameToAlias=function(e,t){return r(t)?i(e):e},t.exports.DEFAULT_NS_MAP={xsi:"http://www.w3.org/2001/XMLSchema-instance"},t.exports.XSI_TYPE="xsi:type"},{}],41:[function(e,t){"use strict";function n(e){var t=e.attributes;return m.reduce(t,function(e,t){var n,i;return t.local?(i=E(t.name,t.prefix),n=i.name):n=t.prefix,e[n]=t.value,e},{})}function i(e,t,n){var i,r=E(t.value),o=e.ns[r.prefix||""],a=r.localName,s=o&&n.getPackage(o);s&&(i=s.xml&&s.xml.typePrefix,i&&0===a.indexOf(i)&&(a=a.slice(i.length)),t.value=s.prefix+":"+a)}function r(e,t,n){var o,a;if(o=e.uri||n){var s=t.getPackage(o);a=s?s.prefix:e.prefix,e.prefix=a,e.uri=o}m.forEach(e.attributes,function(n){n.uri===g&&"type"===n.local&&i(e,n,t),r(n,t,null)})}function o(e){var t={},n=[],i=[];this.addReference=function(e){n.push(e)},this.addElement=function(e,n){if(!e||!n)throw new Error("[xml-reader] id or ctx must not be null");t[e]=n},this.addWarning=function(e){i.push(e)},this.warnings=i,this.references=n,this.elementsById=t,this.parseRoot=e}function a(){}function s(){}function c(e,t){this.property=e,this.context=t}function p(e,t){this.element=t,this.propertyDesc=e}function u(){}function l(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function d(e,t,n){this.model=e,this.context=n}function h(e){this.model=e}var f=window.sax,m=window._,y=e(40),v=y.XSI_TYPE,g=y.DEFAULT_NS_MAP.xsi,x=e(44).types,w=e(43),E=e(44).ns.parseName,_=y.aliasToName;a.prototype.handleEnd=function(){},a.prototype.handleText=function(){},a.prototype.handleNode=function(){},s.prototype=new a,s.prototype.handleText=function(e){this.body=(this.body||"")+e},c.prototype=new s,c.prototype.handleNode=function(e){if(this.element)throw new Error("expected no sub nodes");return this.element=this.createReference(e),this},c.prototype.handleEnd=function(){this.element.id=this.body},c.prototype.createReference=function(){return{property:this.property.ns.name,id:""}},p.prototype=new s,p.prototype.handleEnd=function(){var e=this.body,t=this.element,n=this.propertyDesc;e=x.coerceType(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},u.prototype=Object.create(s.prototype),u.prototype.handleNode=function(e){var t,n=this,i=this.element;return i?n=this.handleChild(e):(i=this.element=this.createElement(e),t=i.id,t&&this.context.addElement(t,i)),n},l.prototype=new u,l.prototype.addReference=function(e){this.context.addReference(e)},l.prototype.handleEnd=function(){var e=this.body,t=this.element,n=t.$descriptor,i=n.bodyProperty;i&&void 0!==e&&(e=x.coerceType(i.type,e),t.set(i.name,e))},l.prototype.createElement=function(e){var t=n(e),i=this.type,r=i.$descriptor,o=this.context,a=new i({});return m.forEach(t,function(e,t){var n=r.propertiesByName[t];n&&n.isReference?o.addReference({element:a,property:n.ns.name,id:e}):(n&&(e=x.coerceType(n.type,e)),a.set(t,e))}),a},l.prototype.getPropertyForNode=function(e){var t,n,i,r=E(e.local,e.prefix),o=this.type,a=this.model,s=o.$descriptor,c=r.name,p=s.propertiesByName[c];if(p)return p.serialize===v&&(i=e.attributes[v])?(t=i.value,n=a.getType(t),m.extend({},p,{effectiveType:n.$descriptor.name})):p;var u=a.getPackage(r.prefix);if(u){if(t=r.prefix+":"+_(r.localName,s.$pkg),n=a.getType(t),p=m.find(s.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return m.extend({},p,{effectiveType:n.$descriptor.name})}else if(p=m.find(s.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return p;throw new Error("unrecognized element <"+r.name+">")},l.prototype.toString=function(){return"ElementDescriptor["+this.type.$descriptor.name+"]"},l.prototype.valueHandler=function(e,t){return new p(e,t)},l.prototype.referenceHandler=function(e){return new c(e,this.context)},l.prototype.handler=function(e){return"Element"===e?new d(this.model,e,this.context):new l(this.model,e,this.context)},l.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,x.isSimple(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var o=r.element;return void 0!==o&&(t.isMany?i.get(t.name).push(o):i.set(t.name,o),t.isReference?(m.extend(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},d.prototype=Object.create(u.prototype),d.prototype.createElement=function(e){var t=e.name,n=e.prefix,i=e.ns[n],r=e.attributes;return this.model.createAny(t,i,r)},d.prototype.handleChild=function(e){var t,n=new d(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},d.prototype.handleText=function(e){this.body=this.body||""+e},d.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},h.prototype.fromXML=function(e,t,n){function i(){var e,t,n=p.elementsById,i=p.references;
4
+ for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=r.$descriptor.propertiesByName[t.property];if(o||p.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var s=r.get(a.name),c=s.indexOf(t);o?s[c]=o:s.splice(c,1)}else r.set(a.name,o)}}function a(){l.pop().handleEnd()}function s(e){var t=l.peek();r(e,d);try{l.push(t.handleNode(e))}catch(n){var i=this.line,o=this.column;throw console.error("failed to parse document"),console.error(n),new Error("unparsable content <"+e.name+"> detected\n line: "+i+"\n column: "+o+"\n nested error: "+n.message)}}function c(e){l.peek().handleText(e)}var p=new o(t),u=f.parser(!0,{xmlns:!0,trim:!0}),l=new w,d=this.model;t.context=p,l.push(t),u.onopentag=s,u.oncdata=u.ontext=c,u.onclosetag=a,u.onend=i,m.defer(function(){var i;try{u.write(e).close()}catch(r){i=r}n(i,i?void 0:t.element,p)})},h.prototype.handler=function(e){return new l(this.model,e)},t.exports=h,t.exports.ElementHandler=l},{}],42:[function(e,t){"use strict";function n(e){return v.isString(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function i(e,t){return t.isGeneric?t.name:v.extend({localName:E(t.ns.localName,t.$pkg)},e)}function r(e,t){return v.extend({localName:t.ns.localName},e)}function o(e){var t=e.$descriptor;return v.filter(t.properties,function(t){var n=t.name;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i===t["default"]?!1:t.isMany?i.length:!0})}function a(e){var t={"\n":"&#10;","\n\r":"&#10;",'"':"&quot;"};return e=v.isString(e)?e:""+e,e.replace(/(\n|\n\r|")/g,function(e){return t[e]})}function s(e){return v.filter(e,function(e){return e.isAttr})}function c(e){return v.filter(e,function(e){return!e.isAttr})}function p(e,t){this.ns=t}function u(){}function l(e){this.ns=e}function d(e,t){this.body=[],this.attrs=[],this.parent=e,this.ns=t}function h(e,t){d.call(this,e,t)}function f(){this.value="",this.write=function(e){this.value+=e}}function m(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function y(e){function t(t,n){var i=n||new f,r=new m(i,e.format);return e.preamble&&r.append(_),(new d).build(t).serializeTo(r),n?void 0:i.value}return e=v.extend({format:!1,preamble:!0},e||{}),{toXML:t}}var v=window._,g=e(44).types,x=e(40),w=e(44).ns.parseName,E=x.nameToAlias,_='<?xml version="1.0" encoding="UTF-8"?>\n',b=/[<>"&]+/,S=x.DEFAULT_NS_MAP,A=x.XSI_TYPE;p.prototype.build=function(e){return this.element=e,this},p.prototype.serializeTo=function(e){e.appendIndent().append("<"+n(this.ns)+">"+this.element.id+"</"+n(this.ns)+">").appendNewLine()},u.prototype.serializeValue=u.prototype.serializeTo=function(e){var t=this.escape;t&&e.append("<![CDATA["),e.append(this.value),t&&e.append("]]>")},u.prototype.build=function(e,t){return this.value=t,"String"===e.type&&b.test(t)&&(this.escape=!0),this},l.prototype=new u,l.prototype.serializeTo=function(e){e.appendIndent().append("<"+n(this.ns)+">"),this.serializeValue(e),e.append("</"+n(this.ns)+">").appendNewLine()},d.prototype.build=function(e){this.element=e;var t=this.parseNsAttributes(e);if(this.ns||(this.ns=this.nsTagName(e.$descriptor)),e.$descriptor.isGeneric)this.parseGeneric(e);else{var n=o(e);this.parseAttributes(s(n)),this.parseContainments(c(n)),this.parseGenericAttributes(e,t)}return this},d.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return i(t,e)},d.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return r(t,e)},d.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},d.prototype.nsAttributeName=function(e){var t;v.isString(e)?t=w(e):e.ns&&(t=e.ns);var n=this.logNamespaceUsed(t);return this.isLocalNs(n)?{localName:t.localName}:v.extend({localName:t.localName},n)},d.prototype.parseGeneric=function(e){var t=this,n=this.body,i=this.attrs;v.forEach(e,function(e,r){"$body"===r?n.push((new u).build({type:"String"},e)):"$children"===r?v.forEach(e,function(e){n.push(new d(t).build(e))}):0!==r.indexOf("$")&&i.push({name:r,value:a(e)})})},d.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return v.forEach(n,function(e,n){var r=w(n);"xmlns"===r.prefix?t.logNamespace({prefix:r.localName,uri:e}):r.prefix||"xmlns"!==r.localName?i.push({name:n,value:e}):t.logNamespace({uri:e})}),i},d.prototype.parseGenericAttributes=function(e,t){var n=this;v.forEach(t,function(t){if(t.name!==A)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(i){console.warn("[writer] missing namespace information for ",t.name,"=",t.value,"on",e,i)}})},d.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;v.forEach(e,function(e){var r=i.get(e.name),o=e.isReference,a=e.isMany,s=t.nsPropertyTagName(e);if(a||(r=[r]),e.isBody)n.push((new u).build(e,r[0]));else if(g.isSimple(e.type))v.forEach(r,function(t){n.push(new l(s).build(e,t))});else if(o)v.forEach(r,function(e){n.push(new p(t,s).build(e))});else{var c=e.serialize===A;v.forEach(r,function(e){var i;i=c?new h(t,s):new d(t),n.push(i.build(e))})}})},d.prototype.getNamespaces=function(){return this.parent?this.namespaces=this.parent.getNamespaces():this.namespaces||(this.namespaces={prefixMap:{},uriMap:{},used:{}}),this.namespaces},d.prototype.logNamespace=function(e){var t=this.getNamespaces(),n=t.uriMap[e.uri];return n||(t.uriMap[e.uri]=e),t.prefixMap[e.prefix]=e.uri,e},d.prototype.logNamespaceUsed=function(e){var t=this.element,n=t.$model,i=this.getNamespaces(),r=e.prefix,o=e.uri||S[r]||i.prefixMap[r]||(n?(n.getPackage(r)||{}).uri:null);if(!o)throw new Error("no namespace uri given for prefix <"+e.prefix+">");return e=i.uriMap[o],e||(e=this.logNamespace({prefix:r,uri:o})),i.used[e.uri]||(i.used[e.uri]=e),e},d.prototype.parseAttributes=function(e){var t=this,n=this.element;v.forEach(e,function(e){t.logNamespaceUsed(e.ns);var i=n.get(e.name);e.isReference&&(i=i.id),t.addAttribute(t.nsAttributeName(e),i)})},d.prototype.addAttribute=function(e,t){var n=this.attrs;v.isString(t)&&(t=a(t)),n.push({name:e,value:t})},d.prototype.serializeAttributes=function(e){function t(){return v.collect(o.used,function(e){var t="xmlns"+(e.prefix?":"+e.prefix:"");return{name:t,value:e.uri}})}var i=this.attrs,r=!this.parent,o=this.namespaces;r&&(i=t().concat(i)),v.forEach(i,function(t){e.append(" ").append(n(t.name)).append('="').append(t.value).append('"')})},d.prototype.serializeTo=function(e){var t=this.body.length,i=!(1===this.body.length&&this.body[0]instanceof u);e.appendIndent().append("<"+n(this.ns)),this.serializeAttributes(e),e.append(t?">":" />"),t&&(i&&e.appendNewLine().indent(),v.forEach(this.body,function(t){t.serializeTo(e)}),i&&e.unindent().appendIndent(),e.append("</"+n(this.ns)+">")),e.appendNewLine()},h.prototype=new d,h.prototype.build=function(e){var t=e.$descriptor;this.element=e,this.typeNs=this.nsTagName(t);var n=this.typeNs,i=e.$model.getPackage(n.uri),r=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(A),(n.prefix?n.prefix+":":"")+r+t.ns.localName),d.prototype.build.call(this,e)},h.prototype.isLocalNs=function(e){return e.uri===this.typeNs.uri},t.exports=y},{}],43:[function(t,n,i){!function(t){"use strict";function r(){this.data=[null],this.top=0}function o(){return new r}r.prototype.clear=function(){return this.data=[null],this.top=0,this},r.prototype.length=function(){return this.top},r.prototype.peek=function(){return this.data[this.top]},r.prototype.pop=function(){return this.top>0?(this.top--,this.data.pop()):void 0},r.prototype.push=function(e){return this.data[++this.top]=e,this},"undefined"!=typeof i?n.exports=o:"function"==typeof e?e(function(){return o}):t.stack=o}(this)},{}],44:[function(e,t){"use strict";t.exports=e(48),t.exports.types=e(52),t.exports.ns=e(49)},{}],45:[function(e,t){"use strict";function n(){}n.prototype.get=function(e){return this.$model.properties.get(this,e)},n.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},t.exports=n},{}],46:[function(e,t){"use strict";function n(e){this.ns=e,this.name=e.name,this.allTypes=[],this.properties=[],this.propertiesByName={}}var i=window._,r=e(49).parseName;t.exports=n,n.prototype.build=function(){return i.pick(this,["ns","name","allTypes","properties","propertiesByName","bodyProperty"])},n.prototype.addProperty=function(e,t){this.addNamedProperty(e,!0);var n=this.properties;void 0!==t?n.splice(t,0,e):n.push(e)},n.prototype.replaceProperty=function(e,t){var n=e.ns,i=this.properties,r=this.propertiesByName;if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}this.addNamedProperty(t,!0);var o=i.indexOf(e);if(-1===o)throw new Error("property <"+n.name+"> not found in property list");i[o]=t,r[n.name]=r[n.localName]=t},n.prototype.redefineProperty=function(e){var t=e.ns.prefix,n=e.redefines.split("#"),i=r(n[0],t),o=r(n[1],i.prefix).name,a=this.propertiesByName[o];if(!a)throw new Error("refined property <"+o+"> not found");this.replaceProperty(a,e),delete e.redefines},n.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},n.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},n.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},n.prototype.addIdProperty=function(e){var t=r(e,this.ns.prefix),n={name:t.localName,type:"String",isAttr:!0,ns:t};this.addProperty(n,0)},n.prototype.assertNotDefined=function(e){var t=e.name,n=this.propertiesByName[t];if(n)throw new Error("property <"+t+"> already defined; override of <"+n.definedBy.ns.name+"#"+n.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},n.prototype.hasProperty=function(e){return this.propertiesByName[e]},n.prototype.addTrait=function(e){var t=this.allTypes;-1===t.indexOf(e)&&(i.forEach(e.properties,function(t){t=i.extend({},t,{name:t.ns.localName}),Object.defineProperty(t,"definedBy",{value:e}),t.redefines?this.redefineProperty(t):(t.isBody&&this.setBodyProperty(t),this.addProperty(t))},this),t.push(e))}},{}],47:[function(e,t){"use strict";function n(e,t){this.model=e,this.properties=t}var i=window._,r=e(45);t.exports=n,n.prototype.createType=function(e){function t(e){o.define(this,"$type",{value:s,enumerable:!0}),o.define(this,"$attrs",{value:{}}),o.define(this,"$parent",{writable:!0}),i.forEach(e,function(e,t){this.set(t,e)},this)}var n=this.model,o=this.properties,a=Object.create(r.prototype);i.forEach(e.properties,function(e){e.isMany||void 0===e["default"]||(a[e.name]=e["default"])}),o.defineModel(a,n),o.defineDescriptor(a,e);var s=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,o.defineModel(t,n),o.defineDescriptor(t,e),t}},{}],48:[function(e,t){"use strict";function n(e,t){t=t||{},this.properties=new a(this),this.factory=new r(this,this.properties),this.registry=new o(e,this.properties,t),this.typeCache={}}var i=window._,r=e(47),o=e(51),a=e(50),s=e(49).parseName;t.exports=n,n.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},n.prototype.getType=function(e){var t=this.typeCache,n=i.isString(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[e.name]=this.factory.createType(e)),r},n.prototype.createAny=function(e,t,n){var r=s(e),o={$type:e},a={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(o,a),this.properties.defineModel(o,this),this.properties.define(o,"$parent",{enumerable:!1,writable:!0}),i.forEach(n,function(e,t){i.isObject(e)&&void 0!==e.value?o[e.name]=e.value:o[t]=e}),o},n.prototype.getPackage=function(e){return this.registry.getPackage(e)},n.prototype.getPackages=function(){return this.registry.getPackages()},n.prototype.getElementDescriptor=function(e){return e.$descriptor},n.prototype.hasType=function(e,t){void 0===t&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return!!i.find(n.allTypes,function(e){return e.name===t})},n.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{}],49:[function(e,t){"use strict";t.exports.parseName=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},{}],50:[function(e,t){"use strict";function n(e){this.model=e}t.exports=n,n.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t);i?Object.defineProperty(e,i.name,{enumerable:!i.isReference,writable:!0,value:n}):e.$attrs[t]=n},n.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&Object.defineProperty(e,i,{enumerable:!n.isReference,writable:!0,value:[]}),e[i]},n.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},n.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},n.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},{}],51:[function(e,t){"use strict";function n(e,t,n){this.options=i.extend({generateId:"id"},n||{}),this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,i.forEach(e,this.registerPackage,this)}var i=window._,r=e(52),o=e(46),a=e(49).parseName;t.exports=n,n.prototype.getPackage=function(e){return this.packageMap[e]},n.prototype.getPackages=function(){return this.packages},n.prototype.registerPackage=function(e){i.forEach(e.types,function(t){this.registerType(t,e)},this),this.packageMap[e.uri]=this.packageMap[e.prefix]=e,this.packages.push(e)},n.prototype.registerType=function(e,t){var n=a(e.name,t.prefix),o=n.name,s={};i.forEach(e.properties,function(e){var t=a(e.name,n.prefix),o=t.name;r.isBuiltIn(e.type)||(e.type=a(e.type,t.prefix).name),i.extend(e,{ns:t,name:o}),s[o]=e}),i.extend(e,{ns:n,name:o,propertiesByName:s}),this.definePackage(e,t),this.typeMap[o]=e},n.prototype.mapTypes=function(e,t){var n=this.typeMap[e.name];if(!n)throw new Error("unknown type <"+e.name+">");i.forEach(n.superClass,function(n){var i=a(n,e.prefix);this.mapTypes(i,t)},this),t(n)},n.prototype.getEffectiveDescriptor=function(e){var t=a(e),n=new o(t);this.mapTypes(t,function(e){n.addTrait(e)});var i=this.options.generateId;i&&!n.hasProperty(i)&&n.addIdProperty(i);var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},n.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},{}],52:[function(e,t){"use strict";var n={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},i={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}};t.exports.coerceType=function(e,t){var n=i[e];return n?n(t):t},t.exports.isBuiltIn=function(e){return!!n[e]},t.exports.isSimple=function(e){return!!i[e]}},{}],53:[function(e,t){t.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isAttr:!0,isReference:!0},{name:"outMessageRef",type:"Message",isAttr:!0,isReference:!0},{name:"errorRefs",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"childLaneSet",type:"LaneSet",serialize:"xsi:type"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection","default":"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate","default":!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,"default":"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",serialize:"xsi:type"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"sources",isMany:!0,isReference:!0,type:"Element"},{name:"targets",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String"},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"},{name:"documentation",type:"Documentation",isMany:!0}]},{name:"Extension",properties:[{name:"mustUnderstand","default":!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition"}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference","default":!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat","default":"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting","default":!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"inputSet",type:"InputSet"},{name:"eventDefinitionRefs",type:"EventDefinition",isMany:!0,isReference:!0},{name:"dataInputAssociation",type:"DataInputAssociation",isMany:!0},{name:"dataInputs",type:"DataInput",isMany:!0},{name:"eventDefinitions",type:"EventDefinition",isMany:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean","default":!1},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitionRefs",type:"EventDefinition",isMany:!0,isReference:!0},{name:"dataOutputAssociation",type:"DataOutputAssociation",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"eventDefinitions",type:"EventDefinition",isMany:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity","default":!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean"},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",serialize:"xsi:type"},{name:"timeCycle",type:"Expression",serialize:"xsi:type"},{name:"timeDuration",type:"Expression",serialize:"xsi:type"}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",serialize:"xsi:type"}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"transformation",type:"FormalExpression"},{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"inputSetRefs",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"outputSetRefs",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0},{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",serialize:"xsi:type"},{name:"to",type:"Expression",serialize:"xsi:type"}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited","default":!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!0},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"body",type:"String",isBody:!0},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",type:"String",isAttr:!0},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",serialize:"xsi:type"},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification"},{name:"supportedInterfaceRefs",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRefs",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum","default":0,isAttr:!0,type:"Integer"},{name:"maximum","default":1,isAttr:!0,type:"Integer"}]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType","default":"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["FlowElementsContainer","Collaboration"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat","default":"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isVirtual:!0,isMany:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation","default":!1,isAttr:!0,type:"Boolean"},{name:"loopCharacteristics",type:"LoopCharacteristics"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"ioSpecification",type:"InputOutputSpecification"},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity","default":1,isAttr:!0,type:"Integer"},{name:"completionQuantity","default":1,isAttr:!0,type:"Integer"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer"],properties:[{name:"triggeredByEvent","default":!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential","default":!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior","default":"All",isAttr:!0},{name:"loopCardinality",type:"Expression",serialize:"xsi:type"},{name:"loopDataInputRef",type:"ItemAwareElement",isAttr:!0,isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isAttr:!0,isReference:!0},{name:"inputDataItem",type:"DataInput"},{name:"outputDataItem",type:"DataOutput"},{name:"completionCondition",type:"Expression",serialize:"xsi:type"},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore","default":!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",serialize:"xsi:type"},{name:"loopMaximum",type:"Expression",serialize:"xsi:type"}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate","default":!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",serialize:"xsi:type"},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances","default":!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isAttr:!0,isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",serialize:"xsi:type"},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",serialize:"xsi:type"}]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage","default":"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage","default":"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"relationships",type:"Relationship",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"}]}],emumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}
5
+ },{}],54:[function(e,t){t.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,"default":"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],emumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"}},{}],55:[function(e,t){t.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real","default":"0",isAttr:!0},{name:"y",type:"Real","default":"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real","default":"0",isAttr:!0},{name:"y",type:"Real","default":"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]}},{}],56:[function(e,t){t.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",serialize:"xsi:type"}]},{name:"Diagram",isAbstract:!0,properties:[{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},{}],57:[function(e,t){"use strict";t.exports={__depends__:[e(91)],__init__:["directEditing"],directEditing:["type",e(58)]}},{}],58:[function(e,t){"use strict";function n(e,t){this._eventBus=e,this._providers=[],this._textbox=new r({container:t.getContainer(),keyHandler:i.bind(this._handleKey,this)})}var i=window._,r=e(59);n.$inject=["eventBus","canvas"],n.prototype.registerProvider=function(e){this._providers.push(e)},n.prototype.isActive=function(){return!!this._active},n.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},n.prototype._fire=function(e){this._eventBus.fire("directEditing."+e,{active:this._active})},n.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null},n.prototype.complete=function(){var e=this._active;if(e){var t=this.getValue();t!==e.context.text&&e.provider.update(e.element,t,e.context.text),this._fire("complete"),this.close()}},n.prototype.getValue=function(){return this._textbox.getValue()},n.prototype._handleKey=function(e){e.stopPropagation();var t=e.which;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},n.prototype.activate=function(e){this.isActive()&&this.cancel();var t,n=i.find(this._providers,function(n){return(t=n.activate(e))?n:null});return t&&(this._textbox.create(t.bounds,t.style,t.text),this._active={element:e,context:t,provider:n},this._fire("activate")),!!t},t.exports=n},{}],59:[function(e,t){"use strict";function n(e){this.container=e.container,this.textarea=i("<textarea />"),this.keyHandler=e.keyHandler||function(){}}var i=window.$;t.exports=n,n.prototype.create=function(e,t,n){var r=i.extend({width:e.width,height:e.height,left:e.x,top:e.y,position:"absolute",textAlign:"center",boxSizing:"border-box"},t||{});this.textarea.val(n||"").appendTo(this.container).css(r).attr("title","Press SHIFT+Enter for line feed").focus().select().on("keydown",this.keyHandler)},n.prototype.destroy=function(){this.textarea.val("").remove().off("keydown",this.keyHandler)},n.prototype.getValue=function(){return this.textarea.val()}},{}],60:[function(e,t){t.exports=e(61)},{}],61:[function(e,t){"use strict";function n(e){function t(e){return r.indexOf(e)>=0}function n(e){r.push(e)}function i(e){t(e)||((e.__depends__||[]).forEach(i),t(e)||(n(e),(e.__init__||[]).forEach(function(e){a.push(e)})))}var r=[],a=[];e.forEach(i);var s=new o.Injector(r);return a.forEach(function(e){try{s["string"==typeof e?"get":"invoke"](e)}catch(t){throw console.error("Failed to instantiate component"),console.error(t.stack),t}}),s}function i(t){t=t||{};var i={config:["value",t]},r=e(69),o=[i,r].concat(t.modules||[]);return n(o)}function r(e,t){this.injector=t=t||i(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}var o=e(158);t.exports=r,r.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")}},{}],62:[function(e,t){"use strict";function n(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[]},this._injector=t,this._eventBus=e,this._uid=1}var i=window._;n.$inject=["eventBus","injector"],t.exports=n,n.prototype.execute=function(e,t){if(!e)throw new Error("command required");var n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction(n)},n.prototype.canExecute=function(e,t){var n={command:e,context:t},i=this._getHandler(e);if(!i)return!1;var r=this._fire(e,"canExecute",n);return r?i.canExecute?i.canExecute(t):!0:r},n.prototype.clear=function(){this._stack.length=0,this._stackIdx=-1,this._fire("changed")},n.prototype.undo=function(){var e,t=this._getUndoAction();if(t){for(this._pushAction(t);t&&(this._internalUndo(t),e=this._getUndoAction(),e&&e.id===t.id);)t=e;this._popAction()}},n.prototype.redo=function(){var e,t=this._getRedoAction();if(t){for(this._pushAction(t);t&&(this._internalExecute(t,!0),e=this._getRedoAction(),e&&e.id===t.id);)t=e;this._popAction()}},n.prototype.register=function(e,t){this._setHandler(e,t)},n.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");var n=this._injector.instantiate(t);this.register(e,n)},n.prototype.canUndo=function(){return!!this._getUndoAction()},n.prototype.canRedo=function(){return!!this._getRedoAction()},n.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},n.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},n.prototype._internalUndo=function(e){var t=e.command,n=e.context,i=this._getHandler(t);this._fire(t,"revert",e),this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)},n.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var r,o,a=t?[e+"."+t,t]:[e],s=!0;for(n=n&&i.clone(n),r=0;(o=a[r])&&(s=this._eventBus.fire("commandStack."+o,n),s);r++);return s},n.prototype._createId=function(){return this._uid++},n.prototype._internalExecute=function(e,t){var n=e.command,i=e.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),r.preExecute&&r.preExecute(i)),this._fire(n,"execute",e),this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e),t||(r.postExecute&&r.postExecute(i),this._fire(n,"postExecute",e)),this._popAction(e)},n.prototype._pushAction=function(e){var t=this._currentExecution,n=t.actions,i=n[0];e.id||(e.id=i&&i.id||this._createId()),n.push(e)},n.prototype._popAction=function(){var e=this._currentExecution,t=e.actions,n=e.dirty;t.pop(),t.length||(this._eventBus.fire("elements.changed",{elements:i.unique(n)}),n.length=0,this._fire("changed"))},n.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=i.isArray(e)?e:[e],t.dirty=t.dirty.concat(e))},n.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},n.prototype._revertedAction=function(){this._stackIdx--},n.prototype._getHandler=function(e){return this._handlerMap[e]},n.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t}},{}],63:[function(e,t){t.exports={__depends__:[e(69)],commandStack:["type",e(62)]}},{}],64:[function(e,t){"use strict";function n(e,t){return Math.round(e*t)/t}function i(e){return c.isNumber(e)?e+"px":e}function r(e){e=c.extend({},{width:"100%",height:"100%"},e);var t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),c.extend(n.style,{position:"relative",width:i(e.width),height:i(e.height)}),t.appendChild(n),n}function o(e,t){return e.group().attr({"class":t})}function a(e,t,n,i,r){this._snap=r,this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function s(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}var c=window._,p=e(148),u="base";a.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry","snap"],t.exports=a,a.prototype._init=function(e){var t=this._eventBus,n=this._snap,i=r(e),a=n.createSnapAt("100%","100%",i),s=o(a,"viewport"),c=this;this._container=i,this._svg=a,this._viewport=s,this._layers={},t.on("diagram.init",function(){t.fire("canvas.init",{svg:a,viewport:s})}),t.on("diagram.destroy",function(){var e=c._container.parentNode;e&&e.removeChild(i),t.fire("canvas.destroy",{svg:c._svg,viewport:c._viewport}),c._svg.remove(),c._svg=c._container=c._layers=c._viewport=null})},a.prototype.getDefaultLayer=function(){return this.getLayer(u)},a.prototype.getLayer=function(e){if(!e)throw new Error("must specify a name");var t=this._layers[e];return t||(t=this._layers[e]=o(this._viewport,"layer-"+e)),t},a.prototype.getContainer=function(){return this._container},a.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),i=this.getGraphics(e),i&&(i[n?"addClass":"removeClass"](t),this._eventBus.fire("element.marker.update",{element:e,gfx:i,marker:t,add:!!n}))},a.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},a.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},a.prototype.getRootElement=function(){return this._rootElement||this.setRootElement({id:"__implicitroot"}),this._rootElement},a.prototype.setRootElement=function(e,t){var n=this._rootElement,i=this._elementRegistry;if(n){if(!t)throw new Error("rootElement already defined");i.remove(n)}return i.add(e,this.getDefaultLayer(),this._svg),this._rootElement=e,e},a.prototype._ensureValidId=function(e){if(!e.id)throw new Error("element must have an id");if(this._elementRegistry.get(e.id))throw new Error("element with id "+e.id+" already exists")},a.prototype._setParent=function(e,t){p.add(t.children,e),e.parent=t},a.prototype._addElement=function(e,t,n){n=n||this.getRootElement();var i=this._eventBus,r=this._graphicsFactory;this._ensureValidId(t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n);var o=r.create(e,t);return this._elementRegistry.add(t,o),r.update(e,t,o),i.fire(e+".added",{element:t,gfx:o}),t},a.prototype.addShape=function(e,t){return this._addElement("shape",e,t)},a.prototype.addConnection=function(e,t){return this._addElement("connection",e,t)},a.prototype._removeElement=function(e,t){var n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;return(e=n.get(e.id||e))?(r.fire(t+".remove",{element:e}),i.remove(e),p.remove(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e):void 0},a.prototype.removeShape=function(e){return this._removeElement(e,"shape")},a.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},a.prototype.sendToFront=function(e,t){t!==!1&&(t=!0),t&&e.parent&&this.sendToFront(e.parent),c.forEach(e.children,function(e){this.sendToFront(e,!1)},this);var n=this.getGraphics(e),i=n.parent();n.remove().appendTo(i)},a.prototype.getGraphics=function(e){return this._elementRegistry.getGraphics(e)},a.prototype._fireViewboxChange=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox(!1)})},a.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,i,r,o,a,s=this._viewport,c=this.getSize();return e?(r=Math.max(c.width/e.width,c.height/e.height),i=(new this._snap.Matrix).scale(r).translate(-e.x,-e.y),s.transform(i),this._fireViewboxChange(),e):(t=s.getBBox(!0),i=s.transform().localMatrix,r=n(i.a,1e3),o=n(-i.e||0,1e3),a=n(-i.f||0,1e3),e=this._cachedViewbox={x:o?o/r:0,y:a?a/r:0,width:c.width/r,height:c.height/r,scale:r,inner:{width:t.width,height:t.height,x:t.x,y:t.y},outer:c})},a.prototype.scroll=function(e){var t=this._viewport.node,n=t.getCTM();return e&&(e=c.extend({dx:0,dy:0},e||{}),n=this._svg.node.createSVGMatrix().translate(e.dx,e.dy).multiply(n),s(t,n),this._fireViewboxChange()),{x:n.e,y:n.f}},a.prototype.zoom=function(e,t){var i=this.viewbox();if(void 0===e)return i.scale;var r=i.outer;"fit-viewport"===e&&(e=Math.min(1,r.width/(i.inner.width+i.inner.x),r.height/(i.inner.height+i.inner.y))),"auto"===t&&(t={x:r.width/2,y:r.height/2});var o=this._setZoom(e,t);return this._fireViewboxChange(),n(o.a,1e3)},a.prototype._setZoom=function(e,t){var n,i,r,o,a,p=this._svg.node,u=this._viewport.node,l=p.createSVGMatrix(),d=p.createSVGPoint();r=u.getCTM();var h=r.a;return t?(n=c.extend(d,t),i=n.matrixTransform(r.inverse()),o=l.translate(i.x,i.y).scale(1/h*e).translate(-i.x,-i.y),a=r.multiply(o)):a=l.scale(e),s(this._viewport.node,a),a},a.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},a.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();if(e.waypoints){var i=this.getGraphics(e),r=i.getBBox(!0);t=i.getBBox(),t.x-=r.x,t.y-=r.y,t.width+=2*r.x,t.height+=2*r.y}else t=e;var o=t.x*n.scale-n.x*n.scale,a=t.y*n.scale-n.y*n.scale,s=t.width*n.scale,c=t.height*n.scale;return{x:o,y:a,width:s,height:c}}},{}],65:[function(e,t){"use strict";function n(){this._uid=12}var i=e(142);t.exports=n,n.prototype.createRoot=function(e){return this.create("root",e)},n.prototype.createLabel=function(e){return this.create("label",e)},n.prototype.createShape=function(e){return this.create("shape",e)},n.prototype.createConnection=function(e){return this.create("connection",e)},n.prototype.create=function(e,t){return t=t||{},t.id||(t.id=e+"_"+this._uid++),i.create(e,t)}},{}],66:[function(e,t){"use strict";function n(){this._elements={}}var i="data-element-id";t.exports=n,n.prototype.add=function(e,t,n){var r=e.id;if(!r)throw new Error("element must have an id");if(this._elements[r])throw new Error("element with id "+r+" already added");t.attr(i,r),n&&n.attr(i,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},n.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(r.gfx.attr(i,null),r.secondaryGfx&&r.secondaryGfx.attr(i,null),delete t[n])},n.prototype.get=function(e){var t;t="string"==typeof e?e:e&&e.attr(i);var n=this._elements[t];return n&&n.element},n.prototype.filter=function(e){var t=this._elements,n=[];return Object.keys(t).forEach(function(i){var r=t[i],o=r.element,a=r.gfx;e(o,a)&&n.push(o)}),n},n.prototype.getGraphics=function(e){var t=e.id||e,n=this._elements[t];return n&&n.gfx}},{}],67:[function(e,t){"use strict";function n(){}function i(){this._listeners={};var e=this;this.on("diagram.destroy",1,function(){e._listeners=null})}var r=window._,o=1e3;n.prototype={stopPropagation:function(){this.propagationStopped=!0},preventDefault:function(){this.defaultPrevented=!0},init:function(e){r.extend(this,e||{})}},t.exports=i,t.exports.Event=n,i.prototype.on=function(e,t,n){if(e=r.isArray(e)?e:[e],r.isFunction(t)&&(n=t,t=o),!r.isNumber(t))throw new Error("priority must be a number");var i=this,a={priority:t,callback:n};e.forEach(function(e){i._addListener(e,a)})},i.prototype.once=function(e,t){function n(){t.apply(i,arguments),i.off(e,n)}var i=this;this.on(e,n)},i.prototype.off=function(e,t){var n,i,r=this._getListeners(e);if(t)for(i=r.length-1;n=r[i];i--)n.callback===t&&r.splice(i,1);else r.length=0},i.prototype.fire=function(e,t){var i,r,o,a,s,c;if(c=Array.prototype.slice.call(arguments),"string"==typeof e?c.shift():(i=e,e=i.type),!e)throw new Error("no event type specified");if(o=this._listeners[e],!o)return!0;t instanceof n?i=t:(i=Object.create(n.prototype),i.init(t)),c[0]=i,r=i.type;try{for(e!==r&&(i.type=e),a=0,s;(s=o[a])&&!i.propagationStopped;a++)try{s.callback.apply(null,c)===!1&&i.preventDefault()}catch(p){if(!this.handleError(p))throw console.error("unhandled error in event listener"),console.error(p.stack),p}}finally{e!==r&&(i.type=r)}return i.defaultPrevented?!1:i.propagationStopped?null:!0},i.prototype.handleError=function(e){return!this.fire("error",{error:e})},i.prototype._addListener=function(e,t){var n,i,r=this._getListeners(e);for(n=0;i=r[n];n++)if(i.priority<t.priority)return void r.splice(n,0,t);r.push(t)},i.prototype._getListeners=function(e){var t=this._listeners[e];return t||(this._listeners[e]=t=[]),t}},{}],68:[function(e,t){function n(e,t,n){this._renderer=e,this._elementRegistry=t,this._snap=n}var i=window._,r=e(154),o=e(150);n.$inject=["renderer","elementRegistry","snap"],t.exports=n,n.prototype._getChildren=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=r.getChildren(n),t||(t=n.parent().group().attr("class","djs-children"))):t=n,t},n.prototype._clear=function(e){var t=r.getVisual(e);return o.clear(t.node),t},n.prototype._createContainer=function(e,t){var n=t.group().attr("class","djs-group"),i=n.group().attr("class","djs-element djs-"+e);return i.group().attr("class","djs-visual"),i},n.prototype.create=function(e,t){var n=this._getChildren(t.parent);return this._createContainer(e,n)},n.prototype.updateContainments=function(e){var t,n=this,r=this._elementRegistry;t=i.reduce(e,function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e},{}),i.forEach(t,function(e){var t=n._getChildren(e),o=e.children;o&&i.forEach(o.slice().reverse(),function(e){var n=r.getGraphics(e);n.parent().prependTo(t)})})},n.prototype.update=function(e,t,n){var i=this._clear(n);if("shape"===e)this._renderer.drawShape(i,t),n.translate(t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this._renderer.drawConnection(i,t)}n.attr("display",t.hidden?"none":"block")},n.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);t.parent().remove()}},{}],69:[function(e,t){t.exports={__depends__:[e(73)],__init__:["canvas"],canvas:["type",e(64)],elementRegistry:["type",e(66)],elementFactory:["type",e(65)],eventBus:["type",e(67)],graphicsFactory:["type",e(68)]}},{}],70:[function(e,t){"use strict";function n(e){this.CONNECTION_STYLE=e.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=e.style({fill:"white",stroke:"fuchsia",strokeWidth:2})}function i(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function r(e,t){return a.create("polyline",{points:i(e)}).attr(t||{})}function o(e,t){return e.attr({points:i(t)})}var a=e(71);t.exports=n,n.$inject=["styles"],n.prototype.drawShape=function(e,t){return e.rect(0,0,t.width||0,t.height||0,10,10).attr(this.SHAPE_STYLE)},n.prototype.drawConnection=function(e,t){return r(t.waypoints,this.CONNECTION_STYLE).appendTo(e)},t.exports.createLine=r,t.exports.updateLine=o},{}],71:[function(e,t){var n=window.Snap;e(74),t.exports=n},{}],72:[function(e,t){"use strict";function n(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}};this.cls=function(e,t,n){var r=this.style(t,n);return i.extend(r,{"class":e})},this.style=function(t,n){i.isArray(t)||n||(n=t,t=[]);var r=i.inject(t,function(t,n){return i.extend(t,e[n]||{})},{});return n?i.extend(r,n):r}}var i=window._;t.exports=n},{}],73:[function(e,t){"use strict";t.exports={renderer:["type",e(70)],snap:["value",e(71)],styles:["type",e(72)]}},{}],74:[function(){"use strict";var e=window.Snap;e.plugin(function(e,t){t.prototype.children=function(){for(var t=[],n=this.node.childNodes,i=0,r=n.length;r>i;i++)t[i]=new e(n[i]);return t}}),e.plugin(function(e,t){function n(e){return e.split(/\s+/)}function i(e){return e.join(" ")}function r(e){return n(e.attr("class")||"")}function o(e,t){e.attr("class",i(t))}t.prototype.addClass=function(e){var t,i,a=r(this),s=n(e);for(t=0,i;i=s[t];t++)-1===a.indexOf(i)&&a.push(i);return o(this,a),this},t.prototype.hasClass=function(e){if(!e)throw new Error("[snapsvg] syntax: hasClass(clsStr)");return-1!==r(this).indexOf(e)},t.prototype.removeClass=function(e){var t,i,a,s=r(this),c=n(e);for(t=0,i;i=c[t];t++)a=s.indexOf(i),-1!==a&&s.splice(a,1);return o(this,s),this}}),e.plugin(function(e,t){t.prototype.translate=function(t,n){var i=new e.Matrix;return i.translate(t,n),this.transform(i)}}),e.plugin(function(e){e.create=function(t,n){return e._.wrap(e._.$(t,n))}}),e.plugin(function(e){e.createSnapAt=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("width",t),r.setAttribute("height",n),i||(i=document.body),i.appendChild(r),new e(r)}})},{}],75:[function(e,t){function n(e,t,n,h,f,m,y){function v(e){f.update("connection",e.connection,e.connectionGfx)}function g(e){return e.filter(function(t,n){return!r.pointsOnLine(e[n-1],e[n+1],t)})}var x;try{x=e.get("connectionDocking")}catch(w){}this.start=function(e,t,i,r){var o,a,s=t.waypoints,c=n.getGraphics(t);o=r||0!==i?r||i!==s.length-1?u:d:l,a={connection:t,bendpointIndex:i,insert:r,type:o},h.activate(e,"bendpoint.move",{data:{connection:t,connectionGfx:c,context:a}})},t.on("bendpoint.move.start",function(e){var t=e.context,i=t.connection,r=i.waypoints,a=r.slice(),s=t.insert,c=t.bendpointIndex;t.originalWaypoints=r,s&&a.splice(c,0,null),i.waypoints=a,t.draggerGfx=o.addBendpoint(n.getLayer("overlays")),t.draggerGfx.addClass("djs-dragging"),n.addMarker(i,p)}),t.on("bendpoint.move.hover",function(e){e.context.hover=e.hover,n.addMarker(e.hover,c)}),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],function(e){var t=e.context.hover;t&&(n.removeMarker(t,c),n.removeMarker(t,e.context.target?a:s))}),t.on("bendpoint.move.move",function(e){var t=e.context,i=e.connection;i.waypoints[t.bendpointIndex]={x:e.x,y:e.y},x&&(i.waypoints=x.getCroppedWaypoints(i));var r=t.allowed=m.allowed(t.type,t);r?t.hover&&(n.removeMarker(t.hover,s),n.addMarker(t.hover,a),t.target=t.hover):r===!1&&t.hover&&(n.removeMarker(t.hover,a),n.addMarker(t.hover,s),t.target=null),t.draggerGfx.translate(e.x,e.y),v(e)}),t.on(["bendpoint.move.end","bendpoint.move.cancel"],function(e){var t=e.context,r=t.connection;t.draggerGfx.remove(),t.newWaypoints=i.clone(r.waypoints),r.waypoints=t.originalWaypoints,n.removeMarker(r,p)}),t.on("bendpoint.move.end",function(e){var t=e.context,n=t.newWaypoints,i=t.bendpointIndex,r=n[i],o=t.allowed;o===!0&&t.type===l?y.reconnectStart(t.connection,t.target,r):o===!0&&t.type===d?y.reconnectEnd(t.connection,t.target,r):o!==!1&&t.type===u?y.updateWaypoints(t.connection,g(n)):v(e)}),t.on("bendpoint.move.cancel",function(e){v(e)})}var i=window._,r=e(153),o=e(78),a="connect-ok",s="connect-not-ok",c="connect-hover",p="djs-updating",u="connection.updateWaypoints",l="connection.reconnectStart",d="connection.reconnectEnd";n.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","rules","modeling"],t.exports=n},{}],76:[function(e,t){function n(e){function t(e,t){return r.snapTo(e,t)}function n(e){return i.pick(e,["x","y"])}function o(e){return e.width?{x:e.width/2+e.x,y:e.height/2+e.y}:void 0}function a(e){var t=e.snapPoints,n=e.connection.waypoints,r=e.bendpointIndex,o=[n[r-1],n[r+1]];return t||(e.snapPoints=t={horizontal:[],vertical:[]},i.forEach(o,function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}e.on("bendpoint.move.start",function(e){e.context.snapStart=n(e)}),e.on("bendpoint.move.move",1500,function(e){var n,r,s=e.context,c=a(s),p=s.snapStart,u=s.target,l=u&&o(u),d=p.x+e.dx,h=p.y+e.dy;if(c){n=t(l?c.vertical.concat([l.x]):c.vertical,d),r=t(l?c.horizontal.concat([l.y]):c.horizontal,h);var f=d-n,m=h-r;i.extend(e,{dx:e.dx-f,dy:e.dy-m,x:e.x-f,y:e.y-m})}})}var i=window._,r=window.Snap;n.$inject=["eventBus"],t.exports=n},{}],77:[function(e,t){function n(e,t,n,a,s){function c(e,t){var i=r.toCanvasCoordinates(n,t);return r.getApproxIntersection(e,i)}function p(e,t){var n=t.waypoints,i=c(n,e);i&&s.start(e,t,i.index,!i.bendpoint)}function u(e,t){var r=n.getLayer("overlays"),o=r.select(".djs-bendpoints[data-element-id="+e.id+"]");return!o&&t&&(o=r.group().addClass("djs-bendpoints").attr("data-element-id",e.id),i.on(o.node,"mousedown",function(t){p(t,e)})),o}function l(e,t){t.waypoints.forEach(function(t){r.addBendpoint(e).translate(t.x,t.y)}),r.addBendpoint(e).addClass("floating")}function d(e){e.selectAll("."+o).forEach(function(e){e.remove()})}function h(e){var t=u(e);return t||(t=u(e,!0),l(t,e)),t}function f(e){var t=u(e);t&&(d(t),l(t,e))}t.on("connection.changed",function(e){f(e.element)}),t.on("connection.remove",function(e){var t=u(e.element);t&&t.remove()}),t.on("element.marker.update",function(e){var t,n=e.element;n.waypoints&&(t=h(n),t[e.add?"addClass":"removeClass"](e.marker))}),t.on("element.mousemove",function(e){var t,n,i,r=e.element,o=r.waypoints;if(o){if(t=u(r,!0),n=t.select(".floating"),!n)return;i=c(o,e.originalEvent),i&&n.translate(i.point.x,i.point.y)}}),t.on("element.mousedown",function(e){var t=e.originalEvent,n=e.element,i=n.waypoints;i&&p(t,n,i)}),t.on("selection.changed",function(e){var t=e.newSelection,n=t[0];n&&n.waypoints&&h(n)}),t.on("element.hover",function(e){var t=e.element;t.waypoints&&(h(t),i.on(e.gfx.node,"mousemove",a.mouseHandler("element.mousemove")))}),t.on("element.out",function(e){i.off(e.gfx.node,"mousemove",a.mouseHandler("element.mousemove"))})}var i=e(150),r=e(78),o=r.BENDPOINT_CLS;n.$inject=["injector","eventBus","canvas","interactionEvents","bendpointMove"],t.exports=n},{}],78:[function(e,t){function n(e,t){var n=e.x,i=e.y;return[["M",n,i],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}function i(e){var t=[];return e.forEach(function(e,n){t.push([0===n?"M":"L",e.x,e.y])}),t}function r(e,t){var n,i;for(n=0;i=e[n];n++)if(c.distance(i,t)<=u)return{point:e[n],bendpoint:!0,index:n};return null}function o(e,t){var r,o=a.path.intersection(n(t,u),i(e)),s=o[0],c=o[o.length-1];return s?s!==c?s.segment2!==c.segment2?(r=Math.max(s.segment2,c.segment2)-1,{point:e[r],bendpoint:!0,index:r}):{point:{x:Math.round(s.x+c.x)/2,y:Math.round(s.y+c.y)/2},index:s.segment2}:{point:{x:Math.round(s.x),y:Math.round(s.y)},index:s.segment2}:null}var a=window.Snap,s=e(152),c=e(153),p=t.exports.BENDPOINT_CLS="djs-bendpoint";t.exports.toCanvasCoordinates=function(e,t){var n,i=s.toPoint(t),r=e._container.getBoundingClientRect();n={x:r.left,y:r.top};var o=e.viewbox();return{x:o.x+(i.x-n.x)/o.scale,y:o.y+(i.y-n.y)/o.scale}},t.exports.addBendpoint=function(e){var t=e.group().addClass(p);return t.circle(0,0,4).addClass("djs-visual"),t.circle(0,0,10).addClass("djs-hit"),t};var u=10;t.exports.getApproxIntersection=function(e,t){return r(e,t)||o(e,t)}},{}],79:[function(e,t){t.exports={__depends__:[e(89),e(129)],__init__:["bendpoints","bendpointSnapping"],bendpoints:["type",e(77)],bendpointMove:["type",e(75)],bendpointSnapping:["type",e(76)]}},{}],80:[function(e,t){"use strict";function n(e,t,n){e.on("element.changed",function(n){var i=n.element;n.gfx||(n.gfx=t.getGraphics(i)),n.gfx&&(i.waypoints?e.fire("connection.changed",n):e.fire("shape.changed",n))}),e.on("elements.changed",function(t){var i=t.elements;i.forEach(function(t){e.fire("element.changed",{element:t})}),n.updateContainments(i)}),e.on("shape.changed",function(e){n.update("shape",e.element,e.gfx)}),e.on("connection.changed",function(e){n.update("connection",e.element,e.gfx)})}n.$inject=["eventBus","elementRegistry","graphicsFactory"],t.exports=n},{}],81:[function(e,t){t.exports={__init__:["changeSupport"],changeSupport:["type",e(80)]}},{}],82:[function(e,t){function n(e,t,n,a,s,c){function p(e,t){return a.allowed("connection.create",{source:e,target:t})}function u(e,t,n,r){var o=i.getShapePath(s.getGraphics(n)),a=r&&i.getShapePath(s.getGraphics(r)),c=i.getConnectionPath([e,t]);return e=i.getElementLineIntersection(o,c,!0)||e,t=r&&i.getElementLineIntersection(a,c,!1)||t,[e,t]}e.on("connect.move",function(e){var t,n,r,o=e.context,a=o.source,s=o.target,c=o.visual;t=i.getMidPoint(a),n={x:e.x,y:e.y},r=u(t,n,a,s),c.attr("points",[r[0].x,r[0].y,r[1].x,r[1].y])}),e.on("connect.hover",function(e){var t,n=e.context,i=n.source,a=e.hover;t=n.canExecute=p(i,a),null!==t&&(n.target=a,c.addMarker(a,t?r:o))}),e.on(["connect.out","connect.cleanup"],function(e){var t=e.context;t.target&&c.removeMarker(t.target,t.canExecute?r:o),t.target=null}),e.on("connect.cleanup",function(e){var t=e.context;t.visual&&t.visual.remove()}),e.on("connect.start",function(e){var t,n=e.context;
6
+ t=c.getDefaultLayer().polyline().attr({stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),n.visual=t}),e.on("connect.end",function(e){var t=e.context,i=t.source,r=t.target,o=t.canExecute||p(i,r);o&&n.connect(i,r)}),this.start=function(e,n,i){t.activate(e,"connect",{autoActivate:i,data:{shape:n,context:{source:n}}})}}var i=e(141),r="connect-ok",o="connect-not-ok";n.$inject=["eventBus","dragging","modeling","rules","elementRegistry","canvas"],t.exports=n},{}],83:[function(e,t){t.exports={__depends__:[e(133),e(129),e(89)],connect:["type",e(82)]}},{}],84:[function(e,t){"use strict";function n(e,t){this._providers=[],this._eventBus=e,this._overlays=t,this._current=null,this._init()}var i=window._,r=window.$;n.$inject=["eventBus","overlays"],n.prototype._init=function(){var e=this._eventBus,t=this;e.on("selection.changed",function(e){var n=e.newSelection;1===n.length?t.open(n[0]):t.close()})},n.prototype.registerProvider=function(e){this._providers.push(e)},n.prototype.getEntries=function(e){var t={};return i.forEach(this._providers,function(n){var r=n.getContextPadEntries(e);i.forEach(r,function(e,n){t[n]=e})}),t},n.prototype.trigger=function(e,t,n){var o,a,s,c=this._current,p=c.element,u=c.entries,l=r(t.target);if(l=l.is(".entry")?l:l.parents(".djs-context-pad .entry"),!l.length)return t.preventDefault();if(o=u[l.attr("data-action")],a=o.action,s=t.originalEvent||t,i.isFunction(a)){if("click"===e)return a(s,p,n)}else if(a[e])return a[e](s,p,n);t.preventDefault()},n.prototype.open=function(e){if(this._current&&this._current.open){if(this._current.element===e)return;this.close()}this._updateAndOpen(e)},n.prototype._updateAndOpen=function(e){var t=this.getPad(e),n=this.getEntries(e),o=t.html.html("");i.forEach(n,function(e,t){var n=r(e.html||'<div class="entry" draggable="true"></div>').attr("data-action",t),i=e.group||"default",a=o.find("[data-group="+i+"]");a.length||(a=r('<div class="group"></div>').attr("data-group",i).appendTo(o)),n.appendTo(a),e.className&&n.addClass(e.className),e.imageUrl&&n.append('<img src="'+e.imageUrl+'">')}),o.addClass("open"),this._current={element:e,pad:t,entries:n,open:!0},this._eventBus.fire("contextPad.open",{current:this._current})},n.prototype.getPad=function(e){var t=this,n=this._overlays,i=n.get({element:e,type:"context-pad"});if(!i.length){var o=r('<div class="djs-context-pad"></div>');o.on("click",function(e){t.trigger("click",e)}),o.on("mousedown",function(e){e.stopPropagation()}),o.on("dragstart",function(e){t.trigger("dragstart",e)}),n.add(e,"context-pad",{position:{right:-9,top:-6},html:o}),i=n.get({element:e,type:"context-pad"}),this._eventBus.fire("contextPad.create",{element:e,pad:i[0]})}return i[0]},n.prototype.close=function(){this._current&&(this._current.open&&this._current.pad.html.removeClass("open"),this._current.open=!1,this._eventBus.fire("contextPad.close",{current:this._current}))},n.prototype.isOpen=function(){return this._current&&this._current.open},t.exports=n},{}],85:[function(e,t){t.exports={__depends__:[e(91),e(121)],contextPad:["type",e(84)]}},{}],86:[function(e,t){function n(e,t,n,o,a,s,c,p){function u(e,t,i){return i?n.allowed("shape.append",{source:i,shape:e,parent:t}):n.allowed("shape.create",{shape:e,parent:t})}function l(e){var t,n,i;return t=a.getDefaultLayer().group().attr(p.cls("djs-drag-group",["no-events"])),n=t.group().addClass("djs-dragger"),n.translate(e.width/-2,e.height/-2),i=n.group().addClass("djs-visual"),c.drawShape(i,e),t}e.on("create.move",function(e){var t=e.context,n=t.shape,o=t.visual;o||(o=t.visual=l(n)),o.translate(e.x,e.y);var s,c=e.hover;s=t.canExecute=c&&u(t.shape,c,t.source),c&&null!==s&&(t.target=c,a.addMarker(c,s?i:r))}),e.on("create.end",function(e){var t=e.context,n=t.source,i=t.shape,r=t.target,a={x:e.x,y:e.y};if(t.canExecute){var s;s=n?o.appendShape(n,i,a,r):o.createShape(i,a,r)}}),e.on(["create.out","create.cleanup"],function(e){var t=e.context;t.target&&a.removeMarker(t.target,t.canExecute?i:r)}),e.on("create.cleanup",function(e){var t=e.context;t.visual&&t.visual.remove()}),this.start=function(e,n,i){t.activate(e,"create",{cursor:"grabbing",autoActivate:!0,data:{shape:n,context:{shape:n,source:i}}})}}var i="drop-ok",r="drop-not-ok";n.$inject=["eventBus","dragging","rules","modeling","canvas","elementFactory","renderer","styles"],t.exports=n},{}],87:[function(e,t){t.exports={__depends__:[e(89),e(133)],create:["type",e(86)]}},{}],88:[function(e,t){function n(e){e instanceof MouseEvent?c.stopEvent(e,!0):c.preventDefault(e)}function i(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function r(e,t){return{x:e.x-t.x,y:e.y-t.y}}function o(t,o,u){function l(n){var i=e(67).Event,r=new i;return r.init(a.extend({},_.payload,_.data)),t.fire("drag."+n,r)?t.fire(_.prefix+"."+n,r):!1}function d(e,t){var s,d=_.payload,h=_.start,f=c.toPoint(e),m=r(f,h),y=o._container.getBoundingClientRect();s={x:y.left,y:y.top};var v=o.viewbox(),g={x:v.x+(f.x-s.x)/v.scale,y:v.y+(f.y-s.y)/v.scale,dx:m.x/v.scale,dy:m.y/v.scale};if(!_.active&&(t||i(m)>_.threshold)){if(a.extend(d,{x:g.x-g.dx,y:g.y-g.dy,dx:0,dy:0},{originalEvent:e}),!1===l("start"))return x();_.active=!0,_.keepSelection||(_.previousSelection=u.get(),u.select(null))}n(e),_.active&&(a.extend(d,g,{originalEvent:e}),_.cursor&&p.set(_.cursor),l("move"))}function h(e){var t=!0;_.active&&(e&&(_.payload.originalEvent=e,n(e)),t=l("end")),w(t)}function f(e){27===e.which&&(e.preventDefault(),x())}function m(e){var t=function(){s.off(document,"click",i,!0)},i=function(e){n(e),t()};_.active&&(s.on(document,"click",i,!0),setTimeout(t,400)),h(e)}function y(e){d(e)}function v(e){var t=_.payload;t.hoverGfx=e.gfx,t.hover=e.element,l("hover")}function g(){l("out");var e=_.payload;e.hoverGfx=null,e.hover=null}function x(e){_&&(_.active&&l("cancel"),w(e))}function w(e){l("cleanup"),p.unset(),s.off(document,"mousemove",d),s.off(document,"mousedown",m,!0),s.off(document,"mouseup",h,!0),s.off(document,"keyup",f),s.off(document,"touchstart",y,!0),s.off(document,"touchcancel",x,!0),s.off(document,"touchmove",d,!0),s.off(document,"touchend",h,!0),t.off("element.hover",v),t.off("element.out",g),e!==!1&&_.previousSelection&&!u.get().length&&u.select(_.previousSelection),_=null}function E(e,i,r){_&&x(!1),r=a.extend({},b,r||{});var o=r.data||{},p=c.getOriginal(e)||e;_=a.extend({prefix:i,data:o,payload:{},start:c.toPoint(e)},r),r.manual||(p instanceof MouseEvent?(s.on(document,"mousemove",d),s.on(document,"mousedown",m,!0),s.on(document,"mouseup",h,!0)):p instanceof TouchEvent&&(s.on(document,"touchstart",y,!0),s.on(document,"touchcancel",x,!0),s.on(document,"touchmove",d,!0),s.on(document,"touchend",h,!0)),s.on(document,"keyup",f),t.on("element.hover",v),t.on("element.out",g)),n(e),l("activate"),r.autoActivate&&d(e,!0)}var _,b={threshold:5};t.on("diagram.destroy",x),this.activate=E,this.move=d,this.hover=v,this.out=g,this.end=h,this.cancel=x,this.active=function(){return _},this.setOptions=function(e){a.extend(b,e)}}var a=window._,s=e(150),c=e(152),p=e(149);o.$inject=["eventBus","canvas","selection"],t.exports=o},{}],89:[function(e,t){t.exports={__depends__:[e(133)],dragging:["type",e(88)]}},{}],90:[function(e,t){"use strict";function n(e,t,n,r){function c(n,i){var a,s=o.closest(i.target,"svg, .djs-element"),c=s&&r(s),p=t.get(c);c&&p&&(a=e.fire(n,{element:p,gfx:c,originalEvent:i}),a&&i.preventDefault())}function p(e){var t=h[e];return t||(t=h[e]=function(t){t.button||c(e,t)}),t}function u(e){var t=e.node;o.on(t,"mouseover",p("element.hover")),o.on(t,"mouseout",p("element.out")),o.on(t,"click",p("element.click")),o.on(t,"dblclick",p("element.dblclick")),o.on(t,"mousedown",p("element.mousedown")),o.on(t,"mouseup",p("element.mouseup"))}function l(e){var t=e.node;o.off(t,"mouseover",p("element.hover")),o.off(t,"mouseout",p("element.out")),o.off(t,"click",p("element.click")),o.off(t,"dblclick",p("element.dblclick")),o.off(t,"mousedown",p("element.mousedown")),o.off(t,"mouseup",p("element.mouseup"))}var d=n.cls("djs-hit",["no-fill","no-border"],{stroke:"white",strokeWidth:15}),h={};e.on("canvas.destroy",function(e){l(e.svg)}),e.on("canvas.init",function(e){u(e.svg)}),e.on(["shape.added","connection.added"],function(e){var t,n,r=e.element,o=e.gfx;r.waypoints?(t=a(r.waypoints),n="connection"):(t=i.create("rect",{x:0,y:0,width:r.width,height:r.height}),n="shape"),t.attr(d).appendTo(o.node)}),e.on("shape.changed",function(e){var t=e.element,n=e.gfx,i=n.select(".djs-hit");i.attr({width:t.width,height:t.height})}),e.on("connection.changed",function(e){var t=e.element,n=e.gfx,i=n.select(".djs-hit");s(i,t.waypoints)}),this.fire=c,this.mouseHandler=p}var i=window.Snap,r=e(70),o=e(150),a=r.createLine,s=r.updateLine;n.$inject=["eventBus","elementRegistry","styles","snap"],t.exports=n},{}],91:[function(e,t){t.exports={__init__:["interactionEvents"],interactionEvents:["type",e(90)]}},{}],92:[function(e,t){"use strict";function n(e,t,n,i,r){var o=this;this._commandStack=n,this._modeling=i,this._selection=r,this._eventBus=t,this._listeners=[],this._keyHandler=function(e){var t,n,i=o._listeners,r=e.keyCode||e.charCode||-1;for(t=0;n=i[t];t++)n(r,e)&&e.stopPropagation()},t.on("diagram.destroy",function(){o._fire("destroy"),o.unbind(),o._listeners=null}),t.on("diagram.init",function(){o._fire("init"),e&&e.bindTo&&o.bind(e.bindTo)}),this._init()}var i=e(150);n.$inject=["config.keyboard","eventBus","commandStack","modeling","selection"],t.exports=n,n.prototype.bind=function(e){this._node=e,i.on(e,"keydown",this._keyHandler,!0),this._fire("bind")},n.prototype.getBinding=function(){return this._node},n.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),i.off(e,"keydown",this._keyHandler,!0)),this._node=null},n.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node,listeners:this._listeners})},n.prototype._init=function(){function e(e){return e.ctrlKey||e.metaKey}function t(e){return e.shiftKey}function n(n,i){return e(i)&&!t(i)&&90===n?(a.undo(),!0):void 0}function i(n,i){return e(i)&&(89===n||90===n&&t(i))?(a.redo(),!0):void 0}function r(e){if(46===e){var t=c.get();return t.length&&s.removeElements(t.slice()),!0}}var o=this._listeners,a=this._commandStack,s=this._modeling,c=this._selection;o.push(n),o.push(i),o.push(r)}},{}],93:[function(e,t){t.exports={__init__:["keyboard"],keyboard:["type",e(92)]}},{}],94:[function(e,t){"use strict";function n(e,t,n,a,s){this._selection=s,this._dragging=n;var c=this,p={create:function(e){var n,i=t.getDefaultLayer();n=e.frame=o.create("rect",{"class":"djs-lasso-overlay",width:1,height:1,x:0,y:0}),n.appendTo(i)},update:function(e){var t=e.frame,n=e.bbox;t.attr({x:n.x,y:n.y,width:n.width,height:n.height})},remove:function(e){e.frame&&e.frame.remove()}};e.on("lasso.end",function(e){var t=i(e),n=a.filter(function(e){return e});c.select(n,t)}),e.on("lasso.start",function(e){var t=e.context;t.bbox=i(e),p.create(t)}),e.on("lasso.move",function(e){var t=e.context;t.bbox=i(e),p.update(t)}),e.on("lasso.end",function(e){var t=e.context;p.remove(t)}),e.on("lasso.cleanup",function(e){var t=e.context;p.remove(t)}),r.on(t._container,"mousedown",function(e){!e.button&&e.altKey&&c.activate(e)},!0)}function i(e){var t,n={x:e.x-e.dx,y:e.y-e.dy},i={x:e.x,y:e.y};return t=n.x<=i.x&&n.y<i.y||n.x<i.x&&n.y<=i.y?{x:n.x,y:n.y,width:i.x-n.x,height:i.y-n.y}:n.x>=i.x&&n.y<i.y||n.x>i.x&&n.y<=i.y?{x:i.x,y:n.y,width:n.x-i.x,height:i.y-n.y}:n.x<=i.x&&n.y>i.y||n.x<i.x&&n.y>=i.y?{x:n.x,y:i.y,width:i.x-n.x,height:n.y-i.y}:n.x>=i.x&&n.y>i.y||n.x>i.x&&n.y>=i.y?{x:i.x,y:i.y,width:n.x-i.x,height:n.y-i.y}:{x:i.x,y:i.y,width:0,height:0}}var r=e(150),o=window.Snap,a=window._,s=e(151).getEnclosedElements;n.$inject=["eventBus","canvas","dragging","elementRegistry","selection"],t.exports=n,n.prototype.activate=function(e){this._dragging.activate(e,"lasso",{autoActivate:!0,data:{context:{}}})},n.prototype.select=function(e,t){var n=s(e,t);this._selection.select(a.values(n))}},{}],95:[function(e,t){"use strict";t.exports={__init__:["lassoTool"],lassoTool:["type",e(94)]}},{}],96:[function(e,t){"use strict";function n(){}var i=e(141);t.exports=n,n.prototype.getConnectionWaypoints=function(e){return[i.getMidPoint(e.source),i.getMidPoint(e.target)]}},{}],97:[function(e,t){"use strict";function n(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",function(){i.registerHandlers(n)})}var i=window._,r=e(142);n.$inject=["eventBus","elementFactory","commandStack"],t.exports=n,n.prototype.getHandlers=function(){return{"shape.create":e(101),"shape.delete":e(104),"shape.move":e(107),"shapes.move":e(108),"shape.resize":e(111),"shape.append":e(98),"label.create":e(100),"connection.create":e(99),"connection.delete":e(102),"connection.move":e(106),"connection.layout":e(105),"connection.updateWaypoints":e(112),"connection.reconnectStart":e(110),"connection.reconnectEnd":e(110),"elements.delete":e(103)}},n.prototype.registerHandlers=function(e){i.forEach(this.getHandlers(),function(t,n){e.registerHandler(n,t)})},n.prototype.moveShape=function(e,t,n,i){var r={shape:e,delta:t,newParent:n,hints:i||{}};this._commandStack.execute("shape.move",r)},n.prototype.moveShapes=function(e,t,n,i){var r={shapes:e,delta:t,newParent:n,hints:i||{}};this._commandStack.execute("shapes.move",r)},n.prototype.moveConnection=function(e,t,n){var i={connection:e,delta:t,newParent:n};this._commandStack.execute("connection.move",i)},n.prototype.layoutConnection=function(e){var t={connection:e};this._commandStack.execute("connection.layout",t)},n.prototype.createConnection=function(e,t,n,i){n=this._create("connection",n);var r={source:e,target:t,parent:i,connection:n};return this._commandStack.execute("connection.create",r),r.connection},n.prototype.createShape=function(e,t,n){e=this._create("shape",e);var i={position:t,parent:n,shape:e};return this._commandStack.execute("shape.create",i),i.shape},n.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i,shape:n};return this._commandStack.execute("label.create",r),r.shape},n.prototype.appendShape=function(e,t,n,i,r,o){t=this._create("shape",t);var a={source:e,position:n,parent:i,shape:t,connection:r,connectionParent:o};return this._commandStack.execute("shape.append",a),a.shape},n.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},n.prototype.removeShape=function(e){var t={shape:e};this._commandStack.execute("shape.delete",t)},n.prototype.removeConnection=function(e){var t={connection:e};this._commandStack.execute("connection.delete",t)},n.prototype.resizeShape=function(e,t){var n={shape:e,newBounds:t};this._commandStack.execute("shape.resize",n)},n.prototype.updateWaypoints=function(e,t){var n={connection:e,newWaypoints:t};this._commandStack.execute("connection.updateWaypoints",n)},n.prototype.reconnectStart=function(e,t,n){var i={connection:e,newSource:t,dockingPoint:n};this._commandStack.execute("connection.reconnectStart",i)},n.prototype.reconnectEnd=function(e,t,n){var i={connection:e,newTarget:t,dockingPoint:n};this._commandStack.execute("connection.reconnectEnd",i)},n.prototype.connect=function(e,t,n){return this.createConnection(e,t,n||{},e.parent)},n.prototype._create=function(e,t){return t instanceof r.Base?t:this._elementFactory.create(e,t)}},{}],98:[function(e,t){"use strict";function n(e){this._modeling=e}var i=e(109);n.prototype=Object.create(i.prototype),n.$inject=["modeling"],t.exports=n,n.prototype.preExecute=function(e){if(!e.source)throw new Error("source required");var t=e.parent||e.source.parent,n=this._modeling.createShape(e.shape,e.position,t);e.shape=n},n.prototype.postExecute=function(e){var t=e.connectionParent||e.shape.parent;this._modeling.createConnection(e.source,e.shape,e.connection,t)}},{}],99:[function(e,t){"use strict";function n(e,t){this._canvas=e,this._layouter=t}n.$inject=["canvas","layouter"],t.exports=n,n.prototype.execute=function(e){var t=e.source,n=e.target,i=e.parent;if(!t||!n)throw new Error("source and target required");if(!i)throw new Error("parent required");var r=e.connection;return r.source=t,r.target=n,r.waypoints||(r.waypoints=this._layouter.getConnectionWaypoints(r)),this._canvas.addConnection(r,i),r},n.prototype.revert=function(e){var t=e.connection;this._canvas.removeConnection(t),t.source=null,t.target=null}},{}],100:[function(e,t){"use strict";function n(e){this._canvas=e}var i=e(101);n.prototype=Object.create(i.prototype),n.$inject=["canvas"],t.exports=n,n.prototype.revert=function(e){e.shape.labelTarget=null,this._canvas.removeShape(e.shape)},n.prototype.getParent=function(e){return e.parent||e.labelTarget&&e.labelTarget.parent},n.prototype.addElement=function(e,t,n){e.labelTarget=n.labelTarget,this._canvas.addShape(e,t,!0)}},{}],101:[function(e,t){"use strict";function n(e){this._canvas=e}var i=window._;n.$inject=["canvas"],t.exports=n,n.prototype.execute=function(e){var t=this.getParent(e),n=e.shape;return this.setPosition(n,e),this.addElement(n,t,e),n},n.prototype.revert=function(e){this._canvas.removeShape(e.shape)},n.prototype.getParent=function(e){var t=e.parent;if(!t)throw new Error("parent required");return t},n.prototype.getPosition=function(e){if(!e.position)throw new Error("no position given");return e.position},n.prototype.addElement=function(e,t){this._canvas.addShape(e,t)},n.prototype.setPosition=function(e,t){var n=this.getPosition(t);i.extend(e,{x:n.x-e.width/2,y:n.y-e.height/2})}},{}],102:[function(e,t){"use strict";function n(e,t){this._canvas=e,this._modeling=t}var i=e(148);n.$inject=["canvas","modeling"],t.exports=n,n.prototype.preExecute=function(e){var t=e.connection;t.label&&this._modeling.removeShape(t.label)},n.prototype.execute=function(e){var t=e.connection,n=t.parent;e.parent=n,e.parentIndex=i.indexOf(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t.label=null},n.prototype.revert=function(e){var t=e.connection,n=e.parent,r=e.parentIndex;t.source=e.source,t.target=e.target,i.add(n.children,t,r),this._canvas.addConnection(t,n)}},{}],103:[function(e,t){"use strict";function n(e,t){this._modeling=e,this._elementRegistry=t}var i=window._,r=e(109);n.$inject=["modeling","elementRegistry"],n.prototype=Object.create(r.prototype),t.exports=n,n.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,r=e.elements;i.forEach(r,function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))})}},{}],104:[function(e,t){"use strict";function n(e,t){this._canvas=e,this._modeling=t}var i=e(148);n.$inject=["canvas","modeling"],t.exports=n,n.prototype.preExecute=function(e){var t=e.shape,n=t.label,i=this._modeling;t.labelTarget&&(e.labelTarget=t.labelTarget,t.labelTarget=null),n&&this._modeling.removeShape(n),this._saveClear(t.incoming,function(e){i.removeConnection(e)}),this._saveClear(t.outgoing,function(e){i.removeConnection(e)}),this._saveClear(t.children,function(e){i.removeShape(e)})},n.prototype._saveClear=function(e,t){for(var n;n=e[0];)t(n)},n.prototype.execute=function(e){var t=e.shape,n=t.parent;e.parent=n,e.parentIndex=i.indexOf(n.children,t),t.label=null,this._canvas.removeShape(t)},n.prototype.revert=function(e){var t=e.shape,n=e.parent,r=e.parentIndex,o=e.labelTarget;i.add(n.children,t,r),o&&(o.label=t),this._canvas.addShape(t,n)}},{}],105:[function(e,t){"use strict";function n(e){this._layouter=e}var i=window._;n.$inject=["layouter"],t.exports=n,n.prototype.execute=function(e){var t=e.connection;return i.extend(e,{oldWaypoints:t.waypoints}),t.waypoints=this._layouter.getConnectionWaypoints(t),t},n.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t}},{}],106:[function(e,t){"use strict";function n(){}var i=window._,r=e(148);t.exports=n,n.prototype.execute=function(e){var t=e.connection,n=e.delta,o=this.getNewParent(t,e),a=t.parent;return e.oldParent=a,e.oldParentIndex=r.indexOf(a.children,t),i.forEach(t.waypoints,function(e){e.x+=n.x,e.y+=n.y,e.original&&(e.original.x+=n.x,e.original.y+=n.y)}),t.parent=o,t},n.prototype.revert=function(e){var t=e.connection,n=e.oldParent,o=e.oldParentIndex,a=e.delta;return r.add(n.children,t,o),t.parent=n,i.forEach(t.waypoints,function(e){e.x-=a.x,e.y-=a.y,e.original&&(e.original.x-=a.x,e.original.y-=a.y)}),t},n.prototype.getNewParent=function(e,t){return t.newParent||e.parent}},{}],107:[function(e,t){"use strict";function n(e){this._modeling=e,this._helper=new r(e)}var i=window._,r=e(113),o=e(148);n.$inject=["modeling"],t.exports=n,n.prototype.execute=function(e){var t=e.shape,n=e.delta,r=this.getNewParent(e),a=t.parent;return e.oldParent=a,e.oldParentIndex=o.indexOf(a.children,t),i.extend(t,{parent:r,x:t.x+n.x,y:t.y+n.y}),t},n.prototype.postExecute=function(e){var t=e.shape,n=this._modeling;e.hints.layout!==!1&&(i.forEach(t.incoming,function(e){n.layoutConnection(e)}),i.forEach(t.outgoing,function(e){n.layoutConnection(e)})),e.hints.recurse!==!1&&this.moveChildren(e)},n.prototype.revert=function(e){var t=e.shape,n=e.oldParent,r=e.oldParentIndex,a=e.delta;return o.add(n.children,t,r),i.extend(t,{parent:n,x:t.x-a.x,y:t.y-a.y}),t},n.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},n.prototype.getNewParent=function(e){return e.newParent||e.shape.parent}},{}],108:[function(e,t){"use strict";function n(e){this._helper=new i(e)}var i=e(113);n.$inject=["modeling"],t.exports=n,n.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},n.prototype.postExecute=function(e){this._helper.moveClosure(e.closure,e.delta,e.newParent)},n.prototype.execute=function(){},n.prototype.revert=function(){}},{}],109:[function(e,t){"use strict";function n(){}t.exports=n,n.prototype.execute=function(){},n.prototype.revert=function(){}},{}],110:[function(e,t){function n(){}n.$inject=["layouter"],t.exports=n,n.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,i=e.connection;if(!t&&!n)throw new Error("newSource or newTarget are required");if(t&&n)throw new Error("must specify either newSource or newTarget");return t&&(e.oldSource=i.source,i.source=t,e.oldDockingPoint=i.waypoints[0],i.waypoints[0]=e.dockingPoint),n&&(e.oldTarget=i.target,i.target=n,e.oldDockingPoint=i.waypoints[i.waypoints.length-1],i.waypoints[i.waypoints.length-1]=e.dockingPoint),i},n.prototype.revert=function(e){var t=e.newSource,n=e.newTarget,i=e.connection;return t&&(i.source=e.oldSource,i.waypoints[0]=e.oldDockingPoint),n&&(i.target=e.oldTarget,i.waypoints[i.waypoints.length-1]=e.oldDockingPoint),i}},{}],111:[function(e,t){"use strict";function n(e){this._modeling=e}var i=window._;n.$inject=["modeling"],t.exports=n,n.prototype.execute=function(e){var t=e.shape,n=e.newBounds;return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},i.extend(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},n.prototype.postExecute=function(e){var t=e.shape,n=this._modeling;i.forEach(t.incoming,function(e){n.layoutConnection(e)}),i.forEach(t.outgoing,function(e){n.layoutConnection(e)})},n.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return i.extend(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t}},{}],112:[function(e,t){function n(){}t.exports=n,n.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},n.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t}},{}],113:[function(e,t){function n(e){this._modeling=e}var i=window._,r=e(151);t.exports=n,n.prototype.moveRecursive=function(e,t,n){return this.moveClosure(this.getClosure(e),t,n)},n.prototype.moveClosure=function(e,t,n){var r=this._modeling,o=e.allShapes,a=e.allConnections,s=e.enclosedConnections,c=e.topLevel;i.forEach(o,function(e){r.moveShape(e,t,c[e.id]&&n,{recurse:!1,layout:!1})}),i.forEach(a,function(e){s[e.id]?r.moveConnection(e,t,c[e.id]&&n):r.layoutConnection(e)})},n.prototype.getClosure=function(e){return r.getClosure(e)}},{}],114:[function(e,t){t.exports={__depends__:[e(63),e(81),e(129)],__init__:["modeling"],modeling:["type",e(97)],layouter:["type",e(96)]}},{}],115:[function(e,t){function n(e){var t=r.groupBy(e,"id");return r.filter(e,function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0})}function i(e,t,i,s,c){function p(e,t,n){return c.allowed("shapes.move",{shapes:e,delta:t,newParent:n})}function u(e,n,i){!n.waypoints&&n.parent&&t.activate(e,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:{}}})}e.on("shape.move.start",a,function(e){var t=e.context,i=e.shape,o=s.get().slice();return-1===o.indexOf(i)&&(o=[i]),o=n(o),r.extend(t,{shapes:o,shape:i}),p(o)?void 0:(e.stopPropagation(),!1)}),e.on("shape.move.move",o,function(e){var t,n=e.context,i=n.shapes,r=e.hover,o={x:e.dx,y:e.dy};return t=p(i,o,r),n.delta=o,n.canExecute=t,null===t?void(n.target=null):void(n.target=r)}),e.on("shape.move.end",function(e){var t=e.context;t.canExecute&&i.moveShapes(t.shapes,t.delta,t.target)}),e.on("element.mousedown",function(e){u(e.originalEvent,e.element)}),this.start=u}var r=window._,o=500,a=1500;i.$inject=["eventBus","dragging","modeling","selection","rules"],t.exports=i},{}],116:[function(e,t){function n(e,t,n,p){function u(e){return t.getGraphics(e)}function l(e){return r.selfAndDirectChildren(e,!0)}function d(e){var t=r.selfAndAllChildren(e,!0),n=i.collect(t,function(e){return(e.incoming||[]).concat(e.outgoing||[])});return i.flatten(t.concat(n),!0)}function h(e,t){var n=u(e),i=n.clone(),r=n.getBBox();i.attr(p.cls("djs-dragger",[],{x:r.x,y:r.y})),t.add(i)}e.on("shape.move.start",o,function(e){var t=e.context,r=t.shapes,o=n.getDefaultLayer().group().attr(p.cls("djs-drag-group",["no-events"])),s=l(r);s.forEach(function(e){h(e,o)});var c=t.allDraggedElements=d(r);i.forEach(c,function(e){n.addMarker(e,a)}),t.dragGroup=o}),e.on("shape.move.move",o,function(e){var t=e.context,i=t.dragGroup,r=t.target;r&&n.addMarker(r,t.canExecute?s:c),i.translate(e.dx,e.dy)}),e.on(["shape.move.out","shape.move.cleanup"],function(e){var t=e.context;t.target&&n.removeMarker(t.target,t.canExecute?s:c)}),e.on("shape.move.cleanup",function(e){var t=e.context,r=t.allDraggedElements,o=t.dragGroup;i.forEach(r,function(e){n.removeMarker(e,a)}),o&&o.remove()})}var i=window._,r=e(151),o=500,a="djs-dragging",s="drop-ok",c="drop-not-ok";n.$inject=["eventBus","elementRegistry","canvas","styles"],t.exports=n},{}],117:[function(e,t){t.exports={__depends__:[e(91),e(133),e(119),e(129),e(89)],__init__:["move","moveVisuals"],move:["type",e(115)],moveVisuals:["type",e(116)]}},{}],118:[function(e,t){"use strict";function n(e,t){function n(e){return i.create("rect",c).prependTo(e)}function o(e,t){e.attr({x:-s,y:-s,width:t.width+2*s,height:t.height+2*s})}function a(e,t){var n=r(t);e.attr({x:n.x-s,y:n.y-s,width:n.width+2*s,height:n.height+2*s})}var s=6,c=t.cls("djs-outline",["no-fill"]);e.on(["shape.added","shape.changed"],function(e){var t=e.element,i=e.gfx,r=i.select(".djs-outline");r||(r=n(i,t)),o(r,t)}),e.on(["connection.added","connection.changed"],function(e){var t=e.element,i=e.gfx,r=i.select(".djs-outline");r||(r=n(i,t)),a(r,t)})}var i=window.Snap,r=e(151).getBBox;n.$inject=["eventBus","styles","elementRegistry"],t.exports=n},{}],119:[function(e,t){"use strict";t.exports={__init__:["outline"],outline:["type",e(118)]}},{}],120:[function(e,t){"use strict";function n(e,t,n,i){this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=a,this._overlayDefaults={show:{trigger:"automatic",minZoom:.7,maxZoom:5}},this._overlays={},this._overlayContainers={},this._overlayRoot=r('<div class="djs-overlay-container" />').css({position:"absolute",width:0,height:0}).prependTo(n.getContainer()),this._init(e)}var i=window._,r=window.$,o=e(151).getBBox,a=new(e(155))("ov");n.$inject=["config.overlays","eventBus","canvas","elementRegistry"],t.exports=n,n.prototype.get=function(e){if(i.isString(e)&&(e={id:e}),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?i.filter(t.overlays,{type:e.type}):i.clone(t.overlays):[]}return e.type?i.filter(this._overlays,{type:e.type}):e.id?this._overlays[e.id]:null},n.prototype.add=function(e,t,n){if(i.isObject(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var o=this._ids.next();return n=i.extend({},this._overlayDefaults,n,{id:o,type:t,element:e,html:r(n.html)}),this._addOverlay(n),o},n.prototype.remove=function(e){var t=this.get(e)||[];i.isArray(t)||(t=[t]);var n=this;i.forEach(t,function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(e.html.remove(),e.htmlContainer.remove(),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}})},n.prototype.show=function(){this._overlayRoot.show()},n.prototype.hide=function(){this._overlayRoot.hide()},n.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var a=o(t);i=a.x,r=a.y}n.css({left:i,top:r})},n.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,i=e.element,r=t.left,a=t.top;if(void 0!==t.right){var s;s=i.waypoints?o(i).width:i.width,r=-1*t.right+s}if(void 0!==t.bottom){var c;c=i.waypoints?o(i).height:i.height,a=-1*t.bottom+c}n.css({left:r||0,top:a||0})},n.prototype._createOverlayContainer=function(e){var t=r("<div />").addClass("djs-overlays").addClass("djs-overlays-"+e.id).css({position:"absolute"});t.appendTo(this._overlayRoot);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),n},n.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._overlayRoot.css("transform",i)},n.prototype._getOverlayContainer=function(e,t){var n=e&&e.id||e,i=this._overlayContainers[n];return i||t||(i=this._overlayContainers[n]=this._createOverlayContainer(e)),i},n.prototype._addOverlay=function(e){var t=e.id,n=e.element,i=this._getOverlayContainer(n),o=r("<div>",{id:t,"class":"djs-overlay"}).css({position:"absolute"}).append(e.html);e.type&&o.addClass("djs-overlay-"+e.type),e.htmlContainer=o,i.overlays.push(e),i.html.append(o),this._overlays[t]=e,this._updateOverlay(e)},n.prototype._updateOverlayVisibilty=function(e){i.forEach(this._overlays,function(t){t.show&&(t.show.minZoom>e.scale||t.show.maxZoom<e.scale?t.htmlContainer.hide():t.htmlContainer.show())})},n.prototype._init=function(e){var t=this._eventBus,n=this,r=function(e){n._updateRoot(e),n._updateOverlayVisibilty(e),n.show()};e&&e.deferUpdate===!1||(r=i.debounce(r,300)),t.on("canvas.viewbox.changed",function(e){n.hide(),r(e.viewbox)}),t.on(["shape.remove","connection.remove"],function(e){var t=n.get({element:e.element});i.forEach(t,function(e){n.remove(e.id)})}),t.on(["element.changed"],function(e){var t=e.element,r=n._getOverlayContainer(t,!0);r&&(i.forEach(r.overlays,function(e){n._updateOverlay(e)}),n._updateOverlayContainer(r))}),t.on("element.marker.update",function(e){var t=n._getOverlayContainer(e.element,!0);t&&t.html[e.add?"addClass":"removeClass"](e.marker)})}},{}],121:[function(e,t){"use strict";t.exports={__init__:["overlays"],overlays:["type",e(120)]}},{}],122:[function(e,t){"use strict";function n(e,t){this._eventBus=e,this._canvas=t,this._providers=[]}var i=window._,r=window.$;n.$inject=["eventBus","canvas"],t.exports=n,n.prototype.registerProvider=function(e){this._providers.push(e),this._container||this._init(),this._update()},n.prototype.getEntries=function(){var e={};return i.forEach(this._providers,function(t){var n=t.getPaletteEntries();i.forEach(n,function(t,n){e[n]=t})}),e},n.prototype._init=function(){var e=this._canvas.getContainer(),t=this._container=r(n.HTML_MARKUP).appendTo(e),i=this;t.find(".djs-palette-toggle").click(function(){i.toggle()}),t.on("click",function(e){i.trigger("click",e)}),t.on("mousedown",function(e){e.stopPropagation()}),t.on("dragstart",function(e){i.trigger("dragstart",e)
7
+ }),this._eventBus.fire("palette.create",{html:t})},n.prototype._update=function(){var e=this._container.find(".djs-palette-entries").empty(),t=this._entries=this.getEntries();i.forEach(t,function(t,n){var i=t.group||"default",o=e.find("[data-group="+i+"]");o.length||(o=r('<div class="group"></div>').attr("data-group",i).appendTo(e));var a=t.html||'<div class="entry" draggable="true"></div>',s=r(a).attr("data-action",n).appendTo(o);t.className&&s.addClass(t.className),t.imageUrl&&s.append('<img src="'+t.imageUrl+'">')}),this.open(!0)},n.prototype.trigger=function(e,t,n){var o,a,s,c=this._entries,p=r(t.target);if(p=p.is(".entry")?p:p.parents(".djs-palette .entry"),!p.length)return t.preventDefault();if(o=c[p.attr("data-action")],a=o.action,s=t.originalEvent||t,i.isFunction(a)){if("click"===e)return a(s,n)}else if(a[e])return a[e](s,n);t.preventDefault()},n.prototype.close=function(){this._container.removeClass("open")},n.prototype.open=function(){this._container.addClass("open")},n.prototype.toggle=function(){this.isOpen()?this.close():this.open()},n.prototype.isOpen=function(){return this._container&&this._container.hasClass("open")},n.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>'},{}],123:[function(e,t){t.exports={__init__:["palette"],palette:["type",e(122)]}},{}],124:[function(e,t){"use strict";function n(e,t,n,h,f,m,y){function v(e){var t=r.pick(e,["newBounds","shape","delta","direction"]);return n.allowed("shape.resize",t)}function g(e,t,n){y.activate(e,"resize",{autoActivate:!0,data:{shape:t,context:{direction:n,shape:t}}})}function x(e,t,n){function i(t){t.button||g(t,e,n)}a.on(t.node,"mousedown",i),a.on(t.node,"touchstart",i)}function w(e,t,n,r,o){var a=e.group().addClass(d).addClass(d+"-"+o),u=-c+s;a.rect(u,u,c,c).addClass(d+"-visual"),a.rect(u,u,p,p).addClass(d+"-hit");var l=(new i.Matrix).translate(t,n).rotate(r,0,0);return a.transform(l),a}function E(e,t,n){var i;i="nw"===n?w(t,0,0,0,n):"ne"===n?w(t,e.width,0,90,n):"se"===n?w(t,e.width,e.height,180,n):w(t,0,e.height,270,n),x(e,i,n)}function _(e){if(v({shape:e})){var n=t.getGraphics(e);E(e,n,"nw"),E(e,n,"ne"),E(e,n,"se"),E(e,n,"sw")}}function b(e){var n=t.getGraphics(e),i=n.selectAll("."+d);r.forEach(i,function(e){e.remove()})}var S={create:function(e){var t,n=f.getDefaultLayer(),r=e.shape;t=e.frame=i.create("rect",{"class":"djs-resize-overlay",width:r.width+10,height:r.height+10,x:r.x-5,y:r.y-5}),t.appendTo(n)},update:function(e){var t=e.frame,n=e.newBounds;n.width>5&&t.attr({x:n.x,width:n.width}),n.height>5&&t.attr({y:n.y,height:n.height}),t[e.canExecute?"removeClass":"addClass"](l)},remove:function(e){e.frame&&e.frame.remove()}};e.on("resize.start",function(e){var t=e.context,n=t.shape;f.addMarker(n,u),S.create(t)}),e.on("resize.move",function(e){var t,n=e.context,i=n.shape,r=n.direction;t={x:e.dx,y:e.dy},n.delta=t,n.newBounds=o.resizeBounds(i,r,t),n.canExecute=v(n),S.update(n)}),e.on("resize.end",function(e){var t=e.context,n=t.shape;t.canExecute&&h.resizeShape(n,t.newBounds)}),e.on("resize.cleanup",function(e){var t=e.context,n=t.shape;f.removeMarker(n,u),S.remove(t)}),e.on("selection.changed",function(e){var t=e.oldSelection,n=e.newSelection;r.forEach(t,b),1===n.length&&r.forEach(n,_)}),e.on("shape.changed",function(e){var t=e.element;b(t),m.isSelected(t)&&_(t)}),this.start=g}var i=window.Snap,r=window._,o=e(125),a=e(150),s=-2,c=5,p=20,u="djs-resizing",l="resize-not-ok",d="djs-resizer";n.$inject=["eventBus","elementRegistry","rules","modeling","canvas","selection","dragging"],t.exports=n},{}],125:[function(e,t){t.exports.resizeBounds=function(e,t,n){var i=n.x,r=n.y;switch(t){case"nw":return{x:e.x+i,y:e.y+r,width:e.width-i,height:e.height-r};case"sw":return{x:e.x+i,y:e.y,width:e.width-i,height:e.height+r};case"ne":return{x:e.x,y:e.y+r,width:e.width+i,height:e.height-r};case"se":return{x:e.x,y:e.y,width:e.width+i,height:e.height+r};default:throw new Error("unrecognized direction: "+t)}},t.exports.reattachPoint=function(e,t,n){var i=e.width/t.width,r=e.height/t.height;return{x:Math.round(t.x+t.width/2)-Math.floor((e.x+e.width/2-n.x)/i),y:Math.round(t.y+t.height/2)-Math.floor((e.y+e.height/2-n.y)/r)}}},{}],126:[function(e,t){t.exports={__depends__:[e(114),e(129),e(89)],__init__:["resize"],resize:["type",e(124)]}},{}],127:[function(e,t){function n(e){this._eventBus=e,this.init()}n.$inject=["eventBus"],t.exports=n,n.prototype.addRule=function(e,t){var n=this._eventBus;"string"==typeof e&&(e=[e]),e.forEach(function(e){n.on("commandStack."+e+".canExecute",function(e){var n=t(e.context);n===!1?(e.preventDefault(),e.stopPropagation()):null===n&&e.stopPropagation()})})}},{}],128:[function(e,t){"use strict";function n(e){this._commandStack=e}n.$inject=["commandStack"],t.exports=n,n.prototype.allowed=function(e,t){return this._commandStack.canExecute(e,t)}},{}],129:[function(e,t){t.exports={__depends__:[e(63)],__init__:["rules"],rules:["type",e(128)]}},{}],130:[function(e,t){"use strict";function n(e){this._eventBus=e,this._selectedElements=[];var t=this;e.on(["shape.remove","connection.remove"],function(e){var n=e.element;t.deselect(n)})}var i=window._;n.$inject=["eventBus"],t.exports=n,n.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},n.prototype.get=function(){return this._selectedElements},n.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},n.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();i.isArray(e)||(e=e?[e]:[]),t?i.forEach(e,function(e){-1===n.indexOf(e)&&n.push(e)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})}},{}],131:[function(e,t){"use strict";function n(e,t,n){e.on("create.end",500,function(e){e.context.canExecute&&t.select(e.shape)}),e.on("connect.end",500,function(e){e.context.canExecute&&e.context.target&&t.select(e.context.target)}),e.on("shape.move.end",500,function(e){t.select(e.context.shapes)}),e.on("element.click",function(e){var r=e.element;if(r===n.getRootElement()&&(r=null),t.isSelected(r))t.deselect(r);else{var o=i(e)||e,a=o.shiftKey;o.altKey||t.select(r,a)}})}var i=e(152).getOriginal;n.$inject=["eventBus","selection","canvas"],t.exports=n},{}],132:[function(e,t){"use strict";function n(e,t){function n(e,n){t.addMarker(e,n)}function a(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",function(e){n(e.element,r)}),e.on("element.out",function(e){a(e.element,r)}),e.on("selection.changed",function(e){function t(e){a(e,o)}function r(e){n(e,o)}var s=e.oldSelection,c=e.newSelection;i.forEach(s,function(e){-1===c.indexOf(e)&&t(e)}),i.forEach(c,function(e){-1===s.indexOf(e)&&r(e)})})}var i=window._,r="hover",o="selected";n.$inject=["eventBus","canvas","selection","graphicsFactory","styles"],t.exports=n},{}],133:[function(e,t){"use strict";t.exports={__init__:["selectionVisuals","selectionBehavior"],__depends__:[e(91),e(119)],selection:["type",e(130)],selectionVisuals:["type",e(132)],selectionBehavior:["type",e(131)]}},{}],134:[function(e,t){"use strict";function n(e){return a.pick(e,["x","y"])}function i(e){return void 0===e.x||void 0===e.y?null:{x:Math.round(e.x+e.width/2),y:Math.round(e.y+e.height/2)}}function r(e,t){return s.snapTo(e,t)}function o(e,t){this._canvas=t;var n=this;e.on(["shape.move.start","create.start"],function(e){n.initSnap(e)}),e.on(["shape.move.move","shape.move.end","create.move","create.end"],function(e){n.snap(e)}),e.on(["shape.move.cleanup","create.cleanup"],function(){n.hide()}),this._asyncHide=a.debounce(this.hide,1e3)}var a=window._,s=window.Snap;o.$inject=["eventBus","canvas"],t.exports=o,o.prototype.initSnap=function(e){var t=e.context;t.snapStart=i(t.shape)||n(e),t.snapPoints={}},o.prototype.snap=function(e){var t,n,i=e.context,o=i.snapStart,s=o.x+e.dx,c=o.y+e.dy,p=this.getSnapPoints(i);if(p){t=r(p.vertical,s),n=r(p.horizontal,c),this.showSnap("horizontal",p.horizontalMap[n],{x:s,y:n}),this.showSnap("vertical",p.verticalMap[t],{x:t,y:c});var u=s-t,l=c-n;a.extend(e,{dx:e.dx-u,dy:e.dy-l,x:e.x-u,y:e.y-l})}},o.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=t.path("M0,0 L0,0").addClass("djs-snap-line");return n.update=function(t){n.attr(t?{path:s.format(e,t),display:""}:{display:"none"})},n},o.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("M{start},{snap}L{end},{snap}"),vertical:this._createLine("M{snap},{start}L{snap},{end}")}},o.prototype.showSnap=function(e,t,n){var i,r,o;t&&(r="vertical"===e,o=a.map(t.concat([n]),r?"y":"x"),i={snap:n[r?"x":"y"],start:Math.min.apply(null,o)-5e3,end:Math.max.apply(null,o)+5e3});var s=this.getSnapLine(e);s&&s.update(i),this._asyncHide()},o.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},o.prototype.hide=function(){a.forEach(this._snapLines,function(e){e.update()})},o.prototype.getSnapPoints=function(e){var t=e.shape,n=e.target,r=e.snapPoints;if(n){var o=r[n.id];if(!o){var s=this.getSnapTargets(t,n),c=[],p=[],u={},l={};a.forEach(s,function(e){var t=i(e);c.push(t.y),p.push(t.x),(u[t.y]=u[t.y]||[]).push(e),(l[t.x]=l[t.x]||[]).push(e)}),o=r[n.id]={horizontal:c,vertical:p,horizontalMap:u,verticalMap:l}}return o}},o.prototype.getSnapTargets=function(e,t){return t&&a.filter(t.children,function(t){return!t.hidden&&!t.labelTarget&&!t.waypoints&&t!==e})}},{}],135:[function(e,t){t.exports={__init__:["snapping"],snapping:["type",e(134)]}},{}],136:[function(e,t){"use strict";function n(e,t){var n=this;t.on("canvas.init",function(e){n.addBBoxMarker(e.svg)})}n.$inject=["canvas","eventBus"],t.exports=n,n.prototype.addBBoxMarker=function(e){var t={fill:"none","class":"outer-bound-marker"};e.rect(-1e4,-1e4,10,10).attr(t),e.rect(1e4,1e4,10,10).attr(t)}},{}],137:[function(e,t){function n(){}function i(e,t){try{return t.get(e)}catch(n){return null}}function r(e){function t(e){p.stopEvent(e,!0)}function i(){c.on(e,"mousedown",t,!0),c.on(e,"mouseup",t,!0),c.on(e,"mouseover",t,!0),c.on(e,"mouseout",t,!0),c.on(e,"click",t,!0),c.on(e,"dblclick",t,!0)}function r(){setTimeout(function(){c.off(e,"mousedown",t,!0),c.off(e,"mouseup",t,!0),c.off(e,"mouseover",t,!0),c.off(e,"mouseout",t,!0),c.off(e,"click",t,!0),c.off(e,"dblclick",t,!0)},500)}e.addEventListener("touchstart",i,!0),e.addEventListener("touchend",r,!0),e.addEventListener("touchcancel",r,!0);var o=new a.Manager(e,{inputClass:a.TouchInput,recognizers:[]}),s=new a.Tap,u=new a.Pan({threshold:10}),l=new a.Press,d=new a.Pinch,h=new a.Tap({event:"doubletap",taps:2});return d.requireFailure(u),d.requireFailure(l),o.add([u,l,d,h,s]),o.reset=function(e){var t=this.recognizers,i=this.session;i.stopped||(n("recognizer","stop"),o.stop(e),setTimeout(function(){var e,r;for(n("recognizer","reset"),e=0;r=t[e];e++)r.reset(),r.state=8;i.curRecognizer=null},0))},o.on("hammer.input",function(e){e.srcEvent.defaultPrevented&&o.reset(!0)}),o}function o(e,t,o,a,d){function h(e){return function(t){n("element",e,t),d.fire(e,t)}}function f(e){var t=c.closest(e,"svg, .djs-element");return t&&new s(t)}function m(e){function i(){function e(e){var n=e.deltaX-r,i=e.deltaY-o;t.scroll({dx:n,dy:i}),r=e.deltaX,o=e.deltaY}function i(){y.off("panmove",e),y.off("panend",i),y.off("pancancel",i),n("canvas","grab end")}n("canvas","grab start");var r=0,o=0;y.on("panmove",e),y.on("panend",i),y.on("pancancel",i)}function o(e){var r=f(e.target),o=r&&a.get(r);return g&&t.getRootElement()!==o?(n("element","move start",o,e,!0),g.start(e,o,!0)):void i(e)}function s(e){function i(e){var n=1-(1-e.scale)/1.5,i=Math.max(u,Math.min(l,n*o));t.zoom(i,a),p.stopEvent(e,!0)}function r(){y.off("pinchmove",i),y.off("pinchend",r),y.off("pinchcancel",r),y.reset(!0),n("canvas","zoom end")}n("canvas","zoom start");var o=t.zoom(),a=e.center;y.on("pinchmove",i),y.on("pinchend",r),y.on("pinchcancel",r)}y=r(e),y.on("doubletap",h("element.dblclick")),y.on("tap",h("element.click")),y.on("panstart",o),y.on("press",o),y.on("pinchstart",s)}var y,v=i("dragging",e),g=i("move",e),x=i("contextPad",e),w=i("palette",e);v&&o.on("drag.move",function(e){var t=p.toPoint(e.originalEvent),n=document.elementFromPoint(t.x,t.y),i=f(n),r=i&&a.get(i);r!==e.hover&&(e.hover&&v.out(e),r&&(v.hover({element:r,gfx:i}),e.hover=r,e.hoverGfx=i))}),x&&o.on("contextPad.create",function(e){var t=e.pad.html.get(0),i=r(t);i.on("panstart",function(e){n("context-pad","panstart",e),x.trigger("dragstart",e,!0)}),i.on("press",function(e){n("context-pad","press",e),x.trigger("dragstart",e,!0)}),i.on("tap",function(e){n("context-pad","tap",e),x.trigger("click",e)})}),w&&o.on("palette.create",function(e){var t=e.html.get(0),i=r(t);i.on("panstart",function(e){n("palette","panstart",e),w.trigger("dragstart",e,!0)}),i.on("press",function(e){n("palette","press",e),w.trigger("dragstart",e,!0)}),i.on("tap",function(e){n("palette","tap",e),w.trigger("click",e)})}),o.on("canvas.init",function(e){m(e.svg.node)})}var a=window.Hammer,s=window.Snap,c=e(150),p=e(152),u=.2,l=4;o.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],t.exports=o},{}],138:[function(e,t){t.exports={__depends__:[e(91)],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",e(137)],touchFix:["type",e(136)]}},{}],139:[function(e,t){"use strict";function n(e){return r.extend({original:e.point.original||e.point},e.actual)}function i(e){this._elementRegistry=e}var r=window._,o=e(141);i.$inject=["elementRegistry"],t.exports=i,i.prototype.getCroppedWaypoints=function(e){var t=this.getDockingPoint(e,e.source),i=this.getDockingPoint(e,e.target),r=e.waypoints.slice(t.idx+1,i.idx);return r.unshift(n(t)),r.push(n(i)),r},i.prototype.getDockingPoint=function(e,t){var n,i=-1,r=this._getIntersection(t,e);if(t===e.target)i=e.waypoints.length-1;else{if(t!==e.source)throw new Error("connection not properly connected");i=0}return-1!==i?(n=e.waypoints[i],{point:n,actual:r||n,idx:i}):null},i.prototype._getIntersection=function(e,t){var n=this._getShapePath(e),i=this._getConnectionPath(t);return o.getElementLineIntersection(n,i,t.source===e)},i.prototype._getConnectionPath=function(e){return o.getConnectionPath(e.waypoints)},i.prototype._getShapePath=function(e){return o.getShapePath(this._getGfx(e),e)},i.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)}},{}],140:[function(e,t){"use strict";var n=window._,i=e(141),r=e(153),o=20;t.exports.getMidPoints=function(e,t,n){n=n||"h:h";var i,r;if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return i=Math.round((t.x-e.x)/2+e.x),[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return r=Math.round((t.y-e.y)/2+e.y),[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("unknown directions: <"+n+">: directions must be specified as {a direction}:{b direction} (direction in h|v)")},t.exports.connectPoints=function(e,t,n){var r=[];return i.pointsAligned(e,t)||(r=this.getMidPoints(e,t,n)),r.unshift(e),r.push(t),r},t.exports.connectRectangles=function(e,t,n,r){var a=i.getOrientation(e,t,o),s=this.getDirections(e,t);if(n=n||i.getMidPoint(e),r=r||i.getMidPoint(t),s){if("h:h"===s)switch(a){case"top-right":case"right":case"bottom-right":n={original:n,x:e.x,y:n.y},r={original:r,x:t.x+t.width,y:r.y};break;case"top-left":case"left":case"bottom-left":n={original:n,x:e.x+e.width,y:n.y},r={original:r,x:t.x,y:r.y}}if("v:v"===s)switch(a){case"top-left":case"top":case"top-right":n={original:n,x:n.x,y:e.y+e.height},r={original:r,x:r.x,y:t.y};break;case"bottom-left":case"bottom":case"bottom-right":n={original:n,x:n.x,y:e.y},r={original:r,x:r.x,y:t.y+t.height}}return this.connectPoints(n,r,s)}},t.exports.repairConnection=function(e,t,r,o,a){if(n.isArray(r)&&(a=r,r=i.getMidPoint(e),o=i.getMidPoint(t)),!a||a.length<3)return this.connectRectangles(e,t,r,o);var s,c=i.pointsEqual(a[0].original||a[0],r);return c?(s=this._repairConnectionSide(t,e,o,a.slice().reverse()),s=s&&s.reverse()):s=this._repairConnectionSide(e,t,r,a),s?s:this.connectRectangles(e,t,r,o)},t.exports._repairConnectionSide=function(e,t,a,s){function c(e,t,i){return i.length<3?!0:i.length>4?!1:!!n.find(i,function(e,t){var n=i[t-1];return n&&r.distance(e,n)<3})}function p(e,t,n){var r=i.pointsAligned(t,e);switch(r){case"v":return{x:e.x,y:n.y};case"h":return{x:n.x,y:e.y}}return{x:e.x,y:e.y}}function u(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(r.pointInRect(e[i],t,o)||r.pointInRect(e[i],n,o))return e.slice(i);return e}if(c(e,t,s))return null;var l,d=s[0],h=s.slice();return h[0]=a,h[1]=p(h[1],d,a),l=u(h,e,t),l!==h?this._repairConnectionSide(e,t,a,l):h},t.exports.getDirections=function(e,t,n){var r=i.getOrientation(e,t,o);switch(r){case"intersect":return null;case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return n?"v:v":"h:h"}}},{}],141:[function(e,t){"use strict";function n(e,t){switch(!0){case e.x===t.x:return"h";case e.y===t.y:return"v"}return!1}function i(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function r(e,t){return e.x===t.x&&e.y===t.y}function o(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function a(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function s(e){return i({x:e.x+e.width/2,y:e.y+e.height/2})}function c(e,t,n){n=n||0;var i=a(e),r=a(t),o=i.bottom+n<=r.top,s=i.left-n>=r.right,c=i.top-n>=r.bottom,p=i.right+n<=r.left,u=o?"top":c?"bottom":null,l=p?"left":s?"right":null;return l&&u?u+"-"+l:l||u?l||u:"intersect"}function p(e,t,n,i){m.isArray(n)&&(i=n,n=0);var r=c(e,t,n);return-1!==i.indexOf(r)}function u(e,t){var n=d(e),i=t?new y.Matrix(1,0,0,1,t.x,t.y):e.attr("transform").localMatrix;return y.path.map(n,i)}function l(e){return m.collect(e,function(e,t){return e=e.original||e,(t?"L":"M")+e.x+" "+e.y}).join("")}function d(e){var t=e.select(".djs-visual *");return y.path.get[t.type](t)}function h(e,t,n){var r=f(e,t);return 1===r.length?i(r[0]):2===r.length&&o(r[0],r[1])<1?i(r[0]):r.length>1?(r=m.sortBy(r,function(e){return e.segment2}),i(r[n?0:r.length-1])):null}function f(e,t){return y.path.intersection(e,t)}var m=window._,y=window.Snap;t.exports.pointsAligned=n,t.exports.roundPoint=i,t.exports.pointsEqual=r,t.exports.pointDistance=o,t.exports.asTRBL=a,t.exports.getMidPoint=s,t.exports.getOrientation=c,t.exports.hasAnyOrientation=p,t.exports.getShapePath=u,t.exports.getConnectionPath=l,t.exports.toPath=d,t.exports.getElementLineIntersection=h,t.exports.getIntersections=f},{}],142:[function(e,t){"use strict";function n(){Object.defineProperty(this,"businessObject",{writable:!0}),p.bind(this,"parent"),u.bind(this,"label"),l.bind(this,"outgoing"),d.bind(this,"incoming")}function i(){n.call(this),p.bind(this,"children")}function r(){i.call(this)}function o(){i.call(this),u.bind(this,"labelTarget")}function a(){n.call(this),l.bind(this,"source"),d.bind(this,"target")}var s=window._,c=e(163),p=new c({name:"children",enumerable:!0,collection:!0},{name:"parent"}),u=new c({name:"label",enumerable:!0},{name:"labelTarget"}),l=new c({name:"outgoing",collection:!0},{name:"source"}),d=new c({name:"incoming",collection:!0},{name:"target"});i.prototype=Object.create(n.prototype),r.prototype=Object.create(i.prototype),o.prototype=Object.create(i.prototype),a.prototype=Object.create(n.prototype);var h={connection:a,shape:i,label:o,root:r};t.exports.create=function(e,t){var n=h[e];if(!n)throw new Error("unknown type: <"+e+">");return s.extend(new n,t)},t.exports.Base=n,t.exports.Root=r,t.exports.Shape=i,t.exports.Connection=a,t.exports.Label=o},{}],143:[function(e,t){function n(e,t){return{x:e.x-t.x,y:e.y-t.y}}function i(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function r(e,t){function r(e){var r=l.start,a=s.toPoint(e),p=n(a,r);if(!l.dragging&&i(p)>c&&(l.dragging=!0,o.set("move")),l.dragging){var u=l.last||l.start;p=n(a,u),t.scroll({dx:p.x,dy:p.y}),l.last=a}e.preventDefault()}function p(e){a.off(document,"mousemove",r),a.off(document,"mouseup",p),l=null,o.unset(),s.stopEvent(e)}function u(e){e.button||e.altKey||(l={start:s.toPoint(e)},a.on(document,"mousemove",r),a.on(document,"mouseup",p),s.stopEvent(e))}var l,d=t._container;a.on(d,"mousedown",u)}var o=e(149),a=e(150),s=e(152),c=15;r.$inject=["eventBus","canvas"],t.exports=r},{}],144:[function(e,t){t.exports={__init__:["moveCanvas"],moveCanvas:["type",e(143)]}},{}],145:[function(e,t){t.exports={__depends__:[e(138)]}},{}],146:[function(e,t){"use strict";function n(e,t){function n(e){return Math.max(s.min,Math.min(s.max,e))}function r(){t.zoom("fit-viewport")}function o(e,i){var r=t.zoom(),o=1+e/c;t.zoom(n(r*o),i)}function a(e){i(e).on("mousewheel",function(e){var n=e.shiftKey,i=e.ctrlKey,r=e.deltaX,a=e.deltaY;if(n||i){var s={};i?s.dx=p*r:s.dy=p*r,t.scroll(s)}else{var c={};c=e.originalEvent.offsetX?{x:e.offsetX,y:e.offsetY}:{x:e.originalEvent.layerX,y:e.originalEvent.layerY},o(a,c)}e.preventDefault()})}var s={min:.2,max:4},c=5,p=50;e.on("canvas.init",function(e){a(e.svg.node)}),this.zoom=o,this.reset=r}var i=window.$,r=window.$;r===i||i.mousewheel||r(i),n.$inject=["eventBus","canvas"],t.exports=n},{}],147:[function(e,t){t.exports={__init__:["zoomScroll"],zoomScroll:["type",e(146)]}},{}],148:[function(e,t){"use strict";t.exports.remove=function(e,t){if(e&&t){var n=e.indexOf(t);if(-1!==n)return e.splice(n,1),t}},t.exports.add=function(e,t,n){if(e&&t){isNaN(n)&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}},t.exports.indexOf=function(e,t){return e&&t?e.indexOf(t):-1}},{}],149:[function(e,t){"use strict";var n=window._,i=/^djs-cursor-.*$/;t.exports.set=function(e){var t=document.body.classList;n.forEach(n.clone(t),function(e){i.test(e)&&t.remove(e)}),e&&t.add("djs-cursor-"+e)},t.exports.unset=function(){this.set(null)}},{}],150:[function(e,t){function n(e,t){return u.call(e,t)}function i(e,t){for(;e&&e instanceof Element;){if(n(e,t))return e;e=e.parentNode}return null}function r(e){for(;e.childNodes.length;)e.removeChild(e.childNodes[0])}function o(e,t,n,i){e.addEventListener(t,n,i||!1)}function a(e,t,n,i){e.removeEventListener(t,n,i||!1)}function s(e,t,n,i){var r=function(o){n(o),a(e,t,r,i)};o(e,t,r,i)}var c=Element.prototype,p=function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),i=0;n[i]&&n[i]!==t;)i++;return n[i]?!0:!1},u=c.matches||c.mozMatchesSelector||c.webkitMatchesSelecor||c.msMatchesSelector||p;t.exports.matches=n,t.exports.closest=i,t.exports.clear=r,t.exports.on=o,t.exports.off=a,t.exports.once=s},{}],151:[function(e,t){function n(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function i(e,t,n){n=n||0,u.forEach(e,function(e,r){var o=t(e,r,n);u.isArray(o)&&o.length&&i(o,t,n+1)})}function r(e,t,r){var o=[],a=[];return i(e,function(e,i,s){n(o,e,t);var c=e.children;return(-1===r||r>s)&&c&&n(a,c,t)?c:void 0}),o}function o(e,t){return r(e,!t,1)}function a(e,t){return r(e,!t,-1)}function s(e){function t(e){r[e.source.id]&&r[e.target.id]&&(r[e.id]=e),o[e.source.id]&&o[e.target.id]&&(c[e.id]=s[e.id]=e),a[e.id]=e}function n(e){return s[e.id]=e,e.waypoints?void(c[e.id]=a[e.id]=e):(o[e.id]=e,u.forEach(e.incoming,t),u.forEach(e.outgoing,t),e.children)}var r=u.groupBy(e,function(e){return e.id}),o={},a={},s={},c={};return i(e,n),{allShapes:o,allConnections:a,topLevel:r,enclosedConnections:c,enclosedElements:s}}function c(e,t){t=!!t,u.isArray(e)||(e=[e]);var n,i,r,o;return u.forEach(e,function(e){var a=e;e.waypoints&&!t&&(a=c(e.waypoints,!0));var s=a.x,p=a.y,u=a.height||0,l=a.width||0;(n>s||void 0===n)&&(n=s),(i>p||void 0===i)&&(i=p),(s+l>r||void 0===r)&&(r=s+l),(p+u>o||void 0===o)&&(o=p+u)}),{x:n,y:i,height:o-i,width:r-n}}function p(e,t){var n={};return u.forEach(e,function(e){var i=e;i.waypoints&&(i=c(i)),!u.isNumber(t.y)&&i.x>t.x&&(n[e.id]=e),!u.isNumber(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(u.isNumber(t.width)&&u.isNumber(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:u.isNumber(t.width)&&u.isNumber(t.height)||(n[e.id]=e))}),n}var u=window._;t.exports.eachElement=i,t.exports.selfAndDirectChildren=o,t.exports.selfAndAllChildren=a,t.exports.getBBox=c,t.exports.getEnclosedElements=p,t.exports.getClosure=s},{}],152:[function(e,t){function n(e){return e&&e.preventDefault()}function i(e,t){e&&(e.stopPropagation&&e.stopPropagation(),t&&e.stopImmediatePropagation&&e.stopImmediatePropagation())}function r(e){return e.originalEvent||e.srcEvent}function o(e,t){s(e,t),a(e)}function a(e){n(e),n(r(e))}function s(e,t){i(e,t),i(r(e),t)}function c(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}t.exports.getOriginal=r,t.exports.stopEvent=o,t.exports.preventDefault=a,t.exports.stopPropagation=s,t.exports.toPoint=c},{}],153:[function(e,t){var n=t.exports.distance=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};t.exports.pointsOnLine=function(e,t,i){if(!e||!t||!i)return!1;var r=(t.x-e.x)*(i.y-e.y)-(t.y-e.y)*(i.x-e.x),o=n(e,t);return Math.abs(r/o)<5},t.exports.pointInRect=function(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}},{}],154:[function(e,t){function n(e){return e.select(".djs-visual")}function i(e){return e.parent().children()[1]}function r(e){return n(e).select("*").getBBox()}t.exports.getVisual=n,t.exports.getChildren=i,t.exports.getBBox=r},{}],155:[function(e,t){"use strict";function n(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}t.exports=n,n.prototype.next=function(){return this._prefix+ ++this._counter}},{}],156:[function(e,t){"use strict";function n(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function i(e){return a.isObject(e)?a.extend({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function r(e){this._config=a.extend({},{size:c,padding:s,style:{},align:"center-top"},e||{})}var o=window.Snap,a=window._,s=0,c={width:150,height:50};r.prototype.createText=function(e,t,r){function s(e){function t(){if(s.length<a.length){var t=e[0]||"",n=a.slice(s.length);t=/-\s*$/.test(n)?n.replace(/-\s*$/,"")+t.replace(/^\s+/,""):n+" "+t,e[0]=t}return{width:o.width,height:o.height,text:s}}function n(e){return m.textContent=e,m.getBBox()}function i(e,t){var n,i=e.split(/(\s|-)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"===n&&r.pop();break}r.push(n),o+=n.length}return r.join("")}function r(e,t,n){var r=e.length*(n/t),o=i(e,r);return o||(o=e.slice(0,Math.floor(r-1))),o}for(var o,a=e.shift(),s=a;;){if(o=n(s),o.width<f)return t();s=r(s,o.width,f)}}var c=a.merge({},this._config.size,r.box||{}),p=a.merge({},this._config.style,r.style||{}),u=n(r.align||this._config.align),l=i(void 0!==r.padding?r.padding:this._config.padding),d=t.split(/\r?\n/g),h=[],f=c.width-l.left-l.right,m=e.text(0,0,"").attr(p).node;for(m.ownerSVGElement.appendChild(m);d.length;)h.push(s(d));var y,v,g=a.reduce(h,function(e,t){return e+t.height},0);switch(u.vertical){case"middle":y=(c.height-g)/2-h[0].height/4;break;default:y=l.top}var x=e.text().attr(p);return a.forEach(h,function(e){switch(y+=e.height,u.horizontal){case"left":v=l.left;break;case"right":v=f-l.right-e.width;break;default:v=(f-e.width)/2+l.left}var t=o.create("tspan",{x:v,y:y}).node;t.textContent=e.text,x.append(t)}),m.parentNode.removeChild(m),x},t.exports=r},{}],157:[function(e,t,n){var i=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=function(){var e=Array.prototype.slice.call(arguments);1===e.length&&i(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t},o=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,a=/\/\*([^\*]*)\*\//m,s=function(e){if("function"!=typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(o);return t[1]&&t[1].split(",").map(function(e){return t=e.match(a),t?t[1].trim():e.trim()})||[]};n.annotate=r,n.parse=s,n.isArray=i},{}],158:[function(e,t){t.exports={annotate:e(157).annotate,Module:e(160),Injector:e(159)}},{}],159:[function(e,t){var n=e(160),i=e(157).parse,r=e(157).annotate,o=e(157).isArray,a=function(e,t){t=t||{get:function(e){throw s.push(e),l('No provider for "'+e+'"!')}};var s=[],c=this._providers=Object.create(t._providers||null),p=this._instances=Object.create(null),u=p.injector=this,l=function(e){var t=s.join(" -> ");return s.length=0,new Error(t?e+" (Resolving: "+t+")":e)},d=function(e){if(!c[e]&&-1!==e.indexOf(".")){for(var n=e.split("."),i=d(n.shift());n.length;)i=i[n.shift()];return i}if(Object.hasOwnProperty.call(p,e))return p[e];if(Object.hasOwnProperty.call(c,e)){if(-1!==s.indexOf(e))throw s.push(e),l("Cannot resolve circular dependency!");return s.push(e),p[e]=c[e][0](c[e][1]),s.pop(),p[e]}return t.get(e)},h=function(e){var t=Object.create(e.prototype),n=f(e,t);return"object"==typeof n?n:t},f=function(e,t){if("function"!=typeof e){if(!o(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=r(e.slice())}var n=e.$inject&&e.$inject||i(e),a=n.map(function(e){return d(e)});return e.apply(t,a)},m=function(e){return r(function(t){return e.get(t)})},y=function(e,t){if(t&&t.length){var n,i,r,o,s=Object.create(null),p=Object.create(null),l=[],d=[],h=[];for(var f in c)n=c[f],-1!==t.indexOf(f)&&("private"===n[2]?(i=l.indexOf(n[3]),-1===i?(r=n[3].createChild([],t),o=m(r),l.push(n[3]),d.push(r),h.push(o),s[f]=[o,f,"private",r]):s[f]=[h[i],f,"private",d[i]]):s[f]=[n[2],n[1]],p[f]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach(function(e){-1!==n[1].$scope.indexOf(e)&&(s[f]=[n[2],n[1]],p[e]=!0)});t.forEach(function(e){if(!p[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')}),e.unshift(s)}return new a(e,u)},v={factory:f,type:h,value:function(e){return e}};e.forEach(function(e){function t(e,t){return"value"!==e&&o(t)&&(t=r(t.slice())),t}if(e instanceof n)e.forEach(function(e){var n=e[0],i=e[1],r=e[2];c[n]=[v[i],t(i,r),i]});else if("object"==typeof e)if(e.__exports__){var i=Object.keys(e).reduce(function(t,n){return"__"!==n.substring(0,2)&&(t[n]=e[n]),t},Object.create(null)),s=new a((e.__modules__||[]).concat([i]),u),p=r(function(e){return s.get(e)});e.__exports__.forEach(function(e){c[e]=[p,e,"private",s]})}else Object.keys(e).forEach(function(n){if("private"===e[n][2])return void(c[n]=e[n]);var i=e[n][0],r=e[n][1];c[n]=[v[i],t(i,r),i]})}),this.get=d,this.invoke=f,this.instantiate=h,this.createChild=y};t.exports=a},{}],160:[function(e,t){var n=function(){var e=[];this.factory=function(t,n){return e.push([t,"factory",n]),this},this.value=function(t,n){return e.push([t,"value",n]),this},this.type=function(t,n){return e.push([t,"type",n]),this},this.forEach=function(t){e.forEach(t)}};t.exports=n},{}],161:[function(e,t){"use strict";function n(e){e=e||[128,36,1],this._seed=e.length?i.rack(e[0],e[1],e[2]):e}var i=e(162);t.exports=n,n.prototype.next=function(e){return this._seed(e||!0)},n.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},n.prototype.claim=function(e,t){this._seed.set(e,t||!0)},n.prototype.assigned=function(e){return this._seed.get(e)||!1}},{}],162:[function(e,t){var n=t.exports=function(e,t){if(t||(t=16),void 0===e&&(e=128),0>=e)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(t),r=2;1/0===i;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(t)*r;for(var o=i-Math.floor(i),a="",r=0;r<Math.floor(i);r++){var s=Math.floor(Math.random()*t).toString(t);a=s+a}if(o){var c=Math.pow(t,o),s=Math.floor(Math.random()*c).toString(t);a=s+a}var p=parseInt(a,t);return 1/0!==p&&p>=Math.pow(2,e)?n(e,t):a};n.rack=function(e,t,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=n(e,t)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=t||16,r}},{}],163:[function(e,t){t.exports=e(165),t.exports.Collection=e(164)
8
+ },{}],164:[function(e,t){"use strict";function n(e,t,n,i){var r=n.inverse;return e.remove=function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e},e.contains=function(e){return-1!==this.indexOf(e)},e.add=function(e){this.contains(e)||(this.push(e),t.set(e,r,i))},e}t.exports.extend=n},{}],165:[function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function i(e,t,n){Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:a.extend(n[t.name]||[],e,t,n)})}function r(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}function o(e,t){return this instanceof o?(e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,void(this.props[t.name]=t)):new o(e,t)}var a=e(164);o.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?i(this,t,e):r(this,t,e)},o.prototype.ensureBound=function(e,t){n(e,t)||this.bind(e,t)},o.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?e[t.name].remove(n):e[t.name]=void 0)},o.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?e[t.name].add(n):e[t.name]=n)},t.exports=o},{}]},{},[1])(1)});