Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
bower_components.bpmn-js.dist.bpmn-modeler.min.js Maven / Gradle / Ivy
Go to download
Helper library to visualize and assert which parts of a BPMN process have been covered by a unit test.
/*! bpmn-js - bpmn-modeler v0.14.1 | (c) 2014, 2015 camunda Services GmbH | bpmn.io/license */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.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 ';r(i,a),t.exports=i,i.prototype.createDiagram=function(e){return this.importXML(s,e)},i.prototype._createModdle=function(e){var t=a.prototype._createModdle.call(this,e);return t.ids=new o([32,36,1]),t},i.prototype._collectIds=function(e,t){var n,i=e.$model,r=i.ids;r.clear();for(n in t.elementsById)r.claim(n,t.elementsById[n])},i.prototype._interactionModules=[e(16),e(8),e(216),e(212),e(213)],i.prototype._modelingModules=[e(166),e(118),e(182),e(196),e(141),e(133),e(12),e(62),e(43),e(10),e(49),e(54)],i.prototype._modules=[].concat(i.prototype._modules,i.prototype._interactionModules,i.prototype._modelingModules)},{10:10,118:118,12:12,133:133,141:141,16:16,166:166,182:182,196:196,2:2,212:212,213:213,216:216,241:241,243:243,43:43,49:49,54:54,62:62,8:8}],2:[function(e,t,n){"use strict";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){return e+(u(e)?"px":"")}function o(e){e=s({},g,e),this.moddle=this._createModdle(e),this.container=this._createContainer(e),a(this.container),this._init(this.container,this.moddle,e)}function a(e){var t=x.BPMNIO_LOGO,n=' ',i=l(n);e.appendChild(i),b.bind(i,"click",function(e){x.open(),e.preventDefault()})}var s=e(377),c=e(381),p=e(374),u=e(371),l=e(394),h=e(397),d=e(398),f=e(96),m=e(72),v=e(243),y=e(65),g={width:"100%",height:"100%",position:"relative",container:"body"};v(o,f),t.exports=o,o.prototype.importXML=function(e,t){t=t||function(){};var n=this;e=this._emit("import.parse.start",{xml:e})||e,this.moddle.fromXML(e,"bpmn:Definitions",function(e,r,o){if(r=n._emit("import.parse.complete",{error:e,definitions:r,context:o})||r,e)return e=i(e),n._emit("import.done",{error:e}),t(e);var a=o.warnings;n.importDefinitions(r,function(e,i){var r=[].concat(a,i||[]);n._emit("import.done",{error:e,warnings:r}),t(e,r)})})},o.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"))},o.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='\n\n\n'+a+o+" ";t(null,c)},o.prototype.importDefinitions=function(e,t){try{this.definitions&&this.clear(),this.definitions=e,y.importBpmnDiagram(this,e,t)}catch(n){t(n)}},o.prototype.getModules=function(){return this._modules},o.prototype.destroy=function(){f.prototype.destroy.call(this),d(this.container)},o.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},o.prototype.off=function(e,t){this.get("eventBus").off(e,t)},o.prototype._init=function(e,t,n){var i=n.modules||this.getModules(),r=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,i,r),p=s(c(n,"additionalModules"),{canvas:s({},n.canvas,{container:e}),modules:a});f.call(this,p)},o.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},o.prototype._createContainer=function(e){var t,n=e.container;return n.get&&(n=n.get(0)),p(n)&&(n=h(n)),t=l('
'),s(t.style,{width:r(e.width),height:r(e.height),position:e.position}),n.appendChild(t),t},o.prototype._createModdle=function(e){var t=s({},this._moddleExtensions,e.moddleExtensions);return new m(t)},o.prototype._modules=[e(3),e(204),e(189),e(171)],o.prototype._moddleExtensions={};var x=e(71),b=e(395)},{171:171,189:189,204:204,243:243,3:3,371:371,374:374,377:377,381:381,394:394,395:395,397:397,398:398,65:65,71:71,72:72,96:96}],3:[function(e,t,n){t.exports={__depends__:[e(6),e(67)]}},{6:6,67:67}],4:[function(e,t,n){"use strict";function i(e,t,n,i){function p(e,t){z[e]=t}function u(e){return z[e]}function l(e){function t(e,t){var n=m({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},r=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=t.element.attr(n).marker(0,0,20,20,i.x,i.y).attr({markerWidth:20*r,markerHeight:20*r});return p(e,o)}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,3.5),attrs:{fill:"white",stroke:"black"},ref:{x:6,y:6}}),t("messageflow-end",{element:e.path("m 1 5 l 0 -3 l 7 3 l -7 3 z"),attrs:{fill:"white",stroke:"black",strokeLinecap:"butt"},ref:{x:8.5,y:5}}),t("association-start",{element:e.path("M 11 5 L 1 10 L 11 15"),attrs:{fill:"none",stroke:"black",strokeWidth:1.5},ref:{x:1,y:10},scale:.5}),t("association-end",{element:e.path("M 1 5 L 11 10 L 1 15"),attrs:{fill:"none",stroke:"black",strokeWidth:1.5},ref:{x:12,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 h(e,t,n,i,r){f(i)&&(r=i,i=0),i=i||0,r=G(r,{stroke:"black",strokeWidth:2,fill:"white"});var o=t/2,a=n/2;return e.circle(o,a,Math.round((t+n)/4-i)).attr(r)}function d(e,t,n,i,r,o){return f(r)&&(o=r,r=0),r=r||0,o=G(o,{stroke:"black",strokeWidth:2,fill:"white"}),e.rect(r,r,t-2*r,n-2*r,i).attr(o)}function y(e,t,n,i){var r=t/2,o=n/2,a=[r,0,t,o,r,n,0,o];return i=G(i,{stroke:"black",strokeWidth:2,fill:"white"}),e.polygon(a).attr(i)}function x(e,t,n){return n=G(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}),A(t,n).appendTo(e)}function _(e,t,n){return n=G(n,["no-fill"],{strokeWidth:2,stroke:"black"}),e.path(t).attr(n)}function S(e,t,n,i){return _(t,n,m({"data-marker":e},i))}function T(e){return function(t,n){return V[e](t,n)}}function P(e){return V[e]}function M(e,t){var n=c(e),i=o(n);return r(n,"bpmn:MessageEventDefinition")?P("bpmn:MessageEventDefinition")(t,e,i):r(n,"bpmn:TimerEventDefinition")?P("bpmn:TimerEventDefinition")(t,e,i):r(n,"bpmn:ConditionalEventDefinition")?P("bpmn:ConditionalEventDefinition")(t,e):r(n,"bpmn:SignalEventDefinition")?P("bpmn:SignalEventDefinition")(t,e,i):r(n,"bpmn:CancelEventDefinition")&&r(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!1})?P("bpmn:MultipleEventDefinition")(t,e,i):r(n,"bpmn:CancelEventDefinition")&&r(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!0})?P("bpmn:ParallelMultipleEventDefinition")(t,e,i):r(n,"bpmn:EscalationEventDefinition")?P("bpmn:EscalationEventDefinition")(t,e,i):r(n,"bpmn:LinkEventDefinition")?P("bpmn:LinkEventDefinition")(t,e,i):r(n,"bpmn:ErrorEventDefinition")?P("bpmn:ErrorEventDefinition")(t,e,i):r(n,"bpmn:CancelEventDefinition")?P("bpmn:CancelEventDefinition")(t,e,i):r(n,"bpmn:CompensateEventDefinition")?P("bpmn:CompensateEventDefinition")(t,e,i):r(n,"bpmn:TerminateEventDefinition")?P("bpmn:TerminateEventDefinition")(t,e,i):null}function D(e,t,n){return F.createText(e,t||"",n).addClass("djs-label")}function k(e,t,n){var i=c(t);return D(e,i.name,{box:t,align:n,padding:5})}function B(e,t,n){var i=c(t);return D(e,i.name,{box:t,align:n,style:{fontSize:"11px"}})}function O(e,t,n){var i=D(e,t,{box:{height:30,width:n.height},align:"center-middle"}),r=-1*n.height;i.transform("rotate(270) translate("+r+",0)")}function I(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;io;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;_(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 _(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 _(e,i,{strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),o=i?"black":"none";return _(e,r,{strokeWidth:1,fill:o})},"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 _(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 _(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:.22,my:.5}}),o=i?"black":"none";return _(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 _(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 _(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 _(e,i,{strokeWidth:1})},"bpmn:EndEvent":function(e,t){var n=P("bpmn:Event")(e,t,{strokeWidth:4});return M(t,e,!0),n},"bpmn:TerminateEventDefinition":function(e,t){var n=h(e,t.width,t.height,8,{strokeWidth:4,fill:"black"});return n},"bpmn:IntermediateEvent":function(e,t){var n=P("bpmn:Event")(e,t,{strokeWidth:1});return h(e,t.width,t.height,R,{strokeWidth:1,fill:"none"}),M(t,e),n},"bpmn:IntermediateCatchEvent":T("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":T("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return d(e,t.width,t.height,C,n)},"bpmn:Task":function(e,t,n){var i=P("bpmn:Activity")(e,t,n);return k(e,t,"center-middle"),L(e,t),i},"bpmn:ServiceTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});_(e,r,{strokeWidth:1,fill:"none"});var o=n.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}});_(e,o,{strokeWidth:0,stroke:"none",fill:"white"});var a=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return _(e,a,{strokeWidth:1,fill:"white"}),i},"bpmn:UserTask":function(e,t){var i=P("bpmn:Task")(e,t),r=15,o=12,a=n.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:r,y:o}});_(e,a,{strokeWidth:.5,fill:"none"});var s=n.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:r,y:o}});_(e,s,{strokeWidth:.5,fill:"none"});var c=n.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:r,y:o}});return _(e,c,{strokeWidth:.5,fill:"black"}),i},"bpmn:ManualTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return _(e,r,{strokeWidth:.25,fill:"white",stroke:"black"}),i},"bpmn:SendTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return _(e,r,{strokeWidth:1,fill:"black",stroke:"white"}),i},"bpmn:ReceiveTask":function(e,t){var i,r=c(t),o=P("bpmn:Task")(e,t);return r.instantiate?(h(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}}),_(e,i,{strokeWidth:1}),o},"bpmn:ScriptTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return _(e,r,{strokeWidth:1}),i},"bpmn:BusinessRuleTask":function(e,t){var i=P("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),o=_(e,r);o.attr({strokeWidth:1,fill:"AAA"});var a=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),s=_(e,a);return s.attr({strokeWidth:1}),i},"bpmn:SubProcess":function(e,t,n){n=m({fillOpacity:.95},n);var i=P("bpmn:Activity")(e,t,n),r=w.isExpanded(t),o=w.isEventSubProcess(t);return o&&i.attr({strokeDasharray:"1,2"}),k(e,t,r?"center-top":"center-middle"),r?L(e,t):L(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return P("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,n){var i=P("bpmn:SubProcess")(e,n),r=t.style(["no-fill","no-events"]);return d(e,n.width,n.height,C-2,R,r),i},"bpmn:CallActivity":function(e,t){return P("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n=P("bpmn:Lane")(e,t,{fillOpacity:.95,fill:"White"}),i=w.isExpanded(t);if(i){x(e,[{x:30,y:0},{x:30,y:t.height}]);var r=c(t).name;O(e,r,t)}else{var o=c(t).name;D(e,o,{box:t,align:"center-middle"})}var a=!!c(t).participantMultiplicity;return a&&P("ParticipantMultiplicityMarker")(e,t),n},"bpmn:Lane":function(e,t,n){var i=d(e,t.width,t.height,0,n||{fill:"none"}),r=c(t);if("bpmn:Lane"===r.$type){var o=r.name;O(e,o,t)}return i},"bpmn:InclusiveGateway":function(e,t){var n=y(e,t.width,t.height);return h(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:"none"}),n},"bpmn:ExclusiveGateway":function(e,t){var i=y(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 s(t).isMarkerVisible&&_(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:ComplexGateway":function(e,t){var i=y(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}});return _(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:ParallelGateway":function(e,t){var i=y(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}});return _(e,r,{strokeWidth:1,fill:"black"}),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}});_(e,i,{strokeWidth:2,fill:"none"})}var r=c(t),o=y(e,t.width,t.height);h(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none"});var a=r.eventGatewayType,s=!!r.instantiate;if("Parallel"===a){var p=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),u=_(e,p);u.attr({strokeWidth:1,fill:"none"})}else if("Exclusive"===a){if(!s){var l=h(e,t.width,t.height,.26*t.height);l.attr({strokeWidth:1,fill:"none"})}i()}return o},"bpmn:Gateway":function(e,t){return y(e,t.width,t.height)},"bpmn:SequenceFlow":function(e,t){var n=I(t),i=_(e,n,{strokeLinejoin:"round",markerEnd:u("sequenceflow-end")}),r=c(t),o=t.source.businessObject;return r.conditionExpression&&o.$instanceOf("bpmn:Activity")&&i.attr({markerStart:u("conditional-flow-marker")}),o["default"]&&(o.$instanceOf("bpmn:Gateway")||o.$instanceOf("bpmn:Activity"))&&o["default"]===r&&i.attr({markerStart:u("conditional-default-flow-marker")}),i},"bpmn:Association":function(e,t,n){var i=c(t);return n=m({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round"},n||{}),"One"!==i.associationDirection&&"Both"!==i.associationDirection||(n.markerEnd=u("association-end")),"Both"===i.associationDirection&&(n.markerStart=u("association-start")),x(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){return P("bpmn:Association")(e,t,{markerEnd:u("association-end")})},"bpmn:DataOutputAssociation":function(e,t){return P("bpmn:Association")(e,t,{markerEnd:u("association-end")})},"bpmn:MessageFlow":function(e,t){var i=c(t),r=s(t),o=I(t),a=_(e,o,{markerEnd:u("messageflow-end"),markerStart:u("messageflow-start"),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px"});if(i.messageRef){var p=a.getPointAtLength(a.getTotalLength()/2),l=n.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:p.x,y:p.y}}),h={strokeWidth:1};"initiating"===r.messageVisibleKind?(h.fill="white",h.stroke="black"):(h.fill="#888",h.stroke="white"),_(e,l,h)}return a},"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=_(e,i,{fill:"white"}),o=c(t);return a(o)&&j(e,t),r},"bpmn:DataObjectReference":T("bpmn:DataObject"),"bpmn:DataInput":function(e,t){var i=n.getRawPath("DATA_ARROW"),r=P("bpmn:DataObject")(e,t);return _(e,i,{strokeWidth:1}),r},"bpmn:DataOutput":function(e,t){var i=n.getRawPath("DATA_ARROW"),r=P("bpmn:DataObject")(e,t);return _(e,i,{strokeWidth:1,fill:"black"}),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=_(e,i,{strokeWidth:2,fill:"white"});return r},"bpmn:BoundaryEvent":function(e,t){var n=c(t),i=n.cancelActivity,r={strokeWidth:1};i||(r.strokeDasharray="6",r.strokeLinecap="round");var o=P("bpmn:Event")(e,t,r);return h(e,t.width,t.height,R,m(r,{fill:"none"})),M(t,e),o},"bpmn:Group":function(e,t){return d(e,t.width,t.height,C,{strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return B(e,t,"")},"bpmn:TextAnnotation":function(e,t){var i={fill:"none",stroke:"none"},r=d(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}});_(e,o);var a=c(t).text||"";return D(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}});S("participant-multiplicity",e,i)},SubProcessMarker:function(e,t){var i=d(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}});S("sub-process",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}});S("parallel",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}});S("sequential",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}});S("compensation",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}});S("loop",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}});S("adhoc",e,r,{strokeWidth:1,fill:"black"})}};e.on("canvas.init",function(e){l(e.svg)})}function r(e,t,n){function i(e,t){return y(t,function(t,n){return e[n]==t})}return x(e.eventDefinitions,function(r){return r.$type===t&&i(e,n)})}function o(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}function a(e){return e.isCollection||e.elementObjectRef&&e.elementObjectRef.isCollection}function s(e){return e.businessObject.di}function c(e){return e.businessObject}function p(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2,r=[["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]];return T(r)}function u(e,t){var n=e.x,i=e.y,r=e.width,o=e.height,a=[["M",n+t,i],["l",r-2*t,0],["a",t,t,0,0,1,t,t],["l",0,o-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-r,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-o],["a",t,t,0,0,1,t,-t],["z"]];return T(a)}function l(e){var t=e.width,n=e.height,i=e.x,r=e.y,o=t/2,a=n/2,s=[["M",i+o,r],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return T(s)}function h(e){var t=e.x,n=e.y,i=e.width,r=e.height,o=[["M",t,n],["l",i,0],["l",0,r],["l",-i,0],["z"]];return T(o)}var d=e(243),f=e(372),m=e(377),v=e(255),y=e(252),g=e(257),x=e(261),b=e(107),E=e(232),w=e(68),_=e(70).is,S=e(231),T=S.componentsToPath,A=S.createLine,C=10,R=3,N={fontFamily:"Arial, sans-serif",fontSize:"12px"};d(i,b),i.$inject=["eventBus","styles","pathMap"],t.exports=i,i.prototype.canRender=function(e){return _(e,"bpmn:BaseElement")},i.prototype.drawShape=function(e,t){var n=t.type,i=this.handlers[n];return i(e,t)},i.prototype.drawConnection=function(e,t){var n=t.type,i=this.handlers[n];return i(e,t)},i.prototype.getShapePath=function(e){return _(e,"bpmn:Event")?p(e):_(e,"bpmn:Activity")?u(e,C):_(e,"bpmn:Gateway")?l(e):h(e)}},{107:107,231:231,232:232,243:243,252:252,255:255,257:257,261:261,372:372,377:377,68:68,70:70}],5:[function(e,t,n){"use strict";function i(){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.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},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} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 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},this.getScaledPath=function(e,t){var n,i,o=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var a={};if(t.position){for(var s=t.containerHeight/o.height*t.yScaleFactor,c=t.containerWidth/o.width*t.xScaleFactor,p=0;pt.y+t.height-n.bottom,left:e.xt.x+t.width-n.right}}function v(e,t){"string"==typeof t&&(t=i.get(t));var u=a(e),l=!0;if((o(t,"bpmn:Participant")||o(t,"bpmn:Lane")||o(t,"bpmn:SubProcess"))&&(p(e,function(e){return o(e,"bpmn:Lane")||e.labelTarget?void(l=!1):void 0}),l)){var h=r(u,t,m),d=s(t,["x","y","width","height"]);if(h.top){var y=u.y-f.top;c(d,{y:y,height:d.height+d.y-y})}if(h.bottom&&c(d,{height:u.y+u.height+f.bottom-d.y}),h.left){var g=u.x-f.left;c(d,{x:g,width:d.width+d.x-g})}h.right&&c(d,{width:u.x+u.width+f.right-d.x}),o(t,"bpmn:Participant")?n.resizeLane(t,d):n.resizeShape(t,d);var x=t.parent;x&&v([t],x)}}d.call(this,e),this.postExecuted(["shape.create"],function(e){var t=e.context,n=t.shape,i=t.parent||t.newParent;v([n],i)}),this.postExecuted(["elements.move"],function(e){var t=e.context,n=l(u(t.closure.topLevel)),i=h(n,function(e){return e.parent.id});p(i,function(e,t){v(e,t)})})}var r=e(243),o=e(70).is,a=e(221).getBBox,s=e(383),c=e(377),p=e(255),u=e(385),l=e(245),h=e(256),d=e(98),f={top:60,bottom:60,left:100,right:100},m={top:2,bottom:2,left:15,right:15};i.$inject=["eventBus","canvas","modeling","elementRegistry"],r(i,d),t.exports=i},{221:221,243:243,245:245,255:255,256:256,377:377,383:383,385:385,70:70,98:98}],8:[function(e,t,n){t.exports={__init__:["autoResize"],autoResize:["type",e(7)]}},{7:7}],9:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a,s,c){e.registerProvider(this),this._contextPad=e,this._modeling=t,this._elementFactory=n,this._connect=i,this._create=r,this._popupMenu=o,this._canvas=a,this._rules=s,this._translate=c}function r(e,t,n){var i=e.$instanceOf(t),r=!1,o=e.eventDefinitions||[];return a(o,function(e){e.$type===n&&(r=!0)}),i&&r}var o=e(377),a=e(255),s=e(368),c=e(70).is,p=e(68).isExpanded,u=e(45).isAny,l=e(44).getChildLanes,h=e(68).isEventSubProcess;i.$inject=["contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],t.exports=i,i.prototype.getContextPadEntries=function(e){function t(e,t,n){y.start(e,t,n)}function n(t){m.removeElements([e])}function i(e){var t=5,n=b.getContainer(),i=f.getPad(e).html,r=n.getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.top-r.top,s=o.left-r.left,c={x:s,y:a+o.height+t};return c}function a(e,t,n,i){function r(t,n){var r=v.createShape(o({type:e},i));g.start(t,r,n)}return"string"!=typeof n&&(i=n,n=w("Append {type}",{type:e.replace(/^bpmn\:/,"")})),{group:"model",className:t,title:n,action:{dragstart:r,click:r}}}function d(e){return function(t,n){m.splitLane(n,e),f.open(n,!0)}}var f=this._contextPad,m=this._modeling,v=this._elementFactory,y=this._connect,g=this._create,x=this._popupMenu,b=this._canvas,E=this._rules,w=this._translate,_={};if("label"===e.type)return _;var S=e.businessObject;if(u(S,["bpmn:Lane","bpmn:Participant"])&&p(S)){var T=l(e);o(_,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:w("Add Lane above"),action:{click:function(e,t){m.addLane(t,"top")}}}}),T.length<2&&(e.height>=120&&o(_,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:w("Divide into two Lanes"),action:{click:d(2)}}}),e.height>=180&&o(_,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:w("Divide into three Lanes"),action:{click:d(3)}}})),o(_,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:w("Add Lane below"),action:{click:function(e,t){m.addLane(t,"bottom")}}}})}c(S,"bpmn:FlowNode")&&(c(S,"bpmn:EventBasedGateway")?o(_,{"append.receive-task":a("bpmn:ReceiveTask","bpmn-icon-receive-task"),"append.message-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condtion-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":a("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",{eventDefinitionType:"bpmn:SignalEventDefinition"})}):r(S,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?o(_,{"append.compensation-activity":a("bpmn:Task","bpmn-icon-task",w("Append compensation activity"),{isForCompensation:!0})}):c(S,"bpmn:EndEvent")||S.isForCompensation||r(S,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||h(S)||o(_,{"append.end-event":a("bpmn:EndEvent","bpmn-icon-end-event-none"),"append.gateway":a("bpmn:ExclusiveGateway","bpmn-icon-gateway-xor"),"append.append-task":a("bpmn:Task","bpmn-icon-task"),"append.intermediate-event":a("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none")}));var A;x._providers["bpmn-replace"]&&(A=x.create("bpmn-replace",e)),A&&!A.isEmpty()&&o(_,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:w("Change type"),action:{click:function(e,t){A.open(o(i(t),{cursor:{x:e.x,y:e.y}}),t)}}}}),u(S,["bpmn:FlowNode","bpmn:InteractionNode"])&&o(_,{"append.text-annotation":a("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:w("Connect using "+(S.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:t,dragstart:t}}}),u(S,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&o(_,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:w("Connect using DataInputAssociation"),action:{click:t,dragstart:t}}});var C=E.allowed("elements.delete",{elements:[e]});return s(C)&&(C=C[0]===e),C&&o(_,{"delete":{group:"edit",className:"bpmn-icon-trash",title:w("Remove"),action:{click:n,dragstart:n}}}),_}},{255:255,368:368,377:377,44:44,45:45,68:68,70:70}],10:[function(e,t,n){t.exports={__depends__:[e(93),e(124),e(189),e(122),e(126),e(51)],__init__:["contextPadProvider"],contextPadProvider:["type",e(9)]}},{122:122,124:124,126:126,189:189,51:51,9:9,93:93}],11:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a,s,c){var p={selectElements:function(){var e=a.getRootElement(),t=s.filter(function(t){return t!=e});o.select(t)},spaceTool:function(){t.toggle()},lassoTool:function(){n.toggle()},handTool:function(){i.toggle()},directEditing:function(){var e=o.get();e.length&&r.activate(e[0])}};c.register(p),e.addListener(function(t,n){if(65===t&&e.isCmd(n))return c.trigger("selectElements"),!0;if(!e.hasModifier(n))return 83===t?(c.trigger("spaceTool"),!0):76===t?(c.trigger("lassoTool"),!0):72===t?(c.trigger("handTool"),!0):69===t?(c.trigger("directEditing"),!0):void 0})}i.$inject=["keyboard","spaceTool","lassoTool","handTool","directEditing","selection","canvas","elementRegistry","editorActions"],t.exports=i},{}],12:[function(e,t,n){t.exports={__depends__:[e(137)],__init__:["bpmnKeyBindings"],bpmnKeyBindings:["type",e(11)]}},{11:11,137:137}],13:[function(e,t,n){"use strict";function i(e,t,n,i){n.registerProvider(this),i.registerHandler("element.updateLabel",r),e.on("element.dblclick",function(e){n.activate(e.element)}),e.on(["element.mousedown","drag.init","canvas.viewbox.changed"],function(e){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=e.context.canExecute;i&&(a(t,"bpmn:Task")||a(t,"bpmn:TextAnnotation")||a(t,"bpmn:SubProcess")&&!s(t))&&n.activate(t)}),this._canvas=t,this._commandStack=i}var r=e(15),o=e(14),a=e(70).is,s=e(68).isExpanded,c={width:150,height:50};i.$inject=["eventBus","canvas","directEditing","commandStack"],t.exports=i,i.prototype.activate=function(e){var t=o.getLabel(e);if(void 0!==t){var n=this.getEditingBBox(e);return(a(e,"bpmn:Participant")&&s(e)||a(e,"bpmn:Lane"))&&(n.width=c.width,n.height=c.height,n.x=n.x+10-n.width/2,n.y=n.mid.y-n.height/2),(a(e,"bpmn:Task")||a(e,"bpmn:Activity"))&&(n.width<100&&(n.width=100,n.x=n.mid.x-n.width/2),n.height<80&&(n.height=80,n.y=n.mid.y-n.height/2)),(a(e,"bpmn:SubProcess")&&s(e)||a(e,"bpmn:Participant")&&!s(e))&&(n.width=e.width,n.height=c.height,n.x=n.mid.x-e.width/2),{bounds:n,text:t}}},i.prototype.getEditingBBox=function(e,t){var n=e.label||e,i=this._canvas.getAbsoluteBBox(n),r={x:i.x+i.width/2,y:i.y+i.height/2};return n.labelTarget&&(i.width=Math.max(i.width,c.width),i.height=Math.max(i.height,c.height),i.x=r.x-i.width/2),i.mid=r,i},i.prototype.update=function(e,t){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t})}},{14:14,15:15,68:68,70:70}],14:[function(e,t,n){"use strict";function i(e){return r(e,"bpmn:FlowElement")||r(e,"bpmn:Participant")||r(e,"bpmn:Lane")||r(e,"bpmn:SequenceFlow")||r(e,"bpmn:MessageFlow")?"name":r(e,"bpmn:TextAnnotation")?"text":void 0}var r=e(70).is;t.exports.getLabel=function(e){var t=e.businessObject,n=i(t);return n?t[n]||"":void 0},t.exports.setLabel=function(e,t,n){var r=e.businessObject,o=i(r);return o&&(r[o]=t),n&&(e.hidden=!t),e}},{70:70}],15:[function(e,t,n){"use strict";function i(){function e(e,t){var n=e.label||e,i=e.labelTarget||e;return r.setLabel(n,t,i!==n),[n,i]}function t(t){return t.oldLabel=r.getLabel(t.element),e(t.element,t.newLabel)}function n(t){return e(t.element,t.oldLabel)}this.execute=t,this.revert=n}var r=e(14);t.exports=i},{14:14}],16:[function(e,t,n){t.exports={__depends__:[e(100),e(120),e(93)],__init__:["labelEditingProvider"],labelEditingProvider:["type",e(13)]}},{100:100,120:120,13:13,93:93}],17:[function(e,t,n){"use strict";function i(e){this._model=e}var r=e(258),o=e(377),a=e(383);i.$inject=["moddle"],i.prototype._needsId=function(e){return e.$instanceOf("bpmn:RootElement")||e.$instanceOf("bpmn:FlowElement")||e.$instanceOf("bpmn:MessageFlow")||e.$instanceOf("bpmn:DataAssociation")||e.$instanceOf("bpmn:Artifact")||e.$instanceOf("bpmn:Participant")||e.$instanceOf("bpmn:Lane")||e.$instanceOf("bpmn:Process")||e.$instanceOf("bpmn:Collaboration")||e.$instanceOf("bpmndi:BPMNShape")||e.$instanceOf("bpmndi:BPMNEdge")||e.$instanceOf("bpmndi:BPMNDiagram")||e.$instanceOf("bpmndi:BPMNPlane")||e.$instanceOf("bpmn:Property")},i.prototype._ensureId=function(e){var t=(e.$type||"").replace(/^[^:]*:/g,"")+"_";!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))},i.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},i.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},i.prototype.createDiShape=function(e,t,n){return this.create("bpmndi:BPMNShape",o({bpmnElement:e,bounds:this.createDiBounds(t)},n))},i.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},i.prototype.createDiWaypoints=function(e){return r(e,function(e){return this.createDiWaypoint(e)},this)},i.prototype.createDiWaypoint=function(e){return this.create("dc:Point",a(e,["x","y"]))},i.prototype.createDiEdge=function(e,t,n){return this.create("bpmndi:BPMNEdge",o({bpmnElement:e},n))},i.prototype.createDiPlane=function(e){return this.create("bpmndi:BPMNPlane",{bpmnElement:e})},t.exports=i},{258:258,377:377,383:383}],18:[function(e,t,n){"use strict";function i(){}function r(e){var t=e.host,n=-10;return d(h(e),t,n)}function o(e,t,n){var i=e&&e[t];return i?i.original||i:h(n)}function a(e){var t=e.source,n=e.target;return f(n,"bpmn:Activity")&&f(t,"bpmn:BoundaryEvent")&&n.businessObject.isForCompensation}var s=e(243),c=e(377),p=e(206),u=e(209),l=e(208),h=l.getMid,d=l.getOrientation,f=e(70).is;s(i,p),t.exports=i,i.prototype.layoutConnection=function(e,t){var n,i,s,p,l=e.source,h=e.target,d=e.waypoints;if(n=o(d,0,l),i=o(d,d&&d.length-1,h),(f(e,"bpmn:Association")||f(e,"bpmn:DataAssociation"))&&d&&!a(e))return d;if(f(e,"bpmn:MessageFlow"))s={preferredLayouts:["straight","v:v"]},f(h,"bpmn:Event")&&(s={preferredLayouts:["v:v"]});else if(f(e,"bpmn:SequenceFlow")||a(e))if(f(l,"bpmn:BoundaryEvent")){var m=r(l);/left|right/.test(m)?s={preferredLayouts:["h:v"]}:/top|bottom/.test(m)&&(s={preferredLayouts:["v:h"]})}else s=f(l,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:f(h,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]};return s&&(s=c(s,t),p=u.repairConnection(l,h,n,i,d,s)),p||[n,i]}},{206:206,208:208,209:209,243:243,377:377,70:70}],19:[function(e,t,n){"use strict";function i(e,t,n,i){function r(e){var t,i=e.context;i.cropped||(t=i.connection,t.waypoints=n.getCroppedWaypoints(t),i.cropped=!0)}function a(e){var t=e.context;y.updateParent(t.shape||t.connection,t.oldParent)}function c(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;y.updateParent(n,i)}function p(e){var t=e.context,n=t.oldRoot,i=n.children;s(i,function(e){y.updateParent(e)})}function u(e){var t=e.context.shape;h(t,"bpmn:BaseElement")&&y.updateBounds(t)}function f(e){y.updateConnection(e.context)}function m(e){y.updateConnectionWaypoints(e.context.connection)}function v(e){y.updateAttachment(e.context)}d.call(this,e),this._bpmnFactory=t,this._translate=i;var y=this;this.executed(["connection.layout","connection.create","connection.reconnectEnd","connection.reconnectStart"],r),this.reverted(["connection.layout"],function(e){delete e.context.cropped}),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],o(a)),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],o(c)),this.executed(["canvas.updateRoot"],p),this.reverted(["canvas.updateRoot"],p),this.executed(["shape.move","shape.create","shape.resize"],o(u)),this.reverted(["shape.move","shape.create","shape.resize"],o(u)),this.executed(["connection.create","connection.move","connection.delete","connection.reconnectEnd","connection.reconnectStart"],o(f)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnectEnd","connection.reconnectStart"],o(f)),this.executed(["connection.layout","connection.move","connection.updateWaypoints","connection.reconnectEnd","connection.reconnectStart"],o(m)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints","connection.reconnectEnd","connection.reconnectStart"],o(m)),this.executed(["connection.reconnectEnd","connection.reconnectStart"],o(function(e){var t=e.context,n=t.connection,i=l(n),r=l(t.oldSource),o=l(t.oldTarget),a=l(n.source),s=l(n.target);r!==a&&o!==s&&(r&&r["default"]&&(t["default"]=r["default"],r["default"]=void 0),i.sourceRef&&i.sourceRef["default"]&&!h(s,"bpmn:Activity")&&(t["default"]=i.sourceRef["default"],i.sourceRef["default"]=void 0),i.conditionExpression&&h(r,"bpmn:Activity")&&(t.conditionExpression=i.conditionExpression,i.conditionExpression=void 0),i.conditionExpression&&!h(s,"bpmn:Activity")&&(t.conditionExpression=i.conditionExpression,i.conditionExpression=void 0))})),this.reverted(["connection.reconnectEnd","connection.reconnectStart"],o(function(e){var t=e.context,n=t.connection,i=l(n),r=l(n.source);t["default"]&&(h(r,"bpmn:ExclusiveGateway")||h(r,"bpmn:InclusiveGateway")||h(r,"bpmn:Activity"))&&(r["default"]=t["default"]),t.conditionExpression&&h(r,"bpmn:Activity")&&(i.conditionExpression=t.conditionExpression)})),this.executed(["element.updateAttachment"],o(v)),this.reverted(["element.updateAttachment"],o(v))}function r(e){for(;e&&!h(e,"bpmn:Definitions");)e=e.$parent;return e}function o(e){return function(t){var n=t.context,i=n.shape||n.connection;h(i,"bpmn:BaseElement")&&e(t)}}var a=e(377),s=e(255),c=e(243),p=e(219),u=e(210),l=e(70).getBusinessObject,h=e(70).is,d=e(98);c(i,d),t.exports=i,i.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],i.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},i.prototype.updateParent=function(e,t){if(!(e instanceof u.Label)){var n=e.parent,i=e.businessObject,r=n&&n.businessObject,o=r&&r.di;h(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,r,t&&t.businessObject),h(e,"bpmn:DataOutputAssociation")&&(r=e.source?e.source.businessObject:null),h(e,"bpmn:DataInputAssociation")&&(r=e.target?e.target.businessObject:null),this.updateSemanticParent(i,r),h(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,r),this.updateDiParent(i.di,o)}},i.prototype.updateBounds=function(e){var t=e.businessObject.di,n=e instanceof u.Label?this._getLabel(t).bounds:t.bounds;a(n,{x:e.x,y:e.y,width:e.width,height:e.height})},i.prototype.updateFlowNodeRefs=function(e,t,n){if(n!==t){var i,r;h(n,"bpmn:Lane")&&(i=n.get("flowNodeRef"),p.remove(i,e)),h(t,"bpmn:Lane")&&(r=t.get("flowNodeRef"),p.add(r,e))}},i.prototype.updateDiParent=function(e,t){if(t&&!h(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(p.remove(n,e),e.$parent=null)}},i.prototype.getLaneSet=function(e){var t,n;return h(e,"bpmn:Lane")?(t=e.childLaneSet,t||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(h(e,"bpmn:Participant")&&(e=e.processRef),n=e.get("laneSets"),t=n[0],t||(t=this._bpmnFactory.create("bpmn:LaneSet"),t.$parent=e,n.push(t)),t)},i.prototype.updateSemanticParent=function(e,t){var n,i=this._translate;if(e.$parent!==t){if(h(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),n="lanes";else if(h(e,"bpmn:FlowElement")){if(t)if(h(t,"bpmn:Participant"))t=t.processRef;else if(h(t,"bpmn:Lane"))do t=t.$parent.$parent;while(h(t,"bpmn:Lane"));n="flowElements"}else if(h(e,"bpmn:Artifact")){for(;t&&!h(t,"bpmn:Process")&&!h(t,"bpmn:SubProcess")&&!h(t,"bpmn:Collaboration");){if(h(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}n="artifacts"}else if(h(e,"bpmn:MessageFlow"))n="messageFlows";else if(h(e,"bpmn:Participant")){n="participants";var o,a=e.processRef;a&&(o=r(e.$parent||t),e.$parent&&(p.remove(o.get("rootElements"),a),a.$parent=null),t&&(p.add(o.get("rootElements"),a),a.$parent=o))}else h(e,"bpmn:DataOutputAssociation")?n="dataOutputAssociations":h(e,"bpmn:DataInputAssociation")&&(n="dataInputAssociations");if(!n)throw new Error(i("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var s;e.$parent&&(s=e.$parent.get(n),p.remove(s,e)),t?(s=t.get(n),s.push(e),e.$parent=t):e.$parent=null}},i.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},i.prototype.updateConnection=function(e){var t=e.connection,n=l(t),i=l(t.source),r=l(t.target);if(h(n,"bpmn:DataAssociation"))h(n,"bpmn:DataInputAssociation")?(n.get("sourceRef")[0]=i,this.updateSemanticParent(n,r)):h(n,"bpmn:DataOutputAssociation")&&(this.updateSemanticParent(n,i),n.targetRef=r);else{var o=h(n,"bpmn:SequenceFlow");n.sourceRef!==i&&(o&&(p.remove(n.sourceRef&&n.sourceRef.get("outgoing"),n),i&&i.get("outgoing")&&i.get("outgoing").push(n)),n.sourceRef=i),n.targetRef!==r&&(o&&(p.remove(n.targetRef&&n.targetRef.get("incoming"),n),r&&r.get("incoming")&&r.get("incoming").push(n)),n.targetRef=r)}this.updateConnectionWaypoints(t)},i.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label}},{210:210,219:219,243:243,255:255,377:377,70:70,98:98}],20:[function(e,t,n){"use strict";function i(e,t,n){c.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}var r=e(377),o=e(243),a=e(70).is,s=e(68).isExpanded,c=e(102),p=e(69);o(i,c),i.$inject=["bpmnFactory","moddle","translate"],t.exports=i,i.prototype.baseCreate=c.prototype.create,i.prototype.create=function(e,t){return"label"===e?this.baseCreate(e,r({type:"label"},p.DEFAULT_LABEL_SIZE,t)):this.createBpmnElement(e,t)},i.prototype.createBpmnElement=function(e,t){var n,i=this._translate;t=t||{};var o=t.businessObject;if(!o){if(!t.type)throw new Error(i("no shape type specified"));o=this._bpmnFactory.create(t.type)}o.di||("root"===e?o.di=this._bpmnFactory.createDiPlane(o,[],{id:o.id+"_di"}):"connection"===e?o.di=this._bpmnFactory.createDiEdge(o,[],{id:o.id+"_di"}):o.di=this._bpmnFactory.createDiShape(o,{},{id:o.id+"_di"})),t.processRef&&(o.processRef=t.processRef),t.isExpanded&&(o.di.isExpanded=t.isExpanded),a(o,"bpmn:ExclusiveGateway")&&(o.di.isMarkerVisible=!0),t.isInterrupting===!1&&(o.isInterrupting=!1),t.associationDirection&&(o.associationDirection=t.associationDirection);var s,c;return t.eventDefinitionType&&(s=o.get("eventDefinitions")||[],c=this._moddle.create(t.eventDefinitionType),s.push(c),c.$parent=o,o.eventDefinitions=s),t.isForCompensation&&(o.isForCompensation=!0),n=this._getDefaultSize(o),t=r({businessObject:o,id:o.id},n,t),this.baseCreate(e,t)},i.prototype._getDefaultSize=function(e){return a(e,"bpmn:SubProcess")?s(e)?{width:350,height:200}:{width:100,height:80}:a(e,"bpmn:Task")?{width:100,height:80}:a(e,"bpmn:Gateway")?{width:50,height:50}:a(e,"bpmn:Event")?{width:36,height:36}:a(e,"bpmn:Participant")?s(e)?{width:600,height:250}:{width:400,height:100}:a(e,"bpmn:Lane")?{width:400,height:100}:a(e,"bpmn:DataObjectReference")?{width:36,height:50}:a(e,"bpmn:DataStoreReference")?{width:50,height:50}:a(e,"bpmn:TextAnnotation")?{width:100,height:30}:{width:100,height:80}},i.prototype.createParticipantShape=function(e){var t={type:"bpmn:Participant"};return e||(t.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(t)}},{102:102,243:243,377:377,68:68,69:69,70:70}],21:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e,t,n),this._bpmnRules=i}var r=e(243),o=e(142),a=e(42),s=e(40),c=e(37),p=e(39),u=e(38),l=e(41);r(i,o),i.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],t.exports=i,i.prototype.getHandlers=function(){var e=o.prototype.getHandlers.call(this);return e["element.updateProperties"]=a,e["canvas.updateRoot"]=s,e["lane.add"]=c,e["lane.resize"]=u,e["lane.split"]=p,e["lane.updateRefs"]=l,e},i.prototype.updateLabel=function(e,t){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t})},i.prototype.connect=function(e,t,n){var i=this._bpmnRules;return n||(n=i.canConnect(e,t)||{type:"bpmn:Association"}),this.createConnection(e,t,n,e.parent)},i.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},i.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},i.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},i.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},i.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},i.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},i.prototype.makeProcess=function(){var e=this._create("root",{type:"bpmn:Process"}),t={newRoot:e};this._commandStack.execute("canvas.updateRoot",t)}},{142:142,243:243,37:37,38:38,39:39,40:40,41:41,42:42}],22:[function(e,t,n){"use strict";function i(e,t,n){a.call(this,e),this.preExecute("shape.append",function(e){var t=e.source,n=e.shape;e.position||(o(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})},!0)}var r=e(243),o=e(70).is,a=e(98);i.$inject=["eventBus","elementFactory","bpmnRules"],r(i,a),t.exports=i},{243:243,70:70,98:98}],23:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e),this.preExecute("shape.create",function(e){var t,r,o=e.shape,s=e.host,c={cancelActivity:!0};s&&a(o,"bpmn:IntermediateThrowEvent")&&(c.attachedToRef=s.businessObject,t=i.create("bpmn:BoundaryEvent",c),r={type:"bpmn:BoundaryEvent",businessObject:t},e.shape=n.createShape(r))},!0)}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","modeling","elementFactory","bpmnFactory"],r(i,o),t.exports=i},{243:243,70:70,98:98}],24:[function(e,t,n){"use strict";function i(e,t,n){o.call(this,e),this.preExecute("shape.create",function(e){var n=e.context,i=n.shape;if(a(i,"bpmn:DataObjectReference")&&"label"!==i.type){var r=t.create("bpmn:DataObject");i.businessObject.dataObjectRef=r}})}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","bpmnFactory","moddle"],r(i,o),t.exports=i},{243:243,70:70,98:98}],25:[function(e,t,n){"use strict";function i(e){return a({},e)}function r(e,t,n){s.call(this,e),this.preExecute("shape.create",function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)},!0),this.postExecute("shape.create",function(e){var r,o,a,s,p,u,l,h,d=e.shape,f=e.targetFlow,m=e.position;f&&(p=f.waypoints,s=c(p,m),s&&(u=p.slice(0,s.index),l=p.slice(s.index+(s.bendpoint?1:0)),h=s.bendpoint?p[s.index]:m,u.push(i(h)),l.unshift(i(h))),r=f.source,o=f.target,t.canConnect(r,d,f)&&(n.reconnectEnd(f,d,u||i(m)),a=!0),t.canConnect(d,o,f)&&(a?n.connect(d,o,{type:f.type,waypoints:l}):n.reconnectStart(f,d,l||i(m))))},!0)}var o=e(243),a=e(377),s=e(98),c=e(226).getApproxIntersection;o(r,s),r.$inject=["eventBus","bpmnRules","modeling"],t.exports=r},{226:226,243:243,377:377,98:98}],26:[function(e,t,n){"use strict";function i(e,t,n,i){o.call(this,e),this.preExecute("shape.create",function(e){var n=e.parent,i=e.shape,r=e.position;if(a(n,"bpmn:Process")&&a(i,"bpmn:Participant")){var o=t.makeCollaboration();e.position=r,e.parent=o,e.processRoot=n}},!0),this.execute("shape.create",function(e){var t=e.processRoot,n=e.shape;t&&(e.oldProcessRef=n.businessObject.processRef,n.businessObject.processRef=t.businessObject)},!0),this.revert("shape.create",function(e){var t=e.processRoot,n=e.shape;t&&(n.businessObject.processRef=e.oldProcessRef)},!0),this.postExecute("shape.create",function(e){var n=e.processRoot,i=e.shape;if(n){var r=n.children.slice();t.moveElements(r,{x:0,y:0},i)}},!0)}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","modeling","elementFactory","bpmnFactory"],r(i,o),t.exports=i},{243:243,70:70,98:98}],27:[function(e,t,n){"use strict";function i(e,t){function n(e,t,n){var i=e.get("dataInputAssociations");return c(i,function(e){return e!==n&&e.targetRef===t})}function i(e,n){var i=e.get("properties"),r=c(i,function(e){return e.name===u});return!r&&n&&(r=t.create("bpmn:Property",{name:u}),s.add(i,r)),r}function o(e,t){var r=i(e);r&&(n(e,r,t)||s.remove(e.get("properties"),r))}function p(e){var t,n=e.context,r=n.connection,a=r.businessObject,s=r.target,c=s&&s.businessObject,p=n.newTarget,u=p&&p.businessObject,l=n.oldTarget||n.target,h=l&&l.businessObject,d=r.businessObject;h&&h!==c&&o(h,a),u&&u!==c&&o(u,a),c?(t=i(c,!0),d.targetRef=t):d.targetRef=null}a.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnectEnd"],r(p)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnectEnd"],r(p))}function r(e){return function(t){var n=t.context,i=n.connection;return p(i,"bpmn:DataInputAssociation")?e(t):void 0}}var o=e(243),a=e(98),s=e(219),c=e(254),p=e(70).is,u="__targetRef_placeholder";
i.$inject=["eventBus","bpmnFactory"],o(i,a),t.exports=i},{219:219,243:243,254:254,70:70,98:98}],28:[function(e,t,n){"use strict";function i(e,t,n){function i(e,t){var i=s(t),r=[],o=[];if(c(i,function(t){return t.y>e.y?o.push(t):r.push(t),t.children}),i.length){var a;a=o.length&&r.length?e.height/2:e.height;var p,u;r.length&&(p=n.calculateAdjustments(r,"y",a,e.y-10),n.makeSpace(p.movingShapes,p.resizingShapes,{x:0,y:a},"s")),o.length&&(u=n.calculateAdjustments(o,"y",-a,e.y+e.height+10),n.makeSpace(u.movingShapes,u.resizingShapes,{x:0,y:-a},"n"))}}o.call(this,e),this.postExecuted("shape.delete",p,function(e){var t=e.context,n=t.hints,r=t.shape,o=t.oldParent;a(r,"bpmn:Lane")&&(n&&n.nested||i(r,o))})}var r=e(243),o=e(98),a=e(70).is,s=e(44).getChildLanes,c=e(221).eachElement,p=500;i.$inject=["eventBus","modeling","spaceTool"],r(i,o),t.exports=i},{221:221,243:243,44:44,70:70,98:98}],29:[function(e,t,n){"use strict";function i(e,t,n){u.call(this,e),this.postExecute(["shape.create","connection.create"],function(e){var n,i=e.context,r=i.shape||i.connection,o=r.businessObject;c(o)&&(n=p(r),t.createLabel(r,n,{id:o.id+"_label",hidden:!o.name,businessObject:o}))}),this.executed(["label.create"],function(e){var t,i,o=e.context.shape;o.labelTarget&&s(o.labelTarget||o,"bpmn:BaseElement")&&(t=o.businessObject,i=t.di,i.label||(i.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")})),r(i.label.bounds,{x:o.x,y:o.y,width:o.width,height:o.height}))})}var r=e(377),o=e(243),a=e(69),s=e(70).is,c=a.hasExternalLabel,p=a.getExternalLabelMid,u=e(98);o(i,u),i.$inject=["eventBus","modeling","bpmnFactory"],t.exports=i},{243:243,377:377,69:69,70:70,98:98}],30:[function(e,t,n){"use strict";function i(e,t,n){function i(e,n){t.add({position:{x:e.x+5,y:e.y+5},type:"error",timeout:2e3,html:""+n+"
"})}e.on(["shape.move.rejected","create.rejected"],function(e){var t=e.context,o=t.shape,a=t.target;r(a,"bpmn:Collaboration")&&r(o,"bpmn:FlowNode")&&i(e,n("flow elements must be children of pools/participants"))})}var r=e(70).is;i.$inject=["eventBus","tooltips","translate"],t.exports=i},{70:70}],31:[function(e,t,n){"use strict";function i(e,t){o.call(this,e),this.preExecute("shape.delete",function(e){var t=e.shape,n=t.parent;a(t,"bpmn:Participant")&&(e.collaborationRoot=n)},!0),this.postExecute("shape.delete",function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()},!0)}var r=e(243),o=e(98),a=e(70).is;i.$inject=["eventBus","modeling"],r(i,o),t.exports=i},{243:243,70:70,98:98}],32:[function(e,t,n){"use strict";function i(e,t,n){function i(e){var i=e.source,r=e.target,o=e.parent;if(o){var a,s;c(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(i,r)||(s=!0),n.canConnectMessageFlow(i,r)&&(a="bpmn:MessageFlow")),c(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(i,r)||(s=!0),n.canConnectSequenceFlow(i,r)&&(a="bpmn:SequenceFlow")),c(e,"bpmn:Association")&&!n.canConnectAssociation(i,r)&&(s=!0),s&&t.removeConnection(e),a&&t.connect(i,r,{type:a,waypoints:e.waypoints.slice()})}}s.call(this,e),this.postExecuted("elements.move",function(e){var t=e.closure,n=t.allConnections;r(n,i)},!0),this.postExecuted(["connection.reconnectStart","connection.reconnectEnd"],function(e){var t=e.context.connection;i(t)}),this.postExecuted("element.updateProperties",function(e){var n,i=e.context,r=i.properties,a=i.element,s=a.businessObject;r["default"]&&(n=o(a.outgoing,{id:a.businessObject["default"].id}),n&&t.updateProperties(n,{conditionExpression:void 0})),r.conditionExpression&&s.sourceRef["default"]===s&&t.updateProperties(a.source,{"default":void 0})})}var r=e(255),o=e(254),a=e(243),s=e(98),c=e(70).is;a(i,s),i.$inject=["eventBus","modeling","bpmnRules"],t.exports=i},{243:243,254:254,255:255,70:70,98:98}],33:[function(e,t,n){"use strict";function i(e,t,n,i,r,c){o.call(this,e),this._bpmnReplace=t,this._elementRegistry=i,this._selection=r,this._modeling=c,this.postExecuted(["elements.move"],500,function(e){var t=e.context,i=t.newParent,r=t.newHost,o=[];a(t.closure.topLevel,function(e){o=s(e)?o.concat(e.children):o.concat(e)}),1===o.length&&r&&(i=r);var c=n.canReplace(o,i);c&&this.replaceElements(o,c.replacements,r)},this),this.postExecute(["shape.replace"],1500,function(e){var t,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(t=n.canReplace(a,o),this.replaceElements(a,t.replacements))},this)}var r=e(243),o=e(98),a=e(255),s=e(68).isEventSubProcess,c=e(70).is;r(i,o),i.prototype.replaceElements=function(e,t,n){var i=this._elementRegistry,r=this._bpmnReplace,o=this._selection,s=this._modeling;a(t,function(t){var o={type:t.newElementType},a=i.get(t.oldElementId);n&&c(a,"bpmn:BoundaryEvent")&&s.updateAttachment(a,null);var p=e.indexOf(a);e[p]=r.replaceElement(a,o,{select:!1}),n&&c(e[p],"bpmn:BoundaryEvent")&&s.updateAttachment(e[p],n)}),t&&o.select(e)},i.$inject=["eventBus","bpmnReplace","bpmnRules","elementRegistry","selection","modeling"],t.exports=i},{243:243,255:255,68:68,70:70,98:98}],34:[function(e,t,n){"use strict";function i(e,t){e.on("resize.start",s+500,function(e){var t=e.context,n=t.shape;(r(n,"bpmn:Lane")||r(n,"bpmn:Participant"))&&(t.balanced=!a(e))}),e.on("resize.end",s,function(e){var n=e.context,i=n.shape,a=n.canExecute,s=n.newBounds;return r(i,"bpmn:Lane")||r(i,"bpmn:Participant")?(a&&(s=o(s),t.resizeLane(i,s,n.balanced)),!1):void 0})}var r=e(70).is,o=e(208).roundBounds,a=e(228).hasPrimaryModifier,s=1001;i.$inject=["eventBus","modeling"],t.exports=i},{208:208,228:228,70:70}],35:[function(e,t,n){"use strict";function i(e,t,n){function i(){return l=l||new r,l.enter(),l}function o(){if(!l)throw new Error(n("out of bounds release"));return l}function u(){if(!l)throw new Error(n("out of bounds release"));var e=l.leave();return e&&(t.updateLaneRefs(l.flowNodes,l.lanes),l=null),e}a.call(this,e);var l,h=["spaceTool","lane.add","lane.resize","lane.split","elements.move","elements.delete","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(h,p,function(e){i()}),this.postExecuted(h,c,function(e){u()}),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],function(e){var t=e.context,n=t.shape,i=o();n.labelTarget||(s(n,"bpmn:Lane")&&i.addLane(n),s(n,"bpmn:FlowNode")&&i.addFlowNode(n))})}function r(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}var o=e(243),a=e(98),s=e(70).is,c=500,p=5e3;i.$inject=["eventBus","modeling","translate"],o(i,a),t.exports=i},{243:243,70:70,98:98}],36:[function(e,t,n){t.exports={__init__:["appendBehavior","createBoundaryEventBehavior","createDataObjectBehavior","createOnFlowBehavior","createParticipantBehavior","dataInputAssociationBehavior","deleteLaneBehavior","labelBehavior","modelingFeedback","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeLaneBehavior","updateFlowNodeRefsBehavior"],appendBehavior:["type",e(22)],createBoundaryEventBehavior:["type",e(23)],createDataObjectBehavior:["type",e(24)],createOnFlowBehavior:["type",e(25)],createParticipantBehavior:["type",e(26)],dataInputAssociationBehavior:["type",e(27)],deleteLaneBehavior:["type",e(28)],labelBehavior:["type",e(29)],modelingFeedback:["type",e(30)],removeParticipantBehavior:["type",e(31)],replaceConnectionBehavior:["type",e(32)],replaceElementBehaviour:["type",e(33)],resizeLaneBehavior:["type",e(34)],updateFlowNodeRefsBehavior:["type",e(35)]}},{22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35}],37:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._spaceTool=t}var r=e(253),o=e(221),a=e(44).getLanesRoot,s=e(44).getChildLanes,c=e(44).LANE_INDENTATION;i.$inject=["modeling","spaceTool"],t.exports=i,i.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,p=e.location,u=a(i),l=u===i,h=l?i:i.parent,d=s(h);d.length||n.createShape({type:"bpmn:Lane"},{x:i.x+c,y:i.y,width:i.width-c,height:i.height},h);var f=[];o.eachElement(u,function(e){return f.push(e),e===i?[]:r(e.children,function(e){return e!==i})});var m="top"===p?-120:120,v="top"===p?i.y:i.y+i.height,y=v+("top"===p?10:-10),g="top"===p?"n":"s",x=t.calculateAdjustments(f,"y",m,y);t.makeSpace(x.movingShapes,x.resizingShapes,{x:0,y:m},g),e.newLane=n.createShape({type:"bpmn:Lane"},{x:i.x+(l?c:0),y:v-("top"===p?120:0),width:i.width-(l?c:0),height:120},h)}},{221:221,253:253,44:44}],38:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._spaceTool=t}var r=e(70).is,o=e(44).getLanesRoot,a=e(44).computeLanesResize,s=e(221).eachElement,c=e(208).asTRBL,p=e(180).substractTRBL;i.$inject=["modeling","spaceTool"],t.exports=i,i.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds,i=e.balanced;i!==!1?this.resizeBalanced(t,n):this.resizeSpace(t,n)},i.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=a(e,t);n.resizeShape(e,t),i.forEach(function(e){n.resizeShape(e.shape,e.newBounds)})},i.prototype.resizeSpace=function(e,t){var n=this._spaceTool,i=c(e),a=c(t),u=p(a,i),l=o(e),h=[],d=[];s(l,function(e){return h.push(e),(r(e,"bpmn:Lane")||r(e,"bpmn:Participant"))&&d.push(e),e.children});var f,m,v,y,g;(u.bottom||u.top)&&(f=u.bottom||u.top,m=e.y+(u.bottom?e.height:0)+(u.bottom?-10:10),v=u.bottom?"s":"n",y=u.top>0||u.bottom<0?-f:f,g=n.calculateAdjustments(h,"y",y,m),n.makeSpace(g.movingShapes,g.resizingShapes,{x:0,y:f},v)),(u.left||u.right)&&(f=u.right||u.left,m=e.x+(u.right?e.width:0)+(u.right?-10:100),v=u.right?"e":"w",y=u.left>0||u.right<0?-f:f,g=n.calculateAdjustments(d,"x",y,m),n.makeSpace(g.movingShapes,g.resizingShapes,{x:f,y:0},v))}},{180:180,208:208,221:221,44:44,70:70}],39:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._translate=t}var r=e(44).getChildLanes,o=e(44).LANE_INDENTATION;i.$inject=["modeling","translate"],t.exports=i,i.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,a=e.count,s=r(i),c=s.length;if(c>a)throw new Error(n("more than {count} child lanes",{count:a}));var p,u,l,h,d,f=Math.round(i.height/a);for(d=0;a>d;d++)p=i.y+d*f,u=d===a-1?i.height-f*d:f,l={x:i.x+o,y:p,width:i.width-o,height:u},c>d?t.resizeShape(s[d],l):(h={type:"bpmn:Lane"},t.createShape(h,l,i))}},{44:44}],40:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._modeling=t}var r=e(219);i.$inject=["canvas","modeling"],t.exports=i,i.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,o=t.getRootElement(),a=o.businessObject,s=a.$parent,c=a.di;t.setRootElement(n,!0),r.add(s.rootElements,i),i.$parent=s,r.remove(s.rootElements,a),a.$parent=null,a.di=null,c.bpmnElement=i,i.di=c,e.oldRoot=o},i.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,o=e.oldRoot,a=o.businessObject,s=i.$parent,c=i.di;t.setRootElement(o,!0),r.remove(s.rootElements,i),i.$parent=null,r.add(s.rootElements,a),a.$parent=s,i.di=null,c.bpmnElement=a,a.di=c}},{219:219}],41:[function(e,t,n){"use strict";function i(e){this._elementRegistry=e}var r=e(44).collectLanes,o=e(44).getLanesRoot,a=e(70).is,s=e(219),c=e(208).asTRBL,p="flowNodeRef",u="lanes";i.$inject=["elementRegistry"],t.exports=i,i.prototype.computeUpdates=function(e,t){function n(e,t){var n=c(t),i={x:e.x+e.width/2,y:e.y+e.height/2};return i.x>n.left&&i.xn.top&&i.yo&&(a-=1),{index:a,parent:t}}}var r=e(243),o=e(167),a=e(45).isAny,s=e(244),c=e(254);i.$inject=["eventBus","translate"],r(i,o),t.exports=i},{167:167,243:243,244:244,254:254,45:45}],47:[function(e,t,n){t.exports={__init__:["bpmnOrderingProvider"],__depends__:[e(204)],bpmnOrderingProvider:["type",e(46)]}},{204:204,46:46}],48:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,a){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=r,this._handTool=o,this._translate=a,e.registerProvider(this)}var r=e(377);t.exports=i,i.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","translate","eventBus"],i.prototype.getPaletteEntries=function(e){function t(e,t,n,i,s){function c(t){var n=a.createShape(r({type:e},s));s&&(n.businessObject.di.isExpanded=s.isExpanded),o.start(t,n)}var p=e.replace(/^bpmn\:/,"");return{group:t,className:n,title:i||u("Create {type}",{type:p}),action:{dragstart:c,click:c}}}function n(e,t){o.start(e,a.createParticipantShape(t))}var i={},o=this._create,a=this._elementFactory,s=this._spaceTool,c=this._lassoTool,p=this._handTool,u=this._translate;return r(i,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:u("Activate the hand tool"),action:{click:function(e){p.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:u("Activate the lasso tool"),action:{click:function(e){c.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:u("Activate the create/remove space tool"),action:{click:function(e){s.activateSelection(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":t("bpmn:StartEvent","event","bpmn-icon-start-event-none"),"create.intermediate-event":t("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none"),"create.end-event":t("bpmn:EndEvent","event","bpmn-icon-end-event-none"),"create.exclusive-gateway":t("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-xor"),"create.task":t("bpmn:Task","activity","bpmn-icon-task"),"create.data-object":t("bpmn:DataObjectReference","data-object","bpmn-icon-data-object"),"create.data-store":t("bpmn:DataStoreReference","data-store","bpmn-icon-data-store"),"create.subprocess-expanded":t("bpmn:SubProcess","activity","bpmn-icon-subprocess-expanded",u("Create expanded SubProcess"),{isExpanded:!0}),"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:u("Create Pool/Participant"),action:{dragstart:n,click:n}}}),i}},{377:377}],49:[function(e,t,n){t.exports={__depends__:[e(173),e(126),e(196),e(141),e(133),e(204)],__init__:["paletteProvider"],paletteProvider:["type",e(48)]}},{126:126,133:133,141:141,173:173,196:196,204:204,48:48}],50:[function(e,t,n){"use strict";function i(e,t,n,i,r,o){this._popupMenu=e,this._modeling=t,this._moddle=n,this._bpmnReplace=i,this._rules=r,this._translate=o,this.register()}var r=e(70).is,o=e(68).isEventSubProcess,a=e(70).getBusinessObject,s=e(68).isExpanded,c=e(52).isDifferentType,p=e(255),u=e(253),l=e(56);i.$inject=["popupMenu","modeling","moddle","bpmnReplace","rules","translate"],i.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},i.prototype.getEntries=function(e){var t,n=e.businessObject,i=this._rules;if(!i.allowed("shape.replace",{element:e}))return[];var p=c(e);return r(n,"bpmn:StartEvent")&&!o(n.$parent)?(t=u(l.START_EVENT,p),this._createEntries(e,t)):r(n,"bpmn:Participant")?(t=u(l.PARTICIPANT,function(e){return s(n)!==e.target.isExpanded}),this._createEntries(e,t)):r(n,"bpmn:StartEvent")&&o(n.$parent)?(t=u(l.EVENT_SUB_PROCESS_START_EVENT,function(t){var n=t.target,i=n.isInterrupting!==!1,r=a(e).isInterrupting===i;return p(t)||!p(t)&&!r}),this._createEntries(e,t)):r(n,"bpmn:EndEvent")?(t=u(l.END_EVENT,function(e){var t=e.target;return"bpmn:CancelEventDefinition"!=t.eventDefinition||r(n.$parent,"bpmn:Transaction")?p(e):!1}),this._createEntries(e,t)):r(n,"bpmn:BoundaryEvent")?(t=u(l.BOUNDARY_EVENT,function(e){var t=e.target;if("bpmn:CancelEventDefinition"==t.eventDefinition&&!r(n.attachedToRef,"bpmn:Transaction"))return!1;var i=t.cancelActivity!==!1,o=n.cancelActivity==i;return p(e)||!p(e)&&!o}),this._createEntries(e,t)):r(n,"bpmn:IntermediateCatchEvent")||r(n,"bpmn:IntermediateThrowEvent")?(t=u(l.INTERMEDIATE_EVENT,p),this._createEntries(e,t)):r(n,"bpmn:Gateway")?(t=u(l.GATEWAY,p),this._createEntries(e,t)):r(n,"bpmn:Transaction")?(t=u(l.TRANSACTION,p),this._createEntries(e,t)):o(n)&&s(n)?(t=u(l.EVENT_SUB_PROCESS,p),this._createEntries(e,t)):r(n,"bpmn:SubProcess")&&s(n)?(t=u(l.SUBPROCESS_EXPANDED,p),this._createEntries(e,t)):r(n,"bpmn:AdHocSubProcess")&&!s(n)?(t=u(l.TASK,function(t){var n=t.target,i="bpmn:SubProcess"===n.type;return c(e,n)&&!i}),this._createEntries(e,t)):r(n,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,l.SEQUENCE_FLOW):r(n,"bpmn:FlowNode")?(t=u(l.TASK,p),n.isForCompensation&&(t=u(t,function(e){return!/CallActivity/.test(e.target.type)})),this._createEntries(e,t)):[]},i.prototype.getHeaderEntries=function(e){var t=[];return r(e,"bpmn:Activity")&&!o(e)&&(t=t.concat(this._getLoopEntries(e))),!r(e,"bpmn:SubProcess")||r(e,"bpmn:Transaction")||o(e)||t.push(this._getAdHocEntry(e)),t},i.prototype._createEntries=function(e,t){var n=[],i=this;return p(t,function(t){var r=i._createMenuEntry(t,e);n.push(r)}),n},i.prototype._createSequenceFlowEntries=function(e,t){var n=a(e),i=[],o=this._modeling,s=this._moddle,c=this;return p(t,function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef["default"]!==n&&(r(n.sourceRef,"bpmn:ExclusiveGateway")||r(n.sourceRef,"bpmn:InclusiveGateway")||r(n.sourceRef,"bpmn:Activity"))&&i.push(c._createMenuEntry(t,e,function(){o.updateProperties(e.source,{"default":n})}));break;case"replace-with-conditional-flow":!n.conditionExpression&&r(n.sourceRef,"bpmn:Activity")&&i.push(c._createMenuEntry(t,e,function(){var t=s.create("bpmn:FormalExpression",{body:""});o.updateProperties(e,{conditionExpression:t})}));break;default:if(r(n.sourceRef,"bpmn:Activity")&&n.conditionExpression)return i.push(c._createMenuEntry(t,e,function(){o.updateProperties(e,{conditionExpression:void 0})}));if((r(n.sourceRef,"bpmn:ExclusiveGateway")||r(n.sourceRef,"bpmn:InclusiveGateway")||r(n.sourceRef,"bpmn:Activity"))&&n.sourceRef["default"]===n)return i.push(c._createMenuEntry(t,e,function(){o.updateProperties(e.source,{"default":void 0})}))}}),i},i.prototype._createMenuEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement,o=function(){return r(t,e.target)};n=n||o;var a={label:i(e.label),className:e.className,id:e.actionName,action:n};return a},i.prototype._getLoopEntries=function(e){function t(t,n){var i;n.active?i=void 0:(i=o._moddle.create(n.options.loopCharacteristics),n.options.isSequential&&(i.isSequential=n.options.isSequential)),o._modeling.updateProperties(e,{loopCharacteristics:i})}var n,i,r,o=this,s=this._translate,c=a(e),p=c.loopCharacteristics;p&&(n=p.isSequential,i=void 0===p.isSequential,r=void 0!==p.isSequential&&!p.isSequential);var u=[{id:"toggle-parallel-mi",className:"bpmn-icon-parallel-mi-marker",title:s("Parallel Multi Instance"),active:r,action:t,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},{id:"toggle-sequential-mi",className:"bpmn-icon-sequential-mi-marker",title:s("Sequential Multi Instance"),active:n,action:t,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},{id:"toggle-loop",className:"bpmn-icon-loop-marker",title:s("Loop"),active:i,action:t,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}];return u},i.prototype._getAdHocEntry=function(e){var t=this._translate,n=a(e),i=r(n,"bpmn:AdHocSubProcess"),o=this._bpmnReplace.replaceElement,s={id:"toggle-adhoc",className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:i,action:function(t,n){return i?o(e,{type:"bpmn:SubProcess"}):o(e,{type:"bpmn:AdHocSubProcess"})}};return s},t.exports=i},{253:253,255:255,52:52,56:56,68:68,70:70}],51:[function(e,t,n){t.exports={__depends__:[e(175),e(57)],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",e(50)]}},{175:175,50:50,57:57}],52:[function(e,t,n){"use strict";function i(e){return function(t){var n=t.target,i=r(e),o=i.eventDefinitions&&i.eventDefinitions[0],a=(o&&o.$type)===n.eventDefinitionType,s=i.$type===n.type,c=i.triggeredByEvent==n.triggeredByEvent;return!s||!a||!c}}var r=e(70).getBusinessObject;t.exports.isDifferentType=i},{70:70}],53:[function(e,t,n){"use strict";function i(e,t,n,i,o){function p(e){var r=e.canExecute.replacements;s(r,function(r){var s=r.oldElementId,c={type:r.newElementType};if(!e.visualReplacements[s]){var p=t.get(s);a(c,{x:p.x,y:p.y});var u=n.createShape(c);i.addShape(u,p.parent);var l=e.dragGroup.select("[data-element-id="+p.id+"]");l&&l.attr({display:"none"});var h=o.addDragger(e,u);e.visualReplacements[s]=h,i.removeShape(u)}})}function u(e){var t=e.visualReplacements;s(t,function(n,i){var r=e.dragGroup.select("[data-element-id="+i+"]");r&&r.attr({display:"inline"}),n.remove(),t[i]&&delete t[i]})}r.call(this,e),e.on("shape.move.move",c,function(e){var t=e.context,n=t.canExecute;t.visualReplacements||(t.visualReplacements={}),n.replacements?p(t):u(t)})}var r=e(98),o=e(243),a=e(377),s=e(255),c=250;i.$inject=["eventBus","elementRegistry","elementFactory","canvas","moveVisuals"],o(i,r),t.exports=i},{243:243,255:255,377:377,98:98}],54:[function(e,t,n){t.exports={__depends__:[e(166)],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",e(53)]}},{166:166,53:53}],55:[function(e,t,n){"use strict";function i(e,t,n,i){function u(i,u,l){l=l||{};var h=u.type,d=i.businessObject,f=e.create(h),m={type:h,businessObject:f};return u.eventDefinitionType&&(m.eventDefinitionType=u.eventDefinitionType),o(f,r(u,p)),a(d,"bpmn:Activity")&&(m.width=i.width,m.height=i.height),a(d,"bpmn:SubProcess")&&(m.isExpanded=s(d)),a(d,"bpmn:Participant")&&(u.isExpanded===!0?f.processRef=e.create("bpmn:Process"):l.moveChildren=!1,m.width=i.width,m.height=i.height),f.name=d.name,c(f)||(f.loopCharacteristics=d.loopCharacteristics),(a(d,"bpmn:ExclusiveGateway")||a(d,"bpmn:InclusiveGateway")||a(d,"bpmn:Activity"))&&(a(f,"bpmn:ExclusiveGateway")||a(f,"bpmn:InclusiveGateway")||a(f,"bpmn:Activity"))&&(f["default"]=d["default"]),d.isForCompensation&&(f.isForCompensation=!0),m=t.replaceElement(i,m,l),l.select!==!1&&n.select(m),m}this.replaceElement=u}var r=e(383),o=e(377),a=e(70).is,s=e(68).isExpanded,c=e(68).isEventSubProcess,p=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];i.$inject=["bpmnFactory","replace","selection","modeling"],t.exports=i},{377:377,383:383,68:68,70:70}],56:[function(e,t,n){"use strict";t.exports.START_EVENT=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],t.exports.INTERMEDIATE_EVENT=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Intermediate Catch Event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message Intermediate Throw Event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Intermediate Catch Event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Intermediate Throw Event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Intermediate Catch Event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link Intermediate Catch Event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition"}},{label:"Link Intermediate Throw Event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition"}},{label:"Compensation Intermediate Throw Event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal Intermediate Catch Event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal Intermediate Throw Event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],t.exports.END_EVENT=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"
}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message End Event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation End Event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error End Event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel End Event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation End Event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal End Event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate End Event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],t.exports.GATEWAY=[{label:"Exclusive Gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel Gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive Gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex Gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event based Gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],t.exports.SUBPROCESS_EXPANDED=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],t.exports.TRANSACTION=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],t.exports.EVENT_SUB_PROCESS=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}}],t.exports.TASK=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"Send Task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive Task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"User Task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Manual Task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business Rule Task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Service Task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Script Task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call Activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],t.exports.BOUNDARY_EVENT=[{label:"Message Boundary Event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Boundary Event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Boundary Event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Boundary Event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error Boundary Event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel Boundary Event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal Boundary Event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation Boundary Event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],t.exports.EVENT_SUB_PROCESS_START_EVENT=[{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Error Start Event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Escalation Start Event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Compensation Start Event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],t.exports.SEQUENCE_FLOW=[{label:"Sequence Flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default Flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional Flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],t.exports.PARTICIPANT=[{label:"Expanded Pool",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:"Collapsed Pool",actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}]},{}],57:[function(e,t,n){t.exports={__depends__:[e(177),e(189)],bpmnReplace:["type",e(55)]}},{177:177,189:189,55:55}],58:[function(e,t,n){"use strict";function i(e){K.call(this,e)}function r(e){return!e||b(e)}function o(e,t){return e===t}function a(e){for(var t=H(e);t&&!W(t,"bpmn:Process");){if(W(t,"bpmn:Participant"))return t.processRef||t;t=t.$parent}return t}function s(e){return W(e,"bpmn:TextAnnotation")}function c(e){return W(e,"bpmn:BoundaryEvent")&&m(e,"bpmn:CompensateEventDefinition")}function p(e){return H(e).isForCompensation}function u(e,t){var n=a(e),i=a(t);return n===i}function l(e){return W(e,"bpmn:InteractionNode")&&!p(e)&&(!W(e,"bpmn:Event")||W(e,"bpmn:ThrowEvent")&&v(e,"bpmn:MessageEventDefinition"))}function h(e){return W(e,"bpmn:InteractionNode")&&!p(e)&&(!W(e,"bpmn:Event")||W(e,"bpmn:CatchEvent")&&v(e,"bpmn:MessageEventDefinition"))}function d(e){var t=H(e);if(W(t,"bpmn:Participant"))return null;for(;t;)if(t=t.$parent,W(t,"bpmn:FlowElementsContainer"))return t;return t}function f(e,t){var n=d(e),i=d(t);return n&&n===i}function m(e,t){var n=H(e);return!!j(n.eventDefinitions||[],function(e){return W(e,t)})}function v(e,t){var n=H(e);return(n.eventDefinitions||[]).every(function(e){return W(e,t)})}function y(e){return W(e,"bpmn:FlowNode")&&!W(e,"bpmn:EndEvent")&&!Y(e)&&!(W(e,"bpmn:IntermediateThrowEvent")&&m(e,"bpmn:LinkEventDefinition"))&&!c(e)&&!p(e)}function g(e){return W(e,"bpmn:FlowNode")&&!W(e,"bpmn:StartEvent")&&!W(e,"bpmn:BoundaryEvent")&&!Y(e)&&!(W(e,"bpmn:IntermediateCatchEvent")&&m(e,"bpmn:LinkEventDefinition"))&&!p(e)}function x(e){return W(e,"bpmn:ReceiveTask")||W(e,"bpmn:IntermediateCatchEvent")&&(m(e,"bpmn:MessageEventDefinition")||m(e,"bpmn:TimerEventDefinition")||m(e,"bpmn:ConditionalEventDefinition")||m(e,"bpmn:SignalEventDefinition"))}function b(e){return e.labelTarget}function E(e){return e.waypoints}function w(e,t){var n=$(t);return-1!==n.indexOf(e)}function _(e,t,n){if(r(e)||r(t))return null;if(o(e,t))return!1;if(!W(n,"bpmn:DataAssociation")){if(B(e,t))return{type:"bpmn:MessageFlow"};if(O(e,t))return{type:"bpmn:SequenceFlow"}}var i=I(e,t);return i?i:c(e)&&p(t)?{type:"bpmn:Association",associationDirection:"One"}:W(n,"bpmn:Association")&&k(e,t)?{type:"bpmn:Association"}:s(e)||s(t)?{type:"bpmn:Association"}:!1}function S(e,t,n){return b(e)&&!E(t)?!0:W(t,"bpmn:Participant")&&!q(t)?!1:W(e,"bpmn:Participant")?W(t,"bpmn:Process")||W(t,"bpmn:Collaboration"):W(e,"bpmn:Lane")?W(t,"bpmn:Participant")||W(t,"bpmn:Lane"):W(e,"bpmn:BoundaryEvent")?!1:W(e,"bpmn:FlowElement")||W(e,"bpmn:DataAssociation")?W(t,"bpmn:FlowElementsContainer")?q(t):U(t,["bpmn:Participant","bpmn:Lane"]):W(e,"bpmn:Artifact")?U(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):W(e,"bpmn:MessageFlow")?W(t,"bpmn:Collaboration"):!1}function T(e){return!b(e)&&W(e,"bpmn:BoundaryEvent")}function A(e){return W(e,"bpmn:Lane")}function C(e){return T(e)||W(e,"bpmn:IntermediateThrowEvent")&&!e.parent}function R(e,t,n,i){if(Array.isArray(e)||(e=[e]),n)return!1;if(1!==e.length)return!1;var r=e[0];return b(r)?!1:C(r)?t?Y(t)?!1:!W(t,"bpmn:Activity")||p(t)?!1:i&&!Z(i,t)?!1:"attach":!0:!1}function N(e,t,n){if(!t)return!1;var i={replacements:[]};return G(e,function(e){Y(t)||W(e,"bpmn:StartEvent")&&!X(e)&&"label"!==e.type&&S(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),W(t,"bpmn:Transaction")||m(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(W(e,"bpmn:EndEvent")&&S(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),W(e,"bpmn:BoundaryEvent")&&R(e,t,null,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))}),i.replacements.length?i:!1}function P(e,t){return F(e,T)?!1:F(e,A)?!1:t?e.every(function(e){return S(e,t)}):!0}function M(e,t,n,i){return t?b(t)?null:o(n,t)?!1:n&&w(n,t)?!1:S(e,t,i)||L(e,t,i):!1}function D(e,t){return W(e,"bpmn:SubProcess")?!!q(e)&&(!t||t.width>=100&&t.height>=80):W(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:W(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!s(e)}function k(e,t){return E(e)||E(t)?!1:!w(t,e)&&!w(e,t)}function B(e,t){return l(e)&&h(t)&&!u(e,t)}function O(e,t){return y(e)&&g(t)&&f(e,t)&&!(W(e,"bpmn:EventBasedGateway")&&!x(t))}function I(e,t){return U(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&U(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:U(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&U(e,["bpmn:Activity","bpmn:CatchEvent"])?{type:"bpmn:DataOutputAssociation"}:!1}function L(e,t,n){return U(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&W(e,"bpmn:FlowNode")&&!W(e,"bpmn:BoundaryEvent")&&S(e,t.parent,n)}var j=e(254),F=e(251),z=e(253),G=e(255),V=e(243),$=e(45).getParents,W=e(70).is,U=e(45).isAny,H=e(70).getBusinessObject,q=e(68).isExpanded,Y=e(68).isEventSubProcess,X=e(68).isInterrupting,K=e(183),Z=e(61).getBoundaryAttachment;V(i,K),i.$inject=["eventBus"],t.exports=i,i.prototype.init=function(){this.addRule("connection.create",function(e){var t=e.source,n=e.target;return _(t,n)}),this.addRule("connection.reconnectStart",function(e){var t=e.connection,n=e.hover||e.source,i=t.target;return _(n,i,t)}),this.addRule("connection.reconnectEnd",function(e){var t=e.connection,n=t.source,i=e.hover||e.target;return _(n,i,t)}),this.addRule("connection.updateWaypoints",function(e){return null}),this.addRule("shape.resize",function(e){var t=e.shape,n=e.newBounds;return D(t,n)}),this.addRule("elements.move",function(e){var t=e.target,n=e.shapes,i=e.position;return R(n,t,null,i)||N(n,t,i)||P(n,t,i)}),this.addRule(["shape.create","shape.append"],function(e){var t=e.target,n=e.shape,i=e.source,r=e.position;return R([n],t,i,r)||M(n,t,i,r)}),this.addRule(["elements.delete"],function(e){return z(e.elements,function(e){return!b(e)})})},i.prototype.canConnectMessageFlow=B,i.prototype.canConnectSequenceFlow=O,i.prototype.canConnectDataAssociation=I,i.prototype.canConnectAssociation=k,i.prototype.canMove=P,i.prototype.canAttach=R,i.prototype.canReplace=N,i.prototype.canDrop=S,i.prototype.canInsert=L,i.prototype.canCreate=M,i.prototype.canConnect=_,i.prototype.canResize=D},{183:183,243:243,251:251,253:253,254:254,255:255,45:45,61:61,68:68,70:70}],59:[function(e,t,n){t.exports={__depends__:[e(185)],__init__:["bpmnRules"],bpmnRules:["type",e(58)]}},{185:185,58:58}],60:[function(e,t,n){"use strict";function i(t,n,i,s){function c(e,t,n){return"attach"===i.canAttach([e],t,null,n)}d.call(this,t,n),t.on("create.start",function(e){var t=e.context,i=t.shape,o=n.getRootElement();u(i,"bpmn:Participant")&&u(o,"bpmn:Process")&&r(t,i,o.children)}),t.on(["create.move","create.end"],1500,function(e){var t=e.context,n=t.shape,i=t.participantSnapBox;!b(e)&&i&&o(i,n,e)}),t.on("shape.move.start",function(e){var t=e.context,i=t.shape,o=n.getRootElement();u(i,"bpmn:Participant")&&u(o,"bpmn:Process")&&r(t,i,o.children)}),t.on(["create.move","create.end","shape.move.move","shape.move.end"],1500,function(e){var t=e.context,n=t.target,i=t.shape;n&&!b(e)&&c(i,n,e)&&a(e,i,n)}),t.on(["shape.move.hover","shape.move.move","shape.move.end","create.hover","create.move","create.end"],1500,function(e){var t=e.context,n=t.shape,i=e.hover;u(i,"bpmn:Lane")&&!l(n,["bpmn:Lane","bpmn:Participant"])&&(e.hover=S(i),e.hoverGfx=s.getGraphics(e.hover))});var p=Math.abs,f=e(253),v=e(377);t.on(["create.move","shape.move.move"],function(e){var t=e.context,n=t.shape,i=t.target,r=30;if(u(n,"bpmn:Lane")&&l(i,["bpmn:Lane","bpmn:Participant"])){var o,a=f(i.children,function(e){return u(e,"bpmn:Lane")}),s=e.y,c=a.reduce(function(e,t){var n=m(t);return p(n.top-s)s&&(e=p(n.top-s)>p(n.bottom-s)?v(e||{},{after:{element:t,y:n.bottom}}):v(e||{},{before:{element:t,y:n.top}})),e},!1);c||(o=m(i),c=p(o.top-s)=c.x?E(n,"x",c.x+i+r):s.x<=p.x&&E(n,"x",p.x-i-r),a.y>=c.y?E(n,"y",c.y+o):s.y<=p.y&&E(n,"y",p.y-o)}function a(e,t,n){var i=m(n),r=w(e,n);/top/.test(r)?E(e,"y",i.top):/bottom/.test(r)&&E(e,"y",i.bottom),/left/.test(r)?E(e,"x",i.left):/right/.test(r)&&E(e,"x",i.right)}var s=e(243),c=e(255),p=e(221).getBBox,u=e(70).is,l=e(45).isAny,h=e(68).isExpanded,d=e(192),f=e(191),m=e(208).asTRBL,v=Math.round,y=f.mid,g=f.topLeft,x=f.bottomRight,b=f.isSnapped,E=f.setSnapped,w=e(61).getBoundaryAttachment,_=e(61).getParticipantSizeConstraints,S=e(44).getLanesRoot;s(i,d),i.$inject=["eventBus","canvas","bpmnRules","elementRegistry"],t.exports=i,i.prototype.initSnap=function(e){var t,n,i,r,o,a=e.context,s=e.shape;o=d.prototype.initSnap.call(this,e),u(s,"bpmn:Participant")&&o.setSnapLocations(["top-left","bottom-right","mid"]),s&&(t=y(s,e),n={width:s.width,height:s.height,x:isNaN(s.x)?v(t.x-s.width/2):s.x,y:isNaN(s.y)?v(t.y-s.height/2):s.y},i=g(n),r=x(n),o.setSnapOrigin("top-left",{x:i.x-e.x,y:i.y-e.y}),o.setSnapOrigin("bottom-right",{x:r.x-e.x,y:r.y-e.y}),c(s.outgoing,function(t){var n=t.waypoints[0];n=n.original||n,o.setSnapOrigin(t.id+"-docking",{x:n.x-e.x,y:n.y-e.y})}),c(s.incoming,function(t){var n=t.waypoints[t.waypoints.length-1];n=n.original||n,o.setSnapOrigin(t.id+"-docking",{x:n.x-e.x,y:n.y-e.y})}));var p=a.source;p&&o.addDefaultSnap("mid",y(p))},i.prototype.addTargetSnaps=function(e,t,n){u(t,"bpmn:BoundaryEvent")&&"label"!==t.type&&(n=n.parent),u(n,"bpmn:SequenceFlow")&&this.addTargetSnaps(e,t,n.parent);var i=this.getSiblings(t,n)||[];c(i,function(t){u(t,"bpmn:Lane")||(e.add("mid",y(t)),u(t,"bpmn:Participant")&&(e.add("top-left",g(t)),e.add("bottom-right",x(t))))}),c(t.incoming,function(t){-1===i.indexOf(t.source)&&e.add("mid",y(t.source));var n=t.waypoints[0];e.add(t.id+"-docking",n.original||n)}),c(t.outgoing,function(t){-1===i.indexOf(t.target)&&e.add("mid",y(t.target));var n=t.waypoints[t.waypoints.length-1];e.add(t.id+"-docking",n.original||n)})}},{191:191,192:192,208:208,221:221,243:243,253:253,255:255,377:377,44:44,45:45,61:61,68:68,70:70}],61:[function(e,t,n){"use strict";function i(e,t){var n=c(e,t,-15);return"intersect"!==n?n:null}function r(e,t,n,i){var r=e[t];e[t]=void 0===r?n:i(n,r)}function o(e,t,n){return r(e,t,n,f)}function a(e,t,n){return r(e,t,n,m)}function s(e,t,n){var i=h(e),r=!0,s=!0,c=l(i,[i]),f=u(e),m={},w={};/e/.test(t)?w.right=f.left+y:/w/.test(t)&&(w.left=f.right-y),c.forEach(function(e){var i=u(e);/n/.test(t)&&(i.topf.bottom+10&&(s=!1),n&&d(f.bottom-i.top)<10&&o(m,"bottom",i.bottom-v),d(f.bottom-i.bottom)<5&&a(w,"bottom",i.top+v))});var _=i.children.filter(function(e){return!e.hidden&&!e.waypoints&&(p(e,"bpmn:FlowElement")||p(e,"bpmn:Artifact"))});return _.forEach(function(e){var n=u(e);r&&/n/.test(t)&&o(w,"top",n.top-b),/e/.test(t)&&a(w,"right",n.right+g),s&&/s/.test(t)&&a(w,"bottom",n.bottom+E),/w/.test(t)&&o(w,"left",n.left-x)}),{min:w,max:m}}var c=e(208).getOrientation;t.exports.getBoundaryAttachment=i;var p=e(70).is,u=e(208).asTRBL,l=e(44).collectLanes,h=e(44).getLanesRoot,d=Math.abs,f=Math.min,m=Math.max,v=60,y=300,g=20,x=50,b=20,E=20;t.exports.getParticipantSizeConstraints=s},{208:208,44:44,70:70}],62:[function(e,t,n){t.exports={__init__:["snapping"],snapping:["type",e(60)]}},{60:60}],63:[function(e,t,n){"use strict";function i(e,t){return s({id:e.id,type:e.$type,businessObject:e},t)}function r(e){return c(e,function(e){return{x:e.x,y:e.y}})}function o(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:f(n),referenced:f(t),property:i}))}function a(e,t,n,i,r){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=r}var s=e(377),c=e(258),p=e(69),u=e(70).is,l=p.hasExternalLabel,h=p.getExternalLabelBounds,d=e(68).isExpanded,f=e(66).elementToString;a.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate"],t.exports=a,a.prototype.add=function(e,t){var n,o=e.di,a=this._translate;if(u(o,"bpmndi:BPMNPlane"))n=this._elementFactory.createRoot(i(e)),this._canvas.setRootElement(n);else if(u(o,"bpmndi:BPMNShape")){var s=!d(e),c=t&&(t.hidden||t.collapsed),p=e.di.bounds;n=this._elementFactory.createShape(i(e,{collapsed:s,hidden:c,x:Math.round(p.x),y:Math.round(p.y),width:Math.round(p.width),height:Math.round(p.height)})),u(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,n),this._canvas.addShape(n,t)}else{if(!u(o,"bpmndi:BPMNEdge"))throw new Error(a("unknown di {di} for element {semantic}",{di:f(o),semantic:f(e)}));var h=this._getSource(e),m=this._getTarget(e);n=this._elementFactory.createConnection(i(e,{source:h,target:m,waypoints:r(e.di.waypoint)})),this._canvas.addConnection(n,t)}return l(e)&&this.addLabel(e,n),this._eventBus.fire("bpmnElement.added",{element:n}),n},a.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:f(e)}));var r=this._elementRegistry.get(i.id),a=r&&r.attachers;if(!r)throw o(n,e,i,"attachedToRef");t.host=r,a||(r.attachers=a=[]),-1===a.indexOf(t)&&a.push(t)},a.prototype.addLabel=function(e,t){var n=h(e,t),r=this._elementFactory.createLabel(i(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden||!e.name,x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)}));return this._canvas.addShape(r,t.parent)},a.prototype._getEnd=function(e,t){var n,i,r=e.$type,a=this._translate;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 i?o(a,e,i,t+"Ref"):new Error(a("{semantic}#{side} Ref not specified",{semantic:f(e),side:t}))},a.prototype._getSource=function(e){return this._getEnd(e,"source")},a.prototype._getTarget=function(e){return this._getEnd(e,"target")},a.prototype._getElement=function(e){return this._elementRegistry.get(e.id)}},{258:258,377:377,66:66,68:68,69:69,70:70}],64:[function(e,t,n){"use strict";function i(e,t){return e.$instanceOf(t)}function r(e){return s(e.rootElements,function(e){return i(e,"bpmn:Process")||i(e,"bpmn:Collaboration")})}function o(e,t){function n(e,t){return function(n){e(n,t)}}function o(e){W[e.id]=e}function s(e){return W[e.id]}function p(n,i){var r=n.gfx;if(r)throw new Error(t("already rendered {element}",{element:u(n)}));return e.element(n,i)}function h(t,n){return e.root(t,n)}function d(e,n){try{var i=e.di&&p(e,n);return o(e),i}catch(r){f(r.message,{element:e,error:r}),console.error(t("failed to import {element}",{element:u(e)})),console.error(r)}}function f(t,n){e.error(t,n)}function m(e){var n=e.bpmnElement;n?n.di?f(t("multiple DI elements defined for {element}",{element:u(n)}),{element:n}):(l.bind(n,"di"),n.di=e):f(t("no bpmnElement referenced in {element}",{element:u(e)}),{element:e})}function v(e){y(e.plane)}function y(e){m(e),c(e.planeElement,g)}function g(e){m(e)}function x(e,n){var o=e.diagrams;if(n&&-1===o.indexOf(n))throw new Error(t("diagram not part of bpmn:Definitions"));if(!n&&o&&o.length&&(n=o[0]),!n)throw new Error(t("no diagram to display"));v(n);var a=n.plane;if(!a)throw new Error(t("no plane for {element}",{element:u(n)}));var s=a.bpmnElement;if(!s){if(s=r(e),!s)throw new Error(t("no process or collaboration to display"));f(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:u(a),rootElement:u(s)})),a.bpmnElement=s,m(a)}var c=h(s,a);if(i(s,"bpmn:Process"))E(s,c);else{if(!i(s,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:u(a),rootElement:u(s)}));V(s,c),w(e.rootElements,c)}b(U)}function b(e){c(e,function(e){e()})}function E(e,t){F(e,t),P(e.ioSpecification,t),N(e.artifacts,t),o(e)}function w(e){var t=a(e,function(e){return!s(e)&&i(e,"bpmn:Process")&&e.laneSets});t.forEach(n(E))}function _(e,t){d(e,t)}function S(e,t){c(e,n(_,t))}function T(e,t){d(e,t)}function A(e,t){d(e,t)}function C(e,t){d(e,t)}function R(e,t){d(e,t)}function N(e,t){c(e,function(e){i(e,"bpmn:Association")?U.push(function(){R(e,t)}):R(e,t)})}function P(e,t){e&&(c(e.dataInputs,n(A,t)),c(e.dataOutputs,n(C,t)))}function M(e,t){F(e,t),N(e.artifacts,t)}function D(e,t){var r=d(e,t);i(e,"bpmn:SubProcess")&&M(e,r||t),i(e,"bpmn:Activity")&&P(e.ioSpecification,t),U.push(function(){c(e.dataInputAssociations,n(T,t)),c(e.dataOutputAssociations,n(T,t))})}function k(e,t){d(e,t)}function B(e,t){d(e,t)}function O(e,t){d(e,t)}function I(e,t){var n=d(e,t);e.childLaneSet&&L(e.childLaneSet,n||t),$(e)}function L(e,t){c(e.lanes,n(I,t))}function j(e,t){c(e,n(L,t))}function F(e,t){e.laneSets&&j(e.laneSets,t),z(e.flowElements,t)}function z(e,n){c(e,function(e){i(e,"bpmn:SequenceFlow")?U.push(function(){k(e,n)}):i(e,"bpmn:BoundaryEvent")?U.unshift(function(){O(e,n)}):i(e,"bpmn:FlowNode")?D(e,n):i(e,"bpmn:DataObject")||(i(e,"bpmn:DataStoreReference")?B(e,n):i(e,"bpmn:DataObjectReference")?B(e,n):f(t("unrecognized flowElement {element} in context {context}",{element:u(e),context:n?u(n.businessObject):"null"}),{element:e,context:n}))})}function G(e,t){var n=d(e,t),i=e.processRef;i&&E(i,n||t)}function V(e){c(e.participants,n(G)),N(e.artifacts),U.push(function(){S(e.messageFlows)})}function $(e){c(e.flowNodeRef,function(t){var n=t.get("lanes");n&&n.push(e)})}var W={},U=[];return{handleDefinitions:x}}var a=e(253),s=e(254),c=e(255),p=e(407),u=e(66).elementToString,l=new p({name:"bpmnElement",enumerable:!0},{name:"di"});t.exports=o},{253:253,254:254,255:255,407:407,66:66}],65:[function(e,t,n){"use strict";function i(e,t,n){function i(e){var t={root:function(e){return a.add(e)},element:function(e,t){return a.add(e,t)},error:function(e,t){p.push({message:e,context:t})}},n=new r(t,c);n.handleDefinitions(e)}var o,a=e.get("bpmnImporter"),s=e.get("eventBus"),c=e.get("translate"),p=[];s.fire("import.render.start",{definitions:t});try{i(t)}catch(u){o=u}s.fire("import.render.complete",{error:o,warnings:p}),n(o,p)}var r=e(64);t.exports.importBpmnDiagram=i},{64:64}],66:[function(e,t,n){"use strict";t.exports.elementToString=function(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':""}},{}],67:[function(e,t,n){t.exports={__depends__:[e(204)],bpmnImporter:["type",e(63)]}},{204:204,63:63}],68:[function(e,t,n){"use strict";var i=e(70).is,r=e(70).getBusinessObject;t.exports.isExpanded=function(e){return i(e,"bpmn:CallActivity")?!1:i(e,"bpmn:SubProcess")?!!r(e).di.isExpanded:i(e,"bpmn:Participant")?!!r(e).processRef:!0},t.exports.isInterrupting=function(e){return e&&r(e).isInterrupting!==!1},t.exports.isEventSubProcess=function(e){return e&&!!r(e).triggeredByEvent}},{70:70}],69:[function(e,t,n){"use strict";function i(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}}function r(e){return e.waypoints?i(e.waypoints):{x:e.x+e.width/2,y:e.y+e.height+s.height/2}}var o=e(377),a=e(70).is,s=t.exports.DEFAULT_LABEL_SIZE={width:90,height:20};t.exports.hasExternalLabel=function(e){return a(e,"bpmn:Event")||a(e,"bpmn:Gateway")||a(e,"bpmn:DataStoreReference")||a(e,"bpmn:DataObjectReference")||a(e,"bpmn:SequenceFlow")||a(e,"bpmn:MessageFlow")},t.exports.getWaypointsMid=i,t.exports.getExternalLabelMid=r,t.exports.getExternalLabelBounds=function(e,t){var n,i,a,c=e.di,p=c.label;return p&&p.bounds?(a=p.bounds,i={width:Math.max(s.width,a.width),height:a.height},n={x:a.x+a.width/2,
y:a.y+a.height/2}):(n=r(t),i=s),o({x:n.x-i.width/2,y:n.y-i.height/2},i)}},{377:377,70:70}],70:[function(e,t,n){"use strict";function i(e,t){var n=r(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function r(e){return e&&e.businessObject||e}t.exports.is=i,t.exports.getBusinessObject=r},{}],71:[function(e,t,n){"use strict";function i(e){return e.join(";")}function r(){o||(o=a(h),s.bind(o,".backdrop","click",function(e){document.body.removeChild(o)})),document.body.appendChild(o)}var o,a=e(394),s=e(393),c=t.exports.BPMNIO_LOGO="iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC",p=i(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"]),u=i(["width: 100%","height: 100%","background: rgba(0,0,0,0.2)"]),l=i(["position: absolute","left: 50%","top: 40%","margin: 0 -130px","width: 260px","padding: 10px","background: white","border: solid 1px #AAA","border-radius: 3px","font-family: Helvetica, Arial, sans-serif","font-size: 14px","line-height: 1.2em"]),h='
Web-based tooling for BPMN, DMN and CMMN diagrams powered by
bpmn.io .
';t.exports.open=r},{393:393,394:394}],72:[function(e,t,n){t.exports=e(74)},{74:74}],73:[function(e,t,n){"use strict";function i(e,t){s.call(this,e,t)}var r=e(374),o=e(369),a=e(377),s=e(80),c=e(76),p=e(77);i.prototype=Object.create(s.prototype),t.exports=i,i.prototype.fromXML=function(e,t,n,i){r(t)||(i=n,n=t,t="bpmn:Definitions"),o(n)&&(i=n,n={});var s=new c(a({model:this,lax:!0},n)),p=s.handler(t);s.fromXML(e,p,i)},i.prototype.toXML=function(e,t,n){o(t)&&(n=t,t={});var i=new p(t);try{var r=i.toXML(e);n(null,r)}catch(a){n(a)}}},{369:369,374:374,377:377,76:76,77:77,80:80}],74:[function(e,t,n){"use strict";var i=e(377),r=e(73),o={bpmn:e(89),bpmndi:e(90),dc:e(91),di:e(92)};t.exports=function(e,t){return new r(i({},o,e),t)}},{377:377,73:73,89:89,90:90,91:91,92:92}],75:[function(e,t,n){"use strict";function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e){return e.charAt(0).toLowerCase()+e.slice(1)}function o(e){return e.xml&&"lowerCase"===e.xml.tagAlias}function a(e){return e.xml&&e.xml.serialize}t.exports.aliasToName=function(e,t){return o(t)?i(e):e},t.exports.nameToAlias=function(e,t){return o(t)?r(e):e},t.exports.DEFAULT_NS_MAP={xsi:"http://www.w3.org/2001/XMLSchema-instance"};var s=t.exports.XSI_TYPE="xsi:type";t.exports.serializeAsType=function(e){return a(e)===s},t.exports.serializeAsProperty=function(e){return"property"===a(e)}},{}],76:[function(e,t,n){"use strict";function i(e){var t=e.attributes;return g(t,function(e,t,n){var i,r;return t.local?(r=A(t.name,t.prefix),i=r.name):i=t.prefix,e[i]=t.value,e},{})}function r(e,t,n){var i,r=A(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 o(e,t,n){var i,a;if(i=e.uri||n){var s=t.getPackage(i);a=s?s.prefix:e.prefix,e.prefix=a,e.uri=i}x(e.attributes,function(n){n.uri===D&&"type"===n.local&&r(e,n,t),o(n,t,null)})}function a(e){return new Error(e)}function s(e){return e.$descriptor}function c(e){E(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw a("expected element");var t,n=s(e),i=n.idProperty;i&&(t=e.get(i.name),t&&(this.elementsById[t]=e))},this.addWarning=function(e){this.warnings.push(e)}}function p(){}function u(){}function l(){}function h(e,t){this.property=e,this.context=t}function d(e,t){this.element=t,this.propertyDesc=e}function f(){}function m(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function v(e,t,n){this.model=e,this.context=n}function y(e){e instanceof T&&(e={model:e}),E(this,{lax:!1},e)}var g=e(259),x=e(255),b=e(254),E=e(377),w=e(266),_=e(79),S=e(78).parser,T=e(80),A=e(85).parseName,C=e(88),R=C.coerceType,N=C.isSimple,P=e(75),M=P.XSI_TYPE,D=P.DEFAULT_NS_MAP.xsi,k=P.serializeAsType,B=P.aliasToName;p.prototype.handleEnd=function(){},p.prototype.handleText=function(){},p.prototype.handleNode=function(){},u.prototype=new p,u.prototype.handleNode=function(){return this},l.prototype=new p,l.prototype.handleText=function(e){this.body=(this.body||"")+e},h.prototype=new l,h.prototype.handleNode=function(e){if(this.element)throw a("expected no sub nodes");return this.element=this.createReference(e),this},h.prototype.handleEnd=function(){this.element.id=this.body},h.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},d.prototype=new l,d.prototype.handleEnd=function(){var e=this.body,t=this.element,n=this.propertyDesc;e=R(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},f.prototype=Object.create(l.prototype),f.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},m.prototype=new f,m.prototype.addReference=function(e){this.context.addReference(e)},m.prototype.handleEnd=function(){var e=this.body,t=this.element,n=s(t),i=n.bodyProperty;i&&void 0!==e&&(e=R(i.type,e),t.set(i.name,e))},m.prototype.createElement=function(e){var t=i(e),n=this.type,r=s(n),o=this.context,a=new n({});return x(t,function(e,t){var n,i=r.propertiesByName[t];i&&i.isReference?i.isMany?(n=e.split(" "),x(n,function(e){o.addReference({element:a,property:i.ns.name,id:e})})):o.addReference({element:a,property:i.ns.name,id:e}):(i&&(e=R(i.type,e)),a.set(t,e))}),a},m.prototype.getPropertyForNode=function(e){var t,n,i,r=A(e.local,e.prefix),o=this.type,c=this.model,p=s(o),u=r.name,l=p.propertiesByName[u];if(l)return k(l)&&(i=e.attributes[M])?(t=i.value,n=c.getType(t),E({},l,{effectiveType:s(n).name})):l;var h=c.getPackage(r.prefix);if(h){if(t=r.prefix+":"+B(r.localName,p.$pkg),n=c.getType(t),l=b(p.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return E({},l,{effectiveType:s(n).name})}else if(l=b(p.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return l;throw a("unrecognized element <"+r.name+">")},m.prototype.toString=function(){return"ElementDescriptor["+s(this.type).name+"]"},m.prototype.valueHandler=function(e,t){return new d(e,t)},m.prototype.referenceHandler=function(e){return new h(e,this.context)},m.prototype.handler=function(e){return"Element"===e?new v(this.model,e,this.context):new m(this.model,e,this.context)},m.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,N(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?(E(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},v.prototype=Object.create(f.prototype),v.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)},v.prototype.handleChild=function(e){var t,n=new v(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},v.prototype.handleText=function(e){this.body=this.body||""+e},v.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},y.prototype.fromXML=function(e,t,n){function i(){var e,t,n=v.elementsById,i=v.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=s(r).propertiesByName[t.property];if(o||v.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var c=r.get(a.name),p=c.indexOf(t);-1===p&&(p=c.length),o?c[p]=o:c.splice(p,1)}else r.set(a.name,o)}}function r(e){g.pop().handleEnd()}function p(e){var t=g.peek();o(e,d);try{g.push(t.handleNode(e))}catch(n){var i=this.line,r=this.column,s="unparsable content <"+e.name+"> detected\n line: "+i+"\n column: "+r+"\n nested error: "+n.message;if(!f)throw console.error("could not parse document"),console.error(n),a(s);v.addWarning({message:s,error:n}),console.warn("could not parse node"),console.warn(n),g.push(new u)}}function l(e){g.peek().handleText(e)}var h=t.rootHandler;t instanceof m?(h=t,t={}):"string"==typeof t?(h=this.handler(t),t={}):"string"==typeof h&&(h=this.handler(h));var d=this.model,f=this.lax,v=new c(E({},t,{rootHandler:h})),y=new S(!0,{xmlns:!0,trim:!0}),g=new _;h.context=v,g.push(h),y.onopentag=p,y.oncdata=y.ontext=l,y.onclosetag=r,y.onend=i,w(function(){var t;try{y.write(e).close()}catch(i){t=i}n(t,t?void 0:h.element,v)})},y.prototype.handler=function(e){return new m(this.model,e)},t.exports=y,t.exports.ElementHandler=m},{254:254,255:255,259:259,266:266,377:377,75:75,78:78,79:79,80:80,85:85,88:88}],77:[function(e,t,n){"use strict";function i(e){return E(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function r(e){function t(t){return e.used[t.uri]}function n(e){var t="xmlns"+(e.prefix?":"+e.prefix:"");return{name:t,value:e.uri}}var i=[].concat(e.wellknown,e.custom);return x(w(i,t),n)}function o(e,t){return t.isGeneric?t.name:_({localName:C(t.ns.localName,t.$pkg)},e)}function a(e,t){return _({localName:t.ns.localName},e)}function s(e){var t=e.$descriptor;return w(t.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i===t["default"]?!1:t.isMany?i.length:!0})}function c(e){return e=E(e)?e:""+e,e.replace(M,function(e){return""+B[e]+";"})}function p(e){return w(e,function(e){return e.isAttr})}function u(e){return w(e,function(e){return!e.isAttr})}function l(e,t){this.ns=t}function h(){}function d(e){this.ns=e}function f(e,t){this.body=[],this.attrs=[],this.parent=e,this.ns=t}function m(e,t){f.call(this,e,t)}function v(){this.value="",this.write=function(e){this.value+=e}}function y(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 g(e){function t(t,n){var i=n||new v,r=new y(i,e.format);return e.preamble&&r.append(P),(new f).build(t).serializeTo(r),n?void 0:i.value}return e=_({format:!1,preamble:!0},e||{}),{toXML:t}}var x=e(258),b=e(255),E=e(374),w=e(253),_=e(377),S=e(88),T=e(85).parseName,A=e(75),C=A.nameToAlias,R=A.serializeAsType,N=A.serializeAsProperty,P='\n',M=/(<|>|'|"|&|\n\r|\n)/g,D=A.DEFAULT_NS_MAP,k=A.XSI_TYPE,B={"\n":"10","\n\r":"10",'"':"34","'":"39","<":"60",">":"62","&":"38"};l.prototype.build=function(e){return this.element=e,this},l.prototype.serializeTo=function(e){e.appendIndent().append("<"+i(this.ns)+">"+this.element.id+""+i(this.ns)+">").appendNewLine()},h.prototype.serializeValue=h.prototype.serializeTo=function(e){var t=this.escape;t&&e.append("")},h.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(M)&&(this.escape=!0),this},d.prototype=new h,d.prototype.serializeTo=function(e){e.appendIndent().append("<"+i(this.ns)+">"),this.serializeValue(e),e.append(""+i(this.ns)+">").appendNewLine()},f.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=s(e);this.parseAttributes(p(n)),this.parseContainments(u(n)),this.parseGenericAttributes(e,t)}return this},f.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return o(t,e)},f.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return a(t,e)},f.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},f.prototype.nsAttributeName=function(e){var t;if(t=E(e)?T(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.isLocalNs(n)?{localName:t.localName}:_({localName:t.localName},n)},f.prototype.parseGeneric=function(e){var t=this,n=this.body,i=this.attrs;b(e,function(e,r){"$body"===r?n.push((new h).build({type:"String"},e)):"$children"===r?b(e,function(e){n.push(new f(t).build(e))}):0!==r.indexOf("$")&&i.push({name:r,value:c(e)})})},f.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=e.$model,r=[];return b(n,function(e,n){var o,a=T(n);"xmlns"===a.prefix&&(o={prefix:a.localName,uri:e}),a.prefix||"xmlns"!==a.localName||(o={uri:e}),o?i.getPackage(e)?t.logNamespace(o,!0):t.logNamespaceUsed(o):r.push({name:n,value:e})}),r},f.prototype.parseGenericAttributes=function(e,t){var n=this;b(t,function(t){if(t.name!==k)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(i){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,i)}})},f.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;b(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 h).build(e,r[0]));else if(S.isSimple(e.type))b(r,function(t){n.push(new d(s).build(e,t))});else if(o)b(r,function(e){n.push(new l(t,s).build(e))});else{var c=R(e),p=N(e);b(r,function(e){var i;i=c?new m(t,s):p?new f(t,s):new f(t),n.push(i.build(e))})}})},f.prototype.getNamespaces=function(){var e=this.namespaces,t=this.parent;return e||(e=this.namespaces=t?t.getNamespaces():{prefixMap:{},uriMap:{},used:{},wellknown:[],custom:[]}),e},f.prototype.logNamespace=function(e,t){var n=this.getNamespaces(),i=e.uri,r=n.uriMap[i];return r||(n.uriMap[i]=e,t?n.wellknown.push(e):n.custom.push(e)),n.prefixMap[e.prefix]=i,e},f.prototype.logNamespaceUsed=function(e){var t=this.element,n=t.$model,i=this.getNamespaces(),r=e.prefix,o=D[r]||n&&(n.getPackage(r)||{}).uri,a=e.uri||i.prefixMap[r]||o;if(!a)throw new Error("no namespace uri given for prefix <"+e.prefix+">");return e=i.uriMap[a],e||(e=this.logNamespace({prefix:r,uri:a},o)),i.used[e.uri]||(i.used[e.uri]=e),e},f.prototype.parseAttributes=function(e){var t=this,n=this.element;b(e,function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];b(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},f.prototype.addAttribute=function(e,t){var n=this.attrs;E(t)&&(t=c(t)),n.push({name:e,value:t})},f.prototype.serializeAttributes=function(e){var t=this.attrs,n=!this.parent;n&&(t=r(this.namespaces).concat(t)),b(t,function(t){e.append(" ").append(i(t.name)).append('="').append(t.value).append('"')})},f.prototype.serializeTo=function(e){var t=this.body.length,n=!(1===this.body.length&&this.body[0]instanceof h);e.appendIndent().append("<"+i(this.ns)),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),b(this.body,function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append(""+i(this.ns)+">")),e.appendNewLine()},m.prototype=new f,m.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(k),(n.prefix?n.prefix+":":"")+r+t.ns.localName),f.prototype.build.call(this,e)},m.prototype.isLocalNs=function(e){return e.uri===this.typeNs.uri},t.exports=g},{253:253,255:255,258:258,374:374,377:377,75:75,85:85,88:88}],78:[function(e,t,n){(function(t){!function(n){function i(e,t){if(!(this instanceof i))return new i(e,t);var r=this;o(r),r.q=r.c="",r.bufferCheckPosition=n.MAX_BUFFER_LENGTH,r.opt=t||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=W.BEGIN,r.ENTITIES=Object.create(n.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(G)),r.trackPosition=r.opt.position!==!1,r.trackPosition&&(r.position=r.line=r.column=0),d(r,"onready")}function r(e){for(var t=Math.max(n.MAX_BUFFER_LENGTH,10),i=0,r=0,o=C.length;o>r;r++){var a=e[C[r]].length;if(a>t)switch(C[r]){case"textNode":m(e);break;case"cdata":f(e,"oncdata",e.cdata),e.cdata="";break;case"script":f(e,"onscript",e.script),e.script="";break;default:y(e,"Max buffer length exceeded: "+C[r])}i=Math.max(i,a)}e.bufferCheckPosition=n.MAX_BUFFER_LENGTH-i+e.position}function o(e){for(var t=0,n=C.length;n>t;t++)e[C[t]]=""}function a(e){m(e),""!==e.cdata&&(f(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(f(e,"onscript",e.script),e.script="")}function s(e,t){return new c(e,t)}function c(e,t){if(!(this instanceof c))return new c(e,t);R.apply(this),this._parser=new i(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,P.forEach(function(e){Object.defineProperty(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){return t?void n.on(e,t):(n.removeAllListeners(e),n._parser["on"+e]=t)},enumerable:!0,configurable:!1})})}function p(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function u(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){return u(e)?!!t.match(e):e[t]}function h(e,t){return!l(e,t)}function d(e,t,n){e[t]&&e[t](n)}function f(e,t,n){e.textNode&&m(e),d(e,t,n)}function m(e){e.textNode=v(e.opt,e.textNode),e.textNode&&d(e,"ontext",e.textNode),e.textNode=""}function v(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function y(e,t){return m(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,d(e,"onerror",t),e}function g(e){return e.closedRoot||x(e,"Unclosed root tag"),e.state!==W.BEGIN&&e.state!==W.TEXT&&y(e,"Unexpected end"),m(e),e.c="",e.closed=!0,d(e,"onend"),i.call(e,e.strict,e.opt),e}function x(e,t){if("object"!=typeof e||!(e instanceof i))throw new Error("bad call to strictFail");e.strict&&y(e,t)}function b(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0}function E(e,t){var n=e.indexOf(":"),i=0>n?["",e]:e.split(":"),r=i[0],o=i[1];return t&&"xmlns"===e&&(r="xmlns",o=""),{prefix:r,local:o}}function w(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))return e.attribName=e.attribValue="";if(e.opt.xmlns){var t=E(e.attribName,!0),n=t.prefix,i=t.local;if("xmlns"===n)if("xml"===i&&e.attribValue!==F)x(e,"xml: prefix must be bound to "+F+"\nActual: "+e.attribValue);else if("xmlns"===i&&e.attribValue!==z)x(e,"xmlns: prefix must be bound to "+z+"\nActual: "+e.attribValue);else{var r=e.tag,o=e.tags[e.tags.length-1]||e;r.ns===o.ns&&(r.ns=Object.create(o.ns)),r.ns[i]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,f(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}function _(e,t){if(e.opt.xmlns){var n=e.tag,i=E(e.tagName);n.prefix=i.prefix,n.local=i.local,n.uri=n.ns[i.prefix]||"",n.prefix&&!n.uri&&(x(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=i.prefix);var r=e.tags[e.tags.length-1]||e;n.ns&&r.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){f(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var o=0,a=e.attribList.length;a>o;o++){var s=e.attribList[o],c=s[0],p=s[1],u=E(c,!0),l=u.prefix,h=u.local,d=""==l?"":n.ns[l]||"",m={name:c,value:p,prefix:l,local:h,uri:d};l&&"xmlns"!=l&&!d&&(x(e,"Unbound namespace prefix: "+JSON.stringify(l)),m.uri=l),e.tag.attributes[c]=m,f(e,"onattribute",m)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),f(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=W.TEXT:e.state=W.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function S(e){if(!e.tagName)return x(e,"Weird empty close tag."),e.textNode+=">",void(e.state=W.TEXT);if(e.script){if("script"!==e.tagName)return e.script+=""+e.tagName+">",e.tagName="",void(e.state=W.SCRIPT);f(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var i=n;t--;){var r=e.tags[t];if(r.name===i)break;x(e,"Unexpected close tag")}if(0>t)return x(e,"Unmatched closing tag: "+e.tagName),e.textNode+=""+e.tagName+">",void(e.state=W.TEXT);e.tagName=n;for(var o=e.tags.length;o-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,f(e,"onclosetag",e.tagName);var s={};for(var c in a.ns)s[c]=a.ns[c];var p=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==p.ns&&Object.keys(a.ns).forEach(function(t){var n=a.ns[t];f(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=W.TEXT}function T(e){var t,n=e.entity,i=n.toLowerCase(),r="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[i]?e.ENTITIES[i]:(n=i,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),r=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),r=t.toString(10))),n=n.replace(/^0+/,""),r.toLowerCase()!==n?(x(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function A(e){var t=this;if(this.error)throw this.error;if(t.closed)return y(t,"Cannot write after close. Assign an onready handler.");if(null===e)return g(t);for(var n=0,i="";t.c=i=e.charAt(n++);)switch(t.trackPosition&&(t.position++,"\n"===i?(t.line++,t.column=0):t.column++),t.state){case W.BEGIN:"<"===i?(t.state=W.OPEN_WAKA,t.startTagPosition=t.position):h(M,i)&&(x(t,"Non-whitespace before first tag."),t.textNode=i,t.state=W.TEXT);continue;case W.TEXT:if(t.sawRoot&&!t.closedRoot){for(var o=n-1;i&&"<"!==i&&"&"!==i;)i=e.charAt(n++),i&&t.trackPosition&&(t.position++,"\n"===i?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(o,n-1)}"<"===i?(t.state=W.OPEN_WAKA,t.startTagPosition=t.position):(!h(M,i)||t.sawRoot&&!t.closedRoot||x(t,"Text data outside of root node."),"&"===i?t.state=W.TEXT_ENTITY:t.textNode+=i);continue;case W.SCRIPT:"<"===i?t.state=W.SCRIPT_ENDING:t.script+=i;continue;case W.SCRIPT_ENDING:"/"===i?t.state=W.CLOSE_TAG:(t.script+="<"+i,t.state=W.SCRIPT);continue;case W.OPEN_WAKA:if("!"===i)t.state=W.SGML_DECL,t.sgmlDecl="";else if(l(M,i));else if(l(V,i))t.state=W.OPEN_TAG,t.tagName=i;else if("/"===i)t.state=W.CLOSE_TAG,t.tagName="";else if("?"===i)t.state=W.PROC_INST,t.procInstName=t.procInstBody="";else{if(x(t,"Unencoded <"),t.startTagPosition+1"===i?(f(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=W.TEXT):l(B,i)?(t.state=W.SGML_DECL_QUOTED,t.sgmlDecl+=i):t.sgmlDecl+=i;continue;case W.SGML_DECL_QUOTED:i===t.q&&(t.state=W.SGML_DECL,t.q=""),t.sgmlDecl+=i;continue;case W.DOCTYPE:">"===i?(t.state=W.TEXT,f(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=i,"["===i?t.state=W.DOCTYPE_DTD:l(B,i)&&(t.state=W.DOCTYPE_QUOTED,t.q=i));continue;case W.DOCTYPE_QUOTED:t.doctype+=i,i===t.q&&(t.q="",t.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:t.doctype+=i,"]"===i?t.state=W.DOCTYPE:l(B,i)&&(t.state=W.DOCTYPE_DTD_QUOTED,t.q=i);continue;case W.DOCTYPE_DTD_QUOTED:t.doctype+=i,i===t.q&&(t.state=W.DOCTYPE_DTD,t.q="");continue;case W.COMMENT:"-"===i?t.state=W.COMMENT_ENDING:t.comment+=i;continue;case W.COMMENT_ENDING:"-"===i?(t.state=W.COMMENT_ENDED,t.comment=v(t.opt,t.comment),t.comment&&f(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+i,t.state=W.COMMENT);continue;case W.COMMENT_ENDED:">"!==i?(x(t,"Malformed comment"),t.comment+="--"+i,t.state=W.COMMENT):t.state=W.TEXT;continue;case W.CDATA:"]"===i?t.state=W.CDATA_ENDING:t.cdata+=i;continue;case W.CDATA_ENDING:"]"===i?t.state=W.CDATA_ENDING_2:(t.cdata+="]"+i,t.state=W.CDATA);continue;case W.CDATA_ENDING_2:">"===i?(t.cdata&&f(t,"oncdata",t.cdata),f(t,"onclosecdata"),t.cdata="",t.state=W.TEXT):"]"===i?t.cdata+="]":(t.cdata+="]]"+i,t.state=W.CDATA);continue;case W.PROC_INST:"?"===i?t.state=W.PROC_INST_ENDING:l(M,i)?t.state=W.PROC_INST_BODY:t.procInstName+=i;continue;case W.PROC_INST_BODY:if(!t.procInstBody&&l(M,i))continue;"?"===i?t.state=W.PROC_INST_ENDING:t.procInstBody+=i;continue;case W.PROC_INST_ENDING:">"===i?(f(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=W.TEXT):(t.procInstBody+="?"+i,t.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:l($,i)?t.tagName+=i:(b(t),">"===i?_(t):"/"===i?t.state=W.OPEN_TAG_SLASH:(h(M,i)&&x(t,"Invalid character in tag name"),t.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:">"===i?(_(t,!0),S(t)):(x(t,"Forward-slash in opening tag not followed by >"),t.state=W.ATTRIB);continue;case W.ATTRIB:if(l(M,i))continue;">"===i?_(t):"/"===i?t.state=W.OPEN_TAG_SLASH:l(V,i)?(t.attribName=i,t.attribValue="",t.state=W.ATTRIB_NAME):x(t,"Invalid attribute name");continue;case W.ATTRIB_NAME:"="===i?t.state=W.ATTRIB_VALUE:">"===i?(x(t,"Attribute without value"),t.attribValue=t.attribName,w(t),_(t)):l(M,i)?t.state=W.ATTRIB_NAME_SAW_WHITE:l($,i)?t.attribName+=i:x(t,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if("="===i)t.state=W.ATTRIB_VALUE;else{if(l(M,i))continue;x(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",f(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===i?_(t):l(V,i)?(t.attribName=i,t.state=W.ATTRIB_NAME):(x(t,"Invalid attribute name"),t.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(l(M,i))continue;l(B,i)?(t.q=i,t.state=W.ATTRIB_VALUE_QUOTED):(x(t,"Unquoted attribute value"),t.state=W.ATTRIB_VALUE_UNQUOTED,t.attribValue=i);continue;case W.ATTRIB_VALUE_QUOTED:if(i!==t.q){"&"===i?t.state=W.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=i;continue}w(t),t.q="",t.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:l(M,i)?t.state=W.ATTRIB:">"===i?_(t):"/"===i?t.state=W.OPEN_TAG_SLASH:l(V,i)?(x(t,"No whitespace between attributes"),t.attribName=i,t.attribValue="",t.state=W.ATTRIB_NAME):x(t,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(h(I,i)){"&"===i?t.state=W.ATTRIB_VALUE_ENTITY_U:t.attribValue+=i;continue}w(t),">"===i?_(t):t.state=W.ATTRIB;continue;case W.CLOSE_TAG:if(t.tagName)">"===i?S(t):l($,i)?t.tagName+=i:t.script?(t.script+=""+t.tagName,t.tagName="",t.state=W.SCRIPT):(h(M,i)&&x(t,"Invalid tagname in closing tag"),t.state=W.CLOSE_TAG_SAW_WHITE);else{if(l(M,i))continue;h(V,i)?t.script?(t.script+=""+i,t.state=W.SCRIPT):x(t,"Invalid tagname in closing tag."):t.tagName=i}continue;case W.CLOSE_TAG_SAW_WHITE:if(l(M,i))continue;">"===i?S(t):x(t,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:switch(t.state){case W.TEXT_ENTITY:var s=W.TEXT,c="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:var s=W.ATTRIB_VALUE_QUOTED,c="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:var s=W.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===i?(t[c]+=T(t),t.entity="",t.state=s):l(O,i)?t.entity+=i:(x(t,"Invalid character entity"),t[c]+="&"+t.entity+i,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}return t.position>=t.bufferCheckPosition&&r(t),t}n.parser=function(e,t){return new i(e,t)},n.SAXParser=i,n.SAXStream=c,n.createStream=s,n.MAX_BUFFER_LENGTH=65536;var C=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){this.__proto__=e}return t.prototype=e,new t}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),i.prototype={end:function(){g(this)},write:A,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){a(this)}};try{var R=e("stream").Stream}catch(N){var R=function(){}}var P=n.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});c.prototype=Object.create(R.prototype,{constructor:{value:c}}),c.prototype.write=function(n){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(n)){if(!this._decoder){var i=e("string_decoder").StringDecoder;this._decoder=new i("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},c.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},c.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===P.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),R.prototype.on.call(n,e,t)};var M="\r\n ",D="0124356789",k="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",B="'\"",O=D+k+"#",I=M+">",L="[CDATA[",j="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",z="http://www.w3.org/2000/xmlns/",G={xml:F,xmlns:z};M=p(M),D=p(D),k=p(k);var V=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,$=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;B=p(B),O=p(O),I=p(I);var W=0;n.STATE={BEGIN:W++,TEXT:W++,TEXT_ENTITY:W++,OPEN_WAKA:W++,SGML_DECL:W++,SGML_DECL_QUOTED:W++,DOCTYPE:W++,DOCTYPE_QUOTED:W++,DOCTYPE_DTD:W++,DOCTYPE_DTD_QUOTED:W++,COMMENT_STARTING:W++,COMMENT:W++,COMMENT_ENDING:W++,COMMENT_ENDED:W++,CDATA:W++,CDATA_ENDING:W++,CDATA_ENDING_2:W++,PROC_INST:W++,PROC_INST_BODY:W++,PROC_INST_ENDING:W++,OPEN_TAG:W++,OPEN_TAG_SLASH:W++,ATTRIB:W++,ATTRIB_NAME:W++,ATTRIB_NAME_SAW_WHITE:W++,ATTRIB_VALUE:W++,ATTRIB_VALUE_QUOTED:W++,ATTRIB_VALUE_CLOSED:W++,ATTRIB_VALUE_UNQUOTED:W++,ATTRIB_VALUE_ENTITY_Q:W++,ATTRIB_VALUE_ENTITY_U:W++,CLOSE_TAG:W++,CLOSE_TAG_SAW_WHITE:W++,SCRIPT:W++,SCRIPT_ENDING:W++},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,
ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(n.ENTITIES).forEach(function(e){var t=n.ENTITIES[e],i="number"==typeof t?String.fromCharCode(t):t;n.ENTITIES[e]=i});for(var W in n.STATE)n.STATE[n.STATE[W]]=W;W=n.STATE,String.fromCodePoint||!function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,i,r=16384,o=[],a=-1,s=arguments.length;if(!s)return"";for(var c="";++ap||p>1114111||t(p)!=p)throw RangeError("Invalid code point: "+p);65535>=p?o.push(p):(p-=65536,n=(p>>10)+55296,i=p%1024+56320,o.push(n,i)),(a+1==s||o.length>r)&&(c+=e.apply(null,o),o.length=0)}return c};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}("undefined"==typeof n?sax={}:n)}).call(this,void 0)},{undefined:void 0}],79:[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)},{}],80:[function(e,t,n){t.exports=e(84)},{84:84}],81:[function(e,t,n){"use strict";function i(){}i.prototype.get=function(e){return this.$model.properties.get(this,e)},i.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},t.exports=i},{}],82:[function(e,t,n){"use strict";function i(e){this.ns=e,this.name=e.name,this.allTypes=[],this.properties=[],this.propertiesByName={}}var r=e(383),o=e(377),a=e(255),s=e(85).parseName;t.exports=i,i.prototype.build=function(){return r(this,["ns","name","allTypes","properties","propertiesByName","bodyProperty","idProperty"])},i.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},i.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}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)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},i.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=s(r[0],i),a=s(r[1],o.prefix).name,c=this.propertiesByName[a];if(!c)throw new Error("refined property <"+a+"> not found");this.replaceProperty(c,e,n),delete e.redefines},i.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},i.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},i.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},i.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},i.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},i.prototype.hasProperty=function(e){return this.propertiesByName[e]},i.prototype.addTrait=function(e,t){var n=this.allTypes;-1===n.indexOf(e)&&(a(e.properties,function(n){n=o({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))},this),n.push(e))}},{255:255,377:377,383:383,85:85}],83:[function(e,t,n){"use strict";function i(e,t){this.model=e,this.properties=t}var r=e(255),o=e(81);t.exports=i,i.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:s,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0}),r(e,function(e,t){this.set(t,e)},this)}var n=this.model,i=this.properties,a=Object.create(o.prototype);r(e.properties,function(e){e.isMany||void 0===e["default"]||(a[e.name]=e["default"])}),i.defineModel(a,n),i.defineDescriptor(a,e);var s=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t}},{255:255,81:81}],84:[function(e,t,n){"use strict";function i(e){this.properties=new u(this),this.factory=new c(this,this.properties),this.registry=new p(e,this.properties),this.typeCache={}}var r=e(374),o=e(372),a=e(255),s=e(254),c=e(83),p=e(87),u=e(86),l=e(85).parseName;t.exports=i,i.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},i.prototype.getType=function(e){var t=this.typeCache,n=r(e)?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i},i.prototype.createAny=function(e,t,n){var i=l(e),r={$type:e},s={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(r,s),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),a(n,function(e,t){o(e)&&void 0!==e.value?r[e.name]=e.value:r[t]=e}),r},i.prototype.getPackage=function(e){return this.registry.getPackage(e)},i.prototype.getPackages=function(){return this.registry.getPackages()},i.prototype.getElementDescriptor=function(e){return e.$descriptor},i.prototype.hasType=function(e,t){void 0===t&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return!!s(n.allTypes,function(e){return e.name===t})},i.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{254:254,255:255,372:372,374:374,83:83,85:85,86:86,87:87}],85:[function(e,t,n){"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 or , got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},{}],86:[function(e,t,n){"use strict";function i(e){this.model=e}function r(e){return"undefined"==typeof e}function o(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}t.exports=i,i.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),a=i&&i.name;r(n)?i?delete e[a]:delete e.$attrs[t]:i?a in e?e[a]=n:o(e,i,n):e.$attrs[t]=n},i.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&&o(e,n,[]),e[i]},i.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},i.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},i.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},{}],87:[function(e,t,n){"use strict";function i(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,o(e,this.registerPackage,this)}var r=e(377),o=e(255),a=e(88),s=e(82),c=e(85).parseName,p=a.isBuiltIn;t.exports=i,i.prototype.getPackage=function(e){return this.packageMap[e]},i.prototype.getPackages=function(){return this.packages},i.prototype.registerPackage=function(e){e=r({},e),o(e.types,function(t){this.registerType(t,e)},this),this.packageMap[e.uri]=this.packageMap[e.prefix]=e,this.packages.push(e)},i.prototype.registerType=function(e,t){e=r({},e,{superClass:(e.superClass||[]).slice(),"extends":(e["extends"]||[]).slice(),properties:(e.properties||[]).slice()});var n=c(e.name,t.prefix),i=n.name,a={};o(e.properties,function(e){var t=c(e.name,n.prefix),i=t.name;p(e.type)||(e.type=c(e.type,t.prefix).name),r(e,{ns:t,name:i}),a[i]=e}),r(e,{ns:n,name:i,propertiesByName:a}),o(e["extends"],function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)},this),this.definePackage(e,t),this.typeMap[i]=e},i.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=c(n,p(n)?"":e.prefix);s.mapTypes(r,t,i)}var a=p(e.name)?{name:e.name}:this.typeMap[e.name],s=this;if(!a)throw new Error("unknown type <"+e.name+">");o(a.superClass,n?i:r),t(a,!n),o(a.traits,i)},i.prototype.getEffectiveDescriptor=function(e){var t=c(e),n=new s(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},{255:255,377:377,82:82,85:85,88:88}],88:[function(e,t,n){"use strict";var i={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},r={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=r[e];return n?n(t):t},t.exports.isBuiltIn=function(e){return!!i[e]},t.exports.isSimple=function(e){return!!r[e]}},{}],89:[function(e,t,n){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",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",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:"laneSets",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",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:"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:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{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",xml:{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:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{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:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean","default":!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!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",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{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",xml:{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:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",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:"outputSetRef",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:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",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",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{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",xml:{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",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{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:"interfaceRef",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:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!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:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity","default":1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity","default":1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],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",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{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",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Expression",xml:{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",xml:{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",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",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{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:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{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"}}},{}],90:[function(e,t,n){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"}},{}],91:[function(e,t,n){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:[]}},{}],92:[function(e,t,n){t.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{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",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{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,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},{}],93:[function(e,t,n){t.exports={__depends__:[e(135)],__init__:["directEditing"],directEditing:["type",e(94)]}},{135:135,94:94}],94:[function(e,t,n){"use strict";function i(e,t){this._eventBus=e,this._providers=[],this._textbox=new a({container:t.getContainer(),keyHandler:r(this._handleKey,this)})}var r=e(264),o=e(254),a=e(95);i.$inject=["eventBus","canvas"],i.prototype.registerProvider=function(e){this._providers.push(e)},i.prototype.isActive=function(){return!!this._active},i.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},i.prototype._fire=function(e){this._eventBus.fire("directEditing."+e,{active:this._active})},i.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null},i.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()}},i.prototype.getValue=function(){return this._textbox.getValue()},i.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},i.prototype.activate=function(e){this.isActive()&&this.cancel();var t,n=o(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=i},{254:254,264:264,95:95}],95:[function(e,t,n){"use strict";function i(e){e.stopPropagation()}function r(e){this.container=e.container,this.textarea=document.createElement("textarea"),this.keyHandler=e.keyHandler||function(){}}var o=e(377),a=e(395),s=e(398);t.exports=r,r.prototype.create=function(e,t,n){var r=this.textarea,s=this.container;o(r.style,{width:e.width+"px",height:e.height+"px",left:e.x+"px",top:e.y+"px",position:"absolute",textAlign:"center",boxSizing:"border-box"},t||{}),r.value=n,r.title="Press SHIFT+Enter for line feed",a.bind(r,"keydown",this.keyHandler),a.bind(r,"mousedown",i),s.appendChild(r),setTimeout(function(){r.parent&&r.select(),r.focus()},100)},r.prototype.destroy=function(){var e=this.textarea;e.value="",a.unbind(e,"keydown",this.keyHandler),a.unbind(e,"mousedown",i),s(e)},r.prototype.getValue=function(){return this.textarea.value}},{377:377,395:395,398:398}],96:[function(e,t,n){t.exports=e(97)},{97:97}],97:[function(e,t,n){"use strict";function i(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){o.push(e)})))}var r=[],o=[];e.forEach(i);var s=new a.Injector(r);return o.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 r(t){t=t||{};var n={config:["value",t]},r=e(106),o=[n,r].concat(t.modules||[]);return i(o)}function o(e,t){this.injector=t=t||r(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}var a=e(234);t.exports=o,o.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},o.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")}},{106:106,234:234}],98:[function(e,t,n){"use strict";function i(e){return"object"==typeof e}function r(e){this._eventBus=e}function o(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}var a=e(255),s=e(369),c=e(368),p=e(371),u=1e3;r.$inject=["eventBus"],t.exports=r,r.prototype.on=function(e,t,n,r,l,h){if((s(t)||p(t))&&(h=l,l=r,r=n,n=t,t=null),s(n)&&(h=l,l=r,r=n,n=u),i(l)&&(h=l,l=!1),!s(r))throw new Error("handlerFn must be a function");c(e)||(e=[e]);var d=this._eventBus;a(e,function(e){var i=["commandStack",e,t].filter(function(e){return e}).join(".");d.on(i,n,l?o(r,h):r,h)})};var l=["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"];a(l,function(e){r.prototype[e]=function(t,n,i,r,o){(s(t)||p(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}})},{255:255,368:368,369:369,371:371}],99:[function(e,t,n){"use strict";function i(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[]},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],this.clear,this)}var r=e(248),o=e(368),a=e(377),s=e(104).Event;i.$inject=["eventBus","injector"],t.exports=i,i.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)},i.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 void 0===r&&i.canExecute&&(r=i.canExecute(t)),r},i.prototype.clear=function(){this._stack.length=0,this._stackIdx=-1,this._fire("changed")},i.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()}},i.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()}},i.prototype.register=function(e,t){this._setHandler(e,t)},i.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)},i.prototype.canUndo=function(){return!!this._getUndoAction()},i.prototype.canRedo=function(){return!!this._getRedoAction()},i.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},i.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},i.prototype._internalUndo=function(e){var t=e.command,n=e.context,i=this._getHandler(t);this._fire(t,"revert",e),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)},i.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var i,r,o,c=t?[e+"."+t,t]:[e];for(n=a(new s,n),i=0;(r=c[i])&&(o=this._eventBus.fire("commandStack."+r,n),!n.cancelBubble);i++);return o},i.prototype._createId=function(){return this._uid++},i.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,"preExecuted",e)),this._fire(n,"execute",e),r.execute&&this._markDirty(r.execute(i)),this._executedAction(e,t),this._fire(n,"executed",e),t||(this._fire(n,"postExecute",e),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",e)),this._popAction(e)},i.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)},i.prototype._popAction=function(){var e=this._currentExecution,t=e.actions,n=e.dirty;t.pop(),t.length||(this._eventBus.fire("elements.changed",{elements:r(n)}),n.length=0,this._fire("changed"))},i.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=o(e)?e:[e],t.dirty=t.dirty.concat(e))},i.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},i.prototype._revertedAction=function(e){this._stackIdx--},i.prototype._getHandler=function(e){return this._handlerMap[e]},i.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}},{104:104,248:248,368:368,377:377}],100:[function(e,t,n){t.exports={commandStack:["type",e(99)]}},{99:99}],101:[function(e,t,n){"use strict";function i(e,t){return Math.round(e*t)/t}function r(e){return p(e)?e+"px":e}function o(e){e=u({},{width:"100%",height:"100%"},e);var t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),u(n.style,{position:"relative",overflow:"hidden",width:r(e.width),height:r(e.height)}),t.appendChild(n),n}function a(e,t){return e.group().attr({"class":t})}function s(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function c(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}var p=e(371),u=e(377),l=e(255),h=e(252),d=e(265),f=e(219),m=e(221),v=e(240),y="base",g={shape:["x","y","width","height"],connection:["waypoints"]};s.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],t.exports=s,s.prototype._init=function(e){var t=this._eventBus,n=this._container=o(e),i=this._svg=v.createSnapAt("100%","100%",n),r=this._viewport=a(i,"viewport");this._layers={},e.deferUpdate!==!1&&(this._viewboxChanged=d(this._viewboxChanged,300)),t.on("diagram.init",function(){t.fire("canvas.init",{svg:i,viewport:r})},this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},s.prototype._destroy=function(e){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});var t=this._container.parentNode;t&&t.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._rootElement,delete this._viewport},s.prototype._clear=function(){var e=this,t=this._elementRegistry.getAll();t.forEach(function(t){var n=m.getType(t);"root"===n?e.setRootElement(null,!0):e._removeElement(t,n)}),delete this._cachedViewbox},s.prototype.getDefaultLayer=function(){return this.getLayer(y)},s.prototype.getLayer=function(e){if(!e)throw new Error("must specify a name");var t=this._layers[e];return t||(t=this._layers[e]=a(this._viewport,"layer-"+e)),t},s.prototype.getContainer=function(){return this._container},s.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),i=this._elementRegistry._elements[e.id],i&&(l([i.gfx,i.secondaryGfx],function(e){e&&e[n?"addClass":"removeClass"](t)}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:t,add:!!n}))},s.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},s.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},s.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));var n=this.getGraphics(e);return n&&n.hasClass(t)},s.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},s.prototype.getRootElement=function(){return this._rootElement||this.setRootElement({id:"__implicitroot",children:[]}),this._rootElement},s.prototype.setRootElement=function(e,t){e&&this._ensureValid("root",e);var n=this._rootElement,i=this._elementRegistry,r=this._eventBus;if(n){if(!t)throw new Error("rootElement already set, need to specify override");r.fire("root.remove",{element:n}),r.fire("root.removed",{element:n}),i.remove(n)}if(e){var o=this.getDefaultLayer();r.fire("root.add",{element:e}),i.add(e,o,this._svg),r.fire("root.added",{element:e,gfx:o})}return this._rootElement=e,e},s.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element with id "+t.id+" already exists");var n=g[e],i=h(n,function(e){return"undefined"!=typeof t[e]});if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+e)},s.prototype._setParent=function(e,t,n){f.add(t.children,e,n),e.parent=t},s.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();var r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);var a=o.create(e,t);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},s.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},s.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},s.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),f.remove(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e):void 0},s.prototype.removeShape=function(e){return this._removeElement(e,"shape")},s.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},s.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},s.prototype._viewboxChanging=function(){this._eventBus.fire("canvas.viewbox.changing")},s.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox(!1)})},s.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,r,o,a,s=this._viewport,c=this.getSize();return e?(this._viewboxChanging(),r=Math.min(c.width/e.width,c.height/e.height),n=(new v.Matrix).scale(r).translate(-e.x,-e.y),s.transform(n),this._viewboxChanged(),e):(t=this.getDefaultLayer().getBBox(!0),n=s.transform().localMatrix,r=i(n.a,1e3),o=i(-n.e||0,1e3),a=i(-n.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})},s.prototype.scroll=function(e){var t=this._viewport.node,n=t.getCTM();return e&&(this._viewboxChanging(),e=u({dx:0,dy:0},e||{}),n=this._svg.node.createSVGMatrix().translate(e.dx,e.dy).multiply(n),c(t,n),this._viewboxChanged()),{x:n.e,y:n.f}},s.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if("fit-viewport"===e)return this._fitViewport(t);var n,r;return this._viewboxChanging(),"object"!=typeof t&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t),this._viewboxChanged(),i(r.a,1e3)},s.prototype._fitViewport=function(e){var t,n,i=this.viewbox(),r=i.outer,o=i.inner;return o.x>=0&&o.y>=0&&o.x+o.width<=r.width&&o.y+o.height<=r.height&&!e?n={x:0,y:0,width:Math.max(o.width+o.x,r.width),height:Math.max(o.height+o.y,r.height)}:(t=Math.min(1,r.width/o.width,r.height/o.height),n={x:o.x+(e?o.width/2-r.width/t/2:0),y:o.y+(e?o.height/2-r.height/t/2:0),width:r.width/t,height:r.height/t}),this.viewbox(n),this.viewbox(!1).scale},s.prototype._setZoom=function(e,t){var n,i,r,o,a,s=this._svg.node,p=this._viewport.node,l=s.createSVGMatrix(),h=s.createSVGPoint();r=p.getCTM();var d=r.a;return t?(n=u(h,t),i=n.matrixTransform(r.inverse()),o=l.translate(i.x,i.y).scale(1/d*e).translate(-i.x,-i.y),a=r.multiply(o)):a=l.scale(e),c(this._viewport.node,a),a},s.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},s.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}}},{219:219,221:221,240:240,252:252,255:255,265:265,371:371,377:377}],102:[function(e,t,n){"use strict";function i(){this._uid=12}var r=e(210);t.exports=i,i.prototype.createRoot=function(e){return this.create("root",e)},i.prototype.createLabel=function(e){return this.create("label",e)},i.prototype.createShape=function(e){return this.create("shape",e)},i.prototype.createConnection=function(e){return this.create("connection",e)},i.prototype.create=function(e,t){return t=t||{},t.id||(t.id=e+"_"+this._uid++),r.create(e,t)}},{210:210}],103:[function(e,t,n){"use strict";function i(){this._elements={}}var r="data-element-id";t.exports=i,i.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),t.attr(r,i),n&&n.attr(r,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},i.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(i.gfx.attr(r,""),i.secondaryGfx&&i.secondaryGfx.attr(r,""),delete t[n])},i.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e));var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},i.prototype.get=function(e){var t;t="string"==typeof e?e:e&&e.attr(r);var n=this._elements[t];return n&&n.element},i.prototype.filter=function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(n)}),t},i.prototype.getAll=function(){return this.filter(function(e){return e})},i.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)})},i.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},i.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")}},{}],104:[function(e,t,n){"use strict";function i(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function r(){}function o(e,t){return e.apply(null,t)}var a=e(369),s=e(368),c=e(371),p=e(264),u=e(377),l="__fn",h=1e3,d=Array.prototype.slice;t.exports=i,i.prototype.on=function(e,t,n,i){if(e=s(e)?e:[e],a(t)&&(i=n,n=t,t=h),!c(t))throw new Error("priority must be a number");var r=n;i&&(r=p(n,i),r[l]=n[l]||n);var o=this,u={priority:t,callback:r};e.forEach(function(e){o._addListener(e,u)})},i.prototype.once=function(e,t,n,i){function r(){return o.off(e,r),n.apply(i,arguments)}var o=this;if(a(t)&&(i=n,n=t,t=h),!c(t))throw new Error("priority must be a number");r[l]=n,this.on(e,t,r)},i.prototype.off=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(r=o.length-1;n=o[r];r--)i=n.callback,i!==t&&i[l]!==t||o.splice(r,1);else o.length=0},i.prototype.fire=function(e,t){var n,i,o,a;if(a=d.call(arguments),"object"==typeof e&&(n=e,e=n.type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){t instanceof r?n=t:(n=new r,n.init(t)),a[0]=n;var s=n.type;e!==s&&(n.type=e);try{o=this._invokeListeners(n,a,i)}finally{e!==s&&(n.type=s)}return void 0===o&&n.defaultPrevented&&(o=!1),o}},i.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},i.prototype._destroy=function(){this._listeners={}},i.prototype._invokeListeners=function(e,t,n){var i,r,o;for(i=0;(r=n[i])&&!e.cancelBubble;i++)o=this._invokeListener(e,t,r);return o},i.prototype._invokeListener=function(e,t,n){var i;try{i=o(n.callback,t),void 0!==i&&(e.returnValue=i,e.stopPropagation()),i===!1&&e.preventDefault()}catch(r){if(!this.handleError(r))throw console.error("unhandled error in event listener"),console.error(r.stack),r}return i},i.prototype._addListener=function(e,t){var n,i,r=this._getListeners(e);for(i=0;n=r[i];i++)if(n.priority1||(n=o?r:c(r,function(e){return!!e.host}),a(n,function(e){t.updateAttachment(e,o)}))}),this.postExecuted(["elements.move"],function(e){var n=e.context.shapes;a(n,function(e){a(e.attachers,function(e){a(e.outgoing,function(e){var n=i.allowed("connection.reconnectStart",{connection:e,source:e.source,target:e.target});n||t.removeConnection(e)}),a(e.incoming,function(e){var n=i.allowed("connection.reconnectEnd",{connection:e,source:e.source,target:e.target});n||t.removeConnection(e)})})})}),this.postExecute(["shape.create"],function(e){var n=e.context,i=n.shape,r=n.host;r&&t.updateAttachment(i,r)}),this.postExecute(["shape.replace"],function(e){var n=e.context,r=n.oldShape,o=n.newShape;l(r.attachers,function(e){var n=i.allowed("elements.move",{target:o,shapes:[e]});"attach"===n?t.updateAttachment(e,o):t.removeShape(e)})}),this.postExecute(["shape.resize"],function(e){var n=e.context,i=n.shape,r=n.oldBounds,o=n.newBounds,s=i.attachers;s.length&&a(s,function(e){var n=h(e,r,o);t.moveShape(e,n,e.parent)})}),this.preExecute(["shape.delete"],function(e){var n=e.context.shape;l(n.attachers,function(e){t.removeShape(e)}),n.host&&t.updateAttachment(n,null)})}function r(e){return s(u(e,function(e){return e.attachers||[]}))}function o(e){var t=p(e,"id");return c(e,function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0})}var a=e(255),s=e(245),c=e(253),p=e(256),u=e(258),l=e(230).saveClear,h=e(217).getNewAttachShapeDelta,d=e(243),f=250,m=1500,v=e(98);d(i,v),i.$inject=["eventBus","modeling","moveVisuals","rules"],t.exports=i},{217:217,230:230,243:243,245:245,253:253,255:255,256:256,258:258,98:98}],112:[function(e,t,n){t.exports={__depends__:[e(166),e(139)],__init__:["attachSupport"],attachSupport:["type",e(111)]}},{111:111,139:139,166:166}],113:[function(e,t,n){"use strict";function i(e,t,n,i,f,m,v){function y(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=e.get("connectionDocking",!1);this.start=function(e,t,r,o){var a,s,c=t.waypoints,p=n.getGraphics(t);a=o||0!==r?o||r!==c.length-1?u:h:l,s={connection:t,bendpointIndex:r,insert:o,type:a},i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:p,context:s}})},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,i,r=e.context,o=r.type,c=e.connection;c.waypoints[r.bendpointIndex]={x:e.x,y:e.y},x&&(r.hover&&(o===l&&(t=r.hover),o===h&&(i=r.hover)),c.waypoints=x.getCroppedWaypoints(c,t,i));var p=r.allowed=m.allowed(r.type,r);p?r.hover&&(n.removeMarker(r.hover,s),n.addMarker(r.hover,a),r.target=r.hover):p===!1&&r.hover&&(n.removeMarker(r.hover,a),n.addMarker(r.hover,s),r.target=null),r.draggerGfx.translate(e.x,e.y),y(e)}),t.on(["bendpoint.move.end","bendpoint.move.cancel"],function(e){var t=e.context,i=t.hover,r=t.connection;t.draggerGfx.remove(),t.newWaypoints=r.waypoints.slice(),r.waypoints=t.originalWaypoints,n.removeMarker(r,p),i&&(n.removeMarker(i,a),n.removeMarker(i,s))}),t.on("bendpoint.move.end",function(e){var t=e.context,n=t.newWaypoints,i=t.bendpointIndex,r=n[i],o=t.allowed;if(r.x=d(r.x),r.y=d(r.y),o&&t.type===l)v.reconnectStart(t.connection,t.target,r);else if(o&&t.type===h)v.reconnectEnd(t.connection,t.target,r);else{if(o===!1||t.type!==u)return y(e),!1;v.updateWaypoints(t.connection,g(n))}}),t.on("bendpoint.move.cancel",function(e){y(e)})}var r=e(223),o=e(115),a="connect-ok",s="connect-not-ok",c="connect-hover",p="djs-updating",u="connection.updateWaypoints",l="connection.reconnectStart",h="connection.reconnectEnd",d=Math.round;i.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","rules","modeling"],t.exports=i},{115:115,223:223}],114:[function(e,t,n){"use strict";function i(e){function t(e,t){return c.snapTo(e,t)}function n(e){return o(e,["x","y"])}function i(e){return e.width?{x:p(e.width/2+e.x),y:p(e.height/2+e.y)}:void 0}function u(e){var t=e.snapPoints,n=e.connection,r=n.waypoints,o=e.segmentStart,s=e.segmentStartIndex,c=e.segmentEnd,p=e.segmentEndIndex,u=e.axis;if(t)return t;var l=[r[s-1],o,c,r[p+1]];return 2>s&&l.unshift(i(n.source)),p>r.length-3&&l.unshift(i(n.target)),e.snapPoints=t={horizontal:[],vertical:[]},a(l,function(e){e&&(e=e.original||e,"y"===u&&t.horizontal.push(e.y),"x"===u&&t.vertical.push(e.x))}),t}function l(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},a(r,function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))}),t}e.on("connectionSegment.move.start",function(e){var t=e.context,i=t.segmentStart,r=t.segmentEnd,o=s(i,r);t.snapStart=n(o)}),e.on("connectionSegment.move.move",1500,function(e){var n,i,o=e.context,a=u(o),s=o.snapStart,c=s.x+e.dx,p=s.y+e.dy;if(a){n=t(a.vertical,c),i=t(a.horizontal,p);var l=c-n,h=p-i;r(e,{dx:e.dx-l,dy:e.dy-h,x:e.x-l,y:e.y-h})}}),e.on("bendpoint.move.start",function(e){var t=e.context;t.snapStart=n(e)}),e.on("bendpoint.move.move",1500,function(e){var n,o,a=e.context,s=l(a),c=a.snapStart,p=a.target,u=p&&i(p),h=c.x+e.dx,d=c.y+e.dy;if(s){n=t(u?s.vertical.concat([u.x]):s.vertical,h),o=t(u?s.horizontal.concat([u.y]):s.horizontal,d);var f=h-n,m=d-o;r(e,{dx:e.dx-f,dy:e.dy-m,x:e.x-f,y:e.y-m})}})}var r=e(377),o=e(383),a=e(255),s=e(223).getMidPoint,c=e(240),p=Math.round;i.$inject=["eventBus"],t.exports=i},{223:223,240:240,255:255,377:377,383:383}],115:[function(e,t,n){"use strict";function i(e,t,n){var i=e.group(),r=14,o=3,s=6,c=r+s,p=o+s;i.rect(-r/2,-o/2,r,o).addClass("djs-visual"),i.rect(-c/2,-p/2,c,p).addClass("djs-hit");var u=(new a.Matrix).rotate("h"===n?90:0,0,0);return i.transform(u),i}var r=e(222),o=e(223),a=e(240),s=t.exports.BENDPOINT_CLS="djs-bendpoint",c=t.exports.SEGMENT_DRAGGER_CLS="djs-segment-dragger";t.exports.toCanvasCoordinates=function(e,t){var n,i=r.toPoint(t),o=e._container.getBoundingClientRect();n={x:o.left,y:o.top};var a=e.viewbox();return{x:a.x+(i.x-n.x)/a.scale,y:a.y+(i.y-n.y)/a.scale}},t.exports.addBendpoint=function(e,t){var n=e.group().addClass(s);return n.circle(0,0,4).addClass("djs-visual"),n.circle(0,0,10).addClass("djs-hit"),t&&n.addClass(t),n},t.exports.addSegmentDragger=function(e,t,n){var r=e.group(),a=o.getMidPoint(t,n),s=o.pointsAligned(t,n);return i(r,a,s),r.addClass(c),r.addClass("h"===s?"vertical":"horizontal"),r.translate(a.x,a.y),r}},{222:222,223:223,240:240}],116:[function(e,t,n){"use strict";function i(e,t,n,i,l){function h(e,n){var i=o.toCanvasCoordinates(t,n),r=u(e,i);return r}function d(e,t,n){var i,r,o,c,p,u,l=e.index,h=e.point;return 0>=l||e.bendpoint?!1:(i=t[l-1],r=t[l],o=s(i,r),c=a(i,r),p=Math.abs(h.x-o.x),u=Math.abs(h.y-o.y),c&&n>=p&&n>=u)}function f(e,t){var n=t.waypoints,r=h(n,e);r&&(d(r,n,10)?l.start(e,t,r.index):i.start(e,t,r.index,!r.bendpoint))}function m(e,t,i){r.bind(e,t,function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()})}function v(e,n){var i=t.getLayer("overlays"),r=i.select(".djs-bendpoints[data-element-id="+e.id+"]");return!r&&n&&(r=i.group().addClass("djs-bendpoints").attr("data-element-id",e.id),m(r.node,"mousedown",e),m(r.node,"click",e),m(r.node,"dblclick",e)),r}function y(e,t){t.waypoints.forEach(function(t,n){o.addBendpoint(e).translate(t.x,t.y)}),o.addBendpoint(e,"floating")}function g(e,t){for(var n,i,r=t.waypoints,s=1;sr&&(m=l.getOrientation(n.source,u),1===r?"intersect"===m&&(p.shift(),p[0]=u,f--):"intersect"!==m&&(p.unshift(a),f++)),o>d-3&&(g=l.getOrientation(n.target,h),o===d-2?"intersect"===g&&(p.pop(),p[p.length-1]=h):"intersect"!==g&&p.push(s)),n.waypoints=p,x&&(n.waypoints=p=x.getCroppedWaypoints(n)),t.newWaypoints=p,y(t,f,e),v(e)}),t.on("connectionSegment.move.hover",function(e){e.context.hover=e.hover,n.addMarker(e.hover,h)}),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],function(e){var t=e.context.hover;t&&n.removeMarker(t,h)}),t.on("connectionSegment.move.cleanup",function(e){var t=e.context,i=t.connection;t.draggerGfx&&t.draggerGfx.remove(),n.removeMarker(i,d)}),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],function(e){var t=e.context,n=t.connection;n.waypoints=t.originalWaypoints,v(e)}),t.on("connectionSegment.move.end",function(e){var t=e.context,n=t.newWaypoints;n.forEach(function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}),m.updateWaypoints(t.connection,g(n))})}var p=e(223),u=e(115),l=e(208),h="connect-hover",d="djs-updating";c.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","rules","modeling"],t.exports=c},{115:115,208:208,223:223}],118:[function(e,t,n){t.exports={__depends__:[e(129),e(185)],__init__:["bendpoints","bendpointSnapping"],bendpoints:["type",e(116)],bendpointMove:["type",e(113)],connectionSegmentMove:["type",e(117)],bendpointSnapping:["type",e(114)]}},{113:113,114:114,116:116,117:117,129:129,185:185}],119:[function(e,t,n){"use strict";function i(e,t,n,i){e.on("element.changed",function(t){var i=t.element;t.gfx||(t.gfx=n.getGraphics(i)),t.gfx&&e.fire(r(i)+".changed",t)}),e.on("elements.changed",function(t){var n=t.elements;n.forEach(function(t){e.fire("element.changed",{element:t})}),i.updateContainments(n)}),e.on("shape.changed",function(e){i.update("shape",e.element,e.gfx)}),e.on("connection.changed",function(e){i.update("connection",e.element,e.gfx)})}var r=e(221).getType;i.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"],t.exports=i},{221:221}],120:[function(e,t,n){t.exports={__init__:["changeSupport"],changeSupport:["type",e(119)]}},{119:119}],121:[function(e,t,n){"use strict";function i(e,t,n,i,s,c){function p(e,t){return i.allowed("connection.create",{source:e,target:t})}function u(e,t,n,i){var o=c.getShapePath(n),a=i&&c.getShapePath(i),s=c.getConnectionPath({waypoints:[e,t]});return e=r.getElementLineIntersection(o,s,!0)||e,t=i&&r.getElementLineIntersection(a,s,!1)||t,[e,t]}e.on("connect.move",function(e){var t,n,i,o=e.context,a=o.source,s=o.target,c=o.visual;t=r.getMid(a),n={x:e.x,y:e.y},i=u(t,n,a,s),c.attr("points",[i[0].x,i[0].y,i[1].x,i[1].y])}),e.on("connect.hover",function(e){var t,n=e.context,i=n.source,r=e.hover;t=n.canExecute=p(i,r),null!==t&&(n.target=r,s.addMarker(r,t?o:a))}),e.on(["connect.out","connect.cleanup"],function(e){var t=e.context;t.target&&s.removeMarker(t.target,t.canExecute?o:a),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;t=s.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);return o?void n.connect(i,r):!1}),this.start=function(e,n,i){t.init(e,"connect",{autoActivate:i,data:{shape:n,context:{source:n}}})}}var r=e(208),o="connect-ok",a="connect-not-ok";i.$inject=["eventBus","dragging","modeling","rules","canvas","graphicsFactory"],t.exports=i},{208:208}],122:[function(e,t,n){t.exports={__depends__:[e(189),e(185),e(129)],connect:["type",e(121)]}},{121:121,129:129,185:185,189:189}],123:[function(e,t,n){"use strict";function i(e,t){this._providers=[],this._eventBus=e,this._overlays=t,this._current=null,this._init()}var r=e(369),o=e(255),a=e(393),s=e(391),c=e(395),p=e(389),u=e(397),l=e(390),h=e(394),d=".entry";i.$inject=["eventBus","overlays"],i.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()}),e.on("element.changed",function(e){var n=e.element,i=t._current;i&&i.element===n&&n.parent&&t.open(n,!0)})},i.prototype.registerProvider=function(e){this._providers.push(e)},i.prototype.getEntries=function(e){var t={};return o(this._providers,function(n){var i=n.getContextPadEntries(e);o(i,function(e,n){t[n]=e})}),t},i.prototype.trigger=function(e,t,n){var i,o,a,s=this._current,c=s.element,u=s.entries,l=t.delegateTarget||t.target;if(!l)return t.preventDefault();if(i=u[p(l,"data-action")],o=i.action,a=t.originalEvent||t,r(o)){if("click"===e)return o(a,c,n)}else if(o[e])return o[e](a,c,n);t.preventDefault()},i.prototype.open=function(e,t){if(this._current&&this._current.open){if(t!==!0&&this._current.element===e)return;this.close()}this._updateAndOpen(e)},i.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),i=n.html;s(i),o(t,function(e,t){var n,r=e.group||"default",o=h(e.html||'
');p(o,"data-action",t),n=u("[data-group="+r+"]",i),n||(n=h('
'),i.appendChild(n)),n.appendChild(o),e.className&&l(o).add(e.className),e.title&&p(o,"title",e.title),e.imageUrl&&o.appendChild(h(' '))}),l(i).add("open"),this._current={element:e,pad:n,entries:t,open:!0},this._eventBus.fire("contextPad.open",{current:this._current})},i.prototype.getPad=function(e){var t=this,n=this._overlays,i=n.get({element:e,type:"context-pad"});if(!i.length){var r=h('
');a.bind(r,d,"click",function(e){t.trigger("click",e)}),a.bind(r,d,"dragstart",function(e){t.trigger("dragstart",e)}),c.bind(r,"mousedown",function(e){e.stopPropagation()}),n.add(e,"context-pad",{position:{right:-9,top:-6},html:r}),i=n.get({element:e,type:"context-pad"}),this._eventBus.fire("contextPad.create",{element:e,pad:i[0]})}return i[0]},i.prototype.close=function(){var e;this._current&&(this._current.open&&(e=this._current.pad.html,l(e).remove("open")),this._current.open=!1,this._eventBus.fire("contextPad.close",{current:this._current}))},i.prototype.isOpen=function(){return this._current&&this._current.open},t.exports=i},{255:255,369:369,389:389,390:390,391:391,393:393,394:394,395:395,397:397}],124:[function(e,t,n){t.exports={__depends__:[e(135),e(171)],contextPad:["type",e(123)]}},{123:123,135:135,171:171}],125:[function(e,t,n){"use strict";function i(e,t,n,i,c,p,u){function l(e,t,i,r){return i?n.allowed("shape.append",{source:i,shape:e,target:t,position:r}):n.allowed("shape.create",{shape:e,target:t,position:r})}function h(e,t){[a,r,o,s].forEach(function(n){n===t?c.addMarker(e,n):c.removeMarker(e,n)})}function d(e){var t,n,i;return t=c.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"),u.drawShape(i,e),t}e.on("create.move",function(e){var t=e.context,n=t.shape,i=t.visual;i||(i=t.visual=d(n)),i.translate(e.x,e.y);var r,c=e.hover,p={x:e.x,y:e.y};r=t.canExecute=c&&l(t.shape,c,t.source,p),c&&null!==r&&(t.target=c,"attach"===r?h(c,a):h(c,t.canExecute?s:o))}),e.on(["create.end","create.out","create.cleanup"],function(e){var t=e.context,n=t.target;n&&h(n,null)}),e.on("create.end",function(e){var t,n=e.context,r=n.source,o=n.shape,a=n.target,s=n.canExecute,c={x:e.x,y:e.y};return s?(r?o=i.appendShape(r,o,c,a):(t="attach"===s,o=i.createShape(o,c,a,t)),void(n.shape=o)):!1}),e.on("create.cleanup",function(e){var t=e.context;t.visual&&t.visual.remove()}),this.start=function(e,n,i){t.init(e,"create",{cursor:"grabbing",autoActivate:!0,data:{shape:n,context:{shape:n,source:i}}})}}var r="drop-ok",o="drop-not-ok",a="attach-ok",s="new-parent";i.$inject=["eventBus","dragging","rules","modeling","canvas","styles","graphicsFactory"],t.exports=i},{}],126:[function(e,t,n){t.exports={__depends__:[e(129),e(189),e(185)],create:["type",e(125)]}},{125:125,129:129,185:185,189:189}],127:[function(e,t,n){"use strict";function i(e){e instanceof MouseEvent?l.stopEvent(e,!0):l.preventDefault(e)}function r(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function o(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a(e,t){return{x:e.x+t.x,y:e.y+t.y}}function s(e,t,n){function s(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+c((e.x-i.left)/n.scale),y:n.y+c((e.y-i.top)/n.scale)}}function v(e){var n=t.viewbox();return{x:c(e.x/n.scale),y:c(e.y/n.scale)}}function y(t,n){n=n||R;var i=p(new f,n.payload,n.data);return e.fire("drag."+t,i)===!1?!1:e.fire(n.prefix+"."+t,i)}function g(e,s){var c=R.payload,u=R.globalStart,h=l.toPoint(e),f=o(h,u),g=R.localStart,x=v(f),b=a(g,x);if(!R.active&&(s||r(f)>R.threshold)){if(p(c,{x:g.x,y:g.y,dx:0,dy:0},{originalEvent:e}),!1===y("start"))return T();R.active=!0,R.keepSelection||(c.previousSelection=n.get(),n.select(null)),R.cursor&&d.set(R.cursor),t.addMarker(t.getRootElement(),m)}i(e),R.active&&(p(c,{x:b.x,y:b.y,dx:x.x,dy:x.y},{originalEvent:e}),y("move"))}function x(e){var t,n=!0;R.active&&(e&&(R.payload.originalEvent=e,i(e)),n=y("end")),n===!1&&y("rejected"),t=A(n!==!0),y("ended",t)}function b(e){27===e.which&&(e.preventDefault(),T())}function E(e){var t;R.active&&(t=h.install(),setTimeout(t,400)),x(e)}function w(e){g(e)}function _(e){var t=R.payload;t.hoverGfx=e.gfx,t.hover=e.element,y("hover")}function S(e){y("out");var t=R.payload;t.hoverGfx=null,t.hover=null}function T(e){var t;if(R){var n=R.active;n&&y("cancel"),t=A(e),n&&y("canceled",t)}}function A(i){var r,o;y("cleanup"),d.unset(),o=R.trapClick?E:x,u.unbind(document,"mousemove",g),u.unbind(document,"mousedown",o,!0),u.unbind(document,"mouseup",o,!0),u.unbind(document,"keyup",b),u.unbind(document,"touchstart",w,!0),u.unbind(document,"touchcancel",T,!0),u.unbind(document,"touchmove",g,!0),u.unbind(document,"touchend",x,!0),e.off("element.hover",_),e.off("element.out",S),t.removeMarker(t.getRootElement(),m);var a=R.payload.previousSelection;return i!==!1&&a&&!n.get().length&&n.select(a),r=R,R=null,r}function C(t,n,r,o){R&&T(!1),"string"==typeof n&&(o=r,r=n,n=null),o=p({},N,o||{});var a,c,h,d=o.data||{};h=o.trapClick?E:x,t?(a=l.getOriginal(t)||t,c=l.toPoint(t),i(t)):(a=null,c={x:0,y:0}),n||(n=s(c)),R=p({prefix:r,data:d,payload:{},globalStart:c,localStart:n},o),o.manual||("undefined"!=typeof TouchEvent&&a instanceof TouchEvent?(u.bind(document,"touchstart",w,!0),u.bind(document,"touchcancel",T,!0),u.bind(document,"touchmove",g,!0),u.bind(document,"touchend",x,!0)):(u.bind(document,"mousemove",g),u.bind(document,"mousedown",h,!0),u.bind(document,"mouseup",h,!0)),u.bind(document,"keyup",b),e.on("element.hover",_),e.on("element.out",S)),y("init"),o.autoActivate&&g(t,!0)}var R,N={threshold:5,trapClick:!0};e.on("diagram.destroy",T),this.init=C,this.move=g,this.hover=_,this.out=S,this.end=x,this.cancel=T,this.context=function(){return R},this.setOptions=function(e){p(N,e)}}var c=Math.round,p=e(377),u=e(395),l=e(222),h=e(218),d=e(220),f=e(104).Event,m="djs-drag-active";s.$inject=["eventBus","canvas","selection"],t.exports=s},{104:104,218:218,220:220,222:222,377:377,395:395}],128:[function(e,t,n){"use strict";function i(e){var t=o(e,"svg, .djs-element",!0);return t&&new a(t)}function r(e,t,n){var r=this;e.on("drag.start",function(t){e.once("drag.move",function(){e.once("drag.move",function(e){r.ensureHover(e)})})}),this.ensureHover=function(e){if(!e.hover){var r,o,a,c,p=e.originalEvent;p instanceof MouseEvent&&(r=s.toPoint(p),o=document.elementFromPoint(r.x,r.y),c=i(o),c&&(a=n.get(c),t.hover({element:a,gfx:c})))}}}var o=e(392),a=e(240),s=e(222);r.$inject=["eventBus","dragging","elementRegistry"],t.exports=r},{222:222,240:240,392:392}],129:[function(e,t,n){t.exports={__init__:["hoverFix"],__depends__:[e(189)],dragging:["type",e(127)],hoverFix:["type",e(128)]}},{127:127,128:128,189:189}],130:[function(e,t,n){"use strict";function i(e,t,n,i,r,o,s){this._actions={undo:function(){t.undo()},redo:function(){t.redo()},stepZoom:function(e){r.stepZoom(e.value)},zoom:function(e){o.zoom(e.value)},removeSelection:function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});if(r===!1)return;t=a(r)?r:e,t.length&&n.removeElements(t.slice())}},moveCanvas:function(e){var t=0,n=0,i=e.invertY,r=e.speed,a=r/Math.min(Math.sqrt(o.viewbox().scale),1);switch(e.direction){case"left":t=a;break;case"up":n=a;break;case"right":t=-a;break;case"down":n=-a}n&&i&&(n=-n),o.scroll({dx:t,dy:n})}}}function r(e,t){return new Error(e+" "+t)}var o=e(255),a=e(368),s="is not a registered action",c="is already registered";i.$inject=["eventBus","commandStack","modeling","selection","zoomScroll","canvas","rules"],t.exports=i,i.prototype.trigger=function(e,t){if(!this._actions[e])throw r(e,s);return this._actions[e](t)},i.prototype.register=function(e,t){return"string"==typeof e?this._registerAction(e,t):void o(e,function(e,t){this._registerAction(t,e)},this)},i.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw r(e,c);this._actions[e]=t},i.prototype.unregister=function(e){if(!this.isRegistered(e))throw r(e,s);this._actions[e]=void 0},i.prototype.length=function(){return Object.keys(this._actions).length},i.prototype.isRegistered=function(e){return!!this._actions[e]}},{255:255,368:368}],131:[function(e,t,n){t.exports={__depends__:[e(189),e(216)],__init__:["editorActions"],editorActions:["type",e(130)]}},{130:130,189:189,216:216}],132:[function(e,t,n){"use strict";function i(e,t,n,i){this._dragging=n,i.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",a,function(e){return r(e)?(this.activateMove(e.originalEvent),!1):void 0},this),e.on("hand.end",function(t){var n=t.originalEvent.target;return t.hover||n instanceof SVGElement?void e.once("hand.ended",function(){this.activateMove(t.originalEvent,{reactivate:!0})},this):!1},this),e.on("hand.move.start",function(e){var t=e.context;t.start={x:e.x,y:e.y}}),e.on("hand.move.move",function(e){var n=e.context,i=n.start,r=n.delta,a={x:e.x,y:e.y},s=t.viewbox().scale,c=n.last||i;r=o(a,c),t.scroll({dx:r.x*s,dy:r.y*s}),n.last=a}),e.on("hand.move.end",function(t){var n=t.context,i=n.reactivate;return!r(t)&&i&&e.once("hand.move.ended",function(e){this.activateHand(e.originalEvent,!0,!0)},this),!1},this)}var r=e(228).hasPrimaryModifier,o=e(227).substract,a=1500,s="grab";i.$inject=["eventBus","canvas","dragging","toolManager"],t.exports=i,i.prototype.activateMove=function(e,t,n){"object"==typeof t&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:s,data:{context:n||{}}})},i.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:s,data:{context:{reactivate:n}}})},i.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateHand()},i.prototype.isActive=function(){var e=this._dragging.context();return e&&/^hand/.test(e.prefix)}},{227:227,228:228}],133:[function(e,t,n){"use strict";t.exports={__depends__:[e(198)],__init__:["handTool"],handTool:["type",e(132)]}},{132:132,198:198}],134:[function(e,t,n){"use strict";function i(e,t,n){function i(n,i,r){if(a(i)){var o,c,p;r?c=t.getGraphics(r):(o=i.delegateTarget||i.target,o&&(c=new s(o),r=t.get(c))),c&&r&&(p=e.fire(n,{element:r,gfx:c,originalEvent:i}),p===!1&&(i.stopPropagation(),i.preventDefault()))}}function c(e){var t=y[e];return t||(t=y[e]=function(t){i(e,t)}),t}function l(e,t,n){var r=g[e];if(!r)throw new Error("unmapped DOM event name <"+e+">");return i(r,t,n)}function h(e,t,n){var i=c(n);i.$delegate=o.bind(e,x,t,i)}function d(e,t,n){o.unbind(e,t,c(n).$delegate)}function f(e){r(g,function(t,n){h(e.node,n,t)})}function m(e){r(g,function(t,n){d(e.node,n,t)})}var v=n.cls("djs-hit",["no-fill","no-border"],{
stroke:"white",strokeWidth:15}),y={},g={mouseover:"element.hover",mouseout:"element.out",click:"element.click",dblclick:"element.dblclick",mousedown:"element.mousedown",mouseup:"element.mouseup"},x="svg, .djs-element";e.on("canvas.destroy",function(e){m(e.svg)}),e.on("canvas.init",function(e){f(e.svg)}),e.on(["shape.added","connection.added"],function(e){var t,n,i=e.element,r=e.gfx;i.waypoints?(t=p(i.waypoints),n="connection"):(t=s.create("rect",{x:0,y:0,width:i.width,height:i.height}),n="shape"),t.attr(v).appendTo(r.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");u(i,t.waypoints)}),this.fire=i,this.triggerMouseEvent=l,this.mouseHandler=c,this.registerEvent=h,this.unregisterEvent=d}var r=e(255),o=e(393),a=e(228).isPrimaryButton,s=e(240),c=e(231),p=c.createLine,u=c.updateLine;i.$inject=["eventBus","elementRegistry","styles"],t.exports=i},{228:228,231:231,240:240,255:255,393:393}],135:[function(e,t,n){t.exports={__init__:["interactionEvents"],interactionEvents:["type",e(134)]}},{134:134}],136:[function(e,t,n){"use strict";function i(e,t,n){var i=this;this._config=e||{},this._eventBus=t,this._editorActions=n,this._listeners=[],this._keyHandler=function(e){var t,n,r=e.target,o=i._listeners,a=e.keyCode||e.charCode||-1;if(!c(r,"input, textarea"))for(t=0;n=o[t];t++)n(a,e)&&(e.preventDefault(),e.stopPropagation())},t.on("diagram.destroy",function(){i._fire("destroy"),i.unbind(),i._listeners=null}),t.on("diagram.init",function(){i._fire("init"),e&&e.bindTo&&i.bind(e.bindTo)}),this._init()}function r(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function o(e){return e.ctrlKey||e.metaKey}function a(e){return e.shiftKey}var s=e(395),c=e(396);i.$inject=["config.keyboard","eventBus","editorActions"],t.exports=i,i.prototype.bind=function(e){this.unbind(),this._node=e,s.bind(e,"keydown",this._keyHandler,!0),this._fire("bind")},i.prototype.getBinding=function(){return this._node},i.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),s.unbind(e,"keydown",this._keyHandler,!0)),this._node=null},i.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node,listeners:this._listeners})},i.prototype._init=function(){function e(e,t){return o(t)&&!a(t)&&90===e?(u.trigger("undo"),!0):void 0}function t(e,t){return o(t)&&(89===e||90===e&&a(t))?(u.trigger("redo"),!0):void 0}function n(e,t){return 107!==e&&187!==e&&171!==e&&61!==e||!o(t)?void 0:(u.trigger("stepZoom",{value:1}),!0)}function i(e,t){return 109!==e&&189!==e&&173!==e||!o(t)?void 0:(u.trigger("stepZoom",{value:-1}),!0)}function r(e,t){return 96!==e&&48!==e||!o(t)?void 0:(u.trigger("zoom",{value:1}),!0)}function s(e,t){return 46===e?(u.trigger("removeSelection"),!0):void 0}function c(e,t){if([37,38,39,40].indexOf(e)>=0){var n={invertY:l.invertY,speed:l.speed||50};switch(e){case 37:n.direction="left";break;case 38:n.direction="up";break;case 39:n.direction="right";break;case 40:n.direction="down"}return u.trigger("moveCanvas",n),!0}}var p=this._listeners,u=this._editorActions,l=this._config;p.push(e),p.push(t),p.push(s),p.push(n),p.push(i),p.push(r),p.push(c)},i.prototype.addListener=function(e){this._listeners.push(e)},i.prototype.hasModifier=r,i.prototype.isCmd=o,i.prototype.isShift=a},{395:395,396:396}],137:[function(e,t,n){t.exports={__depends__:[e(131)],__init__:["keyboard"],keyboard:["type",e(136)]}},{131:131,136:136}],138:[function(e,t,n){"use strict";function i(e,t,n){u.call(this,e),e.on("shape.move.start",p,function(e){var t=e.context,n=t.shapes;t.shapes=r(n)}),e.on("shape.move.start",c,function(e){var t=e.context,i=t.shapes,r=[];o(i,function(e){var n=e.label;n&&!n.hidden&&-1===t.shapes.indexOf(n)&&r.push(n),e.labelTarget&&r.push(e)}),o(r,function(e){n.makeDraggable(t,e,!0)})}),this.postExecuted(["elements.move"],function(e){var n=e.context,i=n.closure,r=i.enclosedElements;o(r,function(e){e.label&&!r[e.label.id]&&t.moveShape(e.label,n.delta,e.parent)})})}function r(e){return a(e,function(t){return-1===e.indexOf(t.labelTarget)})}var o=e(255),a=e(253),s=e(243),c=250,p=1500,u=e(98);s(i,u),i.$inject=["eventBus","modeling","moveVisuals"],t.exports=i},{243:243,253:253,255:255,98:98}],139:[function(e,t,n){t.exports={__depends__:[e(166)],__init__:["labelSupport"],labelSupport:["type",e(138)]}},{138:138,166:166}],140:[function(e,t,n){"use strict";function i(e,t,n,i,o,a){this._selection=o,this._dragging=n;var p=this,u={create:function(e){var n,i=t.getDefaultLayer();n=e.frame=c.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()}};a.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",function(){p.activateLasso(t.originalEvent,!0)})}),e.on("lasso.end",function(e){var t=r(e),n=i.filter(function(e){return e});p.select(n,t)}),e.on("lasso.start",function(e){var t=e.context;t.bbox=r(e),u.create(t)}),e.on("lasso.move",function(e){var t=e.context;t.bbox=r(e),u.update(t)}),e.on("lasso.end",function(e){var t=e.context;u.remove(t)}),e.on("lasso.cleanup",function(e){var t=e.context;u.remove(t)}),e.on("element.mousedown",1500,function(e){s(e)&&(p.activateLasso(e.originalEvent),e.stopPropagation())})}function r(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.x&&n.yi.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.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 o=e(385),a=e(221).getEnclosedElements,s=e(228).hasSecondaryModifier,c=e(240),p="crosshair";i.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager"],t.exports=i,i.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:p,data:{context:{}}})},i.prototype.activateSelection=function(e){this._dragging.init(e,"lasso.selection",{trapClick:!1,cursor:p,data:{context:{}}})},i.prototype.select=function(e,t){var n=a(e,t);this._selection.select(o(n))},i.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateSelection()},i.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)}},{221:221,228:228,240:240,385:385}],141:[function(e,t,n){"use strict";t.exports={__depends__:[e(198)],__init__:["lassoTool"],lassoTool:["type",e(140)]}},{140:140,198:198}],142:[function(e,t,n){"use strict";function i(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",function(){i.registerHandlers(n)})}var r=e(255),o=e(210);i.$inject=["eventBus","elementFactory","commandStack"],t.exports=i,i.prototype.getHandlers=function(){return{"shape.append":e(143),"shape.create":e(146),"shape.delete":e(149),"shape.move":e(153),"shape.resize":e(157),"shape.replace":e(156),spaceTool:e(158),"label.create":e(145),"connection.create":e(144),"connection.delete":e(147),"connection.move":e(151),"connection.layout":e(150),"connection.updateWaypoints":e(161),"connection.reconnectStart":e(155),"connection.reconnectEnd":e(155),"elements.move":e(152),"elements.delete":e(148),"element.updateAttachment":e(160),"element.updateAnchors":e(159)}},i.prototype.registerHandlers=function(e){r(this.getHandlers(),function(t,n){e.registerHandler(n,t)})},i.prototype.moveShape=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=null);var o={shape:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)},i.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},i.prototype.moveElements=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o,a=n;i===!0&&(o=n,a=n.parent),i===!1&&(o=null);var s={shapes:e,delta:t,newParent:a,newHost:o,hints:r||{}};this._commandStack.execute("elements.move",s)},i.prototype.updateAnchors=function(e,t){var n={element:e,oldBounds:t};this._commandStack.execute("element.updateAnchors",n)},i.prototype.moveConnection=function(e,t,n,i,r){"object"==typeof i&&(r=i,i=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)},i.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},i.prototype.createConnection=function(e,t,n,i,r){"object"==typeof n&&(r=i,i=n,n=void 0),i=this._create("connection",i);var o={source:e,target:t,parent:r,parentIndex:n,connection:i};return this._commandStack.execute("connection.create",o),o.connection},i.prototype.createShape=function(e,t,n,i,r){"boolean"==typeof i&&(r=i,i=void 0),e=this._create("shape",e);var o={position:t,shape:e,parent:n,parentIndex:i,host:e.host};return r&&(o.parent=n.parent,o.host=n),this._commandStack.execute("shape.create",o),o.shape},i.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",r),r.shape},i.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},i.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},i.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},i.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},i.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},i.prototype.resizeShape=function(e,t){var n={shape:e,newBounds:t};this._commandStack.execute("shape.resize",n)},i.prototype.createSpace=function(e,t,n,i){var r={movingShapes:e,resizingShapes:t,delta:n,direction:i};this._commandStack.execute("spaceTool",r)},i.prototype.updateWaypoints=function(e,t){var n={connection:e,newWaypoints:t};this._commandStack.execute("connection.updateWaypoints",n)},i.prototype.reconnectStart=function(e,t,n){var i={connection:e,newSource:t,dockingOrPoints:n};this._commandStack.execute("connection.reconnectStart",i)},i.prototype.reconnectEnd=function(e,t,n){var i={connection:e,newTarget:t,dockingOrPoints:n};this._commandStack.execute("connection.reconnectEnd",i)},i.prototype.connect=function(e,t,n){return this.createConnection(e,t,n||{},e.parent)},i.prototype._create=function(e,t){return t instanceof o.Base?t:this._elementFactory.create(e,t)}},{143:143,144:144,145:145,146:146,147:147,148:148,149:149,150:150,151:151,152:152,153:153,155:155,156:156,157:157,158:158,159:159,160:160,161:161,210:210,255:255}],143:[function(e,t,n){"use strict";function i(e){this._modeling=e}function r(e,t){return o(e.outgoing,function(e){return e.target===t})}var o=e(251),a=e(243);a(i,e(154)),i.$inject=["modeling"],t.exports=i,i.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},i.prototype.postExecute=function(e){var t=e.connectionParent||e.shape.parent;r(e.source,e.shape)||this._modeling.connect(e.source,e.shape,e.connection,t)}},{154:154,243:243,251:251}],144:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._layouter=t}i.$inject=["canvas","layouter"],t.exports=i,i.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.layoutConnection(r)),this._canvas.addConnection(r,i),r},i.prototype.revert=function(e){var t=e.connection;this._canvas.removeConnection(t),t.source=null,t.target=null}},{}],145:[function(e,t,n){"use strict";function i(e){a.call(this,e)}function r(e){["width","height"].forEach(function(t){"undefined"==typeof e[t]&&(e[t]=0)})}var o=e(243),a=e(146);o(i,a),i.$inject=["canvas"],t.exports=i;var s=a.prototype.execute;i.prototype.execute=function(e){var t=e.shape;return r(t),t.labelTarget=e.labelTarget,s.call(this,e)};var c=a.prototype.revert;i.prototype.revert=function(e){return e.shape.labelTarget=null,c.call(this,e)}},{146:146,243:243}],146:[function(e,t,n){"use strict";function i(e){this._canvas=e}var r=e(377),o=Math.round;i.$inject=["canvas"],t.exports=i,i.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,a=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?r(t,n):r(t,{x:n.x-o(t.width/2),y:n.y-o(t.height/2)}),this._canvas.addShape(t,i,a),t},i.prototype.revert=function(e){this._canvas.removeShape(e.shape)}},{377:377}],147:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._modeling=t}var r=e(219);i.$inject=["canvas","modeling"],t.exports=i,i.prototype.preExecute=function(e){var t=e.connection;t.label&&this._modeling.removeShape(t.label)},i.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=r.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,t},i.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,r.add(n.children,t,i),this._canvas.addConnection(t,n),t}},{219:219}],148:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._elementRegistry=t}var r=e(255),o=e(243);o(i,e(154)),i.$inject=["modeling","elementRegistry"],t.exports=i,i.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,i=e.elements;r(i,function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))})}},{154:154,243:243,255:255}],149:[function(e,t,n){"use strict";function i(e,t){this._canvas=e,this._modeling=t}var r=e(219),o=e(230).saveClear;i.$inject=["canvas","modeling"],t.exports=i,i.prototype.preExecute=function(e){var t=this._modeling,n=e.shape,i=n.label;n.labelTarget&&(e.labelTarget=n.labelTarget,n.labelTarget=null),i&&this._modeling.removeShape(i,{nested:!0}),o(n.incoming,function(e){t.removeConnection(e,{nested:!0})}),o(n.outgoing,function(e){t.removeConnection(e,{nested:!0})}),o(n.children,function(e){t.removeShape(e,{nested:!0})})},i.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=r.indexOf(i.children,n),n.label=null,t.removeShape(n),n},i.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,o=e.oldParentIndex,a=e.labelTarget;return r.add(i.children,n,o),a&&(a.label=n),t.addShape(n,i),n}},{219:219,230:230}],150:[function(e,t,n){"use strict";function i(e,t){this._layouter=e,this._canvas=t}function r(e){return e[e.length-1]}function o(e){function t(e,n){var i=e.indexOf(n);if(0>i&&n){var r=n.parent;i=t(e,r)}return i}var n=e.parent.children,i=n.indexOf(e),r=t(n,e.source),o=t(n,e.target),a=Math.max(r+1,o+1,i);return a>i&&(n.splice(a,0,e),n.splice(i,1)),a}var a=e(377);i.$inject=["layouter","canvas"],t.exports=i,i.prototype.execute=function(e){var t=e.connection,n=t.parent,i=n.children,s=i.indexOf(t),c=t.waypoints;return a(e,{oldWaypoints:c,oldIndex:s}),o(t),t.waypoints=this._layouter.layoutConnection(t,e.hints),c.length?(c[0].original&&!t.waypoints[0].original&&(t.waypoints[0].original={x:c[0].original.x,y:c[0].original.y}),r(c).original&&!r(t.waypoints).original&&(r(t.waypoints).original={x:r(c).original.x,y:r(c).original.y}),t):t},i.prototype.revert=function(e){var t=e.connection,n=t.parent,i=n.children,r=i.indexOf(t),o=e.oldIndex;return t.waypoints=e.oldWaypoints,o!==r&&(i.splice(r,1),i.splice(o,0,t)),t}},{377:377}],151:[function(e,t,n){"use strict";function i(){}var r=e(255),o=e(219);t.exports=i,i.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,a=e.newParentIndex,s=t.parent;e.oldParent=s,e.oldParentIndex=o.remove(s.children,t),o.add(i.children,t,a),t.parent=i;var c=e.hints.updateAnchors!==!1;return r(t.waypoints,function(e){e.x+=n.x,e.y+=n.y,c&&e.original&&(e.original.x+=n.x,e.original.y+=n.y)}),t},i.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,a=e.oldParentIndex,s=e.delta;o.remove(n.children,t),o.add(i.children,t,a),t.parent=i;var c=e.hints.updateAnchors!==!1;return r(t.waypoints,function(e){e.x-=s.x,e.y-=s.y,c&&e.original&&(e.original.x-=s.x,e.original.y-=s.y)}),t}},{219:219,255:255}],152:[function(e,t,n){"use strict";function i(e){this._helper=new r(e)}var r=e(162);i.$inject=["modeling"],t.exports=i,i.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},i.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},i.prototype.execute=function(e){},i.prototype.revert=function(e){}},{162:162}],153:[function(e,t,n){"use strict";function i(e){this._modeling=e,this._helper=new s(e)}var r=e(377),o=e(255),a=e(383),s=e(162),c=e(219);i.$inject=["modeling"],t.exports=i,i.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,o=e.newParentIndex,s=t.parent;return e.oldBounds=a(t,["x","y","width","height"]),e.oldParent=s,e.oldParentIndex=c.remove(s.children,t),c.add(i.children,t,o),r(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},i.prototype.postExecute=function(e){var t=e.shape,n=e.oldBounds,i=this._modeling;e.hints.updateAnchors!==!1&&i.updateAnchors(t,n),e.hints.layout!==!1&&(o(t.incoming,function(e){i.layoutConnection(e,{endChanged:!0})}),o(t.outgoing,function(e){i.layoutConnection(e,{startChanged:!0})})),e.hints.recurse!==!1&&this.moveChildren(e)},i.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,o=e.delta;return c.add(n.children,t,i),r(t,{parent:n,x:t.x-o.x,y:t.y-o.y}),t},i.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},i.prototype.getNewParent=function(e){return e.newParent||e.shape.parent}},{162:162,219:219,255:255,377:377,383:383}],154:[function(e,t,n){"use strict";function i(){}t.exports=i,i.prototype.execute=function(){},i.prototype.revert=function(){}},{}],155:[function(e,t,n){"use strict";function i(){}var r=e(368);i.$inject=[],t.exports=i,i.prototype.execute=function(e){var t,n=e.newSource,i=e.newTarget,o=e.connection,a=e.dockingOrPoints,s=o.waypoints;if(!n&&!i)throw new Error("newSource or newTarget are required");if(n&&i)throw new Error("must specify either newSource or newTarget");return e.oldWaypoints=s,r(a)?t=a:(t=s.slice(),t.splice(n?0:-1,1,a)),n&&(e.oldSource=o.source,o.source=n),i&&(e.oldTarget=o.target,o.target=i),o.waypoints=t,o},i.prototype.revert=function(e){var t=e.newSource,n=e.newTarget,i=e.connection;return t&&(i.source=e.oldSource),n&&(i.target=e.oldTarget),i.waypoints=e.oldWaypoints,i}},{368:368}],156:[function(e,t,n){"use strict";function i(e,t){this._modeling=e,this._rules=t}var r=e(255);i.$inject=["modeling","rules"],t.exports=i,i.prototype.preExecute=function(e){var t,n=this._modeling,i=this._rules,o=e.oldShape,a=e.newData,s=e.hints,c={x:a.x,y:a.y};t=e.newShape=e.newShape||n.createShape(a,c,o.parent),o.host&&n.updateAttachment(t,o.host),s.moveChildren!==!1&&n.moveElements(o.children,{x:0,y:0},t);var p=o.incoming.slice(),u=o.outgoing.slice();r(p,function(e){var r=e.waypoints,o=r[r.length-1],a=i.allowed("connection.reconnectEnd",{source:e.source,target:t,connection:e});a&&n.reconnectEnd(e,t,o)}),r(u,function(e){var r=e.waypoints,o=r[0],a=i.allowed("connection.reconnectStart",{source:t,target:e.target,connection:e});a&&n.reconnectStart(e,t,o)})},i.prototype.postExecute=function(e){var t=this._modeling,n=e.oldShape;t.removeShape(n)},i.prototype.execute=function(e){},i.prototype.revert=function(e){}},{255:255}],157:[function(e,t,n){"use strict";function i(e){this._modeling=e}var r=e(377),o=e(255);i.$inject=["modeling"],t.exports=i,i.prototype.execute=function(e){var t=e.shape,n=e.newBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},r(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},i.prototype.postExecute=function(e){var t=e.shape,n=e.oldBounds,i=this._modeling;i.updateAnchors(t,n),o(t.incoming,function(e){i.layoutConnection(e,{endChanged:!0})}),o(t.outgoing,function(e){i.layoutConnection(e,{startChanged:!0})})},i.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return r(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t}},{255:255,377:377}],158:[function(e,t,n){"use strict";function i(e){this._modeling=e}var r=e(255),o=e(195);i.$inject=["modeling"],t.exports=i,i.prototype.preExecute=function(e){var t=this._modeling,n=e.resizingShapes,i=e.delta,a=e.direction;r(n,function(e){var n=o.resizeBounds(e,a,i);t.resizeShape(e,n)})},i.prototype.postExecute=function(e){var t=this._modeling,n=e.movingShapes,i=e.delta;t.moveElements(n,i)},i.prototype.execute=function(e){},i.prototype.revert=function(e){}},{195:195,255:255}],159:[function(e,t,n){"use strict";function i(){}var r=e(255),o=e(217).getNewAttachPoint;t.exports=i,i.prototype.execute=function(e){function t(e,t){r(e,function(e){var r=e.waypoints,c="end"===t?r.length-1:0,p=r[c];s.push({point:p,oldOriginal:p.original}),p.original=o(p.original||p,i,n),a.push(e)})}var n=e.element,i=e.oldBounds,a=e.changedConnections=[],s=e.oldAnchors=[];return t(n.incoming,"end"),t(n.outgoing,"start"),a},i.prototype.revert=function(e){var t=e.oldAnchors,n=e.changedConnections;return r(t,function(e){e.point.original=e.oldOriginal}),n}},{217:217,255:255}],160:[function(e,t,n){"use strict";function i(e){this._modeling=e}function r(e,t){return a.remove(e&&e.attachers,t)}function o(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),a.add(i,t,n)}}var a=e(219);t.exports=i,i.$inject=["modeling"],i.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=r(i,t),o(n,t),t.host=n,t},i.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,a=e.attacherIdx;return t.host=i,r(n,t),o(i,t,a),t}},{219:219}],161:[function(e,t,n){"use strict";function i(){}t.exports=i,i.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},i.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t}},{}],162:[function(e,t,n){"use strict";function i(e){this._modeling=e}var r=e(255),o=e(221);t.exports=i,i.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},i.prototype.moveClosure=function(e,t,n,i,o){var a=this._modeling,s=e.allShapes,c=e.allConnections,p=e.enclosedConnections,u=e.topLevel,l=!1;o&&o.parent===n&&(l=!0),r(s,function(e){a.moveShape(e,t,u[e.id]&&!l&&n,{recurse:!1,layout:!1})}),r(c,function(e){var i=!!s[e.source.id],r=!!s[e.target.id];p[e.id]&&i&&r?a.moveConnection(e,t,u[e.id]&&n,{updateAnchors:!1}):a.layoutConnection(e,{startChanged:i,endChanged:r})})},i.prototype.getClosure=function(e){return o.getClosure(e)}},{221:221,255:255}],163:[function(e,t,n){t.exports={__depends__:[e(100),e(120),e(185)],__init__:["modeling"],modeling:["type",e(142)],layouter:["type",e(206)]}},{100:100,120:120,142:142,185:185,206:206}],164:[function(e,t,n){"use strict";function i(e){return{x:e.x+d(e.width/2),y:e.y+d(e.height/2)}}function r(e,t,n,r,s){function c(e,t,n,i){return s.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function f(e,n,r){if(!n.waypoints&&n.parent){var o=i(n);t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:r,data:{shape:n,context:{}}})}}e.on("shape.move.start",l,function(e){var t=e.context,n=e.shape,i=r.get().slice();-1===i.indexOf(n)&&(i=[n]),i=o(i),a(t,{shapes:i,shape:n})}),e.on("shape.move.start",u,function(e){var t,n=e.context,i=n.shapes;return t=n.canExecute=c(i),t?void 0:(e.stopPropagation(),!1)}),e.on("shape.move.move",p,function(e){var t,n=e.context,i=n.shapes,r=e.hover,o={x:e.dx,y:e.dy},a={x:e.x,y:e.y};return t=c(i,o,a,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,i=t.delta,r=t.canExecute,o="attach"===r;return r?(i.x=d(i.x),i.y=d(i.y),void n.moveElements(t.shapes,i,t.target,o,{primaryShape:t.shape})):!1}),e.on("element.mousedown",function(e){var t=h(e);if(!t)throw new Error("must supply DOM mousedown event");f(t,e.element)}),this.start=f}function o(e){var t=c(e,"id");return s(e,function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0})}var a=e(377),s=e(253),c=e(256),p=500,u=1250,l=1500,h=e(222).getOriginal,d=Math.round;r.$inject=["eventBus","dragging","modeling","selection","rules"],t.exports=r},{222:222,253:253,256:256,377:377}],165:[function(e,t,n){"use strict";function i(e,t,n,i){function c(e){return t.getGraphics(e)}function p(e){var t=d.selfAndDirectChildren(e,!0),n=r(t);return n}function u(e){var t=d.selfAndAllChildren(e,!0),n=h(t,function(e){return(e.incoming||[]).concat(e.outgoing||[])});return a(t.concat(n),!0)}function l(e,t){[x,v,y,g].forEach(function(i){i===t?n.addMarker(e,i):n.removeMarker(e,i)})}function b(e,t){var r=e.dragGroup;r||(r=e.dragGroup=n.getDefaultLayer().group().attr(i.cls("djs-drag-group",["no-events"])));var o=c(t),a=o.clone(),s=o.getBBox();return a.attr(i.cls("djs-dragger",[],{x:s.x,y:s.y})),r.add(a),a}function E(e,t,i){b(e,t),i&&n.addMarker(t,m),e.allDraggedElements?e.allDraggedElements.push(t):e.allDraggedElements=[t]}this.addDragger=b,this.makeDraggable=E,e.on("shape.move.start",f,function(e){var t=e.context,i=t.shapes,r=t.allDraggedElements,c=p(i);c.forEach(function(e){b(t,e)}),r=r?a(r,u(i)):u(i),s(r,function(e){n.addMarker(e,m)}),t.allDraggedElements=r,t.differentParents=o(i)}),e.on("shape.move.move",f,function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?l(i,x):t.canExecute&&i&&i.id!==r.id?l(i,g):l(i,t.canExecute?v:y)),n.translate(e.dx,e.dy)}),e.on(["shape.move.out","shape.move.cleanup"],function(e){var t=e.context,n=t.target;n&&l(n,null)}),e.on("shape.move.cleanup",function(e){var t=e.context,i=t.allDraggedElements,r=t.dragGroup;s(i,function(e){n.removeMarker(e,m)}),r&&r.remove()})}function r(e){var t=c(e,function(t){if(t.waypoints){var n=p(e,t.source),i=p(e,t.target);return n&&i}return!0});return t}function o(e){return 1!==u(l(e,function(e){return e.parent&&e.parent.id}))}var a=e(245),s=e(255),c=e(253),p=e(254),u=e(260),l=e(256),h=e(258),d=e(221),f=500,m="djs-dragging",v="drop-ok",y="drop-not-ok",g="new-parent",x="attach-ok";i.$inject=["eventBus","elementRegistry","canvas","styles"],t.exports=i},{221:221,245:245,253:253,254:254,255:255,256:256,258:258,260:260}],166:[function(e,t,n){t.exports={__depends__:[e(135),e(189),e(169),e(185),e(129)],__init__:["move","moveVisuals"],move:["type",e(164)],moveVisuals:["type",e(165)]}},{129:129,135:135,164:164,165:165,169:169,185:185,189:189}],167:[function(e,t,n){"use strict";function i(e){o.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)}),this.preExecute(["shape.move","connection.move"],function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)})}var r=e(243),o=e(98);i.prototype.getOrdering=function(e,t){return null},r(i,o),t.exports=i},{243:243,98:98}],168:[function(e,t,n){"use strict";function i(e,t,n){function i(e,t){return e.rect(10,10,0,0).attr(c)}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,n=e.gfx,r=n.select(".djs-outline");r||(r=i(n,t)),o(r,t)}),e.on(["connection.added","connection.changed"],function(e){var t=e.element,n=e.gfx,r=n.select(".djs-outline");r||(r=i(n,t)),a(r,t)})}var r=e(221).getBBox;i.$inject=["eventBus","styles","elementRegistry"],t.exports=i},{221:221}],169:[function(e,t,n){"use strict";t.exports={__init__:["outline"],outline:["type",e(168)]}},{168:168}],170:[function(e,t,n){"use strict";function i(e){var t=d('
');return e.insertBefore(t,e.firstChild),t}function r(e,t,n){u(e.style,{left:t+"px",top:n+"px"})}function o(e,t){e.style.display=t===!1?"none":""}function a(e,t,n){this._eventBus=e,this._canvas=t,this._elementRegistry=n,this._ids=y,this._overlayDefaults={show:{minZoom:.7,maxZoom:5}},this._overlays={},this._overlayContainers={},this._overlayRoot=i(t.getContainer()),this._init()}var s=e(368),c=e(374),p=e(372),u=e(377),l=e(255),h=e(253),d=e(394),f=e(390),m=e(398),v=e(221).getBBox,y=new(e(225))("ov");a.$inject=["eventBus","canvas","elementRegistry"],t.exports=a,a.prototype.get=function(e){if(c(e)&&(e={id:e}),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?h(t.overlays,{type:e.type}):t.overlays.slice():[]}return e.type?h(this._overlays,{type:e.type}):e.id?this._overlays[e.id]:null},a.prototype.add=function(e,t,n){if(p(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 i=this._ids.next();return n=u({},this._overlayDefaults,n,{id:i,type:t,element:e,html:n.html}),this._addOverlay(n),i},a.prototype.remove=function(e){var t=this.get(e)||[];s(t)||(t=[t]);var n=this;l(t,function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(m(e.html),m(e.htmlContainer),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)}})},a.prototype.show=function(){o(this._overlayRoot)},a.prototype.hide=function(){o(this._overlayRoot,!1)},a.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,o=t.y;if(t.waypoints){var a=v(t);i=a.x,o=a.y}r(n,i,o)},a.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,i=e.element,o=t.left,a=t.top;if(void 0!==t.right){var s;s=i.waypoints?v(i).width:i.width,o=-1*t.right+s}if(void 0!==t.bottom){var c;c=i.waypoints?v(i).height:i.height,a=-1*t.bottom+c}r(n,o||0,a||0)},a.prototype._createOverlayContainer=function(e){var t=d('
');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),n},a.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.style.transform=i,this._overlayRoot.style["-ms-transform"]=i,this._overlayRoot.style["-webkit-transform"]=i},a.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},a.prototype._addOverlay=function(e){var t,n,i=e.id,r=e.element,o=e.html;o.get&&(o=o.get(0)),c(o)&&(o=d(o)),n=this._getOverlayContainer(r),t=d(''),t.appendChild(o),e.type&&f(t).add("djs-overlay-"+e.type),
e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[i]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},a.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,i=e.htmlContainer,r=!0;n&&((n.minZoom>t.scale||n.maxZoom
'),e.appendChild(r));var o=t.html||(t.separator?' ':'
'),p=a(o);r.appendChild(p),t.separator||(c(p,"data-action",n),t.title&&c(p,"title",t.title),t.className&&u(p).add(t.className),t.imageUrl&&p.appendChild(a(' ')))}),this.open(!0)},i.prototype.trigger=function(e,t,n){var i,o,a,s=this._entries,p=!1,u=t.delegateTarget||t.target;return u?(i=s[c(u,"data-action")],o=i.action,a=t.originalEvent||t,r(o)?"click"===e&&(p=o(a,n)):o[e]&&(p=o[e](a,n)),void t.preventDefault()):t.preventDefault()},i.prototype.close=function(){u(this._container).remove("open")},i.prototype.open=function(){u(this._container).add("open")},i.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},i.prototype.isActiveTool=function(e){return e&&this._activeTool===e},i.prototype.updateToolHighlight=function(e){var t,n;this._toolsContainer||(t=s(".djs-palette-entries",this._container),this._toolsContainer=s("[data-group=tools]",t)),n=this._toolsContainer,o(n.children,function(t){var n=t.getAttribute("data-action");n&&(n=n.replace("-tool",""),t.classList.contains("entry")&&n===e?u(t).add("highlighted-entry"):u(t).remove("highlighted-entry"))})},i.prototype.isOpen=function(){return this._container&&u(this._container).has("open")},i.HTML_MARKUP=''},{255:255,369:369,389:389,390:390,391:391,393:393,394:394,395:395,396:396,397:397}],173:[function(e,t,n){"use strict";t.exports={__depends__:[e(198)],__init__:["palette"],palette:["type",e(172)]}},{172:172,198:198}],174:[function(e,t,n){"use strict";function i(e,t){this._eventBus=e,this._canvas=t,this._providers={}}var r=e(255),o=e(377),a=e(254),s=e(393),c=e(394),p=e(390),u=e(389),l=e(398),h="data-id";i.$inject=["eventBus","canvas"],i.prototype.registerProvider=function(e,t){this._providers[e]=t},i.prototype.create=function(e,t){var n=this._providers[e];if(!n)throw new Error("Provider is not registered: "+e);if(!t)throw new Error("Element is missing");var i=this._current={provider:n,className:e,element:t};return n.getHeaderEntries&&(i.headerEntries=n.getHeaderEntries(t)),i.entries=n.getEntries(t),this},i.prototype.isEmpty=function(){var e=this._current;return 0===e.entries.length&&e.headerEntries&&0===e.headerEntries.length},i.prototype.open=function(e){if(!e)throw new Error("the position argument is missing");this.isOpen()&&this.close();var t=this._current,n=this._canvas,i=n.getContainer();if(t.position=e,t.container=this._createContainer(),t.headerEntries){var r=this._createEntries(t.headerEntries,"djs-popup-header");t.container.appendChild(r)}if(t.entries){var o=this._createEntries(t.entries,"djs-popup-body");t.container.appendChild(o)}return this._attachContainer(t.container,i,e.cursor),this},i.prototype.close=function(){this.isOpen()&&(this._unbindHandlers(),l(this._current.container),this._current.container=null)},i.prototype.isOpen=function(){return!!this._current.container},i.prototype.trigger=function(e){e.preventDefault();var t=e.delegateTarget||e.target,n=u(t,h),i=this._getEntry(n);return i.action?i.action.call(null,e,i):void 0},i.prototype._getEntry=function(e){var t={id:e},n=a(this._current.entries,t)||a(this._current.headerEntries,t);if(!n)throw new Error("entry not found");return n},i.prototype._createContainer=function(){var e=c('